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
Xiaowu Zhang
slapos.core
Commits
a7c74958
Commit
a7c74958
authored
Jun 03, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt slapproxy to new slaplib behavior
Fix
428e9dad
.
parent
c034561a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
slapos/proxy/views.py
slapos/proxy/views.py
+17
-13
No files found.
slapos/proxy/views.py
View file @
a7c74958
...
...
@@ -362,19 +362,23 @@ def request_not_shared():
for
address
in
execute_db
(
'partition_network'
,
'SELECT * FROM %s WHERE partition_reference=?'
,
[
partition
[
'reference'
]]):
address_list
.
append
((
address
[
'reference'
],
address
[
'address'
]))
# XXX it should be ComputerPartition, not a SoftwareInstance
software_instance
=
SoftwareInstance
(
xml
=
partition
[
'xml'
],
connection_xml
=
partition
[
'connection_xml'
],
slap_computer_id
=
app
.
config
[
'computer_id'
],
slap_computer_partition_id
=
partition
[
'reference'
],
slap_software_release_url
=
partition
[
'software_release'
],
slap_server_url
=
'slap_server_url'
,
slap_software_type
=
partition
[
'software_type'
],
slave_instance_list
=
partition
[
'slave_instance_list'
],
instance_guid
=
partition
[
'reference'
],
ip_list
=
address_list
)
return
xml_marshaller
.
xml_marshaller
.
dumps
(
software_instance
)
# XXX it should be ComputerPartition, not a SoftwareInstance.
# XXX To much magic here. we should just dumps the ComputerPartition object.
instance
=
SoftwareInstance
(
xml
=
partition
[
'xml'
],
connection_xml
=
partition
[
'connection_xml'
],
slap_computer_id
=
app
.
config
[
'computer_id'
],
slap_computer_partition_id
=
partition
[
'reference'
],
slap_software_release_url
=
partition
[
'software_release'
],
slap_server_url
=
'slap_server_url'
,
slap_software_type
=
partition
[
'software_type'
],
slave_instance_list
=
partition
[
'slave_instance_list'
],
instance_guid
=
partition
[
'reference'
],
ip_list
=
address_list
)
instance
.
_parameter_dict
=
xml2dict
(
partition
[
'xml'
])
instance
.
_connection_dict
=
xml2dict
(
partition
[
'connection_xml'
])
instance
.
_requested_state
=
requested_state
return
xml_marshaller
.
xml_marshaller
.
dumps
(
instance
)
def
request_slave
():
...
...
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