class Bosh::Director::Api::RuntimeConfigManager
Public Instance Methods
find_by_id(id)
click to toggle source
# File lib/bosh/director/api/runtime_config_manager.rb, line 21 def find_by_id(id) Bosh::Director::Models::RuntimeConfig.find(id: id) end
latest()
click to toggle source
# File lib/bosh/director/api/runtime_config_manager.rb, line 17 def latest list(1).first end
list(limit)
click to toggle source
# File lib/bosh/director/api/runtime_config_manager.rb, line 13 def list(limit) Bosh::Director::Models::RuntimeConfig.order(Sequel.desc(:id)).limit(limit).to_a end
update(runtime_config_yaml)
click to toggle source
# File lib/bosh/director/api/runtime_config_manager.rb, line 5 def update(runtime_config_yaml) runtime_config = Bosh::Director::Models::RuntimeConfig.new( properties: runtime_config_yaml ) validate_manifest!(runtime_config) runtime_config.save end
Private Instance Methods
validate_manifest!(runtime_config)
click to toggle source
# File lib/bosh/director/api/runtime_config_manager.rb, line 27 def validate_manifest!(runtime_config) runtime_manifest = runtime_config.manifest Bosh::Director::DeploymentPlan::RuntimeManifestParser.new(@logger).parse(runtime_manifest) end