Merge pull request #3421 from svanharmelen/f-cloudstack-unlimited

provider/cloudstack: fix regexp
This commit is contained in:
Sander van Harmelen 2015-10-06 14:52:36 +02:00
commit 040b9dc4b1

View File

@ -121,7 +121,7 @@ func retrieveTemplateID(cs *cloudstack.CloudStackClient, zoneid, value string) (
// ID can be either a UUID or a UnlimitedResourceID
func isID(id string) bool {
re := regexp.MustCompile(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|-1$`)
re := regexp.MustCompile(`^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|-1)$`)
return re.MatchString(id)
}