vmware-vra 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/vra/resource.rb +1 -1
- data/lib/vra/version.rb +1 -1
- data/spec/resource_spec.rb +22 -2
- 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: 14871eed2bd85f0b933474eec52895806638ae1a
|
4
|
+
data.tar.gz: 1bec5498c3cb3b1a7f2c7059283c4358ae551dbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02d1b1adf9966b699145505b0088f29b69a9a66a4740c062ac237bd1d44fbeff72307ce07251e197df2d20540d3ef977335aca47068e0db0d1c82b23890bd16c
|
7
|
+
data.tar.gz: bfefe81da01e572ef2b2bf9f11690c9c29227f65b6b3b5c8a40f929446350cda158876289003eff23bb0c9d722f258dfdd152e3321c875f71c75467f8028e89b
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# vmware-vra-gem CHANGELOG
|
2
|
+
|
3
|
+
## v1.5.0 (2015-11-18)
|
4
|
+
* [pr#15](https://github.com/chef-partners/vmware-vra-gem/pull/15) Adding support for Infrastructure.Cloud resources, such as EC2 resources created by vRA catalog items
|
5
|
+
|
1
6
|
## v1.4.0
|
2
7
|
* [pr#14](https://github.com/chef-partners/vmware-vra-gem/pull/14) Adding appropriate methods for managing the bearer_token
|
3
8
|
|
data/lib/vra/resource.rb
CHANGED
data/lib/vra/version.rb
CHANGED
data/spec/resource_spec.rb
CHANGED
@@ -123,8 +123,28 @@ describe Vra::Resource do
|
|
123
123
|
end
|
124
124
|
|
125
125
|
describe '#vm?' do
|
126
|
-
|
127
|
-
|
126
|
+
context 'when the resource type is Infrastructure.Virtual' do
|
127
|
+
let(:resource_data) { { 'resourceTypeRef' => { 'id' => 'Infrastructure.Virtual' } } }
|
128
|
+
it 'returns true' do
|
129
|
+
allow(resource).to receive(:resource_data).and_return(resource_data)
|
130
|
+
expect(resource.vm?).to eq(true)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
context 'when the resource type is Infrastructure.Cloud' do
|
135
|
+
let(:resource_data) { { 'resourceTypeRef' => { 'id' => 'Infrastructure.Cloud' } } }
|
136
|
+
it 'returns true' do
|
137
|
+
allow(resource).to receive(:resource_data).and_return(resource_data)
|
138
|
+
expect(resource.vm?).to eq(true)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
context 'when the resource type is an unknown type' do
|
143
|
+
let(:resource_data) { { 'resourceTypeRef' => { 'id' => 'Infrastructure.Unknown' } } }
|
144
|
+
it 'returns false' do
|
145
|
+
allow(resource).to receive(:resource_data).and_return(resource_data)
|
146
|
+
expect(resource.vm?).to eq(false)
|
147
|
+
end
|
128
148
|
end
|
129
149
|
end
|
130
150
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmware-vra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Leff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|