ns-fog 1.22.7 → 1.22.8
Sign up to get free protection for your applications and to get access to all the features.
data/fog.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
## If your rubyforge_project name is different, then edit it and comment out
|
7
7
|
## the sub! line in the Rakefile
|
8
8
|
s.name = 'ns-fog'
|
9
|
-
s.version = '1.22.
|
9
|
+
s.version = '1.22.8'
|
10
10
|
s.date = '2014-07-21'
|
11
11
|
s.rubyforge_project = 'fog'
|
12
12
|
|
@@ -73,7 +73,7 @@ module Fog
|
|
73
73
|
def save
|
74
74
|
requires :bandwidth
|
75
75
|
unless persisted?
|
76
|
-
eip_id = service.allocate_address(bandwidth, 1,
|
76
|
+
eip_id = service.allocate_address(bandwidth, 1, name, need_icp).body['eips'].first
|
77
77
|
self.id = eip_id
|
78
78
|
wait_for {ready?}
|
79
79
|
if @server
|
@@ -15,6 +15,7 @@ module Fog::Compute
|
|
15
15
|
attribute :val1
|
16
16
|
attribute :val2
|
17
17
|
attribute :val3
|
18
|
+
attribute :auto_apply
|
18
19
|
|
19
20
|
def initialize(attrs = {})
|
20
21
|
if attrs['protocol']
|
@@ -27,6 +28,7 @@ module Fog::Compute
|
|
27
28
|
end
|
28
29
|
end
|
29
30
|
attrs['val3'] ||= attrs.delete('src_ip')
|
31
|
+
@auto_apply = attrs.delete('auto_apply') || true
|
30
32
|
|
31
33
|
super attrs
|
32
34
|
end
|
@@ -40,14 +42,14 @@ module Fog::Compute
|
|
40
42
|
requires :protocol, :priority
|
41
43
|
self.id = service.add_security_group_rules(group_id, to_query).body['security_group_rules'].first
|
42
44
|
end
|
43
|
-
service.apply_security_group(group_id)
|
45
|
+
service.apply_security_group(group_id) if @auto_apply
|
44
46
|
true
|
45
47
|
end
|
46
48
|
|
47
49
|
def destroy
|
48
50
|
requires :id
|
49
51
|
service.delete_security_group_rules(id)
|
50
|
-
service.apply_security_group(group_id)
|
52
|
+
service.apply_security_group(group_id) if @auto_apply
|
51
53
|
true
|
52
54
|
end
|
53
55
|
|