knife-profitbricks 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c011f2895721cbbe750f7b3f40fe053de452b66b
4
- data.tar.gz: dfe89590df762d895b06bb2f6a27b4533754be0f
3
+ metadata.gz: 1a05c9b51197a5c4bede8622f3170ba90a999376
4
+ data.tar.gz: ec8e94f0990da74450a155326d848ffa42ffe886
5
5
  SHA512:
6
- metadata.gz: 23642c6a6b059453ba9079225b70573f9c7d1634f676ec9f158eeb8a04349c2809fa850f5f3541a24b89774b8e9881ed309390c5a095955a4ec61f50ca733487
7
- data.tar.gz: 5035a534767912ee91b4db6c6af04bc6955ee7a396304e2af28120979c094a9101e7fdda184ec47d8c1483b65a6a345d7ebf21d0c132b58194a0f5079064886b
6
+ metadata.gz: b8aa428d7098cfa7c17fef338deea8d47823815d57c345dd4f6cacbe64a5e3514438085b838ba82e7356d9d8f253d2e6a45a2e5a80c68981badea293d25c5683
7
+ data.tar.gz: 658bb33cb572b73aeb46a8ba192b4eb23e93ad36368c0751d8e816ab3ca16c0ae1e575a8605b4c67d708915ead3ece4e88703d9ad4c9bacabac671a02f8d3ad4
data/README.md CHANGED
@@ -176,7 +176,7 @@ Now the data center can be created.
176
176
 
177
177
  Once the data center is provisioned, both a server and volume can be created. The volume will use an existing image as identified above.
178
178
 
179
- knife profitbricks server create --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --name "Frontend Webserver" --cores 1 --ram 1024 --availability-zone ZONE_1
179
+ knife profitbricks server create --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --name "Frontend Webserver" --cores 1 --ram 1024 --availability-zone ZONE_1 --cpu-family INTEL_XEON
180
180
  knife profitbricks volume create --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --name "OS Volume" --size 5 --type HDD --image c4263e0f-e75e-11e4-91fd-8fa3eaae9f6b --ssh-keys "ssh-rsa AAAAB3NzaC1..."
181
181
 
182
182
  The volume can then be attached to the server.
@@ -193,7 +193,7 @@ Here is an example of adding a firewall rule to the newly created NIC.
193
193
 
194
194
  A composite server can also be created with attached volume and NIC in a single command.
195
195
 
196
- knife profitbricks composite server create --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --name "Backend Database" --cores 1 --ram 8192 --size 5 --type HDD --lan 1 --image 2ead2908-df61-11e5-80a4-52540005ab80 --ssh-keys "ssh-rsa AAAAB3NzaC1..."
196
+ knife profitbricks composite server create --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --name "Backend Database" --cores 1 --ram 8192 --size 5 --type SSD --lan 1 --image 2ead2908-df61-11e5-80a4-52540005ab80 --ssh-keys "ssh-rsa AAAAB3NzaC1..."
197
197
 
198
198
  The new data center and **all resources within that data center** can be deleted.
199
199
 
@@ -8,8 +8,8 @@ class Chef
8
8
  banner 'knife profitbricks composite server create (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
13
  description: 'Name of the virtual datacenter',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
@@ -26,6 +26,12 @@ class Chef
26
26
  description: 'The number of processor cores',
27
27
  required: true
28
28
 
29
+ option :cpufamily,
30
+ short: '-f CPU_FAMILY',
31
+ long: '--cpu-family CPU_FAMILY',
32
+ description: 'The family of processor cores (INTEL_XEON or AMD_OPTERON)',
33
+ default: 'AMD_OPTERON'
34
+
29
35
  option :ram,
30
36
  short: '-r RAM',
31
37
  long: '--ram RAM',
@@ -54,14 +60,14 @@ class Chef
54
60
  description: 'The bus type of the volume (VIRTIO or IDE)'
55
61
 
56
62
  option :image,
57
- short: '-N UUID',
58
- long: '--image UUID',
59
- description: 'The image or snapshot UUID'
63
+ short: '-N ID',
64
+ long: '--image ID',
65
+ description: 'The image or snapshot ID'
60
66
 
61
67
  option :type,
62
68
  short: '-t TYPE',
63
69
  long: '--type TYPE',
64
- description: 'The disk type; currently only HDD.',
70
+ description: 'The disk type (HDD or SSD)',
65
71
  required: true
