knife-clodo 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/knife-clodo.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'knife-clodo'
3
- spec.version = '0.1.7'
3
+ spec.version = '0.1.8'
4
4
  spec.summary = 'Clodo.Ru knife plugin'
5
5
  spec.add_dependency('fog', '>= 1.1.2')
6
6
  spec.description = <<-EOF
@@ -78,10 +78,6 @@ class Chef
78
78
  :long => "--identity-file IDENTITY_FILE",
79
79
  :description => "The SSH identity file used for authentication"
80
80
 
81
- option :prerelease,
82
- :long => "--prerelease",
83
- :description => "Install the pre-release chef gems"
84
-
85
81
  option :bootstrap_version,
86
82
  :long => "--bootstrap-version VERSION",
87
83
  :description => "The version of Chef to install"
@@ -6,20 +6,15 @@ class Chef
6
6
 
7
7
  include Knife::ClodoBase
8
8
 
9
- banner "knife clodo server delete (options)"
10
-
11
- option :server,
12
- :long => "--server ID",
13
- :description => "The ID of the server",
14
- :proc => Proc.new { |f| Chef::Config[:knife][:server_id] = f.to_i }
9
+ banner "knife clodo server delete <ID> [<ID> ...] (options)"
15
10
 
16
11
  def run
17
12
  $stdout.sync = true
18
13
 
19
- connection.delete_server(Chef::Config[:knife][:server_id])
20
-
14
+ @name_args.each do |server|
15
+ connection.delete_server(server)
16
+ end
21
17
  end
22
-
23
18
  end
24
19
  end
25
20
  end
@@ -6,18 +6,14 @@ class Chef
6
6
 
7
7
  include Knife::ClodoBase
8
8
 
9
- banner "knife clodo server reboot (options)"
10
-
11
- option :server,
12
- :long => "--server ID",
13
- :description => "The ID of the server",
14
- :proc => Proc.new { |f| Chef::Config[:knife][:server_id] = f.to_i }
9
+ banner "knife clodo server reboot <ID> [<ID> ...] (options)"
15
10
 
16
11
  def run
17
12
  $stdout.sync = true
18
13
 
19
- connection.reboot_server(Chef::Config[:knife][:server_id])
20
-
14
+ @name_args.each do |server|
15
+ connection.reboot_server(server)
16
+ end
21
17
  end
22
18
 
23
19
  end
@@ -6,12 +6,7 @@ class Chef
6
6
 
7
7
  include Knife::ClodoBase
8
8
 
9
- banner "knife clodo server start (options)"
10
-
11
- option :server,
12
- :long => "--server ID",
13
- :description => "The ID of the server",
14
- :proc => Proc.new { |f| Chef::Config[:knife][:server_id] = f.to_i }
9
+ banner "knife clodo server start (<ID> [<ID> ...] | --all) (options)"
15
10
 
16
11
  option :all,
17
12
  :long => "--all",
@@ -22,20 +17,26 @@ class Chef
22
17
 
23
18
  if config[:all] then
24
19
 
25
- servers = connection.servers.all.select {|s| case s.state when 'is_running' then false when 'is_request' then false else true end }
20
+ servers = connection.servers.all.select { |s|
21
+ case s.state
22
+ when 'is_running' then false
23
+ when 'is_request' then false
24
+ else true
25
+ end
26
+ }
26
27
 
27
28
  servers.each do |server|
28
29
  connection.start_server(server.id)
29
30
  end
30
31
 
31
- elsif Chef::Config[:knife][:server_id] then
32
+ else
32
33
 
33
- connection.start_server(Chef::Config[:knife][:server_id])
34
+ @name_args.each do |server|
35
+ connection.start_server(server)
36
+ end
34
37
 
35
38
  end
36
-
37
39
  end
38
-
39
40
  end
40
41
  end
41
42
  end
@@ -6,17 +6,14 @@ class Chef
6
6
 
7
7
  include Knife::ClodoBase
8
8
 
9
- banner "knife clodo server stop (options)"
10
-
11
- option :server,
12
- :long => "--server ID",
13
- :description => "The ID of the server",
14
- :proc => Proc.new { |f| Chef::Config[:knife][:server_id] = f.to_i }
9
+ banner "knife clodo server stop <ID> [<ID> ...] (options)"
15
10
 
16
11
  def run
17
12
  $stdout.sync = true
18
13
 
19
- connection.stop_server(Chef::Config[:knife][:server_id])
14
+ @name_args.each do |server|
15
+ connection.stop_server(server)
16
+ end
20
17
 
21
18
  end
22
19
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-clodo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stepan G. Fedorov
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-19 00:00:00 Z
18
+ date: 2011-12-23 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: fog