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
Boxiang Sun
slapos.core
Commits
e3626628
Commit
e3626628
authored
Jul 13, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix naming.
parent
81fb0aa2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
master/bt5/vifib_slapos_rest_api_v1/DocumentTemplateItem/portal_components/VifibRestAPIV1.py
.../DocumentTemplateItem/portal_components/VifibRestAPIV1.py
+8
-8
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 @
e3626628
...
...
@@ -187,7 +187,7 @@ def responseSupport(anonymous=False):
str
(
user_name
))
if
len
(
user_document
)
!=
1
:
transaction
.
abort
()
LOG
(
'VifibRestApiV1
Tool
'
,
ERROR
,
LOG
(
'VifibRestApiV1'
,
ERROR
,
'Currenty logged in user %r wrong document list %r.'
%
(
user_name
,
user_document
))
self
.
REQUEST
.
response
.
setStatus
(
500
)
...
...
@@ -217,13 +217,13 @@ def extractDocument(portal_type):
portal_type
)))
self
.
document_url
=
document
.
getRelativeUrl
()
except
WrongRequest
:
LOG
(
'VifibRestApiV1
Tool
'
,
ERROR
,
LOG
(
'VifibRestApiV1'
,
ERROR
,
'Problem while trying to find document:'
,
error
=
True
)
self
.
REQUEST
.
response
.
setStatus
(
404
)
except
(
Unauthorized
,
KeyError
):
self
.
REQUEST
.
response
.
setStatus
(
404
)
except
Exception
:
LOG
(
'VifibRestApiV1
Tool
'
,
ERROR
,
LOG
(
'VifibRestApiV1'
,
ERROR
,
'Problem while trying to find instance:'
,
error
=
True
)
self
.
REQUEST
.
response
.
setStatus
(
500
)
self
.
REQUEST
.
response
.
setBody
(
jsonify
({
'error'
:
...
...
@@ -279,7 +279,7 @@ class InstancePublisher(GenericPublisher):
self
.
REQUEST
.
response
.
setStatus
(
200
)
except
Exception
:
transaction
.
abort
()
LOG
(
'VifibRestApiV1
Tool
'
,
ERROR
,
LOG
(
'VifibRestApiV1'
,
ERROR
,
'Problem while modifying:'
,
error
=
True
)
self
.
REQUEST
.
response
.
setStatus
(
500
)
self
.
REQUEST
.
response
.
setBody
(
jsonify
({
'error'
:
...
...
@@ -297,7 +297,7 @@ class InstancePublisher(GenericPublisher):
self
.
restrictedTraverse
(
self
.
document_url
).
bang
(
bang_tree
=
True
,
comment
=
self
.
jbody
[
'log'
])
except
Exception
:
LOG
(
'VifibRestApiV1
Tool
'
,
ERROR
,
LOG
(
'VifibRestApiV1'
,
ERROR
,
'Problem while trying to generate instance dict:'
,
error
=
True
)
self
.
REQUEST
.
response
.
setStatus
(
500
)
self
.
REQUEST
.
response
.
setBody
(
jsonify
({
'error'
:
...
...
@@ -339,7 +339,7 @@ class InstancePublisher(GenericPublisher):
).
requestSoftwareInstance
(
**
request_dict
)
except
Exception
:
transaction
.
abort
()
LOG
(
'VifibRestApiV1
Tool
'
,
ERROR
,
LOG
(
'VifibRestApiV1'
,
ERROR
,
'Problem with person.requestSoftwareInstance:'
,
error
=
True
)
self
.
REQUEST
.
response
.
setStatus
(
500
)
self
.
REQUEST
.
response
.
setBody
(
jsonify
({
'error'
:
...
...
@@ -383,7 +383,7 @@ class InstancePublisher(GenericPublisher):
}
}
except
Exception
:
LOG
(
'VifibRestApiV1
Tool
'
,
ERROR
,
LOG
(
'VifibRestApiV1'
,
ERROR
,
'Problem while trying to generate instance dict:'
,
error
=
True
)
self
.
REQUEST
.
response
.
setStatus
(
500
)
self
.
REQUEST
.
response
.
setBody
(
jsonify
({
'error'
:
...
...
@@ -490,7 +490,7 @@ class ComputerPublisher(GenericPublisher):
computer
.
Computer_updateFromJson
(
self
.
jbody
)
except
Exception
:
transaction
.
abort
()
LOG
(
'VifibRestApiV1
Tool
'
,
ERROR
,
LOG
(
'VifibRestApiV1'
,
ERROR
,
'Problem while trying to update computer:'
,
error
=
True
)
self
.
REQUEST
.
response
.
setStatus
(
500
)
self
.
REQUEST
.
response
.
setBody
(
jsonify
({
'error'
:
...
...
master/bt5/vifib_slapos_rest_api_v1/bt/revision
View file @
e3626628
12
\ No newline at end of file
13
\ 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