conoha 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/conoha +14 -1
- data/lib/conoha/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cf6ebf48cffae67556f4b2628f2164e22cb2c75
|
4
|
+
data.tar.gz: 7889f59934b25b0ad0cf7278e7049d992ee970f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1fab20c72b8d1924f492e9427d20dc20e077ac5d3938938a903dacf8eaf6632be1d0a29c53cb9155e533b7adb152b713fced8e8f668bce7ea93506eefb80dea
|
7
|
+
data.tar.gz: d2b3436f23a5ec7f7d368e0c3d8e1ac37dca89b6aa08d4af0f70d05673e39428d7b7b22813473df2223a0f67422158b9ece07212898c4cf0a5ebb33c73f630a4
|
data/exe/conoha
CHANGED
@@ -17,6 +17,19 @@ def server_id(server_id_or_index)
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
def image_ref_or_name(str)
|
21
|
+
if str.length == '01234567-89ab-cdef-0123-456789abcdef'.length
|
22
|
+
str
|
23
|
+
else
|
24
|
+
x = Conoha.images.find { |e| e[0] == str }
|
25
|
+
if x.nil?
|
26
|
+
STDERR.puts "There is no image the name \"#{str}\"."
|
27
|
+
exit 1
|
28
|
+
end
|
29
|
+
x[1]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
20
33
|
case subcommand
|
21
34
|
when 'authenticate'
|
22
35
|
Conoha.authenticate!
|
@@ -49,7 +62,7 @@ when 'imagedelete'
|
|
49
62
|
puts Conoha.delete_image image_ref
|
50
63
|
when 'createfromimage'
|
51
64
|
exit 1 if ARGV.size != 2
|
52
|
-
image_ref = ARGV[0]
|
65
|
+
image_ref = image_ref_or_name ARGV[0]
|
53
66
|
ram = ARGV[1]
|
54
67
|
puts Conoha.create_from_image image_ref, ram
|
55
68
|
when 'ssh'
|
data/lib/conoha/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conoha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ka
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|