config/sysinv/sysinv/sysinv/sysinv/objects/storage_file.py
Al Bailey 1377383e23 Sysinv. Cleanup import statements for pep8
concurrency is now set to 5 in .testr.conf
unit tests are no longer bandit checked
Unused imports are now excluded.
Note: storage_backend uses eval to dynamically invoke certain calls,
so those imports are flagged noqa

Change-Id: I6b0027072d18e1295798fa9ae355175772be8962
Signed-off-by: Jack Ding <jack.ding@windriver.com>
2018-06-29 13:43:53 -04:00

28 lines
644 B
Python
Executable File

#
# Copyright (c) 2017 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# coding=utf-8
#
from sysinv.db import api as db_api
from sysinv.objects import base
from sysinv.objects import storage_backend
class StorageFile(storage_backend.StorageBackend):
dbapi = db_api.get_instance()
fields = dict({}, **storage_backend.StorageBackend.fields)
@base.remotable_classmethod
def get_by_uuid(cls, context, uuid):
return cls.dbapi.storage_file_get(uuid)
def save_changes(self, context, updates):
self.dbapi.storage_file_update(self.uuid, updates)