scli 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/plugins/detach-volume.rb +6 -5
- data/lib/plugins/terminate-instance.rb +1 -1
- data/lib/scli.rb +1 -1
- data/scli.gemspec +3 -3
- metadata +4 -4
@@ -2,13 +2,14 @@ module Scli
|
|
2
2
|
def self.detvol
|
3
3
|
cli = MyCLI.new
|
4
4
|
cli.parse_options
|
5
|
-
volume_id = cli.config[:volume_id]
|
5
|
+
volume_id = cli.config[:volume_id] || ARGV[1]
|
6
6
|
instance_id = cli.config[:instance_id]
|
7
|
-
if volume_id.nil?
|
8
|
-
puts "
|
7
|
+
if volume_id.nil?
|
8
|
+
puts "Volume ID is required, please retry."
|
9
9
|
else
|
10
|
-
server = Scli::Compute.new.servers.get(instance_id)
|
11
10
|
volume = Scli::Storage.new.volumes.get(volume_id)
|
11
|
+
instance_id = volume.instance_id if instance_id.nil?
|
12
|
+
server = Scli::Compute.new.servers.get(instance_id)
|
12
13
|
if server.nil?
|
13
14
|
puts "Could not find server: #{instance_id}"
|
14
15
|
elsif volume.nil?
|
@@ -26,4 +27,4 @@ module Scli
|
|
26
27
|
end
|
27
28
|
end
|
28
29
|
|
29
|
-
PLUGINS << ["detvol", "detach-volume", "Volume ID (Req -v), Instance ID (
|
30
|
+
PLUGINS << ["detvol", "detach-volume", "Volume ID (Req -v), Instance ID (Opt -i)", "scli detvol 23456"]
|
data/lib/scli.rb
CHANGED
data/scli.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'scli'
|
3
|
-
s.version = '0.0.
|
4
|
-
s.date = '2012-
|
3
|
+
s.version = '0.0.6'
|
4
|
+
s.date = '2012-11-20'
|
5
5
|
s.platform = Gem::Platform::RUBY
|
6
6
|
s.authors = ['Josh Pasqualetto']
|
7
7
|
s.email = ['josh.pasqualetto@sonian.net']
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.license = 'MIT'
|
12
12
|
s.has_rdoc = false
|
13
13
|
|
14
|
-
s.add_dependency('fog', '~> 1.
|
14
|
+
s.add_dependency('fog', '~> 1.7.0')
|
15
15
|
s.add_dependency('mixlib-cli', '~> 1.2.2')
|
16
16
|
s.add_dependency('terminal-table', '~> 1.4.5')
|
17
17
|
s.add_dependency('colored', '1.2')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.7.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.7.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: mixlib-cli
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|