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
Léo-Paul Géneau
slapos.core
Commits
317d5c8e
Commit
317d5c8e
authored
Oct 02, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update slapproxy behavior: when instance already exist, only update partition_parameter_kw
parent
4136056d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
slapos/proxy/views.py
slapos/proxy/views.py
+19
-13
No files found.
slapos/proxy/views.py
View file @
317d5c8e
...
...
@@ -294,15 +294,19 @@ def request_not_shared():
q
+=
' AND requested_by=?'
a
(
partition_id
)
partition
=
execute_db
(
'partition'
,
q
,
args
,
one
=
True
)
args
=
[]
a
=
args
.
append
q
=
'UPDATE %s SET slap_state="busy"'
# If partition doesn't exist: create it and insert parameters
if
partition
is
None
:
partition
=
execute_db
(
'partition'
,
'SELECT * FROM %s WHERE slap_state="free"'
,
(),
one
=
True
)
if
partition
is
None
:
app
.
logger
.
warning
(
'No more free computer partition'
)
abort
(
408
)
args
=
[]
a
=
args
.
append
q
=
'UPDATE %s SET software_release=?, slap_state="busy"'
q
+=
' ,software_release=?'
a
(
software_release
)
if
software_type
:
q
+=
' ,software_type=?'
...
...
@@ -313,6 +317,8 @@ def request_not_shared():
if
partition_id
:
q
+=
' ,requested_by=?'
a
(
partition_id
)
# Else: only update partition_parameter_kw
if
instance_xml
:
q
+=
' ,xml=?'
a
(
instance_xml
)
...
...
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