knife-joyent 0.4.9 → 0.4.10

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: 671988423a3e9399059e8ec751f8dcbe2e6ba024
4
- data.tar.gz: fd0fae85db93261f3381900c3cfef6be0e104261
3
+ metadata.gz: dd612430e612429131cac5d965a7491c451f30cb
4
+ data.tar.gz: 07853ff2dc10dca35f0f377c8de9f73b620fbc31
5
5
  SHA512:
6
- metadata.gz: d8106e6b800ccec1915531c63d02a592d7eae324023f3a0f30524b22aab127e0368c793ee061b70778e26f40871eb1d11b91dd12c8d5ba834365b5ec4cae359a
7
- data.tar.gz: 87af80ca2eecc9633979cc11b14a8b2f313ad8cf0a16179e5e78c02c20756924a044f68dd708588fa35d21c52f6779c3a51ca993edee5f3445f749a6847f8cf3
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.9"
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
- sleep 10
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 reserve discounts from a YAML config (see joyent-cloud-pricing gem)',
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-zones',
18
- :description => 'Print list of on-demand zones sorted by price',
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
- banner 'knife joyent server pricing [-r <reserve-pricing.yml> ] [ -z ] '
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
- reporter = Joyent::Cloud::Pricing::Reporter.new(Chef::Config[:knife][:reserve_pricing], flavors)
30
- reporter.print_zone_list = Chef::Config[:knife][:show_zones]
31
- puts reporter.render
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
@@ -1,3 +1,3 @@
1
1
  module KnifeJoyent
2
- VERSION = "0.4.9"
2
+ VERSION = "0.4.10"
3
3
  end
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.9
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-05-10 00:00:00.000000000 Z
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.9
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.9
68
+ version: 1.1.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement