Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1504 from blrm/template_names
Browse files Browse the repository at this point in the history
template_uploader name fix
  • Loading branch information
seandst committed Jan 9, 2015
2 parents b72b940 + 47ce3e9 commit 27224cf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/template_upload_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ def parse_cmd_line():
return args


def template_name(image_link, image_ts, version=None):
def template_name(image_link, image_ts, checksum_link, version=None):
pattern = re.compile(r'.*/(.*)')
image_name = pattern.findall(image_link)[0]
image_name = image_name.lower()
image_dt = get_last_modified(image_link)
image_dt = get_last_modified(checksum_link)
# CFME brew builds
if CFME_BREW_ID in image_name:
if version:
Expand Down Expand Up @@ -268,6 +268,8 @@ def browse_directory(dir_url):
module = 'template_upload_vsphere'
if module not in dir_files.iterkeys():
continue
if provider == "vsphere4":
continue
kwargs = make_kwargs_vsphere(cfme_data, provider)

if kwargs:
Expand All @@ -277,7 +279,9 @@ def browse_directory(dir_url):
kwargs['template_name'] = template_name(
dir_files[module],
dir_files[module + "_date"],
get_version(url))
url + "checksums",
get_version(url)
)

print "---Start of %s: %s---" % (module, provider)

Expand Down

0 comments on commit 27224cf

Please sign in to comment.