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

removed explicit (and useless) 'usage' strings

parent e4445111
......@@ -3,37 +3,36 @@
import argparse
import os
import sys
import textwrap
from slapos.client import ClientConfig, init, do_console
from slapos.cli_legacy.util import get_config_parser
def console():
usage = """usage: %s [options] CONFIGURATION_FILE
slapconsole allows you interact with slap API. You can play with the global
"slap" object and with the global "request" method.
description = textwrap.dedent("""\
slapconsole allows you interact with slap API. You can play with the global
"slap" object and with the global "request" method.
examples :
>>> # Request instance
>>> request(kvm, "myuniquekvm")
>>> # Request software installation on owned computer
>>> supply(kvm, "mycomputer")
>>> # Fetch instance informations on already launched instance
>>> request(kvm, "myuniquekvm").getConnectionParameter("url")""" % sys.argv[0]
examples :
>>> # Request instance
>>> request(kvm, "myuniquekvm")
>>> # Request software installation on owned computer
>>> supply(kvm, "mycomputer")
>>> # Fetch instance informations on already launched instance
>>> 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',
default=None,
action="store",
help='Url of SlapOS Master to use.')
ap.add_argument('-k', '--key_file',
action="store",
help="SSL Authorisation key file.")
ap.add_argument('-c', '--cert_file',
action="store",
help="SSL Authorisation certificate file.")
ap.add_argument('configuration_file',
......
......@@ -38,7 +38,7 @@ from slapos.format import FormatConfig, UsageError, tracing_monkeypatch, do_form
def main(*args):
"Run default configuration."
ap = argparse.ArgumentParser(usage='usage: %s [options] CONFIGURATION_FILE' % sys.argv[0])
ap = argparse.ArgumentParser()
ap.add_argument('-x', '--computer_xml',
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
def main():
ap = argparse.ArgumentParser(usage='usage: slapos node %s NODE_NAME [options]' % sys.argv[0])
ap = argparse.ArgumentParser()
ap.add_argument('node_name',
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