Update sync_deploymnet_tasks messages

The help message for sync-deployment-tasks does a poor job showing
the relation between the release string and the necessary directory
structure to function.

At the same time, the message for when tasks where not found for a
release implies that there is a problem that must be resolved.

Here we update the strings to hopfully be more clear about what
is going on.

Change-Id: Ib5465709aaed7ac461b75f60a0849fbae11d482d
Closes-bug: #1546321
This commit is contained in:
Andrew Woodward
2016-02-16 14:24:34 -08:00
committed by Andrew Woodward
parent 0b2fc6a500
commit 6eb94d3c0a

View File

@@ -129,18 +129,20 @@ class ReleaseAction(Action):
@check_all("dir")
def sync_deployment_tasks(self, params):
"""Upload tasks for different releases based on directories.
Unique identifier of the release should in the path, like:
The string identifier for the release(s) to update is expected to be
found in the path (see `fuel release`), like:
/etc/puppet/2014.2-6.0/
/etc/puppet/<release>/
/etc/puppet/liberty-9.0
fuel rel --sync-deployment-tasks --dir /etc/puppet/2014.2-6.0/
fuel rel --sync-deployment-tasks --dir /etc/puppet/liberty-9.0/
fuel rel --sync-deployment-tasks --fp '*tasks.yaml'
In case no directory will be provided:
In case no directory was provided:
fuel rel --sync-deployment-tasks
Current directory will be used
The current directory will be used
"""
all_rels = Release.get_all_data()
real_path = os.path.realpath(params.dir)
@@ -162,5 +164,9 @@ class ReleaseAction(Action):
" {0} of version {1}".format(rel['name'],
rel['version']))
else:
print("No tasks found for release {0} "
"of version {1}".format(rel['name'], rel['version']))
print("No tasks were synchronized for release {0} "
"of version {1}.(Hint: nothing matched "
"{2}/{1}/{3})".format(rel['name'],
rel['version'],
real_path,
params.filepattern))