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
Thomas Gambier
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):
...
@@ -254,8 +254,7 @@ class InstancePublisher(GenericPublisher):
"""Instance publisher"""
"""Instance publisher"""
@
responseSupport
()
@
responseSupport
()
@
requireHeader
({
'Accept'
:
'application/json'
,
@
requireHeader
({
'Content-Type'
:
'^application/json.*'
})
'Content-Type'
:
'^application/json.*'
})
@
requireJson
(
dict
(
@
requireJson
(
dict
(
title
=
(
unicode
,
encode_utf8
),
title
=
(
unicode
,
encode_utf8
),
connection
=
dict
connection
=
dict
...
@@ -290,8 +289,7 @@ class InstancePublisher(GenericPublisher):
...
@@ -290,8 +289,7 @@ class InstancePublisher(GenericPublisher):
self
.
REQUEST
.
response
.
setBody
(
jsonify
(
d
))
self
.
REQUEST
.
response
.
setBody
(
jsonify
(
d
))
return
self
.
REQUEST
.
response
return
self
.
REQUEST
.
response
@
requireHeader
({
'Accept'
:
'application/json'
,
@
requireHeader
({
'Content-Type'
:
'^application/json.*'
})
'Content-Type'
:
'^application/json.*'
})
@
requireJson
(
dict
(
log
=
unicode
))
@
requireJson
(
dict
(
log
=
unicode
))
@
extractDocument
([
'Software Instance'
,
'Slave Instance'
])
@
extractDocument
([
'Software Instance'
,
'Slave Instance'
])
def
__bang
(
self
):
def
__bang
(
self
):
...
@@ -308,8 +306,7 @@ class InstancePublisher(GenericPublisher):
...
@@ -308,8 +306,7 @@ class InstancePublisher(GenericPublisher):
self
.
REQUEST
.
response
.
setStatus
(
204
)
self
.
REQUEST
.
response
.
setStatus
(
204
)
return
self
.
REQUEST
.
response
return
self
.
REQUEST
.
response
@
requireHeader
({
'Accept'
:
'application/json'
,
@
requireHeader
({
'Content-Type'
:
'^application/json.*'
})
'Content-Type'
:
'^application/json.*'
})
@
requireJson
(
dict
(
@
requireJson
(
dict
(
slave
=
bool
,
slave
=
bool
,
software_release
=
(
unicode
,
encode_utf8
),
software_release
=
(
unicode
,
encode_utf8
),
...
@@ -353,7 +350,6 @@ class InstancePublisher(GenericPublisher):
...
@@ -353,7 +350,6 @@ class InstancePublisher(GenericPublisher):
self
.
REQUEST
.
response
.
setBody
(
jsonify
({
'status'
:
'processing'
}))
self
.
REQUEST
.
response
.
setBody
(
jsonify
({
'status'
:
'processing'
}))
return
self
.
REQUEST
.
response
return
self
.
REQUEST
.
response
@
requireHeader
({
'Accept'
:
'application/json'
})
@
extractDocument
([
'Software Instance'
,
'Slave Instance'
])
@
extractDocument
([
'Software Instance'
,
'Slave Instance'
])
@
supportModifiedSince
(
'document_url'
)
@
supportModifiedSince
(
'document_url'
)
def
__instance_info
(
self
):
def
__instance_info
(
self
):
...
@@ -407,7 +403,6 @@ class InstancePublisher(GenericPublisher):
...
@@ -407,7 +403,6 @@ class InstancePublisher(GenericPublisher):
return
self
.
REQUEST
.
response
return
self
.
REQUEST
.
response
software_instance_module
=
'software_instance_module'
software_instance_module
=
'software_instance_module'
@
requireHeader
({
'Accept'
:
'application/json'
})
def
__instance_list
(
self
):
def
__instance_list
(
self
):
kw
=
dict
(
kw
=
dict
(
portal_type
=
(
'Software Instance'
,
'Slave Instance'
),
portal_type
=
(
'Software Instance'
,
'Slave Instance'
),
...
@@ -444,8 +439,7 @@ class InstancePublisher(GenericPublisher):
...
@@ -444,8 +439,7 @@ class InstancePublisher(GenericPublisher):
class
ComputerPublisher
(
GenericPublisher
):
class
ComputerPublisher
(
GenericPublisher
):
@
responseSupport
()
@
responseSupport
()
@
requireHeader
({
'Accept'
:
'application/json'
,
@
requireHeader
({
'Content-Type'
:
'^application/json.*'
})
'Content-Type'
:
'^application/json.*'
})
@
extractDocument
(
'Computer'
)
@
extractDocument
(
'Computer'
)
@
requireJson
(
dict
(
@
requireJson
(
dict
(
partition
=
list
,
partition
=
list
,
...
@@ -529,7 +523,6 @@ class VifibRestAPIV1(Implicit):
...
@@ -529,7 +523,6 @@ class VifibRestAPIV1(Implicit):
security
.
declarePublic
(
'__call__'
)
security
.
declarePublic
(
'__call__'
)
@
responseSupport
(
True
)
@
responseSupport
(
True
)
@
requireHeader
({
'Accept'
:
'application/json'
})
def
__call__
(
self
):
def
__call__
(
self
):
"""Possible API discovery"""
"""Possible API discovery"""
self
.
REQUEST
.
response
.
setStatus
(
400
)
self
.
REQUEST
.
response
.
setStatus
(
400
)
...
...
master/bt5/vifib_slapos_rest_api_v1/bt/revision
View file @
cd4146d6
10
11
\ No newline at end of file
\ 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