slapos.core:master commitshttps://lab.nexedi.com/rafael/slapos.core/-/commits/master2024-03-28T20:21:08+01:00https://lab.nexedi.com/rafael/slapos.core/-/commit/f93a7e73f5c4bb8a67b37545a7d28a105194f029slapos_erp5: Code was moved to erp5_administrator2024-03-28T20:21:08+01:00Rafael Monneratrafael@nexedi.comhttps://lab.nexedi.com/rafael/slapos.core/-/commit/277fd3882435abd27dd9ca06bad9be6da18be2f9slapos_cloud: Change for certificate authority (source_reference to csr_id)2024-03-28T20:21:08+01:00Rafael Monneratrafael@nexedi.comhttps://lab.nexedi.com/rafael/slapos.core/-/commit/038cd4f97410103db1a868a6edb00293cb58c01eslapos_cloud: use cryptography library to extract certificate information2024-03-28T20:21:05+01:00Rafael Monneratrafael@nexedi.com
The string (certificate) dont contains metadata text anymore only the certificate itself.https://lab.nexedi.com/rafael/slapos.core/-/commit/94a0479e7529c976b037f39d8ac2013f7adb6418slapos_*: Bootstrap caucase server/connector2024-03-28T20:18:36+01:00Rafael Monneratrafael@nexedi.com
Only launch caucase when needed. Not all tests need
caucase, this saves a bit the overhead to run ithttps://lab.nexedi.com/rafael/slapos.core/-/commit/a17e7ed4067ce4f3280eeb41a0ecd22c20c67103slapos_erp5: Drop/Update CertificateAuthorityTool related constraint2024-03-28T16:36:06+01:00Rafael Monneratrafael@nexedi.comhttps://lab.nexedi.com/rafael/slapos.core/-/commit/4ec9b0213de0d328b6d716253fbbac338b0f142dslapos_crm: test: stabilize dict serialization2024-03-28T14:05:03+01:00Romain Courteaudromain@nexedi.comhttps://lab.nexedi.com/rafael/slapos.core/-/commit/744ee9efb96b359b4495508e4606585262baddf3test: run rss and panel tests2024-03-27T16:04:21+01:00Romain Courteaudromain@nexedi.com
Also in this commit:
* add a test step to trigger all alarms
* update the expected bt5 listhttps://lab.nexedi.com/rafael/slapos.core/-/commit/c21eea51232a4a5d5f8bb372d626c430c2e9414eslapos_upgrader: provide migration scripts for virtual master logic2024-03-27T16:03:15+01:00Romain Courteaudromain@nexedi.com
Migrate the previous slapos master logic to virtual master:
Create needed Project, Software Product, Remote/Instance Node,
Subscription Request, Allocation Supply.https://lab.nexedi.com/rafael/slapos.core/-/commit/6c3e368c2c6f3a5af7ffe54ce5a2a8afa58db506slapos_configurator: do not prevent slapos_category to be updated2024-03-27T16:03:15+01:00Romain Courteaudromain@nexedi.com
Also in this commit: update tests
* use backup cloudooo
<a href="https://lab.nexedi.com/nexedi/slapos/commit/a729a6773194cbd0a1fa57d8f5547f06696ca83a" data-original="https://lab.nexedi.com/nexedi/slapos/commit/a729a6773194cbd0a1fa57d8f5547f06696ca83a" data-link="false" data-link-reference="true" data-project="15" data-commit="a729a6773194cbd0a1fa57d8f5547f06696ca83a" data-reference-type="commit" data-container="body" data-placement="top" data-html="true" title="stack/erp5: also use backup cloudooo by default" class="gfm gfm-commit has-tooltip">slapos@a729a677</a>
* many dependencies have been dropped
* change module id generator
* portal_callables is not handle by the configurator
See <a href="https://lab.nexedi.com/nexedi/erp5/-/commit/a55b0f78e975ed6cd3748d484a872b801b08f25b" data-original="https://lab.nexedi.com/nexedi/erp5/-/commit/a55b0f78e975ed6cd3748d484a872b801b08f25b" data-link="false" data-link-reference="true" data-project="1" data-commit="a55b0f78e975ed6cd3748d484a872b801b08f25b" data-reference-type="commit" data-container="body" data-placement="top" data-html="true" title="erp5_core: setup a random id generator on portal_callable" class="gfm gfm-commit has-tooltip">erp5@a55b0f78</a>https://lab.nexedi.com/rafael/slapos.core/-/commit/b2227408bfada47bb8d4ac97f589b6f336bc540dslapos_erp5: support for the virtual master logic2024-03-27T16:03:14+01:00Romain Courteaudromain@nexedi.com
There are 4 types of assigment family:
* The accounting team has assignment like: accounting/manager or accounting/agent
They can see all invoices, but can not modify the automated ledger
* The sale team has assignment like: sale/manager or sale/agent
* A virtual master customer has an assignment like:
function/customer
destination_project/THE_PREFERED_DEFAULT_PROJECT
He can request instance trees.
He can see all the nodes on the virtual master.
* The virtual master manager has assignment like:
function/production/manager
destination_project/THE_PROJECT
or
function/production/agent
destination_project/THE_PROJECT
He is responsible to create the compute node and ensure the quality
of the service provided on it (so, he manages the related crm).
Worklist must be usable, to quickly allow any user to know what is
expected from him in the system.
Also in this commit:
* change the module id generator to _generatePerDayNodeNumberId
to reduce conflicts on object creation
* change bt5 dependencies to use the new panel UIhttps://lab.nexedi.com/rafael/slapos.core/-/commit/784e255fe1c1499e47c1e22ffdd646483945725aslapos_jio: drop all logic moved to slapos_panel2024-03-27T16:01:40+01:00Romain Courteaudromain@nexedi.com
Keep only code which was not yet migrated.
This bt5 is not supposed to be installed anymore.https://lab.nexedi.com/rafael/slapos.core/-/commit/c90b1a51c01b29b87eea42230ee11899d94dfb87slapos_panel_ui_test: tests for the new panel usages2024-03-27T15:58:53+01:00Romain Courteaudromain@nexedi.comhttps://lab.nexedi.com/rafael/slapos.core/-/commit/7bc7f7bfe75b2e2ca95a7b2cbb621f7ad3272ba8slapos_panel: create a new panel application based on ERP5JS2024-03-27T15:58:53+01:00Romain Courteaudromain@nexedi.com
Simplify maintainance of the panel by putting back the business logic
into ERP5 actions.
This allows to:
* view panel actions in ERP5JS too
* use formulator to define what a user see
* not write JS code for every page
We loose the offline functionality, but this was never finished.https://lab.nexedi.com/rafael/slapos.core/-/commit/7021dfe170486b57785ca47fdf26c6babcd9fa14slapos_wechat: support new ID generator2024-03-27T15:17:13+01:00Romain Courteaudromain@nexedi.com
Modules switched to per day/node ID generator.
Also in this commit:
* drop not needed trade conditionshttps://lab.nexedi.com/rafael/slapos.core/-/commit/7246420a5ea2f2ab5568e5cb81f26f1b48ecf89aslapos_payzen: support new ID generator2024-03-27T15:17:13+01:00Romain Courteaudromain@nexedi.com
Modules switched to per day/node ID generator.
Also in this commit:
* drop templates
* drop not needed trade conditionshttps://lab.nexedi.com/rafael/slapos.core/-/commit/2a5fb9ab6e4a415cb2d8b9bac4579e7a0fd8f767slapos_rss_style: follow the new ticket/event structure2024-03-27T15:17:13+01:00Romain Courteaudromain@nexedi.comhttps://lab.nexedi.com/rafael/slapos.core/-/commit/4ec00b55cc45e077296eb6466c25ab3ee75a650eslapos_crm: support for the virtual master logic2024-03-27T15:17:13+01:00Romain Courteaudromain@nexedi.com
Unify Ticket and Event creation, to ensure consistency on the different categories.
Use causality category instead of aggregate, to link the Ticket to the context document (instance, node, ...).
Aggregate must be used to define the item of the movement resource.
Monitoring: the tickets are managed by the virtual master admin,
who is responsible to provide a good service quality.
Admin will use their worklist to see the ongoing tickets.
Regularisation Request: this ticket is handle by the accounting team.
Unpaid invoice can be related to any kind of service (instance, node), which
have only 2 states from the ticket point of view: running or destroyed.
Only check the automated ledger, do not be impacted by other kind of invoices.
Prevent allocation if a customer has an ongoing Regularisation Request.
TODO: handle case of unpaid invoices for professional customers
Also in this commit:
* drop templates
* use interaction workflow to trigger alarmshttps://lab.nexedi.com/rafael/slapos.core/-/commit/286a3bccc5d18eb388769b054ea2d75fc2320d45slapos_subscription_request: subscription request is only used to generate an...2024-03-27T15:17:13+01:00Romain Courteaudromain@nexedi.com
A Subscription Request is a ticket, which should be used to generate an Open Sale Order for a service.
When the Open Order is created, the ticket is closed, and not used anymore.
Drop the Subscription Condition object.
Using Sale Trade Condition is enough to define all the Open Order profiles.
Using Sale Supply is enough to define the prices.
As services can be created from SlapOS API, the Subscription Request
can be created after the service already exists.
Block allocation until the Open Sale Order has not been yet created.
User will be able to fill the services details, without it being used in the system.
Open Sale Order must be created, even if the service is free, to allow
using the inventory API on the services (using Packing List).
In order to reduce the number of invoice for the customer, ensure the
invoice date is stable for a customer, and provide discount to not invoice
unused period.
Do not use the same date for every users, to reduce load on the system
for that day.
To accept a payable service Subscription Request, the customer must
provide a deposit, which may be used to pay a not paid monthly invoice.
Also in this commit:
* drop not needed templates
* use interaction workflow to trigger alarms
* drop ecommerce dependencyhttps://lab.nexedi.com/rafael/slapos.core/-/commit/7c2d5b435c773c900b1e37cbf9421d3828f7712aslapos_accounting: stop generating a single open sale order per user2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.com
Instead of having a giant versionned Open Sale Order, containing all user
subscriptions, create one Open Sale Order per subscription.
The Open Order state can now be used to mark the subscription status.
This reduce the simulation tree size, as a such tree will not be
updated anymore when a subscription ends.
The Open Order stop date is set when closing the Open Order.
Create a new 'automated' ledger category, to explicitely mark the
deliveries managed by the alarms / scripts.
Drop the explicit reference of a specific business process / trade condition,
and allow any Trade Condition to be used, based on its predicate/trade_condition_type configuration.
Ensure the items are propagated in the simulation movements and delivery lines.
Aggregate Sale Invoices, based on their Trade Condition and profile values.
A user will have multiple invoices if he is using multiple virtual master's services.
Implement a VAT calculation for France only for now.
Delivery Line with a taxable business_contribution must trigger the
tax calculation script (which depends on many factors like type of sold items, customer address, ...)
and explicitely mark on the line the VAT rate.
Customer address can be modified in futur, without impacting the delivery
vat calculation.
Also in this commit:
* drop template usages
* use interaction workflow to trigger alarms
* do not generate invoice with a 0 total price
* drop hardcoded reference of hardcoded currencies
* add contraints on the simulation logic, to prevent generating wrong movements
* configure Sale Supply to allow more complex price definitions
* allow using any kind of resource on the deliveries
* disable consumption delivery generation (until better specified)
* stop forcing/hardcoding payment mode in advance
* support for variated resources
* allow to manually pay multiple invoices with a single payment
* drop the cloud contract tricks
* destroy items as soon as the Open Order is closed
* add a discount service to reduce the invoice price if wanted
* add a deposit service to support invoice prepaymenthttps://lab.nexedi.com/rafael/slapos.core/-/commit/e9384c584699970c8906d390544f832f90727932slapos_pdm: support for the virtual master logic2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.com
A Software Product is a variated resource with 2 axes:
- Software Product Release Variation (optional variation),
to not force updating Order/Delivery every time one Instance is upgraded
- Software Product Type Variation
It is linked to a Project (virtual master).
Redesign the Upgrade Decision logic.
It is now a Ticket, generated by the Allocation Supply configuration:
- upgrade is different for every Project
- upgrade can be triggered on a specific Node, or for a specific user
Upgrade Decision is created automatically only if there is a single possible release allocable
for a Software Product.
Otherwise, it must be created manually.
The Upgrade Decision must be approved by the Project manager,
who is responsible for the Allocation Supply configuration.
Also in this commit:
* drop template usage
* trigger alarm with interaction workflowhttps://lab.nexedi.com/rafael/slapos.core/-/commit/b3b6e3007b47e8abf885c26e4a8f78d4d737a011slapos_slap_tool: support for the virtual master logic2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.com
A project reference is required to create a compute node.
Add compatibility with the user request
Console client does not send a project reference.
Try to guess it for simple caseshttps://lab.nexedi.com/rafael/slapos.core/-/commit/e7f744c8e638b720fa1a38bc6ab659ea5a2ed793slapos_cloud: add virtual master concept2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.com
Drop the allocation scope open/subscription/public logic.
Instead, use Project as Virtual Master, and force
all slapos_cloud object to be linked to one Project:
* every Compute Node is linked to a Project
* any Project's Instance can be allocated on a Project's Compute Node
Allocation is managed by configuring an Allocation Supply document,
which defined on which Compute Node a Software Product can be allocated.
User are not allowed anymore to change the release/type/shared state of their Instance Tree.
Managing Compute Node is done on the virtual master level, and so,
there is no need to define any Compute Node administrator.
A Software Product is a variated resource with 2 axes: software release url and softare type.
Slave Instance are now allocated on Instance Node, which is created
from the Software Instance which will control the configuration.
Slave Instance allocation is also controlled by an Allocation Supply,
which allow separating the Software Instance and Slave Instances versions.
There could be any number of virtual master in the system.
Every virtual master defines its own Software Products.
Because of this, it is not possible to change a document's virtual master
after its creation.
Instance request can be propagated on another virtual master, by
allocating them on a Remote Node document, which will generate
a new Instance Tree request on another virtual master.
Also in this commit:
* trigger alarms as soon as possible with interaction workflow
which allows to reduce some alarms frequency
* drop never used Organisation logic
* drop person.requestSite
* drop audit_validation_workflow
* drop ComputePartition_getCustomAllocationParameterDict
This is a hack incompatible with virtual master standalone logic.
* drop cloud contract
* do not sort security base category when generating local roles
Otherwise, it is not possible to ensure source_section/function and destination/function generate the same local role
* stop using hardcoded currency/organisation/trade condition/business process
* drop templates usages
* add One Time Virtual Master Access Token portal type
Needed for compatibility with the compute node deploy scripthttps://lab.nexedi.com/rafael/slapos.core/-/commit/d359a4ab8c0f077b43793e81fddbf4fb5a4d349cslapos_category: new categories for the virtual master logic2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.com
* automated ledger
* drop allocation_scope/open/* categories
All compute nodes are public now
* add use/trade/deposit category
* add trade condition type categories.
This will be used to automatically select a Trade Condition in slapos_accounting
* add invoicing taxable vat categorieshttps://lab.nexedi.com/rafael/slapos.core/-/commit/32e5aef5d2b09f5496fcf1851a8689a113e44e4aerp5_interaction_drop: expand all validated open order every day2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.comhttps://lab.nexedi.com/rafael/slapos.core/-/commit/dfbd4bc4cc83378ff7e9582f29838d9fb8c52cadslapos_mysql_innodb_catalog: drop organisation_security_uid2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.comhttps://lab.nexedi.com/rafael/slapos.core/-/commit/629b217cc49fb86c3146e0b4a2c6b772ef6acd83slapos_mysql_innodb_catalog: drop not needed related keyes2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.com
* drop default_or_child_aggregate_reference
* drop default_or_child_aggregate_uid catalog key
* drop follow_up_default_or_child_aggregate_uid
* drop causality_subscription_request_related_uid related keyhttps://lab.nexedi.com/rafael/slapos.core/-/commit/37cbbf6a42c6afd184cc0e36641f6a7e83545005slapos_mysql_innodb_catalog: function_security_uid must be provided as catalo...2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.comhttps://lab.nexedi.com/rafael/slapos.core/-/commit/541e2922d667ca8b6e3fb46a041b6e09921e6626slapos_mysql_innodb_catalog: index Software Product Release Variation url_string2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.comhttps://lab.nexedi.com/rafael/slapos.core/-/commit/a883928aeaa2f6b91c33d23df52f35ba8603f290slapos_mysql_innodb_catalog: add function_security_uid columns2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.comhttps://lab.nexedi.com/rafael/slapos.core/-/commit/1864ce47f5a3ae9cfd8bd4764f735a85f384ec69slapos_mysql_innodb_catalog: configure title column as a keyword key2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.com
This make usage of the relationfield nicer.https://lab.nexedi.com/rafael/slapos.core/-/commit/0cfdfea477b775387d2b40404c5c0631bcdfae0aslapos_jio_hateoas_backward_compatibility: drop as not used2024-03-27T15:17:12+01:00Romain Courteaudromain@nexedi.comhttps://lab.nexedi.com/rafael/slapos.core/-/commit/1e6b3694052985f03979fff612898f5af2d96edcRevert "slapos_crm: Consider the default as "disabled" for monitor_scope"2024-03-26T09:33:37+01:00Romain Courteaudromain@nexedi.com
This reverts commit <a href="/nexedi/slapos.core/-/commit/d127603bde08164d83020ebae1273c4317b3c127" data-original="d127603bde08164d83020ebae1273c4317b3c127" data-link="false" data-link-reference="false" data-project="77" data-commit="d127603bde08164d83020ebae1273c4317b3c127" data-reference-type="commit" data-container="body" data-placement="top" data-html="true" title='slapos_crm: Consider the default as "disabled" for monitor_scope' class="gfm gfm-commit has-tooltip">d127603b</a>.https://lab.nexedi.com/rafael/slapos.core/-/commit/acff45335692847d3aa5e87017b6325abab75699slapos_cloud: Split edit in 22024-03-25T19:20:41+01:00Rafael Monneratrafael@nexedi.com
This is required due interacton workflow call on _setAlloctionScope.
We could change the capacity_scope to close (so allocation worklfow order dont matter, but
it would change the expected behaviour if we drop the interaction workflow, so it is more
reasonable keep the existing behaviour unchanged.https://lab.nexedi.com/rafael/slapos.core/-/commit/ccbf6e160bedba5a9ff5cb1aa117c591bd79de09Improve code for stable assertions2024-03-23T02:02:30+01:00Rafael Monneratrafael@nexedi.com
See merge request <a href="/nexedi/slapos.core/-/merge_requests/615" data-original="nexedi/slapos.core!615" data-link="false" data-link-reference="false" data-project="77" data-merge-request="7660" data-project-path="nexedi/slapos.core" data-iid="615" data-mr-title="Improve code for stable assertions" data-reference-type="merge_request" data-container="body" data-placement="top" data-html="true" title="" class="gfm gfm-merge_request">!615</a>https://lab.nexedi.com/rafael/slapos.core/-/commit/926841f6bd3bd4448393e9b6426c3f04fc65278ctest: use assertIn(a, b) instead of assertTrue(a in b)2024-03-22T20:32:49+01:00Jérome Perrinjerome@nexedi.com
same as <a href="https://lab.nexedi.com/nexedi/erp5/commit/2e3660543f" data-original="https://lab.nexedi.com/nexedi/erp5/commit/2e3660543f" data-link="false" data-link-reference="true" data-project="1" data-commit="2e3660543f6fa4e736f1eca42282e4be241053d8" data-reference-type="commit" data-container="body" data-placement="top" data-html="true" title="*: rewrite with lib2to3.fixes.fix_asserts and ad-hoc assertin" class="gfm gfm-commit has-tooltip">erp5@2e366054</a>https://lab.nexedi.com/rafael/slapos.core/-/commit/6b08195149798a8833a03c0dec5c3921bc10aa0dtestSlapOSSlapTool: compare canonical XML2024-03-22T20:32:24+01:00Jérome Perrinjerome@nexedi.com
With the previous approach, the test depend on the order of attributes,
but this order is not stable when hash randomization is enabled and we
don't care about order of attributes in this test.https://lab.nexedi.com/rafael/slapos.core/-/commit/08db1d8bde1fa4c1e45e80db4cc7ddc9ad5c3d3dtestSlapOSHalJsonStyleSkins: don't depend on query string parameter order whe...2024-03-22T20:32:24+01:00Jérome Perrinjerome@nexedi.com
This is no stable with hash randomization, with PYTHONHASHSEED=593 this
test failed.https://lab.nexedi.com/rafael/slapos.core/-/commit/69686a8c59aaaf3052ea8b180f54e2fbecea608cSlapOSCacheMixin: store cache json sorted for easier testing2024-03-22T20:32:24+01:00Jérome Perrinjerome@nexedi.com
slapos_cloud:testSlapOSCloud fails with PYTHONHASHSEED=385https://lab.nexedi.com/rafael/slapos.core/-/commit/251dd72f9dfc71b316d0f3cae75b3ad19e62df71jio_ui_test: update translation on websites before test2024-03-22T20:32:24+01:00Jérome Perrinjerome@nexedi.com
this is done by upgrader in production, so it's consistent to do it
before testhttps://lab.nexedi.com/rafael/slapos.core/-/commit/712ab6a3eb75af7bca38a3ea9850cdb4b49adbe7subscription_request: produce stable json for easier testing2024-03-22T20:32:23+01:00Jérome Perrinjerome@nexedi.com
sorted and with the usual workaround for trailing space bug