66
72
 
67
73
  option :licencetype,
@@ -69,6 +75,11 @@ class Chef
69
75
  long: '--licence-type LICENCE',
70
76
  description: 'The licence type of the volume (LINUX, WINDOWS, UNKNOWN, OTHER)'
71
77
 
78
+ option :imagepassword,
79
+ short: '-P PASSWORD',
80
+ long: '--image-password PASSWORD',
81
+ description: 'The password set on the image for the "root" or "Administrator" user'
82
+
72
83
  option :sshkeys,
73
84
  short: '-K SSHKEY[,SSHKEY,...]',
74
85
  long: '--ssh-keys SSHKEY1,SSHKEY2,...',
@@ -76,7 +87,7 @@ class Chef
76
87
  proc: proc { |sshkeys| sshkeys.split(',') }
77
88
 
78
89
  option :nicname,
79
- long: '--name NAME',
90
+ long: '--nic-name NAME',
80
91
  description: 'Name of the NIC'
81
92
 
82
93
  option :ips,
@@ -108,10 +119,17 @@ class Chef
108
119
  bus: config[:bus] || 'VIRTIO',
109
120
  image: config[:image],
110
121
  type: config[:type],
111
- licenceType: config[:licencetype],
112
- sshKeys: config[:sshkeys]
122
+ licenceType: config[:licencetype]
113
123
  }
114
124
 
