We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c7eb686 + 2001a6c commit 985077cCopy full SHA for 985077c
1 file changed
lib/puppet/provider/onevm/cli.rb
@@ -49,10 +49,12 @@ def exists?
49
def self.instances
50
vms = Nokogiri::XML(onevm('list','-x')).root.xpath('/VM_POOL/VM')
51
vms.collect do |vm|
52
+ template_id = vm.xpath('./TEMPLATE/TEMPLATE_ID').text
53
+ template_name = Nokogiri::XML(onetemplate('show',template_id,'-x')).root.xpath('/VMTEMPLATE/NAME').text
54
new(
55
:name => vm.xpath('./NAME').text,
56
:ensure => :present,
- :template => vm.xpath('./TEMPLATE/TEMPLATE_ID').text,
57
+ :template => template_name,
58
:description => vm.xpath('./TEMPLATE/DESCRIPTION').text
59
)
60
end
0 commit comments