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
Klaus Wölfel
slapos.core
Commits
93870f81
Commit
93870f81
authored
Dec 13, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix
f9006416
parent
3bc7a5ec
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
master/bt5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
...5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
+24
-0
master/bt5/slapos_slap_tool/bt/revision
master/bt5/slapos_slap_tool/bt/revision
+1
-1
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+3
-2
No files found.
master/bt5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
View file @
93870f81
...
@@ -14,6 +14,7 @@ import xml.dom.ext
...
@@ -14,6 +14,7 @@ import xml.dom.ext
import
StringIO
import
StringIO
import
difflib
import
difflib
import
transaction
import
transaction
from
OFS.Traversable
import
NotFound
class
Simulator
:
class
Simulator
:
def
__init__
(
self
,
outfile
,
method
):
def
__init__
(
self
,
outfile
,
method
):
...
@@ -542,6 +543,29 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
...
@@ -542,6 +543,29 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
if
os
.
path
.
exists
(
self
.
computer_load_configuration_simulator
):
if
os
.
path
.
exists
(
self
.
computer_load_configuration_simulator
):
os
.
unlink
(
self
.
computer_load_configuration_simulator
)
os
.
unlink
(
self
.
computer_load_configuration_simulator
)
def
test_destroyedSoftwareRelease_noSoftwareInstallation
(
self
):
self
.
login
(
self
.
computer_id
)
self
.
assertRaises
(
NotFound
,
self
.
portal_slap
.
destroyedSoftwareRelease
,
"http://example.org/foo"
,
self
.
computer_id
)
def
test_destroyedSoftwareRelease_noDestroyRequested
(
self
):
self
.
_makeComplexComputer
()
self
.
login
(
self
.
computer_id
)
self
.
assertRaises
(
NotFound
,
self
.
portal_slap
.
destroyedSoftwareRelease
,
self
.
start_requested_software_installation
.
getUrlString
(),
self
.
computer_id
)
def
test_destroyedSoftwareRelease_destroyRequested
(
self
):
self
.
_makeComplexComputer
()
self
.
login
(
self
.
computer_id
)
destroy_requested
=
self
.
destroy_requested_software_installation
self
.
assertEquals
(
destroy_requested
.
getValidationState
(),
"validated"
)
self
.
portal_slap
.
destroyedSoftwareRelease
(
destroy_requested
.
getUrlString
(),
self
.
computer_id
)
self
.
assertEquals
(
destroy_requested
.
getValidationState
(),
"invalidated"
)
class
TestSlapOSSlapToolInstanceAccess
(
TestSlapOSSlapToolMixin
):
class
TestSlapOSSlapToolInstanceAccess
(
TestSlapOSSlapToolMixin
):
def
test_getComputerPartitionCertificate
(
self
):
def
test_getComputerPartitionCertificate
(
self
):
self
.
_makeComplexComputer
()
self
.
_makeComplexComputer
()
...
...
master/bt5/slapos_slap_tool/bt/revision
View file @
93870f81
19
20
\ No newline at end of file
\ No newline at end of file
master/product/Vifib/Tool/SlapTool.py
View file @
93870f81
...
@@ -857,9 +857,10 @@ class SlapTool(BaseTool):
...
@@ -857,9 +857,10 @@ class SlapTool(BaseTool):
computer_document
)
computer_document
)
if
software_installation
.
getSlapState
()
!=
'destroy_requested'
:
if
software_installation
.
getSlapState
()
!=
'destroy_requested'
:
raise
NotFound
raise
NotFound
if
portal
.
portal_workflow
.
isTransitionPossible
(
software_installation
,
if
self
.
getPortalObject
()
.
portal_workflow
.
isTransitionPossible
(
software_installation
,
'invalidate'
):
'invalidate'
):
software_installation
.
invalidate
(
comment
=
comment
)
software_installation
.
invalidate
(
comment
=
"Software Release destroyed report."
)
@
convertToREST
@
convertToREST
def
_buildingComputerPartition
(
self
,
computer_id
,
computer_partition_id
):
def
_buildingComputerPartition
(
self
,
computer_id
,
computer_partition_id
):
...
...
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