[XEND] Fix some Xen API error declarations.

Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
Alastair Tse committed 2007-01-05 17:24:55 +00:00
1 parent 5c6059a43d
commit 1f2d77695e
1 file changed
+3 -3
+3 -3
View File
@@ -543,14 +543,14 @@ class XendAPI:
try:
node = XendNode.instance()
if host_uuid != node.uuid:
return xen_api_error([HOST_HANDLE_INVALID, host_uuid])
return xen_api_error(['HOST_HANDLE_INVALID', host_uuid])
elif _is_valid_ref(network_uuid, node.is_valid_network):
network = node.get_network(network_uuid)
return xen_api_success(node.PIF_create(name, mtu, vlan, mac,
network))
else:
return xen_api_error([NETWORK_HANDLE_INVALID, network_uuid])
return xen_api_error(['NETWORK_HANDLE_INVALID', network_uuid])
except NetworkAlreadyConnected, exn:
return xen_api_error(['NETWORK_ALREADY_CONNECTED',
network_uuid, exn.pif_uuid])
@@ -604,7 +604,7 @@ class XendAPI:
return xen_api_success(XendNode.instance().PIF_create_VLAN(
ref, network, vlan))
else:
return xen_api_error([NETWORK_HANDLE_INVALID, network])
return xen_api_error(['NETWORK_HANDLE_INVALID', network])
except NetworkAlreadyConnected, exn:
return xen_api_error(['NETWORK_ALREADY_CONNECTED',
network, exn.pif_uuid])
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.