Class: Bosh::Director::DeploymentPlan::DeploymentSpecParser

Inherits:
Object
  • Object
show all
Includes:
Bosh::Director::DnsHelper, ValidationHelper
Defined in:
lib/bosh/director/deployment_plan/deployment_spec_parser.rb

Constant Summary

Constants included from Bosh::Director::DnsHelper

Bosh::Director::DnsHelper::SOA, Bosh::Director::DnsHelper::TTL_4H, Bosh::Director::DnsHelper::TTL_5M

Instance Method Summary collapse

Methods included from ValidationHelper

#invalid_type, #safe_property

Methods included from Bosh::Director::DnsHelper

#add_default_dns_server, #canonical, #default_dns_server, #delete_dns_records, #delete_empty_domain, #dns_domain_name, #dns_ns_record, #dns_servers, #invalid_dns, #reverse_domain, #reverse_host, #update_dns_a_record, #update_dns_ptr_record

Constructor Details

#initialize(event_log) ⇒ DeploymentSpecParser

Returns a new instance of DeploymentSpecParser.



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

def initialize(event_log)
  @event_log = event_log
end

Instance Method Details

#parse(manifest, options = {}) ⇒ DeploymentPlan::Planner

Returns Deployment as build from deployment_spec.

Parameters:

  • manifest (Hash)

    Raw deployment manifest

Returns:



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/bosh/director/deployment_plan/deployment_spec_parser.rb', line 15

def parse(manifest, options = {})
  @manifest = manifest

  @job_states = safe_property(options, 'job_states',
    :class => Hash, :default => {})

  @deployment = Planner.new(parse_name, options)

  parse_properties
  parse_releases
  parse_networks
  parse_compilation
  parse_update
  parse_resource_pools
  parse_jobs

  @deployment
end