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
Łukasz Nowak
slapos.core
Commits
cd4146d6
Commit
cd4146d6
authored
Jul 12, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow updated docs: do not require Accept header.
parent
b80d2591
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
12 deletions
+5
-12
master/bt5/vifib_slapos_rest_api_v1/DocumentTemplateItem/portal_components/VifibRestAPIV1.py
.../DocumentTemplateItem/portal_components/VifibRestAPIV1.py
+4
-11
master/bt5/vifib_slapos_rest_api_v1/bt/revision
master/bt5/vifib_slapos_rest_api_v1/bt/revision
+1
-1
No files found.
master/bt5/vifib_slapos_rest_api_v1/DocumentTemplateItem/portal_components/VifibRestAPIV1.py
View file @
cd4146d6
...
...
@@ -254,8 +254,7 @@ class InstancePublisher(GenericPublisher):
"""Instance publisher"""
@
responseSupport
()
@
requireHeader
({
'Accept'
:
'application/json'
,
'Content-Type'
:
'^application/json.*'
})
@
requireHeader
({
'Content-Type'
:
'^application/json.*'
})
@
requireJson
(
dict
(
title
=
(
unicode
,
encode_utf8
),
connection
=
dict
...
...
@@ -290,8 +289,7 @@ class InstancePublisher(GenericPublisher):
self
.
REQUEST
.
response
.
setBody
(
jsonify
(
d
))
return
self
.
REQUEST
.
response
@
requireHeader
({
'Accept'
:
'application/json'
,
'Content-Type'
:
'^application/json.*'
})
@
requireHeader
({
'Content-Type'
:
'^application/json.*'
})
@
requireJson
(
dict
(
log
=
unicode
))
@
extractDocument
([
'Software Instance'
,
'Slave Instance'
])
def
__bang
(
self
):
...
...
@@ -308,8 +306,7 @@ class InstancePublisher(GenericPublisher):
self
.
REQUEST
.
response
.
setStatus
(
204
)
return
self
.
REQUEST
.
response
@
requireHeader
({
'Accept'
:
'application/json'
,
'Content-Type'
:
'^application/json.*'
})
@
requireHeader
({
'Content-Type'
:
'^application/json.*'
})
@
requireJson
(
dict
(
slave
=
bool
,
software_release
=
(
unicode
,
encode_utf8
),
...
...
@@ -353,7 +350,6 @@ class InstancePublisher(GenericPublisher):
self
.
REQUEST
.
response
.
setBody
(
jsonify
({
'status'
:
'processing'
}))
return
self
.
REQUEST
.
response
@
requireHeader
({
'Accept'
:
'application/json'
})
@
extractDocument
([
'Software Instance'
,
'Slave Instance'
])
@
supportModifiedSince
(
'document_url'
)
def
__instance_info
(
self
):
...
...
@@ -407,7 +403,6 @@ class InstancePublisher(GenericPublisher):
return
self
.
REQUEST
.
response
software_instance_module
=
'software_instance_module'
@
requireHeader
({
'Accept'
:
'application/json'
})
def
__instance_list
(
self
):
kw
=
dict
(
portal_type
=
(
'Software Instance'
,
'Slave Instance'
),
...
...
@@ -444,8 +439,7 @@ class InstancePublisher(GenericPublisher):
class
ComputerPublisher
(
GenericPublisher
):
@
responseSupport
()
@
requireHeader
({
'Accept'
:
'application/json'
,
'Content-Type'
:
'^application/json.*'
})
@
requireHeader
({
'Content-Type'
:
'^application/json.*'
})
@
extractDocument
(
'Computer'
)
@
requireJson
(
dict
(
partition
=
list
,
...
...
@@ -529,7 +523,6 @@ class VifibRestAPIV1(Implicit):
security
.
declarePublic
(
'__call__'
)
@
responseSupport
(
True
)
@
requireHeader
({
'Accept'
:
'application/json'
})
def
__call__
(
self
):
"""Possible API discovery"""
self
.
REQUEST
.
response
.
setStatus
(
400
)
...
...
master/bt5/vifib_slapos_rest_api_v1/bt/revision
View file @
cd4146d6
10
\ No newline at end of file
11
\ No newline at end of file
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