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
Léo-Paul Géneau
slapos.core
Commits
f8011935
Commit
f8011935
authored
Jun 23, 2011
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Draft : print informations about requested instance
parent
059c092c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
slapos/console.py
slapos/console.py
+8
-5
No files found.
slapos/console.py
View file @
f8011935
...
@@ -103,13 +103,15 @@ def init(config):
...
@@ -103,13 +103,15 @@ def init(config):
software_list
.
append
(
name
)
software_list
.
append
(
name
)
local
[
name
]
=
url
local
[
name
]
=
url
local
[
'software_list'
]
=
software_list
local
[
'software_list'
]
=
software_list
local
[
'request'
]
=
lambda
software_release
,
reference
:
slap
.
registerOpenOrder
().
request
(
software_release
,
reference
)
local
[
'request'
]
=
lambda
software_release
,
reference
:
\
slap
.
registerOpenOrder
().
request
(
software_release
,
reference
)
return
local
return
local
def
request
():
def
request
():
"""Ran when invoking slapos-request"""
"""Ran when invoking slapos-request"""
# Parse arguments
# Parse arguments
usage
=
"usage: %s [options] CONFIGURATION_FILE"
%
sys
.
argv
[
0
]
usage
=
"""usage: %s [options] CONFIGURATION_FILE SOFTWARE_INSTANCE INSTANCE_REFERENCE
slapos-request allows you to request slapos instances."""
%
sys
.
argv
[
0
]
config
=
Config
()
config
=
Config
()
arguments
=
Parser
(
usage
=
usage
).
check_args
()[
1
]
arguments
=
Parser
(
usage
=
usage
).
check_args
()[
1
]
config
.
setConfig
(
*
Parser
(
usage
=
usage
).
check_args
())
config
.
setConfig
(
*
Parser
(
usage
=
usage
).
check_args
())
...
@@ -125,9 +127,10 @@ def request():
...
@@ -125,9 +127,10 @@ def request():
print
(
"Requesting %s..."
%
software_url
)
print
(
"Requesting %s..."
%
software_url
)
if
software_url
in
local
:
if
software_url
in
local
:
software_url
=
local
[
software_url
]
software_url
=
local
[
software_url
]
local
[
'slap'
].
registerOpenOrder
().
request
(
software_url
,
partition_reference
)
partition
=
local
[
'slap'
].
registerOpenOrder
().
request
(
software_url
,
partition_reference
)
print
(
"done."
)
# XXX-Cedric : provide a way to get informations about instance
print
(
"Instance requested."
)
def
run
():
def
run
():
"""Ran when invoking slapconsole"""
"""Ran when invoking slapconsole"""
...
...
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