From 0dfdf96311b05a9ae182091c2c7c3a4da56d75a7 Mon Sep 17 00:00:00 2001 From: Somik Behera Date: Mon, 6 Jun 2011 09:22:05 -0700 Subject: [PATCH] Initial commit of exceptions that are raised by a quantum plugin. This list of exceptions is consistent with exceptions being expected by the API service. Please note that the exception list is still evolving and will soon be concrete. --- quantum/quantum_plugin_base.py | 49 ++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/quantum/quantum_plugin_base.py b/quantum/quantum_plugin_base.py index 0bc156d49..bf2976ec6 100644 --- a/quantum/quantum_plugin_base.py +++ b/quantum/quantum_plugin_base.py @@ -35,6 +35,9 @@ class QuantumPluginBase(object): Returns a dictionary containing all for the specified tenant. + + :returns: + :raises: """ pass @@ -43,6 +46,9 @@ class QuantumPluginBase(object): """ Creates a new Virtual Network, and assigns it a symbolic name. + + :returns: + :raises: """ pass @@ -51,6 +57,10 @@ class QuantumPluginBase(object): """ Deletes the network with the specified network identifier belonging to the specified tenant. + + :returns: + :raises: exception.NetworkInUse + :raises: exception.NetworkNotFound """ pass @@ -58,7 +68,10 @@ class QuantumPluginBase(object): def get_network_details(self, tenant_id, net_id): """ retrieved a list of all the remote vifs that - are attached to the network + are attached to the network. + + :returns: + :raises: exception.NetworkNotFound """ pass @@ -67,6 +80,9 @@ class QuantumPluginBase(object): """ Updates the symbolic name belonging to a particular Virtual Network. + + :returns: + :raises: exception.NetworkNotFound """ pass @@ -75,6 +91,9 @@ class QuantumPluginBase(object): """ Retrieves all port identifiers belonging to the specified Virtual Network. + + :returns: + :raises: exception.NetworkNotFound """ pass @@ -82,6 +101,10 @@ class QuantumPluginBase(object): def create_port(self, tenant_id, net_id, port_state=None): """ Creates a port on the specified Virtual Network. + + :returns: + :raises: exception.NetworkNotFound + :raises: exception.StateInvalid """ pass @@ -89,7 +112,11 @@ class QuantumPluginBase(object): def update_port(self, tenant_id, net_id, port_id, port_state): """ Updates the state of a specific port on the - specified Virtual Network + specified Virtual Network. + + :returns: + :raises: exception.StateInvalid + :raises: exception.PortNotFound """ pass @@ -100,6 +127,11 @@ class QuantumPluginBase(object): if the port contains a remote interface attachment, the remote interface is first un-plugged and then the port is deleted. + + :returns: + :raises: exception.PortInUse + :raises: exception.PortNotFound + :raises: exception.NetworkNotFound """ pass @@ -108,6 +140,10 @@ class QuantumPluginBase(object): """ This method allows the user to retrieve a remote interface that is attached to this particular port. + + :returns: + :raises: exception.PortNotFound + :raises: exception.NetworkNotFound """ pass @@ -116,6 +152,11 @@ class QuantumPluginBase(object): """ Attaches a remote interface to the specified port on the specified Virtual Network. + + :returns: + :raises: exception.NetworkNotFound + :raises: exception.PortNotFound + :raises: exception.AlreadyAttached (? should the network automatically unplug/replug) """ pass @@ -124,6 +165,10 @@ class QuantumPluginBase(object): """ Detaches a remote interface from the specified port on the specified Virtual Network. + + :returns: + :raises: exception.NetworkNotFound + :raises: exception.PortNotFound """ pass -- 2.45.2