Class: Bosh::Director::DeploymentPlan::DeploymentSpecParser
- Includes:
- ValidationHelper
- Defined in:
- lib/bosh/director/deployment_plan/deployment_spec_parser.rb
Instance Method Summary collapse
-
#initialize(deployment, event_log, logger) ⇒ DeploymentSpecParser
constructor
A new instance of DeploymentSpecParser.
-
#parse(deployment_manifest, options = {}) ⇒ DeploymentPlan::Planner
Deployment as build from deployment_spec.
Methods included from ValidationHelper
Constructor Details
#initialize(deployment, event_log, logger) ⇒ DeploymentSpecParser
Returns a new instance of DeploymentSpecParser.
6 7 8 9 10 |
# File 'lib/bosh/director/deployment_plan/deployment_spec_parser.rb', line 6 def initialize(deployment, event_log, logger) @event_log = event_log @logger = logger @deployment = deployment end |
Instance Method Details
#parse(deployment_manifest, options = {}) ⇒ DeploymentPlan::Planner
Returns Deployment as build from deployment_spec.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/bosh/director/deployment_plan/deployment_spec_parser.rb', line 14 def parse(deployment_manifest, = {}) @deployment_manifest = deployment_manifest @job_states = safe_property(, 'job_states', :class => Hash, :default => {}) = {} if ['canaries'] ['canaries'] = ['canaries'] @logger.debug("Using canaries value #{['canaries']} given in a command line.") end if ['max_in_flight'] ['max_in_flight'] = ['max_in_flight'] @logger.debug("Using max_in_flight value #{['max_in_flight']} given in a command line.") end parse_stemcells parse_properties parse_releases parse_update() parse_jobs() @deployment end |