1. 27 Mar, 2024 5 commits
    • Romain Courteaud's avatar
      slapos_crm: · e80aa188
      Romain Courteaud authored
      * source_administration is not used anymore on Compute Node
      * add virtual master contraint to tickets and events portal types
      * propagate project from Regularisation Request to event
      * delivery/movement must use source_project instead of follow_up
      * set source_project on event
      * stop setting person as source_project
      * copy project from ticket to the new event
      * utf-8 encoding issue
      * XXX disable regularisation request alarm
      * Regularisation Request Module acquires local roles
        See other modules
      * drop upgrade_scope
        Upgrade is managed by Allocation Supply.
      * drip upgrade_scope usage
      * drop Upgrade Decision Line usage
      * lint test
      * fix slapos_crm_check_software_installation_state alarm test
      * fixup slapos_crm_check_compute_node_state tests
      * fixup slapos_crm_check_instance_in_error test
      * fixup slapos_crm_update_support_request_state tests
      * fixup slapos_crm_send_pending_ticket_reminder test
      * fixup slapos_crm_trigger_stop_reminder_escalation tests
      * fixup slapos_crm_trigger_stop_acknowledgment_escalation test
      * fixup slapos_crm_trigger_delete_reminder_escalation test
      * fix slapos_crm_trigger_acknowledgment_escalation test
      * fix slapos_crm_stop_instance_tree test
      * fix slapos_crm_invalidate_suspended_regularisation_request test
      * fix slapos_crm_delete_instance_tree test
      * fix slapos_crm_create_regularisation_request test
      * drop slapos_crm_check_update_allocation_scope tests
      * do not require source_project on crm
      * fixup rebase: drop Instance Tree Module | slapos_resilience_usage_report
      * drop preferred_support_request_template_property
      * drop slapos_crm_support_request_template
      * fixup slapos_crm_create_regularisation_request tests
      * reactivate slapos_crm_create_regularisation_request
      * test slapos_crm_invalidate_suspended_regularisation_request is ok
      * test slapos_crm_check_software_installation_state
      * test slapos_crm_check_instance_in_error
      * test slapos_crm_update_support_request_state
      * desactivate Person_getSubscriptionRequestFirstUnpaidInvoiceList
      * drop Person_getSubscriptionRequestFirstUnpaidInvoiceList
      * do not count all Support Requests
        limit parameter with count is meaningless, as count return 1 result
      * update Base_getSupportRequestInProgress usage
      * XXX disable ticket.notify and ticket.requestEvent
      * wip script to create Support Request and Event
      * search a matching Trade Condition to generate a Support Request
      * update ComputeNode_checkState to use new scripts
      * test ComputeNode_checkSoftwareInstallationState
      * deliver outgoing events
      * test InstanceTree_checkSoftwareInstanceState
      * Project_createSupportRequestWithCausality already checks if Support Request exists
      * no need to check twice the object portal type
      * test SupportRequest_updateMonitoringState
      * activate one more alarm
      * revert  Send Mail on pending tickets
        nexedi/slapos.core!417
        Virtual Master's manager are responsible to handle the tickets through their worklist.
        Not user.
        Virtual Master's manager can send email from the Ticket to directly ping a user.
      * drop ticket_slap_interface_workflow
      * test ComputeNode_hasContactedRecently
        Do not check if there is a packing list. It is unrelated to the contact.
      * Base_getOpenRelatedTicketList was dropped
      * ComputeNode_checkAndUpdateAllocationScope was dropped
      * test: simplify
      * set comment in the event workflow history
      * send Mail Message
      * unify event creation
        Reuse Ticket_createProjectEvent
      * do not pass a empty list of node_uid
      * no need to manually handle the notification message
      * create the Regularisation Request from a Trade Condition instead of a template
      * use notification message title instead of the ticket title
      * use Entity_hasOutstandingAmount
        Entity_getOutstandingAmount is meaningless in case of multiple source_section and multiple currencies.
        Entity_hasOutstandingAmount will only report True or False.
      * test RegularisationRequest_invalidateIfPersonBalanceIsOk
      * test RegularisationRequest_checkToTriggerNextEscalationStep
      * test RegularisationRequest_triggerStopReminderEscalation
      * test RegularisationRequest_triggerStopAcknowledgmentEscalation
      * test RegularisationRequest_triggerDeleteReminderEscalation
      * test RegularisationRequest_stopInstanceTreeList
      * test RegularisationRequest_deleteInstanceTreeList
      * fixup RegularisationRequest_checkToSendUniqEvent tests
      * fixup RegularisationRequest_checkToTriggerNextEscalationStep tests
      * fixup InstanceTree_stopFromRegularisationRequest tests
      * fixup InstanceTree_deleteFromRegularisationRequest tests
      * drop slapos_crm_regularisation_request_template
      * drop slapos_crm_web_message_template
      * drop preferred_web_message_template_property
      * drop slapos_ticket_trade_condition
      * drop update_destination_for_slapos
      * drop allocation_tester
      * drop template_software_installation
      * drop template_instance_tree
      * drop template_member
      * test: fixup person title
      * test: fixup: ensure tickets can be created
      * test: fixup creation of instance tree
      * test: fixup instance tree creation
      * test: ComputeNode_getTicketRelatedList was dropped
      * test: rss feed will be used by virtual manager production
      * test: ticket.approveRegistration was dropped
      * ExactMatch
      * drop preferred_cloud_contract_enabled_property
      * only submit the newlu created Support Request
        end user can not validate their submitted ticket
      * drop jump_related_slapos_item
      * drop outdated SlapOSSupportRequestConstraint
      * submit created event
        This allow to separate new ticket from the one currently handled
      * constraint was dropped
      * test: create test ticket in submitted state
      * support request are created in submitted state
      * drop open/personal allocation_scope
      * only check automated Outstanding Invoices
      * invalidate Regularisation Request as soon as payment is done
      * create the regularisation request as soon as possible
      * use _baseSetGroupingReference for interaction
      * test: disable interaction
      * test: use PinnedDateTime context
      * delete instance, compute node, project if regularisation request reach the end
      * test: add crm scenario showing services are destroyed
      * trigger Project invalidation as soon as Nodes and Instances are invalidated
      * trigger not paid item deletion as fast as possible
      * test: reduce number of alarm triggered
      * do not stop but delete directly
        Services were already in degraded mode due to allocation/propagation being forbidden
      * test: only payable services are destroyed by the subscription request
      e80aa188
    • Romain Courteaud's avatar
      slapos_subscription_request: · c15f1270
      Romain Courteaud authored
      * drop not needed condition
      * factorize some code
      * test: always create open order before trying to allocate
      * define subscription prices on Sale Trade Condition
        Prices are defined on Supply Line inside Sale Trade Condition.
        Drop prices from Subscription Condition.
        Instead, link the Subscription Condition to a Sale Trade Condition.
        Apply the Sale Trade Condition on the created Open Sale Order.
        Stop duplicating properties from the Subscription Condition to the created Subscription Request.
        Payment is managed by the 'payment' category, and not the language.
        This allows to remove all '==zh' conditions.
        Instead, use custom Sale Trade Condition.
      * use explicit id to improve understanding of all paths
        Clarify trade condition title
      * add new trade condition versions
        The new versions do not include any price informations.
        It is needed to create new Trade Condition which inherite from those versions.
        Update preference to use those latest trade conditions.
      * rename couscous trade condition
      * change subscription price. Do not defined it as ttc
        Try to understand why price is not always copied
      * trigger compute node open order creation
      * subscription scenario needs project now
      * project is needed when requesting an instance
      * hardcode automated ledger category for the newly created sale packing list
      * hardcode automated ledger category for the newly created accounting transactions
      * automated ledger path
      * add ledger to the accounting template
      * only add a project assignment for the existing admin user
      * create normal user with the project customer assignment
      * update cdn subscription test
        project reference needed
      * add project for chinese subscription
      * project needed for scenario tests
      * all Subscription/Trial object must be linked to a Project
      * test: user need to be linked to a project
      * propagate source project
      * delivery/movement must use source_project instead of follow_up
      * set source_project on event
      * delivery/movement must use source_project instead of follow_up
      * use source_project instead of follow_up
      * use source_project instead of follow_up
      * test set server allocation_scope/open
      * Subscription COndition uses follow_up to link to the Project
      * add missing source_project base category on Subscription Request
        XXX Subscription Request must inherit this from ticket instead of defining all of this manually
      * Subscription COndition uses follow to link to Project
      * also add destination_project on Subscription Request to ensure constraint can be triggered
      * fix user account assignment creation from SubscriptionRequest
      * create software product/release in test
      * improve software product/release
      * expect Sale Packing List to use a Software Product
      * use Software Product as resource
      * drop audit from Subscription Request
      * DROP slapos_sbuscription_request
        Only for lazy me to simplify grep usage
      * Subscription Request is a ticket like Credential Request
      * restore subscription_request_workflow as ticket_workflow
      * Subscription Request is not linked to a project
      * add Subscription Request Constraint
      * new constraint on Subscription Request
      * add testSlapOSERP5VirtualMasterSubscriptionRequestScenario
      * drop outdated subscription scenarios
      * WIP selling project subscription
      * forbid Subscription Request which could generate Invoice with a 0 price
      * do not allow empty quantity on Subscription Request
      * WIP selling virtual master to customer
      * improve test Trade Condition
      * disable existing Subscription Request alarm
      * create Subscription Request from orphaned Instance Tree
      * create Open Sale Order from Subscription Request
      * drop slapos_subscription_request_process_planned
      * drop slapos_subscription_request_process_draft
      * drop slapos_subscription_request_process_ordered
      * drop slapos_subscription_request_process_confirmed
      * drop slapos_subscription_request_process_started
      * drop slapos_subscription_request_process_stopped
      * drop Alarm_processStoppedSubscriptionRequest
      * test slapos_subscription_request_create_from_orphaned_item
      * add assert when creating Open Order
      * alarm to validate submitted Subscription Request
      * create Subscription Requuest manually from a resource
      * create Subscription Request for Compute Node
      * trigger validation as soon as a Subscription Request is submitted
      * decrease slapos_subscription_request_validate_submitted alarm periodicity
      * create Subscription Request as soon as a Compute Node is validated
      * create Subscription Request as soon as Instance Tree is validated
      * use different trade condition for instance and node
      * do not generate Subscription for Organisation
        This work must be done later
      * constraint: no Organisation as source_section
      * constraint: fixup empty price check
      * constraint: destination_section is not required
        for accounting less subscription
      * stop creating project from subscription request
        It is too complex (as it requires to create Trade Condition, Assignment, Project, etc...), and I don't know for now how to make something generic from it.
        Use a custom action for now.
      * test that Subscription Request is created from Compute Node
      * drop SubscriptionRequest_processStopped
      * drop SubscriptionRequest_processStarted
      * drop SubscriptionRequest_processOrdered
      * drop SubscriptionRequest_processConfirmed
      * drop SubscriptionRequest_processRequest
      * drop SubscriptionCondition_renderKVMClusterParameter
      * drop Base_instanceXmlToDict
      * drop SubscriptionCondition_renderParameter
      * drop testSlapOSERP5VirtualMasterSubscriptionRequestScenario
      * ensure Subscription Request is consistent
      * allow to choose the currency when creating a Subscription Request
      * try to close the Subscription Request as soon as user paid an invoice
      * block subscription process if there is no deposit
      * do not accept new services if the virtual master subscription state is not expected
      * use Base_reindexAndSenseAlarm
      * do not set the stop_date on the open order
      * generate a discount on the first invoice
        If the open order does not start the same day, do not ask user to pay for those missing days
      * no need to call OpenSaleOrder_updatePeriod when creating the open order
      * drop accounting_list action
        This action hardcodes rapidspace organisation, and has a different logic from the new implementation
      * drop unused scripts
      * use the same hosting subscription periodicity per user
        Ensure all invoices for one user will be created at the same date.
        Ensure all users do not use the same periodicity, to NOT generated all system invoices on the same date.
      * do not encode url parameter in tales
      * allow to check if creating a subscription request is possible
      * update subscription history ifvalidation is rejected
      * do not generate discount if the price is 0
      * set trade_condition_type on temporary Sale Order
      * do not set the software release as variation on the Open Order
      * update xml format
      * assert trade_condition_type are the same
      * update Subscription Request view
      * configure the Subscription Request like a Support Request.
        Customer as destination_decision
      * update constraint as categories were inversed on subscription request
      * fixup variable name
      * Subscription Request categories were inverted
      * invert source_project/destination_project
      * source/destination have been inverted
      * provice Associate worklist for submitted Subscription Request
      * drop Subscription Condition
      * drop ecommerce_dependency
      * drop Subscription Condition
      * drop unused SubscriptionRequest_verifyReservationPaymentTransaction
      * drop SubscriptionRequest_verifyPaymentBalanceIsReady
      * test: SubscriptionRequest_verifyInstanceIsAllocated was dropped
      * display Subscription Request's events
      * create an Event when the Subscription Request can not be validated
      * drop slapos_update_subscription_request_consistency_state alarm
      * drop slapos_subscription_request_process_ alarms
      * test slapos_subscription_request_validate_submitted
      * use souce_project to find the trade condition
        no need to trick source/destination project anymore, as trade_condition_type is used
      * reduce the precision of the discount price
        The idea is to reduce the risk of bad precision when building the related accounting transactions
      * drop unused scripts
      * drop proxy role
      * drop accounting_module/slapos_pre_payment_template
      * drop slapos_wechat_pre_payment_template
      * drop template_wechat_pre_payment_subscription_sale_invoice_transaction
      * drop template_pre_payment_subscription_sale_invoice_transaction
      * only try to create subscription request from validated instance/compute node
      * reduce frenquency of the subscription request creation alarm
      * test: validate items
      * only check automated ledger
      * reduce conflict on modules
      * allow to provide a default price while creating subscription request
      * fix getPrice usage
      * wait for the request indexaction before launching again the alarm
      * put the item reference in the open order title
      * set open order title
      * improve columns on subscription list
      * ensure no price is found if no accounting is expected
      * nearly revert ensure no price is found if no accounting is expected
        Do not care of Sale Supply price.
        But keep default_price if provided during the migration
      * skip looking for Sale Supply if not needed
      * provide more information in the log
      * check deposit as soon as total price is not empty
      * do not search trade condition by destination_section
      * do not gather deposit receivable to calculate the payable amount
      * trigger Subscription validation when an Open Order is validated
      * do not check deposit reimburse
      * allow Subscription to be paid by an Organisation
      * calculate open order start date from the destination section
      * calculate the vat rate of the open order lines
      * try to stop process as fast as possible if something seems wrong
      * add more constraint on Subscription Request
      c15f1270
    • Romain Courteaud's avatar
      slapos_wechat: · 624b058a
      Romain Courteaud authored
      * drop not needed wechat_sale_trade_condition
      * new id generator per node is used
      * payment transaction ID is used as mapping
      624b058a
    • Romain Courteaud's avatar
      slapos_payzen: · d51a395d
      Romain Courteaud authored
      * validate slapos_manual_accounting_trade_condition
      * propagate ledger from order builder
      * add ledger to the accounting template
      * aggregate source_project on payment
      * stop building payment transaction automatically
      * drop template_sale_invoice_transaction
        it is only used in one place. Let's create it manually
      * try to reduce cast error
      * reduce the alarm frequency
      * check the payment when it is updated
      * drop not needed payzen_sale_trade_condition
      * new id generator per node is used
      * test: make the html differences more visible
      d51a395d
    • Romain Courteaud's avatar
      slapos_accounting: stop generating a single open sale order per user · 080147d4
      Romain Courteaud authored
      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 prepayment
      080147d4
  2. 26 Mar, 2024 12 commits
    • Romain Courteaud's avatar
      slapos_pdm: support for the virtual master logic · 7134546e
      Romain Courteaud authored
      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 workflow
      7134546e
    • Romain Courteaud's avatar
      slapos_slap_tool: support for the virtual master logic · e1f74ff5
      Romain Courteaud authored
      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 cases
      e1f74ff5
    • Romain Courteaud's avatar
      slapos_cloud: add virtual master concept · e5f82c58
      Romain Courteaud authored
      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 script
      e5f82c58
    • Romain Courteaud's avatar
      slapos_category: · a5689b47
      Romain Courteaud authored
      * add new business application categories
      * export edger category
      * automated ledger is not only for accounting
      * drop allocation_scope/open categories
        All compute nodes are public now
      * add use/trade/deposit category
      * do not use the same title for 2 categories
      * Add trade condition type categories.
        This will be used to automatically select a Trade Condition in slapos_accounting
      * add invoicing taxable vat categories
      a5689b47
    • Romain Courteaud's avatar
    • Romain Courteaud's avatar
    • Romain Courteaud's avatar
      slapos_mysql_innodb_catalog: · 8d9642c7
      Romain Courteaud authored
      * drop default_or_child_aggregate_reference
      * drop  default_or_child_aggregate_uid catalog key
      * drop unused follow_up_default_or_child_aggregate_uid
      * drop causality_subscription_request_related_uid related key
      8d9642c7
    • Romain Courteaud's avatar
    • Romain Courteaud's avatar
    • Romain Courteaud's avatar
    • Romain Courteaud's avatar
      slapos_mysql_innodb_catalog: configure title column as a keyword key · f59f369c
      Romain Courteaud authored
      This make usage of the relationfield nicer.
      f59f369c
    • Romain Courteaud's avatar
      1e6b3694
  3. 25 Mar, 2024 1 commit
    • Rafael Monnerat's avatar
      slapos_cloud: Split edit in 2 · acff4533
      Rafael Monnerat authored
        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.
      acff4533
  4. 23 Mar, 2024 1 commit
  5. 22 Mar, 2024 6 commits
  6. 19 Mar, 2024 8 commits
  7. 15 Mar, 2024 2 commits
  8. 14 Mar, 2024 3 commits
  9. 13 Mar, 2024 1 commit
  10. 08 Mar, 2024 1 commit