Commit 5a4a338f authored by Marco Mariani's avatar Marco Mariani

removed explicit (and useless) 'usage' strings

parent e4445111
...@@ -3,37 +3,36 @@ ...@@ -3,37 +3,36 @@
import argparse import argparse
import os import os
import sys import sys
import textwrap
from slapos.client import ClientConfig, init, do_console from slapos.client import ClientConfig, init, do_console
from slapos.cli_legacy.util import get_config_parser from slapos.cli_legacy.util import get_config_parser
def console(): def console():
usage = """usage: %s [options] CONFIGURATION_FILE description = textwrap.dedent("""\
slapconsole allows you interact with slap API. You can play with the global slapconsole allows you interact with slap API. You can play with the global
"slap" object and with the global "request" method. "slap" object and with the global "request" method.
examples : examples :
>>> # Request instance >>> # Request instance
>>> request(kvm, "myuniquekvm") >>> request(kvm, "myuniquekvm")
>>> # Request software installation on owned computer >>> # Request software installation on owned computer
>>> supply(kvm, "mycomputer") >>> supply(kvm, "mycomputer")
>>> # Fetch instance informations on already launched instance >>> # Fetch instance informations on already launched instance
>>> request(kvm, "myuniquekvm").getConnectionParameter("url")""" % sys.argv[0] >>> request(kvm, "myuniquekvm").getConnectionParameter("url")""")
ap = argparse.ArgumentParser(usage=usage) ap = argparse.ArgumentParser(description=description,
formatter_class=argparse.RawDescriptionHelpFormatter)
ap.add_argument('-u', '--master_url', ap.add_argument('-u', '--master_url',
default=None, default=None,
action="store",
help='Url of SlapOS Master to use.') help='Url of SlapOS Master to use.')
ap.add_argument('-k', '--key_file', ap.add_argument('-k', '--key_file',
action="store",
help="SSL Authorisation key file.") help="SSL Authorisation key file.")
ap.add_argument('-c', '--cert_file', ap.add_argument('-c', '--cert_file',
action="store",
help="SSL Authorisation certificate file.") help="SSL Authorisation certificate file.")
ap.add_argument('configuration_file', ap.add_argument('configuration_file',
......
...@@ -38,7 +38,7 @@ from slapos.format import FormatConfig, UsageError, tracing_monkeypatch, do_form ...@@ -38,7 +38,7 @@ from slapos.format import FormatConfig, UsageError, tracing_monkeypatch, do_form
def main(*args): def main(*args):
"Run default configuration." "Run default configuration."
ap = argparse.ArgumentParser(usage='usage: %s [options] CONFIGURATION_FILE' % sys.argv[0]) ap = argparse.ArgumentParser()
ap.add_argument('-x', '--computer_xml', ap.add_argument('-x', '--computer_xml',
help="Path to file with computer's XML. If does not exists, will be created", help="Path to file with computer's XML. If does not exists, will be created",
......
...@@ -35,7 +35,7 @@ from slapos.register.register import do_register, RegisterConfig ...@@ -35,7 +35,7 @@ from slapos.register.register import do_register, RegisterConfig
def main(): def main():
ap = argparse.ArgumentParser(usage='usage: slapos node %s NODE_NAME [options]' % sys.argv[0]) ap = argparse.ArgumentParser()
ap.add_argument('node_name', ap.add_argument('node_name',
help='Name of the node') help='Name of the node')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment