Commit 397a247b authored by Romain Courteaud's avatar Romain Courteaud Committed by Rafael Monnerat

Add timestamp value for each slave instance.

parent 48ee3edd
......@@ -282,6 +282,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
<unicode>%(slave_1_instance_guid)s</unicode>
<string>slave_title</string>
<unicode>%(slave_1_title)s</unicode>
<string>timestamp</string>
<int>%(partition_1_timestamp)s</int>
</dictionary>
</list>
<string>timestamp</string>
......@@ -891,6 +893,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
<unicode>%(slave_1_instance_guid)s</unicode>
<string>slave_title</string>
<unicode>%(slave_1_title)s</unicode>
<string>timestamp</string>
<int>%(timestamp)s</int>
</dictionary>
</list>
<string>timestamp</string>
......@@ -1095,6 +1099,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
<unicode>%(slave_1_instance_guid)s</unicode>
<string>slave_title</string>
<unicode>%(slave_1_title)s</unicode>
<string>timestamp</string>
<int>%(timestamp)s</int>
</dictionary>
</list>
<string>timestamp</string>
......@@ -2107,6 +2113,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
<unicode>%(slave_1_instance_guid)s</unicode>
<string>slave_title</string>
<unicode>%(slave_1_title)s</unicode>
<string>timestamp</string>
<int>%(timestamp)s</int>
</dictionary>
</list>
<string>timestamp</string>
......
......@@ -1366,15 +1366,16 @@ class SlapTool(BaseTool):
slave_instance = _assertACI(slave_instance.getObject())
# XXX Use catalog to filter more efficiently
if slave_instance.getSlapState() == "start_requested":
newtimestamp = int(slave_instance.getBangTimestamp(int(software_instance.getModificationDate())))
append({
'slave_title': slave_instance.getTitle().decode("UTF-8"),
'slap_software_type': \
slave_instance.getSourceReference().decode("UTF-8"),
'slave_reference': slave_instance.getReference().decode("UTF-8"),
'timestamp': newtimestamp,
'xml': slave_instance.getTextContent(),
'connection_xml': slave_instance.getConnectionXml(),
})
newtimestamp = int(slave_instance.getBangTimestamp(int(software_instance.getModificationDate())))
if (newtimestamp > timestamp):
timestamp = newtimestamp
return {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment