Class: Bosh::Director::DeploymentPlan::JobNetworksParser

Inherits:
Object
  • Object
show all
Includes:
IpUtil, ValidationHelper
Defined in:
lib/bosh/director/deployment_plan/job_network_parser.rb

Instance Method Summary collapse

Methods included from IpUtil

#each_ip, #format_ip, #ip_to_i, #ip_to_netaddr

Methods included from ValidationHelper

#safe_property

Constructor Details

#initialize(properties_that_require_defaults) ⇒ JobNetworksParser

Returns a new instance of JobNetworksParser.



9
10
11
# File 'lib/bosh/director/deployment_plan/job_network_parser.rb', line 9

def initialize(properties_that_require_defaults)
  @properties_that_require_defaults = properties_that_require_defaults
end

Instance Method Details

#parse(job_spec, job_name, manifest_networks) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/bosh/director/deployment_plan/job_network_parser.rb', line 13

def parse(job_spec, job_name, manifest_networks)
  networks = parse_networks(job_spec, job_name, manifest_networks)
  networks.each do |network|
    validate_default_properties(network, job_name)
  end

  validate_default_networks(networks, job_name)

  networks
end