1 # Copyright 2013 VMware, Inc. All rights reserved.
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
15 from neutron.api import extensions
17 EXTENDED_ATTRIBUTE = 'extended_attribute'
18 EXTENDED_ATTRIBUTES_2_0 = {
19 'ext_test_resources': {
20 EXTENDED_ATTRIBUTE: {'allow_post': True, 'allow_put': False,
21 'validate': {'type:uuid_or_none': None},
22 'default': None, 'is_visible': True},
27 class Extendedattribute(extensions.ExtensionDescriptor):
28 """Extension class supporting extended attribute for router."""
32 return "Extended Extension Attributes"
36 return "extended-ext-attr"
39 def get_description(cls):
40 return "Provides extended_attr attribute to router"
44 return "2013-02-05T00:00:00-00:00"
46 def get_extended_resources(self, version):
48 return EXTENDED_ATTRIBUTES_2_0