Skip to content

Commit

Permalink
Closes-Bug: #1714469
Browse files Browse the repository at this point in the history
Image id cannot have capital letters anywhere in it

Change-Id: Ia7970f1ed126da6b277449b48cb588a6b68bedd6
  • Loading branch information
sgurumurthy committed Sep 5, 2017
1 parent 4d805e4 commit 4251b32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server_mgr_main.py
Expand Up @@ -136,7 +136,7 @@
_ENABLE_NEW_PUPPET_FRAMEWORK = True
_ERR_INVALID_CONTRAIL_PKG = 'Invalid contrail package. Please specify a valid package'
_ERR_OPENSTACK_SKU_NEEDED = 'openstack_sku image parameter has to be specified in the json file'
_ERR_INVALID_IMAGE_ID = 'Invalid image id. The image id cannot begin with a number and can contain only alphanumeric and _ characters in it'
_ERR_INVALID_IMAGE_ID = 'Invalid image id. The image id cannot begin with a number, cannot contain capital letters and can contain only alphanumeric and _ characters in it'
DEFAULT_PATH_LSTOPO_XML='/var/www/html/contrail/lstopo/'


Expand Down Expand Up @@ -1976,7 +1976,7 @@ def is_valid_imageid(self, image_id, image_type):
if not pattern.match(image_id):
return False
if (image_type == "contrail-ubuntu-package" or image_type == "contrail-centos-package"):
pattern = re.compile("[a-zA-Z0-9_]*$")
pattern = re.compile("[a-z0-9_]*$")
if not pattern.match(image_id):
return False
return True
Expand Down

0 comments on commit 4251b32

Please sign in to comment.