knife-cloudstack 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.rdoc CHANGED
@@ -1,5 +1,11 @@
1
1
  = Changes
2
2
 
3
+ == 2012-05-17 (0.0.12)
4
+ * Adding option to disable public IP allocation on server create
5
+ https://github.com/CloudStack/knife-cloudstack/pull/8
6
+ * Fix whitespace issue in network names
7
+ https://github.com/CloudStack/knife-cloudstack/pull/7
8
+
3
9
  == 2011-11-03 (0.0.11)
4
10
  * Added LICENSE file and licensing headers to source. No feature changes.
5
11
 
data/README.rdoc CHANGED
@@ -51,6 +51,8 @@ system so it can run Chef Client with a Chef Server. The main assumption is a ba
51
51
  intended for Chef Client systems that talk to a Chef server. By default the server is bootstrapped using the {ubuntu10.04-gems}[https://github.com/opscode/chef/bl
52
52
  ob/master/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb] template. This can be overridden using the <tt>-d</tt> or <tt>--template-file</tt> command options.
53
53
 
54
+ By default, new servers are allocated a public IP address mapping to the CloudStack private IP address. If you do not want this behavior, pass the <tt>--no-public-ip</tt> option.
55
+
54
56
  ==== Port forwarding rules for virtual networks
55
57
  The <tt>--port-rules</tt> option takes a comma separated list of port forwarding rules. These rules are created on the
56
58
  virtual public ip address of the server. Note that this option only applies to servers using a virtual network; it is
@@ -194,6 +196,8 @@ Reboots the specified virtual machines(s).
194
196
 
195
197
  Author:: Ryan Holmes <rholmes@edmunds.com>
196
198
  Author:: KC Braunschweig <kbraunschweig@edmunds.com>
199
+ Author:: John E. Vincent <lusis.org+github.com@gmail.com>
200
+
197
201
  Copyright:: Copyright (c) 2011 Edmunds, Inc.
198
202
  License:: Apache License, Version 2.0
199
203
 
@@ -62,9 +62,15 @@ module KnifeCloudstack
62
62
  :short => "-W NETWORKS",
63
63
  :long => "--networks NETWORK",
64
64
  :description => "Comma separated list of CloudStack network names",
65
- :proc => lambda { |n| n.split(/[\s,]+/) },
65
+ :proc => lambda { |n| n.split(',').map {|sn| sn.strip}} ,
66
66
  :default => []
67
67
 
68
+ option :public_ip,
69
+ :long => "--[no-]public-ip",
70
+ :description => "Allocate a public IP for this server",
71
+ :boolean => true,
72
+ :default => true
73
+
68
74
  option :chef_node_name,
69
75
  :short => "-N NAME",
70
76
  :long => "--node-name NAME",
@@ -228,15 +234,15 @@ module KnifeCloudstack
228
234
 
229
235
  def find_or_create_public_ip(server, connection)
230
236
  nic = connection.get_server_default_nic(server) || {}
231
- if nic['type'] == 'Virtual' then
237
+ #puts "#{ui.color("Not allocating public IP for server", :red)}" unless config[:public_ip]
238
+ if (config[:public_ip] == false) || (nic['type'] != 'Virtual') then
239
+ nic['ipaddress']
240
+ else
232
241
  # create ip address, ssh forwarding rule and optional forwarding rules
233
242
  ip_address = connection.associate_ip_address(server['zoneid'])
234
243
  ssh_rule = connection.create_port_forwarding_rule(ip_address['id'], "22", "TCP", "22", server['id'])
235
244
  create_port_forwarding_rules(ip_address['id'], server['id'], connection)
236
245
  ssh_rule['ipaddress']
237
- else
238
- # otherwise return the nic ip address
239
- nic['ipaddress']
240
246
  end
241
247
  end
242
248
 
@@ -310,6 +316,3 @@ module KnifeCloudstack
310
316
 
311
317
  end # class
312
318
  end
313
-
314
-
315
-
metadata CHANGED
@@ -1,22 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-cloudstack
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 11
10
- version: 0.0.11
9
+ - 12
10
+ version: 0.0.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Holmes
14
14
  - KC Braunschweig
15
+ - John E. Vincent
15
16
  autorequire:
16
17
  bindir: bin
17
18
  cert_chain: []
18
19
 
19
- date: 2011-11-03 00:00:00 Z
20
+ date: 2012-05-17 00:00:00 Z
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
23
  name: chef
@@ -38,6 +39,7 @@ description: A Knife plugin to create, list and manage CloudStack servers
38
39
  email:
39
40
  - rholmes@edmunds.com
40
41
  - kbraunschweig@edmunds.com
42
+ - lusis.org+github.com@gmail.com
41
43
  executables: []
42
44
 
43
45
  extensions: []
@@ -64,7 +66,7 @@ files:
64
66
  - lib/chef/knife/cs_hosts.rb
65
67
  - lib/chef/knife/cs_stack_create.rb
66
68
  - lib/chef/knife/cs_server_create.rb
67
- homepage: http://www.edmunds.com/
69
+ homepage: http://cloudstack.org/
68
70
  licenses: []
69
71
 
70
72
  post_install_message:
@@ -93,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
95
  requirements: []
94
96
 
95
97
  rubyforge_project:
96
- rubygems_version: 1.7.2
98
+ rubygems_version: 1.8.11
97
99
  signing_key:
98
100
  specification_version: 3
99
101
  summary: A knife plugin for the CloudStack API