try to use _id instead of id on static adding

This commit is contained in:
Anton Chuchkalov 2016-02-16 11:12:05 +03:00
parent 2987e3d82e
commit e6c5548310
2 changed files with 3 additions and 2 deletions

View File

@ -174,7 +174,8 @@ class Server < Handler
ips_with_names: get_file_contents(ips_file_path)
}
q[:public_ip] = options[:public_ip] if options[:public_ip]
post "/server/add_and_bootstrap_servers", q
report_ids = post "/server/add_and_bootstrap_servers", q
reports_urls(report_ids)
end
def pause_handler

View File

@ -328,7 +328,7 @@ module Devops
# :run_list
def add_static_server(attrs)
server = Devops::Model::Server.new(
'id' => "static_#{attrs[:key]}-#{attrs[:chef_node_name]}-#{Time.now.to_i}",
'_id' => "static_#{attrs[:key]}-#{attrs[:chef_node_name]}-#{Time.now.to_i}",
'provider' => ::Provider::ProviderFactory.get('static').name,
'project' => attrs[:project],
'deploy_env' => attrs[:deploy_env],