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
f8436554
Commit
f8436554
authored
Nov 12, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accept slave creation.
parent
69bc260b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
master/product/SlapOS/tests/testSlapOSMixin.py
master/product/SlapOS/tests/testSlapOSMixin.py
+29
-1
No files found.
master/product/SlapOS/tests/testSlapOSMixin.py
View file @
f8436554
...
...
@@ -240,7 +240,7 @@ class testSlapOSMixin(Products.Vifib.tests.VifibMixin.testVifibMixin):
self
.
partition
.
validate
()
self
.
tic
()
def
_makeComplexComputer
(
self
,
person
=
None
):
def
_makeComplexComputer
(
self
,
person
=
None
,
with_slave
=
False
):
for
i
in
range
(
1
,
5
):
id_
=
'partition%s'
%
i
p
=
self
.
computer
.
newContent
(
portal_type
=
'Computer Partition'
,
...
...
@@ -317,6 +317,30 @@ class testSlapOSMixin(Products.Vifib.tests.VifibMixin.testVifibMixin):
self
.
start_requested_software_instance
=
hosting_subscription
.
getPredecessorValue
()
self
.
start_requested_software_instance
.
edit
(
aggregate
=
self
.
computer
.
partition1
.
getRelativeUrl
())
if
with_slave
:
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
hosting_subscription
.
validate
()
hosting_subscription
.
edit
(
title
=
self
.
generateNewSoftwareTitle
(),
reference
=
"TESTSI-%s"
%
self
.
generateNewId
(),
destination_section_value
=
person
,
)
slave_kw
=
dict
(
software_release
=
kw
[
'software_release'
],
software_type
=
kw
[
'software_type'
],
instance_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
True
,
software_title
=
hosting_subscription
.
getTitle
(),
state
=
'started'
)
hosting_subscription
.
requestStart
(
**
slave_kw
)
hosting_subscription
.
requestInstance
(
**
slave_kw
)
self
.
start_requested_slave_instance
=
hosting_subscription
.
getPredecessorValue
()
self
.
start_requested_slave_instance
.
edit
(
aggregate
=
self
.
computer
.
partition1
.
getRelativeUrl
())
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
hosting_subscription
.
validate
()
...
...
@@ -403,6 +427,10 @@ class testSlapOSMixin(Products.Vifib.tests.VifibMixin.testVifibMixin):
self
.
destroyed_software_instance
.
invalidate
()
self
.
tic
()
if
with_slave
:
# as slave is created in non usual way update its local roles
self
.
start_requested_slave_instance
.
updateLocalRolesOnSecurityGroups
()
self
.
tic
()
self
.
_cleaupREQUEST
()
def
_cleaupREQUEST
(
self
):
...
...
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