lib/cloudstack-cli/commands/stack.rb in cloudstack-cli-0.2.1 vs lib/cloudstack-cli/commands/stack.rb in cloudstack-cli-0.2.2
- old
+ new
@@ -8,17 +8,23 @@
threads = []
stack["servers"].each do |server|
server["name"].split(', ').each_with_index do |name, i|
threads << Thread.new(i) {
bootstrap_server(
- name,
- server["zone"] || stack["zone"],
- server["template"],
- server["offering"],
- server["networks"] ? server["networks"].split(', ') : nil,
- server["port_rules"] ? server["port_rules"].split(', ') : nil,
- stack["project"]
+ name: name,
+ displayname: server["decription"],
+ zone: server["zone"] || stack["zone"],
+ template: server["template"],
+ iso: server["iso"] ,
+ offering: server["offering"],
+ networks: server["networks"] ? server["networks"].split(', ') : nil,
+ port_rules: server["port_rules"] ? server["port_rules"].split(', ') : nil,
+ project: stack["project"],
+ disk_offering: server["disk_offering"],
+ disk_size: server["disk_size"],
+ group: server["group"] || stack["group"],
+ keypair: server["keypair"] || stack["keypair"]
)
}
end
end
threads.each {|t| t.join }
@@ -35,9 +41,10 @@
servers = []
server = stack["servers"].collect do |server|
server["name"].split(', ').each {|name| servers << name}
end
say "Destroy stack #{stack["name"]}...", :yellow
+ puts
invoke "server:destroy", servers, project: stack["project"], force: options[:force]
end
no_commands do
def parse_stackfile(stackfile)
\ No newline at end of file