Skip to content

Commit 89a5753

Browse files
committed
Merge pull request #104 from muga/add_support_for_size_on_server_create
Add support for size attribute in server create
2 parents 25260e6 + 2a57f6c commit 89a5753

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/chef/knife/cs_server_create.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ class CsServerCreate < Chef::Knife
8888
:description => "The CloudStack disk offering name",
8989
:proc => Proc.new { |d| Chef::Config[:knife][:cloudstack_disk] = d }
9090

91+
option :size,
92+
:long => "--size SIZE",
93+
:description => "The arbitrary size (GB) for the DATADISK volume"
94+
9195
option :cloudstack_hypervisor,
9296
:long => '--cloudstack-hypervisor HYPERVISOR',
9397
:description => "The CloudStack hypervisor type for the server"
@@ -276,6 +280,7 @@ def run
276280
params['affinitygroupnames'] = locate_config_value :aag if locate_config_value :aag
277281
params['displayname'] = if locate_config_value :set_display_name and locate_config_value :chef_node_name then locate_config_value :chef_node_name else hostname end
278282
params['ipaddress'] = locate_config_value(:ik_private_ip) if locate_config_value(:ik_private_ip)
283+
params['size'] = locate_config_value(:size) if locate_config_value(:size)
279284

280285
server = connection.create_server(
281286
hostname,

0 commit comments

Comments
 (0)