65a8eca8e1
A number of changes were done to the imports in the files. - Clean up flake8 H301 multiple imports per line - Remove noqa from top of files, allowing flake8 to run on all files. - Clean up relative imports in most places. This will simplify python3 support later. - Partially sort the imports. A later commit will enable that check since doing that here would have made the changeset even bigger. Story: 2003499 Task: 26561 Change-Id: Id5f95559f0d4604f4db1a1d74098063fd510142c Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
33 lines
1011 B
Python
Executable File
33 lines
1011 B
Python
Executable File
#
|
|
# Copyright (c) 2015-2016 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
from sqlalchemy import Column
|
|
from sqlalchemy import Integer
|
|
from sqlalchemy import String
|
|
|
|
from nfv_vim.database.model._base import AsDictMixin
|
|
from nfv_vim.database.model._base import Base
|
|
|
|
|
|
class Volume(AsDictMixin, Base):
|
|
"""
|
|
Volume Database Table Entry
|
|
"""
|
|
__tablename__ = 'volumes_v1'
|
|
|
|
uuid = Column(String(64), nullable=False, primary_key=True)
|
|
name = Column(String(64), nullable=False)
|
|
description = Column(String(256), nullable=False)
|
|
avail_status = Column(String(64), nullable=False)
|
|
action = Column(String(64), nullable=False)
|
|
size_gb = Column(Integer, nullable=False)
|
|
bootable = Column(String(64), nullable=False)
|
|
encrypted = Column(String(64), nullable=False)
|
|
image_uuid = Column(String(64), nullable=True)
|
|
nfvi_volume_data = Column(String(2048), nullable=False)
|
|
|
|
def __repr__(self):
|
|
return "<Volume(%r, %r)>" % (self.uuid, self.name)
|