yao 0.4.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/yao/resources/restfully_accessible.rb +2 -1
- data/lib/yao/resources/server.rb +8 -0
- data/lib/yao/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25050407994239664ed794476f785770eee9f35ec4b408c4d56d16397e61d573
|
4
|
+
data.tar.gz: eb715c80c47212ac8d1812b7de154fe60268b28532de2c61c7b303ad6c077bc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7424508d48a8836a09ba560e1cfa1fe108fcc22b043f5914e9056e352830ed32974ae94b8db3946cf9f52af51fbce2f8599c36487c1208d8fc841d2fff69af2b
|
7
|
+
data.tar.gz: 7ed3b0b32af6d772a79830ec0dfa8cb517d0d3e2bbdac948648e2b056f2eb6495b650c4d8e5f85d69effb5741ce64d424fdf6bb9189efac9b96d963002b4cfc1
|
@@ -162,7 +162,8 @@ module Yao::Resources
|
|
162
162
|
# At first, search by ID. If nothing is found, search by name.
|
163
163
|
begin
|
164
164
|
GET(create_url([api_version, resources_path, name]), query)
|
165
|
-
rescue
|
165
|
+
rescue => e
|
166
|
+
raise e unless e.class == Yao::ItemNotFound || e.class == Yao::NotFound
|
166
167
|
item = find_by_name(name)
|
167
168
|
if item.size > 1
|
168
169
|
raise Yao::TooManyItemFonud.new("More than one resource exists with the name '#{name}'")
|
data/lib/yao/resources/server.rb
CHANGED
@@ -42,6 +42,14 @@ module Yao::Resources
|
|
42
42
|
action(id,"resize" => { "flavorRef" => flavor_id })
|
43
43
|
end
|
44
44
|
|
45
|
+
def self.add_security_group(id, sg_name)
|
46
|
+
action(id, {"addSecurityGroup": {"name": sg_name}})
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.remove_security_group(id, sg_name)
|
50
|
+
action(id, {"removeSecurityGroup": {"name": sg_name}})
|
51
|
+
end
|
52
|
+
|
45
53
|
class << self
|
46
54
|
alias :stop :shutoff
|
47
55
|
|
data/lib/yao/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yao
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Uchio, KONDO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|