@api_call
def create_network(self, body=None):
"""
- Creates a new network on the server
+ Creates a new network
"""
- body = self.serialize(body)
return self.do_request("POST", self.networks_path, body=body)
@api_call
def update_network(self, network, body=None):
"""
- Updates a network on the server
+ Updates a network
"""
- body = self.serialize(body)
return self.do_request("PUT", self.network_path % (network), body=body)
@api_call
@api_call
def set_port_state(self, network, port, body=None):
"""
- Sets the state of a port on the server
+ Sets the state of the specified port
"""
- body = self.serialize(body)
return self.do_request("PUT",
self.port_path % (network, port), body=body)
@api_call
def attach_resource(self, network, port, body=None):
"""
- Deletes a port from a network on the server
+ Sets the attachment-id of the specified port
"""
- body = self.serialize(body)
return self.do_request("PUT",
self.attachment_path % (network, port), body=body)