def build(self, attachment_data):
"""Generic method used to generate an attachment entity."""
- if attachment_data['attachment-id']:
- return dict(attachment=dict(id=attachment_data['attachment-id']))
+ if attachment_data['attachment']:
+ return dict(attachment=dict(id=attachment_data['attachment']))
else:
return dict(attachment={})
"""Return details about a specific logical port."""
port_dict = dict(id=port_data['port-id'],
state=port_data['port-state'])
- if port_data['attachment-id']:
- port_dict['attachment'] = dict(id=port_data['attachment-id'])
+ if port_data['attachment']:
+ port_dict['attachment'] = dict(id=port_data['attachment'])
return port_dict
port = dict(port=dict(id=port_data['port-id']))
if port_details:
port['port']['state'] = port_data['port-state']
- if att_details and port_data['attachment-id']:
- port['port']['attachment'] = dict(id=port_data['attachment-id'])
+ if att_details and port_data['attachment']:
+ port['port']['attachment'] = dict(id=port_data['attachment'])
return port
LOG.debug("FakePlugin.get_port_details() called")
port = self._get_port(tenant_id, net_id, port_id)
return {'port-id': str(port.uuid),
- 'attachment-id': port.interface_id,
+ 'attachment': port.interface_id,
'port-state': port.state}
def create_port(self, tenant_id, net_id, port_state=None):