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
Guillaume Hervier
slapos.core
Commits
ef150497
Commit
ef150497
authored
Jul 13, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define REST API for software release
parent
c044d7bc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
18 deletions
+13
-18
slapos/proxy/views.py
slapos/proxy/views.py
+5
-10
slapos/slap/slap.py
slapos/slap/slap.py
+8
-8
No files found.
slapos/proxy/views.py
View file @
ef150497
...
...
@@ -97,19 +97,14 @@ def setComputerPartitionConnectionJson(computer_id, computer_partition_id):
execute_db
(
'partition'
,
query
,
argument_list
)
return
'done'
@
app
.
route
(
'/buildingSoftwareRelease'
,
methods
=
[
'POST'
])
def
buildingSoftwareRelease
():
return
'Ignored'
@
app
.
route
(
'/availableSoftwareRelease'
,
methods
=
[
'POST'
])
def
availableSoftwareRelease
():
computer_id
=
request
.
form
[
'computer_id'
]
@
app
.
route
(
'/<computer_id>/software/building'
,
methods
=
[
'POST'
])
@
app
.
route
(
'/<computer_id>/software/available'
,
methods
=
[
'POST'
])
def
software_release_ignored_api
(
computer_id
):
url
=
request
.
form
[
'url'
]
return
'Ignored'
@
app
.
route
(
'/softwareReleaseError'
,
methods
=
[
'POST'
])
def
softwareReleaseError
():
return
'Ignored'
@
app
.
route
(
'/<computer_id>/software/error'
,
methods
=
[
'POST'
])
def
softwareReleaseError
(
computer_id
):
@
app
.
route
(
'/<computer_id>/partition/<computer_partition_id>/building'
,
methods
=
[
'POST'
])
def
buildingComputerPartition
(
computer_id
,
computer_partition_id
):
...
...
slapos/slap/slap.py
View file @
ef150497
...
...
@@ -107,23 +107,23 @@ class SoftwareRelease(SlapDocument):
def
error
(
self
,
error_log
):
# Does not follow interface
self
.
_connection_helper
.
POST
(
'/softwareReleaseError'
,
{
url
=
'%s/software/error'
%
self
.
_computer_guid
,
self
.
_connection_helper
.
POST
(
url
,
{
'url'
:
self
.
_software_release
,
'computer_id'
:
self
.
_computer_guid
,
'error_log'
:
error_log
})
def
getURI
(
self
):
return
self
.
_software_release
def
available
(
self
):
self
.
_connection_helper
.
POST
(
'/availableSoftwareRelease'
,
{
'url'
:
self
.
_software_release
,
'
computer_id'
:
self
.
_computer_guid
})
url
=
'%s/software/available'
%
self
.
_computer_guid
self
.
_connection_helper
.
POST
(
url
,
{
'
url'
:
self
.
_software_release
})
def
building
(
self
):
self
.
_connection_helper
.
POST
(
'/buildingSoftwareRelease'
,
{
'url'
:
self
.
_software_release
,
'
computer_id'
:
self
.
_computer_guid
})
url
=
'%s/software/building'
%
self
.
_computer_guid
self
.
_connection_helper
.
POST
(
url
,
{
'
url'
:
self
.
_software_release
})
"""Exposed exceptions"""
# XXX Why do we need to expose exceptions?
...
...
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