awspec 0.56.1 → 0.57.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/_resource_types/network_interface.md +8 -0
- data/doc/resource_types.md +9 -0
- data/lib/awspec/helper/finder/ec2.rb +5 -0
- data/lib/awspec/stub/network_interface.rb +6 -1
- data/lib/awspec/type/base.rb +5 -1
- data/lib/awspec/type/network_interface.rb +2 -0
- data/lib/awspec/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: e9b6decea26578d2bf10057ea7543f0b5674b23a
|
4
|
+
data.tar.gz: c85b5938ef1aeda87ec4d2cab4fc2fe58c31c29b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e696e44e8e93edfef0c992aa366ba7ad4e83b35ff070f38e3548393ef3da590cfeb7a425abb88d250156d062c7922a38b77c94cab101b8802e2f4df05a122db
|
7
|
+
data.tar.gz: abc15b38d60d7bbf54a6b1bf7cf0446823beadef3ea8c2d204fa5a0c4915f199ecb81d67bdd1a1dad1e96b96b6046c6d28f853b99011ea8cdf8dec69ba2156d3
|
data/doc/resource_types.md
CHANGED
@@ -1202,6 +1202,15 @@ end
|
|
1202
1202
|
```
|
1203
1203
|
|
1204
1204
|
|
1205
|
+
### have_tag
|
1206
|
+
|
1207
|
+
```ruby
|
1208
|
+
describe network_interface('eni-12ab3cde') do
|
1209
|
+
it { should have_tag('Name').value('my-eni') }
|
1210
|
+
end
|
1211
|
+
```
|
1212
|
+
|
1213
|
+
|
1205
1214
|
### belong_to_subnet
|
1206
1215
|
|
1207
1216
|
```ruby
|
@@ -65,6 +65,11 @@ module Awspec::Helper
|
|
65
65
|
}
|
66
66
|
]
|
67
67
|
})
|
68
|
+
resource = res.network_interfaces.single_resource(interface_id)
|
69
|
+
return resource if resource
|
70
|
+
res = ec2_client.describe_network_interfaces({
|
71
|
+
filters: [{ name: 'tag:Name', values: [interface_id] }]
|
72
|
+
})
|
68
73
|
res.network_interfaces.single_resource(interface_id)
|
69
74
|
end
|
70
75
|
|
data/lib/awspec/type/base.rb
CHANGED
@@ -43,7 +43,11 @@ module Awspec::Type
|
|
43
43
|
|
44
44
|
def self.tags_allowed
|
45
45
|
define_method :has_tag? do |key, value|
|
46
|
-
|
46
|
+
begin
|
47
|
+
tags = resource_via_client.tags
|
48
|
+
rescue NoMethodError
|
49
|
+
tags = resource_via_client.tag_set
|
50
|
+
end
|
47
51
|
return false unless tags
|
48
52
|
tags.any? { |t| t['key'] == key && t['value'] == value }
|
49
53
|
end
|
data/lib/awspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.57.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|