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
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
b35ab356
Commit
b35ab356
authored
Jul 08, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check property the positional arguments of slapos-request.
parent
700051f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
slapos/console.py
slapos/console.py
+12
-1
No files found.
slapos/console.py
View file @
b35ab356
...
@@ -64,6 +64,17 @@ class Parser(OptionParser):
...
@@ -64,6 +64,17 @@ class Parser(OptionParser):
return
options
,
args
return
options
,
args
class
RequestParser
(
Parser
):
def
check_args
(
self
):
"""
Check arguments
"""
(
options
,
args
)
=
Parser
.
check_args
(
self
)
if
len
(
args
)
<
3
:
self
.
error
(
"Incorrect number of arguments"
)
return
options
,
args
class
Config
:
class
Config
:
def
setConfig
(
self
,
option_dict
,
configuration_file_path
):
def
setConfig
(
self
,
option_dict
,
configuration_file_path
):
"""
"""
...
@@ -129,7 +140,7 @@ def request():
...
@@ -129,7 +140,7 @@ def request():
usage
=
"""usage: %s [options] CONFIGURATION_FILE SOFTWARE_INSTANCE INSTANCE_REFERENCE
usage
=
"""usage: %s [options] CONFIGURATION_FILE SOFTWARE_INSTANCE INSTANCE_REFERENCE
slapos-request allows you to request slapos instances."""
%
sys
.
argv
[
0
]
slapos-request allows you to request slapos instances."""
%
sys
.
argv
[
0
]
config
=
Config
()
config
=
Config
()
options
,
arguments
=
Parser
(
usage
=
usage
).
check_args
()
options
,
arguments
=
Request
Parser
(
usage
=
usage
).
check_args
()
config
.
setConfig
(
options
,
arguments
[
0
])
config
.
setConfig
(
options
,
arguments
[
0
])
local
=
init
(
config
)
local
=
init
(
config
)
...
...
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