if type(params) is dict:
action += '?' + urllib.urlencode(params)
+ if body != None:
+ body = self.serialize(body)
+
try:
connection_type = self.get_connection_type()
headers = headers or {"Content-Type":
"""
Creates a new network on the server
"""
- body = self.serialize(body)
return self.do_request("POST", self.networks_path, body=body)
@api_call
"""
Updates a network on the server
"""
- body = self.serialize(body)
return self.do_request("PUT", self.network_path % (network), body=body)
@api_call
"""
Sets the state of a port on the server
"""
- body = self.serialize(body)
return self.do_request("PUT",
self.port_path % (network, port), body=body)
"""
Deletes a port from a network on the server
"""
- body = self.serialize(body)
return self.do_request("PUT",
self.attachment_path % (network, port), body=body)