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
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
ad8ef8a9
Commit
ad8ef8a9
authored
Apr 23, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialise REST API testing.
parent
cd537007
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1844 additions
and
0 deletions
+1844
-0
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/computer_module/test_vifib_slapos_rest_api_v1_computer.xml
...omputer_module/test_vifib_slapos_rest_api_v1_computer.xml
+127
-0
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/computer_module/test_vifib_slapos_rest_api_v1_computer/1.xml
...puter_module/test_vifib_slapos_rest_api_v1_computer/1.xml
+76
-0
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/hosting_subscription_module/test_vifib_slapos_rest_api_v1_hosting_subscription.xml
...le/test_vifib_slapos_rest_api_v1_hosting_subscription.xml
+187
-0
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/internal_packing_list_module/test_vifib_slapos_rest_api_v1_internal_packing_list.xml
...e/test_vifib_slapos_rest_api_v1_internal_packing_list.xml
+141
-0
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/internal_packing_list_module/test_vifib_slapos_rest_api_v1_internal_packing_list/1.xml
...test_vifib_slapos_rest_api_v1_internal_packing_list/1.xml
+45
-0
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/sale_order_module/test_vifib_slapos_rest_api_v1_sale_order.xml
...order_module/test_vifib_slapos_rest_api_v1_sale_order.xml
+183
-0
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/sale_order_module/test_vifib_slapos_rest_api_v1_sale_order/1.xml
...der_module/test_vifib_slapos_rest_api_v1_sale_order/1.xml
+52
-0
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/sale_packing_list_module/test_vifib_slapos_rest_api_v1_instance_setup_sale_packing_list.xml
...b_slapos_rest_api_v1_instance_setup_sale_packing_list.xml
+157
-0
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/sale_packing_list_module/test_vifib_slapos_rest_api_v1_instance_setup_sale_packing_list/1.xml
...slapos_rest_api_v1_instance_setup_sale_packing_list/1.xml
+102
-0
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/sale_trade_condition_module/test_vifib_slapos_rest_api_v1_sale_trade_condition.xml
...le/test_vifib_slapos_rest_api_v1_sale_trade_condition.xml
+165
-0
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/sale_trade_condition_module/test_vifib_slapos_rest_api_v1_sale_trade_condition/1.xml
.../test_vifib_slapos_rest_api_v1_sale_trade_condition/1.xml
+87
-0
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/software_instance_module/test_vifib_slapos_rest_api_v1_software_instance.xml
...odule/test_vifib_slapos_rest_api_v1_software_instance.xml
+235
-0
master/bt5/vifib_slapos_rest_api_v1_test/PortalTypeTemplateItem/portal_types/Vifib%20Rest%20API%20V1%20Tool.xml
...plateItem/portal_types/Vifib%20Rest%20API%20V1%20Tool.xml
+60
-0
master/bt5/vifib_slapos_rest_api_v1_test/TestTemplateItem/testVifibSlaposRestAPIV1.py
..._api_v1_test/TestTemplateItem/testVifibSlaposRestAPIV1.py
+201
-0
master/bt5/vifib_slapos_rest_api_v1_test/bt/copyright_list
master/bt5/vifib_slapos_rest_api_v1_test/bt/copyright_list
+1
-0
master/bt5/vifib_slapos_rest_api_v1_test/bt/dependency_list
master/bt5/vifib_slapos_rest_api_v1_test/bt/dependency_list
+3
-0
master/bt5/vifib_slapos_rest_api_v1_test/bt/description
master/bt5/vifib_slapos_rest_api_v1_test/bt/description
+1
-0
master/bt5/vifib_slapos_rest_api_v1_test/bt/license
master/bt5/vifib_slapos_rest_api_v1_test/bt/license
+1
-0
master/bt5/vifib_slapos_rest_api_v1_test/bt/revision
master/bt5/vifib_slapos_rest_api_v1_test/bt/revision
+1
-0
master/bt5/vifib_slapos_rest_api_v1_test/bt/template_format_version
.../vifib_slapos_rest_api_v1_test/bt/template_format_version
+1
-0
master/bt5/vifib_slapos_rest_api_v1_test/bt/template_path_list
...r/bt5/vifib_slapos_rest_api_v1_test/bt/template_path_list
+14
-0
master/bt5/vifib_slapos_rest_api_v1_test/bt/template_portal_type_id_list
...b_slapos_rest_api_v1_test/bt/template_portal_type_id_list
+1
-0
master/bt5/vifib_slapos_rest_api_v1_test/bt/template_test_id_list
...t5/vifib_slapos_rest_api_v1_test/bt/template_test_id_list
+1
-0
master/bt5/vifib_slapos_rest_api_v1_test/bt/title
master/bt5/vifib_slapos_rest_api_v1_test/bt/title
+1
-0
master/bt5/vifib_slapos_rest_api_v1_test/bt/version
master/bt5/vifib_slapos_rest_api_v1_test/bt/version
+1
-0
No files found.
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/computer_module/test_vifib_slapos_rest_api_v1_computer.xml
0 → 100644
View file @
ad8ef8a9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Computer"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
allocation_scope/open/personal
</string>
<string>
source_administration/person_module/test_vifib_customer
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_destination_reference
</string>
</key>
<value>
<string>
01
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
COMP-2
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test_vifib_slapos_rest_api_v1_computer
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Computer
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
test server
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/computer_module/test_vifib_slapos_rest_api_v1_computer/1.xml
0 → 100644
View file @
ad8ef8a9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Computer Partition"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
part0
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Computer Partition
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/hosting_subscription_module/test_vifib_slapos_rest_api_v1_hosting_subscription.xml
0 → 100644
View file @
ad8ef8a9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Hosting Subscription"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Author
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Author
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Author
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Author
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Author
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
explanation
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
predecessor/software_instance_module/test_vifib_slapos_rest_api_v1_software_instance
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
HOSTSUBS-0
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
RootSoftwareInstance
</string>
</value>
</item>
<item>
<key>
<string>
explanation
</string>
</key>
<value>
<string>
Set up because of /erp5/sale_packing_list_module/1/1
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test_vifib_slapos_rest_api_v1_hosting_subscription
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple>
<int>
0
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple>
<int>
0
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_month_day
</string>
</key>
<value>
<tuple>
<int>
19
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Hosting Subscription
</string>
</value>
</item>
<item>
<key>
<string>
root_slave
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
root_software_release_url
</string>
</key>
<value>
<string>
http://example.com/buildout.cfg
</string>
</value>
</item>
<item>
<key>
<string>
root_state
</string>
</key>
<value>
<string>
started
</string>
</value>
</item>
<item>
<key>
<string>
sla_xml
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<?xml version=\'1.0\' encoding=\'utf-8\'?>
\n
<instance>
\n
<parameter
id=
"computer_guid"
>
COMP-2
</parameter>
\n
</instance>
]]>
</string>
</value>
</item>
<item>
<key>
<string>
text_content
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<?xml version="1.0" encoding="utf-8"?>
\n
<instance>
\n
<parameter
id=
"nbd_ip"
>
2a01:e35:2e27:460:e2cb:4eff:fed9:48dc
</parameter>
\n
<parameter
id=
"nbd_port"
>
1024
</parameter>
\n
</instance>
]]>
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
test instance
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/internal_packing_list_module/test_vifib_slapos_rest_api_v1_internal_packing_list.xml
0 → 100644
View file @
ad8ef8a9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Internal Packing List"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
destination_section/person_module/test_vifib_customer
</string>
<string>
source_administration/person_module/test_vifib_customer
</string>
<string>
destination/person_module/test_vifib_customer
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
IPL-1
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test_vifib_slapos_rest_api_v1_internal_packing_list
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Internal Packing List
</string>
</value>
</item>
<item>
<key>
<string>
start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1334845509.33
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/internal_packing_list_module/test_vifib_slapos_rest_api_v1_internal_packing_list/1.xml
0 → 100644
View file @
ad8ef8a9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Internal Packing List Line"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
quantity_unit/unit/piece
</string>
<string>
base_contribution/base_amount/invoicing/discounted
</string>
<string>
base_contribution/base_amount/invoicing/taxable
</string>
<string>
use/trade/sale
</string>
<string>
aggregate/computer_module/test_vifib_slapos_rest_api_v1_computer
</string>
<string>
resource/service_module/computer_registration
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Internal Packing List Line
</string>
</value>
</item>
<item>
<key>
<string>
quantity
</string>
</key>
<value>
<float>
1.0
</float>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/sale_order_module/test_vifib_slapos_rest_api_v1_sale_order.xml
0 → 100644
View file @
ad8ef8a9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Sale Order"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
quantity_unit
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
string
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
price_currency/currency_module/EUR
</string>
<string>
source_section/organisation_module/vifib_internet
</string>
<string>
destination/person_module/test_vifib_customer
</string>
<string>
destination_decision/person_module/test_vifib_customer
</string>
<string>
specialise/sale_trade_condition_module/vifib_trade_condition
</string>
<string>
source/organisation_module/vifib_internet
</string>
<string>
destination_section/person_module/test_vifib_customer
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SO-1
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test_vifib_slapos_rest_api_v1_sale_order
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Sale Order
</string>
</value>
</item>
<item>
<key>
<string>
quantity_unit
</string>
</key>
<value>
<string>
unit/piece
</string>
</value>
</item>
<item>
<key>
<string>
received_date
</string>
</key>
<value>
<object>
<klass>
<global
id=
"1.1"
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1334845683.4
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
start_date
</string>
</key>
<value>
<object>
<klass>
<reference
id=
"1.1"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1334846134.66
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/sale_order_module/test_vifib_slapos_rest_api_v1_sale_order/1.xml
0 → 100644
View file @
ad8ef8a9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Sale Order Line"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
resource/service_module/vifib_instance_setup
</string>
<string>
quantity_unit/unit/piece
</string>
<string>
use/trade/sale
</string>
<string>
base_contribution/base_amount/invoicing/discounted
</string>
<string>
base_contribution/base_amount/invoicing/taxable
</string>
<string>
aggregate/software_instance_module/test_vifib_slapos_rest_api_v1_software_instance
</string>
<string>
aggregate/hosting_subscription_module/test_vifib_slapos_rest_api_v1_hosting_subscription
</string>
<string>
aggregate/software_release_module/test_software_release
</string>
<string>
aggregate/computer_module/test_vifib_slapos_rest_api_v1_computer/1
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Sale Order Line
</string>
</value>
</item>
<item>
<key>
<string>
price
</string>
</key>
<value>
<float>
0.0
</float>
</value>
</item>
<item>
<key>
<string>
quantity
</string>
</key>
<value>
<float>
1.0
</float>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/sale_packing_list_module/test_vifib_slapos_rest_api_v1_instance_setup_sale_packing_list.xml
0 → 100644
View file @
ad8ef8a9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Sale Packing List"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
source/organisation_module/vifib_internet
</string>
<string>
causality/sale_order_module/test_vifib_slapos_rest_api_v1_sale_order
</string>
<string>
source_section/organisation_module/vifib_internet
</string>
<string>
destination/person_module/test_vifib_customer
</string>
<string>
price_currency/currency_module/EUR
</string>
<string>
specialise/sale_trade_condition_module/vifib_trade_condition
</string>
<string>
destination_section/person_module/test_vifib_customer
</string>
<string>
destination_decision/person_module/test_vifib_customer
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SPL-1
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test_vifib_slapos_rest_api_v1_instance_setup_sale_packing_list
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Sale Packing List
</string>
</value>
</item>
<item>
<key>
<string>
start_date
</string>
</key>
<value>
<object
id=
"1.1"
>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1334846134.66
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
stop_date
</string>
</key>
<value>
<reference
id=
"1.1"
/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
SO-1
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/sale_packing_list_module/test_vifib_slapos_rest_api_v1_instance_setup_sale_packing_list/1.xml
0 → 100644
View file @
ad8ef8a9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Sale Packing List Line"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
resource/service_module/vifib_instance_setup
</string>
<string>
use/trade/sale
</string>
<string>
quantity_unit/unit/piece
</string>
<string>
aggregate/computer_module/test_vifib_slapos_rest_api_v1_computer/1
</string>
<string>
aggregate/hosting_subscription_module/test_vifib_slapos_rest_api_v1_hosting_subscription
</string>
<string>
aggregate/software_instance_module/test_vifib_slapos_rest_api_v1_software_instance
</string>
<string>
aggregate/software_release_module/test_software_release
</string>
<string>
base_contribution/base_amount/invoicing/discounted
</string>
<string>
base_contribution/base_amount/invoicing/taxable
</string>
<string>
causality/sale_order_module/test_vifib_slapos_rest_api_v1_sale_order/1
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Sale Packing List Line
</string>
</value>
</item>
<item>
<key>
<string>
price
</string>
</key>
<value>
<float>
0.0
</float>
</value>
</item>
<item>
<key>
<string>
quantity
</string>
</key>
<value>
<float>
1.0
</float>
</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>
<item>
<key>
<string>
movement
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</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/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/sale_trade_condition_module/test_vifib_slapos_rest_api_v1_sale_trade_condition.xml
0 → 100644
View file @
ad8ef8a9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Sale Trade Condition"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAY=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
destination_section/person_module/test_vifib_customer
</string>
<string>
source_section/person_module/test_vifib_customer
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
STC_1
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test_vifib_slapos_rest_api_v1_sale_trade_condition
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Sale Trade Condition
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
test server (COMP-2) supply condition
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</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/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<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=
"6"
aka=
"AAAAAAAAAAY="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/sale_trade_condition_module/test_vifib_slapos_rest_api_v1_sale_trade_condition/1.xml
0 → 100644
View file @
ad8ef8a9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Sale Supply Line"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
aggregate/computer_module/test_vifib_slapos_rest_api_v1_computer
</string>
<string>
resource/service_module/vifib_instance_setup
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
mapped_value_property_list
</string>
</key>
<value>
<tuple>
<string>
base_price
</string>
<string>
additional_price
</string>
<string>
discount_ratio
</string>
<string>
exclusive_discount_ratio
</string>
<string>
surcharge_ratio
</string>
<string>
variable_additional_price
</string>
<string>
non_discountable_additional_price
</string>
<string>
priced_quantity
</string>
<string>
base_unit_price
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Sale Supply Line
</string>
</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/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slapos_rest_api_v1_test/PathTemplateItem/software_instance_module/test_vifib_slapos_rest_api_v1_software_instance.xml
0 → 100644
View file @
ad8ef8a9
This diff is collapsed.
Click to expand it.
master/bt5/vifib_slapos_rest_api_v1_test/PortalTypeTemplateItem/portal_types/Vifib%20Rest%20API%20V1%20Tool.xml
0 → 100644
View file @
ad8ef8a9
<?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>
Vifib Rest API V1 Tool
</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>
VifibRestApiV1Tool
</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>
master/bt5/vifib_slapos_rest_api_v1_test/TestTemplateItem/testVifibSlaposRestAPIV1.py
0 → 100644
View file @
ad8ef8a9
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
import
transaction
import
httplib
import
urlparse
from
ZODB.POSException
import
ConflictError
class
TestVifibSlaposRestAPIV1
(
ERP5TypeTestCase
):
def
getWorkflowTransitionAmount
(
self
,
document
,
transition_id
):
amount
=
0
workflow_id_list
=
[
workflow_id
for
workflow_id
,
workflow_state
in
\
document
.
getWorkflowStateItemList
()]
for
wf_id
in
workflow_id_list
:
list_history_item
=
None
try
:
list_history_item
=
self
.
portal
.
portal_workflow
.
getInfoFor
(
ob
=
document
,
name
=
'history'
,
wf_id
=
wf_id
)
except
ConflictError
:
raise
except
Exception
:
pass
if
list_history_item
in
(
None
,
()):
continue
for
wf_dict
in
list_history_item
:
if
wf_dict
.
get
(
'action'
,
''
)
==
transition_id
:
amount
+=
1
return
amount
def
generateNewId
(
self
):
return
str
(
self
.
getPortalObject
().
portal_ids
.
generateNewId
(
id_group
=
(
'slapos_rest_api_v1_test'
)))
def
reindexAndUpdateLocalRoles
(
self
):
# reindex and update roles for all, and reindex again to update catalog
transaction
.
commit
()
for
o
in
self
.
document_list
:
o
.
recursiveImmediateReindexObject
()
transaction
.
commit
()
for
o
in
self
.
document_list
:
o
.
updateLocalRolesOnSecurityGroups
()
transaction
.
commit
()
for
o
in
self
.
document_list
:
o
.
recursiveImmediateReindexObject
()
transaction
.
commit
()
def
afterSetUp
(
self
):
self
.
customer
=
self
.
cloneByPath
(
'person_module/template_member'
)
self
.
customer_reference
=
'P'
+
self
.
test_random_id
self
.
customer
.
edit
(
reference
=
self
.
customer_reference
,
default_email_url_string
=
self
.
customer_reference
+
'@example.com'
)
self
.
customer
.
validate
()
for
assignment
in
self
.
customer
.
contentValues
(
portal_type
=
'Assignment'
):
assignment
.
open
()
self
.
test_random_id
=
self
.
generateNewId
()
self
.
document_list
=
[]
self
.
portal
=
self
.
getPortalObject
()
self
.
api_url
=
self
.
portal
.
portal_vifib_rest_api_v1
.
absolute_url
()
self
.
api_scheme
,
self
.
api_netloc
,
self
.
api_path
,
self
.
api_query
,
\
self
.
api_fragment
=
urlparse
.
urlsplit
(
self
.
api_url
)
self
.
reindexAndUpdateLocalRoles
()
def
cloneByPath
(
self
,
path
):
o
=
self
.
portal
.
restrictedTraverse
(
path
).
Base_createCloneDocument
(
batch_mode
=
1
)
self
.
document_list
.
append
(
o
)
return
o
def
createStartedInstance
(
self
):
self
.
computer
=
self
.
cloneByPath
(
'computer_module/test_vifib_slapos_rest_api_v1_computer'
)
self
.
computer
.
edit
(
reference
=
'C'
+
self
.
test_random_id
,
source_administration
=
self
.
customer
.
getRelativeUrl
()
)
self
.
computer
.
validate
()
for
p
in
self
.
computer
.
contentValues
(
portal_type
=
'Computer Partition'
):
self
.
computer_partition
=
p
p
.
validate
()
p
.
markFree
()
self
.
supply
=
self
.
cloneByPath
(
'sale_trade_condition_module/test_vifib_slapos_rest_api_v1_sale_trade_condition'
)
self
.
supply
.
edit
(
destination_section
=
self
.
customer
.
getRelativeUrl
(),
source_section
=
self
.
customer
.
getRelativeUrl
()
)
self
.
supply
.
validate
()
supply_line
=
self
.
supply
.
contentValues
()[
0
]
supply_line
.
edit
(
aggregate
=
self
.
computer
.
getRelativeUrl
())
self
.
internal_delivery
=
self
.
cloneByPath
(
'internal_packing_list_module/test_vifib_slapos_rest_api_v1_internal_packing_list'
)
self
.
internal_delivery
.
edit
(
destination_section
=
self
.
customer
.
getRelativeUrl
(),
source_administration
=
self
.
customer
.
getRelativeUrl
(),
destination
=
self
.
customer
.
getRelativeUrl
(),
)
internal_line
=
self
.
internal_delivery
.
contentValues
()[
0
]
internal_line
.
edit
(
aggregate
=
self
.
computer
.
getRelativeUrl
())
self
.
internal_delivery
.
confirm
()
self
.
internal_delivery
.
stop
()
self
.
internal_delivery
.
deliver
()
self
.
software_release
=
self
.
cloneByPath
(
'software_release_module/test_software_release'
)
self
.
software_release
.
edit
(
url_string
=
self
.
test_random_id
,
reference
=
self
.
test_random_id
)
self
.
software_release
.
publish
()
self
.
instance_title
=
'T'
+
self
.
test_random_id
self
.
instance_reference
=
'SI'
+
self
.
test_random_id
self
.
hosting_subscription
=
self
.
cloneByPath
(
'hosting_subscription_module/test_vifib_slapos_rest_api_v1_hosting_subscription'
)
self
.
hosting_subscription
.
setReference
(
'HS'
+
self
.
test_random_id
)
self
.
hosting_subscription
.
setTitle
(
self
.
instance_title
)
self
.
hosting_subscription
.
validate
()
self
.
software_instance
=
self
.
cloneByPath
(
'software_instance_module/test_vifib_slapos_rest_api_v1_software_instance'
)
self
.
software_instance
.
edit
(
reference
=
self
.
instance_reference
,
title
=
self
.
instance_title
)
self
.
software_instance
.
validate
()
self
.
software_instance
.
requestStartComputerPartition
()
self
.
hosting_subscription
.
setPredecessor
(
self
.
software_instance
.
getRelativeUrl
())
self
.
order
=
self
.
cloneByPath
(
'sale_order_module/test_vifib_slapos_rest_api_v1_sale_order'
)
self
.
order
.
edit
(
destination_section
=
self
.
customer
.
getRelativeUrl
(),
destination_decision
=
self
.
customer
.
getRelativeUrl
(),
destination
=
self
.
customer
.
getRelativeUrl
()
)
aggregate_list
=
[
self
.
software_instance
.
getRelativeUrl
(),
self
.
hosting_subscription
.
getRelativeUrl
(),
self
.
software_release
.
getRelativeUrl
(),
self
.
computer_partition
.
getRelativeUrl
()
]
order_line
=
self
.
order
.
contentValues
()[
0
]
order_line
.
edit
(
aggregate_list
=
aggregate_list
)
self
.
order
.
order
()
self
.
order
.
confirm
()
self
.
packing_list
=
self
.
cloneByPath
(
'sale_packing_list_module/test_vifib_slapos_rest_api_v1_instance_setup_sale_packing_list'
)
self
.
packing_list
.
edit
(
causality
=
self
.
order
.
getRelativeUrl
(),
destination
=
self
.
customer
.
getRelativeUrl
(),
destination_section
=
self
.
customer
.
getRelativeUrl
(),
destination_decision
=
self
.
customer
.
getRelativeUrl
(),
)
packing_list_line
=
self
.
packing_list
.
contentValues
()[
0
]
packing_list_line
.
edit
(
aggregate_list
=
aggregate_list
,
causality
=
order_line
.
getRelativeUrl
())
self
.
packing_list
.
confirm
()
self
.
packing_list
.
start
()
self
.
packing_list
.
stop
()
self
.
open_order
=
self
.
cloneByPath
(
'open_sale_order_module/test_vifib_customer_open_sale_order'
)
self
.
open_order
.
edit
(
reference
=
'OO'
+
self
.
test_random_id
,
destination_section
=
self
.
customer
.
getRelativeUrl
(),
destination_decision
=
self
.
customer
.
getRelativeUrl
(),
destination
=
self
.
customer
.
getRelativeUrl
()
)
self
.
open_order
.
deleteContent
(
list
(
self
.
open_order
.
objectIds
()))
self
.
open_order
.
newContent
(
portal_type
=
'Open Sale Order Line'
,
resource
=
'service_module/vifib_instance_subscription'
,
base_contribution
=
[
'base_amount/invoicing/discounted'
,
'base_amount/invoicing/taxable'
],
use
=
'trade/sale'
,
quantity_unit
=
'unit/piece'
,
aggregate
=
self
.
hosting_subscription
.
getRelativeUrl
()
)
self
.
open_order
.
order
()
self
.
open_order
.
validate
()
self
.
reindexAndUpdateLocalRoles
()
def
test_instance_destruction_started
(
self
):
transition_id
=
'request_software_instance'
self
.
createStartedInstance
()
amount
=
self
.
getWorkflowTransitionAmount
(
self
.
customer
,
transition_id
)
connection
=
httplib
.
HTTPConnection
(
self
.
api_netloc
)
connection
.
request
(
method
=
'DELETE'
,
url
=
'/'
.
join
([
self
.
api_path
,
'instance'
,
self
.
instance_reference
]),
body
=
''
,
headers
=
{
'REMOTE_USER'
:
self
.
customer_reference
})
response
=
connection
.
getresponse
()
self
.
assertEqual
(
response
.
status
,
httplib
.
ACCEPTED
,
'%s was expected, but got %s with response:
\
n
%s'
%
(
httplib
.
ACCEPTED
,
response
.
status
,
response
.
read
()))
self
.
assertEqual
(
amount
+
1
,
self
.
getWorkflowTransitionAmount
(
self
.
customer
,
transition_id
),
'Transition %s was not called'
%
transition_id
)
raise
NotImplementedError
(
'Check that passed reference was used in wf transition'
)
master/bt5/vifib_slapos_rest_api_v1_test/bt/copyright_list
0 → 100644
View file @
ad8ef8a9
2012 Vifib
\ No newline at end of file
master/bt5/vifib_slapos_rest_api_v1_test/bt/dependency_list
0 → 100644
View file @
ad8ef8a9
vifib_slapos_rest_api_v1
vifib_slapos_core_test
vifib_erp5
\ No newline at end of file
master/bt5/vifib_slapos_rest_api_v1_test/bt/description
0 → 100644
View file @
ad8ef8a9
Restful API V1 for Vifib
\ No newline at end of file
master/bt5/vifib_slapos_rest_api_v1_test/bt/license
0 → 100644
View file @
ad8ef8a9
GPL
\ No newline at end of file
master/bt5/vifib_slapos_rest_api_v1_test/bt/revision
0 → 100644
View file @
ad8ef8a9
1
\ No newline at end of file
master/bt5/vifib_slapos_rest_api_v1_test/bt/template_format_version
0 → 100644
View file @
ad8ef8a9
1
\ No newline at end of file
master/bt5/vifib_slapos_rest_api_v1_test/bt/template_path_list
0 → 100644
View file @
ad8ef8a9
computer_module/test_vifib_slapos_rest_api_v1_computer
computer_module/test_vifib_slapos_rest_api_v1_computer/**
hosting_subscription_module/test_vifib_slapos_rest_api_v1_hosting_subscription
hosting_subscription_module/test_vifib_slapos_rest_api_v1_hosting_subscription/**
internal_packing_list_module/test_vifib_slapos_rest_api_v1_internal_packing_list
internal_packing_list_module/test_vifib_slapos_rest_api_v1_internal_packing_list/**
sale_order_module/test_vifib_slapos_rest_api_v1_sale_order
sale_order_module/test_vifib_slapos_rest_api_v1_sale_order/**
sale_packing_list_module/test_vifib_slapos_rest_api_v1_instance_setup_sale_packing_list
sale_packing_list_module/test_vifib_slapos_rest_api_v1_instance_setup_sale_packing_list/**
sale_trade_condition_module/test_vifib_slapos_rest_api_v1_sale_trade_condition
sale_trade_condition_module/test_vifib_slapos_rest_api_v1_sale_trade_condition/**
software_instance_module/test_vifib_slapos_rest_api_v1_software_instance
software_instance_module/test_vifib_slapos_rest_api_v1_software_instance/**
\ No newline at end of file
master/bt5/vifib_slapos_rest_api_v1_test/bt/template_portal_type_id_list
0 → 100644
View file @
ad8ef8a9
Vifib Rest API V1 Tool
\ No newline at end of file
master/bt5/vifib_slapos_rest_api_v1_test/bt/template_test_id_list
0 → 100644
View file @
ad8ef8a9
testVifibSlaposRestAPIV1
\ No newline at end of file
master/bt5/vifib_slapos_rest_api_v1_test/bt/title
0 → 100644
View file @
ad8ef8a9
vifib_slapos_rest_api_v1_test
\ No newline at end of file
master/bt5/vifib_slapos_rest_api_v1_test/bt/version
0 → 100644
View file @
ad8ef8a9
0.1
\ 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