diff options
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/_id_translator.py | 3 | ||||
| -rw-r--r-- | nova/api/openstack/ips.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/nova/api/openstack/_id_translator.py b/nova/api/openstack/_id_translator.py index 333aa8434..dc3874a75 100644 --- a/nova/api/openstack/_id_translator.py +++ b/nova/api/openstack/_id_translator.py @@ -1,5 +1,6 @@ from nova import datastore + class RackspaceAPIIdTranslator(object): """ Converts Rackspace API ids to and from the id format for a given @@ -21,7 +22,7 @@ class RackspaceAPIIdTranslator(object): def to_rs_id(self, opaque_id): """Convert an id from a strategy-specific one to a Rackspace one.""" result = self._store.hget(self._fwd_key, str(opaque_id)) - if result: # we have a mapping from opaque to RS for this strategy + if result: # we have a mapping from opaque to RS for this strategy return int(result) else: # Store the mapping. diff --git a/nova/api/openstack/ips.py b/nova/api/openstack/ips.py index 7e644ba04..b805c53f8 100644 --- a/nova/api/openstack/ips.py +++ b/nova/api/openstack/ips.py @@ -109,7 +109,7 @@ class IPXMLSerializer(wsgi.XMLDictSerializer): def __init__(self, xmlns=wsgi.XMLNS_V11): super(IPXMLSerializer, self).__init__(xmlns=xmlns) - def populate_addresses_node(self, addresses_elem, addresses_dict): + def populate_addresses_node(self, addresses_elem, addresses_dict): for (network_id, ip_dicts) in addresses_dict.items(): network_elem = self._create_network_node(network_id, ip_dicts) addresses_elem.append(network_elem) @@ -143,7 +143,7 @@ def create_resource(version): metadata = { 'list_collections': { - 'public': {'item_name': 'ip', 'item_key': 'addr'}, + 'public': {'item_name': 'ip', 'item_key': 'addr'}, 'private': {'item_name': 'ip', 'item_key': 'addr'}, }, } |
