Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos
Commits
807347f9
Commit
807347f9
authored
Jan 09, 2012
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the ability to get the partition and computer id of request result.
parent
7e9d26d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
slapos/recipe/request.py
slapos/recipe/request.py
+14
-0
No files found.
slapos/recipe/request.py
View file @
807347f9
...
...
@@ -88,9 +88,23 @@ class Recipe(object):
if
self
.
failed
is
None
:
self
.
failed
=
param
# XXX XXX XXX: Return the computer id et partition id in order to
# register it later.
self
.
partition_allocated
=
False
options
[
'computer-id'
]
=
''
options
[
'partition-id'
]
=
''
if
instance
.
_computer_id
is
not
None
:
self
.
partition_allocated
=
True
options
[
'computer-id'
]
=
instance
.
_computer_id
if
instance
.
_partition_id
is
not
None
:
self
.
partition_allocated
=
self
.
partition_allocated
and
True
options
[
'partition-id'
]
=
instance
.
_partition_id
def
install
(
self
):
if
self
.
failed
is
not
None
:
raise
KeyError
(
"Connection parameter %r not found."
%
self
.
failed
)
if
not
self
.
partition_allocated
:
raise
ValueError
(
"The computer partition is not allocated yet."
)
return
[]
update
=
install
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