Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Joshua
erp5
Commits
1fda20a7
Commit
1fda20a7
authored
Aug 08, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_olapy: initial submission
parent
d5a9d47f
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
921 additions
and
0 deletions
+921
-0
bt5/erp5_olapy/ActionTemplateItem/portal_types/Olapy%20Connector/view.xml
...ctionTemplateItem/portal_types/Olapy%20Connector/view.xml
+85
-0
bt5/erp5_olapy/DocumentTemplateItem/portal_components/document.erp5.OlapyConnector.py
...ateItem/portal_components/document.erp5.OlapyConnector.py
+48
-0
bt5/erp5_olapy/DocumentTemplateItem/portal_components/document.erp5.OlapyConnector.xml
...teItem/portal_components/document.erp5.OlapyConnector.xml
+123
-0
bt5/erp5_olapy/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
...eAllowedContentTypeTemplateItem/allowed_content_types.xml
+5
-0
bt5/erp5_olapy/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
...rtalTypePropertySheetTemplateItem/property_sheet_list.xml
+5
-0
bt5/erp5_olapy/PortalTypeTemplateItem/portal_types/Olapy%20Connector.xml
...PortalTypeTemplateItem/portal_types/Olapy%20Connector.xml
+60
-0
bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy.xml
bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy.xml
+26
-0
bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view.xml
...plateItem/portal_skins/erp5_olapy/OlapyConnector_view.xml
+154
-0
bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view/my_reference.xml
...tal_skins/erp5_olapy/OlapyConnector_view/my_reference.xml
+90
-0
bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view/my_translated_validation_state_title.xml
...pyConnector_view/my_translated_validation_state_title.xml
+90
-0
bt5/erp5_olapy/TestTemplateItem/portal_components/test.erp5.testOlapyConnector.py
...ateItem/portal_components/test.erp5.testOlapyConnector.py
+101
-0
bt5/erp5_olapy/TestTemplateItem/portal_components/test.erp5.testOlapyConnector.xml
...teItem/portal_components/test.erp5.testOlapyConnector.xml
+123
-0
bt5/erp5_olapy/bt/dependency_list
bt5/erp5_olapy/bt/dependency_list
+1
-0
bt5/erp5_olapy/bt/template_action_path_list
bt5/erp5_olapy/bt/template_action_path_list
+1
-0
bt5/erp5_olapy/bt/template_document_id_list
bt5/erp5_olapy/bt/template_document_id_list
+1
-0
bt5/erp5_olapy/bt/template_format_version
bt5/erp5_olapy/bt/template_format_version
+1
-0
bt5/erp5_olapy/bt/template_portal_type_allowed_content_type_list
...5_olapy/bt/template_portal_type_allowed_content_type_list
+1
-0
bt5/erp5_olapy/bt/template_portal_type_id_list
bt5/erp5_olapy/bt/template_portal_type_id_list
+1
-0
bt5/erp5_olapy/bt/template_portal_type_property_sheet_list
bt5/erp5_olapy/bt/template_portal_type_property_sheet_list
+1
-0
bt5/erp5_olapy/bt/template_skin_id_list
bt5/erp5_olapy/bt/template_skin_id_list
+1
-0
bt5/erp5_olapy/bt/template_test_id_list
bt5/erp5_olapy/bt/template_test_id_list
+1
-0
bt5/erp5_olapy/bt/test_dependency_list
bt5/erp5_olapy/bt/test_dependency_list
+1
-0
bt5/erp5_olapy/bt/title
bt5/erp5_olapy/bt/title
+1
-0
No files found.
bt5/erp5_olapy/ActionTemplateItem/portal_types/Olapy%20Connector/view.xml
0 → 100644
View file @
1fda20a7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_view
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_view
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
view
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Action Information
</string>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
1.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
View
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/OlapyConnector_view
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_olapy/DocumentTemplateItem/portal_components/document.erp5.OlapyConnector.py
0 → 100644
View file @
1fda20a7
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2017 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from
Products.ERP5.Document.SOAPBinding
import
SOAPBinding
from
spyne.server.http
import
HttpBase
from
olapy.core.services.xmla
import
application
as
olapy_application
class
OlapyConnector
(
SOAPBinding
):
"""Connector to Olapy
"""
def
_getServer
(
self
):
"""ERP5.Document.SOAPBinding API to create a spyne server"""
try
:
serial
,
server
=
self
.
_v_server
if
serial
==
self
.
_p_serial
:
return
server
except
AttributeError
:
pass
server
=
HttpBase
(
olapy_application
)
self
.
_v_server
=
self
.
_p_serial
,
server
return
server
bt5/erp5_olapy/DocumentTemplateItem/portal_components/document.erp5.OlapyConnector.xml
0 → 100644
View file @
1fda20a7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</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>
OlapyConnector
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.OlapyConnector
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Document Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<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>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_olapy/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
0 → 100644
View file @
1fda20a7
<allowed_content_type_list>
<portal_type
id=
"Web Service Tool"
>
<item>
Olapy Connector
</item>
</portal_type>
</allowed_content_type_list>
\ No newline at end of file
bt5/erp5_olapy/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
0 → 100644
View file @
1fda20a7
<property_sheet_list>
<portal_type
id=
"Olapy Connector"
>
<item>
Reference
</item>
</portal_type>
</property_sheet_list>
\ No newline at end of file
bt5/erp5_olapy/PortalTypeTemplateItem/portal_types/Olapy%20Connector.xml
0 → 100644
View file @
1fda20a7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Base Type"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
content_icon
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Olapy Connector
</string>
</value>
</item>
<item>
<key>
<string>
init_script
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
permission
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Base Type
</string>
</value>
</item>
<item>
<key>
<string>
type_class
</string>
</key>
<value>
<string>
OlapyConnector
</string>
</value>
</item>
<item>
<key>
<string>
type_interface
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
type_mixin
</string>
</key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy.xml
0 → 100644
View file @
1fda20a7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Folder"
module=
"OFS.Folder"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
erp5_olapy
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view.xml
0 → 100644
View file @
1fda20a7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Base_edit
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
my_reference
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list>
<string>
my_translated_validation_state_title
</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
OlapyConnector_view
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
FTPConnector_view
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_view
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
FTP Connector
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view/my_reference.xml
0 → 100644
View file @
1fda20a7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_reference
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_reference
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view/my_translated_validation_state_title.xml
0 → 100644
View file @
1fda20a7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_translated_validation_state_title
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_translated_workflow_state_title
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_olapy/TestTemplateItem/portal_components/test.erp5.testOlapyConnector.py
0 → 100644
View file @
1fda20a7
##############################################################################
#
# Copyright (c) 2017 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from
StringIO
import
StringIO
import
xml.etree.ElementTree
as
ET
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
class
TestOlapy
(
ERP5TypeTestCase
):
def
publish
(
self
,
*
args
,
**
kw
):
""" add (partial) support for publish in live tests.
patch Zope.Testing.ZopeTestCase.functional publish, with support for request within a request
TODO: integrate in live test class.
"""
from
zope.security.management
import
endInteraction
from
zope.security.management
import
restoreInteraction
endInteraction
()
module_cache_set
=
getattr
(
self
.
portal
.
REQUEST
,
'_module_cache_set'
,
None
)
try
:
return
super
(
TestOlapy
,
self
).
publish
(
*
args
,
**
kw
)
finally
:
restoreInteraction
()
if
module_cache_set
is
not
None
:
self
.
portal
.
REQUEST
.
_module_cache_set
=
module_cache_set
def
afterSetUp
(
self
):
self
.
olapy_connector
=
self
.
portal
.
portal_web_services
.
newContent
(
portal_type
=
'Olapy Connector'
)
def
test_Execute
(
self
):
dummy_execute_message
=
"""<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:schemas-microsoft-com:xml-analysis"
xmlns:ns2="olapy.core.services.models"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns0:Body>
<Execute xmlns="urn:schemas-microsoft-com:xml-analysis">
<ns2:Command>
<ns2:Statement>SELECT {[Dim].[Dim].[column0].[data1],
[Dim].[Dim].[column0].[data2]} ON COLUMNS FROM ERP5</ns2:Statement>
</ns2:Command>
<ns2:Properties>
<ns1:PropertyList>
<ns1:AxisFormat>TupleFormat</ns1:AxisFormat>
<ns1:Format>Multidimensional</ns1:Format>
</ns1:PropertyList>
</ns2:Properties>
</Execute>
</ns0:Body>
</SOAP-ENV:Envelope>
"""
ret
=
self
.
publish
(
self
.
olapy_connector
.
absolute_url_path
(),
request_method
=
"POST"
,
handle_errors
=
False
,
stdin
=
StringIO
(
dummy_execute_message
))
# this can be parsed
tree
=
ET
.
fromstring
(
ret
.
getBody
())
# and looks like a SOAP/XMLA response
response
=
tree
.
find
(
'.//{urn:schemas-microsoft-com:xml-analysis}ExecuteResponse'
)
self
.
assertIsNotNone
(
response
)
# returning two cells
self
.
assertEqual
(
2
,
len
(
tree
.
findall
(
'.//{urn:schemas-microsoft-com:xml-analysis:mddataset}Cell'
'/{urn:schemas-microsoft-com:xml-analysis:mddataset}Value'
)))
bt5/erp5_olapy/TestTemplateItem/portal_components/test.erp5.testOlapyConnector.xml
0 → 100644
View file @
1fda20a7
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Test Component"
module=
"erp5.portal_type"
/>
</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>
testOlapyConnector
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testOlapyConnector
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Test Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<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>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_olapy/bt/dependency_list
0 → 100644
View file @
1fda20a7
erp5_web_service
\ No newline at end of file
bt5/erp5_olapy/bt/template_action_path_list
0 → 100644
View file @
1fda20a7
Olapy Connector | view
\ No newline at end of file
bt5/erp5_olapy/bt/template_document_id_list
0 → 100644
View file @
1fda20a7
document.erp5.OlapyConnector
\ No newline at end of file
bt5/erp5_olapy/bt/template_format_version
0 → 100644
View file @
1fda20a7
1
\ No newline at end of file
bt5/erp5_olapy/bt/template_portal_type_allowed_content_type_list
0 → 100644
View file @
1fda20a7
Web Service Tool | Olapy Connector
\ No newline at end of file
bt5/erp5_olapy/bt/template_portal_type_id_list
0 → 100644
View file @
1fda20a7
Olapy Connector
\ No newline at end of file
bt5/erp5_olapy/bt/template_portal_type_property_sheet_list
0 → 100644
View file @
1fda20a7
Olapy Connector | Reference
\ No newline at end of file
bt5/erp5_olapy/bt/template_skin_id_list
0 → 100644
View file @
1fda20a7
erp5_olapy
\ No newline at end of file
bt5/erp5_olapy/bt/template_test_id_list
0 → 100644
View file @
1fda20a7
test.erp5.testOlapyConnector
\ No newline at end of file
bt5/erp5_olapy/bt/test_dependency_list
0 → 100644
View file @
1fda20a7
erp5_full_text_myisam_catalog
\ No newline at end of file
bt5/erp5_olapy/bt/title
0 → 100644
View file @
1fda20a7
erp5_olapy
\ No newline at end of file
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