knife-cloudstack-fog 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,13 +45,6 @@ class Chef
45
45
  :long => "--zoneid ZONE",
46
46
  :description => "The CloudStack zone ID for the server."
47
47
 
48
- option :cloudstack_networknames,
49
- :short => "-W NETWORKNAMES",
50
- :long => "--networknames NETWORKNAMES",
51
- :description => "Comma separated list of CloudStack network names. Each group name must be encapuslated in quotes if it contains whitespace.",
52
- :proc => lambda { |n| n.split(/[\s,]+/) },
53
- :default => []
54
-
55
48
  option :cloudstack_networkids,
56
49
  :short => "-w NETWORKIDS",
57
50
  :long => "--networkids NETWORKIDS",
@@ -191,6 +184,15 @@ class Chef
191
184
  options['name'] = locate_config_value(:host_name)
192
185
  end
193
186
 
187
+ network_ids = []
188
+ if locate_config_value(:cloudstack_networkids) != []
189
+ cs_networkids = locate_config_value(:cloudstack_networkids)
190
+ cs_networkids.each do |id|
191
+ network_ids.push(id)
192
+ end
193
+ options['networkids'] = network_ids
194
+ end
195
+
194
196
  security_groups = []
195
197
  if locate_config_value(:cloudstack_groupids) != []
196
198
  cs_groupids = locate_config_value(:cloudstack_groupids)
@@ -73,6 +73,7 @@ class Chef
73
73
 
74
74
  temp.each do |template|
75
75
  template_list << template['id'].to_s
76
+ template['hypervisor'] = ' ' if template['hypervisor'].nil?
76
77
  template_list << template['hypervisor']
77
78
 
78
79
  template_size = template['size']
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Cloudstack
3
- VERSION = "0.2.8"
3
+ VERSION = "0.2.9"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-cloudstack-fog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-22 00:00:00.000000000 Z
13
+ date: 2012-06-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: fog