def create(self):
    xos_args = self.get_xos_args()
    if (not xos_args.get('instance', None)):
        raise Exception('Must specify slver when creating port')
    if (not xos_args.get('network', None)):
        raise Exception('Must specify network when creating port')
    port = Port(**xos_args)
    port.caller = self.user
    port.save()
    self.postprocess(port)
    self.info(("Created Port '%s' connect instance '%s' to network %s" % (str(port), str(port.instance), str(port.network))))
def create(self):
    xos_args = self.get_xos_args()
    if (not xos_args.get('instance', None)):
        raise Exception('Must specify slver when creating port')
    if (not xos_args.get('network', None)):
        raise Exception('Must specify network when creating port')
    port = Port(**xos_args)
    port.caller = self.user
    port.save()
    self.postprocess(port)
    self.info(("Created Port '%s' connect instance '%s' to network %s" % (str(port), str(port.instance), str(port.network))))