Class: Bosh::Director::Api::DeploymentLookup

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/director/api/deployment_lookup.rb

Instance Method Summary collapse

Instance Method Details

#by_name(name) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/bosh/director/api/deployment_lookup.rb', line 4

def by_name(name)
  deployment = Models::Deployment[name: name]
  if deployment.nil?
    raise DeploymentNotFound, "Deployment '#{name}' doesn't exist"
  end
  deployment
end