Add check for dashes in template name

Added filter for '-' sign in hot packages name since classes with
that name is not appropriate and won't be uploaded

Change-Id: Ic167909cb25afe79bbdff80f5ad8a9cd761e4023
Closes-Bug: #1469174
This commit is contained in:
Dmytro Dovbii 2015-08-11 19:18:46 +03:00
parent 8406f40fa8
commit 0844f0158f
1 changed files with 2 additions and 2 deletions

View File

@ -38,8 +38,8 @@ def generate_manifest(args):
args.name = os.path.splitext(filename)[0]
if not args.full_name:
prefix = 'io.murano.apps.generated'
# normalized_name = re.sub(r'\W+', '_', args.name).title()
normalized_name = args.name.replace('_', ' ').title().replace(' ', '')
normalized_name = args.name.replace('_', ' ').replace('-', ' ')
normalized_name = normalized_name.title().replace(' ', '')
args.full_name = '{0}.{1}'.format(prefix, normalized_name)
try:
with open(args.template) as heat_file: