Commit 34909b9a authored by Gabriel Monnerat's avatar Gabriel Monnerat

merge 'master' in slave_instance

parents e6d1a320 12fd245b
......@@ -50,7 +50,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string># XXX For now, this script requires proxy manager\n
<value> <string encoding="cdata"><![CDATA[
# XXX For now, this script requires proxy manager\n
\n
# base_category_list : list of category values we need to retrieve\n
# user_name : string obtained from getSecurityManager().getUser().getUserName() [NuxUserGroup]\n
......@@ -70,19 +72,27 @@ movement_portal_type = "Sale Packing List Line"\n
\n
portal = obj.getPortalObject()\n
\n
movement = portal.portal_catalog.getResultValue(\n
security_dict = {}\n
\n
parent_url_list = []\n
for movement in portal.portal_catalog(\n
portal_type=movement_portal_type,\n
aggregate_uid=obj.getUid(),\n
simulation_state=portal.getPortalCurrentInventoryStateList() + portal.getPortalReservedInventoryStateList() + portal.getPortalTransitInventoryStateList(),\n
)\n
\n
if movement is not None:\n
):\n
item = movement.getAggregateValue(portal_type=item_portal_type)\n
if item is not None:\n
category_list.append({"aggregate": [item.getParentValue().getRelativeUrl()]})\n
parent_url = item.getParentValue().getRelativeUrl()\n
if parent_url not in parent_url_list:\n
parent_url_list.append(parent_url)\n
\n
if len(parent_url_list) > 0:\n
parent_url_list.sort()\n
category_list.append({"aggregate": parent_url_list})\n
return category_list\n
</string> </value>
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
......
......@@ -8928,6 +8928,20 @@ class TestVifibSlapWebService(testVifibMixin):
def stepRestoreComputerPartitionReferenceFromBufferB(self, sequence, **kw):
sequence['computer_partition_reference'] = sequence['buffer_b_computer_partition_reference']
def stepCheckHostingSubscriptionMultipleComputerAuditor(self, sequence, **kw):
hosting_subscription = self.portal.portal_catalog.getResultValue(
uid=sequence['hosting_subscription_uid'])
role_list = hosting_subscription.get_local_roles()
setup_packing_list_line_list = [q for q in
hosting_subscription.getAggregateRelatedValueList(
portal_type='Sale Packing List Line') if q.getResource() ==
self.portal.portal_preferences.getPreferredInstanceSetupResource()]
computer_list = [q.getAggregateValue(
portal_type='Computer Partition').getParentValue() for q in
setup_packing_list_line_list]
for computer in computer_list:
self.assertTrue((computer.getReference(), ('Auditor',))) in role_list
def test_bug_destruction_of_partition_originated_from_another_computer(self):
"""Checks that computer is capable to destroy own Software Instance
......@@ -9189,17 +9203,14 @@ class TestVifibSlapWebService(testVifibMixin):
CheckComputerPartitionInstanceCleanupSalePackingListDelivered
CheckComputerPartitionIsFree
Logout
LoginDefaultUser
CheckHostingSubscriptionMultipleComputerAuditor
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_bug_hosting_subscription_assignor_role_instability(self):
"""Show instability issue of Assignor role on Hosting Subscription
Related to fact when Hosting Subscription is associated to
Software Instances deployed on many computers"""
raise NotImplementedError
def test_bug_destruction_confirmed_instance_setup(self):
"""Proves that all is correctly handled in case of confirmed instance
setup packing list existence"""
......
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