From b63f52dca1ed8503795e11b14af5e5cae54f74a2 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Tue, 13 Jan 2009 15:54:46 -0500 Subject: [PATCH] Update the nics.hostname field to keep it in sync with machine.name when VMs are renamed. svn path=/trunk/packages/invirt-web/; revision=1977 --- code/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/main.py b/code/main.py index 908d7cd..d9cc14c 100755 --- a/code/main.py +++ b/code/main.py @@ -379,6 +379,9 @@ def modifyDict(username, state, fields): update_acl = True if hasattr(validate, 'name'): machine.name = validate.name + for n in machine.nics: + if n.hostname == oldname: + n.hostname = validate.name if hasattr(validate, 'description'): machine.description = validate.description if hasattr(validate, 'admin') and validate.admin != machine.administrator: -- 1.7.9.5