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
Lisa Casino
slapos.core
Commits
7ff5e4cc
Commit
7ff5e4cc
authored
Jun 29, 2011
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapconsole : add usage, check argument numbers, add comment
parent
5a27734f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
slapos/console.py
slapos/console.py
+5
-3
No files found.
slapos/console.py
View file @
7ff5e4cc
...
...
@@ -59,8 +59,8 @@ class Parser(OptionParser):
Check arguments
"""
(
options
,
args
)
=
self
.
parse_args
()
#if len(args) != 1
:
#
self.error("Incorrect number of arguments")
if
len
(
args
)
==
0
:
self
.
error
(
"Incorrect number of arguments"
)
return
options
,
args
...
...
@@ -134,6 +134,7 @@ slapos-request allows you to request slapos instances.""" % sys.argv[0]
print
(
"Instance requested.
\
n
State is : %s.
\
n
You can "
"rerun to get up-to-date informations."
%
(
partition
.
getState
()))
# XXX-Cedric : provide a way for user to fetch parameter, url, object, etc
except
ResourceNotReady
:
print
(
"Instance requested. Master is provisionning it. Please rerun in a "
"couple of minutes to get connection informations"
)
...
...
@@ -142,7 +143,8 @@ slapos-request allows you to request slapos instances.""" % sys.argv[0]
def
run
():
"""Ran when invoking slapconsole"""
# Parse arguments
usage
=
"usage: %s [options] CONFIGURATION_FILE"
%
sys
.
argv
[
0
]
usage
=
"""usage: %s [options] CONFIGURATION_FILE
slapconsole allows you interact with slap API."""
%
sys
.
argv
[
0
]
config
=
Config
()
config
.
setConfig
(
*
Parser
(
usage
=
usage
).
check_args
())
...
...
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