LGTM, thanks On Mon, 27 Apr 2015 at 10:40 'Klaus Aehlig' via ganeti-devel < [email protected]> wrote:
> AssignUuid used to be a top-level definition, hence could > also reference themselves by name. Now they are part of > a class and hence need to be referenced that way. > > Signed-off-by: Klaus Aehlig <[email protected]> > --- > lib/tools/cfgupgrade.py | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/lib/tools/cfgupgrade.py b/lib/tools/cfgupgrade.py > index 9e0022a..efa6ac2 100644 > --- a/lib/tools/cfgupgrade.py > +++ b/lib/tools/cfgupgrade.py > @@ -389,12 +389,13 @@ class CfgUpgrade(object): > " Substituting with uuid %s." % (name, uuid)) > nic["network"] = uuid > > - def AssignUuid(disk): > + @classmethod > + def AssignUuid(cls, disk): > if not "uuid" in disk: > disk["uuid"] = utils.io.NewUUID() > if "children" in disk: > for d in disk["children"]: > - AssignUuid(d) > + cls.AssignUuid(d) > > def _ConvertDiskAndCheckMissingSpindles(self, iobj, instance): > missing_spindles = False > @@ -420,7 +421,7 @@ class CfgUpgrade(object): > if not "spindles" in dobj: > missing_spindles = True > > - AssignUuid(dobj) > + self.AssignUuid(dobj) > return missing_spindles > > @OrFail("Upgrading instance with spindles") > -- > 2.2.0.rc0.207.ga3a616c > >
