diff options
| author | Scott Moser <smoser@ubuntu.com> | 2011-09-14 12:25:47 -0400 |
|---|---|---|
| committer | Scott Moser <smoser@ubuntu.com> | 2011-09-14 12:25:47 -0400 |
| commit | 092ff28b9f141368aed0d719140212e5fc8652f8 (patch) | |
| tree | ccd10eb1c8abb8f8045f372a741500f354145be8 /nova/api | |
| parent | c20228123c1774a1e2aa1b4ee7155a62336f5934 (diff) | |
| download | nova-092ff28b9f141368aed0d719140212e5fc8652f8.tar.gz nova-092ff28b9f141368aed0d719140212e5fc8652f8.tar.xz nova-092ff28b9f141368aed0d719140212e5fc8652f8.zip | |
add attributes to xml api
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/flavors.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/api/openstack/flavors.py b/nova/api/openstack/flavors.py index fd36060da..c6c9f096f 100644 --- a/nova/api/openstack/flavors.py +++ b/nova/api/openstack/flavors.py @@ -90,6 +90,9 @@ class FlavorXMLSerializer(wsgi.XMLDictSerializer): flavor_node.setAttribute('ram', str(flavor['ram'])) flavor_node.setAttribute('disk', str(flavor['disk'])) + for attr in ("vcpus", "swap", "rxtx_quota", "rxtx_cap"): + flavor_node.setAttribute(attr, str(flavor.get(attr,""))) + link_nodes = self._create_link_nodes(xml_doc, flavor['links']) for link_node in link_nodes: flavor_node.appendChild(link_node) |
