Revision 473d87a3 lib/opcodes.py
b/lib/opcodes.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
41 | 41 |
from ganeti import errors |
42 | 42 |
from ganeti import ht |
43 | 43 |
from ganeti import objects |
44 |
from ganeti import objectutils
|
|
44 |
from ganeti import outils |
|
45 | 45 |
|
46 | 46 |
|
47 | 47 |
# Common opcode attributes |
... | ... | |
417 | 417 |
_TMaybeAddr4List = ht.TMaybe(ht.TListOf(_TIpAddress4)) |
418 | 418 |
|
419 | 419 |
|
420 |
class _AutoOpParamSlots(objectutils.AutoSlots):
|
|
420 |
class _AutoOpParamSlots(outils.AutoSlots): |
|
421 | 421 |
"""Meta class for opcode definitions. |
422 | 422 |
|
423 | 423 |
""" |
... | ... | |
443 | 443 |
|
444 | 444 |
attrs["OP_ID"] = _NameToId(name) |
445 | 445 |
|
446 |
return objectutils.AutoSlots.__new__(mcs, name, bases, attrs)
|
|
446 |
return outils.AutoSlots.__new__(mcs, name, bases, attrs) |
|
447 | 447 |
|
448 | 448 |
@classmethod |
449 | 449 |
def _GetSlots(mcs, attrs): |
... | ... | |
457 | 457 |
return [pname for (pname, _, _, _) in params] |
458 | 458 |
|
459 | 459 |
|
460 |
class BaseOpCode(objectutils.ValidatedSlots):
|
|
460 |
class BaseOpCode(outils.ValidatedSlots): |
|
461 | 461 |
"""A simple serializable object. |
462 | 462 |
|
463 | 463 |
This object serves as a parent class for OpCode without any custom |
Also available in: Unified diff