diff --git a/Makefile.am b/Makefile.am index e0f3e89404f16eab06d9c5eea9408f7501652cec..5831bb92dc8d6cee19e0be411319de2b1356c642 100644 --- a/Makefile.am +++ b/Makefile.am @@ -261,8 +261,8 @@ pkgpython_PYTHON = \ lib/mcpu.py \ lib/netutils.py \ lib/objects.py \ - lib/objectutils.py \ lib/opcodes.py \ + lib/outils.py \ lib/ovf.py \ lib/pathutils.py \ lib/qlang.py \ @@ -1094,8 +1094,8 @@ python_tests = \ test/py/ganeti.mcpu_unittest.py \ test/py/ganeti.netutils_unittest.py \ test/py/ganeti.objects_unittest.py \ - test/py/ganeti.objectutils_unittest.py \ test/py/ganeti.opcodes_unittest.py \ + test/py/ganeti.outils_unittest.py \ test/py/ganeti.ovf_unittest.py \ test/py/ganeti.qlang_unittest.py \ test/py/ganeti.query_unittest.py \ diff --git a/lib/masterd/iallocator.py b/lib/masterd/iallocator.py index 48cbd55ceef3c9b316f957477621ada1c5625217..d5762b669c02adf33873a955800a5a71f28a8e4f 100644 --- a/lib/masterd/iallocator.py +++ b/lib/masterd/iallocator.py @@ -1,7 +1,7 @@ # # -# Copyright (C) 2012 Google Inc. +# Copyright (C) 2012, 2013 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ from ganeti import compat from ganeti import constants from ganeti import errors from ganeti import ht -from ganeti import objectutils +from ganeti import outils from ganeti import opcodes from ganeti import rpc from ganeti import serializer @@ -60,7 +60,7 @@ _NEVAC_RESULT = ht.TAnd(ht.TIsLength(3), _INST_NAME = ("name", ht.TNonEmptyString) -class _AutoReqParam(objectutils.AutoSlots): +class _AutoReqParam(outils.AutoSlots): """Meta class for request definitions. """ @@ -73,7 +73,7 @@ class _AutoReqParam(objectutils.AutoSlots): return [slot for (slot, _) in params] -class IARequestBase(objectutils.ValidatedSlots): +class IARequestBase(outils.ValidatedSlots): """A generic IAllocator request object. """ @@ -92,7 +92,7 @@ class IARequestBase(objectutils.ValidatedSlots): REQ_PARAMS attribute for this class. """ - objectutils.ValidatedSlots.__init__(self, **kwargs) + outils.ValidatedSlots.__init__(self, **kwargs) self.Validate() diff --git a/lib/objects.py b/lib/objects.py index 2f90ea5ce8aa7cc34293eb9dc7396bd0a8c6b74d..588ef03c5561d96bc290fe9c98c50a77576f09c3 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -1,7 +1,7 @@ # # -# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc. +# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -45,7 +45,7 @@ from cStringIO import StringIO from ganeti import errors from ganeti import constants from ganeti import netutils -from ganeti import objectutils +from ganeti import outils from ganeti import utils from socket import AF_INET @@ -193,7 +193,7 @@ def MakeEmptyIPolicy(): ]) -class ConfigObject(objectutils.ValidatedSlots): +class ConfigObject(outils.ValidatedSlots): """A generic config object. It has the following properties: diff --git a/lib/opcodes.py b/lib/opcodes.py index dc27e632b696a4612d3e9cb6fd9df4e0b8dde7f2..73d5cb3b65f53644241829a98834ccf25cbcc467 100644 --- a/lib/opcodes.py +++ b/lib/opcodes.py @@ -1,7 +1,7 @@ # # -# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc. +# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -41,7 +41,7 @@ from ganeti import constants from ganeti import errors from ganeti import ht from ganeti import objects -from ganeti import objectutils +from ganeti import outils # Common opcode attributes @@ -417,7 +417,7 @@ _TIpNetwork6 = ht.TAnd(ht.TString, _CheckCIDR6NetNotation) _TMaybeAddr4List = ht.TMaybe(ht.TListOf(_TIpAddress4)) -class _AutoOpParamSlots(objectutils.AutoSlots): +class _AutoOpParamSlots(outils.AutoSlots): """Meta class for opcode definitions. """ @@ -443,7 +443,7 @@ class _AutoOpParamSlots(objectutils.AutoSlots): attrs["OP_ID"] = _NameToId(name) - return objectutils.AutoSlots.__new__(mcs, name, bases, attrs) + return outils.AutoSlots.__new__(mcs, name, bases, attrs) @classmethod def _GetSlots(mcs, attrs): @@ -457,7 +457,7 @@ class _AutoOpParamSlots(objectutils.AutoSlots): return [pname for (pname, _, _, _) in params] -class BaseOpCode(objectutils.ValidatedSlots): +class BaseOpCode(outils.ValidatedSlots): """A simple serializable object. This object serves as a parent class for OpCode without any custom diff --git a/lib/objectutils.py b/lib/outils.py similarity index 100% rename from lib/objectutils.py rename to lib/outils.py diff --git a/test/py/ganeti.objectutils_unittest.py b/test/py/ganeti.outils_unittest.py similarity index 87% rename from test/py/ganeti.objectutils_unittest.py rename to test/py/ganeti.outils_unittest.py index aa3a20515d698ec91c36e3fd883b2a0095102942..93f521287224b684dcfbaaa5c0de640c184ed9ed 100755 --- a/test/py/ganeti.objectutils_unittest.py +++ b/test/py/ganeti.outils_unittest.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -# Copyright (C) 2012 Google Inc. +# Copyright (C) 2012, 2013 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,17 +19,17 @@ # 02110-1301, USA. -"""Script for unittesting the objectutils module""" +"""Script for unittesting the outils module""" import unittest -from ganeti import objectutils +from ganeti import outils import testutils -class SlotsAutoSlot(objectutils.AutoSlots): +class SlotsAutoSlot(outils.AutoSlots): @classmethod def _GetSlots(mcs, attr): return attr["SLOTS"]