Merge "use net mtu api def from neutron-lib"
This commit is contained in:
commit
7f1b6043bd
|
@ -12,39 +12,11 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from neutron_lib.api.definitions import network_mtu as apidef
|
||||
from neutron_lib.api import extensions
|
||||
|
||||
|
||||
MTU = 'mtu'
|
||||
EXTENDED_ATTRIBUTES_2_0 = {
|
||||
'networks': {
|
||||
MTU: {'allow_post': False, 'allow_put': False,
|
||||
'is_visible': True},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
class Netmtu(extensions.ExtensionDescriptor):
|
||||
class Netmtu(extensions.APIExtensionDescriptor):
|
||||
"""Extension class supporting network MTU."""
|
||||
|
||||
@classmethod
|
||||
def get_name(cls):
|
||||
return "Network MTU"
|
||||
|
||||
@classmethod
|
||||
def get_alias(cls):
|
||||
return "net-mtu"
|
||||
|
||||
@classmethod
|
||||
def get_description(cls):
|
||||
return "Provides MTU attribute for a network resource."
|
||||
|
||||
@classmethod
|
||||
def get_updated(cls):
|
||||
return "2015-03-25T10:00:00-00:00"
|
||||
|
||||
def get_extended_resources(self, version):
|
||||
if version == "2.0":
|
||||
return EXTENDED_ATTRIBUTES_2_0
|
||||
else:
|
||||
return {}
|
||||
api_definition = apidef
|
||||
|
|
Loading…
Reference in New Issue