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
Boxiang Sun
slapos.core
Commits
e0938d52
Commit
e0938d52
authored
Sep 20, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add safety checks before calling SlapOS Master
parent
5889f688
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
slapos/slap/slap.py
slapos/slap/slap.py
+13
-1
No files found.
slapos/slap/slap.py
View file @
e0938d52
...
...
@@ -553,7 +553,15 @@ class ConnectionHelper:
return
xml_marshaller
.
loads
(
self
.
response
.
read
())
def
getFullComputerInformation
(
self
,
computer_id
):
self
.
GET
(
'/getFullComputerInformation?computer_id=%s'
%
computer_id
)
"""
Retrieve from SlapOS Master Computer instance containing all needed
informations (Software Releases, Computer Partitions, ...).
"""
method
=
'/getFullComputerInformation?computer_id=%s'
%
computer_id
if
not
computer_id
:
# XXX-Cedric: should raise something smarter than "NotFound".
raise
NotFoundError
(
method
)
self
.
GET
(
method
)
return
xml_marshaller
.
loads
(
self
.
response
.
read
())
def
connect
(
self
):
...
...
@@ -677,6 +685,10 @@ class slap:
Registers connected representation of computer partition and
returns Computer Partition class object
"""
if
not
computer_guid
or
not
partition_id
:
# XXX-Cedric: should raise something smarter than NotFound
raise
NotFoundError
self
.
_connection_helper
.
GET
(
'/registerComputerPartition?'
\
'computer_reference=%s&computer_partition_reference=%s'
%
(
computer_guid
,
partition_id
))
...
...
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