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
1fb62abc
Commit
1fb62abc
authored
Jun 29, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a timestamp in instance informations.
It represents latest modifications date on an instance.
parent
91cfb629
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+9
-0
No files found.
master/product/Vifib/Tool/SlapTool.py
View file @
1fb62abc
...
...
@@ -931,6 +931,11 @@ class SlapTool(BaseTool):
def
_getSoftwareInstanceAsParameterDict
(
self
,
software_instance
):
portal
=
software_instance
.
getPortalObject
()
computer_partition
=
software_instance
.
getAggregateValue
(
portal_type
=
"Computer Partition"
)
timestamp
=
int
(
computer_partition
.
getModificationDate
())
newtimestamp
=
int
(
software_instance
.
getModificationDate
())
if
(
newtimestamp
>
timestamp
):
timestamp
=
newtimestamp
ip_list
=
[]
for
internet_protocol_address
in
computer_partition
.
contentValues
(
portal_type
=
'Internet Protocol Address'
):
...
...
@@ -955,6 +960,9 @@ class SlapTool(BaseTool):
'xml'
:
slave_instance
.
getTextContent
(),
'connection_xml'
:
slave_instance
.
getConnectionXml
(),
})
newtimestamp
=
int
(
slave_instance
.
getModificationDate
())
if
(
newtimestamp
>
timestamp
):
timestamp
=
newtimestamp
return
{
'xml'
:
software_instance
.
getTextContent
(),
'connection_xml'
:
software_instance
.
getConnectionXml
(),
...
...
@@ -964,6 +972,7 @@ class SlapTool(BaseTool):
'slap_software_release_url'
:
software_instance
.
getRootSoftwareReleaseUrl
(),
'slave_instance_list'
:
slave_instance_list
,
'ip_list'
:
ip_list
,
'timestamp'
:
timestamp
,
}
@
UnrestrictedMethod
...
...
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