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
Titouan Soulard
slapos.core
Commits
a7b153b8
Commit
a7b153b8
authored
Sep 13, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libslap: Raise if partition ID is not defined.
parent
96cb590f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
slapos/slap/slap.py
slapos/slap/slap.py
+10
-8
No files found.
slapos/slap/slap.py
View file @
a7b153b8
...
@@ -409,47 +409,47 @@ class ComputerPartition(SlapDocument):
...
@@ -409,47 +409,47 @@ class ComputerPartition(SlapDocument):
def
building
(
self
):
def
building
(
self
):
self
.
_connection_helper
.
POST
(
'/buildingComputerPartition'
,
{
self
.
_connection_helper
.
POST
(
'/buildingComputerPartition'
,
{
'computer_id'
:
self
.
_computer_id
,
'computer_id'
:
self
.
_computer_id
,
'computer_partition_id'
:
self
.
_partition_id
})
'computer_partition_id'
:
self
.
getId
()
})
def
available
(
self
):
def
available
(
self
):
self
.
_connection_helper
.
POST
(
'/availableComputerPartition'
,
{
self
.
_connection_helper
.
POST
(
'/availableComputerPartition'
,
{
'computer_id'
:
self
.
_computer_id
,
'computer_id'
:
self
.
_computer_id
,
'computer_partition_id'
:
self
.
_partition_id
})
'computer_partition_id'
:
self
.
getId
()
})
def
destroyed
(
self
):
def
destroyed
(
self
):
self
.
_connection_helper
.
POST
(
'/destroyedComputerPartition'
,
{
self
.
_connection_helper
.
POST
(
'/destroyedComputerPartition'
,
{
'computer_id'
:
self
.
_computer_id
,
'computer_id'
:
self
.
_computer_id
,
'computer_partition_id'
:
self
.
_partition_id
,
'computer_partition_id'
:
self
.
getId
()
,
})
})
def
started
(
self
):
def
started
(
self
):
self
.
_connection_helper
.
POST
(
'/startedComputerPartition'
,
{
self
.
_connection_helper
.
POST
(
'/startedComputerPartition'
,
{
'computer_id'
:
self
.
_computer_id
,
'computer_id'
:
self
.
_computer_id
,
'computer_partition_id'
:
self
.
_partition_id
,
'computer_partition_id'
:
self
.
getId
()
,
})
})
def
stopped
(
self
):
def
stopped
(
self
):
self
.
_connection_helper
.
POST
(
'/stoppedComputerPartition'
,
{
self
.
_connection_helper
.
POST
(
'/stoppedComputerPartition'
,
{
'computer_id'
:
self
.
_computer_id
,
'computer_id'
:
self
.
_computer_id
,
'computer_partition_id'
:
self
.
_partition_id
,
'computer_partition_id'
:
self
.
getId
()
,
})
})
def
error
(
self
,
error_log
):
def
error
(
self
,
error_log
):
self
.
_connection_helper
.
POST
(
'/softwareInstanceError'
,
{
self
.
_connection_helper
.
POST
(
'/softwareInstanceError'
,
{
'computer_id'
:
self
.
_computer_id
,
'computer_id'
:
self
.
_computer_id
,
'computer_partition_id'
:
self
.
_partition_id
,
'computer_partition_id'
:
self
.
getId
()
,
'error_log'
:
error_log
})
'error_log'
:
error_log
})
def
bang
(
self
,
message
):
def
bang
(
self
,
message
):
self
.
_connection_helper
.
POST
(
'/softwareInstanceBang'
,
{
self
.
_connection_helper
.
POST
(
'/softwareInstanceBang'
,
{
'computer_id'
:
self
.
_computer_id
,
'computer_id'
:
self
.
_computer_id
,
'computer_partition_id'
:
self
.
_partition_id
,
'computer_partition_id'
:
self
.
getId
()
,
'message'
:
message
})
'message'
:
message
})
def
rename
(
self
,
new_name
,
slave_reference
=
None
):
def
rename
(
self
,
new_name
,
slave_reference
=
None
):
post_dict
=
dict
(
post_dict
=
dict
(
computer_id
=
self
.
_computer_id
,
computer_id
=
self
.
_computer_id
,
computer_partition_id
=
self
.
_partition_id
,
computer_partition_id
=
self
.
getId
()
,
new_name
=
new_name
,
new_name
=
new_name
,
)
)
if
slave_reference
is
not
None
:
if
slave_reference
is
not
None
:
...
@@ -457,6 +457,8 @@ class ComputerPartition(SlapDocument):
...
@@ -457,6 +457,8 @@ class ComputerPartition(SlapDocument):
self
.
_connection_helper
.
POST
(
'/softwareInstanceRename'
,
post_dict
)
self
.
_connection_helper
.
POST
(
'/softwareInstanceRename'
,
post_dict
)
def
getId
(
self
):
def
getId
(
self
):
if
not
self
.
_partition_id
:
raise
ResourceNotReady
()
return
self
.
_partition_id
return
self
.
_partition_id
@
_syncComputerPartitionInformation
@
_syncComputerPartitionInformation
...
...
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