DCOS-308 Make help more useful
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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''
|
||||
|
||||
|
||||
|
||||
@@ -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''
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user