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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
07305c70
Commit
07305c70
authored
Jan 31, 2025
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slap/slap.py: bang
parent
58ef43f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
slapos/slap/slap.py
slapos/slap/slap.py
+18
-7
No files found.
slapos/slap/slap.py
View file @
07305c70
...
...
@@ -431,9 +431,14 @@ class Computer(SlapDocument):
return
self
.
_connection_helper
.
POST
(
'loadComputerConfigurationFromXML'
,
data
=
{
'xml'
:
xml
})
def
bang
(
self
,
message
):
self
.
_connection_helper
.
POST
(
'computerBang'
,
data
=
{
'computer_id'
:
self
.
_computer_id
,
'message'
:
message
})
return
self
.
_connection_helper
.
callJsonRpcAPI
(
'slapos.put.compute_node'
,
{
"portal_type"
:
"Compute Node"
,
'computer_id'
:
self
.
_computer_id
,
'bang_status_message'
:
message
}
)
def
getStatus
(
self
):
xml
=
self
.
_connection_helper
.
GET
(
'getComputerStatus'
,
params
=
{
'computer_id'
:
self
.
_computer_id
})
...
...
@@ -606,10 +611,16 @@ class ComputerPartition(SlapRequester):
(
logger
or
fallback_logger
).
exception
(
''
)
def
bang
(
self
,
message
):
self
.
_connection_helper
.
POST
(
'softwareInstanceBang'
,
data
=
{
'computer_id'
:
self
.
_computer_id
,
'computer_partition_id'
:
self
.
getId
(),
'message'
:
message
})
return
self
.
_connection_helper
.
callJsonRpcAPI
(
'slapos.put.software_instance'
,
{
"portal_type"
:
"Software Instance"
,
'computer_id'
:
self
.
_computer_id
,
'computer_partition_id'
:
self
.
getId
(),
'reported_state'
:
'bang'
,
'status_message'
:
message
}
)
def
rename
(
self
,
new_name
,
slave_reference
=
None
):
post_dict
=
{
...
...
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