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
Jérome Perrin
slapos.core
Commits
eafff8ec
Commit
eafff8ec
authored
Dec 13, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simulate slapgrid SR.
Ensure that computer can destroy the software.
parent
93870f81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
...os_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
+37
-0
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
No files found.
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
View file @
eafff8ec
...
@@ -159,6 +159,26 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
...
@@ -159,6 +159,26 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
finally
:
finally
:
setSecurityManager
(
sm
)
setSecurityManager
(
sm
)
def
simulateSlapgridSR
(
self
,
computer
):
sm
=
getSecurityManager
()
computer_reference
=
computer
.
getReference
()
try
:
self
.
login
(
computer_reference
)
computer_xml
=
self
.
portal
.
portal_slap
.
getFullComputerInformation
(
computer_id
=
computer
.
getReference
())
slap_computer
=
xml_marshaller
.
xml_marshaller
.
loads
(
computer_xml
)
self
.
assertEqual
(
'Computer'
,
slap_computer
.
__class__
.
__name__
)
for
software_release
in
slap_computer
.
_software_release_list
:
if
software_release
.
_requested_state
==
'destroyed'
:
self
.
portal
.
portal_slap
.
destroyedSoftwareRelease
(
software_release
.
_software_release
,
computer
.
getReference
())
else
:
self
.
portal
.
portal_slap
.
availableSoftwareRelease
(
software_release
.
_software_release
,
computer
.
getReference
())
finally
:
setSecurityManager
(
sm
)
self
.
tic
()
def
simulateSlapgridUR
(
self
,
computer
):
def
simulateSlapgridUR
(
self
,
computer
):
sm
=
getSecurityManager
()
sm
=
getSecurityManager
()
computer_reference
=
computer
.
getReference
()
computer_reference
=
computer
.
getReference
()
...
@@ -631,6 +651,23 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
...
@@ -631,6 +651,23 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
self
.
checkInstanceUnallocation
(
friend_reference
,
friend_instance_title
,
self
.
checkInstanceUnallocation
(
friend_reference
,
friend_instance_title
,
friend_server_software
,
friend_instance_type
,
friend_server
)
friend_server_software
,
friend_instance_type
,
friend_server
)
# and uninstall some software on them
self
.
logout
()
self
.
login
(
owner_reference
)
self
.
supplySoftware
(
public_server
,
public_server_software
,
state
=
'destroyed'
)
self
.
supplySoftware
(
personal_server
,
personal_server_software
,
state
=
'destroyed'
)
self
.
supplySoftware
(
friend_server
,
friend_server_software
,
state
=
'destroyed'
)
self
.
logout
()
# Uninstall from computer
self
.
login
()
self
.
simulateSlapgridSR
(
public_server
)
self
.
simulateSlapgridSR
(
personal_server
)
self
.
simulateSlapgridSR
(
friend_server
)
# check the Open Sale Order coverage
# check the Open Sale Order coverage
self
.
stepCallSlaposRequestUpdateHostingSubscriptionOpenSaleOrderAlarm
()
self
.
stepCallSlaposRequestUpdateHostingSubscriptionOpenSaleOrderAlarm
()
self
.
tic
()
self
.
tic
()
...
...
master/bt5/slapos_erp5/bt/revision
View file @
eafff8ec
147
148
\ No newline at end of file
\ No newline at end of file
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