Skip to content

create service termination point product and workflows #5

@hanstrompert

Description

@hanstrompert

Generate Code

The orchestrator product and workflow generator is used to generate the skeleton code for the service termination point product as described in the following stp.yaml:

config:
  summary_forms: true
name: stp
type: ServiceTerminationPoint
tag: STP
description: "Network Service Interface service termination point"
product_blocks:
  - name: stp
    type: ServiceTerminationPoint
    tag: STP
    description: "Service termination point product block"
    fields:
      - name: stp_id
        description: "Unique NSI service termination point identifier"
        type: str
        required: provisioning
      - name: stp_name
        description: "Service termination point name"
        type: str
        required: provisioning
        modifiable: true
      - name: capacity
        description: "The capacity of this service termination point"
        type: int
        required: provisioning
      - name: label_group
        description: "The set of allowed labels for this service termination point"
        type: str
        required: provisioning
      - name: switching_service
        description: "Switching service this service termination point is part of"
        type: SwitchingService
        required: provisioning

To create the initial product blocks, products, workflows and migrations, use the following command lines:

python main.py generate product-blocks --config-file stp.yaml --no-dryrun
python main.py generate product --config-file stp.yaml --no-dryrun
python main.py generate workflows --config-file stp.yaml --no-dryrun
python main.py generate migrations --config-file stp.yaml
python main.py db upgrade heads

Implement workflows

  • create workflow
    • use the nsi-dds-proxy GET /service-termination-points endpoint
    • in the input form, show a pulldown with all service termination point id/name that not already have a subscription
    • set stp_id to id
    • initially set stp_name to name
    • set capacity
    • set label_group to LabelGroup
    • link the ServiceTerminationPointBlock to the SwitchingServiceBlock with switching_service
    • create a subscription for the chosen service termination point
  • modify workflow
    • allow the stp_name to be changed
  • validate workflow
    • validate that the stp_id of all service termination point subscriptions are still present in the /service-termination-points endpoint
  • terminate workflow
    • terminate the service termination point subscription
  • reconcile workflow (not automatically created)
    • set/update capacity from nsi-dds-proxy /service-termination-points endpoint

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions