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
476bddaf
Commit
476bddaf
authored
Mar 30, 2016
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: include instance and hosting_subscription title in instance parameter_dict
parent
ade3960f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
20 deletions
+113
-20
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py
...ateItem/portal_components/test.erp5.testSlapOSSlapTool.py
+62
-0
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.xml
...teItem/portal_components/test.erp5.testSlapOSSlapTool.xml
+47
-20
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+4
-0
No files found.
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py
View file @
476bddaf
...
@@ -66,6 +66,14 @@ class TestSlapOSSlapToolMixin(testSlapOSMixin):
...
@@ -66,6 +66,14 @@ class TestSlapOSSlapToolMixin(testSlapOSMixin):
class
TestSlapOSSlapToolComputerAccess
(
TestSlapOSSlapToolMixin
):
class
TestSlapOSSlapToolComputerAccess
(
TestSlapOSSlapToolMixin
):
def
test_getFullComputerInformation
(
self
):
def
test_getFullComputerInformation
(
self
):
self
.
_makeComplexComputer
(
with_slave
=
True
)
self
.
_makeComplexComputer
(
with_slave
=
True
)
partition_1_root_instance_title
=
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSpecialiseValue
().
getTitle
()
partition_2_root_instance_title
=
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSpecialiseValue
().
getTitle
()
partition_3_root_instance_title
=
self
.
computer
.
partition3
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSpecialiseValue
().
getTitle
()
self
.
login
(
self
.
computer_id
)
self
.
login
(
self
.
computer_id
)
response
=
self
.
portal_slap
.
getFullComputerInformation
(
self
.
computer_id
)
response
=
self
.
portal_slap
.
getFullComputerInformation
(
self
.
computer_id
)
self
.
assertEqual
(
200
,
response
.
status
)
self
.
assertEqual
(
200
,
response
.
status
)
...
@@ -139,6 +147,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
...
@@ -139,6 +147,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
<dictionary id='i11'>
<dictionary id='i11'>
<string>full_ip_list</string>
<string>full_ip_list</string>
<list id='i12'/>
<list id='i12'/>
<string>instance_title</string>
<unicode>%(partition_3_instance_title)s</unicode>
<string>ip_list</string>
<string>ip_list</string>
<list id='i13'>
<list id='i13'>
<tuple>
<tuple>
...
@@ -148,6 +158,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
...
@@ -148,6 +158,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
</list>
</list>
<unicode>paramé</unicode>
<unicode>paramé</unicode>
<unicode>%(partition_3_param)s</unicode>
<unicode>%(partition_3_param)s</unicode>
<string>root_instance_title</string>
<unicode>%(partition_3_root_instance_title)s</unicode>
<string>slap_computer_id</string>
<string>slap_computer_id</string>
<unicode>%(computer_id)s</unicode>
<unicode>%(computer_id)s</unicode>
<string>slap_computer_partition_id</string>
<string>slap_computer_partition_id</string>
...
@@ -207,6 +219,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
...
@@ -207,6 +219,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
<dictionary id='i22'>
<dictionary id='i22'>
<string>full_ip_list</string>
<string>full_ip_list</string>
<list id='i23'/>
<list id='i23'/>
<string>instance_title</string>
<unicode>%(partition_2_instance_title)s</unicode>
<string>ip_list</string>
<string>ip_list</string>
<list id='i24'>
<list id='i24'>
<tuple>
<tuple>
...
@@ -216,6 +230,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
...
@@ -216,6 +230,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
</list>
</list>
<unicode>paramé</unicode>
<unicode>paramé</unicode>
<unicode>%(partition_2_param)s</unicode>
<unicode>%(partition_2_param)s</unicode>
<string>root_instance_title</string>
<unicode>%(partition_2_root_instance_title)s</unicode>
<string>slap_computer_id</string>
<string>slap_computer_id</string>
<unicode>%(computer_id)s</unicode>
<unicode>%(computer_id)s</unicode>
<string>slap_computer_partition_id</string>
<string>slap_computer_partition_id</string>
...
@@ -275,6 +291,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
...
@@ -275,6 +291,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
<dictionary id='i33'>
<dictionary id='i33'>
<string>full_ip_list</string>
<string>full_ip_list</string>
<list id='i34'/>
<list id='i34'/>
<string>instance_title</string>
<unicode>%(partition_1_instance_title)s</unicode>
<string>ip_list</string>
<string>ip_list</string>
<list id='i35'>
<list id='i35'>
<tuple>
<tuple>
...
@@ -284,6 +302,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
...
@@ -284,6 +302,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
</list>
</list>
<unicode>paramé</unicode>
<unicode>paramé</unicode>
<unicode>%(partition_1_param)s</unicode>
<unicode>%(partition_1_param)s</unicode>
<string>root_instance_title</string>
<unicode>%(partition_1_root_instance_title)s</unicode>
<string>slap_computer_id</string>
<string>slap_computer_id</string>
<unicode>%(computer_id)s</unicode>
<unicode>%(computer_id)s</unicode>
<string>slap_computer_partition_id</string>
<string>slap_computer_partition_id</string>
...
@@ -376,18 +396,24 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
...
@@ -376,18 +396,24 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
computer_id
=
self
.
computer_id
,
computer_id
=
self
.
computer_id
,
destroy_requested_url
=
self
.
destroy_requested_software_installation
.
getUrlString
(),
destroy_requested_url
=
self
.
destroy_requested_software_installation
.
getUrlString
(),
partition_1_instance_guid
=
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getReference
(),
partition_1_instance_guid
=
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getReference
(),
partition_1_instance_title
=
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getTitle
(),
partition_1_root_instance_title
=
partition_1_root_instance_title
,
partition_1_instance_software_type
=
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSourceReference
(),
partition_1_instance_software_type
=
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSourceReference
(),
partition_1_param
=
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getInstanceXmlAsDict
()[
'paramé'
],
partition_1_param
=
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getInstanceXmlAsDict
()[
'paramé'
],
partition_1_sla
=
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSlaXmlAsDict
()[
'paramé'
],
partition_1_sla
=
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSlaXmlAsDict
()[
'paramé'
],
partition_1_software_release_url
=
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getUrlString
(),
partition_1_software_release_url
=
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getUrlString
(),
partition_1_timestamp
=
int
(
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getModificationDate
()),
partition_1_timestamp
=
int
(
self
.
computer
.
partition1
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getModificationDate
()),
partition_2_instance_guid
=
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getReference
(),
partition_2_instance_guid
=
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getReference
(),
partition_2_instance_title
=
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getTitle
(),
partition_2_root_instance_title
=
partition_2_root_instance_title
,
partition_2_instance_software_type
=
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSourceReference
(),
partition_2_instance_software_type
=
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSourceReference
(),
partition_2_param
=
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getInstanceXmlAsDict
()[
'paramé'
],
partition_2_param
=
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getInstanceXmlAsDict
()[
'paramé'
],
partition_2_sla
=
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSlaXmlAsDict
()[
'paramé'
],
partition_2_sla
=
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSlaXmlAsDict
()[
'paramé'
],
partition_2_software_release_url
=
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getUrlString
(),
partition_2_software_release_url
=
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getUrlString
(),
partition_2_timestamp
=
int
(
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getModificationDate
()),
partition_2_timestamp
=
int
(
self
.
computer
.
partition2
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getModificationDate
()),
partition_3_instance_guid
=
self
.
computer
.
partition3
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getReference
(),
partition_3_instance_guid
=
self
.
computer
.
partition3
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getReference
(),
partition_3_instance_title
=
self
.
computer
.
partition3
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getTitle
(),
partition_3_root_instance_title
=
partition_3_root_instance_title
,
partition_3_instance_software_type
=
self
.
computer
.
partition3
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSourceReference
(),
partition_3_instance_software_type
=
self
.
computer
.
partition3
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSourceReference
(),
partition_3_param
=
self
.
computer
.
partition3
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getInstanceXmlAsDict
()[
'paramé'
],
partition_3_param
=
self
.
computer
.
partition3
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getInstanceXmlAsDict
()[
'paramé'
],
partition_3_sla
=
self
.
computer
.
partition3
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSlaXmlAsDict
()[
'paramé'
],
partition_3_sla
=
self
.
computer
.
partition3
.
getAggregateRelatedValue
(
portal_type
=
'Software Instance'
).
getSlaXmlAsDict
()[
'paramé'
],
...
@@ -953,6 +979,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
...
@@ -953,6 +979,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
<dictionary id='i9'>
<dictionary id='i9'>
<string>full_ip_list</string>
<string>full_ip_list</string>
<list id='i10'/>
<list id='i10'/>
<string>instance_title</string>
<unicode>%(instance_title)s</unicode>
<string>ip_list</string>
<string>ip_list</string>
<list id='i11'>
<list id='i11'>
<tuple>
<tuple>
...
@@ -962,6 +990,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
...
@@ -962,6 +990,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
</list>
</list>
<unicode>paramé</unicode>
<unicode>paramé</unicode>
<unicode>%(param)s</unicode>
<unicode>%(param)s</unicode>
<string>root_instance_title</string>
<unicode>%(root_instance_title)s</unicode>
<string>slap_computer_id</string>
<string>slap_computer_id</string>
<unicode>%(computer_id)s</unicode>
<unicode>%(computer_id)s</unicode>
<string>slap_computer_partition_id</string>
<string>slap_computer_partition_id</string>
...
@@ -1020,6 +1050,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
...
@@ -1020,6 +1050,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
"""
%
dict
(
"""
%
dict
(
computer_id
=
self
.
computer_id
,
computer_id
=
self
.
computer_id
,
instance_guid
=
self
.
start_requested_software_instance
.
getReference
(),
instance_guid
=
self
.
start_requested_software_instance
.
getReference
(),
instance_title
=
self
.
start_requested_software_instance
.
getTitle
(),
root_instance_title
=
self
.
start_requested_software_instance
.
getSpecialiseValue
().
getTitle
(),
software_release_url
=
self
.
start_requested_software_instance
.
getUrlString
(),
software_release_url
=
self
.
start_requested_software_instance
.
getUrlString
(),
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
(),
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
(),
param
=
self
.
start_requested_software_instance
.
getInstanceXmlAsDict
()[
'paramé'
],
param
=
self
.
start_requested_software_instance
.
getInstanceXmlAsDict
()[
'paramé'
],
...
@@ -1167,6 +1199,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
...
@@ -1167,6 +1199,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
<dictionary id='i6'>
<dictionary id='i6'>
<string>full_ip_list</string>
<string>full_ip_list</string>
<list id='i7'/>
<list id='i7'/>
<string>instance_title</string>
<unicode>%(instance_title)s</unicode>
<string>ip_list</string>
<string>ip_list</string>
<list id='i8'>
<list id='i8'>
<tuple>
<tuple>
...
@@ -1176,6 +1210,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
...
@@ -1176,6 +1210,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
</list>
</list>
<unicode>paramé</unicode>
<unicode>paramé</unicode>
<unicode>%(param)s</unicode>
<unicode>%(param)s</unicode>
<string>root_instance_title</string>
<unicode>%(root_instance_title)s</unicode>
<string>slap_computer_id</string>
<string>slap_computer_id</string>
<unicode>%(computer_id)s</unicode>
<unicode>%(computer_id)s</unicode>
<string>slap_computer_partition_id</string>
<string>slap_computer_partition_id</string>
...
@@ -1235,6 +1271,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
...
@@ -1235,6 +1271,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
software_release_url
=
self
.
start_requested_software_instance
.
getUrlString
(),
software_release_url
=
self
.
start_requested_software_instance
.
getUrlString
(),
timestamp
=
int
(
self
.
start_requested_software_instance
.
getModificationDate
()),
timestamp
=
int
(
self
.
start_requested_software_instance
.
getModificationDate
()),
instance_guid
=
self
.
start_requested_software_instance
.
getReference
(),
instance_guid
=
self
.
start_requested_software_instance
.
getReference
(),
instance_title
=
self
.
start_requested_software_instance
.
getTitle
(),
root_instance_title
=
self
.
start_requested_software_instance
.
getSpecialiseValue
().
getTitle
(),
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
(),
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
(),
slave_1_param
=
self
.
start_requested_slave_instance
.
getInstanceXmlAsDict
()[
'paramé'
],
slave_1_param
=
self
.
start_requested_slave_instance
.
getInstanceXmlAsDict
()[
'paramé'
],
slave_1_software_type
=
self
.
start_requested_slave_instance
.
getSourceReference
(),
slave_1_software_type
=
self
.
start_requested_slave_instance
.
getSourceReference
(),
...
@@ -1291,6 +1329,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
...
@@ -1291,6 +1329,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
<dictionary id='i6'>
<dictionary id='i6'>
<string>full_ip_list</string>
<string>full_ip_list</string>
<list id='i7'/>
<list id='i7'/>
<string>instance_title</string>
<unicode>%(instance_title)s</unicode>
<string>ip_list</string>
<string>ip_list</string>
<list id='i8'>
<list id='i8'>
<tuple>
<tuple>
...
@@ -1300,6 +1340,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
...
@@ -1300,6 +1340,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
</list>
</list>
<unicode>paramé</unicode>
<unicode>paramé</unicode>
<unicode>%(param)s</unicode>
<unicode>%(param)s</unicode>
<string>root_instance_title</string>
<unicode>%(root_instance_title)s</unicode>
<string>slap_computer_id</string>
<string>slap_computer_id</string>
<unicode>%(computer_id)s</unicode>
<unicode>%(computer_id)s</unicode>
<string>slap_computer_partition_id</string>
<string>slap_computer_partition_id</string>
...
@@ -1346,6 +1388,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
...
@@ -1346,6 +1388,8 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
software_release_url
=
self
.
start_requested_software_instance
.
getUrlString
(),
software_release_url
=
self
.
start_requested_software_instance
.
getUrlString
(),
timestamp
=
int
(
self
.
start_requested_software_instance
.
getModificationDate
()),
timestamp
=
int
(
self
.
start_requested_software_instance
.
getModificationDate
()),
instance_guid
=
self
.
start_requested_software_instance
.
getReference
(),
instance_guid
=
self
.
start_requested_software_instance
.
getReference
(),
instance_title
=
self
.
start_requested_software_instance
.
getTitle
(),
root_instance_title
=
self
.
start_requested_software_instance
.
getSpecialiseValue
().
getTitle
(),
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
()
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
()
)
)
self
.
assertEqual
(
expected_xml
,
got_xml
,
self
.
assertEqual
(
expected_xml
,
got_xml
,
...
@@ -2248,6 +2292,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2248,6 +2292,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
<dictionary id='i6'>
<dictionary id='i6'>
<string>full_ip_list</string>
<string>full_ip_list</string>
<list id='i7'/>
<list id='i7'/>
<string>instance_title</string>
<unicode>%(instance_title)s</unicode>
<string>ip_list</string>
<string>ip_list</string>
<list id='i8'>
<list id='i8'>
<tuple>
<tuple>
...
@@ -2257,6 +2303,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2257,6 +2303,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
</list>
</list>
<unicode>paramé</unicode>
<unicode>paramé</unicode>
<unicode>%(param)s</unicode>
<unicode>%(param)s</unicode>
<string>root_instance_title</string>
<unicode>%(root_instance_title)s</unicode>
<string>slap_computer_id</string>
<string>slap_computer_id</string>
<unicode>%(computer_id)s</unicode>
<unicode>%(computer_id)s</unicode>
<string>slap_computer_partition_id</string>
<string>slap_computer_partition_id</string>
...
@@ -2316,6 +2364,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2316,6 +2364,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
software_release_url
=
self
.
start_requested_software_instance
.
getUrlString
(),
software_release_url
=
self
.
start_requested_software_instance
.
getUrlString
(),
timestamp
=
int
(
self
.
start_requested_software_instance
.
getModificationDate
()),
timestamp
=
int
(
self
.
start_requested_software_instance
.
getModificationDate
()),
instance_guid
=
self
.
start_requested_software_instance
.
getReference
(),
instance_guid
=
self
.
start_requested_software_instance
.
getReference
(),
instance_title
=
self
.
start_requested_software_instance
.
getTitle
(),
root_instance_title
=
self
.
start_requested_software_instance
.
getSpecialiseValue
().
getTitle
(),
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
(),
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
(),
slave_1_param
=
self
.
start_requested_slave_instance
.
getInstanceXmlAsDict
()[
'paramé'
],
slave_1_param
=
self
.
start_requested_slave_instance
.
getInstanceXmlAsDict
()[
'paramé'
],
slave_1_software_type
=
self
.
start_requested_slave_instance
.
getSourceReference
(),
slave_1_software_type
=
self
.
start_requested_slave_instance
.
getSourceReference
(),
...
@@ -2372,6 +2422,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2372,6 +2422,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
<dictionary id='i6'>
<dictionary id='i6'>
<string>full_ip_list</string>
<string>full_ip_list</string>
<list id='i7'/>
<list id='i7'/>
<string>instance_title</string>
<unicode>%(instance_title)s</unicode>
<string>ip_list</string>
<string>ip_list</string>
<list id='i8'>
<list id='i8'>
<tuple>
<tuple>
...
@@ -2381,6 +2433,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2381,6 +2433,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
</list>
</list>
<unicode>paramé</unicode>
<unicode>paramé</unicode>
<unicode>%(param)s</unicode>
<unicode>%(param)s</unicode>
<string>root_instance_title</string>
<unicode>%(root_instance_title)s</unicode>
<string>slap_computer_id</string>
<string>slap_computer_id</string>
<unicode>%(computer_id)s</unicode>
<unicode>%(computer_id)s</unicode>
<string>slap_computer_partition_id</string>
<string>slap_computer_partition_id</string>
...
@@ -2427,6 +2481,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2427,6 +2481,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
software_release_url
=
self
.
start_requested_software_instance
.
getUrlString
(),
software_release_url
=
self
.
start_requested_software_instance
.
getUrlString
(),
timestamp
=
int
(
self
.
start_requested_software_instance
.
getModificationDate
()),
timestamp
=
int
(
self
.
start_requested_software_instance
.
getModificationDate
()),
instance_guid
=
self
.
start_requested_software_instance
.
getReference
(),
instance_guid
=
self
.
start_requested_software_instance
.
getReference
(),
instance_title
=
self
.
start_requested_software_instance
.
getTitle
(),
root_instance_title
=
self
.
start_requested_software_instance
.
getSpecialiseValue
().
getTitle
(),
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
()
software_type
=
self
.
start_requested_software_instance
.
getSourceReference
()
)
)
self
.
assertEqual
(
expected_xml
,
got_xml
,
self
.
assertEqual
(
expected_xml
,
got_xml
,
...
@@ -2625,6 +2681,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2625,6 +2681,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
<string>%(state)s</string>
<string>%(state)s</string>
<string>full_ip_list</string>
<string>full_ip_list</string>
<list id='i7'/>
<list id='i7'/>
<string>instance_title</string>
<unicode>%(instance_title)s</unicode>
<string>ip_list</string>
<string>ip_list</string>
<list id='i8'>
<list id='i8'>
<tuple>
<tuple>
...
@@ -2632,6 +2690,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2632,6 +2690,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
<unicode>%(ip)s</unicode>
<unicode>%(ip)s</unicode>
</tuple>
</tuple>
</list>
</list>
<string>root_instance_title</string>
<unicode>%(root_instance_title)s</unicode>
<string>slap_computer_id</string>
<string>slap_computer_id</string>
<unicode>%(computer_id)s</unicode>
<unicode>%(computer_id)s</unicode>
<string>slap_computer_partition_id</string>
<string>slap_computer_partition_id</string>
...
@@ -2649,6 +2709,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2649,6 +2709,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
</marshal>
</marshal>
"""
%
dict
(
"""
%
dict
(
instance_guid
=
self
.
start_requested_software_instance
.
getReference
(),
instance_guid
=
self
.
start_requested_software_instance
.
getReference
(),
instance_title
=
self
.
start_requested_software_instance
.
getTitle
(),
root_instance_title
=
self
.
start_requested_software_instance
.
getSpecialiseTitle
(),
state
=
"started"
,
state
=
"started"
,
url_string
=
self
.
start_requested_software_instance
.
getUrlString
(),
url_string
=
self
.
start_requested_software_instance
.
getUrlString
(),
type
=
self
.
start_requested_software_instance
.
getSourceReference
(),
type
=
self
.
start_requested_software_instance
.
getSourceReference
(),
...
...
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.xml
View file @
476bddaf
...
@@ -6,10 +6,22 @@
...
@@ -6,10 +6,22 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testSlapOSSlapTool
</string>
</value>
<value>
<string>
testSlapOSSlapTool
</string>
</value>
</item>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testSlapOSSlapTool
</string>
</value>
<value>
<string>
test.erp5.testSlapOSSlapTool
</string>
</value>
...
@@ -35,23 +47,23 @@
...
@@ -35,23 +47,23 @@
<value>
<value>
<tuple>
<tuple>
<string>
W: 29, 10: Use of eval (eval-used)
</string>
<string>
W: 29, 10: Use of eval (eval-used)
</string>
<string>
W: 38, 2: Arguments number differs from overridden method (arguments-differ)
</string>
<string>
W: 38, 2: Arguments number differs from overridden
\'afterSetUp\'
method (arguments-differ)
</string>
<string>
W:
46
7, 13: Use of eval (eval-used)
</string>
<string>
W:
51
7, 13: Use of eval (eval-used)
</string>
<string>
W:5
1
8, 13: Use of eval (eval-used)
</string>
<string>
W:5
6
8, 13: Use of eval (eval-used)
</string>
<string>
W:7
4
3, 13: Use of eval (eval-used)
</string>
<string>
W:7
9
3, 13: Use of eval (eval-used)
</string>
<string>
W:13
07
, 13: Use of eval (eval-used)
</string>
<string>
W:13
99
, 13: Use of eval (eval-used)
</string>
<string>
W:1
420
, 13: Use of eval (eval-used)
</string>
<string>
W:1
512
, 13: Use of eval (eval-used)
</string>
<string>
W:1
474
, 13: Use of eval (eval-used)
</string>
<string>
W:1
566
, 13: Use of eval (eval-used)
</string>
<string>
W:1
514
, 13: Use of eval (eval-used)
</string>
<string>
W:1
606
, 13: Use of eval (eval-used)
</string>
<string>
W:
1921, 2: Arguments number differs from overridden
method (arguments-differ)
</string>
<string>
W:
2013, 2: Arguments number differs from overridden \'afterSetUp\'
method (arguments-differ)
</string>
<string>
W:2
017
, 13: Use of eval (eval-used)
</string>
<string>
W:2
109
, 13: Use of eval (eval-used)
</string>
<string>
W:2
37
2, 13: Use of eval (eval-used)
</string>
<string>
W:2
49
2, 13: Use of eval (eval-used)
</string>
<string>
W:2
42
6, 13: Use of eval (eval-used)
</string>
<string>
W:2
54
6, 13: Use of eval (eval-used)
</string>
<string>
W:2
45
3, 13: Use of eval (eval-used)
</string>
<string>
W:2
57
3, 13: Use of eval (eval-used)
</string>
<string>
W:2
59
8, 13: Use of eval (eval-used)
</string>
<string>
W:2
72
8, 13: Use of eval (eval-used)
</string>
<string>
W:2
62
6, 13: Use of eval (eval-used)
</string>
<string>
W:2
75
6, 13: Use of eval (eval-used)
</string>
<string>
W:2
67
5, 13: Use of eval (eval-used)
</string>
<string>
W:2
80
5, 13: Use of eval (eval-used)
</string>
<string>
W:2
72
2, 13: Use of eval (eval-used)
</string>
<string>
W:2
85
2, 13: Use of eval (eval-used)
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
...
@@ -62,13 +74,28 @@
...
@@ -62,13 +74,28 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -81,7 +108,7 @@
...
@@ -81,7 +108,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -90,7 +117,7 @@
...
@@ -90,7 +117,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
</pickle>
...
...
master/product/Vifib/Tool/SlapTool.py
View file @
476bddaf
...
@@ -1476,6 +1476,8 @@ class SlapTool(BaseTool):
...
@@ -1476,6 +1476,8 @@ class SlapTool(BaseTool):
if
(
newtimestamp
>
timestamp
):
if
(
newtimestamp
>
timestamp
):
timestamp
=
newtimestamp
timestamp
=
newtimestamp
hosting_subscription
=
software_instance
.
getSpecialiseValue
()
ip_list
=
[]
ip_list
=
[]
full_ip_list
=
[]
full_ip_list
=
[]
for
internet_protocol_address
in
computer_partition
.
contentValues
(
portal_type
=
'Internet Protocol Address'
):
for
internet_protocol_address
in
computer_partition
.
contentValues
(
portal_type
=
'Internet Protocol Address'
):
...
@@ -1519,6 +1521,8 @@ class SlapTool(BaseTool):
...
@@ -1519,6 +1521,8 @@ class SlapTool(BaseTool):
timestamp
=
newtimestamp
timestamp
=
newtimestamp
return
{
return
{
'instance_guid'
:
software_instance
.
getReference
().
decode
(
"UTF-8"
),
'instance_guid'
:
software_instance
.
getReference
().
decode
(
"UTF-8"
),
'instance_title'
:
software_instance
.
getTitle
().
decode
(
"UTF-8"
),
'root_instance_title'
:
hosting_subscription
.
getTitle
().
decode
(
"UTF-8"
),
'xml'
:
software_instance
.
getTextContent
(),
'xml'
:
software_instance
.
getTextContent
(),
'connection_xml'
:
software_instance
.
getConnectionXml
(),
'connection_xml'
:
software_instance
.
getConnectionXml
(),
'filter_xml'
:
software_instance
.
getSlaXml
(),
'filter_xml'
:
software_instance
.
getSlaXml
(),
...
...
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