knife-joyent 0.4.9 → 0.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/knife-joyent.gemspec +1 -1
- data/lib/chef/knife/joyent_server_create.rb +7 -1
- data/lib/chef/knife/joyent_server_pricing.rb +13 -7
- data/lib/knife-joyent/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd612430e612429131cac5d965a7491c451f30cb
|
4
|
+
data.tar.gz: 07853ff2dc10dca35f0f377c8de9f73b620fbc31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eb4a8bd6ee44c113d61ede4cbf75d3874cdd7db6bd788a6911c74e7ed48701402984cd6b285e5c5845871050dbd0a6e50e82fbab67e699427129a8159cd0d40
|
7
|
+
data.tar.gz: 6a84b2cfda6962f223deb92857aeba107e481bbbe115aca3b7cf7a5e6a2223845071b258250376ee614ec856b75f60c02bb3bfbbc780c70db698ea698566b9a0
|
data/knife-joyent.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_dependency "fog", "~> 1.21.0"
|
20
20
|
s.add_dependency "multi_json", "~> 1.7"
|
21
21
|
s.add_dependency "chef", "~> 11.6"
|
22
|
-
s.add_dependency "joyent-cloud-pricing", ">= 1.0
|
22
|
+
s.add_dependency "joyent-cloud-pricing", ">= 1.1.0"
|
23
23
|
|
24
24
|
s.add_development_dependency 'rspec'
|
25
25
|
|
@@ -110,6 +110,10 @@ class Chef
|
|
110
110
|
:description => "The ssh gateway server",
|
111
111
|
:proc => Proc.new { |key| Chef::Config[:knife][:ssh_gateway] = key }
|
112
112
|
|
113
|
+
option :ssh_init_delay,
|
114
|
+
:long => "--ssh-init-delay SECS",
|
115
|
+
:description => "Seconds to sleep after SSH starts answering on new machine",
|
116
|
+
:default => 10
|
113
117
|
|
114
118
|
def is_linklocal(ip)
|
115
119
|
linklocal = IPAddr.new "169.254.0.0/16"
|
@@ -209,7 +213,9 @@ class Chef
|
|
209
213
|
|
210
214
|
puts ui.color("Waiting for SSH to come up on: #{bootstrap_ip}", :cyan)
|
211
215
|
tcp_test_ssh(bootstrap_ip)
|
212
|
-
|
216
|
+
|
217
|
+
puts ui.color("Sleeping for #{config[:ssh_init_delay]} seconds", :cyan)
|
218
|
+
sleep config[:ssh_init_delay]
|
213
219
|
|
214
220
|
bootstrap_for_node(server, bootstrap_ip).run
|
215
221
|
|
@@ -9,16 +9,21 @@ class Chef
|
|
9
9
|
option :reserve_pricing,
|
10
10
|
:short => '-r <file>',
|
11
11
|
:long => '--reserve-pricing <file>',
|
12
|
-
:description => 'Apply
|
12
|
+
:description => 'Apply custom pricing from a YAML file (see: joyent-cloud-pricing gem)',
|
13
13
|
:proc => Proc.new { |key| Chef::Config[:knife][:reserve_pricing] = key }
|
14
14
|
|
15
15
|
option :show_zones,
|
16
16
|
:short => '-z',
|
17
|
-
:long => '--show-
|
18
|
-
:description => 'Print list of
|
17
|
+
:long => '--show-zone-flavors',
|
18
|
+
:description => 'Print aggregated list of zone flavors sorted by price',
|
19
19
|
:proc => Proc.new { |key| Chef::Config[:knife][:show_zones] = key }
|
20
20
|
|
21
|
-
|
21
|
+
option :no_color,
|
22
|
+
:long => '--no-color',
|
23
|
+
:description => 'Disable color when printing',
|
24
|
+
:proc => Proc.new { |key| Chef::Config[:knife][:no_color] = true }
|
25
|
+
|
26
|
+
banner 'knife joyent server pricing [-r <custom-pricing.yml>] [-z] [--no-color]'
|
22
27
|
|
23
28
|
def run
|
24
29
|
flavors = []
|
@@ -26,9 +31,10 @@ class Chef
|
|
26
31
|
flavor = s.package || 'unknown'
|
27
32
|
flavors << flavor
|
28
33
|
end
|
29
|
-
|
30
|
-
reporter
|
31
|
-
|
34
|
+
config = Chef::Config[:knife]
|
35
|
+
reporter = Joyent::Cloud::Pricing::Reporter.new(config[:reserve_pricing], flavors)
|
36
|
+
reporter.print_zone_list = config[:show_zones]
|
37
|
+
puts reporter.render(:disable_color => config[:no_color])
|
32
38
|
rescue => e
|
33
39
|
output_error(e)
|
34
40
|
end
|
data/lib/knife-joyent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-joyent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Chan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.0
|
61
|
+
version: 1.1.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.0
|
68
|
+
version: 1.1.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|