fog-vcloud-director 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fog/vcloud_director/compute.rb +13 -0
- data/lib/fog/vcloud_director/models/compute/catalogs.rb +8 -0
- data/lib/fog/vcloud_director/models/compute/vapps.rb +2 -0
- data/lib/fog/vcloud_director/requests/compute/instantiate_vapp_template.rb +9 -9
- data/lib/fog/vcloud_director/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: 514a98d2a454438da4fe30d96a6d0cdad5c887bc
|
4
|
+
data.tar.gz: 5ce51eedb33d580d41edc21112a4173816cdc7b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fd4c6491d595e78692a39086e54a13d2f20e031d9f1d9b49bfaeafb11cc9505c76166c78d965bff459d65b0f5490d094a01c781b203b7886f351d9a9271a8a2
|
7
|
+
data.tar.gz: 78a26f8829d2843dbd51bb6922ef13ab66b396c28ec1e88c1c6ce722c0ab8fea0505bd14ace2e7c040ca46ccbb07ef29182ef38d7afcb3513d162944d4aa100e
|
@@ -380,6 +380,19 @@ module Fog
|
|
380
380
|
@connection.reset
|
381
381
|
end
|
382
382
|
|
383
|
+
def instantiate_template(options)
|
384
|
+
vapp_template_id = options[:template]
|
385
|
+
vapp_name = options[:stack_name]
|
386
|
+
|
387
|
+
# Remove unneeded options.
|
388
|
+
options.delete(:template)
|
389
|
+
options.delete(:stack_name)
|
390
|
+
|
391
|
+
response = instantiate_vapp_template(vapp_name, vapp_template_id, options)
|
392
|
+
process_task(response.body[:Tasks][:Task])
|
393
|
+
response.body[:href].split('/').last # returns the vapp_id if it was instantiated successfully.
|
394
|
+
end
|
395
|
+
|
383
396
|
def request(params)
|
384
397
|
begin
|
385
398
|
do_request(params)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'fog/core/collection'
|
2
2
|
require 'fog/vcloud_director/models/compute/catalog'
|
3
|
+
require 'fog/vcloud_director/models/compute/catalog_item'
|
3
4
|
|
4
5
|
module Fog
|
5
6
|
module Compute
|
@@ -9,6 +10,13 @@ module Fog
|
|
9
10
|
|
10
11
|
attribute :organization
|
11
12
|
|
13
|
+
def get_single_catalog_item(item_id)
|
14
|
+
item = service.get_catalog_item(item_id).body
|
15
|
+
return nil unless item
|
16
|
+
item[:vapp_template_id] = item[:Entity][:href].split('/').last
|
17
|
+
Fog::Compute::VcloudDirector::CatalogItem.new(item.merge({ :service => service, :collection => [] }))
|
18
|
+
end
|
19
|
+
|
12
20
|
private
|
13
21
|
|
14
22
|
def get_by_id(item_id)
|
@@ -47,15 +47,15 @@ module Fog
|
|
47
47
|
def generate_instantiate_vapp_template_request(options ={})
|
48
48
|
|
49
49
|
#overriding some params so they work with new standardised generator
|
50
|
-
options[:InstantiationParams] =
|
51
|
-
{
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
} unless options[:InstantiationParams]
|
50
|
+
# options[:InstantiationParams] =
|
51
|
+
# {
|
52
|
+
# :NetworkConfig =>
|
53
|
+
# [{
|
54
|
+
# :networkName => options[:network_name],
|
55
|
+
# :networkHref => options[:network_uri],
|
56
|
+
# :fenceMode => 'bridged'
|
57
|
+
# }]
|
58
|
+
# } unless options[:InstantiationParams]
|
59
59
|
options[:name] = options.delete(:vapp_name) if options[:vapp_name]
|
60
60
|
options[:Description] = options.delete(:description) unless options[:Description]
|
61
61
|
if options[:vms_config] then
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-vcloud-director
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luka Zakrajšek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|