30 lines
785 B
Python
30 lines
785 B
Python
#
|
|
# Copyright (c) 2013-2016 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
|
# coding=utf-8
|
|
#
|
|
|
|
from sysinv.objects import base
|
|
from sysinv.objects import utils
|
|
from sysinv.objects import interface_ethernet
|
|
|
|
|
|
class VLANInterface(interface_ethernet.EthernetInterface):
|
|
|
|
fields = dict({
|
|
'vlan_id': utils.int_or_none,
|
|
'vlan_type': utils.str_or_none,
|
|
}, **interface_ethernet.EthernetInterface.fields)
|
|
|
|
@base.remotable_classmethod
|
|
def get_by_uuid(cls, context, uuid):
|
|
return cls.dbapi.vlan_interface_get(uuid)
|
|
|
|
def save_changes(self, context, updates):
|
|
self.dbapi.vlan_interface_update(self.uuid, # pylint: disable=no-member
|
|
updates)
|