message = _("QoS %(_id)s could not be found")
-"""
-
-
-class PortprofileInUse(ExtensionException):
- message = _("Unable to complete operation on Portprofile %(net_id)s. " \
- "There is one or more attachments plugged into its ports.")
-
-
-class PortInUse(ExtensionException):
- message = _("Unable to complete operation on port %(port_id)s " \
- "for Portprofile %(net_id)s. The attachment '%(att_id)s" \
- "is plugged into the logical port.")
-
-class AlreadyAttached(ExtensionException):
- message = _("Unable to plug the attachment %(att_id)s into port " \
- "%(port_id)s for Portprofile %(net_id)s. The attachment is " \
- "already plugged into port %(att_port_id)s")
-
-"""
-
-
class Duplicate(Error):
"""Duplication Error"""
pass
@webob.dec.wsgify(RequestClass=wsgi.Request)
def __call__(self, req):
- """Generate a WSGI response based on the exception passed to ctor."""
+ """Generate a WSGI response based on the
+ exception passed to constructor."""
# Replace the body with fault details.
code = self.wrapped_exc.status_int
fault_name = self._fault_names.get(code, "quantumServiceFault")
from webob import exc
from extensions import _credential_view as credential_view
from quantum.plugins.cisco.common import cisco_exceptions as exception
-#from extensions import _exceptions as exception
from extensions import _faults as faults
from quantum.api import api_common as common
@classmethod
def get_updated(cls):
- """ Returns Ext Resource Name """
+ """ Returns Ext Resource Update Time """
return "2011-07-25T13:25:27-06:00"
@classmethod
def __init__(self, plugin):
self._resource_name = 'credential'
self._plugin = plugin
- #super(CredentialController, self).__init__(plugin)
def index(self, request, tenant_id):
""" Returns a list of credential ids """
def create(self, request, tenant_id):
""" Creates a new credential for a given tenant """
- #look for credential name in request
try:
req_params = \
self._parse_request_params(request,
return exc.HTTPAccepted()
except exception.CredentialNotFound as exp:
return faults.Fault(faults.CredentialNotFound(exp))
-
\ No newline at end of file
+
from extensions import _novatenant_view as novatenant_view
from quantum.common import exceptions as qexception
-#from extensions import _exceptions as exception
from extensions import _faults as faults
from quantum.api import api_common as common
@classmethod
def get_alias(cls):
- """ Returns Ext Resource Name """
+ """ Returns Ext Resource alias"""
return "Cisco Nova Tenant"
@classmethod
def get_description(cls):
- """ Returns Ext Resource Name """
+ """ Returns Ext Resource Description """
return "novatenant resource is used by nova side to invoke quantum api"
@classmethod
def get_namespace(cls):
- """ Returns Ext Resource Name """
+ """ Returns Ext Resource Namespace """
return "http://docs.ciscocloud.com/api/ext/novatenant/v1.0"
@classmethod
def get_updated(cls):
- """ Returns Ext Resource Name """
+ """ Returns Ext Resource Updated Time """
return "2011-08-09T13:25:27-06:00"
@classmethod
def get_resources(cls):
- """ Returns Ext Resource Name """
+ """ Returns Ext Resource """
parent_resource = dict(member_name="tenant",
collection_name="extensions/csco/tenants")
member_actions = {'get_host': "PUT",
builder = novatenant_view.get_view_builder(request)
result = builder.build_host(host)
return result
- #return exc.HTTPAccepted()
except qexception.PortNotFound as exp:
return faults.Fault(faults.PortNotFound(exp))
from extensions import _pprofiles as pprofiles_view
from quantum.plugins.cisco.common import cisco_exceptions as exception
from quantum.common import exceptions as qexception
-#from extensions import _exceptions as exception
from extensions import _faults as faults
from quantum.api import api_common as common
@classmethod
def get_updated(cls):
- """ Returns Ext Resource Updateed time """
+ """ Returns Ext Resource Updated time """
return "2011-07-23T13:25:27-06:00"
@classmethod
return dict(portprofiles=result)
except exception.PortProfileNotFound as exp:
return faults.Fault(faults.PortprofileNotFound(exp))
- #return faults.Fault(exp)
def create(self, request, tenant_id):
""" Creates a new portprofile for a given tenant """
except exc.HTTPError as exp:
return faults.Fault(exp)
net_id = req_params['network-id'].strip()
- #print "*****net id "+net_id
port_id = req_params['port-id'].strip()
try:
self._plugin.associate_portprofile(tenant_id,