Commit 473d87a3 authored by Iustin Pop's avatar Iustin Pop

Rename lib/objectutils to outils.py

Back when this was introduced, I mentioned that it breaks heavily tab
completion (ob<TAB> doesn't work anymore), but at that moment I didn't
have a suggestion what to name it. I think outils is good and short
enough, and doesn't conflict with anything else, so here it goes.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parent bfb1d750
......@@ -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 \
......
#
#
# 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()
......
#
#
# 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:
......
#
#
# 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
......
#!/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"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment