Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
slapos.core
Commits
5a4a338f
Commit
5a4a338f
authored
Apr 30, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed explicit (and useless) 'usage' strings
parent
e4445111
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
16 deletions
+15
-16
slapos/cli_legacy/console.py
slapos/cli_legacy/console.py
+13
-14
slapos/cli_legacy/format.py
slapos/cli_legacy/format.py
+1
-1
slapos/cli_legacy/register.py
slapos/cli_legacy/register.py
+1
-1
No files found.
slapos/cli_legacy/console.py
View file @
5a4a338f
...
...
@@ -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'
,
...
...
slapos/cli_legacy/format.py
View file @
5a4a338f
...
...
@@ -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"
,
...
...
slapos/cli_legacy/register.py
View file @
5a4a338f
...
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment