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
Gabriel Monnerat
slapos.core
Commits
b80d2591
Commit
b80d2591
authored
Jul 12, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop not needed introspection.
parent
9a47141e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
89 deletions
+1
-89
master/bt5/vifib_slapos_rest_api_v1/DocumentTemplateItem/portal_components/VifibRestAPIV1.py
.../DocumentTemplateItem/portal_components/VifibRestAPIV1.py
+0
-88
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 @
b80d2591
...
...
@@ -521,92 +521,6 @@ class VifibRestAPIV1(Implicit):
"""Computer publisher"""
return
ComputerPublisher
().
__of__
(
self
)
# set this date to moment of API modification
api_modification_date
=
DateTime
(
'2012/05/24 10:00 GMT+2'
)
@
supportModifiedSince
(
modified_property_id
=
'api_modification_date'
)
def
__api_discovery
(
self
):
self
.
REQUEST
.
response
.
setHeader
(
'Last-Modified'
,
rfc1123_date
(
self
.
api_modification_date
))
self
.
REQUEST
.
response
.
setHeader
(
'Cache-Control'
,
'must-revalidate'
)
self
.
REQUEST
.
response
.
setStatus
(
200
)
d
=
{
"computer_update"
:
{
"authentication"
:
True
,
"url"
:
'{computer_url}'
,
"method"
:
"PUT"
,
"required"
:
{},
"optional"
:
{
"software"
:
"list"
,
"address"
:
"list"
}
},
"discovery"
:
{
"authentication"
:
False
,
"url"
:
self
.
absolute_url
(),
"method"
:
"GET"
,
"required"
:
{},
"optional"
:
{}
},
"instance_list"
:
{
"authentication"
:
True
,
"url"
:
self
.
absolute_url
()
+
'/instance'
,
"method"
:
"GET"
,
"required"
:
{},
"optional"
:
{}
},
"instance_bang"
:
{
"authentication"
:
True
,
"url"
:
"{instance_url}/bang"
,
"method"
:
"POST"
,
"required"
:
{
"log"
:
"unicode"
},
"optional"
:
{}
},
"instance_certificate"
:
{
"authentication"
:
True
,
"url"
:
"{instance_url}/certificate"
,
"method"
:
"GET"
,
"required"
:
{},
"optional"
:
{}
},
"instance_edit"
:
{
"authentication"
:
True
,
"url"
:
"{instance_url}"
,
"method"
:
"PUT"
,
"required"
:
{},
"optional"
:
{
"title"
:
"unicode"
,
"connection"
:
"object"
},
},
"instance_info"
:
{
"authentication"
:
True
,
"url"
:
"{instance_url}"
,
"method"
:
"GET"
,
"required"
:
{},
"optional"
:
{}
},
'request_instance'
:
{
"authentication"
:
True
,
'url'
:
self
.
absolute_url
()
+
'/instance'
,
'method'
:
'POST'
,
'required'
:
{
"status"
:
"unicode"
,
"slave"
:
"bool"
,
"title"
:
"unicode"
,
"software_release"
:
"unicode"
,
"software_type"
:
"unicode"
,
"parameter"
:
"object"
,
"sla"
:
"object"
},
'optional'
:
{}
}
}
self
.
REQUEST
.
response
.
setBody
(
jsonify
(
d
))
return
self
.
REQUEST
.
response
@
responseSupport
(
True
)
def
OPTIONS
(
self
,
*
args
,
**
kwargs
):
"""HTTP OPTIONS implementation"""
...
...
@@ -618,7 +532,5 @@ class VifibRestAPIV1(Implicit):
@
requireHeader
({
'Accept'
:
'application/json'
})
def
__call__
(
self
):
"""Possible API discovery"""
if
self
.
REQUEST
[
'REQUEST_METHOD'
]
==
'GET'
:
return
self
.
__api_discovery
()
self
.
REQUEST
.
response
.
setStatus
(
400
)
return
self
.
REQUEST
.
response
master/bt5/vifib_slapos_rest_api_v1/bt/revision
View file @
b80d2591
9
\ No newline at end of file
10
\ 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