mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
Bug #4467: Rename TEMPLATE/EC2 in onedb migrator
This commit is contained in:
parent
9e15666712
commit
6f56934950
@ -193,6 +193,18 @@ module Migrator
|
||||
doc.root.at_xpath("HISTORY_RECORDS/HISTORY[last()]/CID").content = 0
|
||||
end
|
||||
|
||||
# Bug #4467
|
||||
|
||||
elem = doc.at_xpath("/VM/USER_TEMPLATE/EC2")
|
||||
|
||||
if (!elem.nil?)
|
||||
elem.name = "PUBLIC_CLOUD"
|
||||
|
||||
if elem.at_xpath("TYPE").nil?
|
||||
elem.add_child(doc.create_element("TYPE")).content = "ec2"
|
||||
end
|
||||
end
|
||||
|
||||
row[:body] = doc.root.to_s
|
||||
end
|
||||
|
||||
@ -324,6 +336,18 @@ module Migrator
|
||||
user_inputs.add_child(doc.create_element("VCPU")).content = "O|fixed|||#{vcpu}"
|
||||
end
|
||||
|
||||
# Bug #4467
|
||||
|
||||
elem = doc.at_xpath("/VMTEMPLATE/TEMPLATE/EC2")
|
||||
|
||||
if (!elem.nil?)
|
||||
elem.name = "PUBLIC_CLOUD"
|
||||
|
||||
if elem.at_xpath("TYPE").nil?
|
||||
elem.add_child(doc.create_element("TYPE")).content = "ec2"
|
||||
end
|
||||
end
|
||||
|
||||
@db[:template_pool].insert(
|
||||
:oid => row[:oid],
|
||||
:name => row[:name],
|
||||
|
Loading…
x
Reference in New Issue
Block a user