DCOS-308 Make help more useful

This commit is contained in:
Sunil Shah
2015-02-20 13:35:18 -08:00
parent ed6215ad39
commit f88d72d94e
5 changed files with 22 additions and 13 deletions

View File

@@ -133,7 +133,7 @@ def _info():
:rtype: int
"""
emitter.publish('Deploy and manage applications on Apache Mesos')
emitter.publish('Deploy and manage applications on the DCOS')
return 0

View File

@@ -31,8 +31,15 @@ def main():
if args['help'] and args['info']:
emitter.publish('Display usage information')
# Note: this covers --all. When --all is different,
# Note: this covers --all also.
# Eventually we will only show commonly used commands for help
# and use --all to show, well, all commands.
elif args['help']:
emitter.publish(
"Command line utility for the Mesosphere DataCenter Operating "
"System (DCOS). The Mesosphere DCOS is a distributed operating "
"system built around Apache Mesos. This utility provides tools "
"for easy management of a DCOS installation.\n")
directory = _binary_directory(os.environ[constants.DCOS_PATH_ENV])
emitter.publish("Available DCOS commands in '{}':".format(directory))
emitter.publish(
@@ -41,7 +48,7 @@ def main():
_extract_subcommands(
_list_subcommand_programs(directory)))))
emitter.publish(
"\nGet detail command description with 'dcos <command> --help'.")
"\nGet detailed command description with 'dcos <command> --help'.")
return 0
else:

View File

@@ -60,7 +60,7 @@ def test_info():
returncode, stdout, stderr = exec_command(['dcos', 'app', 'info'])
assert returncode == 0
assert stdout == b'Deploy and manage applications on Apache Mesos\n'
assert stdout == b'Deploy and manage applications on the DCOS\n'
assert stderr == b''

View File

@@ -39,14 +39,19 @@ def test_list_all():
returncode, stdout, stderr = exec_command(['dcos', 'help', '--all'])
assert returncode == 0
assert stdout == """Available DCOS commands in '{}':
assert stdout == """Command line utility for \
the Mesosphere DataCenter Operating System (DCOS). The Mesosphere DCOS is \
a distributed operating system built around Apache Mesos. This utility \
provides tools for easy management of a DCOS installation.
\tapp \tDeploy and manage applications on Apache Mesos
Available DCOS commands in '{}':
\tapp \tDeploy and manage applications on the DCOS
\tconfig \tGet and set DCOS command line options
\thelp \tDisplay usage information
\tmarathon \tDeploy and manage applications on Apache Mesos
\tpackage \tInstall and manage DCOS software packages
Get detail command description with 'dcos <command> --help'.
Get detailed command description with 'dcos <command> --help'.
""".format(os.path.join(os.environ['DCOS_PATH'], 'bin')).encode('utf-8')
assert stderr == b''

View File

@@ -1,9 +1,6 @@
[package]
cache = "tmp/cache"
sources = [
"git://github.com/mesosphere/universe.git",
"https://github.com/mesosphere/universe/archive/master.zip"
]
[marathon]
host = "localhost"
port = 8080
[package]
sources = [ "git://github.com/mesosphere/universe.git", "https://github.com/mesosphere/universe/archive/master.zip",]
cache = "tmp/cache"