Skip to content

Commit 872fd0f

Browse files
committed
Merge pull request #102 from lusis/aag-launch-instance
add support for AAG on server launch
2 parents ee13e00 + c67da0d commit 872fd0f

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

knife-cloudstack.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = %q{knife-cloudstack}
3-
s.version = "0.0.16"
3+
s.version = "0.0.17"
44
s.date = %q{2014-02-12}
55
s.authors = ['Ryan Holmes', 'KC Braunschweig', 'John E. Vincent', 'Chirag Jog', 'Sander Botman']
66
s.email = ['rholmes@edmunds.com', 'kcbraunschweig@gmail.com', 'lusis.org+github.com@gmail.com', 'chirag.jog@me.com', 'sbotman@schubergphilis.com']

lib/chef/knife/cs_server_create.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ class CsServerCreate < Chef::Knife
205205
:proc => lambda { |o| o.split(/[\s,]+/) },
206206
:default => []
207207

208+
option :aag,
209+
:long => "--anti-affinity-groups GROUP_NAME",
210+
:description => "Comma separated list of anti-affinity group names",
211+
:default => false
212+
208213
option :fw_rules,
209214
:short => "-f PORT_RULES",
210215
:long => "--fw-rules PORT_RULES",
@@ -268,6 +273,7 @@ def run
268273
params['hypervisor'] = locate_config_value(:cloudstack_hypervisor) if locate_config_value(:cloudstack_hypervisor)
269274

270275
params['keypair'] = locate_config_value :keypair if locate_config_value :keypair
276+
params['affinitygroupnames'] = locate_config_value :aag if locate_config_value :aag
271277
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
272278
params['ipaddress'] = locate_config_value(:ik_private_ip) if locate_config_value(:ik_private_ip)
273279

0 commit comments

Comments
 (0)