Skip to content
Snippets Groups Projects
Commit 4b37cac5 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

storage: Add new function to execute operations


Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent e9721add
No related branches found
No related tags found
No related merge requests found
......@@ -210,6 +210,9 @@ MODIFIABLE_STORAGE_FIELDS = {
ST_LVM_PV: frozenset([SF_ALLOCATABLE]),
}
VALID_STORAGE_OPERATIONS = {
}
# Local disk status
# Note: Code depends on LDS_OKAY < LDS_UNKNOWN < LDS_FAULTY
(LDS_OKAY,
......
......@@ -64,6 +64,17 @@ class _Base:
raise errors.ProgrammerError("Unable to modify the following"
"fields: %r" % (changes.keys(), ))
def Execute(self, name, op):
"""Executes an operation on an entity within the storage unit.
@type name: string
@param name: Entity name
@type op: string
@param op: Operation name
"""
raise NotImplementedError()
class FileStorage(_Base):
"""File storage unit.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment