Class: Bosh::Director::DeploymentPlan::LinkPath
- Defined in:
- lib/bosh/director/deployment_plan/links/link_path.rb
Instance Attribute Summary collapse
-
#deployment ⇒ Object
Returns the value of attribute deployment.
-
#job ⇒ Object
Returns the value of attribute job.
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
-
#template ⇒ Object
Returns the value of attribute template.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#deployment ⇒ Object
Returns the value of attribute deployment
3 4 5 |
# File 'lib/bosh/director/deployment_plan/links/link_path.rb', line 3 def deployment @deployment end |
#job ⇒ Object
Returns the value of attribute job
3 4 5 |
# File 'lib/bosh/director/deployment_plan/links/link_path.rb', line 3 def job @job end |
#name ⇒ Object
Returns the value of attribute name
3 4 5 |
# File 'lib/bosh/director/deployment_plan/links/link_path.rb', line 3 def name @name end |
#path ⇒ Object
Returns the value of attribute path
3 4 5 |
# File 'lib/bosh/director/deployment_plan/links/link_path.rb', line 3 def path @path end |
#template ⇒ Object
Returns the value of attribute template
3 4 5 |
# File 'lib/bosh/director/deployment_plan/links/link_path.rb', line 3 def template @template end |
Class Method Details
.parse(current_deployment_name, path, logger) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/bosh/director/deployment_plan/links/link_path.rb', line 4 def self.parse(current_deployment_name, path, logger) parts = path.split('.') if parts.size == 3 logger.debug("Link '#{path}' does not specify deployment, using current deployment") parts.unshift(current_deployment_name) end if parts.size != 4 logger.error("Invalid link format: #{path}") raise DeploymentInvalidLink, "Link '#{path}' is invalid. A link must have either 3 or 4 parts: " + "[deployment_name.]job_name.template_name.link_name" end new(*parts, path) end |
Instance Method Details
#to_s ⇒ Object
22 23 24 |
# File 'lib/bosh/director/deployment_plan/links/link_path.rb', line 22 def to_s path end |