From c23bb217aa3c040d5829138d800938b770e17a70 Mon Sep 17 00:00:00 2001 From: Helga Velroyen <helgav@google.com> Date: Tue, 14 May 2013 13:04:53 +0200 Subject: [PATCH] Rename storage.py to container.py Renaming 'storage.py' to 'container.py'. It will be moved into the new 'storage' directory, which will come in later patches to avoid clashes of notation. Signed-off-by: Helga Velroyen <helgav@google.com> Reviewed-by: Thomas Thrainer <thomasth@google.com> --- Makefile.am | 4 ++-- lib/{storage.py => container.py} | 0 lib/server/noded.py | 8 ++++---- ...rage_unittest.py => ganeti.container_unittest.py} | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) rename lib/{storage.py => container.py} (100%) rename test/py/{ganeti.storage_unittest.py => ganeti.container_unittest.py} (94%) diff --git a/Makefile.am b/Makefile.am index 4721836f7..4728e55e0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -265,6 +265,7 @@ pkgpython_PYTHON = \ lib/compat.py \ lib/config.py \ lib/constants.py \ + lib/container.py \ lib/daemon.py \ lib/errors.py \ lib/hooksmaster.py \ @@ -288,7 +289,6 @@ pkgpython_PYTHON = \ lib/serializer.py \ lib/ssconf.py \ lib/ssh.py \ - lib/storage.py \ lib/uidpool.py \ lib/vcluster.py \ lib/network.py \ @@ -1153,6 +1153,7 @@ python_tests = \ test/py/ganeti.confd.client_unittest.py \ test/py/ganeti.config_unittest.py \ test/py/ganeti.constants_unittest.py \ + test/py/ganeti.container_unittest.py \ test/py/ganeti.daemon_unittest.py \ test/py/ganeti.errors_unittest.py \ test/py/ganeti.hooks_unittest.py \ @@ -1190,7 +1191,6 @@ python_tests = \ test/py/ganeti.server.rapi_unittest.py \ test/py/ganeti.ssconf_unittest.py \ test/py/ganeti.ssh_unittest.py \ - test/py/ganeti.storage_unittest.py \ test/py/ganeti.tools.burnin_unittest.py \ test/py/ganeti.tools.ensure_dirs_unittest.py \ test/py/ganeti.tools.node_daemon_setup_unittest.py \ diff --git a/lib/storage.py b/lib/container.py similarity index 100% rename from lib/storage.py rename to lib/container.py diff --git a/lib/server/noded.py b/lib/server/noded.py index a7d7a888c..48dc3050a 100644 --- a/lib/server/noded.py +++ b/lib/server/noded.py @@ -45,7 +45,7 @@ from ganeti import jstore from ganeti import daemon from ganeti import http from ganeti import utils -from ganeti import storage +from ganeti import container from ganeti import serializer from ganeti import netutils from ganeti import pathutils @@ -532,7 +532,7 @@ class NodeRequestHandler(http.server.HttpServerHandler): """ (su_name, su_args, name, fields) = params - return storage.GetStorage(su_name, *su_args).List(name, fields) + return container.GetStorage(su_name, *su_args).List(name, fields) @staticmethod def perspective_storage_modify(params): @@ -540,7 +540,7 @@ class NodeRequestHandler(http.server.HttpServerHandler): """ (su_name, su_args, name, changes) = params - return storage.GetStorage(su_name, *su_args).Modify(name, changes) + return container.GetStorage(su_name, *su_args).Modify(name, changes) @staticmethod def perspective_storage_execute(params): @@ -548,7 +548,7 @@ class NodeRequestHandler(http.server.HttpServerHandler): """ (su_name, su_args, name, op) = params - return storage.GetStorage(su_name, *su_args).Execute(name, op) + return container.GetStorage(su_name, *su_args).Execute(name, op) # bridge -------------------------- diff --git a/test/py/ganeti.storage_unittest.py b/test/py/ganeti.container_unittest.py similarity index 94% rename from test/py/ganeti.storage_unittest.py rename to test/py/ganeti.container_unittest.py index 0c62abc22..808c1ccf8 100755 --- a/test/py/ganeti.storage_unittest.py +++ b/test/py/ganeti.container_unittest.py @@ -19,7 +19,7 @@ # 02110-1301, USA. -"""Script for testing ganeti.storage""" +"""Script for testing ganeti.storage.container""" import re import unittest @@ -29,15 +29,15 @@ from ganeti import constants from ganeti import utils from ganeti import compat from ganeti import errors -from ganeti import storage +from ganeti import container import testutils class TestVGReduce(testutils.GanetiTestCase): VGNAME = "xenvg" - LIST_CMD = storage.LvmVgStorage.LIST_COMMAND - VGREDUCE_CMD = storage.LvmVgStorage.VGREDUCE_COMMAND + LIST_CMD = container.LvmVgStorage.LIST_COMMAND + VGREDUCE_CMD = container.LvmVgStorage.VGREDUCE_COMMAND def _runCmd(self, cmd, **kwargs): if not self.run_history: @@ -47,7 +47,7 @@ class TestVGReduce(testutils.GanetiTestCase): return result def testOldVersion(self): - lvmvg = storage.LvmVgStorage() + lvmvg = container.LvmVgStorage() stdout = testutils.ReadTestData("vgreduce-removemissing-2.02.02.txt") vgs_fail = testutils.ReadTestData("vgs-missing-pvs-2.02.02.txt") self.run_history = [ @@ -70,7 +70,7 @@ class TestVGReduce(testutils.GanetiTestCase): self.assertEqual(self.run_history, []) def testNewVersion(self): - lvmvg = storage.LvmVgStorage() + lvmvg = container.LvmVgStorage() stdout1 = testutils.ReadTestData("vgreduce-removemissing-2.02.66-fail.txt") stdout2 = testutils.ReadTestData("vgreduce-removemissing-2.02.66-ok.txt") vgs_fail = testutils.ReadTestData("vgs-missing-pvs-2.02.66.txt") -- GitLab