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
Nicolas Wavrant
slapos.core
Commits
0519259b
Commit
0519259b
authored
Jun 01, 2016
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SlapTool: Do not cache getSoftwareInstallationReference
Request/destroy/Re-request is causing problems for test agent.
parent
d6c82694
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+6
-13
No files found.
master/product/Vifib/Tool/SlapTool.py
View file @
0519259b
...
@@ -990,7 +990,7 @@ class SlapTool(BaseTool):
...
@@ -990,7 +990,7 @@ class SlapTool(BaseTool):
Log the software release status
Log the software release status
"""
"""
computer_document
=
self
.
_getComputerDocument
(
computer_id
)
computer_document
=
self
.
_getComputerDocument
(
computer_id
)
software_installation_reference
=
self
.
_get
Cached
SoftwareInstallationReference
(
url
,
software_installation_reference
=
self
.
_getSoftwareInstallationReference
(
url
,
computer_document
)
computer_document
)
user
=
self
.
getPortalObject
().
portal_membership
.
\
user
=
self
.
getPortalObject
().
portal_membership
.
\
getAuthenticatedMember
().
getUserName
()
getAuthenticatedMember
().
getUserName
()
...
@@ -1003,7 +1003,7 @@ class SlapTool(BaseTool):
...
@@ -1003,7 +1003,7 @@ class SlapTool(BaseTool):
Log the software release status
Log the software release status
"""
"""
computer_document
=
self
.
_getComputerDocument
(
computer_id
)
computer_document
=
self
.
_getComputerDocument
(
computer_id
)
software_installation_reference
=
self
.
_get
Cached
SoftwareInstallationReference
(
url
,
software_installation_reference
=
self
.
_getSoftwareInstallationReference
(
url
,
computer_document
)
computer_document
)
user
=
self
.
getPortalObject
().
portal_membership
.
\
user
=
self
.
getPortalObject
().
portal_membership
.
\
getAuthenticatedMember
().
getUserName
()
getAuthenticatedMember
().
getUserName
()
...
@@ -1258,6 +1258,8 @@ class SlapTool(BaseTool):
...
@@ -1258,6 +1258,8 @@ class SlapTool(BaseTool):
partition_parameter_kw
=
dict
()
partition_parameter_kw
=
dict
()
if
filter_xml
:
if
filter_xml
:
filter_kw
=
xml_marshaller
.
xml_marshaller
.
loads
(
filter_xml
)
filter_kw
=
xml_marshaller
.
xml_marshaller
.
loads
(
filter_xml
)
if
software_type
==
'pull-backup'
and
not
'retention_delay'
in
filter_kw
:
filter_kw
[
'retention_delay'
]
=
7.0
else
:
else
:
filter_kw
=
dict
()
filter_kw
=
dict
()
...
@@ -1430,19 +1432,10 @@ class SlapTool(BaseTool):
...
@@ -1430,19 +1432,10 @@ class SlapTool(BaseTool):
in
software_installation_list
])
in
software_installation_list
])
))
))
def
_get
NonCached
SoftwareInstallationReference
(
self
,
url
,
computer_document
):
def
_getSoftwareInstallationReference
(
self
,
url
,
computer_document
):
return
self
.
_getSoftwareInstallationForComputer
(
url
,
return
self
.
_getSoftwareInstallationForComputer
(
url
,
computer_document
).
getReference
()
computer_document
).
getReference
()
def
_getCachedSoftwareInstallationReference
(
self
,
url
,
computer_document
):
"""
Get the software installation reference (with this url) for the computer.
"""
result
=
CachingMethod
(
self
.
_getNonCachedSoftwareInstallationReference
,
id
=
'_getCachedSoftwareInstallationReference'
,
cache_factory
=
'slap_cache_factory'
)(
url
,
computer_document
)
return
result
def
_getSoftwareInstanceForComputerPartition
(
self
,
computer_id
,
def
_getSoftwareInstanceForComputerPartition
(
self
,
computer_id
,
computer_partition_id
,
slave_reference
=
None
):
computer_partition_id
,
slave_reference
=
None
):
computer_partition_document
=
self
.
_getComputerPartitionDocument
(
computer_partition_document
=
self
.
_getComputerPartitionDocument
(
...
@@ -1575,7 +1568,7 @@ class SlapTool(BaseTool):
...
@@ -1575,7 +1568,7 @@ class SlapTool(BaseTool):
Log the computer status
Log the computer status
"""
"""
computer_document
=
self
.
_getComputerDocument
(
computer_id
)
computer_document
=
self
.
_getComputerDocument
(
computer_id
)
software_installation_reference
=
self
.
_get
Cached
SoftwareInstallationReference
(
url
,
software_installation_reference
=
self
.
_getSoftwareInstallationReference
(
url
,
computer_document
)
computer_document
)
user
=
self
.
getPortalObject
().
portal_membership
.
\
user
=
self
.
getPortalObject
().
portal_membership
.
\
getAuthenticatedMember
().
getUserName
()
getAuthenticatedMember
().
getUserName
()
...
...
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