mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-29 18:50:08 +03:00
(cherry picked from commit 78c584661c8c121a6dc0fdef50e14c3dc7b1a207)
This commit is contained in:
parent
ffc0f8ecb1
commit
bf36ccf30d
@ -25,6 +25,7 @@
|
||||
<xs:sequence>
|
||||
<xs:element name="CPU" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="MEMORY" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="VCPU" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="DISK" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
|
@ -2523,12 +2523,13 @@ string& VirtualMachine::to_token(string& text) const
|
||||
string& VirtualMachine::to_xml_short(string& xml)
|
||||
{
|
||||
string disks_xml, user_template_xml, history_xml, nics_xml;
|
||||
string cpu_tmpl, mem_tmpl;
|
||||
string cpu_tmpl, mem_tmpl, vcpu_tmpl;
|
||||
|
||||
ostringstream oss;
|
||||
|
||||
obj_template->get("CPU", cpu_tmpl);
|
||||
obj_template->get("MEMORY", mem_tmpl);
|
||||
obj_template->get("VCPU", vcpu_tmpl);
|
||||
|
||||
oss << "<VM>"
|
||||
<< "<ID>" << oid << "</ID>"
|
||||
@ -2553,6 +2554,7 @@ string& VirtualMachine::to_xml_short(string& xml)
|
||||
oss << "<TEMPLATE>"
|
||||
<< "<CPU>" << cpu_tmpl << "</CPU>"
|
||||
<< "<MEMORY>" << mem_tmpl << "</MEMORY>"
|
||||
<< "<VCPU>" << vcpu_tmpl << "</VCPU>"
|
||||
<< disks.to_xml_short(disks_xml)
|
||||
<< nics.to_xml_short(nics_xml);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user