lib/oneandone/requests/compute/create_server.rb in fog-oneandone-1.0 vs lib/oneandone/requests/compute/create_server.rb in fog-oneandone-1.2
- old
+ new
@@ -10,12 +10,13 @@
##
def create_server(name: nil, description: nil, rsa_key: nil,
fixed_instance_id: nil, vcore: nil, cores_per_processor: nil,
ram: nil, appliance_id: nil, datacenter_id: nil, hdds: nil,
password: nil, power_on: nil, firewall_id: nil, ip_id: nil,
- load_balancer_id: nil, monitoring_policy_id: nil)
-
+ load_balancer_id: nil, monitoring_policy_id: nil, public_key: nil,
+ server_type: nil, baremetal_model_id: nil)
+
# Build hardware hash
hardware_params = {
'fixed_instance_size_id' => fixed_instance_id,
'vcore' => vcore,
'cores_per_processor' => cores_per_processor,
@@ -37,13 +38,17 @@
'password' => password,
'power_on' => power_on,
'firewall_policy_id' => firewall_id,
'ip_id' => ip_id,
'load_balancer_id' => load_balancer_id,
- 'monitoring_policy_id' => monitoring_policy_id
+ 'monitoring_policy_id' => monitoring_policy_id,
+ 'public_key' => public_key,
+ 'server_type' => server_type
}
+ new_server['baremetal_model_id'] = baremetal_model_id if baremetal_model_id
+
# Clean out null values from POST body
body = clean_hash(new_server)
# Stringify the POST body
string_body = Fog::JSON.encode(body)
@@ -66,11 +71,12 @@
def create_server(name: nil, description: nil, rsa_key: nil,
fixed_instance_id: nil, vcore: nil, cores_per_processor: nil,
ram: nil, appliance_id: nil, datacenter_id: nil, hdds: nil,
password: nil, power_on: nil, firewall_id: nil, ip_id: nil,
- load_balancer_id: nil, monitoring_policy_id: nil)
-
+ load_balancer_id: nil, monitoring_policy_id: nil, public_key: nil,
+ server_type: nil, baremetal_model_id: nil)
+
# Add UUID to hdds being passed in
if hdds
hdds.each do |hdd|
hdd['id'] = Fog::UUID.uuid
end
\ No newline at end of file