Skip to content

Commit

Permalink
Warn, don't error, when setting job-specific properties or resource c…
Browse files Browse the repository at this point in the history
…onfig on PCF < 1.8.
  • Loading branch information
mboldt committed Oct 19, 2016
1 parent 7ab07fc commit 88c9a6f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tile_generator/opsmgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,11 @@ def configure(product, properties, strict=False):
put_json(url + '/jobs/' + job_guid + '/resource_config', merged_job_resource_config)
elif version[:2] == [1, 7] or version[:2] == [1, 6]:
if job_properties:
print('Setting job-specific properties is only supported for PCF 1.8+', file=sys.stderr)
sys.exit(1)
print('Warning: setting job-specific properties is only supported for PCF 1.8+', file=sys.stderr)
print(' job-specific properties will not be set', file=sys.stderr)
if resource_config:
print('Warning: setting job resource config is only supported for PCF 1.8+', file=sys.stderr)
print(' job resource config will not be set', file=sys.stderr)
post_yaml('/api/installation_settings', 'installation[file]', settings)
else:
print("PCF version ({}) is unsupported, but we'll give it a try".format('.'.join(str(x) for x in version)))
Expand Down

0 comments on commit 88c9a6f

Please sign in to comment.