diff --git a/Makefile.am b/Makefile.am index 4721836f7a5e408392dbd4309d4c037cbe516e9b..4728e55e0e31629be4479363e2f65713eb7efbe2 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 a7d7a888cefad2ef5f2cc0ffb32f07e17f30654e..48dc3050af3b696716fa4cc6c747c1295263743e 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 0c62abc2228415e3653a9730ab7344340002eb4f..808c1ccf83e714d8abf50bac238e4087a60122dd 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")