From 4b37cac57356e1959664777acfddd0f3efb23cca Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Fri, 14 Aug 2009 17:33:45 +0200 Subject: [PATCH] storage: Add new function to execute operations Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/constants.py | 3 +++ lib/storage.py | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/constants.py b/lib/constants.py index 52ef557f4..175782f79 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -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, diff --git a/lib/storage.py b/lib/storage.py index eefe124bb..19563bf62 100644 --- a/lib/storage.py +++ b/lib/storage.py @@ -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. -- GitLab