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
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:To create the initial product blocks, products, workflows and migrations, use the following command lines:
Implement workflows
GET /service-termination-pointsendpointid/namethat not already have a subscriptionstp_idtoidstp_nametonamecapacitylabel_grouptoLabelGroupServiceTerminationPointBlockto theSwitchingServiceBlockwithswitching_servicestp_nameto be changed/service-termination-pointsendpointcapacityfrom nsi-dds-proxy/service-termination-pointsendpoint