125
+ if config[:sshkeys]
126
+ volume_params[:sshKeys] = config[:sshkeys]
127
+ end
128
+
129
+ if config[:imagepassword]
130
+ volume_params[:imagePassword] = config[:imagepassword]
131
+ end
132
+
115
133
  nic_params = {
116
134
  name: config[:nicname],
117
135
  ips: config[:ips],
@@ -122,6 +140,7 @@ class Chef
122
140
  params = {
123
141
  name: config[:name],
124
142
  cores: config[:cores],
143
+ cpuFamily: config[:cpufamily],
125
144
  ram: config[:ram],
126
145
  availabilityZone: config[:availabilityzone],
127
146
  volumes: [volume_params],
@@ -142,6 +161,7 @@ class Chef
142
161
  puts "#{ui.color('ID', :cyan)}: #{server.id}"
143
162
  puts "#{ui.color('Name', :cyan)}: #{server.properties['name']}"
144
163
  puts "#{ui.color('Cores', :cyan)}: #{server.properties['cores']}"
164
+ puts "#{ui.color('CPU Family', :cyan)}: #{server.properties['cpuFamily']}"
145
165
  puts "#{ui.color('Ram', :cyan)}: #{server.properties['ram']}"
146
166
  puts "#{ui.color('Availability Zone', :cyan)}: #{server.properties['availabilityZone']}"
147
167
 
@@ -8,20 +8,20 @@ class Chef
8
8
  banner 'knife profitbricks firewall create (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'UUID of the data center',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'ID of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id }
15
15
 
16
16
  option :server_id,
17
- short: '-S SERVER_UUID',
18
- long: '--server-id SERVER_UUID',
19
- description: 'UUID of the server'
17
+ short: '-S SERVER_ID',
18
+ long: '--server-id SERVER_ID',
19
+ description: 'ID of the server'
20
20
 
21
21
  option :nic_id,
22
- short: '-N NIC_UUID',
23
- long: '--nic-id NIC_UUID',
24
- description: 'UUID of the NIC'
22
+ short: '-N NIC_ID',
23
+ long: '--nic-id NIC_ID',
24
+ description: 'ID of the NIC'
25
25
 
26
26
  option :name,
27
27
  short: '-n NAME',
@@ -34,7 +34,7 @@ class Chef
34
34
  default: 'TCP',
35
35
  description: 'The protocol of the firewall rule (TCP, UDP, ICMP,' \
36
36
  ' ANY)',
37
- required: true
37
+ required: true
38
38
 
39
39
  option :sourcemac,
40
40
  short: '-m MAC',
@@ -5,25 +5,25 @@ class Chef
5
5
  class ProfitbricksFirewallDelete < Knife
6
6
  include Knife::ProfitbricksBase
7
7
 
8
- banner 'knife profitbricks firewall delete FIREWALL_UUID [FIREWALL_UUID] (options)'
8
+ banner 'knife profitbricks firewall delete FIREWALL_ID [FIREWALL_ID] (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'The UUID of the data center',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'The ID of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
17
17
  option :server_id,
18
- short: '-S SERVER_UUID',
19
- long: '--server-id SERVER_UUID',
20
- description: 'The UUID of the server',
18
+ short: '-S SERVER_ID',
19
+ long: '--server-id SERVER_ID',
20
+ description: 'The ID of the server',
21
21
  required: true
22
22
 
23
23
  option :nic_id,
24
- short: '-N NIC_UUID',
25
- long: '--nic-id NIC_UUID',
26
- description: 'UUID of the NIC',
24
+ short: '-N NIC_ID',
25
+ long: '--nic-id NIC_ID',
26
+ description: 'ID of the NIC',
27
27
  required: true
28
28
 
29
29
  def run
@@ -8,22 +8,22 @@ class Chef
8
8
  banner 'knife profitbricks firewall list (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'UUID of the data center',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'ID of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
17
17
  option :server_id,
18
- short: '-S SERVER_UUID',
19
- long: '--server-id SERVER_UUID',
20
- description: 'The UUID of the server',
18
+ short: '-S SERVER_ID',
19
+ long: '--server-id SERVER_ID',
20
+ description: 'The ID of the server',
21
21
  required: true
22
22
 
23
23
  option :nic_id,
24
- short: '-N NIC_UUID',
25
- long: '--nic-id NIC_UUID',
26
- description: 'UUID of the NIC',
24
+ short: '-N NIC_ID',
25
+ long: '--nic-id NIC_ID',
26
+ description: 'ID of the NIC',
27
27
  required: true
28
28
 
29
29
  def run
@@ -8,8 +8,8 @@ class Chef
8
8
  banner 'knife profitbricks lan create (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
13
  description: 'Name of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
@@ -5,11 +5,11 @@ class Chef
5
5
  class ProfitbricksLanDelete < Knife
6
6
  include Knife::ProfitbricksBase
7
7
 
8
- banner 'knife profitbricks lan delete LAN_UUID [LAN_UUID] (options)'
8
+ banner 'knife profitbricks lan delete LAN_ID [LAN_ID] (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
13
  description: 'Name of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
@@ -8,9 +8,9 @@ class Chef
8
8
  banner 'knife profitbricks lan list (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'The UUID of the data center',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'The ID of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
@@ -8,15 +8,15 @@ class Chef
8
8
  banner 'knife profitbricks nic create (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
13
  description: 'Name of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
17
17
  option :server_id,
18
- short: '-S SERVER_UUID',
19
- long: '--server-id SERVER_UUID',
18
+ short: '-S SERVER_ID',
19
+ long: '--server-id SERVER_ID',
20
20
  description: 'Name of the server',
21
21
  required: true
22
22
 
@@ -5,19 +5,19 @@ class Chef
5
5
  class ProfitbricksNicDelete < Knife
6
6
  include Knife::ProfitbricksBase
7
7
 
8
- banner 'knife profitbricks nic delete NIC_UUID [NIC_UUID] (options)'
8
+ banner 'knife profitbricks nic delete NIC_ID [NIC_ID] (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'The UUID of the data center',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'The ID of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
17
17
  option :server_id,
18
- short: '-S SERVER_UUID',
19
- long: '--server-id SERVER_UUID',
20
- description: 'The UUID of the server assigned the NIC',
18
+ short: '-S SERVER_ID',
19
+ long: '--server-id SERVER_ID',
20
+ description: 'The ID of the server assigned the NIC',
21
21
  required: true
22
22
 
23
23
  def run
@@ -8,16 +8,16 @@ class Chef
8
8
  banner 'knife profitbricks nic list (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'The UUID of the datacenter containing the NIC',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'The ID of the datacenter containing the NIC',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
17
17
  option :server_id,
18
- short: '-S SERVER_UUID',
19
- long: '--server-id SERVER_UUID',
20
- description: 'The UUID of the server assigned the NIC',
18
+ short: '-S SERVER_ID',
19
+ long: '--server-id SERVER_ID',
20
+ description: 'The ID of the server assigned the NIC',
21
21
  required: true
22
22
 
23
23
  def run
@@ -8,8 +8,8 @@ class Chef
8
8
  banner 'knife profitbricks server create (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
13
  description: 'Name of the virtual datacenter',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
@@ -26,6 +26,12 @@ class Chef
26
26
  description: 'The number of processor cores',
27
27
  required: true
28
28
 
29
+ option :cpufamily,
30
+ short: '-f CPU_FAMILY',
31
+ long: '--cpu-family CPU_FAMILY',
32
+ description: 'The family of the CPU (INTEL_XEON or AMD_OPTERON)',
33
+ default: 'AMD_OPTERON'
34
+
29
35
  option :ram,
30
36
  short: '-r RAM',
31
37
  long: '--ram RAM',
@@ -39,11 +45,11 @@ class Chef
39
45
  default: 'AUTO'
40
46
 
41
47
  option :bootvolume,
42
- long: '--boot-volume VOLUME_UUID',
48
+ long: '--boot-volume VOLUME_ID',
43
49
  description: 'Reference to a volume used for booting'
44
50
 
45
51
  option :bootcdrom,
46
- long: '--boot-cdrom CDROM_UUID',
52
+ long: '--boot-cdrom CDROM_ID',
47
53
  description: 'Reference to a CD-ROM used for booting'
48
54
 
49
55
  def run
@@ -53,6 +59,7 @@ class Chef
53
59
  params = {
54
60
  name: config[:name],
55
61
  cores: config[:cores],
62
+ cpuFamily: config[:cpufamily],
56
63
  ram: config[:ram],
57
64
  availabilityZone: config[:availabilityzone],
58
65
  bootVolume: config[:bootvolume],
@@ -73,6 +80,7 @@ class Chef
73
80
  puts "#{ui.color('ID', :cyan)}: #{server.id}"
74
81
  puts "#{ui.color('Name', :cyan)}: #{server.properties['name']}"
75
82
  puts "#{ui.color('Cores', :cyan)}: #{server.properties['cores']}"
83
+ puts "#{ui.color('CPU Family', :cyan)}: #{server.properties['cpuFamily']}"
76
84
  puts "#{ui.color('Ram', :cyan)}: #{server.properties['ram']}"
77
85
  puts "#{ui.color('Availability Zone', :cyan)}: #{server.properties['availabilityZone']}"
78
86
  puts "#{ui.color('Boot Volume', :cyan)}: #{server.properties['bootVolume']}"
@@ -8,8 +8,8 @@ class Chef
8
8
  banner 'knife profitbricks server delete SERVER_ID [SERVER_ID] (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
13
  description: 'Name of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
@@ -8,9 +8,9 @@ class Chef
8
8
  banner 'knife profitbricks server list (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'The UUID of the datacenter containing the server',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'The ID of the datacenter containing the server',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
@@ -5,12 +5,12 @@ class Chef
5
5
  class ProfitbricksServerReboot < Knife
6
6
  include Knife::ProfitbricksBase
7
7
 
8
- banner 'knife profitbricks server reboot SERVER_UUID [SERVER_UUID] (options)'
8
+ banner 'knife profitbricks server reboot SERVER_ID [SERVER_ID] (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'UUID of the data center',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'ID of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
@@ -5,12 +5,12 @@ class Chef
5
5
  class ProfitbricksServerStart < Knife
6
6
  include Knife::ProfitbricksBase
7
7
 
8
- banner 'knife profitbricks server start SERVER_UUID [SERVER_UUID] (options)'
8
+ banner 'knife profitbricks server start SERVER_ID [SERVER_ID] (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'UUID of the data center',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'ID of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
@@ -5,12 +5,12 @@ class Chef
5
5
  class ProfitbricksServerStop < Knife
6
6
  include Knife::ProfitbricksBase
7
7
 
8
- banner 'knife profitbricks server stop SERVER_UUID [SERVER_UUID] (options)'
8
+ banner 'knife profitbricks server stop SERVER_ID [SERVER_ID] (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'UUID of the data center',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'ID of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
@@ -5,19 +5,19 @@ class Chef
5
5
  class ProfitbricksVolumeAttach < Knife
6
6
  include Knife::ProfitbricksBase
7
7
 
8
- banner 'knife profitbricks volume attach VOLUME_UUID [VOLUME_UUID] (options)'
8
+ banner 'knife profitbricks volume attach VOLUME_ID [VOLUME_ID] (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'The UUID of the data center',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'The ID of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
17
17
  option :server_id,
18
- short: '-S SERVER_UUID',
19
- long: '--server-id SERVER_UUID',
20
- description: 'The UUID of the server',
18
+ short: '-S SERVER_ID',
19
+ long: '--server-id SERVER_ID',
20
+ description: 'The ID of the server',
21
21
  required: true
22
22
 
23
23
  def run
@@ -8,8 +8,8 @@ class Chef
8
8
  banner 'knife profitbricks volume create (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
13
  description: 'Name of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
@@ -31,14 +31,19 @@ class Chef
31
31
  description: 'The bus type of the volume (VIRTIO or IDE)'
32
32
 
33
33
  option :image,
34
- short: '-N UUID',
35
- long: '--image UUID',
36
- description: 'The image or snapshot UUID'
34
+ short: '-N ID',
35
+ long: '--image ID',
36
+ description: 'The image or snapshot ID'
37
+
38
+ option :imagepassword,
39
+ short: '-P PASSWORD',
40
+ long: '--image-password PASSWORD',
41
+ description: 'The password set on the image for the "root" or "Administrator" user'
37
42
 
38
43
  option :type,
39
44
  short: '-t TYPE',
40
45
  long: '--type TYPE',
41
- description: 'The disk type; currently only HDD.',
46
+ description: 'The disk type (HDD OR SSD)',
42
47
  required: true
43
48
 
44
49
  option :licencetype,
@@ -64,9 +69,16 @@ class Chef
64
69
  image: config[:image],
65
70
  type: config[:type],
66
71
  licenceType: config[:licencetype],
67
- sshKeys: config[:sshkeys]
68
72
  }
69
73
 
74
+ if config[:sshkeys]
75
+ params[:sshKeys] = config[:sshkeys]
76
+ end
77
+
78
+ if config[:imagepassword]
79
+ params[:imagePassword] = config[:imagepassword]
80
+ end
81
+
70
82
  connection
71
83
  volume = ProfitBricks::Volume.create(
72
84
  config[:datacenter_id],
@@ -8,8 +8,8 @@ class Chef
8
8
  banner 'knife profitbricks volume delete SERVER_ID [SERVER_ID] (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D UUID',
12
- long: '--datacenter-id UUID',
11
+ short: '-D ID',
12
+ long: '--datacenter-id ID',
13
13
  description: 'Name of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
@@ -5,19 +5,19 @@ class Chef
5
5
  class ProfitbricksVolumeDetach < Knife
6
6
  include Knife::ProfitbricksBase
7
7
 
8
- banner 'knife profitbricks volume detach VOLUME_UUID [VOLUME_UUID] (options)'
8
+ banner 'knife profitbricks volume detach VOLUME_ID [VOLUME_ID] (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'The UUID of the data center',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'The ID of the data center',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
17
17
  option :server_id,
18
- short: '-S SERVER_UUID',
19
- long: '--server-id SERVER_UUID',
20
- description: 'The UUID of the server',
18
+ short: '-S SERVER_ID',
19
+ long: '--server-id SERVER_ID',
20
+ description: 'The ID of the server',
21
21
  required: true
22
22
 
23
23
  def run
@@ -8,16 +8,16 @@ class Chef
8
8
  banner 'knife profitbricks volume list (options)'
9
9
 
10
10
  option :datacenter_id,
11
- short: '-D DATACENTER_UUID',
12
- long: '--datacenter-id DATACENTER_UUID',
13
- description: 'The UUID of the virtul data center containing the volume',
11
+ short: '-D DATACENTER_ID',
12
+ long: '--datacenter-id DATACENTER_ID',
13
+ description: 'The ID of the virtul data center containing the volume',
14
14
  proc: proc { |datacenter_id| Chef::Config[:knife][:datacenter_id] = datacenter_id },
15
15
  required: true
16
16
 
17
17
  option :server_id,
18
- short: '-S SERVER_UUID',
19
- long: '--server-id SERVER_UUID',
20
- description: 'The UUID of the server',
18
+ short: '-S SERVER_ID',
19
+ long: '--server-id SERVER_ID',
20
+ description: 'The ID of the server',
21
21
  required: true
22
22
 
23
23
  def run
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module ProfitBricks
3
- VERSION = '1.1.1'
3
+ VERSION = '1.1.2'
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-profitbricks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan Devenport
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-02 00:00:00.000000000 Z
11
+ date: 2016-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: profitbricks-sdk-ruby