qc.rb 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qc.rb +7 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f4bae9f70f39beea8f5bc85e67726890219308b
|
4
|
+
data.tar.gz: 201905bdd1341187c2365d7aa7d02d93f27f8b26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 003faec680c06f035e6ba9882a816fd05079cd4646ee569c7bee51151dab9407bf20db0a2ab833b9c70580999ac18ecc7f49f09036f44372be5f446171025a52
|
7
|
+
data.tar.gz: 9e4f47fcb21364fcfe79ea9a4160edbb456db31e8f423bdc0eab8b207206db7ea879ef605a534ceb4e048d40bee656b41e3e559d79c0c1dc1e856bfa3979cdcc
|
data/lib/qc.rb
CHANGED
@@ -7,7 +7,7 @@ require 'yaml'
|
|
7
7
|
require 'fileutils'
|
8
8
|
|
9
9
|
module QC
|
10
|
-
VERSION = '0.0.
|
10
|
+
VERSION = '0.0.4'
|
11
11
|
|
12
12
|
def QC.load_config key
|
13
13
|
f = File.expand_path('~/.qingcloud/config.yaml')
|
@@ -69,7 +69,7 @@ module QC
|
|
69
69
|
@values.to_yaml
|
70
70
|
end
|
71
71
|
|
72
|
-
def method_missing met
|
72
|
+
def method_missing met, *args, &block
|
73
73
|
if @values.has_key? met.to_s
|
74
74
|
@values[met.to_s]
|
75
75
|
else
|
@@ -118,6 +118,11 @@ module QC
|
|
118
118
|
p = {'instance' => @values['instance_id'], 'eip' => eip_id}
|
119
119
|
API::Request.execute!('AssociateEip', p)
|
120
120
|
end
|
121
|
+
|
122
|
+
def add_keypair kp_id
|
123
|
+
p = {'instances.n1' => @values['instance_id'], 'keypairs.1' => kp_id}
|
124
|
+
API::Request.execute!('AttachKeyPairs', p)
|
125
|
+
end
|
121
126
|
end
|
122
127
|
|
123
128
|
class Volume < DataType
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qc.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Bovensiepen
|
@@ -33,12 +33,12 @@ require_paths:
|
|
33
33
|
- lib
|
34
34
|
required_ruby_version: !ruby/object:Gem::Requirement
|
35
35
|
requirements:
|
36
|
-
- -
|
36
|
+
- - ">="
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: '0'
|
39
39
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '0'
|
44
44
|
requirements: []
|