knife-vcloud 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,12 +1,19 @@
1
1
  Changes
2
2
  ==
3
+ 2012-12-27 (0.2.2)
4
+ --
5
+
6
+ FIXES:
7
+ * VM Network config: use command line arguments
8
+ * Properly use boolean options
9
+ * Minor fixes
10
+
3
11
  2012-12-27 (0.2.1)
4
12
  --
5
13
 
6
14
  FIXES:
7
15
  * Change namespace to fix import error under 1.9.x (system-wide)
8
16
 
9
- ==
10
17
  2012-12-24 (0.2.0)
11
18
  --
12
19
 
@@ -18,7 +25,6 @@ FEATURES:
18
25
  FIXES:
19
26
  * Renamed _Common#msg_ to _Common#out\_msg_
20
27
 
21
- ==
22
28
  2012-12-21 (0.1.0)
23
29
  --
24
30
 
data/README.md CHANGED
@@ -54,8 +54,8 @@ USAGE
54
54
  knife vc vapp start [VAPP_ID] (options)
55
55
  knife vc vapp stop [VAPP_ID] (options)
56
56
  knife vc vdc show [VDC_ID] (options)
57
- knife vc vm config guest [VAPP_ID] [COMPUTER_NAME] (options)
58
- knife vc vm config network [VAPP_ID] [NETWORK_NAME] (options)
57
+ knife vc vm config guest [VM_ID] [COMPUTER_NAME] (options)
58
+ knife vc vm config network [VM_ID] [NETWORK_NAME] (options)
59
59
  knife vc vm show [VM_ID] (options)
60
60
 
61
61
  ###Configuration
@@ -185,7 +185,7 @@ This command creates a vApp starting from a template (see catalog item).
185
185
 
186
186
  _Example:_
187
187
 
188
- $ knife vc vapp create 440d5134-d2dd-4be7-8692-79a28c86f55b TestVM "Test vm description" 14b63ef2-fe93-4d0b-91f0-ccbd3847c665
188
+ $ knife vc vapp create 440d5134-d2dd-4be7-8692-79a28c86f55b TestvApp "Test vApp description" 14b63ef2-fe93-4d0b-91f0-ccbd3847c665
189
189
  vApp creation...Done!
190
190
  Summary: Status: success - started at 2012-12-19T17:02:32.797+01:00 and ended at 2012-12-19T17:02:53.943+01:00
191
191
  vApp created with ID: 9cdd92ad-ab65-467f-abe1-075e35c050ec
@@ -32,10 +32,11 @@ class Chef
32
32
  :proc => Proc.new { |key| Chef::Config[:knife][:fence_mode] = key }
33
33
 
34
34
  option :retain_network,
35
- :short => "-R RETAIN_NETWORK",
36
- :long => "--retain-network RETAIN_NETWORK",
37
- :description => "Toggle Retain Network across deployments (e.g., true, false)",
38
- :proc => Proc.new { |key| Chef::Config[:knife][:retain_network] = key }
35
+ :long => "--[no-]retain-network",
36
+ :description => "Toggle Retain Network across deployments (default true)",
37
+ :proc => Proc.new { |key| Chef::Config[:knife][:retain_network] = key },
38
+ :boolean => true,
39
+ :default => true
39
40
 
40
41
  def run
41
42
  $stdout.sync = true
@@ -23,16 +23,19 @@ class Chef
23
23
  class VcVmConfigGuest < Chef::Knife
24
24
  include Knife::VcCommon
25
25
 
26
- banner "knife vc vm config guest [VAPP_ID] [COMPUTER_NAME] (options)"
26
+ banner "knife vc vm config guest [VM_ID] [COMPUTER_NAME] (options)"
27
27
 
28
28
  option :guest_enabled,
29
- :short => "-E ENABLED",
30
- :long => "--enable-guest true|false",
31
- :description => "Toggle Guest Customization"
29
+ :long => "--[no-]guest",
30
+ :description => "Toggle Guest Customization (default true)",
31
+ :boolean => true,
32
+ :default => true
32
33
 
33
34
  option :admin_passwd_enabled,
34
- :long => "--admin-passwd-enabled true|false",
35
- :description => "Toggle Admin Password"
35
+ :long => "--use-[no-]admin-passwd",
36
+ :description => "Toggle Admin Password (default true)",
37
+ :boolean => true,
38
+ :default => true
36
39
 
37
40
  option :admin_passwd,
38
41
  :long => "--admin-passwd ADMIN_PASSWD",
@@ -23,7 +23,7 @@ class Chef
23
23
  class VcVmConfigNetwork < Chef::Knife
24
24
  include Knife::VcCommon
25
25
 
26
- banner "knife vc vm config network [VAPP_ID] [NETWORK_NAME] (options)"
26
+ banner "knife vc vm config network [VM_ID] [NETWORK_NAME] (options)"
27
27
 
28
28
  option :vm_net_primary_index,
29
29
  :long => "--net-primary NETWORK_PRIMARY_IDX",
@@ -38,12 +38,15 @@ class Chef
38
38
  :description => "IP of the current network interface"
39
39
 
40
40
  option :vm_net_is_connected,
41
- :long => "--net-is-connected true|false",
42
- :description => "Toggle IsConnected flag of the current network interface"
41
+ :long => "--net-[no-]connected",
42
+ :description => "Toggle IsConnected flag of the current network interface (default true)",
43
+ :boolean => true,
44
+ :default => true
43
45
 
44
46
  option :vm_ip_allocation_mode,
45
47
  :long => "--ip-allocation-mode ALLOCATION_MODE",
46
- :description => "Set IP allocation mode of the current network interface (e.g., POOL)"
48
+ :description => "Set IP allocation mode of the current network interface (default POOL)",
49
+ :default => 'POOL'
47
50
 
48
51
  def run
49
52
  $stdout.sync = true
@@ -53,7 +56,15 @@ class Chef
53
56
 
54
57
  connection.login
55
58
 
56
- task_id, response = connection.set_vm_network_config vm_id, network_name, {:ip_allocation_mode => 'POOL'}
59
+ config = {
60
+ :primary_index => locate_config_value(:vm_net_primary_index),
61
+ :network_index => locate_config_value(:vm_net_index),
62
+ :ip => locate_config_value(:vm_net_ip),
63
+ :is_connected => locate_config_value(:vm_net_is_connected),
64
+ :ip_allocation_mode => locate_config_value(:vm_ip_allocation_mode),
65
+ }
66
+
67
+ task_id, response = connection.set_vm_network_config vm_id, network_name, config
57
68
 
58
69
  print "VM network configuration..."
59
70
  wait_task(connection, task_id)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-vcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: