Skip to content

Commit 54b6d9e

Browse files
committed
Sync using resource name
Signed-off-by: Stephen Hoekstra <[email protected]>
1 parent ac39e81 commit 54b6d9e

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 1.5.1 (18 Apr 2019)
2+
3+
**Implemented enhancements:**
4+
5+
- Sync resources by name: sometimes a resource (e.g. templates) were not correctly found; resources are now looked up by specifying the name of the resource
6+
17
# 1.5.0 (17 Oct 2018)
28

39
**Implemented enhancements:**

lib/vagrant-cloudstack/action/run_instance.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ def initialize_parameters
114114

115115
def resolve_parameters
116116
begin
117-
@resource_service.sync_resource(@zone, {available: true})
118-
@resource_service.sync_resource(@service_offering, {listall: true})
119-
@resource_service.sync_resource(@disk_offering, {listall: true})
120-
@resource_service.sync_resource(@template, {zoneid: @zone.id, templatefilter: 'executable', listall: true})
117+
@resource_service.sync_resource(@zone, {available: true, name: @zone.name})
118+
@resource_service.sync_resource(@service_offering, {listall: true, name: @service_offering.name})
119+
@resource_service.sync_resource(@disk_offering, {listall: true, name: @disk_offering.name})
120+
@resource_service.sync_resource(@template, {zoneid: @zone.id, templatefilter: 'executable', listall: true, name: @template.name})
121121
@resource_service.sync_resource(@pf_ip_address)
122122
rescue CloudstackResourceNotFound => e
123123
@env[:ui].error(e.message)

0 commit comments

Comments
 (0)