Disallow "/" in domain names
PATCH 1/1 Disallow "/" in domain names
Hi,
"/" cannot be included in domain names.
This patch disallow "/" in domain names.
# xm new vm.conf name=vm_-.:/+ Using config file "./vm.conf". # xm list Name ID Mem VCPUs State Time(s) Domain-0 0 1024 4 r----- 1886.1 vm_-.:/+ 1024 1 0.0 # xm start vm_-.:/+ Error: [Errno 2] No such file or directory: '/var/log/xen/qemu-dm-vm_-.:/+.log' Usage: xm start <DomainName>
Start a Xend managed domain
-p, --paused Do not unpause domain after starting it
-c, --console_autoconnect Connect to the console after the domain
is created
--vncviewer Connect to display via VNC after the
domain is created
--vncviewer-autopass Pass VNC password to viewer via stdin and
-autopass
Signed-off-by Masaki Kanno <[email protected]>
Best regards,
Kan
tools/python/xen/xend/XendDomainInfo.py +2 -2
@@ -3472,7 +3472,7 @@ def _checkName(self, name): """Check if a vm name is valid. Valid names contain alphabetic - characters, digits, or characters in '_-.:/+'. + characters, digits, or characters in '_-.:+'. The same name cannot be used for more than one vm at the same time. @param name: name
@@ -3483,7 +3483,7 @@ if name is None or name == '': raise VmError('Missing VM Name') - if not re.search(r'^[A-Za-z0-9_\-\.\:\/\+]+$', name): + if not re.search(r'^[A-Za-z0-9_\-\.\:\+]+$', name): raise VmError('Invalid VM Name') dom = XendDomain.instance().domain_lookup_nr(name)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel