29 lines
712 B
Python
Executable File
29 lines
712 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, # pylint: disable=no-member
|
|
updates)
|