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
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
9870e43c
Commit
9870e43c
authored
Nov 12, 2012
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alllow requests to software_type
parent
45f2991d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
slapos/proxy/views.py
slapos/proxy/views.py
+19
-8
No files found.
slapos/proxy/views.py
View file @
9870e43c
...
...
@@ -286,8 +286,7 @@ def softwareInstanceRename():
def
request_not_shared
():
software_release
=
request
.
form
[
'software_release'
].
encode
()
# some supported parameters
software_type
=
request
.
form
.
get
(
'software_type'
,
'RootSoftwareInstance'
).
encode
()
software_type
=
request
.
form
.
get
(
'software_type'
).
encode
()
partition_reference
=
request
.
form
.
get
(
'partition_reference'
,
''
).
encode
()
partition_id
=
request
.
form
.
get
(
'computer_partition_id'
,
''
).
encode
()
partition_parameter_kw
=
request
.
form
.
get
(
'partition_parameter_xml'
,
None
)
...
...
@@ -296,14 +295,20 @@ def request_not_shared():
partition_parameter_kw
.
encode
())
else
:
partition_parameter_kw
=
{}
instance_xml
=
dict2xml
(
partition_parameter_kw
)
args
=
[]
a
=
args
.
append
q
=
'SELECT * FROM %s WHERE partition_reference=?'
a
(
partition_reference
)
if
partition_id
:
q
+=
' AND requested_by=?'
a
(
partition_id
)
#
# XXX the following filter breaks renaming asked by the bully script
#
# if partition_id:
# q += ' AND requested_by=?'
# a(partition_id)
partition
=
execute_db
(
'partition'
,
q
,
args
,
one
=
True
)
args
=
[]
...
...
@@ -319,15 +324,21 @@ def request_not_shared():
abort
(
408
)
q
+=
' ,software_release=?'
a
(
software_release
)
if
software_type
:
q
+=
' ,software_type=?'
a
(
software_type
)
if
partition_reference
:
q
+=
' ,partition_reference=?'
a
(
partition_reference
)
if
partition_id
:
q
+=
' ,requested_by=?'
a
(
partition_id
)
if
not
software_type
:
software_type
=
'RootSoftwareInstance'
#
# XXX change software_type when requested
#
if
software_type
:
q
+=
' ,software_type=?'
a
(
software_type
)
# Else: only update partition_parameter_kw
if
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