+ return Template(file="command.tmpl", searchList=[d, global_dict])
+
+def testOwner(user, owner, machine=None):
+ if owner != user.username:
+ raise InvalidInput('owner', owner,
+ "Invalid")
+ return owner
+
+def testContact(user, contact, machine=None):
+ if contact != user.email:
+ raise InvalidInput('contact', contact,
+ "Invalid")
+ return contact
+
+def testHostname(user, hostname, machine):
+ for nic in machine.nics:
+ if hostname == nic.hostname:
+ return hostname
+ raise InvalidInput('hostname', hostname,
+ "Different from before")
+
+