return disksize
def testName(user, name, machine=None):
- return name
+ if Machine.select_by(name=name) == []:
+ return name
+ raise InvalidInput('name', name,
+ "Already taken")
def testHostname(user, hostname, machine):
for nic in machine.nics:
transaction.commit()
except:
transaction.rollback()
+ raise
remctl("web", "moveregister", oldname, name)
for disk in machine.disks:
# XXX all disks get the same size on change? Interface doesn't support more.