Commit 393bb540 authored by Alain Takoudjou's avatar Alain Takoudjou

Merge branch 'master' into tap-nobridge

parents 64125d44 15c91309
Changes
=======
1.3.9 (2015-02-20)
------------------
* slapos.format: allow to format additional list of folder for each partition to use as data storage location.
* slapos.format: allow to create tap without bridge (when using option create_tap and tap_gateway_interface), configure ip route with generated ipv4 for tap to access guest vm from host machine.
* slapos.grid: update generated buildout file with information to acess partition data storage folder.
1.3.8 (2015-02-04)
------------------
......
......@@ -703,8 +703,8 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
<parameter id='mode'>unique_by_network</parameter>
</instance>"""
self._makeTree()
computer1, partition1 = self._makeComputer()
computer2, partition2 = self._makeComputer()
computer1 = self._makeComputer()[0]
computer2 = self._makeComputer()[0]
self._installSoftware(computer1, self.software_instance.getUrlString())
self._installSoftware(computer2, self.software_instance.getUrlString())
......@@ -735,8 +735,11 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
software_instance2.validate()
self.tic()
self.software_instance.setSlaXml(sla_xml)
self.software_instance.SoftwareInstance_tryToAllocatePartition()
self.tic()
self.assertEqual(
computer_network.getReference(),
self.software_instance.getAggregateValue(portal_type='Computer Partition')\
......@@ -767,7 +770,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
</instance>"""
self._makeTree()
computer1, partition1 = self._makeComputer()
computer2, partition2 = self._makeComputer()
computer2 = self._makeComputer()[0]
computer3, partition3 = self._makeComputer()
computer_network1 = self._makeComputerNetwork()
computer_network2 = self._makeComputerNetwork()
......@@ -905,8 +908,8 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
<parameter id='mode'>unique_by_network</parameter>
</instance>"""
self._makeTree()
computer1, partition1 = self._makeComputer()
computer2, partition2 = self._makeComputer()
computer1 = self._makeComputer()[0]
computer2 = self._makeComputer()[0]
self._installSoftware(computer1, self.software_instance.getUrlString())
self._installSoftware(computer2, self.software_instance.getUrlString())
......@@ -1843,7 +1846,7 @@ class TestSlapOSGarbageCollectNonAllocatedRootTreeAlarm(testSlapOSMixin):
'error_message': '',
'actor': 'ERP5TypeTestCase',
'slap_state': '',
'time': addToDate(DateTime(), to_add={'day': -6}),
'time': addToDate(DateTime(), to_add={'day': -2}),
'action': 'edit'
})
......@@ -1873,7 +1876,7 @@ class TestSlapOSGarbageCollectNonAllocatedRootTreeAlarm(testSlapOSMixin):
'error_message': '',
'actor': 'ERP5TypeTestCase',
'slap_state': '',
'time': addToDate(DateTime(), to_add={'day': -8}),
'time': addToDate(DateTime(), to_add={'day': -4}),
'action': 'edit'
})
......@@ -2065,7 +2068,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
def test_alarm_software_instance_invalidated(self):
instance = self.createSoftwareInstance()
partition = self.createComputerPartition()
self.createComputerPartition()
self.portal.portal_workflow._jumpToStateFor(instance, 'invalidated')
self.portal.portal_workflow._jumpToStateFor(instance, 'destroy_requested')
self.tic()
......@@ -2083,7 +2086,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
def test_alarm_software_instance_matching(self):
instance = self.createSoftwareInstance()
partition = self.createComputerPartition()
self.createComputerPartition()
self.portal.portal_workflow._jumpToStateFor(instance, 'validated')
self.portal.portal_workflow._jumpToStateFor(instance, 'destroy_requested')
self.tic()
......
......@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCloudAlarm</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCloudAlarm</string> </value>
......@@ -27,23 +39,13 @@
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple>
<string>E:1689, 2: method already defined line 1678 (function-redefined)</string>
</tuple>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:706, 15: Unused variable \'partition1\' (unused-variable)</string>
<string>W:707, 15: Unused variable \'partition2\' (unused-variable)</string>
<string>W:770, 15: Unused variable \'partition2\' (unused-variable)</string>
<string>W:908, 15: Unused variable \'partition1\' (unused-variable)</string>
<string>W:909, 15: Unused variable \'partition2\' (unused-variable)</string>
<string>W:2079, 4: Unused variable \'partition\' (unused-variable)</string>
<string>W:2097, 4: Unused variable \'partition\' (unused-variable)</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......@@ -53,13 +55,28 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<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>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -72,7 +89,7 @@
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -81,7 +98,7 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
......
......@@ -64,6 +64,7 @@ class TestSlaposSkinSelection(testSlapOSMixin):
'Multiflex',
'ODS',
'ODT',
'RJS',
'RSS',
'SHACACHE',
'SHADIR',
......@@ -220,6 +221,7 @@ zpt_generic
selection_string_list = \
"""
custom
erp5_web_renderjs_ui
slapos_upgrader
slapos_contract
slapos_crm_monitoring
......@@ -1130,6 +1132,108 @@ zpt_generic
"""
self.assertSameSkinSelection(skin_name, selection_string_list)
def test_18_RJS_selection(self, quiet=0, run=run_all_test):
"""
Check the skin folder order
"""
if not run: return
skin_name = 'RJS'
selection_string_list = \
"""
custom
erp5_web_renderjs_ui
slapos_upgrader
slapos_contract
slapos_crm_monitoring
slapos_accounting
slapos_administration
slapos_cache
slapos_cloud
slapos_cloud_promise
slapos_consumption
slapos_core
slapos_crm
slapos_hypermedia
slapos_payzen
slapos_pdm
slapos_rest_api
slapos_simulation
slapos_slap_tool
slapos_web
slapos_configurator
erp5_km
erp5_knowledge_pad
erp5_simulation
erp5_dms_base
erp5_dms_web
erp5_accounting_l10n_fr
erp5_upgrader
erp5_access_tab
erp5_access_token
erp5_accounting
erp5_administration
erp5_base
erp5_bearer_token
erp5_commerce
erp5_commerce_widget_library
erp5_computer_immobilisation
erp5_configurator
erp5_configurator_wizard
erp5_content_translation
erp5_core
erp5_core_proxy_field_legacy
erp5_credential
erp5_credential_oauth2
erp5_crm
erp5_data_set
erp5_dhtml_style
erp5_dms
erp5_fckeditor
erp5_forge
erp5_forge_release
erp5_gadget
erp5_glossary
erp5_ingestion
erp5_ingestion_test
erp5_integration
erp5_invoicing
erp5_item
erp5_item_trade
erp5_ods_core
erp5_odt_core
erp5_ooo_import
erp5_open_trade
erp5_payzen_secure_payment
erp5_pdm
erp5_project
erp5_project_trade
erp5_promise
erp5_rss_core
erp5_secure_payment
erp5_simplified_invoicing
erp5_software_pdm
erp5_stock_cache
erp5_system_event
erp5_toolbox
erp5_trade
erp5_vcs
erp5_web
erp5_web_crm
erp5_web_minimal_theme
erp5_web_service
erp5_web_widget_library
erp5_workflow
external_method
Images
activity
zpt_content
zpt_control
zpt_generic
"""
self.assertSameSkinSelection(skin_name, selection_string_list)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestSlaposSkinSelection))
......
......@@ -56,7 +56,8 @@ from DateTime import DateTime\n
\n
portal = context.getPortalObject()\n
\n
if context.getPortalType() == "Software Product":\n
if software_release_url is None and \\\n
context.getPortalType() == "Software Product":\n
software_product_reference = context.getReference()\n
\n
if software_product_reference is None:\n
......
......@@ -57,18 +57,24 @@ product_reference = context.getAggregateReference()\n
\n
decision_line_in_progress_list = portal.portal_catalog(\n
portal_type=\'Upgrade Decision Line\',\n
aggregate_uid=aggregate_uid)\n
default_aggregate_uid=aggregate_uid)\n
\n
for decision_line in decision_line_in_progress_list:\n
upgrade_decision = decision_line.getParentValue()\n
if upgrade_decision.getSimulationState() not in [\'planned\',\n
\'confirmed\', \'started\', \'stopped\']:\n
simulation_state = upgrade_decision.getSimulationState()\n
if simulation_state not in [\'planned\', \'confirmed\',\n
\'started\', \'stopped\', \'rejected\']:\n
continue\n
release_list = decision_line.getAggregateValueList(portal_type="Software Release")\n
if len(release_list) > 1:\n
continue\n
if not release_list[0]:\n
continue\n
# If the current sr in rejected we must prevent creation of new upgrade decision for this sr\n
if simulation_state == \'rejected\' and \\\n
release_list[0].getUrlString() != context.getUrlString():\n
continue\n
\n
# If both software release belong to the same software product, there is an upgrade decision in progress \n
if product_reference == release_list[0].getAggregateReference():\n
return upgrade_decision\n
......
......@@ -51,9 +51,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string>upgrade_decision = context\n
cancel_state_list = [\'confirmed\', \'planned\']\n
cancellable_state_list = [\'confirmed\', \'planned\']\n
require_state_list = [\'rejected\', \'confirmed\', \'planned\']\n
simulation_state = upgrade_decision.getSimulationState()\n
\n
if upgrade_decision.getSimulationState() in cancel_state_list:\n
if simulation_state in require_state_list:\n
current_release = upgrade_decision.UpgradeDecision_getSoftwareRelease()\n
if not current_release:\n
# This upgrade decision is not valid\n
......@@ -61,6 +63,7 @@ if upgrade_decision.getSimulationState() in cancel_state_list:\n
if current_release.getUrlString() == new_url_string:\n
# Cannot cancel because the software releases are the same\n
return False\n
if simulation_state in cancellable_state_list:\n
upgrade_decision.cancel()\n
return True\n
else:\n
......
......@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSPDMSkins</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSPDMSkins</string> </value>
......@@ -34,25 +46,8 @@
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 75, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:125, 0: Unnecessary semicolon (unnecessary-semicolon)</string>
<string>W:163, 0: Bad indentation. Found 6 spaces, expected 4 (bad-indentation)</string>
<string>W:164, 0: Bad indentation. Found 6 spaces, expected 4 (bad-indentation)</string>
<string>W:168, 0: Bad indentation. Found 6 spaces, expected 4 (bad-indentation)</string>
<string>W:169, 0: Bad indentation. Found 6 spaces, expected 4 (bad-indentation)</string>
<string>W:172, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:175, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:181, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:182, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W:184, 0: Bad indentation. Found 5 spaces, expected 4 (bad-indentation)</string>
<string>W: 96, 2: Arguments number differs from overridden method (arguments-differ)</string>
<string>W:461, 4: Unused variable \'upgrade_decision_line\' (unused-variable)</string>
<string>W:507, 4: Unused variable \'upgrade_decision_line\' (unused-variable)</string>
<string>W:551, 4: Unused variable \'upgrade_decision_line\' (unused-variable)</string>
<string>W:699, 4: Unused variable \'person\' (unused-variable)</string>
<string>W:726, 4: Unused variable \'person\' (unused-variable)</string>
<string>W:1189, 4: Unused variable \'upgrade_decision\' (unused-variable)</string>
<string>W:1291, 4: Unused variable \'upgrade_decision\' (unused-variable)</string>
<string>W:127, 2: Arguments number differs from overridden method (arguments-differ)</string>
<string>W:140, 2: Arguments number differs from overridden method (arguments-differ)</string>
</tuple>
</value>
</item>
......@@ -63,13 +58,28 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<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>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -82,7 +92,7 @@
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -91,7 +101,7 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
......
......@@ -98,7 +98,7 @@
<key>
<tuple>
<int>99</int>
<string>ERP5 Web Section/help</string>
<string>ERP5 Web Section/request</string>
</tuple>
</key>
<value>
......@@ -128,7 +128,7 @@
</item>
<item>
<key> <string>custom_render_method_id</string> </key>
<value> <string>WebSection_viewHelpRender</string> </value>
<value> <string>WebSection_intentRequest</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -137,12 +137,12 @@
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>help</string> </value>
<key> <string>empty_criterion_valid</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>10</int> </value>
<key> <string>id</string> </key>
<value> <string>request</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -156,11 +156,11 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Help</string> </value>
<value> <string>Request</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
......
......@@ -156,11 +156,15 @@
</item>
<item>
<key> <string>custom_render_method_id</string> </key>
<value> <string>WebSection_viewMySpaceRender</string> </value>
<value> <string>WebSection_viewHelpRender</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>This is your personal area. You can manage your services, your account, your information. A Help section is available to lead you if needed.</string> </value>
<value> <string encoding="cdata"><![CDATA[
<p> You can access our <a href="http://www.vifib.com/vifib-FAQ" target="_blank"> Frequently Asked Questions </a> to know more about our products usage.</p>
]]></string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -210,7 +210,7 @@
</item>
<item>
<key> <string>custom_render_method_id</string> </key>
<value> <string>WebSection_viewNextStep</string> </value>
<value> <string>WebSection_viewServiceChoiceDialog</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -7,6 +7,10 @@
<skin_folder>erp5_km_theme</skin_folder>
<skin_selection>Hosting</skin_selection>
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_web_renderjs_ui</skin_folder>
<skin_selection>View</skin_selection>
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_xhtml_style</skin_folder>
<skin_selection>Hosting</skin_selection>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_content</string> </value>
<value> <string>listbox_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -239,7 +239,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Content Message</string> </value>
<value> <string>Description</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
......
......@@ -73,7 +73,6 @@
<value>
<list>
<string>listbox</string>
<string>listbox_content</string>
</list>
</value>
</item>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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