Class: Bosh::Director::DeploymentPlan::Network
- Includes:
- ValidationHelper
- Defined in:
- lib/bosh/director/deployment_plan/network.rb
Overview
Represents a logical deployment network.
Direct Known Subclasses
Constant Summary collapse
- VALID_DEFAULTS =
%w(dns gateway).sort
Instance Attribute Summary collapse
-
#canonical_name ⇒ String
Canonical network name.
-
#name ⇒ String
Network name.
Instance Method Summary collapse
- #find_az_names_for_ip(ip) ⇒ Object
- #has_azs?(az_names) ⇒ Boolean
-
#initialize(name, logger) ⇒ Network
constructor
Creates a new network.
- #manual? ⇒ Boolean
-
#network_settings(reservation, default_properties = VALID_DEFAULTS, availability_zone = nil) ⇒ Hash
Returns the network settings for the specific reservation.
- #supports_azs? ⇒ Boolean
- #validate_reference_from_job!(job_network_spec, job_name) ⇒ Object
Methods included from ValidationHelper
Constructor Details
#initialize(name, logger) ⇒ Network
Creates a new network.
23 24 25 26 27 |
# File 'lib/bosh/director/deployment_plan/network.rb', line 23 def initialize(name, logger) @name = name @canonical_name = Canonicalizer.canonicalize(@name) @logger = logger end |
Instance Attribute Details
#canonical_name ⇒ String
Returns canonical network name.
16 17 18 |
# File 'lib/bosh/director/deployment_plan/network.rb', line 16 def canonical_name @canonical_name end |
#name ⇒ String
Returns network name.
13 14 15 |
# File 'lib/bosh/director/deployment_plan/network.rb', line 13 def name @name end |
Instance Method Details
#find_az_names_for_ip(ip) ⇒ Object
44 45 46 |
# File 'lib/bosh/director/deployment_plan/network.rb', line 44 def find_az_names_for_ip(ip) raise NotImplementedError end |
#has_azs?(az_names) ⇒ Boolean
40 41 42 |
# File 'lib/bosh/director/deployment_plan/network.rb', line 40 def has_azs?(az_names) raise NotImplementedError end |
#manual? ⇒ Boolean
55 56 57 |
# File 'lib/bosh/director/deployment_plan/network.rb', line 55 def manual? false end |
#network_settings(reservation, default_properties = VALID_DEFAULTS, availability_zone = nil) ⇒ Hash
Returns the network settings for the specific reservation.
35 36 37 38 |
# File 'lib/bosh/director/deployment_plan/network.rb', line 35 def network_settings(reservation, default_properties = VALID_DEFAULTS, availability_zone = nil) raise NotImplementedError, "#network_settings not implemented for #{self.class}" end |
#supports_azs? ⇒ Boolean
51 52 53 |
# File 'lib/bosh/director/deployment_plan/network.rb', line 51 def supports_azs? false end |
#validate_reference_from_job!(job_network_spec, job_name) ⇒ Object
48 49 |
# File 'lib/bosh/director/deployment_plan/network.rb', line 48 def validate_reference_from_job!(job_network_spec, job_name) end |