- if 'nodenetwork_id' not in primary_network:
- raise PLCInvalidArgument, "Node network not specified"
- if primary_network['nodenetwork_id'] not in self.caller['nodenetwork_ids']:
- raise PLCInvalidArgument, "Node network not associated with calling node"
+ if 'interface_id' not in primary_network:
+ raise PLCInvalidArgument, "Interface not specified"
+ if primary_network['interface_id'] not in self.caller['interface_ids']:
+ raise PLCInvalidArgument, "Interface not associated with calling node"
+
+ interfaces = Interfaces(self.api, [primary_network['interface_id']])
+ if not interfaces:
+ raise PLCInvalidArgument, "No such interface %r"%interface_id
+ interface = interfaces[0]