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
84acbfc2
Commit
84acbfc2
authored
Jun 19, 2014
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add timestamp value for each slave instance.
parent
b3f79a89
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
master/bt5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
...5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
+8
-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
+2
-1
No files found.
master/bt5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
View file @
84acbfc2
...
@@ -282,6 +282,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
...
@@ -282,6 +282,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
<unicode>%(slave_1_instance_guid)s</unicode>
<unicode>%(slave_1_instance_guid)s</unicode>
<string>slave_title</string>
<string>slave_title</string>
<unicode>%(slave_1_title)s</unicode>
<unicode>%(slave_1_title)s</unicode>
<string>timestamp</string>
<int>%(partition_1_timestamp)s</int>
</dictionary>
</dictionary>
</list>
</list>
<string>timestamp</string>
<string>timestamp</string>
...
@@ -891,6 +893,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
...
@@ -891,6 +893,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
<unicode>%(slave_1_instance_guid)s</unicode>
<unicode>%(slave_1_instance_guid)s</unicode>
<string>slave_title</string>
<string>slave_title</string>
<unicode>%(slave_1_title)s</unicode>
<unicode>%(slave_1_title)s</unicode>
<string>timestamp</string>
<int>%(timestamp)s</int>
</dictionary>
</dictionary>
</list>
</list>
<string>timestamp</string>
<string>timestamp</string>
...
@@ -1095,6 +1099,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
...
@@ -1095,6 +1099,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
<unicode>%(slave_1_instance_guid)s</unicode>
<unicode>%(slave_1_instance_guid)s</unicode>
<string>slave_title</string>
<string>slave_title</string>
<unicode>%(slave_1_title)s</unicode>
<unicode>%(slave_1_title)s</unicode>
<string>timestamp</string>
<int>%(timestamp)s</int>
</dictionary>
</dictionary>
</list>
</list>
<string>timestamp</string>
<string>timestamp</string>
...
@@ -2107,6 +2113,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2107,6 +2113,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
<unicode>%(slave_1_instance_guid)s</unicode>
<unicode>%(slave_1_instance_guid)s</unicode>
<string>slave_title</string>
<string>slave_title</string>
<unicode>%(slave_1_title)s</unicode>
<unicode>%(slave_1_title)s</unicode>
<string>timestamp</string>
<int>%(timestamp)s</int>
</dictionary>
</dictionary>
</list>
</list>
<string>timestamp</string>
<string>timestamp</string>
...
...
master/bt5/slapos_slap_tool/bt/revision
View file @
84acbfc2
3
3
3
4
\ No newline at end of file
master/product/Vifib/Tool/SlapTool.py
View file @
84acbfc2
...
@@ -1366,15 +1366,16 @@ class SlapTool(BaseTool):
...
@@ -1366,15 +1366,16 @@ class SlapTool(BaseTool):
slave_instance
=
_assertACI
(
slave_instance
.
getObject
())
slave_instance
=
_assertACI
(
slave_instance
.
getObject
())
# XXX Use catalog to filter more efficiently
# XXX Use catalog to filter more efficiently
if
slave_instance
.
getSlapState
()
==
"start_requested"
:
if
slave_instance
.
getSlapState
()
==
"start_requested"
:
newtimestamp
=
int
(
slave_instance
.
getBangTimestamp
(
int
(
software_instance
.
getModificationDate
())))
append
({
append
({
'slave_title'
:
slave_instance
.
getTitle
().
decode
(
"UTF-8"
),
'slave_title'
:
slave_instance
.
getTitle
().
decode
(
"UTF-8"
),
'slap_software_type'
:
\
'slap_software_type'
:
\
slave_instance
.
getSourceReference
().
decode
(
"UTF-8"
),
slave_instance
.
getSourceReference
().
decode
(
"UTF-8"
),
'slave_reference'
:
slave_instance
.
getReference
().
decode
(
"UTF-8"
),
'slave_reference'
:
slave_instance
.
getReference
().
decode
(
"UTF-8"
),
'timestamp'
:
newtimestamp
,
'xml'
:
slave_instance
.
getTextContent
(),
'xml'
:
slave_instance
.
getTextContent
(),
'connection_xml'
:
slave_instance
.
getConnectionXml
(),
'connection_xml'
:
slave_instance
.
getConnectionXml
(),
})
})
newtimestamp
=
int
(
slave_instance
.
getBangTimestamp
(
int
(
software_instance
.
getModificationDate
())))
if
(
newtimestamp
>
timestamp
):
if
(
newtimestamp
>
timestamp
):
timestamp
=
newtimestamp
timestamp
=
newtimestamp
return
{
return
{
...
...
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