# under the License.
#
# @author: Ying Liu, Cisco Systems, Inc.
+#
from webob import exc
from quantum import wsgi
-class Credential(object):
+class Credential(extensions.ExtensionDescriptor):
"""extension class Credential"""
- def __init__(self):
- pass
@classmethod
def get_name(cls):
# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
-# Copyright 2012 Nachi Ueno, NTT MCL, Inc. All rights reserved.
+
+# Copyright 2012 Nachi Ueno, NTT MCL, Inc.
+# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-#
+from quantum.api import extensions
from quantum.api.v2 import attributes
from quantum.openstack.common import log as logging
+
LOG = logging.getLogger(__name__)
FLAVOR_NETWORK = 'flavor:network'
}
-class Flavor(object):
+class Flavor(extensions.ExtensionDescriptor):
@classmethod
def get_name(cls):
return "Flavor support for network and router"
# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
-# Copyright 2012 Nicira Networks, Inc. All rights reserved.
+
+# Copyright 2012 Nicira Networks, Inc.
+# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
cfg.CONF.register_opts(l3_quota_opts, 'QUOTAS')
-class L3(object):
+class L3(extensions.ExtensionDescriptor):
@classmethod
def get_name(cls):
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
# Copyright (c) 2012 OpenStack, LLC.
+# All rights reserved.
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+from quantum.api import extensions
from quantum.api.v2 import attributes
+
# The service will return the vif type for the specific port.
VIF_TYPE = 'binding:vif_type'
# In some cases different implementations may be run on different hosts.
}
-class Portbindings(object):
+class Portbindings(extensions.ExtensionDescriptor):
"""Extension class supporting port bindings.
This class is used by quantum's extension framework to make
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
# Copyright (c) 2012 OpenStack, LLC.
+# All rights reserved.
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+from quantum.api import extensions
from quantum.api.v2 import attributes
+
NETWORK_TYPE = 'provider:network_type'
PHYSICAL_NETWORK = 'provider:physical_network'
SEGMENTATION_ID = 'provider:segmentation_id'
}
-class Providernet(object):
+class Providernet(extensions.ExtensionDescriptor):
"""Extension class supporting provider networks.
This class is used by quantum's extension framework to make
# under the License.
#
# @author: Ying Liu, Cisco Systems, Inc.
+#
from webob import exc
from quantum import wsgi
-class Qos(object):
+class Qos(extensions.ExtensionDescriptor):
"""Qos extension file"""
- def __init__(self):
- pass
@classmethod
def get_name(cls):
from quantum import quota
from quantum import wsgi
+
RESOURCE_NAME = 'quota'
RESOURCE_COLLECTION = RESOURCE_NAME + "s"
QUOTAS = quota.QUOTAS
return {self._resource_name: self._get_quotas(request, tenant_id)}
-class Quotasv2(object):
+class Quotasv2(extensions.ExtensionDescriptor):
"""Quotas management support"""
+
@classmethod
def get_name(cls):
return "Quotas for each tenant"
def get_updated(cls):
return "2012-07-29T10:00:00-00:00"
+ @classmethod
+ def get_resources(cls):
+ """ Returns Ext Resources """
+ controller = QuotaSetsController(QuantumManager.get_plugin())
+ return [extensions.ResourceExtension(
+ Quotasv2.get_alias(),
+ controller,
+ collection_actions={'tenant': 'GET'})]
+
def get_extended_resources(self, version):
if version == "2.0":
return EXTENDED_ATTRIBUTES_2_0
if cfg.CONF.QUOTAS.quota_driver != DB_QUOTA_DRIVER:
msg = _('Quota driver %s is needed.') % DB_QUOTA_DRIVER
raise exceptions.InvalidExtenstionEnv(reason=msg)
-
- @classmethod
- def get_resources(cls):
- """ Returns Ext Resources """
- controller = QuotaSetsController(QuantumManager.get_plugin())
- return [extensions.ResourceExtension(
- Quotasv2.get_alias(),
- controller,
- collection_actions={'tenant': 'GET'})]
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
# Copyright (c) 2012 OpenStack, LLC.
+# All rights reserved.
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
from abc import abstractmethod
cfg.CONF.register_opts(security_group_opts, 'SECURITYGROUP')
-class Securitygroup(object):
+class Securitygroup(extensions.ExtensionDescriptor):
""" Security group extension"""
@classmethod
# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
# Copyright 2013 OpenStack LLC.
# All Rights Reserved.
#
attributes.validators['type:servicetype_ref'] = _validate_servicetype_ref
-class Servicetype(object):
+class Servicetype(extensions.ExtensionDescriptor):
@classmethod
def get_name(cls):
def get_resources(cls):
""" Returns Extended Resource for service type management """
controller = base.create_resource(
- COLLECTION_NAME, RESOURCE_NAME,
+ COLLECTION_NAME,
+ RESOURCE_NAME,
servicetype_db.ServiceTypeManager.get_instance(),
RESOURCE_ATTRIBUTE_MAP[COLLECTION_NAME])
- return [extensions.ResourceExtension(COLLECTION_NAME,
- controller)]
+ return [extensions.ResourceExtension(COLLECTION_NAME, controller)]
# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
-# Copyright 2012 NEC Corporation. All rights reserved.
+
+# Copyright 2012 NEC Corporation.
+# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+#
# @author: Ryota MIBU
+#
from quantum.api import extensions
from quantum.api.v2 import attributes
}
-class Packetfilter(object):
-
- def __init__(self):
- pass
+class Packetfilter(extensions.ExtensionDescriptor):
def get_name(self):
return "PacketFilters"