Revision 2b80fdd9
Added by Ori Rabin almost 6 years ago
app/models/docker_container_wizard_states/exposed_port.rb | ||
---|---|---|
1 | 1 |
module DockerContainerWizardStates |
2 |
class ExposedPort < Parameter |
|
3 |
# The Parameter class from which ExposedPort class inherits,validates for the |
|
4 |
# presence of an associated domain, operating system, host or host group. We |
|
5 |
# will have to reset those validations for the ExposedPort class as they do |
|
6 |
# not make any sense for the context in which this class is being used here. |
|
7 |
ExposedPort.reset_callbacks(:validate) |
|
8 |
|
|
2 |
class ExposedPort < DockerParameter |
|
9 | 3 |
belongs_to :environment, :foreign_key => :reference_id, :inverse_of => :exposed_ports, |
10 | 4 |
:class_name => 'DockerContainerWizardStates::Environment' |
11 |
validates :name, :uniqueness => { :scope => :reference_id },
|
|
5 |
validates :key, :uniqueness => { :scope => :reference_id },
|
|
12 | 6 |
:numericality => { :only_integer => true, |
13 | 7 |
:greater_than => 0, |
14 | 8 |
:less_than_or_equal_to => 655_35 } |
Also available in: Unified diff
Fixes #13043 - Change Parameter inheritance to DockerParameter