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
Lu Xu
slapos.core
Commits
74a0cedd
Commit
74a0cedd
authored
Sep 21, 2012
by
Cédric de Saint Martin
Committed by
Cédric Le Ninivin
Sep 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factor code
parent
978c5164
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
slapos/proxy/views.py
slapos/proxy/views.py
+2
-15
No files found.
slapos/proxy/views.py
View file @
74a0cedd
...
...
@@ -127,21 +127,8 @@ def after_request(response):
@
app
.
route
(
'/getComputerInformation'
,
methods
=
[
'GET'
])
def
getComputerInformation
():
computer_id
=
request
.
args
[
'computer_id'
]
if
app
.
config
[
'computer_id'
]
==
computer_id
:
slap_computer
=
Computer
(
computer_id
)
slap_computer
.
_software_release_list
=
[]
for
sr
in
execute_db
(
'software'
,
'select * from %s'
):
slap_computer
.
_software_release_list
.
append
(
SoftwareRelease
(
software_release
=
sr
[
'url'
],
computer_guid
=
computer_id
))
slap_computer
.
_computer_partition_list
=
[]
for
partition
in
execute_db
(
'partition'
,
'SELECT * FROM %s'
):
slap_computer
.
_computer_partition_list
.
append
(
partitiondict2partition
(
partition
))
return
xml_marshaller
.
xml_marshaller
.
dumps
(
slap_computer
)
else
:
raise
UnauthorizedError
,
"Only accept request for: %s"
%
\
app
.
config
[
'computer_id'
]
# Kept only for backward compatiblity
return
getFullComputerInformation
()
@
app
.
route
(
'/getFullComputerInformation'
,
methods
=
[
'GET'
])
def
getFullComputerInformation
():
...
...
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