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
Carlos Ramos Carreño
slapos.core
Commits
5a27734f
Commit
5a27734f
authored
Jun 24, 2011
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos-request : Add help when requesting and resource is not ready
parent
f8011935
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
slapos/console.py
slapos/console.py
+12
-5
No files found.
slapos/console.py
View file @
5a27734f
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
##############################################################################
##############################################################################
import
slapos.slap.slap
import
slapos.slap.slap
from
slapos.slap
import
ResourceNotReady
import
sys
import
sys
from
optparse
import
OptionParser
,
Option
from
optparse
import
OptionParser
,
Option
...
@@ -104,7 +105,7 @@ def init(config):
...
@@ -104,7 +105,7 @@ def init(config):
local
[
name
]
=
url
local
[
name
]
=
url
local
[
'software_list'
]
=
software_list
local
[
'software_list'
]
=
software_list
local
[
'request'
]
=
lambda
software_release
,
reference
:
\
local
[
'request'
]
=
lambda
software_release
,
reference
:
\
slap
.
registerOpenOrder
().
request
(
software_release
,
reference
)
slap
.
registerOpenOrder
().
request
(
software_release
,
reference
)
return
local
return
local
def
request
():
def
request
():
...
@@ -127,10 +128,16 @@ slapos-request allows you to request slapos instances.""" % sys.argv[0]
...
@@ -127,10 +128,16 @@ slapos-request allows you to request slapos instances.""" % sys.argv[0]
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
]
partition
=
local
[
'slap'
].
registerOpenOrder
().
request
(
software_url
,
try
:
partition_reference
)
partition
=
local
[
'slap'
].
registerOpenOrder
().
request
(
software_url
,
# XXX-Cedric : provide a way to get informations about instance
partition_reference
)
print
(
"Instance requested."
)
print
(
"Instance requested.
\
n
State is : %s.
\
n
You can "
"rerun to get up-to-date informations."
%
(
partition
.
getState
()))
except
ResourceNotReady
:
print
(
"Instance requested. Master is provisionning it. Please rerun in a "
"couple of minutes to get connection informations"
)
exit
(
2
)
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