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
Titouan Soulard
slapos.core
Commits
733b31a3
Commit
733b31a3
authored
Feb 06, 2023
by
Julien Muchembled
Committed by
Xavier Thompson
Feb 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proxy: Cleanup
parent
480cfb02
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
slapos/proxy/views.py
slapos/proxy/views.py
+5
-9
No files found.
slapos/proxy/views.py
View file @
733b31a3
...
@@ -731,18 +731,14 @@ def getAllocatedSlaveInstance(slave_reference, requested_computer_id):
...
@@ -731,18 +731,14 @@ def getAllocatedSlaveInstance(slave_reference, requested_computer_id):
"""
"""
Look for existence of instance, if so return the
Look for existence of instance, if so return the
corresponding partition dict, else return None
corresponding partition dict, else return None
"""
args
=
[]
a
=
args
.
append
# XXX: Scope currently depends on instance which requests slave.
# XXX: Scope currently depends on instance which requests slave.
# Meaning that two different instances requesting the same slave will
# Meaning that two different instances requesting the same slave will
# result in two different allocated slaves.
# result in two different allocated slaves.
table
=
'slave'
"""
q
=
'SELECT * FROM %s WHERE reference=? and computer_reference=?'
return
execute_db
(
'slave'
,
a
(
slave_reference
)
'SELECT * FROM %s WHERE reference is ? AND computer_reference is ?'
,
a
(
requested_computer_id
)
(
slave_reference
,
requested_computer_id
),
one
=
True
)
# XXX: check there is only one result
return
execute_db
(
table
,
q
,
args
,
one
=
True
)
def
getRootPartition
(
reference
):
def
getRootPartition
(
reference
):
"""Climb the partitions tree up by 'requested_by' link to get the root partition."""
"""Climb the partitions tree up by 'requested_by' link to get the root partition."""
...
...
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