diff --git a/deploy.sh b/deploy.sh index fa1dc2b3623255d2dac82cc1d982c607b9b6af5b..c62778417f7e07a119c778b58fe9c44105d5b1a5 100755 --- a/deploy.sh +++ b/deploy.sh @@ -200,8 +200,8 @@ for COMPONENT in $TFS_COMPONENTS; do DEPLOY_LOG="$TMP_LOGS_FOLDER/deploy_${COMPONENT}.log" kubectl --namespace $TFS_K8S_NAMESPACE apply -f "$MANIFEST" > "$DEPLOY_LOG" COMPONENT_OBJNAME=$(echo "${COMPONENT}" | sed "s/\_/-/") - kubectl --namespace $TFS_K8S_NAMESPACE scale deployment --replicas=0 ${COMPONENT_OBJNAME}service >> "$DEPLOY_LOG" - kubectl --namespace $TFS_K8S_NAMESPACE scale deployment --replicas=1 ${COMPONENT_OBJNAME}service >> "$DEPLOY_LOG" + #kubectl --namespace $TFS_K8S_NAMESPACE scale deployment --replicas=0 ${COMPONENT_OBJNAME}service >> "$DEPLOY_LOG" + #kubectl --namespace $TFS_K8S_NAMESPACE scale deployment --replicas=1 ${COMPONENT_OBJNAME}service >> "$DEPLOY_LOG" echo " Collecting env-vars for '$COMPONENT' component..." @@ -234,7 +234,11 @@ done echo "Deploying extra manifests..." for EXTRA_MANIFEST in $TFS_EXTRA_MANIFESTS; do echo "Processing manifest '$EXTRA_MANIFEST'..." - kubectl --namespace $TFS_K8S_NAMESPACE apply -f $EXTRA_MANIFEST + if [[ "$EXTRA_MANIFEST" == *"servicemonitor"* ]]; then + kubectl apply -f $EXTRA_MANIFEST + else + kubectl --namespace $TFS_K8S_NAMESPACE apply -f $EXTRA_MANIFEST + fi printf "\n" done printf "\n" diff --git a/hackfest/commands.txt b/hackfest/commands.txt index c34c6acc112e3d5dee47752967b60bab32556c94..31558364d74aa1fec729c80c9fab50aa7e0c2313 100644 --- a/hackfest/commands.txt +++ b/hackfest/commands.txt @@ -262,5 +262,43 @@ Service b8c99e2c-39d8-424d-9833-554634269555 deleted (mock-osm) exit Bye! +############ +# gNMI +############ + +## Download and install the latest release +$ sudo bash -c "$(curl -sL https://get.containerlab.dev)“ + +## Deploy proposed two SR node scenario +$ cd tfs-ctrl/hackfest/gnmi +$ sudo containerlab deploy -t srlinux.clab.yml + +## Access SR Bash +$ docker exec -it clab-srlinux-srl1 bash + +## Acess SR CLI +$ docker exec -it clab-srlinux-srl1 sr_cli + +## Destroy scenario +$ sudo containerlab destroy --topo srlinux.clab.yml + +## Install gNMIc +$ sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)" + +## gNMI Capabilities request +$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify capabilities + +## gNMI Get request +$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/name/host-name +$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /interface[name=mgmt0] + +## gNMI Set request +$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --update-path /system/name/host-name --update-value slr11 +(we check the changed value) +$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/name/host-name +## Subscribe request +$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf subscribe --path /interface[name=mgmt0]/statistics +(In another terminal, you can generate traffic) +$ssh admin@clab-srlinux-srl1 diff --git a/hackfest/gnmi/.gitkeep b/hackfest/gnmi/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/hackfest/gnmi/commands.txt b/hackfest/gnmi/commands.txt deleted file mode 100644 index 6fae7f9a8fc8b9b69d364b1d279aca80759c90ef..0000000000000000000000000000000000000000 --- a/hackfest/gnmi/commands.txt +++ /dev/null @@ -1,17 +0,0 @@ -== GNMI -$ cd /usr/share/gocode/src/ -$ export GOPATH=/usr/share/gocode/ -$ go run github.com/openconfig/ygot/generator/generator.go -generate_fakeroot -output_file github.com/google/gnxi/gnmi/modeldata/gostruct/generated.go -package_name gostruct github.com/rvilalta/OFC_SC472/yang/topology.yang -$ cd /usr/share/gocode/src/github.com/google/gnxi/gnmi_target -$ go run gnmi_target.go -bind_address :10161 -config ~/tfs-ctrl/hackfest/gnmi/topology.json --notls -alsologtostderr - -RUN CLIENT (in another window) -$ export GOPATH=/usr/share/gocode/ -$ cd /usr/share/gocode/src/github.com/google/gnxi/gnmi_get -$ go run gnmi_get.go -notls -xpath "/topology/" -target_addr localhost:10161 -alsologtostderr -$ go run gnmi_get.go -notls -xpath "/topology/node[node-id=A]" -target_addr localhost:10161 -alsologtostderr - -USE PYTHON CLIENT -$ cd /usr/share/gocode/src/github.com/google/gnxi/gnmi_cli_py -$ python py_gnmicli.py -n -m get -t localhost -p 10161 -x /topology -u foo -pass bar - diff --git a/hackfest/gnmi/sonic.clab.yml b/hackfest/gnmi/sonic.clab.yml new file mode 100644 index 0000000000000000000000000000000000000000..dc4f743213406531fab9ac5988342c2b213d88ad --- /dev/null +++ b/hackfest/gnmi/sonic.clab.yml @@ -0,0 +1,15 @@ +# file: sonic.clab.yml +name: sonic-vs + +topology: + nodes: + srl1: + kind: sonic-vs + image: docker-sonic-vs + srl2: + kind: sonic-vs + image: docker-sonic-vs + + links: + - endpoints: ["srl1:e1-1", "srl2:e1-1"] + diff --git a/hackfest/gnmi/topology.json b/hackfest/gnmi/topology.json deleted file mode 100644 index 9b64536a7992fbbde22f95c9cd9275354a9f7d81..0000000000000000000000000000000000000000 --- a/hackfest/gnmi/topology.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "topology" : { - "node" : [ - { "node-id" : "A" , "port" : [ { "port-id" : "portA1" } ] }, - { "node-id" : "B" , "port" : [ { "port-id" : "portB1" } ] } - ] - } -} diff --git a/manifests/contextservice.yaml b/manifests/contextservice.yaml index dc7e548ce095d989f02658d5d33c1d0c0ba6dc64..bdf0122783324076c8825f830bc5f1b18efaff4c 100644 --- a/manifests/contextservice.yaml +++ b/manifests/contextservice.yaml @@ -45,6 +45,7 @@ spec: ports: - containerPort: 1010 - containerPort: 8080 + - containerPort: 9192 env: - name: CCDB_URL value: "cockroachdb://tfs:tfs123@10.1.7.195:26257/tfs?sslmode=require" @@ -74,6 +75,8 @@ apiVersion: v1 kind: Service metadata: name: contextservice + labels: + app: contextservice spec: type: ClusterIP selector: @@ -87,3 +90,7 @@ spec: protocol: TCP port: 8080 targetPort: 8080 + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 diff --git a/manifests/deviceservice.yaml b/manifests/deviceservice.yaml index d2595ab1915554d7ebfd786b8f39b531e40da490..83daa41f3c0cdf8e84b02dfc0ad18d8f7644e57b 100644 --- a/manifests/deviceservice.yaml +++ b/manifests/deviceservice.yaml @@ -20,6 +20,7 @@ spec: selector: matchLabels: app: deviceservice + replicas: 1 template: metadata: labels: @@ -32,6 +33,7 @@ spec: imagePullPolicy: Always ports: - containerPort: 2020 + - containerPort: 9192 env: - name: LOG_LEVEL value: "INFO" @@ -53,6 +55,8 @@ apiVersion: v1 kind: Service metadata: name: deviceservice + labels: + app: deviceservice spec: type: ClusterIP selector: @@ -62,3 +66,7 @@ spec: protocol: TCP port: 2020 targetPort: 2020 + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 diff --git a/manifests/dltservice.yaml b/manifests/dltservice.yaml index d2ad4f40444faa6b9de7724f8b3df077bb7910b2..0f6b5bb9df1ccfc6057c0746058da6754233376a 100644 --- a/manifests/dltservice.yaml +++ b/manifests/dltservice.yaml @@ -32,6 +32,7 @@ spec: imagePullPolicy: Always ports: - containerPort: 8080 + - containerPort: 9192 env: - name: LOG_LEVEL value: "INFO" @@ -82,6 +83,8 @@ apiVersion: v1 kind: Service metadata: name: dltservice + labels: + app: dltservice spec: type: ClusterIP selector: @@ -91,3 +94,7 @@ spec: protocol: TCP port: 8080 targetPort: 8080 + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 diff --git a/manifests/interdomainservice.yaml b/manifests/interdomainservice.yaml index 3ef3ffba301cadf26beaa34787dcd816e87c65a0..b275035f62c68eeb8d28f1892909650ca10defee 100644 --- a/manifests/interdomainservice.yaml +++ b/manifests/interdomainservice.yaml @@ -32,6 +32,7 @@ spec: imagePullPolicy: Always ports: - containerPort: 10010 + - containerPort: 9192 env: - name: LOG_LEVEL value: "INFO" @@ -53,6 +54,8 @@ apiVersion: v1 kind: Service metadata: name: interdomainservice + labels: + app: interdomainservice spec: type: ClusterIP selector: @@ -62,3 +65,7 @@ spec: protocol: TCP port: 10010 targetPort: 10010 + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 diff --git a/manifests/monitoringservice.yaml b/manifests/monitoringservice.yaml index 39acfd52330ae6b1c3034e61e793d68491086237..aed8d1c51e5e84abec11dcc272c786b208dd9556 100644 --- a/manifests/monitoringservice.yaml +++ b/manifests/monitoringservice.yaml @@ -72,6 +72,9 @@ spec: - name: grpc containerPort: 7070 protocol: TCP + - name: metrics + containerPort: 9192 + protocol: TCP env: - name: LOG_LEVEL value: "INFO" @@ -101,6 +104,8 @@ apiVersion: v1 kind: Service metadata: name: monitoringservice + labels: + app: monitoringservice spec: type: ClusterIP selector: @@ -122,6 +127,10 @@ spec: protocol: TCP port: 8812 targetPort: 8812 + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 --- apiVersion: networking.k8s.io/v1 diff --git a/manifests/pathcompservice.yaml b/manifests/pathcompservice.yaml index 92e24ac42b7b86be6056709abd9a2cd6fc16598b..71c927b567316bb118ff085f1727abd03e92c0d7 100644 --- a/manifests/pathcompservice.yaml +++ b/manifests/pathcompservice.yaml @@ -20,6 +20,7 @@ spec: selector: matchLabels: app: pathcompservice + replicas: 5 template: metadata: labels: @@ -32,6 +33,7 @@ spec: imagePullPolicy: Always ports: - containerPort: 10020 + - containerPort: 9192 env: - name: LOG_LEVEL value: "INFO" @@ -75,6 +77,8 @@ apiVersion: v1 kind: Service metadata: name: pathcompservice + labels: + app: pathcompservice spec: type: ClusterIP selector: @@ -88,3 +92,7 @@ spec: protocol: TCP port: 8081 targetPort: 8081 + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 diff --git a/manifests/servicemonitors.yaml b/manifests/servicemonitors.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ad5f042baa273d67d646a9168be1e0c0b1133ec1 --- /dev/null +++ b/manifests/servicemonitors.yaml @@ -0,0 +1,231 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-contextservice-metric + labels: + app: contextservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: contextservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-deviceservice-metric + labels: + app: deviceservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: deviceservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-serviceservice-metric + labels: + app: serviceservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: serviceservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-sliceservice-metric + labels: + app: sliceservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: sliceservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-pathcompservice-metric + labels: + app: pathcompservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: pathcompservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-monitoringservice-metric + labels: + app: monitoringservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: monitoringservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-dltservice-metric + labels: + app: dltservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: dltservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-interdomainservice-metric + labels: + app: interdomainservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: interdomainservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running diff --git a/manifests/serviceservice.yaml b/manifests/serviceservice.yaml index a5568a5112eb08a02df2178ba45db57b57c19cc3..089be20f969509c9d5f12922a6cd991acd2f3bc0 100644 --- a/manifests/serviceservice.yaml +++ b/manifests/serviceservice.yaml @@ -20,6 +20,7 @@ spec: selector: matchLabels: app: serviceservice + replicas: 5 template: metadata: labels: @@ -32,6 +33,7 @@ spec: imagePullPolicy: Always ports: - containerPort: 3030 + - containerPort: 9192 env: - name: LOG_LEVEL value: "INFO" @@ -53,6 +55,8 @@ apiVersion: v1 kind: Service metadata: name: serviceservice + labels: + app: serviceservice spec: type: ClusterIP selector: @@ -62,3 +66,7 @@ spec: protocol: TCP port: 3030 targetPort: 3030 + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 diff --git a/manifests/sliceservice.yaml b/manifests/sliceservice.yaml index b20669b0c03cc22857abd1534e19780025b9066a..ff4b41fe7c709acf0d58c9c73b9f6198104a89fd 100644 --- a/manifests/sliceservice.yaml +++ b/manifests/sliceservice.yaml @@ -20,6 +20,7 @@ spec: selector: matchLabels: app: sliceservice + replicas: 1 template: metadata: labels: @@ -32,6 +33,7 @@ spec: imagePullPolicy: Always ports: - containerPort: 4040 + - containerPort: 9192 env: - name: LOG_LEVEL value: "INFO" @@ -53,6 +55,8 @@ apiVersion: v1 kind: Service metadata: name: sliceservice + labels: + app: sliceservice spec: type: ClusterIP selector: @@ -62,3 +66,7 @@ spec: protocol: TCP port: 4040 targetPort: 4040 + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 diff --git a/proto/dlt_connector.proto b/proto/dlt_connector.proto index 1038d6ccd40c8393313fc7f8dbfd48b1e0cf1739..cee0c70bdcda42f435339751c6cfabf609b14d21 100644 --- a/proto/dlt_connector.proto +++ b/proto/dlt_connector.proto @@ -35,20 +35,24 @@ service DltConnectorService { message DltDeviceId { context.TopologyId topology_id = 1; - context.DeviceId device_id = 2; + context.DeviceId device_id = 2; + bool delete = 3; } message DltLinkId { context.TopologyId topology_id = 1; - context.LinkId link_id = 2; + context.LinkId link_id = 2; + bool delete = 3; } message DltServiceId { context.TopologyId topology_id = 1; - context.ServiceId service_id = 2; + context.ServiceId service_id = 2; + bool delete = 3; } message DltSliceId { context.TopologyId topology_id = 1; - context.SliceId slice_id = 2; + context.SliceId slice_id = 2; + bool delete = 3; } diff --git a/proto/uml/monitoring.png b/proto/uml/monitoring.png index 98f2e1d64766faf55599e465dd30f57e3518b11f..4257b4d3f4b570fa9c51734480bd8c73e8c72622 100644 Binary files a/proto/uml/monitoring.png and b/proto/uml/monitoring.png differ diff --git a/src/automation/src/main/java/eu/teraflow/automation/AutomationGatewayImpl.java b/src/automation/src/main/java/eu/teraflow/automation/AutomationGatewayImpl.java index 6d672fdea2c3e97f9f2a50c7efa8d77c05532357..466ebf7fefe69645cd23c72ca3b61d8e5bdd4713 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/AutomationGatewayImpl.java +++ b/src/automation/src/main/java/eu/teraflow/automation/AutomationGatewayImpl.java @@ -76,12 +76,11 @@ public class AutomationGatewayImpl implements AutomationGateway { @Override public Uni<Automation.DeviceRoleState> ztpDelete(Automation.DeviceRole request) { - return Uni.createFrom() - .item( - () -> - Automation.DeviceRoleState.newBuilder() - .setDevRoleId(request.getDevRoleId()) - .build()); + final var devRoleId = request.getDevRoleId().getDevRoleId().getUuid(); + return automationService + .deleteDevice(devRoleId) + .onItem() + .transform(device -> transformToDeviceRoleState(device, devRoleId, DeviceState.DELETED)); } @Override diff --git a/src/automation/src/main/java/eu/teraflow/automation/ContextSubscriber.java b/src/automation/src/main/java/eu/teraflow/automation/ContextSubscriber.java index 2fc3a3356456b3c1bc55137f686a7e82570a3171..76e536d9bc03c196005a91be1c82d15879a6f8e8 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/ContextSubscriber.java +++ b/src/automation/src/main/java/eu/teraflow/automation/ContextSubscriber.java @@ -79,8 +79,8 @@ public class ContextSubscriber { break; case UPDATE: LOGGER.warnf( - "Received %s for device [%s]. " + - "No automation action on an already updated device", + "Received %s for device [%s]. " + + "No automation action on an already updated device", event, deviceId); break; case UNDEFINED: diff --git a/src/automation/src/test/java/eu/teraflow/automation/AutomationServiceTest.java b/src/automation/src/test/java/eu/teraflow/automation/AutomationServiceTest.java index 85ed170efbf938b11303d92a6697c89836e0bf70..e17fc8304455a543ffa96b4c1239abb77be4daca 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/AutomationServiceTest.java +++ b/src/automation/src/test/java/eu/teraflow/automation/AutomationServiceTest.java @@ -280,6 +280,53 @@ class AutomationServiceTest { final var uuid = serializer.serializeUuid(UUID_VALUE); final var deviceRoleId = Automation.DeviceRoleId.newBuilder().setDevRoleId(uuid).build(); final var deviceRole = Automation.DeviceRole.newBuilder().setDevRoleId(deviceRoleId).build(); + final var DEVICE_ID = "0f14d0ab-9608-7862-a9e4-5ed26688389b"; + final var DEVICE_ROLE_ID = "0f14d0ab-9608-7862-a9e4-5ed26688389a"; + final var DEVICE_TYPE = "ztp"; + + final var deviceDrivers = List.of(DeviceDriverEnum.IETF_NETWORK_TOPOLOGY, DeviceDriverEnum.P4); + + final var topologyIdA = new TopologyId("contextIdA", "idA"); + final var deviceIdA = "deviceIdA"; + final var idA = "idA"; + final var endPointIdA = new EndPointId(topologyIdA, deviceIdA, idA); + + final var endPointTypeA = "endPointTypeA"; + final var kpiSampleTypesA = + List.of(KpiSampleType.BYTES_RECEIVED, KpiSampleType.BYTES_TRANSMITTED); + final var locationTypeRegionA = new LocationTypeRegion("ATH"); + final var locationA = new Location(locationTypeRegionA); + final var endPointA = + new EndPointBuilder(endPointIdA, endPointTypeA, kpiSampleTypesA) + .location(locationA) + .build(); + + final var topologyIdB = new TopologyId("contextIdB", "idB"); + final var deviceIdB = "deviceIdB"; + final var idB = "idB"; + final var endPointIdB = new EndPointId(topologyIdB, deviceIdB, idB); + final var endPointTypeB = "endPointTypeB"; + final var kpiSampleTypesB = + List.of(KpiSampleType.BYTES_RECEIVED, KpiSampleType.BYTES_TRANSMITTED); + final var locationTypeRegionB = new LocationTypeRegion("ATH"); + final var locationB = new Location(locationTypeRegionB); + final var endPointB = + new EndPointBuilder(endPointIdB, endPointTypeB, kpiSampleTypesB) + .location(locationB) + .build(); + + final var endPoints = List.of(endPointA, endPointB); + + final var emptyDeviceConfig = new DeviceConfig(List.of()); + final var device = + new Device( + DEVICE_ID, + DEVICE_TYPE, + emptyDeviceConfig, + DeviceOperationalStatus.ENABLED, + deviceDrivers, + endPoints); + Mockito.when(contextGateway.getDevice(Mockito.any())).thenReturn(Uni.createFrom().item(device)); client .ztpDelete(deviceRole) diff --git a/src/automation/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java b/src/automation/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java index 67e1ec736f9d83cbf95b419e9e61e92e82e73b88..217672b2e8de2d7c840833a937b0fb04c38a221b 100644 --- a/src/automation/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java +++ b/src/automation/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java @@ -31,6 +31,10 @@ public final class KpiSampleTypes { * <code>KPISAMPLETYPE_PACKETS_RECEIVED = 102;</code> */ KPISAMPLETYPE_PACKETS_RECEIVED(102), + /** + * <code>KPISAMPLETYPE_PACKETS_DROPPED = 103;</code> + */ + KPISAMPLETYPE_PACKETS_DROPPED(103), /** * <code>KPISAMPLETYPE_BYTES_TRANSMITTED = 201;</code> */ @@ -39,6 +43,50 @@ public final class KpiSampleTypes { * <code>KPISAMPLETYPE_BYTES_RECEIVED = 202;</code> */ KPISAMPLETYPE_BYTES_RECEIVED(202), + /** + * <code>KPISAMPLETYPE_BYTES_DROPPED = 203;</code> + */ + KPISAMPLETYPE_BYTES_DROPPED(203), + /** + * <pre> + *. can be used by both optical and L3 without any issue + * </pre> + * + * <code>KPISAMPLETYPE_ML_CONFIDENCE = 401;</code> + */ + KPISAMPLETYPE_ML_CONFIDENCE(401), + /** + * <pre> + *. can be used by both optical and L3 without any issue + * </pre> + * + * <code>KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501;</code> + */ + KPISAMPLETYPE_OPTICAL_SECURITY_STATUS(501), + /** + * <code>KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601;</code> + */ + KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS(601), + /** + * <code>KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602;</code> + */ + KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS(602), + /** + * <code>KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603;</code> + */ + KPISAMPLETYPE_L3_UNIQUE_ATTACKERS(603), + /** + * <code>KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604;</code> + */ + KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS(604), + /** + * <code>KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605;</code> + */ + KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO(605), + /** + * <code>KPISAMPLETYPE_SERVICE_LATENCY_MS = 701;</code> + */ + KPISAMPLETYPE_SERVICE_LATENCY_MS(701), UNRECOGNIZED(-1), ; @@ -54,6 +102,10 @@ public final class KpiSampleTypes { * <code>KPISAMPLETYPE_PACKETS_RECEIVED = 102;</code> */ public static final int KPISAMPLETYPE_PACKETS_RECEIVED_VALUE = 102; + /** + * <code>KPISAMPLETYPE_PACKETS_DROPPED = 103;</code> + */ + public static final int KPISAMPLETYPE_PACKETS_DROPPED_VALUE = 103; /** * <code>KPISAMPLETYPE_BYTES_TRANSMITTED = 201;</code> */ @@ -62,6 +114,50 @@ public final class KpiSampleTypes { * <code>KPISAMPLETYPE_BYTES_RECEIVED = 202;</code> */ public static final int KPISAMPLETYPE_BYTES_RECEIVED_VALUE = 202; + /** + * <code>KPISAMPLETYPE_BYTES_DROPPED = 203;</code> + */ + public static final int KPISAMPLETYPE_BYTES_DROPPED_VALUE = 203; + /** + * <pre> + *. can be used by both optical and L3 without any issue + * </pre> + * + * <code>KPISAMPLETYPE_ML_CONFIDENCE = 401;</code> + */ + public static final int KPISAMPLETYPE_ML_CONFIDENCE_VALUE = 401; + /** + * <pre> + *. can be used by both optical and L3 without any issue + * </pre> + * + * <code>KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501;</code> + */ + public static final int KPISAMPLETYPE_OPTICAL_SECURITY_STATUS_VALUE = 501; + /** + * <code>KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601;</code> + */ + public static final int KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS_VALUE = 601; + /** + * <code>KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602;</code> + */ + public static final int KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS_VALUE = 602; + /** + * <code>KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603;</code> + */ + public static final int KPISAMPLETYPE_L3_UNIQUE_ATTACKERS_VALUE = 603; + /** + * <code>KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604;</code> + */ + public static final int KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS_VALUE = 604; + /** + * <code>KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605;</code> + */ + public static final int KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO_VALUE = 605; + /** + * <code>KPISAMPLETYPE_SERVICE_LATENCY_MS = 701;</code> + */ + public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_VALUE = 701; public final int getNumber() { @@ -91,8 +187,18 @@ public final class KpiSampleTypes { case 0: return KPISAMPLETYPE_UNKNOWN; case 101: return KPISAMPLETYPE_PACKETS_TRANSMITTED; case 102: return KPISAMPLETYPE_PACKETS_RECEIVED; + case 103: return KPISAMPLETYPE_PACKETS_DROPPED; case 201: return KPISAMPLETYPE_BYTES_TRANSMITTED; case 202: return KPISAMPLETYPE_BYTES_RECEIVED; + case 203: return KPISAMPLETYPE_BYTES_DROPPED; + case 401: return KPISAMPLETYPE_ML_CONFIDENCE; + case 501: return KPISAMPLETYPE_OPTICAL_SECURITY_STATUS; + case 601: return KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS; + case 602: return KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS; + case 603: return KPISAMPLETYPE_L3_UNIQUE_ATTACKERS; + case 604: return KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS; + case 605: return KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO; + case 701: return KPISAMPLETYPE_SERVICE_LATENCY_MS; default: return null; } } @@ -159,12 +265,22 @@ public final class KpiSampleTypes { static { java.lang.String[] descriptorData = { "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + - "es*\276\001\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + + "es*\327\004\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + - "\020f\022$\n\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001" + - "\022!\n\034KPISAMPLETYPE_BYTES_RECEIVED\020\312\001b\006pro" + - "to3" + "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + + "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + + "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + + "PLETYPE_BYTES_DROPPED\020\313\001\022 \n\033KPISAMPLETYP" + + "E_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLETYPE_OPTI" + + "CAL_SECURITY_STATUS\020\365\003\022)\n$KPISAMPLETYPE_" + + "L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KPISAMPLETY" + + "PE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&\n!KPISAMP" + + "LETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220\n+KPISAMP" + + "LETYPE_L3_UNIQUE_COMPROMISED_CLIENTS\020\334\004\022" + + ",\n\'KPISAMPLETYPE_L3_SECURITY_STATUS_CRYP" + + "TO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_LATENCY_M" + + "S\020\275\005b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/src/automation/target/generated-sources/grpc/monitoring/Monitoring.java b/src/automation/target/generated-sources/grpc/monitoring/Monitoring.java index 9d05f3da8a831e74922e65473206539680c8d78b..38f026eb1ac730e8f825e460916dc57469f0d312 100644 --- a/src/automation/target/generated-sources/grpc/monitoring/Monitoring.java +++ b/src/automation/target/generated-sources/grpc/monitoring/Monitoring.java @@ -139,6 +139,21 @@ public final class Monitoring { * <code>.context.SliceId slice_id = 8;</code> */ context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); + + /** + * <code>.context.ConnectionId connection_id = 9;</code> + * @return Whether the connectionId field is set. + */ + boolean hasConnectionId(); + /** + * <code>.context.ConnectionId connection_id = 9;</code> + * @return The connectionId. + */ + context.ContextOuterClass.ConnectionId getConnectionId(); + /** + * <code>.context.ConnectionId connection_id = 9;</code> + */ + context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); } /** * Protobuf type {@code monitoring.KpiDescriptor} @@ -275,6 +290,19 @@ public final class Monitoring { break; } + case 74: { + context.ContextOuterClass.ConnectionId.Builder subBuilder = null; + if (connectionId_ != null) { + subBuilder = connectionId_.toBuilder(); + } + connectionId_ = input.readMessage(context.ContextOuterClass.ConnectionId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(connectionId_); + connectionId_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -537,6 +565,32 @@ public final class Monitoring { return getSliceId(); } + public static final int CONNECTION_ID_FIELD_NUMBER = 9; + private context.ContextOuterClass.ConnectionId connectionId_; + /** + * <code>.context.ConnectionId connection_id = 9;</code> + * @return Whether the connectionId field is set. + */ + @java.lang.Override + public boolean hasConnectionId() { + return connectionId_ != null; + } + /** + * <code>.context.ConnectionId connection_id = 9;</code> + * @return The connectionId. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionId getConnectionId() { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + /** + * <code>.context.ConnectionId connection_id = 9;</code> + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + return getConnectionId(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -575,6 +629,9 @@ public final class Monitoring { if (sliceId_ != null) { output.writeMessage(8, getSliceId()); } + if (connectionId_ != null) { + output.writeMessage(9, getConnectionId()); + } unknownFields.writeTo(output); } @@ -615,6 +672,10 @@ public final class Monitoring { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getSliceId()); } + if (connectionId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getConnectionId()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -660,6 +721,11 @@ public final class Monitoring { if (!getSliceId() .equals(other.getSliceId())) return false; } + if (hasConnectionId() != other.hasConnectionId()) return false; + if (hasConnectionId()) { + if (!getConnectionId() + .equals(other.getConnectionId())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -699,6 +765,10 @@ public final class Monitoring { hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; hash = (53 * hash) + getSliceId().hashCode(); } + if (hasConnectionId()) { + hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getConnectionId().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -873,6 +943,12 @@ public final class Monitoring { sliceId_ = null; sliceIdBuilder_ = null; } + if (connectionIdBuilder_ == null) { + connectionId_ = null; + } else { + connectionId_ = null; + connectionIdBuilder_ = null; + } return this; } @@ -936,6 +1012,11 @@ public final class Monitoring { } else { result.sliceId_ = sliceIdBuilder_.build(); } + if (connectionIdBuilder_ == null) { + result.connectionId_ = connectionId_; + } else { + result.connectionId_ = connectionIdBuilder_.build(); + } onBuilt(); return result; } @@ -1032,6 +1113,9 @@ public final class Monitoring { if (other.hasSliceId()) { mergeSliceId(other.getSliceId()); } + if (other.hasConnectionId()) { + mergeConnectionId(other.getConnectionId()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2026,6 +2110,125 @@ public final class Monitoring { } return sliceIdBuilder_; } + + private context.ContextOuterClass.ConnectionId connectionId_; + private com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> connectionIdBuilder_; + /** + * <code>.context.ConnectionId connection_id = 9;</code> + * @return Whether the connectionId field is set. + */ + public boolean hasConnectionId() { + return connectionIdBuilder_ != null || connectionId_ != null; + } + /** + * <code>.context.ConnectionId connection_id = 9;</code> + * @return The connectionId. + */ + public context.ContextOuterClass.ConnectionId getConnectionId() { + if (connectionIdBuilder_ == null) { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } else { + return connectionIdBuilder_.getMessage(); + } + } + /** + * <code>.context.ConnectionId connection_id = 9;</code> + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionId_ = value; + onChanged(); + } else { + connectionIdBuilder_.setMessage(value); + } + + return this; + } + /** + * <code>.context.ConnectionId connection_id = 9;</code> + */ + public Builder setConnectionId( + context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdBuilder_ == null) { + connectionId_ = builderForValue.build(); + onChanged(); + } else { + connectionIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * <code>.context.ConnectionId connection_id = 9;</code> + */ + public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (connectionId_ != null) { + connectionId_ = + context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); + } else { + connectionId_ = value; + } + onChanged(); + } else { + connectionIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + * <code>.context.ConnectionId connection_id = 9;</code> + */ + public Builder clearConnectionId() { + if (connectionIdBuilder_ == null) { + connectionId_ = null; + onChanged(); + } else { + connectionId_ = null; + connectionIdBuilder_ = null; + } + + return this; + } + /** + * <code>.context.ConnectionId connection_id = 9;</code> + */ + public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { + + onChanged(); + return getConnectionIdFieldBuilder().getBuilder(); + } + /** + * <code>.context.ConnectionId connection_id = 9;</code> + */ + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + if (connectionIdBuilder_ != null) { + return connectionIdBuilder_.getMessageOrBuilder(); + } else { + return connectionId_ == null ? + context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + } + /** + * <code>.context.ConnectionId connection_id = 9;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> + getConnectionIdFieldBuilder() { + if (connectionIdBuilder_ == null) { + connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder>( + getConnectionId(), + getParentForChildren(), + isClean()); + connectionId_ = null; + } + return connectionIdBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2869,27 +3072,27 @@ public final class Monitoring { com.google.protobuf.MessageOrBuilder { /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ java.util.List<monitoring.Monitoring.KpiId> - getKpiIdList(); + getKpiIdsList(); /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - monitoring.Monitoring.KpiId getKpiId(int index); + monitoring.Monitoring.KpiId getKpiIds(int index); /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - int getKpiIdCount(); + int getKpiIdsCount(); /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ java.util.List<? extends monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdOrBuilderList(); + getKpiIdsOrBuilderList(); /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder( + monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder( int index); /** @@ -2898,18 +3101,12 @@ public final class Monitoring { */ float getMonitoringWindowS(); - /** - * <code>float sampling_rate_s = 3;</code> - * @return The samplingRateS. - */ - float getSamplingRateS(); - /** * <pre> * used when you want something like "get the last N many samples * </pre> * - * <code>uint32 last_n_samples = 4;</code> + * <code>uint32 last_n_samples = 3;</code> * @return The lastNSamples. */ int getLastNSamples(); @@ -2919,7 +3116,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> * @return Whether the startTimestamp field is set. */ boolean hasStartTimestamp(); @@ -2928,7 +3125,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> * @return The startTimestamp. */ context.ContextOuterClass.Timestamp getStartTimestamp(); @@ -2937,7 +3134,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> */ context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder(); @@ -2946,7 +3143,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> * @return Whether the endTimestamp field is set. */ boolean hasEndTimestamp(); @@ -2955,7 +3152,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> * @return The endTimestamp. */ context.ContextOuterClass.Timestamp getEndTimestamp(); @@ -2964,7 +3161,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> */ context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder(); } @@ -2981,7 +3178,7 @@ public final class Monitoring { super(builder); } private KpiQuery() { - kpiId_ = java.util.Collections.emptyList(); + kpiIds_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -3017,10 +3214,10 @@ public final class Monitoring { break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiId_ = new java.util.ArrayList<monitoring.Monitoring.KpiId>(); + kpiIds_ = new java.util.ArrayList<monitoring.Monitoring.KpiId>(); mutable_bitField0_ |= 0x00000001; } - kpiId_.add( + kpiIds_.add( input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry)); break; } @@ -3029,17 +3226,12 @@ public final class Monitoring { monitoringWindowS_ = input.readFloat(); break; } - case 29: { - - samplingRateS_ = input.readFloat(); - break; - } - case 32: { + case 24: { lastNSamples_ = input.readUInt32(); break; } - case 42: { + case 34: { context.ContextOuterClass.Timestamp.Builder subBuilder = null; if (startTimestamp_ != null) { subBuilder = startTimestamp_.toBuilder(); @@ -3052,7 +3244,7 @@ public final class Monitoring { break; } - case 50: { + case 42: { context.ContextOuterClass.Timestamp.Builder subBuilder = null; if (endTimestamp_ != null) { subBuilder = endTimestamp_.toBuilder(); @@ -3081,7 +3273,7 @@ public final class Monitoring { e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiId_ = java.util.Collections.unmodifiableList(kpiId_); + kpiIds_ = java.util.Collections.unmodifiableList(kpiIds_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -3100,44 +3292,44 @@ public final class Monitoring { monitoring.Monitoring.KpiQuery.class, monitoring.Monitoring.KpiQuery.Builder.class); } - public static final int KPI_ID_FIELD_NUMBER = 1; - private java.util.List<monitoring.Monitoring.KpiId> kpiId_; + public static final int KPI_IDS_FIELD_NUMBER = 1; + private java.util.List<monitoring.Monitoring.KpiId> kpiIds_; /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ @java.lang.Override - public java.util.List<monitoring.Monitoring.KpiId> getKpiIdList() { - return kpiId_; + public java.util.List<monitoring.Monitoring.KpiId> getKpiIdsList() { + return kpiIds_; } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ @java.lang.Override public java.util.List<? extends monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdOrBuilderList() { - return kpiId_; + getKpiIdsOrBuilderList() { + return kpiIds_; } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ @java.lang.Override - public int getKpiIdCount() { - return kpiId_.size(); + public int getKpiIdsCount() { + return kpiIds_.size(); } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId(int index) { - return kpiId_.get(index); + public monitoring.Monitoring.KpiId getKpiIds(int index) { + return kpiIds_.get(index); } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder( + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder( int index) { - return kpiId_.get(index); + return kpiIds_.get(index); } public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; @@ -3151,25 +3343,14 @@ public final class Monitoring { return monitoringWindowS_; } - public static final int SAMPLING_RATE_S_FIELD_NUMBER = 3; - private float samplingRateS_; - /** - * <code>float sampling_rate_s = 3;</code> - * @return The samplingRateS. - */ - @java.lang.Override - public float getSamplingRateS() { - return samplingRateS_; - } - - public static final int LAST_N_SAMPLES_FIELD_NUMBER = 4; + public static final int LAST_N_SAMPLES_FIELD_NUMBER = 3; private int lastNSamples_; /** * <pre> * used when you want something like "get the last N many samples * </pre> * - * <code>uint32 last_n_samples = 4;</code> + * <code>uint32 last_n_samples = 3;</code> * @return The lastNSamples. */ @java.lang.Override @@ -3177,14 +3358,14 @@ public final class Monitoring { return lastNSamples_; } - public static final int START_TIMESTAMP_FIELD_NUMBER = 5; + public static final int START_TIMESTAMP_FIELD_NUMBER = 4; private context.ContextOuterClass.Timestamp startTimestamp_; /** * <pre> * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> * @return Whether the startTimestamp field is set. */ @java.lang.Override @@ -3196,7 +3377,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> * @return The startTimestamp. */ @java.lang.Override @@ -3208,21 +3389,21 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { return getStartTimestamp(); } - public static final int END_TIMESTAMP_FIELD_NUMBER = 6; + public static final int END_TIMESTAMP_FIELD_NUMBER = 5; private context.ContextOuterClass.Timestamp endTimestamp_; /** * <pre> * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> * @return Whether the endTimestamp field is set. */ @java.lang.Override @@ -3234,7 +3415,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> * @return The endTimestamp. */ @java.lang.Override @@ -3246,7 +3427,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { @@ -3267,23 +3448,20 @@ public final class Monitoring { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < kpiId_.size(); i++) { - output.writeMessage(1, kpiId_.get(i)); + for (int i = 0; i < kpiIds_.size(); i++) { + output.writeMessage(1, kpiIds_.get(i)); } if (monitoringWindowS_ != 0F) { output.writeFloat(2, monitoringWindowS_); } - if (samplingRateS_ != 0F) { - output.writeFloat(3, samplingRateS_); - } if (lastNSamples_ != 0) { - output.writeUInt32(4, lastNSamples_); + output.writeUInt32(3, lastNSamples_); } if (startTimestamp_ != null) { - output.writeMessage(5, getStartTimestamp()); + output.writeMessage(4, getStartTimestamp()); } if (endTimestamp_ != null) { - output.writeMessage(6, getEndTimestamp()); + output.writeMessage(5, getEndTimestamp()); } unknownFields.writeTo(output); } @@ -3294,29 +3472,25 @@ public final class Monitoring { if (size != -1) return size; size = 0; - for (int i = 0; i < kpiId_.size(); i++) { + for (int i = 0; i < kpiIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, kpiId_.get(i)); + .computeMessageSize(1, kpiIds_.get(i)); } if (monitoringWindowS_ != 0F) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(2, monitoringWindowS_); } - if (samplingRateS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, samplingRateS_); - } if (lastNSamples_ != 0) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, lastNSamples_); + .computeUInt32Size(3, lastNSamples_); } if (startTimestamp_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getStartTimestamp()); + .computeMessageSize(4, getStartTimestamp()); } if (endTimestamp_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getEndTimestamp()); + .computeMessageSize(5, getEndTimestamp()); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -3333,14 +3507,11 @@ public final class Monitoring { } monitoring.Monitoring.KpiQuery other = (monitoring.Monitoring.KpiQuery) obj; - if (!getKpiIdList() - .equals(other.getKpiIdList())) return false; + if (!getKpiIdsList() + .equals(other.getKpiIdsList())) return false; if (java.lang.Float.floatToIntBits(getMonitoringWindowS()) != java.lang.Float.floatToIntBits( other.getMonitoringWindowS())) return false; - if (java.lang.Float.floatToIntBits(getSamplingRateS()) - != java.lang.Float.floatToIntBits( - other.getSamplingRateS())) return false; if (getLastNSamples() != other.getLastNSamples()) return false; if (hasStartTimestamp() != other.hasStartTimestamp()) return false; @@ -3364,16 +3535,13 @@ public final class Monitoring { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getKpiIdCount() > 0) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiIdList().hashCode(); + if (getKpiIdsCount() > 0) { + hash = (37 * hash) + KPI_IDS_FIELD_NUMBER; + hash = (53 * hash) + getKpiIdsList().hashCode(); } hash = (37 * hash) + MONITORING_WINDOW_S_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getMonitoringWindowS()); - hash = (37 * hash) + SAMPLING_RATE_S_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getSamplingRateS()); hash = (37 * hash) + LAST_N_SAMPLES_FIELD_NUMBER; hash = (53 * hash) + getLastNSamples(); if (hasStartTimestamp()) { @@ -3512,22 +3680,20 @@ public final class Monitoring { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getKpiIdFieldBuilder(); + getKpiIdsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = java.util.Collections.emptyList(); + if (kpiIdsBuilder_ == null) { + kpiIds_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - kpiIdBuilder_.clear(); + kpiIdsBuilder_.clear(); } monitoringWindowS_ = 0F; - samplingRateS_ = 0F; - lastNSamples_ = 0; if (startTimestampBuilder_ == null) { @@ -3569,17 +3735,16 @@ public final class Monitoring { public monitoring.Monitoring.KpiQuery buildPartial() { monitoring.Monitoring.KpiQuery result = new monitoring.Monitoring.KpiQuery(this); int from_bitField0_ = bitField0_; - if (kpiIdBuilder_ == null) { + if (kpiIdsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - kpiId_ = java.util.Collections.unmodifiableList(kpiId_); + kpiIds_ = java.util.Collections.unmodifiableList(kpiIds_); bitField0_ = (bitField0_ & ~0x00000001); } - result.kpiId_ = kpiId_; + result.kpiIds_ = kpiIds_; } else { - result.kpiId_ = kpiIdBuilder_.build(); + result.kpiIds_ = kpiIdsBuilder_.build(); } result.monitoringWindowS_ = monitoringWindowS_; - result.samplingRateS_ = samplingRateS_; result.lastNSamples_ = lastNSamples_; if (startTimestampBuilder_ == null) { result.startTimestamp_ = startTimestamp_; @@ -3639,38 +3804,35 @@ public final class Monitoring { public Builder mergeFrom(monitoring.Monitoring.KpiQuery other) { if (other == monitoring.Monitoring.KpiQuery.getDefaultInstance()) return this; - if (kpiIdBuilder_ == null) { - if (!other.kpiId_.isEmpty()) { - if (kpiId_.isEmpty()) { - kpiId_ = other.kpiId_; + if (kpiIdsBuilder_ == null) { + if (!other.kpiIds_.isEmpty()) { + if (kpiIds_.isEmpty()) { + kpiIds_ = other.kpiIds_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureKpiIdIsMutable(); - kpiId_.addAll(other.kpiId_); + ensureKpiIdsIsMutable(); + kpiIds_.addAll(other.kpiIds_); } onChanged(); } } else { - if (!other.kpiId_.isEmpty()) { - if (kpiIdBuilder_.isEmpty()) { - kpiIdBuilder_.dispose(); - kpiIdBuilder_ = null; - kpiId_ = other.kpiId_; + if (!other.kpiIds_.isEmpty()) { + if (kpiIdsBuilder_.isEmpty()) { + kpiIdsBuilder_.dispose(); + kpiIdsBuilder_ = null; + kpiIds_ = other.kpiIds_; bitField0_ = (bitField0_ & ~0x00000001); - kpiIdBuilder_ = + kpiIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiIdFieldBuilder() : null; + getKpiIdsFieldBuilder() : null; } else { - kpiIdBuilder_.addAllMessages(other.kpiId_); + kpiIdsBuilder_.addAllMessages(other.kpiIds_); } } } if (other.getMonitoringWindowS() != 0F) { setMonitoringWindowS(other.getMonitoringWindowS()); } - if (other.getSamplingRateS() != 0F) { - setSamplingRateS(other.getSamplingRateS()); - } if (other.getLastNSamples() != 0) { setLastNSamples(other.getLastNSamples()); } @@ -3710,244 +3872,244 @@ public final class Monitoring { } private int bitField0_; - private java.util.List<monitoring.Monitoring.KpiId> kpiId_ = + private java.util.List<monitoring.Monitoring.KpiId> kpiIds_ = java.util.Collections.emptyList(); - private void ensureKpiIdIsMutable() { + private void ensureKpiIdsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - kpiId_ = new java.util.ArrayList<monitoring.Monitoring.KpiId>(kpiId_); + kpiIds_ = new java.util.ArrayList<monitoring.Monitoring.KpiId>(kpiIds_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; + monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdsBuilder_; /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public java.util.List<monitoring.Monitoring.KpiId> getKpiIdList() { - if (kpiIdBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiId_); + public java.util.List<monitoring.Monitoring.KpiId> getKpiIdsList() { + if (kpiIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(kpiIds_); } else { - return kpiIdBuilder_.getMessageList(); + return kpiIdsBuilder_.getMessageList(); } } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public int getKpiIdCount() { - if (kpiIdBuilder_ == null) { - return kpiId_.size(); + public int getKpiIdsCount() { + if (kpiIdsBuilder_ == null) { + return kpiIds_.size(); } else { - return kpiIdBuilder_.getCount(); + return kpiIdsBuilder_.getCount(); } } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public monitoring.Monitoring.KpiId getKpiId(int index) { - if (kpiIdBuilder_ == null) { - return kpiId_.get(index); + public monitoring.Monitoring.KpiId getKpiIds(int index) { + if (kpiIdsBuilder_ == null) { + return kpiIds_.get(index); } else { - return kpiIdBuilder_.getMessage(index); + return kpiIdsBuilder_.getMessage(index); } } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public Builder setKpiId( + public Builder setKpiIds( int index, monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { + if (kpiIdsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiIdIsMutable(); - kpiId_.set(index, value); + ensureKpiIdsIsMutable(); + kpiIds_.set(index, value); onChanged(); } else { - kpiIdBuilder_.setMessage(index, value); + kpiIdsBuilder_.setMessage(index, value); } return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public Builder setKpiId( + public Builder setKpiIds( int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.set(index, builderForValue.build()); + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.set(index, builderForValue.build()); onChanged(); } else { - kpiIdBuilder_.setMessage(index, builderForValue.build()); + kpiIdsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public Builder addKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { + public Builder addKpiIds(monitoring.Monitoring.KpiId value) { + if (kpiIdsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiIdIsMutable(); - kpiId_.add(value); + ensureKpiIdsIsMutable(); + kpiIds_.add(value); onChanged(); } else { - kpiIdBuilder_.addMessage(value); + kpiIdsBuilder_.addMessage(value); } return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public Builder addKpiId( + public Builder addKpiIds( int index, monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { + if (kpiIdsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiIdIsMutable(); - kpiId_.add(index, value); + ensureKpiIdsIsMutable(); + kpiIds_.add(index, value); onChanged(); } else { - kpiIdBuilder_.addMessage(index, value); + kpiIdsBuilder_.addMessage(index, value); } return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public Builder addKpiId( + public Builder addKpiIds( monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.add(builderForValue.build()); + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.add(builderForValue.build()); onChanged(); } else { - kpiIdBuilder_.addMessage(builderForValue.build()); + kpiIdsBuilder_.addMessage(builderForValue.build()); } return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public Builder addKpiId( + public Builder addKpiIds( int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.add(index, builderForValue.build()); + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.add(index, builderForValue.build()); onChanged(); } else { - kpiIdBuilder_.addMessage(index, builderForValue.build()); + kpiIdsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public Builder addAllKpiId( + public Builder addAllKpiIds( java.lang.Iterable<? extends monitoring.Monitoring.KpiId> values) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiId_); + values, kpiIds_); onChanged(); } else { - kpiIdBuilder_.addAllMessages(values); + kpiIdsBuilder_.addAllMessages(values); } return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = java.util.Collections.emptyList(); + public Builder clearKpiIds() { + if (kpiIdsBuilder_ == null) { + kpiIds_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - kpiIdBuilder_.clear(); + kpiIdsBuilder_.clear(); } return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public Builder removeKpiId(int index) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.remove(index); + public Builder removeKpiIds(int index) { + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.remove(index); onChanged(); } else { - kpiIdBuilder_.remove(index); + kpiIdsBuilder_.remove(index); } return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder( + public monitoring.Monitoring.KpiId.Builder getKpiIdsBuilder( int index) { - return getKpiIdFieldBuilder().getBuilder(index); + return getKpiIdsFieldBuilder().getBuilder(index); } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder( + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder( int index) { - if (kpiIdBuilder_ == null) { - return kpiId_.get(index); } else { - return kpiIdBuilder_.getMessageOrBuilder(index); + if (kpiIdsBuilder_ == null) { + return kpiIds_.get(index); } else { + return kpiIdsBuilder_.getMessageOrBuilder(index); } } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ public java.util.List<? extends monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdOrBuilderList() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilderList(); + getKpiIdsOrBuilderList() { + if (kpiIdsBuilder_ != null) { + return kpiIdsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(kpiId_); + return java.util.Collections.unmodifiableList(kpiIds_); } } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public monitoring.Monitoring.KpiId.Builder addKpiIdBuilder() { - return getKpiIdFieldBuilder().addBuilder( + public monitoring.Monitoring.KpiId.Builder addKpiIdsBuilder() { + return getKpiIdsFieldBuilder().addBuilder( monitoring.Monitoring.KpiId.getDefaultInstance()); } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ - public monitoring.Monitoring.KpiId.Builder addKpiIdBuilder( + public monitoring.Monitoring.KpiId.Builder addKpiIdsBuilder( int index) { - return getKpiIdFieldBuilder().addBuilder( + return getKpiIdsFieldBuilder().addBuilder( index, monitoring.Monitoring.KpiId.getDefaultInstance()); } /** - * <code>repeated .monitoring.KpiId kpi_id = 1;</code> + * <code>repeated .monitoring.KpiId kpi_ids = 1;</code> */ public java.util.List<monitoring.Monitoring.KpiId.Builder> - getKpiIdBuilderList() { - return getKpiIdFieldBuilder().getBuilderList(); + getKpiIdsBuilderList() { + return getKpiIdsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + getKpiIdsFieldBuilder() { + if (kpiIdsBuilder_ == null) { + kpiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - kpiId_, + kpiIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - kpiId_ = null; + kpiIds_ = null; } - return kpiIdBuilder_; + return kpiIdsBuilder_; } private float monitoringWindowS_ ; @@ -3981,44 +4143,13 @@ public final class Monitoring { return this; } - private float samplingRateS_ ; - /** - * <code>float sampling_rate_s = 3;</code> - * @return The samplingRateS. - */ - @java.lang.Override - public float getSamplingRateS() { - return samplingRateS_; - } - /** - * <code>float sampling_rate_s = 3;</code> - * @param value The samplingRateS to set. - * @return This builder for chaining. - */ - public Builder setSamplingRateS(float value) { - - samplingRateS_ = value; - onChanged(); - return this; - } - /** - * <code>float sampling_rate_s = 3;</code> - * @return This builder for chaining. - */ - public Builder clearSamplingRateS() { - - samplingRateS_ = 0F; - onChanged(); - return this; - } - private int lastNSamples_ ; /** * <pre> * used when you want something like "get the last N many samples * </pre> * - * <code>uint32 last_n_samples = 4;</code> + * <code>uint32 last_n_samples = 3;</code> * @return The lastNSamples. */ @java.lang.Override @@ -4030,7 +4161,7 @@ public final class Monitoring { * used when you want something like "get the last N many samples * </pre> * - * <code>uint32 last_n_samples = 4;</code> + * <code>uint32 last_n_samples = 3;</code> * @param value The lastNSamples to set. * @return This builder for chaining. */ @@ -4045,7 +4176,7 @@ public final class Monitoring { * used when you want something like "get the last N many samples * </pre> * - * <code>uint32 last_n_samples = 4;</code> + * <code>uint32 last_n_samples = 3;</code> * @return This builder for chaining. */ public Builder clearLastNSamples() { @@ -4063,7 +4194,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> * @return Whether the startTimestamp field is set. */ public boolean hasStartTimestamp() { @@ -4074,7 +4205,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> * @return The startTimestamp. */ public context.ContextOuterClass.Timestamp getStartTimestamp() { @@ -4089,7 +4220,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> */ public Builder setStartTimestamp(context.ContextOuterClass.Timestamp value) { if (startTimestampBuilder_ == null) { @@ -4109,7 +4240,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> */ public Builder setStartTimestamp( context.ContextOuterClass.Timestamp.Builder builderForValue) { @@ -4127,7 +4258,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> */ public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) { if (startTimestampBuilder_ == null) { @@ -4149,7 +4280,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> */ public Builder clearStartTimestamp() { if (startTimestampBuilder_ == null) { @@ -4167,7 +4298,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> */ public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() { @@ -4179,7 +4310,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> */ public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { if (startTimestampBuilder_ != null) { @@ -4194,7 +4325,7 @@ public final class Monitoring { * used when you want something like "get the samples since X date/time" * </pre> * - * <code>.context.Timestamp start_timestamp = 5;</code> + * <code>.context.Timestamp start_timestamp = 4;</code> */ private com.google.protobuf.SingleFieldBuilderV3< context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> @@ -4218,7 +4349,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> * @return Whether the endTimestamp field is set. */ public boolean hasEndTimestamp() { @@ -4229,7 +4360,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> * @return The endTimestamp. */ public context.ContextOuterClass.Timestamp getEndTimestamp() { @@ -4244,7 +4375,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> */ public Builder setEndTimestamp(context.ContextOuterClass.Timestamp value) { if (endTimestampBuilder_ == null) { @@ -4264,7 +4395,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> */ public Builder setEndTimestamp( context.ContextOuterClass.Timestamp.Builder builderForValue) { @@ -4282,7 +4413,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> */ public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) { if (endTimestampBuilder_ == null) { @@ -4304,7 +4435,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> */ public Builder clearEndTimestamp() { if (endTimestampBuilder_ == null) { @@ -4322,7 +4453,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> */ public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() { @@ -4334,7 +4465,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> */ public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { if (endTimestampBuilder_ != null) { @@ -4349,7 +4480,7 @@ public final class Monitoring { * used when you want something like "get the samples until X date/time" * </pre> * - * <code>.context.Timestamp end_timestamp = 6;</code> + * <code>.context.Timestamp end_timestamp = 5;</code> */ private com.google.protobuf.SingleFieldBuilderV3< context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> @@ -4417,22 +4548,2659 @@ public final class Monitoring { } - public interface KpiIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiId) + public interface RawKpiOrBuilder extends + // @@protoc_insertion_point(interface_extends:monitoring.RawKpi) com.google.protobuf.MessageOrBuilder { /** - * <code>.context.Uuid kpi_id = 1;</code> - * @return Whether the kpiId field is set. + * <code>.context.Timestamp timestamp = 1;</code> + * @return Whether the timestamp field is set. */ - boolean hasKpiId(); + boolean hasTimestamp(); /** - * <code>.context.Uuid kpi_id = 1;</code> - * @return The kpiId. + * <code>.context.Timestamp timestamp = 1;</code> + * @return The timestamp. */ - context.ContextOuterClass.Uuid getKpiId(); + context.ContextOuterClass.Timestamp getTimestamp(); /** - * <code>.context.Uuid kpi_id = 1;</code> + * <code>.context.Timestamp timestamp = 1;</code> + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + * @return Whether the kpiValue field is set. + */ + boolean hasKpiValue(); + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + * @return The kpiValue. + */ + monitoring.Monitoring.KpiValue getKpiValue(); + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + */ + monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); + } + /** + * <pre> + * cell + * </pre> + * + * Protobuf type {@code monitoring.RawKpi} + */ + public static final class RawKpi extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:monitoring.RawKpi) + RawKpiOrBuilder { + private static final long serialVersionUID = 0L; + // Use RawKpi.newBuilder() to construct. + private RawKpi(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private RawKpi() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RawKpi(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RawKpi( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + context.ContextOuterClass.Timestamp.Builder subBuilder = null; + if (timestamp_ != null) { + subBuilder = timestamp_.toBuilder(); + } + timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timestamp_); + timestamp_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + monitoring.Monitoring.KpiValue.Builder subBuilder = null; + if (kpiValue_ != null) { + subBuilder = kpiValue_.toBuilder(); + } + kpiValue_ = input.readMessage(monitoring.Monitoring.KpiValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(kpiValue_); + kpiValue_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_fieldAccessorTable + .ensureFieldAccessorsInitialized( + monitoring.Monitoring.RawKpi.class, monitoring.Monitoring.RawKpi.Builder.class); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private context.ContextOuterClass.Timestamp timestamp_; + /** + * <code>.context.Timestamp timestamp = 1;</code> + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + /** + * <code>.context.Timestamp timestamp = 1;</code> + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + /** + * <code>.context.Timestamp timestamp = 1;</code> + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + public static final int KPI_VALUE_FIELD_NUMBER = 2; + private monitoring.Monitoring.KpiValue kpiValue_; + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + * @return Whether the kpiValue field is set. + */ + @java.lang.Override + public boolean hasKpiValue() { + return kpiValue_ != null; + } + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + * @return The kpiValue. + */ + @java.lang.Override + public monitoring.Monitoring.KpiValue getKpiValue() { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { + return getKpiValue(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (timestamp_ != null) { + output.writeMessage(1, getTimestamp()); + } + if (kpiValue_ != null) { + output.writeMessage(2, getKpiValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTimestamp()); + } + if (kpiValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getKpiValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.RawKpi)) { + return super.equals(obj); + } + monitoring.Monitoring.RawKpi other = (monitoring.Monitoring.RawKpi) obj; + + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp() + .equals(other.getTimestamp())) return false; + } + if (hasKpiValue() != other.hasKpiValue()) return false; + if (hasKpiValue()) { + if (!getKpiValue() + .equals(other.getKpiValue())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + if (hasKpiValue()) { + hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getKpiValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.RawKpi parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static monitoring.Monitoring.RawKpi parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static monitoring.Monitoring.RawKpi parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static monitoring.Monitoring.RawKpi parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static monitoring.Monitoring.RawKpi parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static monitoring.Monitoring.RawKpi parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static monitoring.Monitoring.RawKpi parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static monitoring.Monitoring.RawKpi parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static monitoring.Monitoring.RawKpi parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static monitoring.Monitoring.RawKpi parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static monitoring.Monitoring.RawKpi parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static monitoring.Monitoring.RawKpi parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(monitoring.Monitoring.RawKpi prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * <pre> + * cell + * </pre> + * + * Protobuf type {@code monitoring.RawKpi} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:monitoring.RawKpi) + monitoring.Monitoring.RawKpiOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_fieldAccessorTable + .ensureFieldAccessorsInitialized( + monitoring.Monitoring.RawKpi.class, monitoring.Monitoring.RawKpi.Builder.class); + } + + // Construct using monitoring.Monitoring.RawKpi.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + if (kpiValueBuilder_ == null) { + kpiValue_ = null; + } else { + kpiValue_ = null; + kpiValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpi getDefaultInstanceForType() { + return monitoring.Monitoring.RawKpi.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.RawKpi build() { + monitoring.Monitoring.RawKpi result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpi buildPartial() { + monitoring.Monitoring.RawKpi result = new monitoring.Monitoring.RawKpi(this); + if (timestampBuilder_ == null) { + result.timestamp_ = timestamp_; + } else { + result.timestamp_ = timestampBuilder_.build(); + } + if (kpiValueBuilder_ == null) { + result.kpiValue_ = kpiValue_; + } else { + result.kpiValue_ = kpiValueBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.RawKpi) { + return mergeFrom((monitoring.Monitoring.RawKpi)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.RawKpi other) { + if (other == monitoring.Monitoring.RawKpi.getDefaultInstance()) return this; + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (other.hasKpiValue()) { + mergeKpiValue(other.getKpiValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + monitoring.Monitoring.RawKpi parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.RawKpi) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Timestamp timestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; + /** + * <code>.context.Timestamp timestamp = 1;</code> + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + /** + * <code>.context.Timestamp timestamp = 1;</code> + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + /** + * <code>.context.Timestamp timestamp = 1;</code> + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + + return this; + } + /** + * <code>.context.Timestamp timestamp = 1;</code> + */ + public Builder setTimestamp( + context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * <code>.context.Timestamp timestamp = 1;</code> + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = + context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + + return this; + } + /** + * <code>.context.Timestamp timestamp = 1;</code> + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + + return this; + } + /** + * <code>.context.Timestamp timestamp = 1;</code> + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + /** + * <code>.context.Timestamp timestamp = 1;</code> + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? + context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } + /** + * <code>.context.Timestamp timestamp = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( + getTimestamp(), + getParentForChildren(), + isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private monitoring.Monitoring.KpiValue kpiValue_; + private com.google.protobuf.SingleFieldBuilderV3< + monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiValueBuilder_; + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + * @return Whether the kpiValue field is set. + */ + public boolean hasKpiValue() { + return kpiValueBuilder_ != null || kpiValue_ != null; + } + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + * @return The kpiValue. + */ + public monitoring.Monitoring.KpiValue getKpiValue() { + if (kpiValueBuilder_ == null) { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } else { + return kpiValueBuilder_.getMessage(); + } + } + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + */ + public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { + if (kpiValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiValue_ = value; + onChanged(); + } else { + kpiValueBuilder_.setMessage(value); + } + + return this; + } + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + */ + public Builder setKpiValue( + monitoring.Monitoring.KpiValue.Builder builderForValue) { + if (kpiValueBuilder_ == null) { + kpiValue_ = builderForValue.build(); + onChanged(); + } else { + kpiValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + */ + public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { + if (kpiValueBuilder_ == null) { + if (kpiValue_ != null) { + kpiValue_ = + monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); + } else { + kpiValue_ = value; + } + onChanged(); + } else { + kpiValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + */ + public Builder clearKpiValue() { + if (kpiValueBuilder_ == null) { + kpiValue_ = null; + onChanged(); + } else { + kpiValue_ = null; + kpiValueBuilder_ = null; + } + + return this; + } + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + */ + public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { + + onChanged(); + return getKpiValueFieldBuilder().getBuilder(); + } + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + */ + public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { + if (kpiValueBuilder_ != null) { + return kpiValueBuilder_.getMessageOrBuilder(); + } else { + return kpiValue_ == null ? + monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } + } + /** + * <code>.monitoring.KpiValue kpi_value = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> + getKpiValueFieldBuilder() { + if (kpiValueBuilder_ == null) { + kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder>( + getKpiValue(), + getParentForChildren(), + isClean()); + kpiValue_ = null; + } + return kpiValueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:monitoring.RawKpi) + } + + // @@protoc_insertion_point(class_scope:monitoring.RawKpi) + private static final monitoring.Monitoring.RawKpi DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpi(); + } + + public static monitoring.Monitoring.RawKpi getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<RawKpi> + PARSER = new com.google.protobuf.AbstractParser<RawKpi>() { + @java.lang.Override + public RawKpi parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RawKpi(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<RawKpi> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<RawKpi> getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpi getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RawKpiListOrBuilder extends + // @@protoc_insertion_point(interface_extends:monitoring.RawKpiList) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + java.util.List<monitoring.Monitoring.RawKpi> + getRawKpisList(); + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + monitoring.Monitoring.RawKpi getRawKpis(int index); + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + int getRawKpisCount(); + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + java.util.List<? extends monitoring.Monitoring.RawKpiOrBuilder> + getRawKpisOrBuilderList(); + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder( + int index); + } + /** + * <pre> + * column + * </pre> + * + * Protobuf type {@code monitoring.RawKpiList} + */ + public static final class RawKpiList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:monitoring.RawKpiList) + RawKpiListOrBuilder { + private static final long serialVersionUID = 0L; + // Use RawKpiList.newBuilder() to construct. + private RawKpiList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private RawKpiList() { + rawKpis_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RawKpiList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RawKpiList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + monitoring.Monitoring.KpiId.Builder subBuilder = null; + if (kpiId_ != null) { + subBuilder = kpiId_.toBuilder(); + } + kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(kpiId_); + kpiId_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + rawKpis_ = new java.util.ArrayList<monitoring.Monitoring.RawKpi>(); + mutable_bitField0_ |= 0x00000001; + } + rawKpis_.add( + input.readMessage(monitoring.Monitoring.RawKpi.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + rawKpis_ = java.util.Collections.unmodifiableList(rawKpis_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + monitoring.Monitoring.RawKpiList.class, monitoring.Monitoring.RawKpiList.Builder.class); + } + + public static final int KPI_ID_FIELD_NUMBER = 1; + private monitoring.Monitoring.KpiId kpiId_; + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int RAW_KPIS_FIELD_NUMBER = 2; + private java.util.List<monitoring.Monitoring.RawKpi> rawKpis_; + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + @java.lang.Override + public java.util.List<monitoring.Monitoring.RawKpi> getRawKpisList() { + return rawKpis_; + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + @java.lang.Override + public java.util.List<? extends monitoring.Monitoring.RawKpiOrBuilder> + getRawKpisOrBuilderList() { + return rawKpis_; + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + @java.lang.Override + public int getRawKpisCount() { + return rawKpis_.size(); + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + @java.lang.Override + public monitoring.Monitoring.RawKpi getRawKpis(int index) { + return rawKpis_.get(index); + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + @java.lang.Override + public monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder( + int index) { + return rawKpis_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + for (int i = 0; i < rawKpis_.size(); i++) { + output.writeMessage(2, rawKpis_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getKpiId()); + } + for (int i = 0; i < rawKpis_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, rawKpis_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.RawKpiList)) { + return super.equals(obj); + } + monitoring.Monitoring.RawKpiList other = (monitoring.Monitoring.RawKpiList) obj; + + if (hasKpiId() != other.hasKpiId()) return false; + if (hasKpiId()) { + if (!getKpiId() + .equals(other.getKpiId())) return false; + } + if (!getRawKpisList() + .equals(other.getRawKpisList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + if (getRawKpisCount() > 0) { + hash = (37 * hash) + RAW_KPIS_FIELD_NUMBER; + hash = (53 * hash) + getRawKpisList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.RawKpiList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static monitoring.Monitoring.RawKpiList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static monitoring.Monitoring.RawKpiList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static monitoring.Monitoring.RawKpiList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static monitoring.Monitoring.RawKpiList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static monitoring.Monitoring.RawKpiList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static monitoring.Monitoring.RawKpiList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static monitoring.Monitoring.RawKpiList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static monitoring.Monitoring.RawKpiList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static monitoring.Monitoring.RawKpiList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static monitoring.Monitoring.RawKpiList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static monitoring.Monitoring.RawKpiList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(monitoring.Monitoring.RawKpiList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * <pre> + * column + * </pre> + * + * Protobuf type {@code monitoring.RawKpiList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:monitoring.RawKpiList) + monitoring.Monitoring.RawKpiListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + monitoring.Monitoring.RawKpiList.class, monitoring.Monitoring.RawKpiList.Builder.class); + } + + // Construct using monitoring.Monitoring.RawKpiList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRawKpisFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (kpiIdBuilder_ == null) { + kpiId_ = null; + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + if (rawKpisBuilder_ == null) { + rawKpis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rawKpisBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiList getDefaultInstanceForType() { + return monitoring.Monitoring.RawKpiList.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiList build() { + monitoring.Monitoring.RawKpiList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiList buildPartial() { + monitoring.Monitoring.RawKpiList result = new monitoring.Monitoring.RawKpiList(this); + int from_bitField0_ = bitField0_; + if (kpiIdBuilder_ == null) { + result.kpiId_ = kpiId_; + } else { + result.kpiId_ = kpiIdBuilder_.build(); + } + if (rawKpisBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rawKpis_ = java.util.Collections.unmodifiableList(rawKpis_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rawKpis_ = rawKpis_; + } else { + result.rawKpis_ = rawKpisBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.RawKpiList) { + return mergeFrom((monitoring.Monitoring.RawKpiList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.RawKpiList other) { + if (other == monitoring.Monitoring.RawKpiList.getDefaultInstance()) return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (rawKpisBuilder_ == null) { + if (!other.rawKpis_.isEmpty()) { + if (rawKpis_.isEmpty()) { + rawKpis_ = other.rawKpis_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRawKpisIsMutable(); + rawKpis_.addAll(other.rawKpis_); + } + onChanged(); + } + } else { + if (!other.rawKpis_.isEmpty()) { + if (rawKpisBuilder_.isEmpty()) { + rawKpisBuilder_.dispose(); + rawKpisBuilder_ = null; + rawKpis_ = other.rawKpis_; + bitField0_ = (bitField0_ & ~0x00000001); + rawKpisBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRawKpisFieldBuilder() : null; + } else { + rawKpisBuilder_.addAllMessages(other.rawKpis_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + monitoring.Monitoring.RawKpiList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.RawKpiList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private monitoring.Monitoring.KpiId kpiId_; + private com.google.protobuf.SingleFieldBuilderV3< + monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + + return this; + } + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + */ + public Builder setKpiId( + monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = + monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + + return this; + } + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? + monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + /** + * <code>.monitoring.KpiId kpi_id = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> + getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( + getKpiId(), + getParentForChildren(), + isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private java.util.List<monitoring.Monitoring.RawKpi> rawKpis_ = + java.util.Collections.emptyList(); + private void ensureRawKpisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rawKpis_ = new java.util.ArrayList<monitoring.Monitoring.RawKpi>(rawKpis_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + monitoring.Monitoring.RawKpi, monitoring.Monitoring.RawKpi.Builder, monitoring.Monitoring.RawKpiOrBuilder> rawKpisBuilder_; + + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public java.util.List<monitoring.Monitoring.RawKpi> getRawKpisList() { + if (rawKpisBuilder_ == null) { + return java.util.Collections.unmodifiableList(rawKpis_); + } else { + return rawKpisBuilder_.getMessageList(); + } + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public int getRawKpisCount() { + if (rawKpisBuilder_ == null) { + return rawKpis_.size(); + } else { + return rawKpisBuilder_.getCount(); + } + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public monitoring.Monitoring.RawKpi getRawKpis(int index) { + if (rawKpisBuilder_ == null) { + return rawKpis_.get(index); + } else { + return rawKpisBuilder_.getMessage(index); + } + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public Builder setRawKpis( + int index, monitoring.Monitoring.RawKpi value) { + if (rawKpisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpisIsMutable(); + rawKpis_.set(index, value); + onChanged(); + } else { + rawKpisBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public Builder setRawKpis( + int index, monitoring.Monitoring.RawKpi.Builder builderForValue) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.set(index, builderForValue.build()); + onChanged(); + } else { + rawKpisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public Builder addRawKpis(monitoring.Monitoring.RawKpi value) { + if (rawKpisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpisIsMutable(); + rawKpis_.add(value); + onChanged(); + } else { + rawKpisBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public Builder addRawKpis( + int index, monitoring.Monitoring.RawKpi value) { + if (rawKpisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpisIsMutable(); + rawKpis_.add(index, value); + onChanged(); + } else { + rawKpisBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public Builder addRawKpis( + monitoring.Monitoring.RawKpi.Builder builderForValue) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.add(builderForValue.build()); + onChanged(); + } else { + rawKpisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public Builder addRawKpis( + int index, monitoring.Monitoring.RawKpi.Builder builderForValue) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.add(index, builderForValue.build()); + onChanged(); + } else { + rawKpisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public Builder addAllRawKpis( + java.lang.Iterable<? extends monitoring.Monitoring.RawKpi> values) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rawKpis_); + onChanged(); + } else { + rawKpisBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public Builder clearRawKpis() { + if (rawKpisBuilder_ == null) { + rawKpis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rawKpisBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public Builder removeRawKpis(int index) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.remove(index); + onChanged(); + } else { + rawKpisBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public monitoring.Monitoring.RawKpi.Builder getRawKpisBuilder( + int index) { + return getRawKpisFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder( + int index) { + if (rawKpisBuilder_ == null) { + return rawKpis_.get(index); } else { + return rawKpisBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public java.util.List<? extends monitoring.Monitoring.RawKpiOrBuilder> + getRawKpisOrBuilderList() { + if (rawKpisBuilder_ != null) { + return rawKpisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rawKpis_); + } + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public monitoring.Monitoring.RawKpi.Builder addRawKpisBuilder() { + return getRawKpisFieldBuilder().addBuilder( + monitoring.Monitoring.RawKpi.getDefaultInstance()); + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public monitoring.Monitoring.RawKpi.Builder addRawKpisBuilder( + int index) { + return getRawKpisFieldBuilder().addBuilder( + index, monitoring.Monitoring.RawKpi.getDefaultInstance()); + } + /** + * <code>repeated .monitoring.RawKpi raw_kpis = 2;</code> + */ + public java.util.List<monitoring.Monitoring.RawKpi.Builder> + getRawKpisBuilderList() { + return getRawKpisFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + monitoring.Monitoring.RawKpi, monitoring.Monitoring.RawKpi.Builder, monitoring.Monitoring.RawKpiOrBuilder> + getRawKpisFieldBuilder() { + if (rawKpisBuilder_ == null) { + rawKpisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + monitoring.Monitoring.RawKpi, monitoring.Monitoring.RawKpi.Builder, monitoring.Monitoring.RawKpiOrBuilder>( + rawKpis_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + rawKpis_ = null; + } + return rawKpisBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:monitoring.RawKpiList) + } + + // @@protoc_insertion_point(class_scope:monitoring.RawKpiList) + private static final monitoring.Monitoring.RawKpiList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpiList(); + } + + public static monitoring.Monitoring.RawKpiList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<RawKpiList> + PARSER = new com.google.protobuf.AbstractParser<RawKpiList>() { + @java.lang.Override + public RawKpiList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RawKpiList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<RawKpiList> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<RawKpiList> getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RawKpiTableOrBuilder extends + // @@protoc_insertion_point(interface_extends:monitoring.RawKpiTable) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + java.util.List<monitoring.Monitoring.RawKpiList> + getRawKpiListsList(); + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + monitoring.Monitoring.RawKpiList getRawKpiLists(int index); + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + int getRawKpiListsCount(); + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + java.util.List<? extends monitoring.Monitoring.RawKpiListOrBuilder> + getRawKpiListsOrBuilderList(); + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder( + int index); + } + /** + * <pre> + * table + * </pre> + * + * Protobuf type {@code monitoring.RawKpiTable} + */ + public static final class RawKpiTable extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:monitoring.RawKpiTable) + RawKpiTableOrBuilder { + private static final long serialVersionUID = 0L; + // Use RawKpiTable.newBuilder() to construct. + private RawKpiTable(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private RawKpiTable() { + rawKpiLists_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RawKpiTable(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RawKpiTable( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + rawKpiLists_ = new java.util.ArrayList<monitoring.Monitoring.RawKpiList>(); + mutable_bitField0_ |= 0x00000001; + } + rawKpiLists_.add( + input.readMessage(monitoring.Monitoring.RawKpiList.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + rawKpiLists_ = java.util.Collections.unmodifiableList(rawKpiLists_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + monitoring.Monitoring.RawKpiTable.class, monitoring.Monitoring.RawKpiTable.Builder.class); + } + + public static final int RAW_KPI_LISTS_FIELD_NUMBER = 1; + private java.util.List<monitoring.Monitoring.RawKpiList> rawKpiLists_; + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + @java.lang.Override + public java.util.List<monitoring.Monitoring.RawKpiList> getRawKpiListsList() { + return rawKpiLists_; + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + @java.lang.Override + public java.util.List<? extends monitoring.Monitoring.RawKpiListOrBuilder> + getRawKpiListsOrBuilderList() { + return rawKpiLists_; + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + @java.lang.Override + public int getRawKpiListsCount() { + return rawKpiLists_.size(); + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + @java.lang.Override + public monitoring.Monitoring.RawKpiList getRawKpiLists(int index) { + return rawKpiLists_.get(index); + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + @java.lang.Override + public monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder( + int index) { + return rawKpiLists_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < rawKpiLists_.size(); i++) { + output.writeMessage(1, rawKpiLists_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rawKpiLists_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, rawKpiLists_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.RawKpiTable)) { + return super.equals(obj); + } + monitoring.Monitoring.RawKpiTable other = (monitoring.Monitoring.RawKpiTable) obj; + + if (!getRawKpiListsList() + .equals(other.getRawKpiListsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRawKpiListsCount() > 0) { + hash = (37 * hash) + RAW_KPI_LISTS_FIELD_NUMBER; + hash = (53 * hash) + getRawKpiListsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.RawKpiTable parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static monitoring.Monitoring.RawKpiTable parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static monitoring.Monitoring.RawKpiTable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static monitoring.Monitoring.RawKpiTable parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static monitoring.Monitoring.RawKpiTable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static monitoring.Monitoring.RawKpiTable parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static monitoring.Monitoring.RawKpiTable parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static monitoring.Monitoring.RawKpiTable parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static monitoring.Monitoring.RawKpiTable parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static monitoring.Monitoring.RawKpiTable parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static monitoring.Monitoring.RawKpiTable parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static monitoring.Monitoring.RawKpiTable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(monitoring.Monitoring.RawKpiTable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * <pre> + * table + * </pre> + * + * Protobuf type {@code monitoring.RawKpiTable} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:monitoring.RawKpiTable) + monitoring.Monitoring.RawKpiTableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + monitoring.Monitoring.RawKpiTable.class, monitoring.Monitoring.RawKpiTable.Builder.class); + } + + // Construct using monitoring.Monitoring.RawKpiTable.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRawKpiListsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (rawKpiListsBuilder_ == null) { + rawKpiLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rawKpiListsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiTable getDefaultInstanceForType() { + return monitoring.Monitoring.RawKpiTable.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiTable build() { + monitoring.Monitoring.RawKpiTable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiTable buildPartial() { + monitoring.Monitoring.RawKpiTable result = new monitoring.Monitoring.RawKpiTable(this); + int from_bitField0_ = bitField0_; + if (rawKpiListsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rawKpiLists_ = java.util.Collections.unmodifiableList(rawKpiLists_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rawKpiLists_ = rawKpiLists_; + } else { + result.rawKpiLists_ = rawKpiListsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.RawKpiTable) { + return mergeFrom((monitoring.Monitoring.RawKpiTable)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.RawKpiTable other) { + if (other == monitoring.Monitoring.RawKpiTable.getDefaultInstance()) return this; + if (rawKpiListsBuilder_ == null) { + if (!other.rawKpiLists_.isEmpty()) { + if (rawKpiLists_.isEmpty()) { + rawKpiLists_ = other.rawKpiLists_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRawKpiListsIsMutable(); + rawKpiLists_.addAll(other.rawKpiLists_); + } + onChanged(); + } + } else { + if (!other.rawKpiLists_.isEmpty()) { + if (rawKpiListsBuilder_.isEmpty()) { + rawKpiListsBuilder_.dispose(); + rawKpiListsBuilder_ = null; + rawKpiLists_ = other.rawKpiLists_; + bitField0_ = (bitField0_ & ~0x00000001); + rawKpiListsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRawKpiListsFieldBuilder() : null; + } else { + rawKpiListsBuilder_.addAllMessages(other.rawKpiLists_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + monitoring.Monitoring.RawKpiTable parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.RawKpiTable) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List<monitoring.Monitoring.RawKpiList> rawKpiLists_ = + java.util.Collections.emptyList(); + private void ensureRawKpiListsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rawKpiLists_ = new java.util.ArrayList<monitoring.Monitoring.RawKpiList>(rawKpiLists_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + monitoring.Monitoring.RawKpiList, monitoring.Monitoring.RawKpiList.Builder, monitoring.Monitoring.RawKpiListOrBuilder> rawKpiListsBuilder_; + + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public java.util.List<monitoring.Monitoring.RawKpiList> getRawKpiListsList() { + if (rawKpiListsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rawKpiLists_); + } else { + return rawKpiListsBuilder_.getMessageList(); + } + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public int getRawKpiListsCount() { + if (rawKpiListsBuilder_ == null) { + return rawKpiLists_.size(); + } else { + return rawKpiListsBuilder_.getCount(); + } + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public monitoring.Monitoring.RawKpiList getRawKpiLists(int index) { + if (rawKpiListsBuilder_ == null) { + return rawKpiLists_.get(index); + } else { + return rawKpiListsBuilder_.getMessage(index); + } + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public Builder setRawKpiLists( + int index, monitoring.Monitoring.RawKpiList value) { + if (rawKpiListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpiListsIsMutable(); + rawKpiLists_.set(index, value); + onChanged(); + } else { + rawKpiListsBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public Builder setRawKpiLists( + int index, monitoring.Monitoring.RawKpiList.Builder builderForValue) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.set(index, builderForValue.build()); + onChanged(); + } else { + rawKpiListsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public Builder addRawKpiLists(monitoring.Monitoring.RawKpiList value) { + if (rawKpiListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(value); + onChanged(); + } else { + rawKpiListsBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public Builder addRawKpiLists( + int index, monitoring.Monitoring.RawKpiList value) { + if (rawKpiListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(index, value); + onChanged(); + } else { + rawKpiListsBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public Builder addRawKpiLists( + monitoring.Monitoring.RawKpiList.Builder builderForValue) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(builderForValue.build()); + onChanged(); + } else { + rawKpiListsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public Builder addRawKpiLists( + int index, monitoring.Monitoring.RawKpiList.Builder builderForValue) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(index, builderForValue.build()); + onChanged(); + } else { + rawKpiListsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public Builder addAllRawKpiLists( + java.lang.Iterable<? extends monitoring.Monitoring.RawKpiList> values) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rawKpiLists_); + onChanged(); + } else { + rawKpiListsBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public Builder clearRawKpiLists() { + if (rawKpiListsBuilder_ == null) { + rawKpiLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rawKpiListsBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public Builder removeRawKpiLists(int index) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.remove(index); + onChanged(); + } else { + rawKpiListsBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public monitoring.Monitoring.RawKpiList.Builder getRawKpiListsBuilder( + int index) { + return getRawKpiListsFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder( + int index) { + if (rawKpiListsBuilder_ == null) { + return rawKpiLists_.get(index); } else { + return rawKpiListsBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public java.util.List<? extends monitoring.Monitoring.RawKpiListOrBuilder> + getRawKpiListsOrBuilderList() { + if (rawKpiListsBuilder_ != null) { + return rawKpiListsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rawKpiLists_); + } + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public monitoring.Monitoring.RawKpiList.Builder addRawKpiListsBuilder() { + return getRawKpiListsFieldBuilder().addBuilder( + monitoring.Monitoring.RawKpiList.getDefaultInstance()); + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public monitoring.Monitoring.RawKpiList.Builder addRawKpiListsBuilder( + int index) { + return getRawKpiListsFieldBuilder().addBuilder( + index, monitoring.Monitoring.RawKpiList.getDefaultInstance()); + } + /** + * <code>repeated .monitoring.RawKpiList raw_kpi_lists = 1;</code> + */ + public java.util.List<monitoring.Monitoring.RawKpiList.Builder> + getRawKpiListsBuilderList() { + return getRawKpiListsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + monitoring.Monitoring.RawKpiList, monitoring.Monitoring.RawKpiList.Builder, monitoring.Monitoring.RawKpiListOrBuilder> + getRawKpiListsFieldBuilder() { + if (rawKpiListsBuilder_ == null) { + rawKpiListsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + monitoring.Monitoring.RawKpiList, monitoring.Monitoring.RawKpiList.Builder, monitoring.Monitoring.RawKpiListOrBuilder>( + rawKpiLists_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + rawKpiLists_ = null; + } + return rawKpiListsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:monitoring.RawKpiTable) + } + + // @@protoc_insertion_point(class_scope:monitoring.RawKpiTable) + private static final monitoring.Monitoring.RawKpiTable DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpiTable(); + } + + public static monitoring.Monitoring.RawKpiTable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<RawKpiTable> + PARSER = new com.google.protobuf.AbstractParser<RawKpiTable>() { + @java.lang.Override + public RawKpiTable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RawKpiTable(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<RawKpiTable> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<RawKpiTable> getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiTable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface KpiIdOrBuilder extends + // @@protoc_insertion_point(interface_extends:monitoring.KpiId) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.context.Uuid kpi_id = 1;</code> + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + /** + * <code>.context.Uuid kpi_id = 1;</code> + * @return The kpiId. + */ + context.ContextOuterClass.Uuid getKpiId(); + /** + * <code>.context.Uuid kpi_id = 1;</code> */ context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder(); } @@ -8482,27 +11250,27 @@ public final class Monitoring { com.google.protobuf.MessageOrBuilder { /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ java.util.List<monitoring.Monitoring.Kpi> - getKpiListList(); + getKpiList(); /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - monitoring.Monitoring.Kpi getKpiList(int index); + monitoring.Monitoring.Kpi getKpi(int index); /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - int getKpiListCount(); + int getKpiCount(); /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ java.util.List<? extends monitoring.Monitoring.KpiOrBuilder> - getKpiListOrBuilderList(); + getKpiOrBuilderList(); /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - monitoring.Monitoring.KpiOrBuilder getKpiListOrBuilder( + monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder( int index); } /** @@ -8518,7 +11286,7 @@ public final class Monitoring { super(builder); } private KpiList() { - kpiList_ = java.util.Collections.emptyList(); + kpi_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -8554,10 +11322,10 @@ public final class Monitoring { break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiList_ = new java.util.ArrayList<monitoring.Monitoring.Kpi>(); + kpi_ = new java.util.ArrayList<monitoring.Monitoring.Kpi>(); mutable_bitField0_ |= 0x00000001; } - kpiList_.add( + kpi_.add( input.readMessage(monitoring.Monitoring.Kpi.parser(), extensionRegistry)); break; } @@ -8577,7 +11345,7 @@ public final class Monitoring { e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiList_ = java.util.Collections.unmodifiableList(kpiList_); + kpi_ = java.util.Collections.unmodifiableList(kpi_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -8596,44 +11364,44 @@ public final class Monitoring { monitoring.Monitoring.KpiList.class, monitoring.Monitoring.KpiList.Builder.class); } - public static final int KPI_LIST_FIELD_NUMBER = 1; - private java.util.List<monitoring.Monitoring.Kpi> kpiList_; + public static final int KPI_FIELD_NUMBER = 1; + private java.util.List<monitoring.Monitoring.Kpi> kpi_; /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ @java.lang.Override - public java.util.List<monitoring.Monitoring.Kpi> getKpiListList() { - return kpiList_; + public java.util.List<monitoring.Monitoring.Kpi> getKpiList() { + return kpi_; } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ @java.lang.Override public java.util.List<? extends monitoring.Monitoring.KpiOrBuilder> - getKpiListOrBuilderList() { - return kpiList_; + getKpiOrBuilderList() { + return kpi_; } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ @java.lang.Override - public int getKpiListCount() { - return kpiList_.size(); + public int getKpiCount() { + return kpi_.size(); } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ @java.lang.Override - public monitoring.Monitoring.Kpi getKpiList(int index) { - return kpiList_.get(index); + public monitoring.Monitoring.Kpi getKpi(int index) { + return kpi_.get(index); } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ @java.lang.Override - public monitoring.Monitoring.KpiOrBuilder getKpiListOrBuilder( + public monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder( int index) { - return kpiList_.get(index); + return kpi_.get(index); } private byte memoizedIsInitialized = -1; @@ -8650,8 +11418,8 @@ public final class Monitoring { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < kpiList_.size(); i++) { - output.writeMessage(1, kpiList_.get(i)); + for (int i = 0; i < kpi_.size(); i++) { + output.writeMessage(1, kpi_.get(i)); } unknownFields.writeTo(output); } @@ -8662,9 +11430,9 @@ public final class Monitoring { if (size != -1) return size; size = 0; - for (int i = 0; i < kpiList_.size(); i++) { + for (int i = 0; i < kpi_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, kpiList_.get(i)); + .computeMessageSize(1, kpi_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -8681,8 +11449,8 @@ public final class Monitoring { } monitoring.Monitoring.KpiList other = (monitoring.Monitoring.KpiList) obj; - if (!getKpiListList() - .equals(other.getKpiListList())) return false; + if (!getKpiList() + .equals(other.getKpiList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -8694,9 +11462,9 @@ public final class Monitoring { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getKpiListCount() > 0) { - hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; - hash = (53 * hash) + getKpiListList().hashCode(); + if (getKpiCount() > 0) { + hash = (37 * hash) + KPI_FIELD_NUMBER; + hash = (53 * hash) + getKpiList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; @@ -8826,17 +11594,17 @@ public final class Monitoring { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getKpiListFieldBuilder(); + getKpiFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiListBuilder_ == null) { - kpiList_ = java.util.Collections.emptyList(); + if (kpiBuilder_ == null) { + kpi_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - kpiListBuilder_.clear(); + kpiBuilder_.clear(); } return this; } @@ -8865,14 +11633,14 @@ public final class Monitoring { public monitoring.Monitoring.KpiList buildPartial() { monitoring.Monitoring.KpiList result = new monitoring.Monitoring.KpiList(this); int from_bitField0_ = bitField0_; - if (kpiListBuilder_ == null) { + if (kpiBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - kpiList_ = java.util.Collections.unmodifiableList(kpiList_); + kpi_ = java.util.Collections.unmodifiableList(kpi_); bitField0_ = (bitField0_ & ~0x00000001); } - result.kpiList_ = kpiList_; + result.kpi_ = kpi_; } else { - result.kpiList_ = kpiListBuilder_.build(); + result.kpi_ = kpiBuilder_.build(); } onBuilt(); return result; @@ -8922,29 +11690,29 @@ public final class Monitoring { public Builder mergeFrom(monitoring.Monitoring.KpiList other) { if (other == monitoring.Monitoring.KpiList.getDefaultInstance()) return this; - if (kpiListBuilder_ == null) { - if (!other.kpiList_.isEmpty()) { - if (kpiList_.isEmpty()) { - kpiList_ = other.kpiList_; + if (kpiBuilder_ == null) { + if (!other.kpi_.isEmpty()) { + if (kpi_.isEmpty()) { + kpi_ = other.kpi_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureKpiListIsMutable(); - kpiList_.addAll(other.kpiList_); + ensureKpiIsMutable(); + kpi_.addAll(other.kpi_); } onChanged(); } } else { - if (!other.kpiList_.isEmpty()) { - if (kpiListBuilder_.isEmpty()) { - kpiListBuilder_.dispose(); - kpiListBuilder_ = null; - kpiList_ = other.kpiList_; + if (!other.kpi_.isEmpty()) { + if (kpiBuilder_.isEmpty()) { + kpiBuilder_.dispose(); + kpiBuilder_ = null; + kpi_ = other.kpi_; bitField0_ = (bitField0_ & ~0x00000001); - kpiListBuilder_ = + kpiBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiListFieldBuilder() : null; + getKpiFieldBuilder() : null; } else { - kpiListBuilder_.addAllMessages(other.kpiList_); + kpiBuilder_.addAllMessages(other.kpi_); } } } @@ -8978,244 +11746,244 @@ public final class Monitoring { } private int bitField0_; - private java.util.List<monitoring.Monitoring.Kpi> kpiList_ = + private java.util.List<monitoring.Monitoring.Kpi> kpi_ = java.util.Collections.emptyList(); - private void ensureKpiListIsMutable() { + private void ensureKpiIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - kpiList_ = new java.util.ArrayList<monitoring.Monitoring.Kpi>(kpiList_); + kpi_ = new java.util.ArrayList<monitoring.Monitoring.Kpi>(kpi_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder> kpiListBuilder_; + monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder> kpiBuilder_; /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public java.util.List<monitoring.Monitoring.Kpi> getKpiListList() { - if (kpiListBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiList_); + public java.util.List<monitoring.Monitoring.Kpi> getKpiList() { + if (kpiBuilder_ == null) { + return java.util.Collections.unmodifiableList(kpi_); } else { - return kpiListBuilder_.getMessageList(); + return kpiBuilder_.getMessageList(); } } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public int getKpiListCount() { - if (kpiListBuilder_ == null) { - return kpiList_.size(); + public int getKpiCount() { + if (kpiBuilder_ == null) { + return kpi_.size(); } else { - return kpiListBuilder_.getCount(); + return kpiBuilder_.getCount(); } } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public monitoring.Monitoring.Kpi getKpiList(int index) { - if (kpiListBuilder_ == null) { - return kpiList_.get(index); + public monitoring.Monitoring.Kpi getKpi(int index) { + if (kpiBuilder_ == null) { + return kpi_.get(index); } else { - return kpiListBuilder_.getMessage(index); + return kpiBuilder_.getMessage(index); } } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public Builder setKpiList( + public Builder setKpi( int index, monitoring.Monitoring.Kpi value) { - if (kpiListBuilder_ == null) { + if (kpiBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiListIsMutable(); - kpiList_.set(index, value); + ensureKpiIsMutable(); + kpi_.set(index, value); onChanged(); } else { - kpiListBuilder_.setMessage(index, value); + kpiBuilder_.setMessage(index, value); } return this; } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public Builder setKpiList( + public Builder setKpi( int index, monitoring.Monitoring.Kpi.Builder builderForValue) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.set(index, builderForValue.build()); + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.set(index, builderForValue.build()); onChanged(); } else { - kpiListBuilder_.setMessage(index, builderForValue.build()); + kpiBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public Builder addKpiList(monitoring.Monitoring.Kpi value) { - if (kpiListBuilder_ == null) { + public Builder addKpi(monitoring.Monitoring.Kpi value) { + if (kpiBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiListIsMutable(); - kpiList_.add(value); + ensureKpiIsMutable(); + kpi_.add(value); onChanged(); } else { - kpiListBuilder_.addMessage(value); + kpiBuilder_.addMessage(value); } return this; } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public Builder addKpiList( + public Builder addKpi( int index, monitoring.Monitoring.Kpi value) { - if (kpiListBuilder_ == null) { + if (kpiBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiListIsMutable(); - kpiList_.add(index, value); + ensureKpiIsMutable(); + kpi_.add(index, value); onChanged(); } else { - kpiListBuilder_.addMessage(index, value); + kpiBuilder_.addMessage(index, value); } return this; } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public Builder addKpiList( + public Builder addKpi( monitoring.Monitoring.Kpi.Builder builderForValue) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.add(builderForValue.build()); + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.add(builderForValue.build()); onChanged(); } else { - kpiListBuilder_.addMessage(builderForValue.build()); + kpiBuilder_.addMessage(builderForValue.build()); } return this; } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public Builder addKpiList( + public Builder addKpi( int index, monitoring.Monitoring.Kpi.Builder builderForValue) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.add(index, builderForValue.build()); + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.add(index, builderForValue.build()); onChanged(); } else { - kpiListBuilder_.addMessage(index, builderForValue.build()); + kpiBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public Builder addAllKpiList( + public Builder addAllKpi( java.lang.Iterable<? extends monitoring.Monitoring.Kpi> values) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiList_); + values, kpi_); onChanged(); } else { - kpiListBuilder_.addAllMessages(values); + kpiBuilder_.addAllMessages(values); } return this; } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public Builder clearKpiList() { - if (kpiListBuilder_ == null) { - kpiList_ = java.util.Collections.emptyList(); + public Builder clearKpi() { + if (kpiBuilder_ == null) { + kpi_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - kpiListBuilder_.clear(); + kpiBuilder_.clear(); } return this; } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public Builder removeKpiList(int index) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.remove(index); + public Builder removeKpi(int index) { + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.remove(index); onChanged(); } else { - kpiListBuilder_.remove(index); + kpiBuilder_.remove(index); } return this; } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public monitoring.Monitoring.Kpi.Builder getKpiListBuilder( + public monitoring.Monitoring.Kpi.Builder getKpiBuilder( int index) { - return getKpiListFieldBuilder().getBuilder(index); + return getKpiFieldBuilder().getBuilder(index); } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public monitoring.Monitoring.KpiOrBuilder getKpiListOrBuilder( + public monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder( int index) { - if (kpiListBuilder_ == null) { - return kpiList_.get(index); } else { - return kpiListBuilder_.getMessageOrBuilder(index); + if (kpiBuilder_ == null) { + return kpi_.get(index); } else { + return kpiBuilder_.getMessageOrBuilder(index); } } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ public java.util.List<? extends monitoring.Monitoring.KpiOrBuilder> - getKpiListOrBuilderList() { - if (kpiListBuilder_ != null) { - return kpiListBuilder_.getMessageOrBuilderList(); + getKpiOrBuilderList() { + if (kpiBuilder_ != null) { + return kpiBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(kpiList_); + return java.util.Collections.unmodifiableList(kpi_); } } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public monitoring.Monitoring.Kpi.Builder addKpiListBuilder() { - return getKpiListFieldBuilder().addBuilder( + public monitoring.Monitoring.Kpi.Builder addKpiBuilder() { + return getKpiFieldBuilder().addBuilder( monitoring.Monitoring.Kpi.getDefaultInstance()); } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ - public monitoring.Monitoring.Kpi.Builder addKpiListBuilder( + public monitoring.Monitoring.Kpi.Builder addKpiBuilder( int index) { - return getKpiListFieldBuilder().addBuilder( + return getKpiFieldBuilder().addBuilder( index, monitoring.Monitoring.Kpi.getDefaultInstance()); } /** - * <code>repeated .monitoring.Kpi kpi_list = 1;</code> + * <code>repeated .monitoring.Kpi kpi = 1;</code> */ public java.util.List<monitoring.Monitoring.Kpi.Builder> - getKpiListBuilderList() { - return getKpiListFieldBuilder().getBuilderList(); + getKpiBuilderList() { + return getKpiFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder> - getKpiListFieldBuilder() { - if (kpiListBuilder_ == null) { - kpiListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + getKpiFieldBuilder() { + if (kpiBuilder_ == null) { + kpiBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder>( - kpiList_, + kpi_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - kpiList_ = null; + kpi_ = null; } - return kpiListBuilder_; + return kpiBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -12198,28 +14966,19 @@ public final class Monitoring { monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder(); /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - java.util.List<monitoring.Monitoring.KpiList> - getKpiListList(); - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - monitoring.Monitoring.KpiList getKpiList(int index); - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> + * @return Whether the kpiList field is set. */ - int getKpiListCount(); + boolean hasKpiList(); /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> + * @return The kpiList. */ - java.util.List<? extends monitoring.Monitoring.KpiListOrBuilder> - getKpiListOrBuilderList(); + monitoring.Monitoring.KpiList getKpiList(); /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> */ - monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder( - int index); + monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder(); } /** * Protobuf type {@code monitoring.SubsResponse} @@ -12234,7 +14993,6 @@ public final class Monitoring { super(builder); } private SubsResponse() { - kpiList_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -12257,7 +15015,6 @@ public final class Monitoring { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -12282,12 +15039,16 @@ public final class Monitoring { break; } case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiList_ = new java.util.ArrayList<monitoring.Monitoring.KpiList>(); - mutable_bitField0_ |= 0x00000001; + monitoring.Monitoring.KpiList.Builder subBuilder = null; + if (kpiList_ != null) { + subBuilder = kpiList_.toBuilder(); + } + kpiList_ = input.readMessage(monitoring.Monitoring.KpiList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(kpiList_); + kpiList_ = subBuilder.buildPartial(); } - kpiList_.add( - input.readMessage(monitoring.Monitoring.KpiList.parser(), extensionRegistry)); + break; } default: { @@ -12305,9 +15066,6 @@ public final class Monitoring { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiList_ = java.util.Collections.unmodifiableList(kpiList_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -12352,43 +15110,29 @@ public final class Monitoring { } public static final int KPI_LIST_FIELD_NUMBER = 2; - private java.util.List<monitoring.Monitoring.KpiList> kpiList_; - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - @java.lang.Override - public java.util.List<monitoring.Monitoring.KpiList> getKpiListList() { - return kpiList_; - } - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - @java.lang.Override - public java.util.List<? extends monitoring.Monitoring.KpiListOrBuilder> - getKpiListOrBuilderList() { - return kpiList_; - } + private monitoring.Monitoring.KpiList kpiList_; /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> + * @return Whether the kpiList field is set. */ @java.lang.Override - public int getKpiListCount() { - return kpiList_.size(); + public boolean hasKpiList() { + return kpiList_ != null; } /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> + * @return The kpiList. */ @java.lang.Override - public monitoring.Monitoring.KpiList getKpiList(int index) { - return kpiList_.get(index); + public monitoring.Monitoring.KpiList getKpiList() { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> */ @java.lang.Override - public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder( - int index) { - return kpiList_.get(index); + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + return getKpiList(); } private byte memoizedIsInitialized = -1; @@ -12408,8 +15152,8 @@ public final class Monitoring { if (subsId_ != null) { output.writeMessage(1, getSubsId()); } - for (int i = 0; i < kpiList_.size(); i++) { - output.writeMessage(2, kpiList_.get(i)); + if (kpiList_ != null) { + output.writeMessage(2, getKpiList()); } unknownFields.writeTo(output); } @@ -12424,9 +15168,9 @@ public final class Monitoring { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getSubsId()); } - for (int i = 0; i < kpiList_.size(); i++) { + if (kpiList_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, kpiList_.get(i)); + .computeMessageSize(2, getKpiList()); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -12448,8 +15192,11 @@ public final class Monitoring { if (!getSubsId() .equals(other.getSubsId())) return false; } - if (!getKpiListList() - .equals(other.getKpiListList())) return false; + if (hasKpiList() != other.hasKpiList()) return false; + if (hasKpiList()) { + if (!getKpiList() + .equals(other.getKpiList())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -12465,9 +15212,9 @@ public final class Monitoring { hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; hash = (53 * hash) + getSubsId().hashCode(); } - if (getKpiListCount() > 0) { + if (hasKpiList()) { hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; - hash = (53 * hash) + getKpiListList().hashCode(); + hash = (53 * hash) + getKpiList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; @@ -12597,7 +15344,6 @@ public final class Monitoring { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getKpiListFieldBuilder(); } } @java.lang.Override @@ -12610,10 +15356,10 @@ public final class Monitoring { subsIdBuilder_ = null; } if (kpiListBuilder_ == null) { - kpiList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + kpiList_ = null; } else { - kpiListBuilder_.clear(); + kpiList_ = null; + kpiListBuilder_ = null; } return this; } @@ -12641,17 +15387,12 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.SubsResponse buildPartial() { monitoring.Monitoring.SubsResponse result = new monitoring.Monitoring.SubsResponse(this); - int from_bitField0_ = bitField0_; if (subsIdBuilder_ == null) { result.subsId_ = subsId_; } else { result.subsId_ = subsIdBuilder_.build(); } if (kpiListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpiList_ = java.util.Collections.unmodifiableList(kpiList_); - bitField0_ = (bitField0_ & ~0x00000001); - } result.kpiList_ = kpiList_; } else { result.kpiList_ = kpiListBuilder_.build(); @@ -12707,31 +15448,8 @@ public final class Monitoring { if (other.hasSubsId()) { mergeSubsId(other.getSubsId()); } - if (kpiListBuilder_ == null) { - if (!other.kpiList_.isEmpty()) { - if (kpiList_.isEmpty()) { - kpiList_ = other.kpiList_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiListIsMutable(); - kpiList_.addAll(other.kpiList_); - } - onChanged(); - } - } else { - if (!other.kpiList_.isEmpty()) { - if (kpiListBuilder_.isEmpty()) { - kpiListBuilder_.dispose(); - kpiListBuilder_ = null; - kpiList_ = other.kpiList_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiListFieldBuilder() : null; - } else { - kpiListBuilder_.addAllMessages(other.kpiList_); - } - } + if (other.hasKpiList()) { + mergeKpiList(other.getKpiList()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -12761,7 +15479,6 @@ public final class Monitoring { } return this; } - private int bitField0_; private monitoring.Monitoring.SubscriptionID subsId_; private com.google.protobuf.SingleFieldBuilderV3< @@ -12882,239 +15599,118 @@ public final class Monitoring { return subsIdBuilder_; } - private java.util.List<monitoring.Monitoring.KpiList> kpiList_ = - java.util.Collections.emptyList(); - private void ensureKpiListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiList_ = new java.util.ArrayList<monitoring.Monitoring.KpiList>(kpiList_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< + private monitoring.Monitoring.KpiList kpiList_; + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> kpiListBuilder_; - - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - public java.util.List<monitoring.Monitoring.KpiList> getKpiListList() { - if (kpiListBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiList_); - } else { - return kpiListBuilder_.getMessageList(); - } - } /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> + * @return Whether the kpiList field is set. */ - public int getKpiListCount() { - if (kpiListBuilder_ == null) { - return kpiList_.size(); - } else { - return kpiListBuilder_.getCount(); - } + public boolean hasKpiList() { + return kpiListBuilder_ != null || kpiList_ != null; } /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> + * @return The kpiList. */ - public monitoring.Monitoring.KpiList getKpiList(int index) { + public monitoring.Monitoring.KpiList getKpiList() { if (kpiListBuilder_ == null) { - return kpiList_.get(index); + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } else { - return kpiListBuilder_.getMessage(index); + return kpiListBuilder_.getMessage(); } } /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> */ - public Builder setKpiList( - int index, monitoring.Monitoring.KpiList value) { + public Builder setKpiList(monitoring.Monitoring.KpiList value) { if (kpiListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiListIsMutable(); - kpiList_.set(index, value); + kpiList_ = value; onChanged(); } else { - kpiListBuilder_.setMessage(index, value); + kpiListBuilder_.setMessage(value); } + return this; } /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> */ public Builder setKpiList( - int index, monitoring.Monitoring.KpiList.Builder builderForValue) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - public Builder addKpiList(monitoring.Monitoring.KpiList value) { - if (kpiListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiListIsMutable(); - kpiList_.add(value); - onChanged(); - } else { - kpiListBuilder_.addMessage(value); - } - return this; - } - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - public Builder addKpiList( - int index, monitoring.Monitoring.KpiList value) { - if (kpiListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiListIsMutable(); - kpiList_.add(index, value); - onChanged(); - } else { - kpiListBuilder_.addMessage(index, value); - } - return this; - } - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - public Builder addKpiList( monitoring.Monitoring.KpiList.Builder builderForValue) { if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.add(builderForValue.build()); - onChanged(); - } else { - kpiListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - public Builder addKpiList( - int index, monitoring.Monitoring.KpiList.Builder builderForValue) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.add(index, builderForValue.build()); + kpiList_ = builderForValue.build(); onChanged(); } else { - kpiListBuilder_.addMessage(index, builderForValue.build()); + kpiListBuilder_.setMessage(builderForValue.build()); } + return this; } /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> */ - public Builder addAllKpiList( - java.lang.Iterable<? extends monitoring.Monitoring.KpiList> values) { + public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiList_); + if (kpiList_ != null) { + kpiList_ = + monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); + } else { + kpiList_ = value; + } onChanged(); } else { - kpiListBuilder_.addAllMessages(values); + kpiListBuilder_.mergeFrom(value); } + return this; } /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> */ public Builder clearKpiList() { if (kpiListBuilder_ == null) { - kpiList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiListBuilder_.clear(); - } - return this; - } - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - public Builder removeKpiList(int index) { - if (kpiListBuilder_ == null) { - ensureKpiListIsMutable(); - kpiList_.remove(index); + kpiList_ = null; onChanged(); } else { - kpiListBuilder_.remove(index); + kpiList_ = null; + kpiListBuilder_ = null; } + return this; } /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - public monitoring.Monitoring.KpiList.Builder getKpiListBuilder( - int index) { - return getKpiListFieldBuilder().getBuilder(index); - } - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> */ - public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder( - int index) { - if (kpiListBuilder_ == null) { - return kpiList_.get(index); } else { - return kpiListBuilder_.getMessageOrBuilder(index); - } + public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { + + onChanged(); + return getKpiListFieldBuilder().getBuilder(); } /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> */ - public java.util.List<? extends monitoring.Monitoring.KpiListOrBuilder> - getKpiListOrBuilderList() { + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { if (kpiListBuilder_ != null) { - return kpiListBuilder_.getMessageOrBuilderList(); + return kpiListBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(kpiList_); + return kpiList_ == null ? + monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } } /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - public monitoring.Monitoring.KpiList.Builder addKpiListBuilder() { - return getKpiListFieldBuilder().addBuilder( - monitoring.Monitoring.KpiList.getDefaultInstance()); - } - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> - */ - public monitoring.Monitoring.KpiList.Builder addKpiListBuilder( - int index) { - return getKpiListFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiList.getDefaultInstance()); - } - /** - * <code>repeated .monitoring.KpiList kpi_list = 2;</code> + * <code>.monitoring.KpiList kpi_list = 2;</code> */ - public java.util.List<monitoring.Monitoring.KpiList.Builder> - getKpiListBuilderList() { - return getKpiListFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> getKpiListFieldBuilder() { if (kpiListBuilder_ == null) { - kpiListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + kpiListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder>( - kpiList_, - ((bitField0_ & 0x00000001) != 0), + getKpiList(), getParentForChildren(), isClean()); kpiList_ = null; @@ -13174,55 +15770,55 @@ public final class Monitoring { } - public interface SubsIDListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.SubsIDList) + public interface SubsListOrBuilder extends + // @@protoc_insertion_point(interface_extends:monitoring.SubsList) com.google.protobuf.MessageOrBuilder { /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - java.util.List<monitoring.Monitoring.SubscriptionID> - getSubsListList(); + java.util.List<monitoring.Monitoring.SubsDescriptor> + getSubsDescriptorList(); /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - monitoring.Monitoring.SubscriptionID getSubsList(int index); + monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index); /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - int getSubsListCount(); + int getSubsDescriptorCount(); /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - java.util.List<? extends monitoring.Monitoring.SubscriptionIDOrBuilder> - getSubsListOrBuilderList(); + java.util.List<? extends monitoring.Monitoring.SubsDescriptorOrBuilder> + getSubsDescriptorOrBuilderList(); /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - monitoring.Monitoring.SubscriptionIDOrBuilder getSubsListOrBuilder( + monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder( int index); } /** - * Protobuf type {@code monitoring.SubsIDList} + * Protobuf type {@code monitoring.SubsList} */ - public static final class SubsIDList extends + public static final class SubsList extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.SubsIDList) - SubsIDListOrBuilder { + // @@protoc_insertion_point(message_implements:monitoring.SubsList) + SubsListOrBuilder { private static final long serialVersionUID = 0L; - // Use SubsIDList.newBuilder() to construct. - private SubsIDList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + // Use SubsList.newBuilder() to construct. + private SubsList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } - private SubsIDList() { - subsList_ = java.util.Collections.emptyList(); + private SubsList() { + subsDescriptor_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new SubsIDList(); + return new SubsList(); } @java.lang.Override @@ -13230,7 +15826,7 @@ public final class Monitoring { getUnknownFields() { return this.unknownFields; } - private SubsIDList( + private SubsList( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -13251,11 +15847,11 @@ public final class Monitoring { break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - subsList_ = new java.util.ArrayList<monitoring.Monitoring.SubscriptionID>(); + subsDescriptor_ = new java.util.ArrayList<monitoring.Monitoring.SubsDescriptor>(); mutable_bitField0_ |= 0x00000001; } - subsList_.add( - input.readMessage(monitoring.Monitoring.SubscriptionID.parser(), extensionRegistry)); + subsDescriptor_.add( + input.readMessage(monitoring.Monitoring.SubsDescriptor.parser(), extensionRegistry)); break; } default: { @@ -13274,7 +15870,7 @@ public final class Monitoring { e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - subsList_ = java.util.Collections.unmodifiableList(subsList_); + subsDescriptor_ = java.util.Collections.unmodifiableList(subsDescriptor_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -13282,55 +15878,55 @@ public final class Monitoring { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubsIDList_descriptor; + return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsIDList_fieldAccessorTable + return monitoring.Monitoring.internal_static_monitoring_SubsList_fieldAccessorTable .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsIDList.class, monitoring.Monitoring.SubsIDList.Builder.class); + monitoring.Monitoring.SubsList.class, monitoring.Monitoring.SubsList.Builder.class); } - public static final int SUBS_LIST_FIELD_NUMBER = 1; - private java.util.List<monitoring.Monitoring.SubscriptionID> subsList_; + public static final int SUBS_DESCRIPTOR_FIELD_NUMBER = 1; + private java.util.List<monitoring.Monitoring.SubsDescriptor> subsDescriptor_; /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ @java.lang.Override - public java.util.List<monitoring.Monitoring.SubscriptionID> getSubsListList() { - return subsList_; + public java.util.List<monitoring.Monitoring.SubsDescriptor> getSubsDescriptorList() { + return subsDescriptor_; } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ @java.lang.Override - public java.util.List<? extends monitoring.Monitoring.SubscriptionIDOrBuilder> - getSubsListOrBuilderList() { - return subsList_; + public java.util.List<? extends monitoring.Monitoring.SubsDescriptorOrBuilder> + getSubsDescriptorOrBuilderList() { + return subsDescriptor_; } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ @java.lang.Override - public int getSubsListCount() { - return subsList_.size(); + public int getSubsDescriptorCount() { + return subsDescriptor_.size(); } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ @java.lang.Override - public monitoring.Monitoring.SubscriptionID getSubsList(int index) { - return subsList_.get(index); + public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index) { + return subsDescriptor_.get(index); } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ @java.lang.Override - public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsListOrBuilder( + public monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder( int index) { - return subsList_.get(index); + return subsDescriptor_.get(index); } private byte memoizedIsInitialized = -1; @@ -13347,8 +15943,8 @@ public final class Monitoring { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < subsList_.size(); i++) { - output.writeMessage(1, subsList_.get(i)); + for (int i = 0; i < subsDescriptor_.size(); i++) { + output.writeMessage(1, subsDescriptor_.get(i)); } unknownFields.writeTo(output); } @@ -13359,9 +15955,9 @@ public final class Monitoring { if (size != -1) return size; size = 0; - for (int i = 0; i < subsList_.size(); i++) { + for (int i = 0; i < subsDescriptor_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, subsList_.get(i)); + .computeMessageSize(1, subsDescriptor_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -13373,13 +15969,13 @@ public final class Monitoring { if (obj == this) { return true; } - if (!(obj instanceof monitoring.Monitoring.SubsIDList)) { + if (!(obj instanceof monitoring.Monitoring.SubsList)) { return super.equals(obj); } - monitoring.Monitoring.SubsIDList other = (monitoring.Monitoring.SubsIDList) obj; + monitoring.Monitoring.SubsList other = (monitoring.Monitoring.SubsList) obj; - if (!getSubsListList() - .equals(other.getSubsListList())) return false; + if (!getSubsDescriptorList() + .equals(other.getSubsDescriptorList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -13391,78 +15987,78 @@ public final class Monitoring { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getSubsListCount() > 0) { - hash = (37 * hash) + SUBS_LIST_FIELD_NUMBER; - hash = (53 * hash) + getSubsListList().hashCode(); + if (getSubsDescriptorCount() > 0) { + hash = (37 * hash) + SUBS_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getSubsDescriptorList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static monitoring.Monitoring.SubsIDList parseFrom(byte[] data) + public static monitoring.Monitoring.SubsList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static monitoring.Monitoring.SubsIDList parseFrom(java.io.InputStream input) + public static monitoring.Monitoring.SubsList parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static monitoring.Monitoring.SubsIDList parseDelimitedFrom(java.io.InputStream input) + public static monitoring.Monitoring.SubsList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static monitoring.Monitoring.SubsIDList parseDelimitedFrom( + public static monitoring.Monitoring.SubsList parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static monitoring.Monitoring.SubsIDList parseFrom( + public static monitoring.Monitoring.SubsList parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13475,7 +16071,7 @@ public final class Monitoring { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(monitoring.Monitoring.SubsIDList prototype) { + public static Builder newBuilder(monitoring.Monitoring.SubsList prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -13491,26 +16087,26 @@ public final class Monitoring { return builder; } /** - * Protobuf type {@code monitoring.SubsIDList} + * Protobuf type {@code monitoring.SubsList} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:monitoring.SubsIDList) - monitoring.Monitoring.SubsIDListOrBuilder { + // @@protoc_insertion_point(builder_implements:monitoring.SubsList) + monitoring.Monitoring.SubsListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubsIDList_descriptor; + return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsIDList_fieldAccessorTable + return monitoring.Monitoring.internal_static_monitoring_SubsList_fieldAccessorTable .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsIDList.class, monitoring.Monitoring.SubsIDList.Builder.class); + monitoring.Monitoring.SubsList.class, monitoring.Monitoring.SubsList.Builder.class); } - // Construct using monitoring.Monitoring.SubsIDList.newBuilder() + // Construct using monitoring.Monitoring.SubsList.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -13523,17 +16119,17 @@ public final class Monitoring { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getSubsListFieldBuilder(); + getSubsDescriptorFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (subsListBuilder_ == null) { - subsList_ = java.util.Collections.emptyList(); + if (subsDescriptorBuilder_ == null) { + subsDescriptor_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - subsListBuilder_.clear(); + subsDescriptorBuilder_.clear(); } return this; } @@ -13541,17 +16137,17 @@ public final class Monitoring { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_SubsIDList_descriptor; + return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; } @java.lang.Override - public monitoring.Monitoring.SubsIDList getDefaultInstanceForType() { - return monitoring.Monitoring.SubsIDList.getDefaultInstance(); + public monitoring.Monitoring.SubsList getDefaultInstanceForType() { + return monitoring.Monitoring.SubsList.getDefaultInstance(); } @java.lang.Override - public monitoring.Monitoring.SubsIDList build() { - monitoring.Monitoring.SubsIDList result = buildPartial(); + public monitoring.Monitoring.SubsList build() { + monitoring.Monitoring.SubsList result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -13559,17 +16155,17 @@ public final class Monitoring { } @java.lang.Override - public monitoring.Monitoring.SubsIDList buildPartial() { - monitoring.Monitoring.SubsIDList result = new monitoring.Monitoring.SubsIDList(this); + public monitoring.Monitoring.SubsList buildPartial() { + monitoring.Monitoring.SubsList result = new monitoring.Monitoring.SubsList(this); int from_bitField0_ = bitField0_; - if (subsListBuilder_ == null) { + if (subsDescriptorBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - subsList_ = java.util.Collections.unmodifiableList(subsList_); + subsDescriptor_ = java.util.Collections.unmodifiableList(subsDescriptor_); bitField0_ = (bitField0_ & ~0x00000001); } - result.subsList_ = subsList_; + result.subsDescriptor_ = subsDescriptor_; } else { - result.subsList_ = subsListBuilder_.build(); + result.subsDescriptor_ = subsDescriptorBuilder_.build(); } onBuilt(); return result; @@ -13609,39 +16205,39 @@ public final class Monitoring { } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.SubsIDList) { - return mergeFrom((monitoring.Monitoring.SubsIDList)other); + if (other instanceof monitoring.Monitoring.SubsList) { + return mergeFrom((monitoring.Monitoring.SubsList)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(monitoring.Monitoring.SubsIDList other) { - if (other == monitoring.Monitoring.SubsIDList.getDefaultInstance()) return this; - if (subsListBuilder_ == null) { - if (!other.subsList_.isEmpty()) { - if (subsList_.isEmpty()) { - subsList_ = other.subsList_; + public Builder mergeFrom(monitoring.Monitoring.SubsList other) { + if (other == monitoring.Monitoring.SubsList.getDefaultInstance()) return this; + if (subsDescriptorBuilder_ == null) { + if (!other.subsDescriptor_.isEmpty()) { + if (subsDescriptor_.isEmpty()) { + subsDescriptor_ = other.subsDescriptor_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureSubsListIsMutable(); - subsList_.addAll(other.subsList_); + ensureSubsDescriptorIsMutable(); + subsDescriptor_.addAll(other.subsDescriptor_); } onChanged(); } } else { - if (!other.subsList_.isEmpty()) { - if (subsListBuilder_.isEmpty()) { - subsListBuilder_.dispose(); - subsListBuilder_ = null; - subsList_ = other.subsList_; + if (!other.subsDescriptor_.isEmpty()) { + if (subsDescriptorBuilder_.isEmpty()) { + subsDescriptorBuilder_.dispose(); + subsDescriptorBuilder_ = null; + subsDescriptor_ = other.subsDescriptor_; bitField0_ = (bitField0_ & ~0x00000001); - subsListBuilder_ = + subsDescriptorBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubsListFieldBuilder() : null; + getSubsDescriptorFieldBuilder() : null; } else { - subsListBuilder_.addAllMessages(other.subsList_); + subsDescriptorBuilder_.addAllMessages(other.subsDescriptor_); } } } @@ -13660,11 +16256,11 @@ public final class Monitoring { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.SubsIDList parsedMessage = null; + monitoring.Monitoring.SubsList parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubsIDList) e.getUnfinishedMessage(); + parsedMessage = (monitoring.Monitoring.SubsList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -13675,244 +16271,244 @@ public final class Monitoring { } private int bitField0_; - private java.util.List<monitoring.Monitoring.SubscriptionID> subsList_ = + private java.util.List<monitoring.Monitoring.SubsDescriptor> subsDescriptor_ = java.util.Collections.emptyList(); - private void ensureSubsListIsMutable() { + private void ensureSubsDescriptorIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - subsList_ = new java.util.ArrayList<monitoring.Monitoring.SubscriptionID>(subsList_); + subsDescriptor_ = new java.util.ArrayList<monitoring.Monitoring.SubsDescriptor>(subsDescriptor_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> subsListBuilder_; + monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsDescriptor.Builder, monitoring.Monitoring.SubsDescriptorOrBuilder> subsDescriptorBuilder_; /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public java.util.List<monitoring.Monitoring.SubscriptionID> getSubsListList() { - if (subsListBuilder_ == null) { - return java.util.Collections.unmodifiableList(subsList_); + public java.util.List<monitoring.Monitoring.SubsDescriptor> getSubsDescriptorList() { + if (subsDescriptorBuilder_ == null) { + return java.util.Collections.unmodifiableList(subsDescriptor_); } else { - return subsListBuilder_.getMessageList(); + return subsDescriptorBuilder_.getMessageList(); } } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public int getSubsListCount() { - if (subsListBuilder_ == null) { - return subsList_.size(); + public int getSubsDescriptorCount() { + if (subsDescriptorBuilder_ == null) { + return subsDescriptor_.size(); } else { - return subsListBuilder_.getCount(); + return subsDescriptorBuilder_.getCount(); } } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public monitoring.Monitoring.SubscriptionID getSubsList(int index) { - if (subsListBuilder_ == null) { - return subsList_.get(index); + public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index) { + if (subsDescriptorBuilder_ == null) { + return subsDescriptor_.get(index); } else { - return subsListBuilder_.getMessage(index); + return subsDescriptorBuilder_.getMessage(index); } } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public Builder setSubsList( - int index, monitoring.Monitoring.SubscriptionID value) { - if (subsListBuilder_ == null) { + public Builder setSubsDescriptor( + int index, monitoring.Monitoring.SubsDescriptor value) { + if (subsDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSubsListIsMutable(); - subsList_.set(index, value); + ensureSubsDescriptorIsMutable(); + subsDescriptor_.set(index, value); onChanged(); } else { - subsListBuilder_.setMessage(index, value); + subsDescriptorBuilder_.setMessage(index, value); } return this; } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public Builder setSubsList( - int index, monitoring.Monitoring.SubscriptionID.Builder builderForValue) { - if (subsListBuilder_ == null) { - ensureSubsListIsMutable(); - subsList_.set(index, builderForValue.build()); + public Builder setSubsDescriptor( + int index, monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.set(index, builderForValue.build()); onChanged(); } else { - subsListBuilder_.setMessage(index, builderForValue.build()); + subsDescriptorBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public Builder addSubsList(monitoring.Monitoring.SubscriptionID value) { - if (subsListBuilder_ == null) { + public Builder addSubsDescriptor(monitoring.Monitoring.SubsDescriptor value) { + if (subsDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSubsListIsMutable(); - subsList_.add(value); + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(value); onChanged(); } else { - subsListBuilder_.addMessage(value); + subsDescriptorBuilder_.addMessage(value); } return this; } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public Builder addSubsList( - int index, monitoring.Monitoring.SubscriptionID value) { - if (subsListBuilder_ == null) { + public Builder addSubsDescriptor( + int index, monitoring.Monitoring.SubsDescriptor value) { + if (subsDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSubsListIsMutable(); - subsList_.add(index, value); + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(index, value); onChanged(); } else { - subsListBuilder_.addMessage(index, value); + subsDescriptorBuilder_.addMessage(index, value); } return this; } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public Builder addSubsList( - monitoring.Monitoring.SubscriptionID.Builder builderForValue) { - if (subsListBuilder_ == null) { - ensureSubsListIsMutable(); - subsList_.add(builderForValue.build()); + public Builder addSubsDescriptor( + monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(builderForValue.build()); onChanged(); } else { - subsListBuilder_.addMessage(builderForValue.build()); + subsDescriptorBuilder_.addMessage(builderForValue.build()); } return this; } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public Builder addSubsList( - int index, monitoring.Monitoring.SubscriptionID.Builder builderForValue) { - if (subsListBuilder_ == null) { - ensureSubsListIsMutable(); - subsList_.add(index, builderForValue.build()); + public Builder addSubsDescriptor( + int index, monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(index, builderForValue.build()); onChanged(); } else { - subsListBuilder_.addMessage(index, builderForValue.build()); + subsDescriptorBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public Builder addAllSubsList( - java.lang.Iterable<? extends monitoring.Monitoring.SubscriptionID> values) { - if (subsListBuilder_ == null) { - ensureSubsListIsMutable(); + public Builder addAllSubsDescriptor( + java.lang.Iterable<? extends monitoring.Monitoring.SubsDescriptor> values) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subsList_); + values, subsDescriptor_); onChanged(); } else { - subsListBuilder_.addAllMessages(values); + subsDescriptorBuilder_.addAllMessages(values); } return this; } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public Builder clearSubsList() { - if (subsListBuilder_ == null) { - subsList_ = java.util.Collections.emptyList(); + public Builder clearSubsDescriptor() { + if (subsDescriptorBuilder_ == null) { + subsDescriptor_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - subsListBuilder_.clear(); + subsDescriptorBuilder_.clear(); } return this; } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public Builder removeSubsList(int index) { - if (subsListBuilder_ == null) { - ensureSubsListIsMutable(); - subsList_.remove(index); + public Builder removeSubsDescriptor(int index) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.remove(index); onChanged(); } else { - subsListBuilder_.remove(index); + subsDescriptorBuilder_.remove(index); } return this; } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public monitoring.Monitoring.SubscriptionID.Builder getSubsListBuilder( + public monitoring.Monitoring.SubsDescriptor.Builder getSubsDescriptorBuilder( int index) { - return getSubsListFieldBuilder().getBuilder(index); + return getSubsDescriptorFieldBuilder().getBuilder(index); } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsListOrBuilder( + public monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder( int index) { - if (subsListBuilder_ == null) { - return subsList_.get(index); } else { - return subsListBuilder_.getMessageOrBuilder(index); + if (subsDescriptorBuilder_ == null) { + return subsDescriptor_.get(index); } else { + return subsDescriptorBuilder_.getMessageOrBuilder(index); } } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public java.util.List<? extends monitoring.Monitoring.SubscriptionIDOrBuilder> - getSubsListOrBuilderList() { - if (subsListBuilder_ != null) { - return subsListBuilder_.getMessageOrBuilderList(); + public java.util.List<? extends monitoring.Monitoring.SubsDescriptorOrBuilder> + getSubsDescriptorOrBuilderList() { + if (subsDescriptorBuilder_ != null) { + return subsDescriptorBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(subsList_); + return java.util.Collections.unmodifiableList(subsDescriptor_); } } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public monitoring.Monitoring.SubscriptionID.Builder addSubsListBuilder() { - return getSubsListFieldBuilder().addBuilder( - monitoring.Monitoring.SubscriptionID.getDefaultInstance()); + public monitoring.Monitoring.SubsDescriptor.Builder addSubsDescriptorBuilder() { + return getSubsDescriptorFieldBuilder().addBuilder( + monitoring.Monitoring.SubsDescriptor.getDefaultInstance()); } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public monitoring.Monitoring.SubscriptionID.Builder addSubsListBuilder( + public monitoring.Monitoring.SubsDescriptor.Builder addSubsDescriptorBuilder( int index) { - return getSubsListFieldBuilder().addBuilder( - index, monitoring.Monitoring.SubscriptionID.getDefaultInstance()); + return getSubsDescriptorFieldBuilder().addBuilder( + index, monitoring.Monitoring.SubsDescriptor.getDefaultInstance()); } /** - * <code>repeated .monitoring.SubscriptionID subs_list = 1;</code> + * <code>repeated .monitoring.SubsDescriptor subs_descriptor = 1;</code> */ - public java.util.List<monitoring.Monitoring.SubscriptionID.Builder> - getSubsListBuilderList() { - return getSubsListFieldBuilder().getBuilderList(); + public java.util.List<monitoring.Monitoring.SubsDescriptor.Builder> + getSubsDescriptorBuilderList() { + return getSubsDescriptorFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> - getSubsListFieldBuilder() { - if (subsListBuilder_ == null) { - subsListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder>( - subsList_, + monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsDescriptor.Builder, monitoring.Monitoring.SubsDescriptorOrBuilder> + getSubsDescriptorFieldBuilder() { + if (subsDescriptorBuilder_ == null) { + subsDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsDescriptor.Builder, monitoring.Monitoring.SubsDescriptorOrBuilder>( + subsDescriptor_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - subsList_ = null; + subsDescriptor_ = null; } - return subsListBuilder_; + return subsDescriptorBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -13927,41 +16523,41 @@ public final class Monitoring { } - // @@protoc_insertion_point(builder_scope:monitoring.SubsIDList) + // @@protoc_insertion_point(builder_scope:monitoring.SubsList) } - // @@protoc_insertion_point(class_scope:monitoring.SubsIDList) - private static final monitoring.Monitoring.SubsIDList DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:monitoring.SubsList) + private static final monitoring.Monitoring.SubsList DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new monitoring.Monitoring.SubsIDList(); + DEFAULT_INSTANCE = new monitoring.Monitoring.SubsList(); } - public static monitoring.Monitoring.SubsIDList getDefaultInstance() { + public static monitoring.Monitoring.SubsList getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser<SubsIDList> - PARSER = new com.google.protobuf.AbstractParser<SubsIDList>() { + private static final com.google.protobuf.Parser<SubsList> + PARSER = new com.google.protobuf.AbstractParser<SubsList>() { @java.lang.Override - public SubsIDList parsePartialFrom( + public SubsList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubsIDList(input, extensionRegistry); + return new SubsList(input, extensionRegistry); } }; - public static com.google.protobuf.Parser<SubsIDList> parser() { + public static com.google.protobuf.Parser<SubsList> parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser<SubsIDList> getParserForType() { + public com.google.protobuf.Parser<SubsList> getParserForType() { return PARSER; } @java.lang.Override - public monitoring.Monitoring.SubsIDList getDefaultInstanceForType() { + public monitoring.Monitoring.SubsList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -14011,52 +16607,34 @@ public final class Monitoring { getNameBytes(); /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - java.util.List<monitoring.Monitoring.KpiId> - getKpiIdList(); - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - monitoring.Monitoring.KpiId getKpiId(int index); - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> + * @return Whether the kpiId field is set. */ - int getKpiIdCount(); + boolean hasKpiId(); /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> + * @return The kpiId. */ - java.util.List<? extends monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdOrBuilderList(); + monitoring.Monitoring.KpiId getKpiId(); /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder( - int index); + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - java.util.List<monitoring.Monitoring.KpiValueRange> - getKpiValueRangeList(); - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> + * @return Whether the kpiValueRange field is set. */ - monitoring.Monitoring.KpiValueRange getKpiValueRange(int index); + boolean hasKpiValueRange(); /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> + * @return The kpiValueRange. */ - int getKpiValueRangeCount(); + monitoring.Monitoring.KpiValueRange getKpiValueRange(); /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> */ - java.util.List<? extends monitoring.Monitoring.KpiValueRangeOrBuilder> - getKpiValueRangeOrBuilderList(); - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder( - int index); + monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder(); /** * <code>.context.Timestamp timestamp = 6;</code> @@ -14088,8 +16666,6 @@ public final class Monitoring { private AlarmDescriptor() { alarmDescription_ = ""; name_ = ""; - kpiId_ = java.util.Collections.emptyList(); - kpiValueRange_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -14112,7 +16688,6 @@ public final class Monitoring { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -14149,21 +16724,29 @@ public final class Monitoring { break; } case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiId_ = new java.util.ArrayList<monitoring.Monitoring.KpiId>(); - mutable_bitField0_ |= 0x00000001; + monitoring.Monitoring.KpiId.Builder subBuilder = null; + if (kpiId_ != null) { + subBuilder = kpiId_.toBuilder(); } - kpiId_.add( - input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry)); + kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(kpiId_); + kpiId_ = subBuilder.buildPartial(); + } + break; } case 42: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - kpiValueRange_ = new java.util.ArrayList<monitoring.Monitoring.KpiValueRange>(); - mutable_bitField0_ |= 0x00000002; + monitoring.Monitoring.KpiValueRange.Builder subBuilder = null; + if (kpiValueRange_ != null) { + subBuilder = kpiValueRange_.toBuilder(); } - kpiValueRange_.add( - input.readMessage(monitoring.Monitoring.KpiValueRange.parser(), extensionRegistry)); + kpiValueRange_ = input.readMessage(monitoring.Monitoring.KpiValueRange.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(kpiValueRange_); + kpiValueRange_ = subBuilder.buildPartial(); + } + break; } case 50: { @@ -14194,12 +16777,6 @@ public final class Monitoring { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiId_ = java.util.Collections.unmodifiableList(kpiId_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - kpiValueRange_ = java.util.Collections.unmodifiableList(kpiValueRange_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -14319,84 +16896,56 @@ public final class Monitoring { } } - public static final int KPI_ID_FIELD_NUMBER = 4; - private java.util.List<monitoring.Monitoring.KpiId> kpiId_; - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - @java.lang.Override - public java.util.List<monitoring.Monitoring.KpiId> getKpiIdList() { - return kpiId_; - } - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - @java.lang.Override - public java.util.List<? extends monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdOrBuilderList() { - return kpiId_; - } + public static final int KPI_ID_FIELD_NUMBER = 4; + private monitoring.Monitoring.KpiId kpiId_; /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> + * @return Whether the kpiId field is set. */ @java.lang.Override - public int getKpiIdCount() { - return kpiId_.size(); + public boolean hasKpiId() { + return kpiId_ != null; } /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> + * @return The kpiId. */ @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId(int index) { - return kpiId_.get(index); + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> */ @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder( - int index) { - return kpiId_.get(index); + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); } public static final int KPI_VALUE_RANGE_FIELD_NUMBER = 5; - private java.util.List<monitoring.Monitoring.KpiValueRange> kpiValueRange_; - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - @java.lang.Override - public java.util.List<monitoring.Monitoring.KpiValueRange> getKpiValueRangeList() { - return kpiValueRange_; - } - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - @java.lang.Override - public java.util.List<? extends monitoring.Monitoring.KpiValueRangeOrBuilder> - getKpiValueRangeOrBuilderList() { - return kpiValueRange_; - } + private monitoring.Monitoring.KpiValueRange kpiValueRange_; /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> + * @return Whether the kpiValueRange field is set. */ @java.lang.Override - public int getKpiValueRangeCount() { - return kpiValueRange_.size(); + public boolean hasKpiValueRange() { + return kpiValueRange_ != null; } /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> + * @return The kpiValueRange. */ @java.lang.Override - public monitoring.Monitoring.KpiValueRange getKpiValueRange(int index) { - return kpiValueRange_.get(index); + public monitoring.Monitoring.KpiValueRange getKpiValueRange() { + return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; } /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> */ @java.lang.Override - public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder( - int index) { - return kpiValueRange_.get(index); + public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { + return getKpiValueRange(); } public static final int TIMESTAMP_FIELD_NUMBER = 6; @@ -14448,11 +16997,11 @@ public final class Monitoring { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); } - for (int i = 0; i < kpiId_.size(); i++) { - output.writeMessage(4, kpiId_.get(i)); + if (kpiId_ != null) { + output.writeMessage(4, getKpiId()); } - for (int i = 0; i < kpiValueRange_.size(); i++) { - output.writeMessage(5, kpiValueRange_.get(i)); + if (kpiValueRange_ != null) { + output.writeMessage(5, getKpiValueRange()); } if (timestamp_ != null) { output.writeMessage(6, getTimestamp()); @@ -14476,13 +17025,13 @@ public final class Monitoring { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); } - for (int i = 0; i < kpiId_.size(); i++) { + if (kpiId_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, kpiId_.get(i)); + .computeMessageSize(4, getKpiId()); } - for (int i = 0; i < kpiValueRange_.size(); i++) { + if (kpiValueRange_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, kpiValueRange_.get(i)); + .computeMessageSize(5, getKpiValueRange()); } if (timestamp_ != null) { size += com.google.protobuf.CodedOutputStream @@ -14512,10 +17061,16 @@ public final class Monitoring { .equals(other.getAlarmDescription())) return false; if (!getName() .equals(other.getName())) return false; - if (!getKpiIdList() - .equals(other.getKpiIdList())) return false; - if (!getKpiValueRangeList() - .equals(other.getKpiValueRangeList())) return false; + if (hasKpiId() != other.hasKpiId()) return false; + if (hasKpiId()) { + if (!getKpiId() + .equals(other.getKpiId())) return false; + } + if (hasKpiValueRange() != other.hasKpiValueRange()) return false; + if (hasKpiValueRange()) { + if (!getKpiValueRange() + .equals(other.getKpiValueRange())) return false; + } if (hasTimestamp() != other.hasTimestamp()) return false; if (hasTimestamp()) { if (!getTimestamp() @@ -14540,13 +17095,13 @@ public final class Monitoring { hash = (53 * hash) + getAlarmDescription().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - if (getKpiIdCount() > 0) { + if (hasKpiId()) { hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiIdList().hashCode(); + hash = (53 * hash) + getKpiId().hashCode(); } - if (getKpiValueRangeCount() > 0) { + if (hasKpiValueRange()) { hash = (37 * hash) + KPI_VALUE_RANGE_FIELD_NUMBER; - hash = (53 * hash) + getKpiValueRangeList().hashCode(); + hash = (53 * hash) + getKpiValueRange().hashCode(); } if (hasTimestamp()) { hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; @@ -14680,8 +17235,6 @@ public final class Monitoring { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getKpiIdFieldBuilder(); - getKpiValueRangeFieldBuilder(); } } @java.lang.Override @@ -14698,16 +17251,16 @@ public final class Monitoring { name_ = ""; if (kpiIdBuilder_ == null) { - kpiId_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + kpiId_ = null; } else { - kpiIdBuilder_.clear(); + kpiId_ = null; + kpiIdBuilder_ = null; } if (kpiValueRangeBuilder_ == null) { - kpiValueRange_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + kpiValueRange_ = null; } else { - kpiValueRangeBuilder_.clear(); + kpiValueRange_ = null; + kpiValueRangeBuilder_ = null; } if (timestampBuilder_ == null) { timestamp_ = null; @@ -14741,7 +17294,6 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.AlarmDescriptor buildPartial() { monitoring.Monitoring.AlarmDescriptor result = new monitoring.Monitoring.AlarmDescriptor(this); - int from_bitField0_ = bitField0_; if (alarmIdBuilder_ == null) { result.alarmId_ = alarmId_; } else { @@ -14750,19 +17302,11 @@ public final class Monitoring { result.alarmDescription_ = alarmDescription_; result.name_ = name_; if (kpiIdBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpiId_ = java.util.Collections.unmodifiableList(kpiId_); - bitField0_ = (bitField0_ & ~0x00000001); - } result.kpiId_ = kpiId_; } else { result.kpiId_ = kpiIdBuilder_.build(); } if (kpiValueRangeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - kpiValueRange_ = java.util.Collections.unmodifiableList(kpiValueRange_); - bitField0_ = (bitField0_ & ~0x00000002); - } result.kpiValueRange_ = kpiValueRange_; } else { result.kpiValueRange_ = kpiValueRangeBuilder_.build(); @@ -14831,57 +17375,11 @@ public final class Monitoring { name_ = other.name_; onChanged(); } - if (kpiIdBuilder_ == null) { - if (!other.kpiId_.isEmpty()) { - if (kpiId_.isEmpty()) { - kpiId_ = other.kpiId_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiIdIsMutable(); - kpiId_.addAll(other.kpiId_); - } - onChanged(); - } - } else { - if (!other.kpiId_.isEmpty()) { - if (kpiIdBuilder_.isEmpty()) { - kpiIdBuilder_.dispose(); - kpiIdBuilder_ = null; - kpiId_ = other.kpiId_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiIdBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiIdFieldBuilder() : null; - } else { - kpiIdBuilder_.addAllMessages(other.kpiId_); - } - } + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); } - if (kpiValueRangeBuilder_ == null) { - if (!other.kpiValueRange_.isEmpty()) { - if (kpiValueRange_.isEmpty()) { - kpiValueRange_ = other.kpiValueRange_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureKpiValueRangeIsMutable(); - kpiValueRange_.addAll(other.kpiValueRange_); - } - onChanged(); - } - } else { - if (!other.kpiValueRange_.isEmpty()) { - if (kpiValueRangeBuilder_.isEmpty()) { - kpiValueRangeBuilder_.dispose(); - kpiValueRangeBuilder_ = null; - kpiValueRange_ = other.kpiValueRange_; - bitField0_ = (bitField0_ & ~0x00000002); - kpiValueRangeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiValueRangeFieldBuilder() : null; - } else { - kpiValueRangeBuilder_.addAllMessages(other.kpiValueRange_); - } - } + if (other.hasKpiValueRange()) { + mergeKpiValueRange(other.getKpiValueRange()); } if (other.hasTimestamp()) { mergeTimestamp(other.getTimestamp()); @@ -14914,7 +17412,6 @@ public final class Monitoring { } return this; } - private int bitField0_; private monitoring.Monitoring.AlarmID alarmId_; private com.google.protobuf.SingleFieldBuilderV3< @@ -15187,239 +17684,118 @@ public final class Monitoring { return this; } - private java.util.List<monitoring.Monitoring.KpiId> kpiId_ = - java.util.Collections.emptyList(); - private void ensureKpiIdIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiId_ = new java.util.ArrayList<monitoring.Monitoring.KpiId>(kpiId_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< + private monitoring.Monitoring.KpiId kpiId_; + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - public java.util.List<monitoring.Monitoring.KpiId> getKpiIdList() { - if (kpiIdBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiId_); - } else { - return kpiIdBuilder_.getMessageList(); - } - } /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> + * @return Whether the kpiId field is set. */ - public int getKpiIdCount() { - if (kpiIdBuilder_ == null) { - return kpiId_.size(); - } else { - return kpiIdBuilder_.getCount(); - } + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; } /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> + * @return The kpiId. */ - public monitoring.Monitoring.KpiId getKpiId(int index) { + public monitoring.Monitoring.KpiId getKpiId() { if (kpiIdBuilder_ == null) { - return kpiId_.get(index); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } else { - return kpiIdBuilder_.getMessage(index); + return kpiIdBuilder_.getMessage(); } } /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> */ - public Builder setKpiId( - int index, monitoring.Monitoring.KpiId value) { + public Builder setKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureKpiIdIsMutable(); - kpiId_.set(index, value); + kpiId_ = value; onChanged(); } else { - kpiIdBuilder_.setMessage(index, value); + kpiIdBuilder_.setMessage(value); } + return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> */ public Builder setKpiId( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiIdBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - public Builder addKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdIsMutable(); - kpiId_.add(value); - onChanged(); - } else { - kpiIdBuilder_.addMessage(value); - } - return this; - } - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - public Builder addKpiId( - int index, monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdIsMutable(); - kpiId_.add(index, value); - onChanged(); - } else { - kpiIdBuilder_.addMessage(index, value); - } - return this; - } - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - public Builder addKpiId( monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.add(builderForValue.build()); - onChanged(); - } else { - kpiIdBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - public Builder addKpiId( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.add(index, builderForValue.build()); + kpiId_ = builderForValue.build(); onChanged(); } else { - kpiIdBuilder_.addMessage(index, builderForValue.build()); + kpiIdBuilder_.setMessage(builderForValue.build()); } + return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> */ - public Builder addAllKpiId( - java.lang.Iterable<? extends monitoring.Monitoring.KpiId> values) { + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiId_); + if (kpiId_ != null) { + kpiId_ = + monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } onChanged(); } else { - kpiIdBuilder_.addAllMessages(values); + kpiIdBuilder_.mergeFrom(value); } + return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> */ public Builder clearKpiId() { if (kpiIdBuilder_ == null) { - kpiId_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiIdBuilder_.clear(); - } - return this; - } - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - public Builder removeKpiId(int index) { - if (kpiIdBuilder_ == null) { - ensureKpiIdIsMutable(); - kpiId_.remove(index); + kpiId_ = null; onChanged(); } else { - kpiIdBuilder_.remove(index); + kpiId_ = null; + kpiIdBuilder_ = null; } + return this; } /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder( - int index) { - return getKpiIdFieldBuilder().getBuilder(index); - } - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder( - int index) { - if (kpiIdBuilder_ == null) { - return kpiId_.get(index); } else { - return kpiIdBuilder_.getMessageOrBuilder(index); - } + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); } /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> */ - public java.util.List<? extends monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdOrBuilderList() { + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilderList(); + return kpiIdBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(kpiId_); + return kpiId_ == null ? + monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } } /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdBuilder() { - return getKpiIdFieldBuilder().addBuilder( - monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdBuilder( - int index) { - return getKpiIdFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * <code>repeated .monitoring.KpiId kpi_id = 4;</code> + * <code>.monitoring.KpiId kpi_id = 4;</code> */ - public java.util.List<monitoring.Monitoring.KpiId.Builder> - getKpiIdBuilderList() { - return getKpiIdFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> getKpiIdFieldBuilder() { if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - kpiId_, - ((bitField0_ & 0x00000001) != 0), + getKpiId(), getParentForChildren(), isClean()); kpiId_ = null; @@ -15427,239 +17803,118 @@ public final class Monitoring { return kpiIdBuilder_; } - private java.util.List<monitoring.Monitoring.KpiValueRange> kpiValueRange_ = - java.util.Collections.emptyList(); - private void ensureKpiValueRangeIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - kpiValueRange_ = new java.util.ArrayList<monitoring.Monitoring.KpiValueRange>(kpiValueRange_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder> kpiValueRangeBuilder_; - - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - public java.util.List<monitoring.Monitoring.KpiValueRange> getKpiValueRangeList() { - if (kpiValueRangeBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiValueRange_); - } else { - return kpiValueRangeBuilder_.getMessageList(); - } - } - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - public int getKpiValueRangeCount() { - if (kpiValueRangeBuilder_ == null) { - return kpiValueRange_.size(); - } else { - return kpiValueRangeBuilder_.getCount(); - } - } - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - public monitoring.Monitoring.KpiValueRange getKpiValueRange(int index) { - if (kpiValueRangeBuilder_ == null) { - return kpiValueRange_.get(index); - } else { - return kpiValueRangeBuilder_.getMessage(index); - } - } - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - public Builder setKpiValueRange( - int index, monitoring.Monitoring.KpiValueRange value) { - if (kpiValueRangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiValueRangeIsMutable(); - kpiValueRange_.set(index, value); - onChanged(); - } else { - kpiValueRangeBuilder_.setMessage(index, value); - } - return this; - } - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - public Builder setKpiValueRange( - int index, monitoring.Monitoring.KpiValueRange.Builder builderForValue) { - if (kpiValueRangeBuilder_ == null) { - ensureKpiValueRangeIsMutable(); - kpiValueRange_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiValueRangeBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - public Builder addKpiValueRange(monitoring.Monitoring.KpiValueRange value) { - if (kpiValueRangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiValueRangeIsMutable(); - kpiValueRange_.add(value); - onChanged(); - } else { - kpiValueRangeBuilder_.addMessage(value); - } - return this; - } + private monitoring.Monitoring.KpiValueRange kpiValueRange_; + private com.google.protobuf.SingleFieldBuilderV3< + monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder> kpiValueRangeBuilder_; /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> + * @return Whether the kpiValueRange field is set. */ - public Builder addKpiValueRange( - int index, monitoring.Monitoring.KpiValueRange value) { - if (kpiValueRangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiValueRangeIsMutable(); - kpiValueRange_.add(index, value); - onChanged(); - } else { - kpiValueRangeBuilder_.addMessage(index, value); - } - return this; + public boolean hasKpiValueRange() { + return kpiValueRangeBuilder_ != null || kpiValueRange_ != null; } /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> + * @return The kpiValueRange. */ - public Builder addKpiValueRange( - monitoring.Monitoring.KpiValueRange.Builder builderForValue) { + public monitoring.Monitoring.KpiValueRange getKpiValueRange() { if (kpiValueRangeBuilder_ == null) { - ensureKpiValueRangeIsMutable(); - kpiValueRange_.add(builderForValue.build()); - onChanged(); + return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; } else { - kpiValueRangeBuilder_.addMessage(builderForValue.build()); + return kpiValueRangeBuilder_.getMessage(); } - return this; } /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> */ - public Builder addKpiValueRange( - int index, monitoring.Monitoring.KpiValueRange.Builder builderForValue) { + public Builder setKpiValueRange(monitoring.Monitoring.KpiValueRange value) { if (kpiValueRangeBuilder_ == null) { - ensureKpiValueRangeIsMutable(); - kpiValueRange_.add(index, builderForValue.build()); + if (value == null) { + throw new NullPointerException(); + } + kpiValueRange_ = value; onChanged(); } else { - kpiValueRangeBuilder_.addMessage(index, builderForValue.build()); + kpiValueRangeBuilder_.setMessage(value); } + return this; } /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> */ - public Builder addAllKpiValueRange( - java.lang.Iterable<? extends monitoring.Monitoring.KpiValueRange> values) { + public Builder setKpiValueRange( + monitoring.Monitoring.KpiValueRange.Builder builderForValue) { if (kpiValueRangeBuilder_ == null) { - ensureKpiValueRangeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiValueRange_); + kpiValueRange_ = builderForValue.build(); onChanged(); } else { - kpiValueRangeBuilder_.addAllMessages(values); + kpiValueRangeBuilder_.setMessage(builderForValue.build()); } + return this; } /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> */ - public Builder clearKpiValueRange() { + public Builder mergeKpiValueRange(monitoring.Monitoring.KpiValueRange value) { if (kpiValueRangeBuilder_ == null) { - kpiValueRange_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + if (kpiValueRange_ != null) { + kpiValueRange_ = + monitoring.Monitoring.KpiValueRange.newBuilder(kpiValueRange_).mergeFrom(value).buildPartial(); + } else { + kpiValueRange_ = value; + } onChanged(); } else { - kpiValueRangeBuilder_.clear(); + kpiValueRangeBuilder_.mergeFrom(value); } + return this; } /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> */ - public Builder removeKpiValueRange(int index) { + public Builder clearKpiValueRange() { if (kpiValueRangeBuilder_ == null) { - ensureKpiValueRangeIsMutable(); - kpiValueRange_.remove(index); + kpiValueRange_ = null; onChanged(); } else { - kpiValueRangeBuilder_.remove(index); + kpiValueRange_ = null; + kpiValueRangeBuilder_ = null; } + return this; } /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - public monitoring.Monitoring.KpiValueRange.Builder getKpiValueRangeBuilder( - int index) { - return getKpiValueRangeFieldBuilder().getBuilder(index); - } - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> */ - public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder( - int index) { - if (kpiValueRangeBuilder_ == null) { - return kpiValueRange_.get(index); } else { - return kpiValueRangeBuilder_.getMessageOrBuilder(index); - } + public monitoring.Monitoring.KpiValueRange.Builder getKpiValueRangeBuilder() { + + onChanged(); + return getKpiValueRangeFieldBuilder().getBuilder(); } /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> */ - public java.util.List<? extends monitoring.Monitoring.KpiValueRangeOrBuilder> - getKpiValueRangeOrBuilderList() { + public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { if (kpiValueRangeBuilder_ != null) { - return kpiValueRangeBuilder_.getMessageOrBuilderList(); + return kpiValueRangeBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(kpiValueRange_); + return kpiValueRange_ == null ? + monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; } } /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - public monitoring.Monitoring.KpiValueRange.Builder addKpiValueRangeBuilder() { - return getKpiValueRangeFieldBuilder().addBuilder( - monitoring.Monitoring.KpiValueRange.getDefaultInstance()); - } - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> + * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> */ - public monitoring.Monitoring.KpiValueRange.Builder addKpiValueRangeBuilder( - int index) { - return getKpiValueRangeFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiValueRange.getDefaultInstance()); - } - /** - * <code>repeated .monitoring.KpiValueRange kpi_value_range = 5;</code> - */ - public java.util.List<monitoring.Monitoring.KpiValueRange.Builder> - getKpiValueRangeBuilderList() { - return getKpiValueRangeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder> getKpiValueRangeFieldBuilder() { if (kpiValueRangeBuilder_ == null) { - kpiValueRangeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + kpiValueRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder>( - kpiValueRange_, - ((bitField0_ & 0x00000002) != 0), + getKpiValueRange(), getParentForChildren(), isClean()); kpiValueRange_ = null; @@ -16464,19 +18719,19 @@ public final class Monitoring { com.google.protobuf.MessageOrBuilder { /** - * <code>.monitoring.AlarmID alarmID = 1;</code> - * @return Whether the alarmID field is set. + * <code>.monitoring.AlarmID alarm_id = 1;</code> + * @return Whether the alarmId field is set. */ - boolean hasAlarmID(); + boolean hasAlarmId(); /** - * <code>.monitoring.AlarmID alarmID = 1;</code> - * @return The alarmID. + * <code>.monitoring.AlarmID alarm_id = 1;</code> + * @return The alarmId. */ - monitoring.Monitoring.AlarmID getAlarmID(); + monitoring.Monitoring.AlarmID getAlarmId(); /** - * <code>.monitoring.AlarmID alarmID = 1;</code> + * <code>.monitoring.AlarmID alarm_id = 1;</code> */ - monitoring.Monitoring.AlarmIDOrBuilder getAlarmIDOrBuilder(); + monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); /** * <code>float subscription_timeout_s = 2;</code> @@ -16537,13 +18792,13 @@ public final class Monitoring { break; case 10: { monitoring.Monitoring.AlarmID.Builder subBuilder = null; - if (alarmID_ != null) { - subBuilder = alarmID_.toBuilder(); + if (alarmId_ != null) { + subBuilder = alarmId_.toBuilder(); } - alarmID_ = input.readMessage(monitoring.Monitoring.AlarmID.parser(), extensionRegistry); + alarmId_ = input.readMessage(monitoring.Monitoring.AlarmID.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(alarmID_); - alarmID_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(alarmId_); + alarmId_ = subBuilder.buildPartial(); } break; @@ -16590,30 +18845,30 @@ public final class Monitoring { monitoring.Monitoring.AlarmSubscription.class, monitoring.Monitoring.AlarmSubscription.Builder.class); } - public static final int ALARMID_FIELD_NUMBER = 1; - private monitoring.Monitoring.AlarmID alarmID_; + public static final int ALARM_ID_FIELD_NUMBER = 1; + private monitoring.Monitoring.AlarmID alarmId_; /** - * <code>.monitoring.AlarmID alarmID = 1;</code> - * @return Whether the alarmID field is set. + * <code>.monitoring.AlarmID alarm_id = 1;</code> + * @return Whether the alarmId field is set. */ @java.lang.Override - public boolean hasAlarmID() { - return alarmID_ != null; + public boolean hasAlarmId() { + return alarmId_ != null; } /** - * <code>.monitoring.AlarmID alarmID = 1;</code> - * @return The alarmID. + * <code>.monitoring.AlarmID alarm_id = 1;</code> + * @return The alarmId. */ @java.lang.Override - public monitoring.Monitoring.AlarmID getAlarmID() { - return alarmID_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmID_; + public monitoring.Monitoring.AlarmID getAlarmId() { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; } /** - * <code>.monitoring.AlarmID alarmID = 1;</code> + * <code>.monitoring.AlarmID alarm_id = 1;</code> */ @java.lang.Override - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIDOrBuilder() { - return getAlarmID(); + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + return getAlarmId(); } public static final int SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER = 2; @@ -16652,8 +18907,8 @@ public final class Monitoring { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (alarmID_ != null) { - output.writeMessage(1, getAlarmID()); + if (alarmId_ != null) { + output.writeMessage(1, getAlarmId()); } if (subscriptionTimeoutS_ != 0F) { output.writeFloat(2, subscriptionTimeoutS_); @@ -16670,9 +18925,9 @@ public final class Monitoring { if (size != -1) return size; size = 0; - if (alarmID_ != null) { + if (alarmId_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAlarmID()); + .computeMessageSize(1, getAlarmId()); } if (subscriptionTimeoutS_ != 0F) { size += com.google.protobuf.CodedOutputStream @@ -16697,10 +18952,10 @@ public final class Monitoring { } monitoring.Monitoring.AlarmSubscription other = (monitoring.Monitoring.AlarmSubscription) obj; - if (hasAlarmID() != other.hasAlarmID()) return false; - if (hasAlarmID()) { - if (!getAlarmID() - .equals(other.getAlarmID())) return false; + if (hasAlarmId() != other.hasAlarmId()) return false; + if (hasAlarmId()) { + if (!getAlarmId() + .equals(other.getAlarmId())) return false; } if (java.lang.Float.floatToIntBits(getSubscriptionTimeoutS()) != java.lang.Float.floatToIntBits( @@ -16719,9 +18974,9 @@ public final class Monitoring { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAlarmID()) { - hash = (37 * hash) + ALARMID_FIELD_NUMBER; - hash = (53 * hash) + getAlarmID().hashCode(); + if (hasAlarmId()) { + hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; + hash = (53 * hash) + getAlarmId().hashCode(); } hash = (37 * hash) + SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( @@ -16862,11 +19117,11 @@ public final class Monitoring { @java.lang.Override public Builder clear() { super.clear(); - if (alarmIDBuilder_ == null) { - alarmID_ = null; + if (alarmIdBuilder_ == null) { + alarmId_ = null; } else { - alarmID_ = null; - alarmIDBuilder_ = null; + alarmId_ = null; + alarmIdBuilder_ = null; } subscriptionTimeoutS_ = 0F; @@ -16898,10 +19153,10 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.AlarmSubscription buildPartial() { monitoring.Monitoring.AlarmSubscription result = new monitoring.Monitoring.AlarmSubscription(this); - if (alarmIDBuilder_ == null) { - result.alarmID_ = alarmID_; + if (alarmIdBuilder_ == null) { + result.alarmId_ = alarmId_; } else { - result.alarmID_ = alarmIDBuilder_.build(); + result.alarmId_ = alarmIdBuilder_.build(); } result.subscriptionTimeoutS_ = subscriptionTimeoutS_; result.subscriptionFrequencyMs_ = subscriptionFrequencyMs_; @@ -16953,8 +19208,8 @@ public final class Monitoring { public Builder mergeFrom(monitoring.Monitoring.AlarmSubscription other) { if (other == monitoring.Monitoring.AlarmSubscription.getDefaultInstance()) return this; - if (other.hasAlarmID()) { - mergeAlarmID(other.getAlarmID()); + if (other.hasAlarmId()) { + mergeAlarmId(other.getAlarmId()); } if (other.getSubscriptionTimeoutS() != 0F) { setSubscriptionTimeoutS(other.getSubscriptionTimeoutS()); @@ -16991,123 +19246,123 @@ public final class Monitoring { return this; } - private monitoring.Monitoring.AlarmID alarmID_; + private monitoring.Monitoring.AlarmID alarmId_; private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIDBuilder_; + monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIdBuilder_; /** - * <code>.monitoring.AlarmID alarmID = 1;</code> - * @return Whether the alarmID field is set. + * <code>.monitoring.AlarmID alarm_id = 1;</code> + * @return Whether the alarmId field is set. */ - public boolean hasAlarmID() { - return alarmIDBuilder_ != null || alarmID_ != null; + public boolean hasAlarmId() { + return alarmIdBuilder_ != null || alarmId_ != null; } /** - * <code>.monitoring.AlarmID alarmID = 1;</code> - * @return The alarmID. + * <code>.monitoring.AlarmID alarm_id = 1;</code> + * @return The alarmId. */ - public monitoring.Monitoring.AlarmID getAlarmID() { - if (alarmIDBuilder_ == null) { - return alarmID_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmID_; + public monitoring.Monitoring.AlarmID getAlarmId() { + if (alarmIdBuilder_ == null) { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; } else { - return alarmIDBuilder_.getMessage(); + return alarmIdBuilder_.getMessage(); } } /** - * <code>.monitoring.AlarmID alarmID = 1;</code> + * <code>.monitoring.AlarmID alarm_id = 1;</code> */ - public Builder setAlarmID(monitoring.Monitoring.AlarmID value) { - if (alarmIDBuilder_ == null) { + public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - alarmID_ = value; + alarmId_ = value; onChanged(); } else { - alarmIDBuilder_.setMessage(value); + alarmIdBuilder_.setMessage(value); } return this; } /** - * <code>.monitoring.AlarmID alarmID = 1;</code> + * <code>.monitoring.AlarmID alarm_id = 1;</code> */ - public Builder setAlarmID( + public Builder setAlarmId( monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmIDBuilder_ == null) { - alarmID_ = builderForValue.build(); + if (alarmIdBuilder_ == null) { + alarmId_ = builderForValue.build(); onChanged(); } else { - alarmIDBuilder_.setMessage(builderForValue.build()); + alarmIdBuilder_.setMessage(builderForValue.build()); } return this; } /** - * <code>.monitoring.AlarmID alarmID = 1;</code> + * <code>.monitoring.AlarmID alarm_id = 1;</code> */ - public Builder mergeAlarmID(monitoring.Monitoring.AlarmID value) { - if (alarmIDBuilder_ == null) { - if (alarmID_ != null) { - alarmID_ = - monitoring.Monitoring.AlarmID.newBuilder(alarmID_).mergeFrom(value).buildPartial(); + public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (alarmId_ != null) { + alarmId_ = + monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); } else { - alarmID_ = value; + alarmId_ = value; } onChanged(); } else { - alarmIDBuilder_.mergeFrom(value); + alarmIdBuilder_.mergeFrom(value); } return this; } /** - * <code>.monitoring.AlarmID alarmID = 1;</code> + * <code>.monitoring.AlarmID alarm_id = 1;</code> */ - public Builder clearAlarmID() { - if (alarmIDBuilder_ == null) { - alarmID_ = null; + public Builder clearAlarmId() { + if (alarmIdBuilder_ == null) { + alarmId_ = null; onChanged(); } else { - alarmID_ = null; - alarmIDBuilder_ = null; + alarmId_ = null; + alarmIdBuilder_ = null; } return this; } /** - * <code>.monitoring.AlarmID alarmID = 1;</code> + * <code>.monitoring.AlarmID alarm_id = 1;</code> */ - public monitoring.Monitoring.AlarmID.Builder getAlarmIDBuilder() { + public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { onChanged(); - return getAlarmIDFieldBuilder().getBuilder(); + return getAlarmIdFieldBuilder().getBuilder(); } /** - * <code>.monitoring.AlarmID alarmID = 1;</code> + * <code>.monitoring.AlarmID alarm_id = 1;</code> */ - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIDOrBuilder() { - if (alarmIDBuilder_ != null) { - return alarmIDBuilder_.getMessageOrBuilder(); + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + if (alarmIdBuilder_ != null) { + return alarmIdBuilder_.getMessageOrBuilder(); } else { - return alarmID_ == null ? - monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmID_; + return alarmId_ == null ? + monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; } } /** - * <code>.monitoring.AlarmID alarmID = 1;</code> + * <code>.monitoring.AlarmID alarm_id = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmIDFieldBuilder() { - if (alarmIDBuilder_ == null) { - alarmIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + getAlarmIdFieldBuilder() { + if (alarmIdBuilder_ == null) { + alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder>( - getAlarmID(), + getAlarmId(), getParentForChildren(), isClean()); - alarmID_ = null; + alarmId_ = null; } - return alarmIDBuilder_; + return alarmIdBuilder_; } private float subscriptionTimeoutS_ ; @@ -17256,34 +19511,19 @@ public final class Monitoring { getTextBytes(); /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - * @return Whether the kpiValue field is set. - */ - boolean hasKpiValue(); - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - * @return The kpiValue. - */ - monitoring.Monitoring.KpiValue getKpiValue(); - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - */ - monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); - - /** - * <code>.context.Timestamp timestamp = 4;</code> - * @return Whether the timestamp field is set. + * <code>.monitoring.KpiList kpi_list = 3;</code> + * @return Whether the kpiList field is set. */ - boolean hasTimestamp(); + boolean hasKpiList(); /** - * <code>.context.Timestamp timestamp = 4;</code> - * @return The timestamp. + * <code>.monitoring.KpiList kpi_list = 3;</code> + * @return The kpiList. */ - context.ContextOuterClass.Timestamp getTimestamp(); + monitoring.Monitoring.KpiList getKpiList(); /** - * <code>.context.Timestamp timestamp = 4;</code> + * <code>.monitoring.KpiList kpi_list = 3;</code> */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder(); } /** * Protobuf type {@code monitoring.AlarmResponse} @@ -17351,27 +19591,14 @@ public final class Monitoring { break; } case 26: { - monitoring.Monitoring.KpiValue.Builder subBuilder = null; - if (kpiValue_ != null) { - subBuilder = kpiValue_.toBuilder(); - } - kpiValue_ = input.readMessage(monitoring.Monitoring.KpiValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiValue_); - kpiValue_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (timestamp_ != null) { - subBuilder = timestamp_.toBuilder(); + monitoring.Monitoring.KpiList.Builder subBuilder = null; + if (kpiList_ != null) { + subBuilder = kpiList_.toBuilder(); } - timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); + kpiList_ = input.readMessage(monitoring.Monitoring.KpiList.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom(timestamp_); - timestamp_ = subBuilder.buildPartial(); + subBuilder.mergeFrom(kpiList_); + kpiList_ = subBuilder.buildPartial(); } break; @@ -17472,56 +19699,30 @@ public final class Monitoring { } } - public static final int KPI_VALUE_FIELD_NUMBER = 3; - private monitoring.Monitoring.KpiValue kpiValue_; - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - * @return Whether the kpiValue field is set. - */ - @java.lang.Override - public boolean hasKpiValue() { - return kpiValue_ != null; - } - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - * @return The kpiValue. - */ - @java.lang.Override - public monitoring.Monitoring.KpiValue getKpiValue() { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - return getKpiValue(); - } - - public static final int TIMESTAMP_FIELD_NUMBER = 4; - private context.ContextOuterClass.Timestamp timestamp_; + public static final int KPI_LIST_FIELD_NUMBER = 3; + private monitoring.Monitoring.KpiList kpiList_; /** - * <code>.context.Timestamp timestamp = 4;</code> - * @return Whether the timestamp field is set. + * <code>.monitoring.KpiList kpi_list = 3;</code> + * @return Whether the kpiList field is set. */ @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; + public boolean hasKpiList() { + return kpiList_ != null; } /** - * <code>.context.Timestamp timestamp = 4;</code> - * @return The timestamp. + * <code>.monitoring.KpiList kpi_list = 3;</code> + * @return The kpiList. */ @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + public monitoring.Monitoring.KpiList getKpiList() { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } /** - * <code>.context.Timestamp timestamp = 4;</code> + * <code>.monitoring.KpiList kpi_list = 3;</code> */ @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + return getKpiList(); } private byte memoizedIsInitialized = -1; @@ -17544,11 +19745,8 @@ public final class Monitoring { if (!getTextBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); } - if (kpiValue_ != null) { - output.writeMessage(3, getKpiValue()); - } - if (timestamp_ != null) { - output.writeMessage(4, getTimestamp()); + if (kpiList_ != null) { + output.writeMessage(3, getKpiList()); } unknownFields.writeTo(output); } @@ -17566,13 +19764,9 @@ public final class Monitoring { if (!getTextBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); } - if (kpiValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getKpiValue()); - } - if (timestamp_ != null) { + if (kpiList_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getTimestamp()); + .computeMessageSize(3, getKpiList()); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -17596,15 +19790,10 @@ public final class Monitoring { } if (!getText() .equals(other.getText())) return false; - if (hasKpiValue() != other.hasKpiValue()) return false; - if (hasKpiValue()) { - if (!getKpiValue() - .equals(other.getKpiValue())) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; + if (hasKpiList() != other.hasKpiList()) return false; + if (hasKpiList()) { + if (!getKpiList() + .equals(other.getKpiList())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -17623,13 +19812,9 @@ public final class Monitoring { } hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); - if (hasKpiValue()) { - hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getKpiValue().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); + if (hasKpiList()) { + hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; + hash = (53 * hash) + getKpiList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; @@ -17766,23 +19951,17 @@ public final class Monitoring { super.clear(); if (alarmIdBuilder_ == null) { alarmId_ = null; - } else { - alarmId_ = null; - alarmIdBuilder_ = null; - } - text_ = ""; - - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; + } else { + alarmId_ = null; + alarmIdBuilder_ = null; } - if (timestampBuilder_ == null) { - timestamp_ = null; + text_ = ""; + + if (kpiListBuilder_ == null) { + kpiList_ = null; } else { - timestamp_ = null; - timestampBuilder_ = null; + kpiList_ = null; + kpiListBuilder_ = null; } return this; } @@ -17816,15 +19995,10 @@ public final class Monitoring { result.alarmId_ = alarmIdBuilder_.build(); } result.text_ = text_; - if (kpiValueBuilder_ == null) { - result.kpiValue_ = kpiValue_; - } else { - result.kpiValue_ = kpiValueBuilder_.build(); - } - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; + if (kpiListBuilder_ == null) { + result.kpiList_ = kpiList_; } else { - result.timestamp_ = timestampBuilder_.build(); + result.kpiList_ = kpiListBuilder_.build(); } onBuilt(); return result; @@ -17881,11 +20055,8 @@ public final class Monitoring { text_ = other.text_; onChanged(); } - if (other.hasKpiValue()) { - mergeKpiValue(other.getKpiValue()); - } - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); + if (other.hasKpiList()) { + mergeKpiList(other.getKpiList()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -18111,242 +20282,123 @@ public final class Monitoring { return this; } - private monitoring.Monitoring.KpiValue kpiValue_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiValueBuilder_; - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - * @return Whether the kpiValue field is set. - */ - public boolean hasKpiValue() { - return kpiValueBuilder_ != null || kpiValue_ != null; - } - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - * @return The kpiValue. - */ - public monitoring.Monitoring.KpiValue getKpiValue() { - if (kpiValueBuilder_ == null) { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } else { - return kpiValueBuilder_.getMessage(); - } - } - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - */ - public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiValue_ = value; - onChanged(); - } else { - kpiValueBuilder_.setMessage(value); - } - - return this; - } - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - */ - public Builder setKpiValue( - monitoring.Monitoring.KpiValue.Builder builderForValue) { - if (kpiValueBuilder_ == null) { - kpiValue_ = builderForValue.build(); - onChanged(); - } else { - kpiValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - */ - public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (kpiValue_ != null) { - kpiValue_ = - monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); - } else { - kpiValue_ = value; - } - onChanged(); - } else { - kpiValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - */ - public Builder clearKpiValue() { - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - onChanged(); - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; - } - - return this; - } - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - */ - public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { - - onChanged(); - return getKpiValueFieldBuilder().getBuilder(); - } - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - */ - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - if (kpiValueBuilder_ != null) { - return kpiValueBuilder_.getMessageOrBuilder(); - } else { - return kpiValue_ == null ? - monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } - } - /** - * <code>.monitoring.KpiValue kpi_value = 3;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> - getKpiValueFieldBuilder() { - if (kpiValueBuilder_ == null) { - kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder>( - getKpiValue(), - getParentForChildren(), - isClean()); - kpiValue_ = null; - } - return kpiValueBuilder_; - } - - private context.ContextOuterClass.Timestamp timestamp_; + private monitoring.Monitoring.KpiList kpiList_; private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; + monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> kpiListBuilder_; /** - * <code>.context.Timestamp timestamp = 4;</code> - * @return Whether the timestamp field is set. + * <code>.monitoring.KpiList kpi_list = 3;</code> + * @return Whether the kpiList field is set. */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; + public boolean hasKpiList() { + return kpiListBuilder_ != null || kpiList_ != null; } /** - * <code>.context.Timestamp timestamp = 4;</code> - * @return The timestamp. + * <code>.monitoring.KpiList kpi_list = 3;</code> + * @return The kpiList. */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + public monitoring.Monitoring.KpiList getKpiList() { + if (kpiListBuilder_ == null) { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } else { - return timestampBuilder_.getMessage(); + return kpiListBuilder_.getMessage(); } } /** - * <code>.context.Timestamp timestamp = 4;</code> + * <code>.monitoring.KpiList kpi_list = 3;</code> */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { + public Builder setKpiList(monitoring.Monitoring.KpiList value) { + if (kpiListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - timestamp_ = value; + kpiList_ = value; onChanged(); } else { - timestampBuilder_.setMessage(value); + kpiListBuilder_.setMessage(value); } return this; } /** - * <code>.context.Timestamp timestamp = 4;</code> + * <code>.monitoring.KpiList kpi_list = 3;</code> */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); + public Builder setKpiList( + monitoring.Monitoring.KpiList.Builder builderForValue) { + if (kpiListBuilder_ == null) { + kpiList_ = builderForValue.build(); onChanged(); } else { - timestampBuilder_.setMessage(builderForValue.build()); + kpiListBuilder_.setMessage(builderForValue.build()); } return this; } /** - * <code>.context.Timestamp timestamp = 4;</code> + * <code>.monitoring.KpiList kpi_list = 3;</code> */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { + if (kpiListBuilder_ == null) { + if (kpiList_ != null) { + kpiList_ = + monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); } else { - timestamp_ = value; + kpiList_ = value; } onChanged(); } else { - timestampBuilder_.mergeFrom(value); + kpiListBuilder_.mergeFrom(value); } return this; } /** - * <code>.context.Timestamp timestamp = 4;</code> + * <code>.monitoring.KpiList kpi_list = 3;</code> */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; + public Builder clearKpiList() { + if (kpiListBuilder_ == null) { + kpiList_ = null; onChanged(); } else { - timestamp_ = null; - timestampBuilder_ = null; + kpiList_ = null; + kpiListBuilder_ = null; } return this; } /** - * <code>.context.Timestamp timestamp = 4;</code> + * <code>.monitoring.KpiList kpi_list = 3;</code> */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { onChanged(); - return getTimestampFieldBuilder().getBuilder(); + return getKpiListFieldBuilder().getBuilder(); } /** - * <code>.context.Timestamp timestamp = 4;</code> + * <code>.monitoring.KpiList kpi_list = 3;</code> */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + if (kpiListBuilder_ != null) { + return kpiListBuilder_.getMessageOrBuilder(); } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + return kpiList_ == null ? + monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } } /** - * <code>.context.Timestamp timestamp = 4;</code> + * <code>.monitoring.KpiList kpi_list = 3;</code> */ private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), + monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> + getKpiListFieldBuilder() { + if (kpiListBuilder_ == null) { + kpiListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder>( + getKpiList(), getParentForChildren(), isClean()); - timestamp_ = null; + kpiList_ = null; } - return timestampBuilder_; + return kpiListBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -18401,55 +20453,55 @@ public final class Monitoring { } - public interface AlarmIDListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.AlarmIDList) + public interface AlarmListOrBuilder extends + // @@protoc_insertion_point(interface_extends:monitoring.AlarmList) com.google.protobuf.MessageOrBuilder { /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - java.util.List<monitoring.Monitoring.AlarmID> - getAlarmListList(); + java.util.List<monitoring.Monitoring.AlarmDescriptor> + getAlarmDescriptorList(); /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - monitoring.Monitoring.AlarmID getAlarmList(int index); + monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index); /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - int getAlarmListCount(); + int getAlarmDescriptorCount(); /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - java.util.List<? extends monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmListOrBuilderList(); + java.util.List<? extends monitoring.Monitoring.AlarmDescriptorOrBuilder> + getAlarmDescriptorOrBuilderList(); /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - monitoring.Monitoring.AlarmIDOrBuilder getAlarmListOrBuilder( + monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder( int index); } /** - * Protobuf type {@code monitoring.AlarmIDList} + * Protobuf type {@code monitoring.AlarmList} */ - public static final class AlarmIDList extends + public static final class AlarmList extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.AlarmIDList) - AlarmIDListOrBuilder { + // @@protoc_insertion_point(message_implements:monitoring.AlarmList) + AlarmListOrBuilder { private static final long serialVersionUID = 0L; - // Use AlarmIDList.newBuilder() to construct. - private AlarmIDList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + // Use AlarmList.newBuilder() to construct. + private AlarmList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } - private AlarmIDList() { - alarmList_ = java.util.Collections.emptyList(); + private AlarmList() { + alarmDescriptor_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new AlarmIDList(); + return new AlarmList(); } @java.lang.Override @@ -18457,7 +20509,7 @@ public final class Monitoring { getUnknownFields() { return this.unknownFields; } - private AlarmIDList( + private AlarmList( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -18478,11 +20530,11 @@ public final class Monitoring { break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - alarmList_ = new java.util.ArrayList<monitoring.Monitoring.AlarmID>(); + alarmDescriptor_ = new java.util.ArrayList<monitoring.Monitoring.AlarmDescriptor>(); mutable_bitField0_ |= 0x00000001; } - alarmList_.add( - input.readMessage(monitoring.Monitoring.AlarmID.parser(), extensionRegistry)); + alarmDescriptor_.add( + input.readMessage(monitoring.Monitoring.AlarmDescriptor.parser(), extensionRegistry)); break; } default: { @@ -18501,7 +20553,7 @@ public final class Monitoring { e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { - alarmList_ = java.util.Collections.unmodifiableList(alarmList_); + alarmDescriptor_ = java.util.Collections.unmodifiableList(alarmDescriptor_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -18509,55 +20561,55 @@ public final class Monitoring { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmIDList_descriptor; + return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmIDList_fieldAccessorTable + return monitoring.Monitoring.internal_static_monitoring_AlarmList_fieldAccessorTable .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmIDList.class, monitoring.Monitoring.AlarmIDList.Builder.class); + monitoring.Monitoring.AlarmList.class, monitoring.Monitoring.AlarmList.Builder.class); } - public static final int ALARM_LIST_FIELD_NUMBER = 1; - private java.util.List<monitoring.Monitoring.AlarmID> alarmList_; + public static final int ALARM_DESCRIPTOR_FIELD_NUMBER = 1; + private java.util.List<monitoring.Monitoring.AlarmDescriptor> alarmDescriptor_; /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ @java.lang.Override - public java.util.List<monitoring.Monitoring.AlarmID> getAlarmListList() { - return alarmList_; + public java.util.List<monitoring.Monitoring.AlarmDescriptor> getAlarmDescriptorList() { + return alarmDescriptor_; } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ @java.lang.Override - public java.util.List<? extends monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmListOrBuilderList() { - return alarmList_; + public java.util.List<? extends monitoring.Monitoring.AlarmDescriptorOrBuilder> + getAlarmDescriptorOrBuilderList() { + return alarmDescriptor_; } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ @java.lang.Override - public int getAlarmListCount() { - return alarmList_.size(); + public int getAlarmDescriptorCount() { + return alarmDescriptor_.size(); } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ @java.lang.Override - public monitoring.Monitoring.AlarmID getAlarmList(int index) { - return alarmList_.get(index); + public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index) { + return alarmDescriptor_.get(index); } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ @java.lang.Override - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmListOrBuilder( + public monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder( int index) { - return alarmList_.get(index); + return alarmDescriptor_.get(index); } private byte memoizedIsInitialized = -1; @@ -18574,8 +20626,8 @@ public final class Monitoring { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < alarmList_.size(); i++) { - output.writeMessage(1, alarmList_.get(i)); + for (int i = 0; i < alarmDescriptor_.size(); i++) { + output.writeMessage(1, alarmDescriptor_.get(i)); } unknownFields.writeTo(output); } @@ -18586,9 +20638,9 @@ public final class Monitoring { if (size != -1) return size; size = 0; - for (int i = 0; i < alarmList_.size(); i++) { + for (int i = 0; i < alarmDescriptor_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, alarmList_.get(i)); + .computeMessageSize(1, alarmDescriptor_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -18600,13 +20652,13 @@ public final class Monitoring { if (obj == this) { return true; } - if (!(obj instanceof monitoring.Monitoring.AlarmIDList)) { + if (!(obj instanceof monitoring.Monitoring.AlarmList)) { return super.equals(obj); } - monitoring.Monitoring.AlarmIDList other = (monitoring.Monitoring.AlarmIDList) obj; + monitoring.Monitoring.AlarmList other = (monitoring.Monitoring.AlarmList) obj; - if (!getAlarmListList() - .equals(other.getAlarmListList())) return false; + if (!getAlarmDescriptorList() + .equals(other.getAlarmDescriptorList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -18618,78 +20670,78 @@ public final class Monitoring { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getAlarmListCount() > 0) { - hash = (37 * hash) + ALARM_LIST_FIELD_NUMBER; - hash = (53 * hash) + getAlarmListList().hashCode(); + if (getAlarmDescriptorCount() > 0) { + hash = (37 * hash) + ALARM_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getAlarmDescriptorList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static monitoring.Monitoring.AlarmIDList parseFrom(byte[] data) + public static monitoring.Monitoring.AlarmList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static monitoring.Monitoring.AlarmIDList parseFrom(java.io.InputStream input) + public static monitoring.Monitoring.AlarmList parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static monitoring.Monitoring.AlarmIDList parseDelimitedFrom(java.io.InputStream input) + public static monitoring.Monitoring.AlarmList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static monitoring.Monitoring.AlarmIDList parseDelimitedFrom( + public static monitoring.Monitoring.AlarmList parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static monitoring.Monitoring.AlarmIDList parseFrom( + public static monitoring.Monitoring.AlarmList parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18702,7 +20754,7 @@ public final class Monitoring { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(monitoring.Monitoring.AlarmIDList prototype) { + public static Builder newBuilder(monitoring.Monitoring.AlarmList prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -18718,26 +20770,26 @@ public final class Monitoring { return builder; } /** - * Protobuf type {@code monitoring.AlarmIDList} + * Protobuf type {@code monitoring.AlarmList} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:monitoring.AlarmIDList) - monitoring.Monitoring.AlarmIDListOrBuilder { + // @@protoc_insertion_point(builder_implements:monitoring.AlarmList) + monitoring.Monitoring.AlarmListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmIDList_descriptor; + return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmIDList_fieldAccessorTable + return monitoring.Monitoring.internal_static_monitoring_AlarmList_fieldAccessorTable .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmIDList.class, monitoring.Monitoring.AlarmIDList.Builder.class); + monitoring.Monitoring.AlarmList.class, monitoring.Monitoring.AlarmList.Builder.class); } - // Construct using monitoring.Monitoring.AlarmIDList.newBuilder() + // Construct using monitoring.Monitoring.AlarmList.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -18750,17 +20802,17 @@ public final class Monitoring { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getAlarmListFieldBuilder(); + getAlarmDescriptorFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (alarmListBuilder_ == null) { - alarmList_ = java.util.Collections.emptyList(); + if (alarmDescriptorBuilder_ == null) { + alarmDescriptor_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - alarmListBuilder_.clear(); + alarmDescriptorBuilder_.clear(); } return this; } @@ -18768,17 +20820,17 @@ public final class Monitoring { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_AlarmIDList_descriptor; + return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; } @java.lang.Override - public monitoring.Monitoring.AlarmIDList getDefaultInstanceForType() { - return monitoring.Monitoring.AlarmIDList.getDefaultInstance(); + public monitoring.Monitoring.AlarmList getDefaultInstanceForType() { + return monitoring.Monitoring.AlarmList.getDefaultInstance(); } @java.lang.Override - public monitoring.Monitoring.AlarmIDList build() { - monitoring.Monitoring.AlarmIDList result = buildPartial(); + public monitoring.Monitoring.AlarmList build() { + monitoring.Monitoring.AlarmList result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -18786,17 +20838,17 @@ public final class Monitoring { } @java.lang.Override - public monitoring.Monitoring.AlarmIDList buildPartial() { - monitoring.Monitoring.AlarmIDList result = new monitoring.Monitoring.AlarmIDList(this); + public monitoring.Monitoring.AlarmList buildPartial() { + monitoring.Monitoring.AlarmList result = new monitoring.Monitoring.AlarmList(this); int from_bitField0_ = bitField0_; - if (alarmListBuilder_ == null) { + if (alarmDescriptorBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { - alarmList_ = java.util.Collections.unmodifiableList(alarmList_); + alarmDescriptor_ = java.util.Collections.unmodifiableList(alarmDescriptor_); bitField0_ = (bitField0_ & ~0x00000001); } - result.alarmList_ = alarmList_; + result.alarmDescriptor_ = alarmDescriptor_; } else { - result.alarmList_ = alarmListBuilder_.build(); + result.alarmDescriptor_ = alarmDescriptorBuilder_.build(); } onBuilt(); return result; @@ -18836,39 +20888,39 @@ public final class Monitoring { } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.AlarmIDList) { - return mergeFrom((monitoring.Monitoring.AlarmIDList)other); + if (other instanceof monitoring.Monitoring.AlarmList) { + return mergeFrom((monitoring.Monitoring.AlarmList)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(monitoring.Monitoring.AlarmIDList other) { - if (other == monitoring.Monitoring.AlarmIDList.getDefaultInstance()) return this; - if (alarmListBuilder_ == null) { - if (!other.alarmList_.isEmpty()) { - if (alarmList_.isEmpty()) { - alarmList_ = other.alarmList_; + public Builder mergeFrom(monitoring.Monitoring.AlarmList other) { + if (other == monitoring.Monitoring.AlarmList.getDefaultInstance()) return this; + if (alarmDescriptorBuilder_ == null) { + if (!other.alarmDescriptor_.isEmpty()) { + if (alarmDescriptor_.isEmpty()) { + alarmDescriptor_ = other.alarmDescriptor_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureAlarmListIsMutable(); - alarmList_.addAll(other.alarmList_); + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.addAll(other.alarmDescriptor_); } onChanged(); } } else { - if (!other.alarmList_.isEmpty()) { - if (alarmListBuilder_.isEmpty()) { - alarmListBuilder_.dispose(); - alarmListBuilder_ = null; - alarmList_ = other.alarmList_; + if (!other.alarmDescriptor_.isEmpty()) { + if (alarmDescriptorBuilder_.isEmpty()) { + alarmDescriptorBuilder_.dispose(); + alarmDescriptorBuilder_ = null; + alarmDescriptor_ = other.alarmDescriptor_; bitField0_ = (bitField0_ & ~0x00000001); - alarmListBuilder_ = + alarmDescriptorBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAlarmListFieldBuilder() : null; + getAlarmDescriptorFieldBuilder() : null; } else { - alarmListBuilder_.addAllMessages(other.alarmList_); + alarmDescriptorBuilder_.addAllMessages(other.alarmDescriptor_); } } } @@ -18887,11 +20939,11 @@ public final class Monitoring { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.AlarmIDList parsedMessage = null; + monitoring.Monitoring.AlarmList parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmIDList) e.getUnfinishedMessage(); + parsedMessage = (monitoring.Monitoring.AlarmList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -18902,244 +20954,244 @@ public final class Monitoring { } private int bitField0_; - private java.util.List<monitoring.Monitoring.AlarmID> alarmList_ = + private java.util.List<monitoring.Monitoring.AlarmDescriptor> alarmDescriptor_ = java.util.Collections.emptyList(); - private void ensureAlarmListIsMutable() { + private void ensureAlarmDescriptorIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - alarmList_ = new java.util.ArrayList<monitoring.Monitoring.AlarmID>(alarmList_); + alarmDescriptor_ = new java.util.ArrayList<monitoring.Monitoring.AlarmDescriptor>(alarmDescriptor_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmListBuilder_; + monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmDescriptor.Builder, monitoring.Monitoring.AlarmDescriptorOrBuilder> alarmDescriptorBuilder_; /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public java.util.List<monitoring.Monitoring.AlarmID> getAlarmListList() { - if (alarmListBuilder_ == null) { - return java.util.Collections.unmodifiableList(alarmList_); + public java.util.List<monitoring.Monitoring.AlarmDescriptor> getAlarmDescriptorList() { + if (alarmDescriptorBuilder_ == null) { + return java.util.Collections.unmodifiableList(alarmDescriptor_); } else { - return alarmListBuilder_.getMessageList(); + return alarmDescriptorBuilder_.getMessageList(); } } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public int getAlarmListCount() { - if (alarmListBuilder_ == null) { - return alarmList_.size(); + public int getAlarmDescriptorCount() { + if (alarmDescriptorBuilder_ == null) { + return alarmDescriptor_.size(); } else { - return alarmListBuilder_.getCount(); + return alarmDescriptorBuilder_.getCount(); } } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public monitoring.Monitoring.AlarmID getAlarmList(int index) { - if (alarmListBuilder_ == null) { - return alarmList_.get(index); + public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index) { + if (alarmDescriptorBuilder_ == null) { + return alarmDescriptor_.get(index); } else { - return alarmListBuilder_.getMessage(index); + return alarmDescriptorBuilder_.getMessage(index); } } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public Builder setAlarmList( - int index, monitoring.Monitoring.AlarmID value) { - if (alarmListBuilder_ == null) { + public Builder setAlarmDescriptor( + int index, monitoring.Monitoring.AlarmDescriptor value) { + if (alarmDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureAlarmListIsMutable(); - alarmList_.set(index, value); + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.set(index, value); onChanged(); } else { - alarmListBuilder_.setMessage(index, value); + alarmDescriptorBuilder_.setMessage(index, value); } return this; } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public Builder setAlarmList( - int index, monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmListBuilder_ == null) { - ensureAlarmListIsMutable(); - alarmList_.set(index, builderForValue.build()); + public Builder setAlarmDescriptor( + int index, monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.set(index, builderForValue.build()); onChanged(); } else { - alarmListBuilder_.setMessage(index, builderForValue.build()); + alarmDescriptorBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public Builder addAlarmList(monitoring.Monitoring.AlarmID value) { - if (alarmListBuilder_ == null) { + public Builder addAlarmDescriptor(monitoring.Monitoring.AlarmDescriptor value) { + if (alarmDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureAlarmListIsMutable(); - alarmList_.add(value); + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(value); onChanged(); } else { - alarmListBuilder_.addMessage(value); + alarmDescriptorBuilder_.addMessage(value); } return this; } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public Builder addAlarmList( - int index, monitoring.Monitoring.AlarmID value) { - if (alarmListBuilder_ == null) { + public Builder addAlarmDescriptor( + int index, monitoring.Monitoring.AlarmDescriptor value) { + if (alarmDescriptorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureAlarmListIsMutable(); - alarmList_.add(index, value); + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(index, value); onChanged(); } else { - alarmListBuilder_.addMessage(index, value); + alarmDescriptorBuilder_.addMessage(index, value); } return this; } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public Builder addAlarmList( - monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmListBuilder_ == null) { - ensureAlarmListIsMutable(); - alarmList_.add(builderForValue.build()); + public Builder addAlarmDescriptor( + monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(builderForValue.build()); onChanged(); } else { - alarmListBuilder_.addMessage(builderForValue.build()); + alarmDescriptorBuilder_.addMessage(builderForValue.build()); } return this; } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public Builder addAlarmList( - int index, monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmListBuilder_ == null) { - ensureAlarmListIsMutable(); - alarmList_.add(index, builderForValue.build()); + public Builder addAlarmDescriptor( + int index, monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(index, builderForValue.build()); onChanged(); } else { - alarmListBuilder_.addMessage(index, builderForValue.build()); + alarmDescriptorBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public Builder addAllAlarmList( - java.lang.Iterable<? extends monitoring.Monitoring.AlarmID> values) { - if (alarmListBuilder_ == null) { - ensureAlarmListIsMutable(); + public Builder addAllAlarmDescriptor( + java.lang.Iterable<? extends monitoring.Monitoring.AlarmDescriptor> values) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, alarmList_); + values, alarmDescriptor_); onChanged(); } else { - alarmListBuilder_.addAllMessages(values); + alarmDescriptorBuilder_.addAllMessages(values); } return this; } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public Builder clearAlarmList() { - if (alarmListBuilder_ == null) { - alarmList_ = java.util.Collections.emptyList(); + public Builder clearAlarmDescriptor() { + if (alarmDescriptorBuilder_ == null) { + alarmDescriptor_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - alarmListBuilder_.clear(); + alarmDescriptorBuilder_.clear(); } return this; } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public Builder removeAlarmList(int index) { - if (alarmListBuilder_ == null) { - ensureAlarmListIsMutable(); - alarmList_.remove(index); + public Builder removeAlarmDescriptor(int index) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.remove(index); onChanged(); } else { - alarmListBuilder_.remove(index); + alarmDescriptorBuilder_.remove(index); } return this; } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public monitoring.Monitoring.AlarmID.Builder getAlarmListBuilder( + public monitoring.Monitoring.AlarmDescriptor.Builder getAlarmDescriptorBuilder( int index) { - return getAlarmListFieldBuilder().getBuilder(index); + return getAlarmDescriptorFieldBuilder().getBuilder(index); } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmListOrBuilder( + public monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder( int index) { - if (alarmListBuilder_ == null) { - return alarmList_.get(index); } else { - return alarmListBuilder_.getMessageOrBuilder(index); + if (alarmDescriptorBuilder_ == null) { + return alarmDescriptor_.get(index); } else { + return alarmDescriptorBuilder_.getMessageOrBuilder(index); } } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public java.util.List<? extends monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmListOrBuilderList() { - if (alarmListBuilder_ != null) { - return alarmListBuilder_.getMessageOrBuilderList(); + public java.util.List<? extends monitoring.Monitoring.AlarmDescriptorOrBuilder> + getAlarmDescriptorOrBuilderList() { + if (alarmDescriptorBuilder_ != null) { + return alarmDescriptorBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(alarmList_); + return java.util.Collections.unmodifiableList(alarmDescriptor_); } } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public monitoring.Monitoring.AlarmID.Builder addAlarmListBuilder() { - return getAlarmListFieldBuilder().addBuilder( - monitoring.Monitoring.AlarmID.getDefaultInstance()); + public monitoring.Monitoring.AlarmDescriptor.Builder addAlarmDescriptorBuilder() { + return getAlarmDescriptorFieldBuilder().addBuilder( + monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()); } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public monitoring.Monitoring.AlarmID.Builder addAlarmListBuilder( + public monitoring.Monitoring.AlarmDescriptor.Builder addAlarmDescriptorBuilder( int index) { - return getAlarmListFieldBuilder().addBuilder( - index, monitoring.Monitoring.AlarmID.getDefaultInstance()); + return getAlarmDescriptorFieldBuilder().addBuilder( + index, monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()); } /** - * <code>repeated .monitoring.AlarmID alarm_list = 1;</code> + * <code>repeated .monitoring.AlarmDescriptor alarm_descriptor = 1;</code> */ - public java.util.List<monitoring.Monitoring.AlarmID.Builder> - getAlarmListBuilderList() { - return getAlarmListFieldBuilder().getBuilderList(); + public java.util.List<monitoring.Monitoring.AlarmDescriptor.Builder> + getAlarmDescriptorBuilderList() { + return getAlarmDescriptorFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmListFieldBuilder() { - if (alarmListBuilder_ == null) { - alarmListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder>( - alarmList_, + monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmDescriptor.Builder, monitoring.Monitoring.AlarmDescriptorOrBuilder> + getAlarmDescriptorFieldBuilder() { + if (alarmDescriptorBuilder_ == null) { + alarmDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmDescriptor.Builder, monitoring.Monitoring.AlarmDescriptorOrBuilder>( + alarmDescriptor_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - alarmList_ = null; + alarmDescriptor_ = null; } - return alarmListBuilder_; + return alarmDescriptorBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -19154,41 +21206,41 @@ public final class Monitoring { } - // @@protoc_insertion_point(builder_scope:monitoring.AlarmIDList) + // @@protoc_insertion_point(builder_scope:monitoring.AlarmList) } - // @@protoc_insertion_point(class_scope:monitoring.AlarmIDList) - private static final monitoring.Monitoring.AlarmIDList DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:monitoring.AlarmList) + private static final monitoring.Monitoring.AlarmList DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmIDList(); + DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmList(); } - public static monitoring.Monitoring.AlarmIDList getDefaultInstance() { + public static monitoring.Monitoring.AlarmList getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser<AlarmIDList> - PARSER = new com.google.protobuf.AbstractParser<AlarmIDList>() { + private static final com.google.protobuf.Parser<AlarmList> + PARSER = new com.google.protobuf.AbstractParser<AlarmList>() { @java.lang.Override - public AlarmIDList parsePartialFrom( + public AlarmList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AlarmIDList(input, extensionRegistry); + return new AlarmList(input, extensionRegistry); } }; - public static com.google.protobuf.Parser<AlarmIDList> parser() { + public static com.google.protobuf.Parser<AlarmList> parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser<AlarmIDList> getParserForType() { + public com.google.protobuf.Parser<AlarmList> getParserForType() { return PARSER; } @java.lang.Override - public monitoring.Monitoring.AlarmIDList getDefaultInstanceForType() { + public monitoring.Monitoring.AlarmList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -19209,6 +21261,21 @@ public final class Monitoring { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiQuery_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_monitoring_RawKpi_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_monitoring_RawKpi_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_monitoring_RawKpiList_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_monitoring_RawKpiList_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_monitoring_RawKpiTable_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_monitoring_RawKpiTable_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiId_descriptor; private static final @@ -19255,10 +21322,10 @@ public final class Monitoring { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_SubsResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_SubsIDList_descriptor; + internal_static_monitoring_SubsList_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_SubsIDList_fieldAccessorTable; + internal_static_monitoring_SubsList_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_AlarmDescriptor_descriptor; private static final @@ -19280,10 +21347,10 @@ public final class Monitoring { com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_AlarmResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_AlarmIDList_descriptor; + internal_static_monitoring_AlarmList_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_AlarmIDList_fieldAccessorTable; + internal_static_monitoring_AlarmList_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -19294,7 +21361,7 @@ public final class Monitoring { static { java.lang.String[] descriptorData = { "\n\020monitoring.proto\022\nmonitoring\032\rcontext." + - "proto\032\026kpi_sample_types.proto\"\311\002\n\rKpiDes" + + "proto\032\026kpi_sample_types.proto\"\367\002\n\rKpiDes" + "criptor\022!\n\006kpi_id\030\001 \001(\0132\021.monitoring.Kpi" + "Id\022\027\n\017kpi_description\030\002 \001(\t\022&\n\013kpi_id_li" + "st\030\003 \003(\0132\021.monitoring.KpiId\0228\n\017kpi_sampl" + @@ -19303,86 +21370,92 @@ public final class Monitoring { "eId\022(\n\013endpoint_id\030\006 \001(\0132\023.context.EndPo" + "intId\022&\n\nservice_id\030\007 \001(\0132\022.context.Serv" + "iceId\022\"\n\010slice_id\030\010 \001(\0132\020.context.SliceI" + - "d\"l\n\021MonitorKpiRequest\022!\n\006kpi_id\030\001 \001(\0132\021" + - ".monitoring.KpiId\022\033\n\023monitoring_window_s" + - "\030\002 \001(\002\022\027\n\017sampling_rate_s\030\003 \001(\002\"\323\001\n\010KpiQ" + - "uery\022!\n\006kpi_id\030\001 \003(\0132\021.monitoring.KpiId\022" + - "\033\n\023monitoring_window_s\030\002 \001(\002\022\027\n\017sampling" + - "_rate_s\030\003 \001(\002\022\026\n\016last_n_samples\030\004 \001(\r\022+\n" + - "\017start_timestamp\030\005 \001(\0132\022.context.Timesta" + - "mp\022)\n\rend_timestamp\030\006 \001(\0132\022.context.Time" + - "stamp\"&\n\005KpiId\022\035\n\006kpi_id\030\001 \001(\0132\r.context" + - ".Uuid\"x\n\003Kpi\022!\n\006kpi_id\030\001 \001(\0132\021.monitorin" + - "g.KpiId\022%\n\ttimestamp\030\002 \001(\0132\022.context.Tim" + - "estamp\022\'\n\tkpi_value\030\003 \001(\0132\024.monitoring.K" + - "piValue\"\250\001\n\rKpiValueRange\022)\n\013kpiMinValue" + - "\030\001 \001(\0132\024.monitoring.KpiValue\022)\n\013kpiMaxVa" + - "lue\030\002 \001(\0132\024.monitoring.KpiValue\022\017\n\007inRan" + - "ge\030\003 \001(\010\022\027\n\017includeMinValue\030\004 \001(\010\022\027\n\017inc" + - "ludeMaxValue\030\005 \001(\010\"\241\001\n\010KpiValue\022\022\n\010int32" + - "Val\030\001 \001(\005H\000\022\023\n\tuint32Val\030\002 \001(\rH\000\022\022\n\010int6" + - "4Val\030\003 \001(\003H\000\022\023\n\tuint64Val\030\004 \001(\004H\000\022\022\n\010flo" + - "atVal\030\005 \001(\002H\000\022\023\n\tstringVal\030\006 \001(\tH\000\022\021\n\007bo" + - "olVal\030\007 \001(\010H\000B\007\n\005value\",\n\007KpiList\022!\n\010kpi" + - "_list\030\001 \003(\0132\017.monitoring.Kpi\"K\n\021KpiDescr" + - "iptorList\0226\n\023kpi_descriptor_list\030\001 \003(\0132\031" + - ".monitoring.KpiDescriptor\"\362\001\n\016SubsDescri" + - "ptor\022+\n\007subs_id\030\001 \001(\0132\032.monitoring.Subsc" + - "riptionID\022!\n\006kpi_id\030\002 \001(\0132\021.monitoring.K" + - "piId\022\033\n\023sampling_duration_s\030\003 \001(\002\022\033\n\023sam" + - "pling_interval_s\030\004 \001(\002\022+\n\017start_timestam" + - "p\030\005 \001(\0132\022.context.Timestamp\022)\n\rend_times" + - "tamp\030\006 \001(\0132\022.context.Timestamp\"0\n\016Subscr" + - "iptionID\022\036\n\007subs_id\030\001 \001(\0132\r.context.Uuid" + - "\"b\n\014SubsResponse\022+\n\007subs_id\030\001 \001(\0132\032.moni" + - "toring.SubscriptionID\022%\n\010kpi_list\030\002 \003(\0132" + - "\023.monitoring.KpiList\";\n\nSubsIDList\022-\n\tsu" + - "bs_list\030\001 \003(\0132\032.monitoring.SubscriptionI" + - "D\"\337\001\n\017AlarmDescriptor\022%\n\010alarm_id\030\001 \001(\0132" + - "\023.monitoring.AlarmID\022\031\n\021alarm_descriptio" + - "n\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022!\n\006kpi_id\030\004 \003(\0132\021." + - "monitoring.KpiId\0222\n\017kpi_value_range\030\005 \003(" + - "\0132\031.monitoring.KpiValueRange\022%\n\ttimestam" + - "p\030\006 \001(\0132\022.context.Timestamp\"*\n\007AlarmID\022\037" + - "\n\010alarm_id\030\001 \001(\0132\r.context.Uuid\"|\n\021Alarm" + - "Subscription\022$\n\007alarmID\030\001 \001(\0132\023.monitori" + - "ng.AlarmID\022\036\n\026subscription_timeout_s\030\002 \001" + - "(\002\022!\n\031subscription_frequency_ms\030\003 \001(\002\"\224\001" + - "\n\rAlarmResponse\022%\n\010alarm_id\030\001 \001(\0132\023.moni" + - "toring.AlarmID\022\014\n\004text\030\002 \001(\t\022\'\n\tkpi_valu" + - "e\030\003 \001(\0132\024.monitoring.KpiValue\022%\n\ttimesta" + - "mp\030\004 \001(\0132\022.context.Timestamp\"6\n\013AlarmIDL" + - "ist\022\'\n\nalarm_list\030\001 \003(\0132\023.monitoring.Ala" + - "rmID2\233\t\n\021MonitoringService\0228\n\006SetKpi\022\031.m" + - "onitoring.KpiDescriptor\032\021.monitoring.Kpi" + - "Id\"\000\0220\n\tDeleteKpi\022\021.monitoring.KpiId\032\016.c" + - "ontext.Empty\"\000\022B\n\020GetKpiDescriptor\022\021.mon" + - "itoring.KpiId\032\031.monitoring.KpiDescriptor" + - "\"\000\022G\n\024GetKpiDescriptorList\022\016.context.Emp" + - "ty\032\035.monitoring.KpiDescriptorList\"\000\022/\n\nI" + - "ncludeKpi\022\017.monitoring.Kpi\032\016.context.Emp" + - "ty\"\000\022=\n\nMonitorKpi\022\035.monitoring.MonitorK" + - "piRequest\032\016.context.Empty\"\000\022;\n\014QueryKpiD" + - "ata\022\024.monitoring.KpiQuery\032\023.monitoring.K" + - "piList\"\000\022I\n\022SetKpiSubscription\022\032.monitor" + - "ing.SubsDescriptor\032\023.monitoring.KpiList\"" + + "d\022,\n\rconnection_id\030\t \001(\0132\025.context.Conne" + + "ctionId\"l\n\021MonitorKpiRequest\022!\n\006kpi_id\030\001" + + " \001(\0132\021.monitoring.KpiId\022\033\n\023monitoring_wi" + + "ndow_s\030\002 \001(\002\022\027\n\017sampling_rate_s\030\003 \001(\002\"\273\001" + + "\n\010KpiQuery\022\"\n\007kpi_ids\030\001 \003(\0132\021.monitoring" + + ".KpiId\022\033\n\023monitoring_window_s\030\002 \001(\002\022\026\n\016l" + + "ast_n_samples\030\003 \001(\r\022+\n\017start_timestamp\030\004" + + " \001(\0132\022.context.Timestamp\022)\n\rend_timestam" + + "p\030\005 \001(\0132\022.context.Timestamp\"X\n\006RawKpi\022%\n" + + "\ttimestamp\030\001 \001(\0132\022.context.Timestamp\022\'\n\t" + + "kpi_value\030\002 \001(\0132\024.monitoring.KpiValue\"U\n" + + "\nRawKpiList\022!\n\006kpi_id\030\001 \001(\0132\021.monitoring" + + ".KpiId\022$\n\010raw_kpis\030\002 \003(\0132\022.monitoring.Ra" + + "wKpi\"<\n\013RawKpiTable\022-\n\rraw_kpi_lists\030\001 \003" + + "(\0132\026.monitoring.RawKpiList\"&\n\005KpiId\022\035\n\006k" + + "pi_id\030\001 \001(\0132\r.context.Uuid\"x\n\003Kpi\022!\n\006kpi" + + "_id\030\001 \001(\0132\021.monitoring.KpiId\022%\n\ttimestam" + + "p\030\002 \001(\0132\022.context.Timestamp\022\'\n\tkpi_value" + + "\030\003 \001(\0132\024.monitoring.KpiValue\"\250\001\n\rKpiValu" + + "eRange\022)\n\013kpiMinValue\030\001 \001(\0132\024.monitoring" + + ".KpiValue\022)\n\013kpiMaxValue\030\002 \001(\0132\024.monitor" + + "ing.KpiValue\022\017\n\007inRange\030\003 \001(\010\022\027\n\017include" + + "MinValue\030\004 \001(\010\022\027\n\017includeMaxValue\030\005 \001(\010\"" + + "\241\001\n\010KpiValue\022\022\n\010int32Val\030\001 \001(\005H\000\022\023\n\tuint" + + "32Val\030\002 \001(\rH\000\022\022\n\010int64Val\030\003 \001(\003H\000\022\023\n\tuin" + + "t64Val\030\004 \001(\004H\000\022\022\n\010floatVal\030\005 \001(\002H\000\022\023\n\tst" + + "ringVal\030\006 \001(\tH\000\022\021\n\007boolVal\030\007 \001(\010H\000B\007\n\005va" + + "lue\"\'\n\007KpiList\022\034\n\003kpi\030\001 \003(\0132\017.monitoring" + + ".Kpi\"K\n\021KpiDescriptorList\0226\n\023kpi_descrip" + + "tor_list\030\001 \003(\0132\031.monitoring.KpiDescripto" + + "r\"\362\001\n\016SubsDescriptor\022+\n\007subs_id\030\001 \001(\0132\032." + + "monitoring.SubscriptionID\022!\n\006kpi_id\030\002 \001(" + + "\0132\021.monitoring.KpiId\022\033\n\023sampling_duratio" + + "n_s\030\003 \001(\002\022\033\n\023sampling_interval_s\030\004 \001(\002\022+" + + "\n\017start_timestamp\030\005 \001(\0132\022.context.Timest" + + "amp\022)\n\rend_timestamp\030\006 \001(\0132\022.context.Tim" + + "estamp\"0\n\016SubscriptionID\022\036\n\007subs_id\030\001 \001(" + + "\0132\r.context.Uuid\"b\n\014SubsResponse\022+\n\007subs" + + "_id\030\001 \001(\0132\032.monitoring.SubscriptionID\022%\n" + + "\010kpi_list\030\002 \001(\0132\023.monitoring.KpiList\"?\n\010" + + "SubsList\0223\n\017subs_descriptor\030\001 \003(\0132\032.moni" + + "toring.SubsDescriptor\"\337\001\n\017AlarmDescripto" + + "r\022%\n\010alarm_id\030\001 \001(\0132\023.monitoring.AlarmID" + + "\022\031\n\021alarm_description\030\002 \001(\t\022\014\n\004name\030\003 \001(" + + "\t\022!\n\006kpi_id\030\004 \001(\0132\021.monitoring.KpiId\0222\n\017" + + "kpi_value_range\030\005 \001(\0132\031.monitoring.KpiVa" + + "lueRange\022%\n\ttimestamp\030\006 \001(\0132\022.context.Ti" + + "mestamp\"*\n\007AlarmID\022\037\n\010alarm_id\030\001 \001(\0132\r.c" + + "ontext.Uuid\"}\n\021AlarmSubscription\022%\n\010alar" + + "m_id\030\001 \001(\0132\023.monitoring.AlarmID\022\036\n\026subsc" + + "ription_timeout_s\030\002 \001(\002\022!\n\031subscription_" + + "frequency_ms\030\003 \001(\002\"k\n\rAlarmResponse\022%\n\010a" + + "larm_id\030\001 \001(\0132\023.monitoring.AlarmID\022\014\n\004te" + + "xt\030\002 \001(\t\022%\n\010kpi_list\030\003 \001(\0132\023.monitoring." + + "KpiList\"B\n\tAlarmList\0225\n\020alarm_descriptor" + + "\030\001 \003(\0132\033.monitoring.AlarmDescriptor2\234\t\n\021" + + "MonitoringService\0228\n\006SetKpi\022\031.monitoring" + + ".KpiDescriptor\032\021.monitoring.KpiId\"\000\0220\n\tD" + + "eleteKpi\022\021.monitoring.KpiId\032\016.context.Em" + + "pty\"\000\022B\n\020GetKpiDescriptor\022\021.monitoring.K" + + "piId\032\031.monitoring.KpiDescriptor\"\000\022G\n\024Get" + + "KpiDescriptorList\022\016.context.Empty\032\035.moni" + + "toring.KpiDescriptorList\"\000\022/\n\nIncludeKpi" + + "\022\017.monitoring.Kpi\032\016.context.Empty\"\000\022=\n\nM" + + "onitorKpi\022\035.monitoring.MonitorKpiRequest" + + "\032\016.context.Empty\"\000\022?\n\014QueryKpiData\022\024.mon" + + "itoring.KpiQuery\032\027.monitoring.RawKpiTabl" + + "e\"\000\022N\n\022SetKpiSubscription\022\032.monitoring.S" + + "ubsDescriptor\032\030.monitoring.SubsResponse\"" + "\0000\001\022M\n\021GetSubsDescriptor\022\032.monitoring.Su" + "bscriptionID\032\032.monitoring.SubsDescriptor" + - "\"\000\022<\n\020GetSubscriptions\022\016.context.Empty\032\026" + - ".monitoring.SubsIDList\"\000\022B\n\022DeleteSubscr" + - "iption\022\032.monitoring.SubscriptionID\032\016.con" + - "text.Empty\"\000\022A\n\013SetKpiAlarm\022\033.monitoring" + - ".AlarmDescriptor\032\023.monitoring.AlarmID\"\000\022" + - "6\n\tGetAlarms\022\016.context.Empty\032\027.monitorin" + - "g.AlarmIDList\"\000\022H\n\022GetAlarmDescriptor\022\023." + - "monitoring.AlarmID\032\033.monitoring.AlarmDes" + - "criptor\"\000\022V\n\026GetAlarmResponseStream\022\035.mo" + - "nitoring.AlarmSubscription\032\031.monitoring." + - "AlarmResponse\"\0000\001\0224\n\013DeleteAlarm\022\023.monit" + - "oring.AlarmID\032\016.context.Empty\"\000\0226\n\014GetSt" + - "reamKpi\022\021.monitoring.KpiId\032\017.monitoring." + - "Kpi\"\0000\001\0229\n\rGetInstantKpi\022\021.monitoring.Kp" + - "iId\032\023.monitoring.KpiList\"\000b\006proto3" + "\"\000\022:\n\020GetSubscriptions\022\016.context.Empty\032\024" + + ".monitoring.SubsList\"\000\022B\n\022DeleteSubscrip" + + "tion\022\032.monitoring.SubscriptionID\032\016.conte" + + "xt.Empty\"\000\022A\n\013SetKpiAlarm\022\033.monitoring.A" + + "larmDescriptor\032\023.monitoring.AlarmID\"\000\0224\n" + + "\tGetAlarms\022\016.context.Empty\032\025.monitoring." + + "AlarmList\"\000\022H\n\022GetAlarmDescriptor\022\023.moni" + + "toring.AlarmID\032\033.monitoring.AlarmDescrip" + + "tor\"\000\022V\n\026GetAlarmResponseStream\022\035.monito" + + "ring.AlarmSubscription\032\031.monitoring.Alar" + + "mResponse\"\0000\001\0224\n\013DeleteAlarm\022\023.monitorin" + + "g.AlarmID\032\016.context.Empty\"\000\0226\n\014GetStream" + + "Kpi\022\021.monitoring.KpiId\032\017.monitoring.Kpi\"" + + "\0000\001\0225\n\rGetInstantKpi\022\021.monitoring.KpiId\032" + + "\017.monitoring.Kpi\"\000b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -19395,7 +21468,7 @@ public final class Monitoring { internal_static_monitoring_KpiDescriptor_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_KpiDescriptor_descriptor, - new java.lang.String[] { "KpiId", "KpiDescription", "KpiIdList", "KpiSampleType", "DeviceId", "EndpointId", "ServiceId", "SliceId", }); + new java.lang.String[] { "KpiId", "KpiDescription", "KpiIdList", "KpiSampleType", "DeviceId", "EndpointId", "ServiceId", "SliceId", "ConnectionId", }); internal_static_monitoring_MonitorKpiRequest_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable = new @@ -19407,97 +21480,115 @@ public final class Monitoring { internal_static_monitoring_KpiQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_KpiQuery_descriptor, - new java.lang.String[] { "KpiId", "MonitoringWindowS", "SamplingRateS", "LastNSamples", "StartTimestamp", "EndTimestamp", }); - internal_static_monitoring_KpiId_descriptor = + new java.lang.String[] { "KpiIds", "MonitoringWindowS", "LastNSamples", "StartTimestamp", "EndTimestamp", }); + internal_static_monitoring_RawKpi_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_monitoring_RawKpi_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_monitoring_RawKpi_descriptor, + new java.lang.String[] { "Timestamp", "KpiValue", }); + internal_static_monitoring_RawKpiList_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_monitoring_RawKpiList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_monitoring_RawKpiList_descriptor, + new java.lang.String[] { "KpiId", "RawKpis", }); + internal_static_monitoring_RawKpiTable_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_monitoring_RawKpiTable_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_monitoring_RawKpiTable_descriptor, + new java.lang.String[] { "RawKpiLists", }); + internal_static_monitoring_KpiId_descriptor = + getDescriptor().getMessageTypes().get(6); internal_static_monitoring_KpiId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_KpiId_descriptor, new java.lang.String[] { "KpiId", }); internal_static_monitoring_Kpi_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(7); internal_static_monitoring_Kpi_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_Kpi_descriptor, new java.lang.String[] { "KpiId", "Timestamp", "KpiValue", }); internal_static_monitoring_KpiValueRange_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(8); internal_static_monitoring_KpiValueRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_KpiValueRange_descriptor, new java.lang.String[] { "KpiMinValue", "KpiMaxValue", "InRange", "IncludeMinValue", "IncludeMaxValue", }); internal_static_monitoring_KpiValue_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(9); internal_static_monitoring_KpiValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_KpiValue_descriptor, new java.lang.String[] { "Int32Val", "Uint32Val", "Int64Val", "Uint64Val", "FloatVal", "StringVal", "BoolVal", "Value", }); internal_static_monitoring_KpiList_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(10); internal_static_monitoring_KpiList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_KpiList_descriptor, - new java.lang.String[] { "KpiList", }); + new java.lang.String[] { "Kpi", }); internal_static_monitoring_KpiDescriptorList_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(11); internal_static_monitoring_KpiDescriptorList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_KpiDescriptorList_descriptor, new java.lang.String[] { "KpiDescriptorList", }); internal_static_monitoring_SubsDescriptor_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(12); internal_static_monitoring_SubsDescriptor_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_SubsDescriptor_descriptor, new java.lang.String[] { "SubsId", "KpiId", "SamplingDurationS", "SamplingIntervalS", "StartTimestamp", "EndTimestamp", }); internal_static_monitoring_SubscriptionID_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(13); internal_static_monitoring_SubscriptionID_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_SubscriptionID_descriptor, new java.lang.String[] { "SubsId", }); internal_static_monitoring_SubsResponse_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(14); internal_static_monitoring_SubsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_SubsResponse_descriptor, new java.lang.String[] { "SubsId", "KpiList", }); - internal_static_monitoring_SubsIDList_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_monitoring_SubsIDList_fieldAccessorTable = new + internal_static_monitoring_SubsList_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_monitoring_SubsList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_SubsIDList_descriptor, - new java.lang.String[] { "SubsList", }); + internal_static_monitoring_SubsList_descriptor, + new java.lang.String[] { "SubsDescriptor", }); internal_static_monitoring_AlarmDescriptor_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(16); internal_static_monitoring_AlarmDescriptor_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_AlarmDescriptor_descriptor, new java.lang.String[] { "AlarmId", "AlarmDescription", "Name", "KpiId", "KpiValueRange", "Timestamp", }); internal_static_monitoring_AlarmID_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(17); internal_static_monitoring_AlarmID_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_AlarmID_descriptor, new java.lang.String[] { "AlarmId", }); internal_static_monitoring_AlarmSubscription_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(18); internal_static_monitoring_AlarmSubscription_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_AlarmSubscription_descriptor, - new java.lang.String[] { "AlarmID", "SubscriptionTimeoutS", "SubscriptionFrequencyMs", }); + new java.lang.String[] { "AlarmId", "SubscriptionTimeoutS", "SubscriptionFrequencyMs", }); internal_static_monitoring_AlarmResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(19); internal_static_monitoring_AlarmResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_monitoring_AlarmResponse_descriptor, - new java.lang.String[] { "AlarmId", "Text", "KpiValue", "Timestamp", }); - internal_static_monitoring_AlarmIDList_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_monitoring_AlarmIDList_fieldAccessorTable = new + new java.lang.String[] { "AlarmId", "Text", "KpiList", }); + internal_static_monitoring_AlarmList_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_monitoring_AlarmList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_AlarmIDList_descriptor, - new java.lang.String[] { "AlarmList", }); + internal_static_monitoring_AlarmList_descriptor, + new java.lang.String[] { "AlarmDescriptor", }); context.ContextOuterClass.getDescriptor(); kpi_sample_types.KpiSampleTypes.getDescriptor(); } diff --git a/src/automation/target/generated-sources/grpc/monitoring/MonitoringService.java b/src/automation/target/generated-sources/grpc/monitoring/MonitoringService.java index 6372600680d57d0b351e7dd67b88c84f9d8e8cff..0ce30559b2c0a1bb6236431482d6b99b82cf0842 100644 --- a/src/automation/target/generated-sources/grpc/monitoring/MonitoringService.java +++ b/src/automation/target/generated-sources/grpc/monitoring/MonitoringService.java @@ -20,26 +20,26 @@ public interface MonitoringService extends MutinyService { io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> monitorKpi(monitoring.Monitoring.MonitorKpiRequest request); - io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiList> queryKpiData(monitoring.Monitoring.KpiQuery request); + io.smallrye.mutiny.Uni<monitoring.Monitoring.RawKpiTable> queryKpiData(monitoring.Monitoring.KpiQuery request); io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsDescriptor> getSubsDescriptor(monitoring.Monitoring.SubscriptionID request); - io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsIDList> getSubscriptions(context.ContextOuterClass.Empty request); + io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsList> getSubscriptions(context.ContextOuterClass.Empty request); io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> deleteSubscription(monitoring.Monitoring.SubscriptionID request); io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmID> setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request); - io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmIDList> getAlarms(context.ContextOuterClass.Empty request); + io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmList> getAlarms(context.ContextOuterClass.Empty request); io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmDescriptor> getAlarmDescriptor(monitoring.Monitoring.AlarmID request); io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> deleteAlarm(monitoring.Monitoring.AlarmID request); - io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiList> getInstantKpi(monitoring.Monitoring.KpiId request); + io.smallrye.mutiny.Uni<monitoring.Monitoring.Kpi> getInstantKpi(monitoring.Monitoring.KpiId request); - io.smallrye.mutiny.Multi<monitoring.Monitoring.KpiList> setKpiSubscription(monitoring.Monitoring.SubsDescriptor request); + io.smallrye.mutiny.Multi<monitoring.Monitoring.SubsResponse> setKpiSubscription(monitoring.Monitoring.SubsDescriptor request); io.smallrye.mutiny.Multi<monitoring.Monitoring.AlarmResponse> getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request); diff --git a/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java b/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java index 21f7f48acd6b6870584133dc3d665f681e78cf5e..cbc984e7132bdbf22c9b99a510106c5c6f4cbda7 100644 --- a/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java +++ b/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java @@ -64,7 +64,7 @@ public class MonitoringServiceBean extends MutinyMonitoringServiceGrpc.Monitorin } } @Override - public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiList> queryKpiData(monitoring.Monitoring.KpiQuery request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.RawKpiTable> queryKpiData(monitoring.Monitoring.KpiQuery request) { try { return delegate.queryKpiData(request); } catch (UnsupportedOperationException e) { @@ -80,7 +80,7 @@ public class MonitoringServiceBean extends MutinyMonitoringServiceGrpc.Monitorin } } @Override - public io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsIDList> getSubscriptions(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsList> getSubscriptions(context.ContextOuterClass.Empty request) { try { return delegate.getSubscriptions(request); } catch (UnsupportedOperationException e) { @@ -104,7 +104,7 @@ public class MonitoringServiceBean extends MutinyMonitoringServiceGrpc.Monitorin } } @Override - public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmIDList> getAlarms(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmList> getAlarms(context.ContextOuterClass.Empty request) { try { return delegate.getAlarms(request); } catch (UnsupportedOperationException e) { @@ -128,7 +128,7 @@ public class MonitoringServiceBean extends MutinyMonitoringServiceGrpc.Monitorin } } @Override - public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiList> getInstantKpi(monitoring.Monitoring.KpiId request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.Kpi> getInstantKpi(monitoring.Monitoring.KpiId request) { try { return delegate.getInstantKpi(request); } catch (UnsupportedOperationException e) { @@ -137,7 +137,7 @@ public class MonitoringServiceBean extends MutinyMonitoringServiceGrpc.Monitorin } @Override - public io.smallrye.mutiny.Multi<monitoring.Monitoring.KpiList> setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { + public io.smallrye.mutiny.Multi<monitoring.Monitoring.SubsResponse> setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { try { return delegate.setKpiSubscription(request); } catch (UnsupportedOperationException e) { diff --git a/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java b/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java index 6b6dc38645931ad94287b4151019c3b42a1c098d..0e8ff5d1b8929694b49548984cd7d53f9c8f68a4 100644 --- a/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java +++ b/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java @@ -45,7 +45,7 @@ public class MonitoringServiceClient implements MonitoringService, MutinyClient< return stub.monitorKpi(request); } @Override - public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiList> queryKpiData(monitoring.Monitoring.KpiQuery request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.RawKpiTable> queryKpiData(monitoring.Monitoring.KpiQuery request) { return stub.queryKpiData(request); } @Override @@ -53,7 +53,7 @@ public class MonitoringServiceClient implements MonitoringService, MutinyClient< return stub.getSubsDescriptor(request); } @Override - public io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsIDList> getSubscriptions(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsList> getSubscriptions(context.ContextOuterClass.Empty request) { return stub.getSubscriptions(request); } @Override @@ -65,7 +65,7 @@ public class MonitoringServiceClient implements MonitoringService, MutinyClient< return stub.setKpiAlarm(request); } @Override - public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmIDList> getAlarms(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmList> getAlarms(context.ContextOuterClass.Empty request) { return stub.getAlarms(request); } @Override @@ -77,12 +77,12 @@ public class MonitoringServiceClient implements MonitoringService, MutinyClient< return stub.deleteAlarm(request); } @Override - public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiList> getInstantKpi(monitoring.Monitoring.KpiId request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.Kpi> getInstantKpi(monitoring.Monitoring.KpiId request) { return stub.getInstantKpi(request); } @Override - public io.smallrye.mutiny.Multi<monitoring.Monitoring.KpiList> setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { + public io.smallrye.mutiny.Multi<monitoring.Monitoring.SubsResponse> setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { return stub.setKpiSubscription(request); } diff --git a/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java b/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java index fe92a7814166b65b12db5d50bb4baaf525c59146..c5f55b3b44c03ea8f5377ce11e3c3e547da5ef06 100644 --- a/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java +++ b/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java @@ -201,28 +201,28 @@ public final class MonitoringServiceGrpc { } private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.KpiQuery, - monitoring.Monitoring.KpiList> getQueryKpiDataMethod; + monitoring.Monitoring.RawKpiTable> getQueryKpiDataMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "QueryKpiData", requestType = monitoring.Monitoring.KpiQuery.class, - responseType = monitoring.Monitoring.KpiList.class, + responseType = monitoring.Monitoring.RawKpiTable.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<monitoring.Monitoring.KpiQuery, - monitoring.Monitoring.KpiList> getQueryKpiDataMethod() { - io.grpc.MethodDescriptor<monitoring.Monitoring.KpiQuery, monitoring.Monitoring.KpiList> getQueryKpiDataMethod; + monitoring.Monitoring.RawKpiTable> getQueryKpiDataMethod() { + io.grpc.MethodDescriptor<monitoring.Monitoring.KpiQuery, monitoring.Monitoring.RawKpiTable> getQueryKpiDataMethod; if ((getQueryKpiDataMethod = MonitoringServiceGrpc.getQueryKpiDataMethod) == null) { synchronized (MonitoringServiceGrpc.class) { if ((getQueryKpiDataMethod = MonitoringServiceGrpc.getQueryKpiDataMethod) == null) { MonitoringServiceGrpc.getQueryKpiDataMethod = getQueryKpiDataMethod = - io.grpc.MethodDescriptor.<monitoring.Monitoring.KpiQuery, monitoring.Monitoring.KpiList>newBuilder() + io.grpc.MethodDescriptor.<monitoring.Monitoring.KpiQuery, monitoring.Monitoring.RawKpiTable>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryKpiData")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( monitoring.Monitoring.KpiQuery.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiList.getDefaultInstance())) + monitoring.Monitoring.RawKpiTable.getDefaultInstance())) .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("QueryKpiData")) .build(); } @@ -232,28 +232,28 @@ public final class MonitoringServiceGrpc { } private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.SubsDescriptor, - monitoring.Monitoring.KpiList> getSetKpiSubscriptionMethod; + monitoring.Monitoring.SubsResponse> getSetKpiSubscriptionMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "SetKpiSubscription", requestType = monitoring.Monitoring.SubsDescriptor.class, - responseType = monitoring.Monitoring.KpiList.class, + responseType = monitoring.Monitoring.SubsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) public static io.grpc.MethodDescriptor<monitoring.Monitoring.SubsDescriptor, - monitoring.Monitoring.KpiList> getSetKpiSubscriptionMethod() { - io.grpc.MethodDescriptor<monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.KpiList> getSetKpiSubscriptionMethod; + monitoring.Monitoring.SubsResponse> getSetKpiSubscriptionMethod() { + io.grpc.MethodDescriptor<monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsResponse> getSetKpiSubscriptionMethod; if ((getSetKpiSubscriptionMethod = MonitoringServiceGrpc.getSetKpiSubscriptionMethod) == null) { synchronized (MonitoringServiceGrpc.class) { if ((getSetKpiSubscriptionMethod = MonitoringServiceGrpc.getSetKpiSubscriptionMethod) == null) { MonitoringServiceGrpc.getSetKpiSubscriptionMethod = getSetKpiSubscriptionMethod = - io.grpc.MethodDescriptor.<monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.KpiList>newBuilder() + io.grpc.MethodDescriptor.<monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpiSubscription")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( monitoring.Monitoring.SubsDescriptor.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiList.getDefaultInstance())) + monitoring.Monitoring.SubsResponse.getDefaultInstance())) .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpiSubscription")) .build(); } @@ -294,28 +294,28 @@ public final class MonitoringServiceGrpc { } private static volatile io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, - monitoring.Monitoring.SubsIDList> getGetSubscriptionsMethod; + monitoring.Monitoring.SubsList> getGetSubscriptionsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetSubscriptions", requestType = context.ContextOuterClass.Empty.class, - responseType = monitoring.Monitoring.SubsIDList.class, + responseType = monitoring.Monitoring.SubsList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, - monitoring.Monitoring.SubsIDList> getGetSubscriptionsMethod() { - io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, monitoring.Monitoring.SubsIDList> getGetSubscriptionsMethod; + monitoring.Monitoring.SubsList> getGetSubscriptionsMethod() { + io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, monitoring.Monitoring.SubsList> getGetSubscriptionsMethod; if ((getGetSubscriptionsMethod = MonitoringServiceGrpc.getGetSubscriptionsMethod) == null) { synchronized (MonitoringServiceGrpc.class) { if ((getGetSubscriptionsMethod = MonitoringServiceGrpc.getGetSubscriptionsMethod) == null) { MonitoringServiceGrpc.getGetSubscriptionsMethod = getGetSubscriptionsMethod = - io.grpc.MethodDescriptor.<context.ContextOuterClass.Empty, monitoring.Monitoring.SubsIDList>newBuilder() + io.grpc.MethodDescriptor.<context.ContextOuterClass.Empty, monitoring.Monitoring.SubsList>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubscriptions")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( context.ContextOuterClass.Empty.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubsIDList.getDefaultInstance())) + monitoring.Monitoring.SubsList.getDefaultInstance())) .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetSubscriptions")) .build(); } @@ -387,28 +387,28 @@ public final class MonitoringServiceGrpc { } private static volatile io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, - monitoring.Monitoring.AlarmIDList> getGetAlarmsMethod; + monitoring.Monitoring.AlarmList> getGetAlarmsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetAlarms", requestType = context.ContextOuterClass.Empty.class, - responseType = monitoring.Monitoring.AlarmIDList.class, + responseType = monitoring.Monitoring.AlarmList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, - monitoring.Monitoring.AlarmIDList> getGetAlarmsMethod() { - io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, monitoring.Monitoring.AlarmIDList> getGetAlarmsMethod; + monitoring.Monitoring.AlarmList> getGetAlarmsMethod() { + io.grpc.MethodDescriptor<context.ContextOuterClass.Empty, monitoring.Monitoring.AlarmList> getGetAlarmsMethod; if ((getGetAlarmsMethod = MonitoringServiceGrpc.getGetAlarmsMethod) == null) { synchronized (MonitoringServiceGrpc.class) { if ((getGetAlarmsMethod = MonitoringServiceGrpc.getGetAlarmsMethod) == null) { MonitoringServiceGrpc.getGetAlarmsMethod = getGetAlarmsMethod = - io.grpc.MethodDescriptor.<context.ContextOuterClass.Empty, monitoring.Monitoring.AlarmIDList>newBuilder() + io.grpc.MethodDescriptor.<context.ContextOuterClass.Empty, monitoring.Monitoring.AlarmList>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarms")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( context.ContextOuterClass.Empty.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmIDList.getDefaultInstance())) + monitoring.Monitoring.AlarmList.getDefaultInstance())) .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarms")) .build(); } @@ -542,28 +542,28 @@ public final class MonitoringServiceGrpc { } private static volatile io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId, - monitoring.Monitoring.KpiList> getGetInstantKpiMethod; + monitoring.Monitoring.Kpi> getGetInstantKpiMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetInstantKpi", requestType = monitoring.Monitoring.KpiId.class, - responseType = monitoring.Monitoring.KpiList.class, + responseType = monitoring.Monitoring.Kpi.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId, - monitoring.Monitoring.KpiList> getGetInstantKpiMethod() { - io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiList> getGetInstantKpiMethod; + monitoring.Monitoring.Kpi> getGetInstantKpiMethod() { + io.grpc.MethodDescriptor<monitoring.Monitoring.KpiId, monitoring.Monitoring.Kpi> getGetInstantKpiMethod; if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) { synchronized (MonitoringServiceGrpc.class) { if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) { MonitoringServiceGrpc.getGetInstantKpiMethod = getGetInstantKpiMethod = - io.grpc.MethodDescriptor.<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiList>newBuilder() + io.grpc.MethodDescriptor.<monitoring.Monitoring.KpiId, monitoring.Monitoring.Kpi>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstantKpi")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( monitoring.Monitoring.KpiId.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiList.getDefaultInstance())) + monitoring.Monitoring.Kpi.getDefaultInstance())) .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetInstantKpi")) .build(); } @@ -665,14 +665,14 @@ public final class MonitoringServiceGrpc { /** */ public void queryKpiData(monitoring.Monitoring.KpiQuery request, - io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiList> responseObserver) { + io.grpc.stub.StreamObserver<monitoring.Monitoring.RawKpiTable> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryKpiDataMethod(), responseObserver); } /** */ public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, - io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiList> responseObserver) { + io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiSubscriptionMethod(), responseObserver); } @@ -686,7 +686,7 @@ public final class MonitoringServiceGrpc { /** */ public void getSubscriptions(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsIDList> responseObserver) { + io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubscriptionsMethod(), responseObserver); } @@ -707,7 +707,7 @@ public final class MonitoringServiceGrpc { /** */ public void getAlarms(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmIDList> responseObserver) { + io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmsMethod(), responseObserver); } @@ -742,7 +742,7 @@ public final class MonitoringServiceGrpc { /** */ public void getInstantKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiList> responseObserver) { + io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstantKpiMethod(), responseObserver); } @@ -795,14 +795,14 @@ public final class MonitoringServiceGrpc { io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< monitoring.Monitoring.KpiQuery, - monitoring.Monitoring.KpiList>( + monitoring.Monitoring.RawKpiTable>( this, METHODID_QUERY_KPI_DATA))) .addMethod( getSetKpiSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< monitoring.Monitoring.SubsDescriptor, - monitoring.Monitoring.KpiList>( + monitoring.Monitoring.SubsResponse>( this, METHODID_SET_KPI_SUBSCRIPTION))) .addMethod( getGetSubsDescriptorMethod(), @@ -816,7 +816,7 @@ public final class MonitoringServiceGrpc { io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< context.ContextOuterClass.Empty, - monitoring.Monitoring.SubsIDList>( + monitoring.Monitoring.SubsList>( this, METHODID_GET_SUBSCRIPTIONS))) .addMethod( getDeleteSubscriptionMethod(), @@ -837,7 +837,7 @@ public final class MonitoringServiceGrpc { io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< context.ContextOuterClass.Empty, - monitoring.Monitoring.AlarmIDList>( + monitoring.Monitoring.AlarmList>( this, METHODID_GET_ALARMS))) .addMethod( getGetAlarmDescriptorMethod(), @@ -872,7 +872,7 @@ public final class MonitoringServiceGrpc { io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< monitoring.Monitoring.KpiId, - monitoring.Monitoring.KpiList>( + monitoring.Monitoring.Kpi>( this, METHODID_GET_INSTANT_KPI))) .build(); } @@ -943,7 +943,7 @@ public final class MonitoringServiceGrpc { /** */ public void queryKpiData(monitoring.Monitoring.KpiQuery request, - io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiList> responseObserver) { + io.grpc.stub.StreamObserver<monitoring.Monitoring.RawKpiTable> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getQueryKpiDataMethod(), getCallOptions()), request, responseObserver); } @@ -951,7 +951,7 @@ public final class MonitoringServiceGrpc { /** */ public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, - io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiList> responseObserver) { + io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncServerStreamingCall( getChannel().newCall(getSetKpiSubscriptionMethod(), getCallOptions()), request, responseObserver); } @@ -967,7 +967,7 @@ public final class MonitoringServiceGrpc { /** */ public void getSubscriptions(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsIDList> responseObserver) { + io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsList> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request, responseObserver); } @@ -991,7 +991,7 @@ public final class MonitoringServiceGrpc { /** */ public void getAlarms(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmIDList> responseObserver) { + io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmList> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request, responseObserver); } @@ -1031,7 +1031,7 @@ public final class MonitoringServiceGrpc { /** */ public void getInstantKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiList> responseObserver) { + io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request, responseObserver); } @@ -1095,14 +1095,14 @@ public final class MonitoringServiceGrpc { /** */ - public monitoring.Monitoring.KpiList queryKpiData(monitoring.Monitoring.KpiQuery request) { + public monitoring.Monitoring.RawKpiTable queryKpiData(monitoring.Monitoring.KpiQuery request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getQueryKpiDataMethod(), getCallOptions(), request); } /** */ - public java.util.Iterator<monitoring.Monitoring.KpiList> setKpiSubscription( + public java.util.Iterator<monitoring.Monitoring.SubsResponse> setKpiSubscription( monitoring.Monitoring.SubsDescriptor request) { return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getSetKpiSubscriptionMethod(), getCallOptions(), request); @@ -1117,7 +1117,7 @@ public final class MonitoringServiceGrpc { /** */ - public monitoring.Monitoring.SubsIDList getSubscriptions(context.ContextOuterClass.Empty request) { + public monitoring.Monitoring.SubsList getSubscriptions(context.ContextOuterClass.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetSubscriptionsMethod(), getCallOptions(), request); } @@ -1138,7 +1138,7 @@ public final class MonitoringServiceGrpc { /** */ - public monitoring.Monitoring.AlarmIDList getAlarms(context.ContextOuterClass.Empty request) { + public monitoring.Monitoring.AlarmList getAlarms(context.ContextOuterClass.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetAlarmsMethod(), getCallOptions(), request); } @@ -1175,7 +1175,7 @@ public final class MonitoringServiceGrpc { /** */ - public monitoring.Monitoring.KpiList getInstantKpi(monitoring.Monitoring.KpiId request) { + public monitoring.Monitoring.Kpi getInstantKpi(monitoring.Monitoring.KpiId request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetInstantKpiMethod(), getCallOptions(), request); } @@ -1245,7 +1245,7 @@ public final class MonitoringServiceGrpc { /** */ - public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.KpiList> queryKpiData( + public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.RawKpiTable> queryKpiData( monitoring.Monitoring.KpiQuery request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getQueryKpiDataMethod(), getCallOptions()), request); @@ -1261,7 +1261,7 @@ public final class MonitoringServiceGrpc { /** */ - public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.SubsIDList> getSubscriptions( + public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.SubsList> getSubscriptions( context.ContextOuterClass.Empty request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request); @@ -1285,7 +1285,7 @@ public final class MonitoringServiceGrpc { /** */ - public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.AlarmIDList> getAlarms( + public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.AlarmList> getAlarms( context.ContextOuterClass.Empty request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request); @@ -1309,7 +1309,7 @@ public final class MonitoringServiceGrpc { /** */ - public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.KpiList> getInstantKpi( + public com.google.common.util.concurrent.ListenableFuture<monitoring.Monitoring.Kpi> getInstantKpi( monitoring.Monitoring.KpiId request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request); @@ -1378,11 +1378,11 @@ public final class MonitoringServiceGrpc { break; case METHODID_QUERY_KPI_DATA: serviceImpl.queryKpiData((monitoring.Monitoring.KpiQuery) request, - (io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiList>) responseObserver); + (io.grpc.stub.StreamObserver<monitoring.Monitoring.RawKpiTable>) responseObserver); break; case METHODID_SET_KPI_SUBSCRIPTION: serviceImpl.setKpiSubscription((monitoring.Monitoring.SubsDescriptor) request, - (io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiList>) responseObserver); + (io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsResponse>) responseObserver); break; case METHODID_GET_SUBS_DESCRIPTOR: serviceImpl.getSubsDescriptor((monitoring.Monitoring.SubscriptionID) request, @@ -1390,7 +1390,7 @@ public final class MonitoringServiceGrpc { break; case METHODID_GET_SUBSCRIPTIONS: serviceImpl.getSubscriptions((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsIDList>) responseObserver); + (io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsList>) responseObserver); break; case METHODID_DELETE_SUBSCRIPTION: serviceImpl.deleteSubscription((monitoring.Monitoring.SubscriptionID) request, @@ -1402,7 +1402,7 @@ public final class MonitoringServiceGrpc { break; case METHODID_GET_ALARMS: serviceImpl.getAlarms((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmIDList>) responseObserver); + (io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmList>) responseObserver); break; case METHODID_GET_ALARM_DESCRIPTOR: serviceImpl.getAlarmDescriptor((monitoring.Monitoring.AlarmID) request, @@ -1422,7 +1422,7 @@ public final class MonitoringServiceGrpc { break; case METHODID_GET_INSTANT_KPI: serviceImpl.getInstantKpi((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiList>) responseObserver); + (io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi>) responseObserver); break; default: throw new AssertionError(); diff --git a/src/automation/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java b/src/automation/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java index d663b38c923a2b5401642db4e697e16be4720f05..f045ecc7ed434ba90bdfda065f18e0d839850a76 100644 --- a/src/automation/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java +++ b/src/automation/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java @@ -66,7 +66,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiList> queryKpiData(monitoring.Monitoring.KpiQuery request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.RawKpiTable> queryKpiData(monitoring.Monitoring.KpiQuery request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::queryKpiData); } @@ -76,7 +76,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsIDList> getSubscriptions(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsList> getSubscriptions(context.ContextOuterClass.Empty request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getSubscriptions); } @@ -91,7 +91,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmIDList> getAlarms(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmList> getAlarms(context.ContextOuterClass.Empty request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getAlarms); } @@ -106,12 +106,12 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiList> getInstantKpi(monitoring.Monitoring.KpiId request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.Kpi> getInstantKpi(monitoring.Monitoring.KpiId request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getInstantKpi); } - public io.smallrye.mutiny.Multi<monitoring.Monitoring.KpiList> setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { + public io.smallrye.mutiny.Multi<monitoring.Monitoring.SubsResponse> setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::setKpiSubscription); } @@ -173,7 +173,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiList> queryKpiData(monitoring.Monitoring.KpiQuery request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.RawKpiTable> queryKpiData(monitoring.Monitoring.KpiQuery request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @@ -183,7 +183,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsIDList> getSubscriptions(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.SubsList> getSubscriptions(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @@ -198,7 +198,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmIDList> getAlarms(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.AlarmList> getAlarms(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @@ -213,12 +213,12 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim } - public io.smallrye.mutiny.Uni<monitoring.Monitoring.KpiList> getInstantKpi(monitoring.Monitoring.KpiId request) { + public io.smallrye.mutiny.Uni<monitoring.Monitoring.Kpi> getInstantKpi(monitoring.Monitoring.KpiId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi<monitoring.Monitoring.KpiList> setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { + public io.smallrye.mutiny.Multi<monitoring.Monitoring.SubsResponse> setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @@ -281,14 +281,14 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim asyncUnaryCall( new MethodHandlers< monitoring.Monitoring.KpiQuery, - monitoring.Monitoring.KpiList>( + monitoring.Monitoring.RawKpiTable>( this, METHODID_QUERY_KPI_DATA, compression))) .addMethod( monitoring.MonitoringServiceGrpc.getSetKpiSubscriptionMethod(), asyncServerStreamingCall( new MethodHandlers< monitoring.Monitoring.SubsDescriptor, - monitoring.Monitoring.KpiList>( + monitoring.Monitoring.SubsResponse>( this, METHODID_SET_KPI_SUBSCRIPTION, compression))) .addMethod( monitoring.MonitoringServiceGrpc.getGetSubsDescriptorMethod(), @@ -302,7 +302,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim asyncUnaryCall( new MethodHandlers< context.ContextOuterClass.Empty, - monitoring.Monitoring.SubsIDList>( + monitoring.Monitoring.SubsList>( this, METHODID_GET_SUBSCRIPTIONS, compression))) .addMethod( monitoring.MonitoringServiceGrpc.getDeleteSubscriptionMethod(), @@ -323,7 +323,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim asyncUnaryCall( new MethodHandlers< context.ContextOuterClass.Empty, - monitoring.Monitoring.AlarmIDList>( + monitoring.Monitoring.AlarmList>( this, METHODID_GET_ALARMS, compression))) .addMethod( monitoring.MonitoringServiceGrpc.getGetAlarmDescriptorMethod(), @@ -358,7 +358,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim asyncUnaryCall( new MethodHandlers< monitoring.Monitoring.KpiId, - monitoring.Monitoring.KpiList>( + monitoring.Monitoring.Kpi>( this, METHODID_GET_INSTANT_KPI, compression))) .build(); } @@ -440,13 +440,13 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim break; case METHODID_QUERY_KPI_DATA: io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiQuery) request, - (io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiList>) responseObserver, + (io.grpc.stub.StreamObserver<monitoring.Monitoring.RawKpiTable>) responseObserver, compression, serviceImpl::queryKpiData); break; case METHODID_SET_KPI_SUBSCRIPTION: io.quarkus.grpc.runtime.ServerCalls.oneToMany((monitoring.Monitoring.SubsDescriptor) request, - (io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiList>) responseObserver, + (io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsResponse>) responseObserver, compression, serviceImpl::setKpiSubscription); break; @@ -458,7 +458,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim break; case METHODID_GET_SUBSCRIPTIONS: io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsIDList>) responseObserver, + (io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsList>) responseObserver, compression, serviceImpl::getSubscriptions); break; @@ -476,7 +476,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim break; case METHODID_GET_ALARMS: io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmIDList>) responseObserver, + (io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmList>) responseObserver, compression, serviceImpl::getAlarms); break; @@ -506,7 +506,7 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim break; case METHODID_GET_INSTANT_KPI: io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiList>) responseObserver, + (io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi>) responseObserver, compression, serviceImpl::getInstantKpi); break; diff --git a/src/common/Constants.py b/src/common/Constants.py index 9f015b8c737d4c16c6ceaf72a01afd4a7546823d..055267191e46745a76f59becc4418392f111e96b 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -20,7 +20,7 @@ DEFAULT_LOG_LEVEL = logging.WARNING # Default gRPC server settings DEFAULT_GRPC_BIND_ADDRESS = '0.0.0.0' -DEFAULT_GRPC_MAX_WORKERS = 10 +DEFAULT_GRPC_MAX_WORKERS = 200 DEFAULT_GRPC_GRACE_PERIOD = 60 # Default HTTP server settings diff --git a/src/common/method_wrappers/Decorator.py b/src/common/method_wrappers/Decorator.py new file mode 100644 index 0000000000000000000000000000000000000000..7ee2a919e10f25104d0fa77caaf8bafa11c2b30f --- /dev/null +++ b/src/common/method_wrappers/Decorator.py @@ -0,0 +1,132 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import grpc, logging, threading +from enum import Enum +from typing import Dict, Tuple +from prometheus_client import Counter, Histogram +from prometheus_client.metrics import MetricWrapperBase, INF +from common.tools.grpc.Tools import grpc_message_to_json_string +from .ServiceExceptions import ServiceException + +class MetricTypeEnum(Enum): + COUNTER_STARTED = 'tfs_{component:s}_{sub_module:s}_{method:s}_counter_requests_started' + COUNTER_COMPLETED = 'tfs_{component:s}_{sub_module:s}_{method:s}_counter_requests_completed' + COUNTER_FAILED = 'tfs_{component:s}_{sub_module:s}_{method:s}_counter_requests_failed' + HISTOGRAM_DURATION = 'tfs_{component:s}_{sub_module:s}_{method:s}_histogram_duration' + +METRIC_TO_CLASS_PARAMS = { + MetricTypeEnum.COUNTER_STARTED : (Counter, {}), + MetricTypeEnum.COUNTER_COMPLETED : (Counter, {}), + MetricTypeEnum.COUNTER_FAILED : (Counter, {}), + MetricTypeEnum.HISTOGRAM_DURATION: (Histogram, { + 'buckets': ( + # .005, .01, .025, .05, .075, .1, .25, .5, .75, 1.0, INF + 0.0010, 0.0025, 0.0050, 0.0075, + 0.0100, 0.0250, 0.0500, 0.0750, + 0.1000, 0.2500, 0.5000, 0.7500, + 1.0000, 2.5000, 5.0000, 7.5000, + INF) + }) +} + +class MetricsPool: + lock = threading.Lock() + metrics : Dict[str, MetricWrapperBase] = dict() + + def __init__( + self, component : str, sub_module : str, labels : Dict[str, str] = {}, + default_metric_params : Dict[MetricTypeEnum, Dict] = dict() + ) -> None: + self._component = component + self._sub_module = sub_module + self._labels = labels + self._default_metric_params = default_metric_params + + def get_or_create(self, method : str, metric_type : MetricTypeEnum, **metric_params) -> MetricWrapperBase: + metric_name = str(metric_type.value).format( + component=self._component, sub_module=self._sub_module, method=method).upper() + with MetricsPool.lock: + if metric_name not in MetricsPool.metrics: + metric_tuple : Tuple[MetricWrapperBase, Dict] = METRIC_TO_CLASS_PARAMS.get(metric_type) + metric_class, default_metric_params = metric_tuple + if len(metric_params) == 0: metric_params = self._default_metric_params.get(metric_type, {}) + if len(metric_params) == 0: metric_params = default_metric_params + labels = sorted(self._labels.keys()) + MetricsPool.metrics[metric_name] = metric_class(metric_name.lower(), '', labels, **metric_params) + return MetricsPool.metrics[metric_name] + + def get_metrics( + self, method : str + ) -> Tuple[MetricWrapperBase, MetricWrapperBase, MetricWrapperBase, MetricWrapperBase]: + histogram_duration : Histogram = self.get_or_create(method, MetricTypeEnum.HISTOGRAM_DURATION) + counter_started : Counter = self.get_or_create(method, MetricTypeEnum.COUNTER_STARTED) + counter_completed : Counter = self.get_or_create(method, MetricTypeEnum.COUNTER_COMPLETED) + counter_failed : Counter = self.get_or_create(method, MetricTypeEnum.COUNTER_FAILED) + + if len(self._labels) > 0: + histogram_duration = histogram_duration.labels(**(self._labels)) + counter_started = counter_started.labels(**(self._labels)) + counter_completed = counter_completed.labels(**(self._labels)) + counter_failed = counter_failed.labels(**(self._labels)) + + return histogram_duration, counter_started, counter_completed, counter_failed + +def metered_subclass_method(metrics_pool : MetricsPool): + def outer_wrapper(func): + metrics = metrics_pool.get_metrics(func.__name__) + histogram_duration, counter_started, counter_completed, counter_failed = metrics + + @histogram_duration.time() + def inner_wrapper(self, *args, **kwargs): + counter_started.inc() + try: + reply = func(self, *args, **kwargs) + counter_completed.inc() + return reply + except KeyboardInterrupt: # pylint: disable=try-except-raise + raise + except Exception: # pylint: disable=broad-except + counter_failed.inc() + + return inner_wrapper + return outer_wrapper + +def safe_and_metered_rpc_method(metrics_pool : MetricsPool, logger : logging.Logger): + def outer_wrapper(func): + method_name = func.__name__ + metrics = metrics_pool.get_metrics(method_name) + histogram_duration, counter_started, counter_completed, counter_failed = metrics + + @histogram_duration.time() + def inner_wrapper(self, request, grpc_context : grpc.ServicerContext): + counter_started.inc() + try: + logger.debug('{:s} request: {:s}'.format(method_name, grpc_message_to_json_string(request))) + reply = func(self, request, grpc_context) + logger.debug('{:s} reply: {:s}'.format(method_name, grpc_message_to_json_string(reply))) + counter_completed.inc() + return reply + except ServiceException as e: # pragma: no cover (ServiceException not thrown) + if e.code not in [grpc.StatusCode.NOT_FOUND, grpc.StatusCode.ALREADY_EXISTS]: + # Assume not found or already exists is just a condition, not an error + logger.exception('{:s} exception'.format(method_name)) + counter_failed.inc() + grpc_context.abort(e.code, e.details) + except Exception as e: # pragma: no cover, pylint: disable=broad-except + logger.exception('{:s} exception'.format(method_name)) + counter_failed.inc() + grpc_context.abort(grpc.StatusCode.INTERNAL, str(e)) + return inner_wrapper + return outer_wrapper diff --git a/src/common/rpc_method_wrapper/ServiceExceptions.py b/src/common/method_wrappers/ServiceExceptions.py similarity index 100% rename from src/common/rpc_method_wrapper/ServiceExceptions.py rename to src/common/method_wrappers/ServiceExceptions.py diff --git a/src/common/rpc_method_wrapper/__init__.py b/src/common/method_wrappers/__init__.py similarity index 100% rename from src/common/rpc_method_wrapper/__init__.py rename to src/common/method_wrappers/__init__.py diff --git a/src/common/method_wrappers/results-perf-eval/MW/dev-drv-mw.png b/src/common/method_wrappers/results-perf-eval/MW/dev-drv-mw.png new file mode 100644 index 0000000000000000000000000000000000000000..a5732f8d162182a014497f219b510baa3d5ac105 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/MW/dev-drv-mw.png differ diff --git a/src/common/method_wrappers/results-perf-eval/MW/generate.sh b/src/common/method_wrappers/results-perf-eval/MW/generate.sh new file mode 100755 index 0000000000000000000000000000000000000000..bb86e747580cc48cfd93d9091584ebe66a2586fc --- /dev/null +++ b/src/common/method_wrappers/results-perf-eval/MW/generate.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +python generate_plot.py "DEVICE_DRIVER_MW" +python generate_plot.py "SERVICE_HANDLER_MW" diff --git a/src/common/method_wrappers/results-perf-eval/MW/generate_plot.py b/src/common/method_wrappers/results-perf-eval/MW/generate_plot.py new file mode 100644 index 0000000000000000000000000000000000000000..beae663f671b73b685e5ac8ec2048df35771c862 --- /dev/null +++ b/src/common/method_wrappers/results-perf-eval/MW/generate_plot.py @@ -0,0 +1,69 @@ +import enum, sys +import numpy as np +import matplotlib.pyplot as plt + +class PlotName(enum.Enum): + DEVICE_DRIVER_MW = 'dev-drv-mw' + SERVICE_HANDLER_MW = 'srv-hlr-mw' + +plot_name = PlotName.__members__.get(sys.argv[1]) +if plot_name is None: raise Exception('Unsupported plot: {:s}'.format(str(plot_name))) + +PLOTS = { + PlotName.DEVICE_DRIVER_MW: ( + #'Device Driver - MicroWave', '0.0001-100', [ + # ('GetConfig', [0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,10,172,0,1,0,0,0,0,0,0]), + # ('SetConfig', [89,1,0,0,0,0,0,0,0,0,0,0,0,0,0,6,34,50,1,0,0,0,0,0,0,0]), + # ('DeleteConfig', [90,1,0,0,0,0,0,0,0,0,0,0,0,0,2,3,0,4,72,12,0,0,0,0,0,0]), + #]), + 'Device Driver - MicroWave', '0.1-10', [ + ('GetConfig', [0,1,0,10,172,0,1,0]), + ('SetConfig', [0,0,6,34,50,1,0,0]), + ('DeleteConfig', [0,2,3,0,4,72,12,0]), + ]), + PlotName.SERVICE_HANDLER_MW: ( + 'Service Handler - L2NM MicroWave', '1-100', [ + ('SetEndpoint', [0,1,0,1,5,75,6,0]), + ('DeleteEndpoint', [0,0,0,0,1,77,17,0]), + ]), +} + +BINS_RANGES = { + '0.0001-100' : [0, 0.0001, 0.00025, 0.0005, 0.00075, 0.001, 0.0025, 0.005, 0.0075, + 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10, + 25, 50, 75, 100, 200], + '0.1-10' : [0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10], + '0.0001-1' : [0, 0.0001, 0.00025, 0.0005, 0.00075, 0.001, 0.0025, 0.005, 0.0075, + 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1], + '0.0001-0.25' : [0, 0.0001, 0.00025, 0.0005, 0.00075, 0.001, 0.0025, 0.005, 0.0075, + 0.01, 0.025, 0.05, 0.075, 0.1, 0.25], + '1-100' : [1, 2.5, 5, 7.5, 10, 25, 50, 75, 100], + '0.001-100' : [0, 0.001, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, + 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10, 25, 50, 75, 100, 200], + '0.001-7.5' : [0, 0.001, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, + 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10], + '0.01-5' : [0, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5], +} + +# plot the cumulative histogram +fig, ax = plt.subplots(figsize=(8, 8)) + +bins = PLOTS[plot_name][1] +if isinstance(bins, str): bins = BINS_RANGES[PLOTS[plot_name][1]] +bins = np.array(bins).astype(float) + +for label, counts in PLOTS[plot_name][2]: + counts = np.array(counts).astype(float) + assert len(bins) == len(counts) + 1 + centroids = (bins[1:] + bins[:-1]) / 2 + ax.hist(centroids, bins=bins, weights=counts, range=(min(bins), max(bins)), density=True, + histtype='step', cumulative=True, label=label) + +ax.grid(True) +ax.legend(loc='upper left') +ax.set_title(PLOTS[plot_name][0]) +ax.set_xlabel('seconds') +ax.set_ylabel('Likelihood of occurrence') +plt.xscale('log') +plt.savefig('{:s}.png'.format(plot_name.value), dpi = (600)) +plt.show() diff --git a/src/common/method_wrappers/results-perf-eval/MW/srv-hlr-mw.png b/src/common/method_wrappers/results-perf-eval/MW/srv-hlr-mw.png new file mode 100644 index 0000000000000000000000000000000000000000..70368ade484fd07310b521b6ea8182b223604922 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/MW/srv-hlr-mw.png differ diff --git a/src/common/method_wrappers/results-perf-eval/OpenConfig/dev-drv-openconfig.png b/src/common/method_wrappers/results-perf-eval/OpenConfig/dev-drv-openconfig.png new file mode 100644 index 0000000000000000000000000000000000000000..7130d5cc721a5b3dd419f0eba1217664aab064d4 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/OpenConfig/dev-drv-openconfig.png differ diff --git a/src/common/method_wrappers/results-perf-eval/OpenConfig/generate.sh b/src/common/method_wrappers/results-perf-eval/OpenConfig/generate.sh new file mode 100755 index 0000000000000000000000000000000000000000..0ecd000fd52dc8b5d40b0b115f09b4e957582240 --- /dev/null +++ b/src/common/method_wrappers/results-perf-eval/OpenConfig/generate.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +python generate_plot.py "DEVICE_DRIVER_OPENCONFIG" +python generate_plot.py "SERVICE_HANDLER_OPENCONFIG_L2NM" +python generate_plot.py "SERVICE_HANDLER_OPENCONFIG_L3NM" diff --git a/src/common/method_wrappers/results-perf-eval/OpenConfig/generate_plot.py b/src/common/method_wrappers/results-perf-eval/OpenConfig/generate_plot.py new file mode 100644 index 0000000000000000000000000000000000000000..c6fda331d7782acefd47759d28d7e1d82508efef --- /dev/null +++ b/src/common/method_wrappers/results-perf-eval/OpenConfig/generate_plot.py @@ -0,0 +1,74 @@ +import enum, sys +import numpy as np +import matplotlib.pyplot as plt + +class PlotName(enum.Enum): + DEVICE_DRIVER_OPENCONFIG = 'dev-drv-openconfig' + SERVICE_HANDLER_OPENCONFIG_L2NM = 'srv-hlr-openconfig-l2nm' + SERVICE_HANDLER_OPENCONFIG_L3NM = 'srv-hlr-openconfig-l3nm' + +plot_name = PlotName.__members__.get(sys.argv[1]) +if plot_name is None: raise Exception('Unsupported plot: {:s}'.format(str(plot_name))) + +PLOTS = { + PlotName.DEVICE_DRIVER_OPENCONFIG: ( + 'Device Driver - OpenConfig', '0.0001-100', [ + #('GetConfig', [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,121,0,0,0,0]), + #('SetConfig', [127,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,43,19,0,0,0,0,0,0]), + #('DeleteConfig', [92,1,0,0,0,0,0,0,0,0,0,0,0,0,5,2,8,71,14,0,0,0,0,0,0,0]), + + ('GetConfig', [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,121,0,0,0,0]), + ('SetConfig', [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,43,19,0,0,0,0,0,0]), + ('DeleteConfig', [0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,2,8,71,14,0,0,0,0,0,0,0]), + ]), + PlotName.SERVICE_HANDLER_OPENCONFIG_L2NM: ( + 'Service Handler - L2NM OpenConfig', '0.001-100', [ + ('SetEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,10]), + ('DeleteEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14]), + ]), + PlotName.SERVICE_HANDLER_OPENCONFIG_L3NM: ( + 'Service Handler - L3NM OpenConfig', '0.001-100', [ + ('SetEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,17]), + ('DeleteEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20]), + ]), +} + +BINS_RANGES = { + '0.0001-100' : [0, 0.0001, 0.00025, 0.0005, 0.00075, 0.001, 0.0025, 0.005, 0.0075, + 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10, + 25, 50, 75, 100, 200], + '0.1-10' : [0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10], + '0.0001-1' : [0, 0.0001, 0.00025, 0.0005, 0.00075, 0.001, 0.0025, 0.005, 0.0075, + 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1], + '0.0001-0.25' : [0, 0.0001, 0.00025, 0.0005, 0.00075, 0.001, 0.0025, 0.005, 0.0075, + 0.01, 0.025, 0.05, 0.075, 0.1, 0.25], + '1-100' : [1, 2.5, 5, 7.5, 10, 25, 50, 75, 100], + '0.001-100' : [0, 0.001, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, + 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10, 25, 50, 75, 100, 200], + '0.001-7.5' : [0, 0.001, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, + 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10], + '0.01-5' : [0, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5], +} + +# plot the cumulative histogram +fig, ax = plt.subplots(figsize=(8, 8)) + +bins = PLOTS[plot_name][1] +if isinstance(bins, str): bins = BINS_RANGES[PLOTS[plot_name][1]] +bins = np.array(bins).astype(float) + +for label, counts in PLOTS[plot_name][2]: + counts = np.array(counts).astype(float) + assert len(bins) == len(counts) + 1 + centroids = (bins[1:] + bins[:-1]) / 2 + ax.hist(centroids, bins=bins, weights=counts, range=(min(bins), max(bins)), density=True, + histtype='step', cumulative=True, label=label) + +ax.grid(True) +ax.legend(loc='upper left') +ax.set_title(PLOTS[plot_name][0]) +ax.set_xlabel('seconds') +ax.set_ylabel('Likelihood of occurrence') +plt.xscale('log') +plt.savefig('{:s}.png'.format(plot_name.value), dpi = (600)) +plt.show() diff --git a/src/common/method_wrappers/results-perf-eval/OpenConfig/srv-hlr-openconfig-l2nm.png b/src/common/method_wrappers/results-perf-eval/OpenConfig/srv-hlr-openconfig-l2nm.png new file mode 100644 index 0000000000000000000000000000000000000000..9b4393a0ee713b0232b2e4eb5bba75f30159f6e9 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/OpenConfig/srv-hlr-openconfig-l2nm.png differ diff --git a/src/common/method_wrappers/results-perf-eval/OpenConfig/srv-hlr-openconfig-l3nm.png b/src/common/method_wrappers/results-perf-eval/OpenConfig/srv-hlr-openconfig-l3nm.png new file mode 100644 index 0000000000000000000000000000000000000000..e4b2d83685dc983cbd2738eecf7064eba74c8e13 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/OpenConfig/srv-hlr-openconfig-l3nm.png differ diff --git a/src/common/method_wrappers/results-perf-eval/TE/te-cdf.py b/src/common/method_wrappers/results-perf-eval/TE/te-cdf.py new file mode 100644 index 0000000000000000000000000000000000000000..60919ba8bb2a1e5976d14bafd727e176cf86b0cd --- /dev/null +++ b/src/common/method_wrappers/results-perf-eval/TE/te-cdf.py @@ -0,0 +1,30 @@ +import matplotlib.pyplot as plt + +flow_creation_us = [ + 3.007065,3.007783,3.010780,3.007374,3.006519,3.006668,3.006303,3.006463,3.006758,3.007992,3.012198,3.001413, + 3.007289,3.006241,3.007523,3.007569,3.006643,3.006255,3.007058,3.006111,3.006918,3.007972,3.006829,3.007378, + 3.007666,3.003071,3.006774,3.006060,3.006731,3.005812 +] + +flow_update_us = [ + 3.005123,3.004228,3.003897,3.006692,3.003767,3.003749,3.004626,3.004333,3.004449,3.003895,3.004092,3.003979, + 3.005099,3.213206,3.004625,3.004707,3.004187,3.004609,3.003885,3.004064,3.004308,3.004280,3.004423,3.211980, + 3.004138,3.004394,3.004018,3.004747,3.005719,3.003656 +] + +n_bins = 10 +fig, ax = plt.subplots(figsize=(8, 8)) + +# plot the cumulative histograms +n, bins, _ = ax.hist(flow_creation_us, n_bins, density=True, histtype='step', cumulative=True, label='FlowCreate') +print(n, bins) +n, bins, _ = ax.hist(flow_update_us, n_bins, density=True, histtype='step', cumulative=True, label='FlowUpdate') +print(n, bins) + +ax.grid(True) +ax.legend(loc='lower center') +ax.set_title('TE Flow Management Delay') +ax.set_xlabel('seconds') +ax.set_ylabel('Likelihood of occurrence') +plt.savefig('te-perf-eval.png', dpi = (600)) +plt.show() diff --git a/src/common/method_wrappers/results-perf-eval/TE/te-perf-eval.png b/src/common/method_wrappers/results-perf-eval/TE/te-perf-eval.png new file mode 100644 index 0000000000000000000000000000000000000000..5b2fd8160bddb4322d8fbb22dac950598bf2115b Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/TE/te-perf-eval.png differ diff --git a/src/common/method_wrappers/results-perf-eval/XR/dev-drv-xr-with-outliers.png b/src/common/method_wrappers/results-perf-eval/XR/dev-drv-xr-with-outliers.png new file mode 100644 index 0000000000000000000000000000000000000000..9607ce0436ee962b7fa5b7ed333ca219ef097884 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/XR/dev-drv-xr-with-outliers.png differ diff --git a/src/common/method_wrappers/results-perf-eval/XR/dev-drv-xr.png b/src/common/method_wrappers/results-perf-eval/XR/dev-drv-xr.png new file mode 100644 index 0000000000000000000000000000000000000000..61f7d3e394676a05f240d032ce62124a70d8b8bb Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/XR/dev-drv-xr.png differ diff --git a/src/common/method_wrappers/results-perf-eval/XR/generate.sh b/src/common/method_wrappers/results-perf-eval/XR/generate.sh new file mode 100755 index 0000000000000000000000000000000000000000..eae3eb6d6e615f3be97b2df9f44ce544523ddb72 --- /dev/null +++ b/src/common/method_wrappers/results-perf-eval/XR/generate.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +python generate_plot.py "DEVICE_DRIVER_XR" diff --git a/src/common/method_wrappers/results-perf-eval/XR/generate_plot.py b/src/common/method_wrappers/results-perf-eval/XR/generate_plot.py new file mode 100644 index 0000000000000000000000000000000000000000..66110b44400719a796bc86bf6ea1b0c7a1d44224 --- /dev/null +++ b/src/common/method_wrappers/results-perf-eval/XR/generate_plot.py @@ -0,0 +1,61 @@ +import enum, sys +import numpy as np +import matplotlib.pyplot as plt + +class PlotName(enum.Enum): + DEVICE_DRIVER_XR = 'dev-drv-xr' + +plot_name = PlotName.__members__.get(sys.argv[1]) +if plot_name is None: raise Exception('Unsupported plot: {:s}'.format(str(plot_name))) + +PLOTS = { + PlotName.DEVICE_DRIVER_XR: ( + #'Device Driver - XR', '0.0001-0.25', [ + # ('GetConfig', [0,0,0,0,0,0,0,0,0,77,1,1,0,0]), + # ('SetConfig', [0,15,17,7,0,0,0,0,0,0,34,3,2,0]), + # ('DeleteConfig', [23,16,0,0,0,0,0,0,0,1,32,5,1,0]), + #]), + 'Device Driver - XR', '0.0001-0.25', [ + ('GetConfig', [0,0,0,0,0,0,0,0,0,77,1,1,0,0]), + ('SetConfig', [0,0,0,0,0,0,0,0,0,0,34,3,2,0]), + ('DeleteConfig', [0,0,0,0,0,0,0,0,0,1,32,5,1,0]), + ]), +} + +BINS_RANGES = { + '0.0001-100' : [0, 0.0001, 0.00025, 0.0005, 0.00075, 0.001, 0.0025, 0.005, 0.0075, + 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10, + 25, 50, 75, 100, 200], + '0.0001-1' : [0, 0.0001, 0.00025, 0.0005, 0.00075, 0.001, 0.0025, 0.005, 0.0075, + 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1], + '0.0001-0.25' : [0, 0.0001, 0.00025, 0.0005, 0.00075, 0.001, 0.0025, 0.005, 0.0075, + 0.01, 0.025, 0.05, 0.075, 0.1, 0.25], + '0.001-100' : [0, 0.001, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, + 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10, 25, 50, 75, 100, 200], + '0.001-7.5' : [0, 0.001, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, + 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10], + '0.01-5' : [0, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5], +} + +# plot the cumulative histogram +fig, ax = plt.subplots(figsize=(8, 8)) + +bins = PLOTS[plot_name][1] +if isinstance(bins, str): bins = BINS_RANGES[PLOTS[plot_name][1]] +bins = np.array(bins).astype(float) + +for label, counts in PLOTS[plot_name][2]: + counts = np.array(counts).astype(float) + assert len(bins) == len(counts) + 1 + centroids = (bins[1:] + bins[:-1]) / 2 + ax.hist(centroids, bins=bins, weights=counts, range=(min(bins), max(bins)), density=True, + histtype='step', cumulative=True, label=label) + +ax.grid(True) +ax.legend(loc='upper left') +ax.set_title(PLOTS[plot_name][0]) +ax.set_xlabel('seconds') +ax.set_ylabel('Likelihood of occurrence') +plt.xscale('log') +plt.savefig('{:s}.png'.format(plot_name.value), dpi = (600)) +plt.show() diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp1-dev-drv-emu-l2nm.png b/src/common/method_wrappers/results-perf-eval/emulated/exp1-dev-drv-emu-l2nm.png new file mode 100644 index 0000000000000000000000000000000000000000..84ab8747e2a6ca5153e4b6e02483030ab891a421 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp1-dev-drv-emu-l2nm.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp1-dev-drv-emu-l3nm.png b/src/common/method_wrappers/results-perf-eval/emulated/exp1-dev-drv-emu-l3nm.png new file mode 100644 index 0000000000000000000000000000000000000000..d37827794618024ddaa553de8d2134b455aa31a0 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp1-dev-drv-emu-l3nm.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp1-dev-drv-tapi.png b/src/common/method_wrappers/results-perf-eval/emulated/exp1-dev-drv-tapi.png new file mode 100644 index 0000000000000000000000000000000000000000..70b51e144e259191d9d174abfebd5a6ff3a52e57 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp1-dev-drv-tapi.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp1-pathcomp-rpc-compute.png b/src/common/method_wrappers/results-perf-eval/emulated/exp1-pathcomp-rpc-compute.png new file mode 100644 index 0000000000000000000000000000000000000000..af84e7e9d5866671e9441c1a93b9d2a66a9218c9 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp1-pathcomp-rpc-compute.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp1-svc-hdl-l2nm-emu.png b/src/common/method_wrappers/results-perf-eval/emulated/exp1-svc-hdl-l2nm-emu.png new file mode 100644 index 0000000000000000000000000000000000000000..3e58fcbb8d8a25c7bbbd2094a28dad419afbeb02 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp1-svc-hdl-l2nm-emu.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp1-svc-hdl-l3nm-emu.png b/src/common/method_wrappers/results-perf-eval/emulated/exp1-svc-hdl-l3nm-emu.png new file mode 100644 index 0000000000000000000000000000000000000000..317af9ca13267f313cab9e6d67a3ba068a3993a4 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp1-svc-hdl-l3nm-emu.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp1-svc-hdl-tapi.png b/src/common/method_wrappers/results-perf-eval/emulated/exp1-svc-hdl-tapi.png new file mode 100644 index 0000000000000000000000000000000000000000..764b4f6cc64db88512b449e91b2ff31d6b260f91 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp1-svc-hdl-tapi.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-connection-rpcs.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-connection-rpcs.png new file mode 100644 index 0000000000000000000000000000000000000000..4caa6681993a1850c9e561fed300a16a0d333a87 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-connection-rpcs.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-device-rpcs.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-device-rpcs.png new file mode 100644 index 0000000000000000000000000000000000000000..188d784b68cbc1abb2ea90eaa305863b36cb838a Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-device-rpcs.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-link-rpcs.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-link-rpcs.png new file mode 100644 index 0000000000000000000000000000000000000000..bc3b5ea36e7a278b670699baf7fddf12447510dc Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-link-rpcs.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-service-rpcs.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-service-rpcs.png new file mode 100644 index 0000000000000000000000000000000000000000..74e639b85b70d35c2f0830aa837497646d6b3666 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-service-rpcs.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-slice-rpcs.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-slice-rpcs.png new file mode 100644 index 0000000000000000000000000000000000000000..4060b8ae9b9d2a901b8d0cc2b009ce888f34fab9 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-slice-rpcs.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-topology-rpcs.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-topology-rpcs.png new file mode 100644 index 0000000000000000000000000000000000000000..aae9d07ef4420e53ee4ba3d715f5bf37eae924dd Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-context-topology-rpcs.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-device-driver-emu.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-device-driver-emu.png new file mode 100644 index 0000000000000000000000000000000000000000..9b6e4d2a47d09f884a1c6e95e5ae27c4df56d55a Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-device-driver-emu.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-device-rpcs.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-device-rpcs.png new file mode 100644 index 0000000000000000000000000000000000000000..70182fad226d4a387a13991cfba80a6cbd7d57fe Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-device-rpcs.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-dlt-rpcs.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-dlt-rpcs.png new file mode 100644 index 0000000000000000000000000000000000000000..dae5e567c7395d5e6972a55b5e7053a551da624f Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-dlt-rpcs.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-pathcomp-rpcs.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-pathcomp-rpcs.png new file mode 100644 index 0000000000000000000000000000000000000000..1c48c875f19b3a49238ee473bc265b9358cfbf6a Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-pathcomp-rpcs.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-service-rpcs.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-service-rpcs.png new file mode 100644 index 0000000000000000000000000000000000000000..2c50e199195dec26ac29abf6901103d66d3bca33 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-service-rpcs.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-slice-rpcs.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-slice-rpcs.png new file mode 100644 index 0000000000000000000000000000000000000000..1292bc5e717634807ce835d481bd08424ef19f2b Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-slice-rpcs.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-svc-hdl-l2nm-emu.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-svc-hdl-l2nm-emu.png new file mode 100644 index 0000000000000000000000000000000000000000..403baefa0ccd07a70c7fd08db964ae30c3a56301 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-svc-hdl-l2nm-emu.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/exp2-svc-hdl-l3nm-emu.png b/src/common/method_wrappers/results-perf-eval/emulated/exp2-svc-hdl-l3nm-emu.png new file mode 100644 index 0000000000000000000000000000000000000000..9c45a0ddf886369fc50a828ded57c26ac6691634 Binary files /dev/null and b/src/common/method_wrappers/results-perf-eval/emulated/exp2-svc-hdl-l3nm-emu.png differ diff --git a/src/common/method_wrappers/results-perf-eval/emulated/generate.sh b/src/common/method_wrappers/results-perf-eval/emulated/generate.sh new file mode 100755 index 0000000000000000000000000000000000000000..f7ed1e31f0382ce1f3b1c89e1ab7de465692614c --- /dev/null +++ b/src/common/method_wrappers/results-perf-eval/emulated/generate.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +#python generate_plot.py "EXP1_DEVICE_DRIVER_EMU_L2NM" +#python generate_plot.py "EXP1_DEVICE_DRIVER_EMU_L3NM" +python generate_plot.py "EXP1_DEVICE_DRIVER_TAPI" +#python generate_plot.py "EXP2_DEVICE_DRIVER_EMU" + +# ----- All ------------------------------------------------------------ +#python generate_plot.py "EXP1_DEVICE_DRIVER_EMU_L2NM" +#python generate_plot.py "EXP1_DEVICE_DRIVER_EMU_L3NM" +#python generate_plot.py "EXP1_DEVICE_DRIVER_TAPI" +#python generate_plot.py "EXP1_SERVICE_HANDLER_EMU_L2NM" +#python generate_plot.py "EXP1_SERVICE_HANDLER_EMU_L3NM" +#python generate_plot.py "EXP1_SERVICE_HANDLER_TAPI" +#python generate_plot.py "EXP1_COMP_PATHCOMP_RPC_COMPUTE" +#python generate_plot.py "EXP2_DEVICE_DRIVER_EMU" +#python generate_plot.py "EXP2_SERVICE_HANDLER_EMU_L2NM" +#python generate_plot.py "EXP2_SERVICE_HANDLER_EMU_L3NM" +#python generate_plot.py "EXP2_COMP_CONTEXT_DEVICE_RPCS" +#python generate_plot.py "EXP2_COMP_CONTEXT_LINK_RPCS" +#python generate_plot.py "EXP2_COMP_CONTEXT_SERVICE_RPCS" +#python generate_plot.py "EXP2_COMP_CONTEXT_SLICE_RPCS" +#python generate_plot.py "EXP2_COMP_CONTEXT_TOPOLOGY_RPCS" +#python generate_plot.py "EXP2_COMP_CONTEXT_CONNECTION_RPCS" +#python generate_plot.py "EXP2_COMP_DEVICE_RPCS" +#python generate_plot.py "EXP2_COMP_SERVICE_RPCS" +#python generate_plot.py "EXP2_COMP_SLICE_RPCS" +#python generate_plot.py "EXP2_COMP_PATHCOMP_RPCS" +#python generate_plot.py "EXP2_COMP_DLT_RPCS" diff --git a/src/common/method_wrappers/results-perf-eval/emulated/generate_plot.py b/src/common/method_wrappers/results-perf-eval/emulated/generate_plot.py new file mode 100644 index 0000000000000000000000000000000000000000..74ae49c26b56cae22d812496633a96ea1b595405 --- /dev/null +++ b/src/common/method_wrappers/results-perf-eval/emulated/generate_plot.py @@ -0,0 +1,219 @@ +import enum, sys +import numpy as np +import matplotlib.pyplot as plt + +class PlotName(enum.Enum): + EXP1_DEVICE_DRIVER_EMU_L2NM = 'exp1-dev-drv-emu-l2nm' + EXP1_DEVICE_DRIVER_EMU_L3NM = 'exp1-dev-drv-emu-l3nm' + EXP1_DEVICE_DRIVER_TAPI = 'exp1-dev-drv-tapi' + EXP1_SERVICE_HANDLER_EMU_L2NM = 'exp1-svc-hdl-l2nm-emu' + EXP1_SERVICE_HANDLER_EMU_L3NM = 'exp1-svc-hdl-l3nm-emu' + EXP1_SERVICE_HANDLER_TAPI = 'exp1-svc-hdl-tapi' + EXP1_COMP_PATHCOMP_RPC_COMPUTE = 'exp1-pathcomp-rpc-compute' + + EXP2_DEVICE_DRIVER_EMU = 'exp2-device-driver-emu' + EXP2_SERVICE_HANDLER_EMU_L2NM = 'exp2-svc-hdl-l2nm-emu' + EXP2_SERVICE_HANDLER_EMU_L3NM = 'exp2-svc-hdl-l3nm-emu' + + EXP2_COMP_CONTEXT_DEVICE_RPCS = 'exp2-context-device-rpcs' + EXP2_COMP_CONTEXT_LINK_RPCS = 'exp2-context-link-rpcs' + EXP2_COMP_CONTEXT_SERVICE_RPCS = 'exp2-context-service-rpcs' + EXP2_COMP_CONTEXT_SLICE_RPCS = 'exp2-context-slice-rpcs' + EXP2_COMP_CONTEXT_TOPOLOGY_RPCS = 'exp2-context-topology-rpcs' + EXP2_COMP_CONTEXT_CONNECTION_RPCS = 'exp2-context-connection-rpcs' + EXP2_COMP_DEVICE_RPCS = 'exp2-device-rpcs' + EXP2_COMP_SERVICE_RPCS = 'exp2-service-rpcs' + EXP2_COMP_SLICE_RPCS = 'exp2-slice-rpcs' + EXP2_COMP_PATHCOMP_RPCS = 'exp2-pathcomp-rpcs' + EXP2_COMP_DLT_RPCS = 'exp2-dlt-rpcs' + +plot_name = PlotName.__members__.get(sys.argv[1]) +if plot_name is None: raise Exception('Unsupported plot: {:s}'.format(str(plot_name))) + +PLOTS = { + PlotName.EXP1_DEVICE_DRIVER_EMU_L2NM: ( + 'Device Driver - Emulated (using L2NM services)', '0.0001-1', [ + ('GetConfig', [0,27,252,212,160,261,26,2,3,9,19,11,2,1,0,0,0]), + ('SetConfig', [575,56,112,78,61,82,8,0,2,5,5,0,1, 0,0,0,0]), + ('DeleteConfig', [606,96,150,66,29,31,5,0,0,1,1,0, 0,0,0,0,0]), + ]), + + PlotName.EXP1_DEVICE_DRIVER_EMU_L3NM: ( + 'Device Driver - Emulated (using L3NM services)', '0.0001-1', [ + ('GetConfig', [0,1,40,83,127,460,132,24,13,39,36,31,9,5,1,0,0]), + ('SetConfig', [487,29,110,52,55,171,48,6,6,15,12,8,0,1, 0,0,0]), + ('DeleteConfig', [510,86,79,43,26,120,70,20,6,9,15,8,5,3, 0,0,0]), + ]), + + PlotName.EXP1_DEVICE_DRIVER_TAPI: ( + #'Device Driver - TAPI', '0.0001-1', [ + # ('GetConfig', [0,0,0,0,0,0,0,0,0,1,1,3,10,159,14, 0,0]), + # ('SetConfig', [92,3,1,0,0,0,0,6,11,47,13,13,0,0,0,0,0]), + # ('DeleteConfig', [90,0,0,0,0,0,3,14,25,35,6,11,2,0,0,0,0]), + #]), + 'Device Driver - TAPI', '0.0001-1', [ + ('GetConfig', [0,0,0,0,0,0,0,0,0,1,1,3,10,159,14, 0,0]), + ('SetConfig', [0,0,0,0,0,0,0,6,11,47,13,13,0,0,0,0,0]), + ('DeleteConfig', [0,0,0,0,0,0,3,14,25,35,6,11,2,0,0,0,0]), + ]), + + PlotName.EXP1_SERVICE_HANDLER_EMU_L2NM: ( + 'Service Handler - L2NM Emulated', '0.001-100', [ + ('SetEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,41,35,12,1,0]), + ('DeleteEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,3,29,45,7,0,0]), + ]), + + PlotName.EXP1_SERVICE_HANDLER_EMU_L3NM: ( + 'Service Handler - L3NM Emulated', '0.001-100', [ + ('SetEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,8,27,29,15,11]), + ('DeleteEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,2,0,6,22,29,18,11]), + ]), + + PlotName.EXP1_SERVICE_HANDLER_TAPI: ( + 'Service Handler - TAPI', '0.001-100', [ + ('SetEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,79,2,0,0,0,0]), + ('DeleteEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,5,0,3,1,73,12,0,0,0,0]), + ]), + + PlotName.EXP1_COMP_PATHCOMP_RPC_COMPUTE: ( + 'PathComp - Compute RPC', '0.01-5', [ + ('Compute (using L2NM services)', [0,0,20,32,14,22,0]), + ('Compute (using L3NM services)', [0,1,1,10,17,59,2]), + ('Compute (using TAPI services)', [3,70,10,3,2,6,0]), + ]), + + PlotName.EXP2_DEVICE_DRIVER_EMU: ( + 'Device Driver - Emulated', '0.0001-0.25', [ + ('GetConfig', [0,21,198,247,190,332,28,5,3,7,14,8,0,0]), + ('SetConfig', [558,61,139,85,57,117,22,1,2,4,1,5,1,0]), + ('DeleteConfig', [573,123,142,63,30,78,24,2,2,8,5,2,0,0]), + ]), + + PlotName.EXP2_SERVICE_HANDLER_EMU_L2NM: ( + 'Service Handler - L2NM Emulated', '0.001-100', [ + ('SetEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,2,18,15,4,1,2,2,0,0,0]), + ('DeleteEndpoint', [0,0,0,0,0,0,0,0,0,0,0,1,0,20,20,5,1,0,0,0,0,0]), + ]), + + PlotName.EXP2_SERVICE_HANDLER_EMU_L3NM: ( + 'Service Handler - L3NM Emulated', '0.001-100', [ + ('SetEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,0,13,24,2,5,4,1,0,0,0]), + ('DeleteEndpoint', [0,0,0,0,0,0,0,0,0,0,0,0,0,11,27,7,3,1,0,0,0,0]), + ]), + + PlotName.EXP2_COMP_CONTEXT_DEVICE_RPCS: ( + 'Context RPCs', '0.001-7.5', [ + ('GetDevice', [0,0,0,0,6,130,348,305,382,578,76,7,6,0,0,0,0]), + ('ListDevices', [0,0,0,0,0,0,0,0,0,4,37,43,8,2,0,0,0]), + ('SetDevice', [0,0,0,0,0,42,236,158,179,380,46,9,0,0,0,0,0]), + ]), + + PlotName.EXP2_COMP_CONTEXT_LINK_RPCS: ( + 'Context RPCs', '0.001-7.5', [ + ('GetLink', [0,1,9,5,1,1,0,0,0,0,0,0,0,0,0,0,0]), + ('ListLinks', [0,0,0,0,0,5,20,23,27,17,2,0,0,0,0,0,0]), + ]), + + PlotName.EXP2_COMP_CONTEXT_SERVICE_RPCS: ( + 'Context RPCs', '0.001-7.5', [ + ('GetService', [124,120,42,55,80,167,62,34,14,33,9,2,1,0,0,0,0]), + ('ListServices', [0,1,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0]), + ('RemoveService', [0,0,3,18,15,29,13,5,1,4,1,0,0,0,0,0,0]), + ('SetService', [6,90,59,51,63,165,70,32,5,12,8,2,0,0,0,0,0]), + ]), + + PlotName.EXP2_COMP_CONTEXT_SLICE_RPCS: ( + 'Context RPCs', '0.001-7.5', [ + ('GetSlice', [30,75,48,24,32,118,56,34,12,19,8,2,0,0,0,0,0]), + ('ListSlices', [0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0]), + ('RemoveSlice', [0,0,2,10,8,14,8,2,1,2,0,0,0,0,0,0,0]), + ('SetSlice', [6,29,22,18,21,70,25,12,11,13,1,0,0,0,0,0,0]), + ('UnsetSlice', [0,12,12,8,1,3,6,3,1,2,0,0,0,0,0,0,0]), + ]), + + PlotName.EXP2_COMP_CONTEXT_TOPOLOGY_RPCS: ( + 'Context RPCs', '0.001-7.5', [ + ('GetTopology', [72,11,0,0,0,2,6,1,0,1,1,0,0,0,0,0,0]), + ('ListTopologies', [0,0,0,0,5,38,25,10,6,10,0,0,0,0,0,0,0]), + ('ListTopologyIds', [1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]), + ]), + + PlotName.EXP2_COMP_CONTEXT_CONNECTION_RPCS: ( + 'Context RPCs', '0.001-7.5', [ + ('ListConnections', [13,21,5,19,23,145,46,27,10,15,4,2,0,1,0,0,0]), + ('ListContextIds', [1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]), + ('RemoveConnection', [0,0,17,17,12,23,11,2,2,6,0,0,0,0,0,0,0]), + ('SetConnection', [0,0,17,26,9,18,4,7,2,5,4,2,0,0,0,0,0]), + ]), + + PlotName.EXP2_COMP_DEVICE_RPCS: ( + 'Device RPCs', '0.001-7.5', [ + ('AddDevice', [0,0,0,0,0,0,0,1,2,4,0,0,0,0,0,0,0]), + ('ConfigureDevice', [0,0,0,0,0,0,0,0,2,140,367,243,127,143,19,9,5]), + ]), + + PlotName.EXP2_COMP_SERVICE_RPCS: ( + 'Service RPCs', '0.001-7.5', [ + ('CreateService', [0,0,0,9,11,32,13,10,4,7,3,2,1,0,0,0,0]), + ('UpdateService', [0,0,0,0,0,0,0,0,0,0,0,0,0,19,41,15,18]), + ('DeleteService', [0,0,0,0,0,0,0,0,0,0,0,0,1,23,45,21,6]), + ]), + + PlotName.EXP2_COMP_SLICE_RPCS: ( + 'Slice RPCs', '0.001-7.5', [ + ('CreateSlice', [0,0,0,0,0,4,5,4,10,11,6,2,1,0,0,0,0]), + ('UpdateSlice', [0,0,0,0,0,0,0,0,0,0,0,0,0,6,20,10,10]), + ('DeleteSice', [0,0,0,0,0,0,0,0,0,0,0,0,0,9,21,15,2]), + ]), + + PlotName.EXP2_COMP_PATHCOMP_RPCS: ( + 'PathComp RPCs', '0.001-7.5', [ + ('Compute', [0,0,0,0,0,0,0,0,0,0,13,43,22,14,0,0,0]), + ]), + + PlotName.EXP2_COMP_DLT_RPCS: ( + 'DLT RPCs', '0.001-7.5', [ + ('RecordDevice', [0,0,0,0,0,0,0,1,4,5,6,6,0,26,71,94,306]), + ('RecordLink', [0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0]), + ('RecordService', [0,0,0,0,0,0,0,0,0,0,0,0,0,5,15,30,184]), + ('RecordSlice', [0,0,0,0,0,0,0,0,2,3,1,2,1,6,19,23,82]), + ]), +} + +BINS_RANGES = { + '0.0001-100' : [0, 0.0001, 0.00025, 0.0005, 0.00075, 0.001, 0.0025, 0.005, 0.0075, + 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10, + 25, 50, 75, 100, 200], + '0.0001-1' : [0, 0.0001, 0.00025, 0.0005, 0.00075, 0.001, 0.0025, 0.005, 0.0075, + 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1], + '0.0001-0.25' : [0, 0.0001, 0.00025, 0.0005, 0.00075, 0.001, 0.0025, 0.005, 0.0075, + 0.01, 0.025, 0.05, 0.075, 0.1, 0.25], + '0.001-100' : [0, 0.001, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, + 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10, 25, 50, 75, 100, 200], + '0.001-7.5' : [0, 0.001, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, + 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10], + '0.01-5' : [0, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5], +} + +# plot the cumulative histogram +fig, ax = plt.subplots(figsize=(8, 8)) + +bins = PLOTS[plot_name][1] +if isinstance(bins, str): bins = BINS_RANGES[PLOTS[plot_name][1]] +bins = np.array(bins).astype(float) + +for label, counts in PLOTS[plot_name][2]: + counts = np.array(counts).astype(float) + assert len(bins) == len(counts) + 1 + centroids = (bins[1:] + bins[:-1]) / 2 + ax.hist(centroids, bins=bins, weights=counts, range=(min(bins), max(bins)), density=True, + histtype='step', cumulative=True, label=label) + +ax.grid(True) +ax.legend(loc='best') +ax.set_title(PLOTS[plot_name][0]) +ax.set_xlabel('seconds') +ax.set_ylabel('Likelihood of occurrence') +plt.xscale('log') +plt.savefig('{:s}.png'.format(plot_name.value), dpi = (600)) +plt.show() diff --git a/src/common/method_wrappers/tests/DummyDeviceDriver.py b/src/common/method_wrappers/tests/DummyDeviceDriver.py new file mode 100644 index 0000000000000000000000000000000000000000..f4fe1169e8b59f1fd11ee3d7dd1fa85198c43374 --- /dev/null +++ b/src/common/method_wrappers/tests/DummyDeviceDriver.py @@ -0,0 +1,39 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import random, time +from common.perf_eval_method_wrapper.Decorator import MetricsPool, meter_method + +EXCEPTION_RATIO = 0.05 + +METRICS_POOL = MetricsPool(labels={'driver': 'dummy'}) + +class DummyDeviceDriver: + def __init__(self) -> None: + pass + + @meter_method(METRICS_POOL) + def get_config(self): + if random.random() < EXCEPTION_RATIO: raise Exception() + time.sleep(random.random()) + + @meter_method(METRICS_POOL) + def set_config(self): + if random.random() < EXCEPTION_RATIO: raise Exception() + time.sleep(random.random()) + + @meter_method(METRICS_POOL) + def del_config(self): + if random.random() < EXCEPTION_RATIO: raise Exception() + time.sleep(random.random()) diff --git a/src/common/method_wrappers/tests/README.md b/src/common/method_wrappers/tests/README.md new file mode 100644 index 0000000000000000000000000000000000000000..db9c0687098981d5410326c1330294931f496e3c --- /dev/null +++ b/src/common/method_wrappers/tests/README.md @@ -0,0 +1,63 @@ +# Performance Evaluation Method Wrapper + +## Description: + +- enable prometheus addon: +``` +tfs@tfs-vm:~/tfs-ctrl$ microk8s.enable prometheus +``` + +- wait till prometheus becomes enabled (when enabled, press Ctrl+C): +``` +tfs@tfs-vm:~/tfs-ctrl$ watch -n 1 microk8s.status --wait-ready +``` + +- wait till all pods in the monitoring namespace have STATE=Running and READY=X/X (when done, press Ctrl+C): +``` +tfs@tfs-vm:~/tfs-ctrl$ watch -n 1 kubectl get pods --all-namespaces +``` + +- deploy as: +``` +tfs@tfs-vm:~/tfs-ctrl$ source src/common/method_wrappers/tests/deploy_specs.sh +tfs@tfs-vm:~/tfs-ctrl$ ./deploy.sh +``` + +- expose prometheus and grafana + - (required) terminal 1 (grafana UI): `kubectl port-forward -n monitoring service/grafana --address 0.0.0.0 3001:3000` + - (optional) terminal 2 (prometheus UI): `kubectl port-forward -n monitoring service/prometheus-k8s --address 0.0.0.0 9090:9090` + - (optional) terminal 3 (alertmanager UI): `kubectl port-forward -n monitoring service/alertmanager-main --address 0.0.0.0 9093:9093` + +- if using remote server/VM for running MicroK8s and VSCode, forward ports 3001, 9090, 9093 + +- (only used for internal framework debugging) run manual tests over the performance evaluation framework + - terminal 4: + ``` + export PYTHONPATH=/home/tfs/tfs-ctrl/src + python -m common.method_wrappers.tests + ``` + +- log into grafana: + - browse: http://127.0.0.1:3000 + - user/pass: admin/admin + - upload dashboards through "left menu > Dashboards > Manage > Import" + - upload grafana_prometheus_component_rpc.json + - upload grafana_prometheus_device_driver.json + - upload grafana_prometheus_service_handler.json + - watch in real time the dashboard + +- upload topology through WebUI and navigate + - should see histogram changing in Grafana + +## References: +- [Prometheus - Tutorials - Getting Started](https://prometheus.io/docs/tutorials/getting_started/) +- [Prometheus - Tutorials - Understanding metric types](https://prometheus.io/docs/tutorials/understanding_metric_types/) +- [Prometheus - Tutorials - Instrumenting HTTP server in Go](https://prometheus.io/docs/tutorials/instrumenting_http_server_in_go/) +- [Prometheus - Tutorials - Visualizing metrics using Grafana](https://prometheus.io/docs/tutorials/visualizing_metrics_using_grafana/) +- [Prometheus - Tutorials - Alerting based on metrics](https://prometheus.io/docs/tutorials/alerting_based_on_metrics/) +- [Prometheus Operator - Guide](https://www.infracloud.io/blogs/prometheus-operator-helm-guide/) +- [Prometheus Operator - ServiceMonitor definition](https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.ServiceMonitor) +- [Prometheus Operator - ServiceMonitor example 1](https://stackoverflow.com/questions/45613660/how-do-you-add-scrape-targets-to-a-prometheus-server-that-was-installed-with-kub) +- [Prometheus Operator - ServiceMonitor example 2](https://stackoverflow.com/questions/52991038/how-to-create-a-servicemonitor-for-prometheus-operator) +- [How to visualize Prometheus histograms in Grafana](https://grafana.com/blog/2020/06/23/how-to-visualize-prometheus-histograms-in-grafana/) +- [Prometheus Histograms with Grafana Heatmaps](https://towardsdatascience.com/prometheus-histograms-with-grafana-heatmaps-d556c28612c7) diff --git a/src/common/rpc_method_wrapper/tests/__init__.py b/src/common/method_wrappers/tests/__init__.py similarity index 100% rename from src/common/rpc_method_wrapper/tests/__init__.py rename to src/common/method_wrappers/tests/__init__.py diff --git a/src/common/method_wrappers/tests/__main__.py b/src/common/method_wrappers/tests/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..505991f61ddb955196218230bfd533d8ea6ddf0d --- /dev/null +++ b/src/common/method_wrappers/tests/__main__.py @@ -0,0 +1,32 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, random +from prometheus_client import start_http_server +from .DummyDeviceDriver import DummyDeviceDriver + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) + +def main(): + # Start up the server to expose the metrics + start_http_server(8000) + + ddd = DummyDeviceDriver() + while True: + func = random.choice([ddd.get_config, ddd.set_config, ddd.del_config]) + func() + +if __name__ == '__main__': + main() diff --git a/src/common/method_wrappers/tests/deploy_specs.sh b/src/common/method_wrappers/tests/deploy_specs.sh new file mode 100644 index 0000000000000000000000000000000000000000..238918480ae857e64efb52f652b20ab08a21c2df --- /dev/null +++ b/src/common/method_wrappers/tests/deploy_specs.sh @@ -0,0 +1,26 @@ +# Set the URL of your local Docker registry where the images will be uploaded to. +export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" + +# Set the list of components, separated by spaces, you want to build images for, and deploy. +# Supported components are: +# context device automation policy service compute monitoring webui +# interdomain slice pathcomp dlt +# dbscanserving opticalattackmitigator opticalattackdetector +# l3_attackmitigator l3_centralizedattackdetector l3_distributedattackdetector +export TFS_COMPONENTS="context device pathcomp service slice webui" # automation monitoring compute + +# Set the tag you want to use for your images. +export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE="tfs" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml manifests/servicemonitors.yaml" + +# Set the new Grafana admin password +export TFS_GRAFANA_PASSWORD="admin123+" + +# If not already set, disable skip-build flag. +# If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used. +export TFS_SKIP_BUILD="NO" #${TFS_SKIP_BUILD:-"YES"} diff --git a/src/common/method_wrappers/tests/grafana_prometheus_component_rpc.json b/src/common/method_wrappers/tests/grafana_prometheus_component_rpc.json new file mode 100644 index 0000000000000000000000000000000000000000..b5b857e7573264f26289ba9a72ec5444e4ac71a4 --- /dev/null +++ b/src/common/method_wrappers/tests/grafana_prometheus_component_rpc.json @@ -0,0 +1,426 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 25, + "iteration": 1671297223428, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(tfs_[[component]]_rpc_[[method]]_counter_requests_started_total{pod=~\"[[pod]]\"})", + "interval": "", + "legendFormat": "started", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(tfs_[[component]]_rpc_[[method]]_counter_requests_completed_total{pod=~\"[[pod]]\"})", + "hide": false, + "interval": "", + "legendFormat": "completed", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(tfs_[[component]]_rpc_[[method]]_counter_requests_started_total{pod=~\"[[pod]]\"})", + "hide": false, + "interval": "", + "legendFormat": "failed", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transformations": [], + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:935", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:936", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "linear", + "colorScheme": "interpolateRdYlGn", + "exponent": 0.5, + "max": null, + "min": 0, + "mode": "opacity" + }, + "dataFormat": "tsbuckets", + "datasource": "prometheus", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 6 + }, + "heatmap": {}, + "hideZeroBuckets": true, + "highlightCards": true, + "id": 2, + "interval": "60s", + "legend": { + "show": true + }, + "pluginVersion": "7.5.4", + "reverseYBuckets": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(\r\n max_over_time(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket{pod=~\"[[pod]]\"}[1m]) -\r\n min_over_time(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket{pod=~\"[[pod]]\"}[1m])\r\n) by (le)", + "format": "heatmap", + "instant": false, + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{le}}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Histogram", + "tooltip": { + "show": true, + "showHistogram": true + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "s", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 14 + }, + "hiddenSeries": false, + "id": 5, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(tfs_[[component]]_rpc_[[method]]_histogram_duration_sum{pod=~\"[[pod]]\"})", + "hide": false, + "interval": "", + "legendFormat": "total time", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Total Exec Time", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transformations": [], + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:407", + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:408", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "5s", + "schemaVersion": 27, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": false, + "text": "context", + "value": "context" + }, + "datasource": "prometheus", + "definition": "metrics(tfs_)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Component", + "multi": false, + "name": "component", + "options": [], + "query": { + "query": "metrics(tfs_)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/tfs_(.+)_rpc_.*/", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": "", + "current": { + "selected": false, + "text": "getcontext", + "value": "getcontext" + }, + "datasource": "prometheus", + "definition": "metrics(tfs_[[component]]_rpc_)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Method", + "multi": false, + "name": "method", + "options": [], + "query": { + "query": "metrics(tfs_[[component]]_rpc_)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/tfs_[[component]]_rpc_(.+)_histogram_duration_bucket/", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "prometheus", + "definition": "label_values(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket, pod)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Pod", + "multi": true, + "name": "pod", + "options": [], + "query": { + "query": "label_values(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket, pod)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "TFS / Component RPCs", + "uid": "KKxzxIFVz", + "version": 21 +} \ No newline at end of file diff --git a/src/common/method_wrappers/tests/grafana_prometheus_device_driver.json b/src/common/method_wrappers/tests/grafana_prometheus_device_driver.json new file mode 100644 index 0000000000000000000000000000000000000000..2926a409b3b77b16c4e7b5d86ecd7d56f6acdebc --- /dev/null +++ b/src/common/method_wrappers/tests/grafana_prometheus_device_driver.json @@ -0,0 +1,431 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 26, + "iteration": 1671318718779, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(tfs_device_driver_[[method]]_counter_requests_started_total{driver=~\"[[driver]]\", pod=~\"deviceservice-[[pod]]\"})", + "interval": "", + "legendFormat": "started", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(tfs_device_driver_[[method]]_counter_requests_completed_total{driver=~\"[[driver]]\", pod=~\"deviceservice-[[pod]]\"})", + "hide": false, + "interval": "", + "legendFormat": "completed", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(tfs_device_driver_[[method]]_counter_requests_failed_total{driver=~\"[[driver]]\", pod=~\"deviceservice-[[pod]]\"})", + "hide": false, + "interval": "", + "legendFormat": "failed", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transformations": [], + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:864", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:865", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "linear", + "colorScheme": "interpolateRdYlGn", + "exponent": 0.5, + "max": null, + "min": 0, + "mode": "opacity" + }, + "dataFormat": "tsbuckets", + "datasource": "prometheus", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 6 + }, + "heatmap": {}, + "hideZeroBuckets": true, + "highlightCards": true, + "id": 2, + "interval": "60s", + "legend": { + "show": true + }, + "pluginVersion": "7.5.4", + "reverseYBuckets": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(\r\n max_over_time(tfs_device_driver_[[method]]_histogram_duration_bucket{driver=~\"[[driver]]\", pod=~\"deviceservice-[[pod]]\"}[1m]) -\r\n min_over_time(tfs_device_driver_[[method]]_histogram_duration_bucket{driver=~\"[[driver]]\", pod=~\"deviceservice-[[pod]]\"}[1m])\r\n) by (le)", + "format": "heatmap", + "instant": false, + "interval": "60s", + "intervalFactor": 1, + "legendFormat": "{{le}}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "title": "Histogram", + "tooltip": { + "show": true, + "showHistogram": true + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "s", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 14 + }, + "hiddenSeries": false, + "id": 5, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(tfs_device_driver_[[method]]_histogram_duration_sum{driver=~\"[[driver]]\", pod=~\"deviceservice-[[pod]]\"})", + "hide": false, + "interval": "", + "legendFormat": "total time", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Total Exec Time", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transformations": [], + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:407", + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:408", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "5s", + "schemaVersion": 27, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": "", + "current": { + "selected": false, + "text": "setconfig", + "value": "setconfig" + }, + "datasource": "prometheus", + "definition": "metrics(tfs_device_driver_.+)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Method", + "multi": false, + "name": "method", + "options": [], + "query": { + "query": "metrics(tfs_device_driver_.+)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/tfs_device_driver_(.+config)_histogram_duration_bucket/", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "prometheus", + "definition": "label_values(tfs_device_driver_[[method]]_histogram_duration_bucket, driver)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Driver", + "multi": true, + "name": "driver", + "options": [], + "query": { + "query": "label_values(tfs_device_driver_[[method]]_histogram_duration_bucket, driver)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "prometheus", + "definition": "label_values(tfs_device_driver_[[method]]_histogram_duration_bucket, pod)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Pod", + "multi": true, + "name": "pod", + "options": [], + "query": { + "query": "label_values(tfs_device_driver_[[method]]_histogram_duration_bucket, pod)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/deviceservice-(.*)/", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "TFS / Device / Driver", + "uid": "eAg-wsOVk", + "version": 30 +} \ No newline at end of file diff --git a/src/common/method_wrappers/tests/grafana_prometheus_service_handler.json b/src/common/method_wrappers/tests/grafana_prometheus_service_handler.json new file mode 100644 index 0000000000000000000000000000000000000000..48e770afe4bba9c2eb5df76d3532bf35d6cfe192 --- /dev/null +++ b/src/common/method_wrappers/tests/grafana_prometheus_service_handler.json @@ -0,0 +1,432 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 27, + "iteration": 1671319012315, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(tfs_service_handler_[[method]]_counter_requests_started_total{handler=~\"[[handler]]\", pod=~\"serviceservice-[[pod]]\"})", + "instant": false, + "interval": "", + "legendFormat": "started", + "queryType": "randomWalk", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(tfs_service_handler_[[method]]_counter_requests_completed_total{handler=~\"[[handler]]\", pod=~\"serviceservice-[[pod]]\"})", + "hide": false, + "interval": "", + "legendFormat": "completed", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(tfs_service_handler_[[method]]_counter_requests_failed_total{handler=~\"[[handler]]\", pod=~\"serviceservice-[[pod]]\"})", + "hide": false, + "interval": "", + "legendFormat": "failed", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transformations": [], + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:935", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:936", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "linear", + "colorScheme": "interpolateRdYlGn", + "exponent": 0.5, + "max": null, + "min": 0, + "mode": "opacity" + }, + "dataFormat": "tsbuckets", + "datasource": "prometheus", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 6 + }, + "heatmap": {}, + "hideZeroBuckets": true, + "highlightCards": true, + "id": 2, + "interval": "60s", + "legend": { + "show": true + }, + "pluginVersion": "7.5.4", + "reverseYBuckets": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(\r\n max_over_time(tfs_service_handler_[[method]]_histogram_duration_bucket{handler=~\"[[handler]]\", pod=~\"serviceservice-[[pod]]\"}[1m]) -\r\n min_over_time(tfs_service_handler_[[method]]_histogram_duration_bucket{handler=~\"[[handler]]\", pod=~\"serviceservice-[[pod]]\"}[1m])\r\n) by (le)", + "format": "heatmap", + "instant": false, + "interval": "1m", + "intervalFactor": 1, + "legendFormat": "{{le}}", + "queryType": "randomWalk", + "refId": "A" + } + ], + "timeFrom": null, + "title": "Histogram", + "tooltip": { + "show": true, + "showHistogram": true + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "s", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "prometheus", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 14 + }, + "hiddenSeries": false, + "id": 5, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(tfs_service_handler_[[method]]_histogram_duration_sum{handler=~\"[[handler]]\", pod=~\"serviceservice-[[pod]]\"})", + "hide": false, + "interval": "", + "legendFormat": "total time", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Total Exec Time", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transformations": [], + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:407", + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:408", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "5s", + "schemaVersion": 27, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": "", + "current": { + "selected": false, + "text": "setendpoint", + "value": "setendpoint" + }, + "datasource": "prometheus", + "definition": "metrics(tfs_service_handler_.+)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Method", + "multi": false, + "name": "method", + "options": [], + "query": { + "query": "metrics(tfs_service_handler_.+)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/tfs_service_handler_(.+)_histogram_duration_bucket/", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "prometheus", + "definition": "label_values(tfs_service_handler_[[method]]_histogram_duration_bucket, handler)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Handler", + "multi": true, + "name": "handler", + "options": [], + "query": { + "query": "label_values(tfs_service_handler_[[method]]_histogram_duration_bucket, handler)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "prometheus", + "definition": "label_values(tfs_service_handler_[[method]]_histogram_duration_bucket, pod)", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "Pod", + "multi": true, + "name": "pod", + "options": [], + "query": { + "query": "label_values(tfs_service_handler_[[method]]_histogram_duration_bucket, pod)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/serviceservice-(.*)/", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "TFS / Service / Handler", + "uid": "DNOhOIF4k", + "version": 16 +} \ No newline at end of file diff --git a/src/common/method_wrappers/tests/old/docker_grafana.sh b/src/common/method_wrappers/tests/old/docker_grafana.sh new file mode 100644 index 0000000000000000000000000000000000000000..2a1484d5504c69f08b23d652879f4c6bace44548 --- /dev/null +++ b/src/common/method_wrappers/tests/old/docker_grafana.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +docker create -it --name=prometheus -p 9090:9090 \ + -v /home/tfs/tfs-ctrl/test-prom-cli/prometheus.yml:/etc/prometheus/prometheus.yml \ + prom/prometheus + +docker create -it --name=grafana -p 3000:3000 \ + grafana/grafana diff --git a/src/common/method_wrappers/tests/old/prometheus.yml b/src/common/method_wrappers/tests/old/prometheus.yml new file mode 100644 index 0000000000000000000000000000000000000000..af2849209ab75eef57d41d0489bf695baa6d5fde --- /dev/null +++ b/src/common/method_wrappers/tests/old/prometheus.yml @@ -0,0 +1,23 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +global: + scrape_interval: 15s # when Prometheus is pulling data from exporters etc + evaluation_interval: 30s # time between each evaluation of Prometheus' alerting rules + +scrape_configs: +- job_name: ddd # your project name + static_configs: + - targets: + - 172.17.0.1:8000 diff --git a/src/common/method_wrappers/tests/prometheus_queries.txt b/src/common/method_wrappers/tests/prometheus_queries.txt new file mode 100644 index 0000000000000000000000000000000000000000..9eb69e970aa1daffc0a491734dad5b381051e994 --- /dev/null +++ b/src/common/method_wrappers/tests/prometheus_queries.txt @@ -0,0 +1,63 @@ +TFS/Components: +--------------- + +variables: +name=component + query=metrics(tfs_) + regex=/tfs_(.+)_rpc_.*/ +name=method + query=metrics(tfs_[[component]]_rpc_) + regex=/tfs_[[component]]_rpc_(.+)_histogram_duration_bucket/ + +plots: +tfs_[[component]]_rpc_[[method]]_counter_requests_started_total +tfs_[[component]]_rpc_[[method]]_counter_requests_completed_total +tfs_[[component]]_rpc_[[method]]_counter_requests_failed_total +tfs_[[component]]_rpc_[[method]]_histogram_duration_sum +#sum(increase(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket[$__rate_interval])) by (le) +sum( + max_over_time(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket{pod=~"[[pod]]"}[1m]) - + min_over_time(tfs_[[component]]_rpc_[[method]]_histogram_duration_bucket{pod=~"[[pod]]"}[1m]) +) by (le) + + +TFS/Device/Driver: +------------------ + +variables: +name=method + query=metrics(tfs_device_driver_.+) + regex=/tfs_device_driver_(.+config)_histogram_duration_bucket/ +name=driver + query=label_values(tfs_device_driver_[[method]]_histogram_duration_bucket, driver) + regex= + +plots: +tfs_device_driver_[[method]]_counter_requests_started_total{driver="[[driver]]"} +tfs_device_driver_[[method]]_counter_requests_completed_total{driver="[[driver]]"} +tfs_device_driver_[[method]]_counter_requests_failed_total{driver="[[driver]]"} +tfs_device_driver_[[method]]_histogram_duration_sum{driver="[[driver]]"} +#sum(increase(tfs_device_driver_[[method]]_histogram_duration_bucket{driver="[[driver]]"}[$__rate_interval])) by (le) +sum( + max_over_time(tfs_device_driver_[[method]]_histogram_duration_bucket{driver="[[driver]]", pod=~"deviceservice-[[pod]]"}[1m]) - + min_over_time(tfs_device_driver_[[method]]_histogram_duration_bucket{driver="[[driver]]", pod=~"deviceservice-[[pod]]"}[1m]) +) by (le) + +variables: +name=method + query=metrics(tfs_service_handler_.+) + regex=/tfs_service_handler_(.+config)_histogram_duration_bucket/ +name=driver + query=label_values(tfs_service_handler_[[method]]_histogram_duration_bucket, handler) + regex= + +plots: +tfs_service_handler_[[method]]_counter_requests_started_total{handler="[[handler]]"} +tfs_service_handler_[[method]]_counter_requests_completed_total{handler="[[handler]]"} +tfs_service_handler_[[method]]_counter_requests_failed_total{handler="[[handler]]"} +tfs_service_handler_[[method]]_histogram_duration_sum{handler="[[handler]]"} +#sum(increase(tfs_service_handler_[[method]]_histogram_duration_bucket{handler="[[handler]]"}[$__rate_interval])) by (le) +sum( + max_over_time(tfs_service_handler_[[method]]_histogram_duration_bucket{handler=~"[[handler]]", pod=~"serviceservice-[[pod]]"}[1m]) - + min_over_time(tfs_service_handler_[[method]]_histogram_duration_bucket{handler=~"[[handler]]", pod=~"serviceservice-[[pod]]"}[1m]) +) by (le) diff --git a/src/common/rpc_method_wrapper/tests/test_unitary.py b/src/common/method_wrappers/tests/test_unitary.py similarity index 50% rename from src/common/rpc_method_wrapper/tests/test_unitary.py rename to src/common/method_wrappers/tests/test_unitary.py index c8fc7a2aa187dcb905a8c230b047ffb1171d2ccd..95e40f6411f9ced557f79dca8f907d1d44ed0fac 100644 --- a/src/common/rpc_method_wrapper/tests/test_unitary.py +++ b/src/common/method_wrappers/tests/test_unitary.py @@ -13,24 +13,15 @@ # limitations under the License. import grpc, logging, time -from common.rpc_method_wrapper.Decorator import create_metrics, safe_and_metered_rpc_method +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method logging.basicConfig(level=logging.DEBUG) LOGGER = logging.getLogger(__name__) +METRICS_POOL = MetricsPool('Context', 'RPC') def test_database_instantiation(): - SERVICE_NAME = 'Context' - METHOD_NAMES = [ - 'ListContextIds', 'ListContexts', 'GetContext', 'SetContext', 'RemoveContext', 'GetContextEvents', - 'ListTopologyIds', 'ListTopologies', 'GetTopology', 'SetTopology', 'RemoveTopology', 'GetTopologyEvents', - 'ListDeviceIds', 'ListDevices', 'GetDevice', 'SetDevice', 'RemoveDevice', 'GetDeviceEvents', - 'ListLinkIds', 'ListLinks', 'GetLink', 'SetLink', 'RemoveLink', 'GetLinkEvents', - 'ListServiceIds', 'ListServices', 'GetService', 'SetService', 'RemoveService', 'GetServiceEvents', - ] - METRICS = create_metrics(SERVICE_NAME, METHOD_NAMES) - class TestServiceServicerImpl: - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetTopology(self, request, grpc_context : grpc.ServicerContext): print('doing funny things') time.sleep(0.1) @@ -39,6 +30,7 @@ def test_database_instantiation(): tssi = TestServiceServicerImpl() tssi.GetTopology(1, 2) - for metric_name,metric in METRICS.items(): - if 'GETTOPOLOGY_' not in metric_name: continue - print(metric_name, metric._child_samples()) # pylint: disable=protected-access + for metric_name,metric in METRICS_POOL.metrics.items(): + if 'TFS_CONTEXT_RPC_GETTOPOLOGY_' not in metric_name: continue + print(metric_name, metric._child_samples()) + raise Exception() diff --git a/src/common/orm/HighLevel.py b/src/common/orm/HighLevel.py index a5bdeae3e9607767b5215f6ff87cb0d8624918d0..3a4b0d6618d4b6ddc8ba185d65b796533a8bbc10 100644 --- a/src/common/orm/HighLevel.py +++ b/src/common/orm/HighLevel.py @@ -13,7 +13,7 @@ # limitations under the License. from typing import Any, Dict, List, Optional, Set, Tuple -from common.rpc_method_wrapper.ServiceExceptions import NotFoundException +from common.method_wrappers.ServiceExceptions import NotFoundException from common.orm.Database import Database from common.orm.backend.Tools import key_to_str from common.orm.fields.ForeignKeyField import ForeignKeyField diff --git a/src/common/rpc_method_wrapper/Decorator.py b/src/common/rpc_method_wrapper/Decorator.py deleted file mode 100644 index 5fc814e7079c45818c00b4be87096e33342cd2a5..0000000000000000000000000000000000000000 --- a/src/common/rpc_method_wrapper/Decorator.py +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import grpc, logging -from enum import Enum -from typing import Dict, List -from prometheus_client import Counter, Histogram -from prometheus_client.metrics import MetricWrapperBase, INF -from common.tools.grpc.Tools import grpc_message_to_json_string -from .ServiceExceptions import ServiceException - -class RequestConditionEnum(Enum): - STARTED = 'started' - COMPLETED = 'completed' - FAILED = 'failed' - -def get_counter_requests(method_name : str, request_condition : RequestConditionEnum) -> Counter: - str_request_condition = request_condition.value - name = '{:s}_counter_requests_{:s}'.format(method_name.replace(':', '_'), str_request_condition) - description = '{:s} counter of requests {:s}'.format(method_name, str_request_condition) - return Counter(name, description) - -def get_histogram_duration(method_name : str) -> Histogram: - name = '{:s}_histogram_duration'.format(method_name.replace(':', '_')) - description = '{:s} histogram of request duration'.format(method_name) - return Histogram(name, description, buckets=( - .005, - .01, .02, .03, .04, .05, .06, .07, .08, .09, - .1, .2, .3, .4, .5, .6, .7, .8, .9, - 1, 2, 3, 4, 5, 6, 7, 8, 9, - INF)) - -METRIC_TEMPLATES = { - '{:s}_COUNTER_STARTED' : lambda method_name: get_counter_requests (method_name, RequestConditionEnum.STARTED), - '{:s}_COUNTER_COMPLETED' : lambda method_name: get_counter_requests (method_name, RequestConditionEnum.COMPLETED), - '{:s}_COUNTER_FAILED' : lambda method_name: get_counter_requests (method_name, RequestConditionEnum.FAILED), - '{:s}_HISTOGRAM_DURATION': lambda method_name: get_histogram_duration(method_name), -} - -def create_metrics(service_name : str, method_names : List[str]) -> Dict[str, MetricWrapperBase]: - metrics = {} - for method_name in method_names: - for template_name, template_generator_function in METRIC_TEMPLATES.items(): - metric_name = template_name.format(method_name).upper() - metrics[metric_name] = template_generator_function('{:s}:{:s}'.format(service_name, method_name)) - return metrics - -def safe_and_metered_rpc_method(metrics : Dict[str, MetricWrapperBase], logger : logging.Logger): - def outer_wrapper(func): - function_name = func.__name__ - HISTOGRAM_DURATION : Histogram = metrics.get('{:s}_HISTOGRAM_DURATION'.format(function_name).upper()) - COUNTER_STARTED : Counter = metrics.get('{:s}_COUNTER_STARTED' .format(function_name).upper()) - COUNTER_COMPLETED : Counter = metrics.get('{:s}_COUNTER_COMPLETED' .format(function_name).upper()) - COUNTER_FAILED : Counter = metrics.get('{:s}_COUNTER_FAILED' .format(function_name).upper()) - - @HISTOGRAM_DURATION.time() - def inner_wrapper(self, request, grpc_context : grpc.ServicerContext): - COUNTER_STARTED.inc() - try: - logger.debug('{:s} request: {:s}'.format(function_name, grpc_message_to_json_string(request))) - reply = func(self, request, grpc_context) - logger.debug('{:s} reply: {:s}'.format(function_name, grpc_message_to_json_string(reply))) - COUNTER_COMPLETED.inc() - return reply - except ServiceException as e: # pragma: no cover (ServiceException not thrown) - if e.code not in [grpc.StatusCode.NOT_FOUND, grpc.StatusCode.ALREADY_EXISTS]: - # Assume not found or already exists is just a condition, not an error - logger.exception('{:s} exception'.format(function_name)) - COUNTER_FAILED.inc() - grpc_context.abort(e.code, e.details) - except Exception as e: # pragma: no cover, pylint: disable=broad-except - logger.exception('{:s} exception'.format(function_name)) - COUNTER_FAILED.inc() - grpc_context.abort(grpc.StatusCode.INTERNAL, str(e)) - return inner_wrapper - return outer_wrapper diff --git a/src/common/tools/descriptor/Loader.py b/src/common/tools/descriptor/Loader.py index f14e2caf6065996ea6223449f309e03d141b5954..e3fc86c0538ae71008c15fd41e70f4f0f3c23763 100644 --- a/src/common/tools/descriptor/Loader.py +++ b/src/common/tools/descriptor/Loader.py @@ -250,5 +250,4 @@ class DescriptorLoader: num_ok += 1 except Exception as e: # pylint: disable=broad-except error_list.append(f'{str(entity)}: {str(e)}') - num_err += 1 self.__results.append((entity_name, action_name, num_ok, error_list)) diff --git a/src/common/tools/object_factory/Service.py b/src/common/tools/object_factory/Service.py index 66785fbb45ab83663e87c67387a84f20c607a317..3dcc83a84a24b9c0ad034ec44031aa104b9a1cf4 100644 --- a/src/common/tools/object_factory/Service.py +++ b/src/common/tools/object_factory/Service.py @@ -42,6 +42,16 @@ def json_service( 'service_config' : {'config_rules': copy.deepcopy(config_rules)}, } +def json_service_l2nm_planned( + service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], + config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_UUID + ): + + return json_service( + service_uuid, ServiceTypeEnum.SERVICETYPE_L2NM, context_id=json_context_id(context_uuid), + status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints, + config_rules=config_rules) + def json_service_l3nm_planned( service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_NAME diff --git a/src/common/tools/object_factory/Slice.py b/src/common/tools/object_factory/Slice.py index 6ab666aa6ed379eb0b8948b1178aa13069d70bf4..2376784e3237992ab3d18d9d70db41b3a3f23560 100644 --- a/src/common/tools/object_factory/Slice.py +++ b/src/common/tools/object_factory/Slice.py @@ -14,7 +14,9 @@ import copy from typing import Dict, List, Optional +from common.Constants import DEFAULT_CONTEXT_UUID from common.proto.context_pb2 import SliceStatusEnum +from common.tools.object_factory.Context import json_context_id def get_slice_uuid(a_endpoint_id : Dict, z_endpoint_id : Dict) -> str: return 'slc:{:s}/{:s}=={:s}/{:s}'.format( @@ -30,13 +32,13 @@ def json_slice_owner(owner_uuid : str, owner_string : str) -> Dict: return {'owner_uuid': {'uuid': owner_uuid}, 'owner_string': owner_string} def json_slice( - slice_uuid : str, context_id : Optional[Dict] = None, + slice_uuid : str, context_uuid : str = DEFAULT_CONTEXT_UUID, status : SliceStatusEnum = SliceStatusEnum.SLICESTATUS_PLANNED, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], config_rules : List[Dict] = [], service_ids : List[Dict] = [], subslice_ids : List[Dict] = [], owner : Optional[Dict] = None): result = { - 'slice_id' : json_slice_id(slice_uuid, context_id=context_id), + 'slice_id' : json_slice_id(slice_uuid, context_id=json_context_id(context_uuid)), 'slice_status' : {'slice_status': status}, 'slice_endpoint_ids': copy.deepcopy(endpoint_ids), 'slice_constraints' : copy.deepcopy(constraints), diff --git a/src/compute/service/ComputeServiceServicerImpl.py b/src/compute/service/ComputeServiceServicerImpl.py index f8ffd912f065ddc11829f8e9e85559b13576a222..a47a1db6c6fd7ffea16ab23be2997e3c929fb68b 100644 --- a/src/compute/service/ComputeServiceServicerImpl.py +++ b/src/compute/service/ComputeServiceServicerImpl.py @@ -13,56 +13,51 @@ # limitations under the License. import grpc, logging +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.proto.context_pb2 import ( AuthenticationResult, Empty, Service, ServiceId, ServiceIdList, ServiceStatus, TeraFlowController) from common.proto.compute_pb2_grpc import ComputeServiceServicer -from common.rpc_method_wrapper.Decorator import create_metrics, safe_and_metered_rpc_method LOGGER = logging.getLogger(__name__) -SERVICE_NAME = 'Compute' -METHOD_NAMES = [ - 'CheckCredentials', 'GetConnectivityServiceStatus', 'CreateConnectivityService', 'EditConnectivityService', - 'DeleteConnectivityService', 'GetAllActiveConnectivityServices', 'ClearAllConnectivityServices' -] -METRICS = create_metrics(SERVICE_NAME, METHOD_NAMES) +METRICS_POOL = MetricsPool('Compute', 'RPC') class ComputeServiceServicerImpl(ComputeServiceServicer): def __init__(self): LOGGER.info('Creating Servicer...') LOGGER.info('Servicer Created') - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def CheckCredentials(self, request : TeraFlowController, context : grpc.ServicerContext) -> AuthenticationResult: LOGGER.warning('NOT IMPLEMENTED') return AuthenticationResult() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetConnectivityServiceStatus(self, request : ServiceId, context : grpc.ServicerContext) -> ServiceStatus: LOGGER.warning('NOT IMPLEMENTED') return ServiceStatus() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def CreateConnectivityService(self, request : Service, context : grpc.ServicerContext) -> ServiceId: LOGGER.warning('NOT IMPLEMENTED') return ServiceId() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def EditConnectivityService(self, request : Service, context : grpc.ServicerContext) -> ServiceId: LOGGER.warning('NOT IMPLEMENTED') return ServiceId() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def DeleteConnectivityService(self, request : Service, context : grpc.ServicerContext) -> Empty: LOGGER.warning('NOT IMPLEMENTED') return Empty() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetAllActiveConnectivityServices(self, request : Empty, context : grpc.ServicerContext) -> ServiceIdList: LOGGER.warning('NOT IMPLEMENTED') return ServiceIdList() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def ClearAllConnectivityServices(self, request : Empty, context : grpc.ServicerContext) -> Empty: LOGGER.warning('NOT IMPLEMENTED') return Empty() diff --git a/src/dbscanserving/service/DbscanServiceServicerImpl.py b/src/dbscanserving/service/DbscanServiceServicerImpl.py index 5560eec1e333c16c0ea980a5af14e856c3909431..b14729d36d403a2b246183751d9ecb077a92caeb 100644 --- a/src/dbscanserving/service/DbscanServiceServicerImpl.py +++ b/src/dbscanserving/service/DbscanServiceServicerImpl.py @@ -14,15 +14,13 @@ import os, grpc, logging from sklearn.cluster import DBSCAN -from common.rpc_method_wrapper.Decorator import create_metrics, safe_and_metered_rpc_method +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from dbscanserving.proto.dbscanserving_pb2 import DetectionRequest, DetectionResponse from dbscanserving.proto.dbscanserving_pb2_grpc import DetectorServicer LOGGER = logging.getLogger(__name__) -SERVICE_NAME = 'DbscanServing' -METHOD_NAMES = ['Detect'] -METRICS = create_metrics(SERVICE_NAME, METHOD_NAMES) +METRICS_POOL = MetricsPool('DbscanServing', 'RPC') class DbscanServiceServicerImpl(DetectorServicer): @@ -31,7 +29,7 @@ class DbscanServiceServicerImpl(DetectorServicer): LOGGER.debug('Creating Servicer...') LOGGER.debug('Servicer Created') - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def Detect(self, request : DetectionRequest, context : grpc.ServicerContext) -> DetectionResponse: if request.num_samples != len(request.samples): context.set_details("The sample dimension declared does not match with the number of samples received.") diff --git a/src/device/service/DeviceServiceServicerImpl.py b/src/device/service/DeviceServiceServicerImpl.py index d5d44f34ffb69a337b715a0884aea3770b3d3cec..88f49de6fb5c07e39b7efc9d26ccba135f95c929 100644 --- a/src/device/service/DeviceServiceServicerImpl.py +++ b/src/device/service/DeviceServiceServicerImpl.py @@ -14,6 +14,8 @@ import grpc, json, logging, re from typing import Any, Dict, List, Tuple +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.method_wrappers.ServiceExceptions import InvalidArgumentException, OperationFailedException from common.orm.Database import Database from common.orm.HighLevel import get_object, update_or_create_object from common.orm.backend.Tools import key_to_str @@ -21,8 +23,6 @@ from common.proto.context_pb2 import ConfigActionEnum, Device, DeviceConfig, Dev from common.proto.device_pb2 import MonitoringSettings from common.proto.device_pb2_grpc import DeviceServiceServicer from common.proto.kpi_sample_types_pb2 import KpiSampleType -from common.rpc_method_wrapper.Decorator import create_metrics, safe_and_metered_rpc_method -from common.rpc_method_wrapper.ServiceExceptions import InvalidArgumentException, OperationFailedException from common.tools.grpc.Tools import grpc_message_to_json from common.tools.mutex_queues.MutexQueues import MutexQueues from context.client.ContextClient import ContextClient @@ -44,9 +44,7 @@ from .MonitoringLoops import MonitoringLoops LOGGER = logging.getLogger(__name__) -SERVICE_NAME = 'Device' -METHOD_NAMES = ['AddDevice', 'ConfigureDevice', 'DeleteDevice', 'GetInitialConfig', 'MonitorDeviceKpi'] -METRICS = create_metrics(SERVICE_NAME, METHOD_NAMES) +METRICS_POOL = MetricsPool('Device', 'RPC') class DeviceServiceServicerImpl(DeviceServiceServicer): def __init__( @@ -60,7 +58,7 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): self.mutex_queues = MutexQueues() LOGGER.debug('Servicer Created') - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def AddDevice(self, request : Device, context : grpc.ServicerContext) -> DeviceId: device_id = request.device_id device_uuid = device_id.device_uuid.uuid @@ -176,7 +174,7 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): finally: self.mutex_queues.signal_done(device_uuid) - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def ConfigureDevice(self, request : Device, context : grpc.ServicerContext) -> DeviceId: device_id = request.device_id device_uuid = device_id.device_uuid.uuid @@ -243,7 +241,7 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): self.mutex_queues.signal_done(device_uuid) - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def DeleteDevice(self, request : DeviceId, context : grpc.ServicerContext) -> Empty: device_uuid = request.device_uuid.uuid @@ -288,7 +286,7 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): finally: self.mutex_queues.signal_done(device_uuid) - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetInitialConfig(self, request : DeviceId, context : grpc.ServicerContext) -> DeviceConfig: device_uuid = request.device_uuid.uuid @@ -303,7 +301,7 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): finally: self.mutex_queues.signal_done(device_uuid) - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def MonitorDeviceKpi(self, request : MonitoringSettings, context : grpc.ServicerContext) -> Empty: kpi_uuid = request.kpi_id.kpi_id.uuid device_uuid = request.kpi_descriptor.device_id.device_uuid.uuid diff --git a/src/device/service/database/DatabaseTools.py b/src/device/service/database/DatabaseTools.py index 4409f078b78b7369702e262ec7e371adcd35a7cd..9d3b712cade921849a5b34be3a837e4f6697b76f 100644 --- a/src/device/service/database/DatabaseTools.py +++ b/src/device/service/database/DatabaseTools.py @@ -14,11 +14,11 @@ import grpc from typing import Any, Dict, Tuple +from common.method_wrappers.ServiceExceptions import InvalidArgumentException from common.orm.Database import Database from common.orm.HighLevel import get_or_create_object, update_or_create_object from common.orm.backend.Tools import key_to_str from common.proto.context_pb2 import Device, DeviceId -from common.rpc_method_wrapper.ServiceExceptions import InvalidArgumentException from context.client.ContextClient import ContextClient from device.service.driver_api.FilterFields import FilterFieldEnum from .ConfigModel import delete_all_config_rules, grpc_config_rules_to_raw, update_config diff --git a/src/device/service/drivers/emulated/EmulatedDriver.py b/src/device/service/drivers/emulated/EmulatedDriver.py index 2ee9a10ca93ceead96115528873c8876fadcf8ed..6029ff6604b2525b4509a24a2ec0d6f7c38513d0 100644 --- a/src/device/service/drivers/emulated/EmulatedDriver.py +++ b/src/device/service/drivers/emulated/EmulatedDriver.py @@ -19,6 +19,7 @@ from apscheduler.executors.pool import ThreadPoolExecutor from apscheduler.job import Job from apscheduler.jobstores.memory import MemoryJobStore from apscheduler.schedulers.background import BackgroundScheduler +from common.method_wrappers.Decorator import MetricTypeEnum, MetricsPool, metered_subclass_method, INF from common.type_checkers.Checkers import chk_float, chk_length, chk_string, chk_type from device.service.database.KpiSampleType import ORM_KpiSampleTypeEnum, grpc_to_enum__kpi_sample_type from device.service.driver_api._Driver import ( @@ -122,6 +123,24 @@ def do_sampling( value = abs(0.95 * waveform + 0.05 * noise) out_samples.put_nowait((timestamp, resource_key, value)) +HISTOGRAM_BUCKETS = ( + # .005, .01, .025, .05, .075, .1, .25, .5, .75, 1.0, INF + 0.0001, 0.00025, 0.00050, 0.00075, + 0.0010, 0.0025, 0.0050, 0.0075, + 0.0100, 0.0250, 0.0500, 0.0750, + 0.1000, 0.2500, 0.5000, 0.7500, + 1.0000, 2.5000, 5.0000, 7.5000, + 10.0, 25.0, 50.0, 75.0, + 100.0, INF +) +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': 'emulated'}) +METRICS_POOL.get_or_create('GetInitialConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('GetConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('SetConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('SubscribeState', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('UnsubscribeState', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) + class EmulatedDriver(_Driver): def __init__(self, address : str, port : int, **settings) -> None: # pylint: disable=super-init-not-called self.__lock = threading.Lock() @@ -170,10 +189,12 @@ class EmulatedDriver(_Driver): self.__scheduler.shutdown() return True + @metered_subclass_method(METRICS_POOL) def GetInitialConfig(self) -> List[Tuple[str, Any]]: with self.__lock: return dump_subtree(self.__initial) + @metered_subclass_method(METRICS_POOL) def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: chk_type('resources', resource_keys, list) with self.__lock: @@ -197,6 +218,7 @@ class EmulatedDriver(_Driver): results.extend(dump_subtree(resource_node)) return results + @metered_subclass_method(METRICS_POOL) def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] @@ -231,6 +253,7 @@ class EmulatedDriver(_Driver): results.append(True) return results + @metered_subclass_method(METRICS_POOL) def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] @@ -268,6 +291,7 @@ class EmulatedDriver(_Driver): results.append(True) return results + @metered_subclass_method(METRICS_POOL) def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: chk_type('subscriptions', subscriptions, list) if len(subscriptions) == 0: return [] @@ -305,6 +329,7 @@ class EmulatedDriver(_Driver): results.append(True) return results + @metered_subclass_method(METRICS_POOL) def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: chk_type('subscriptions', subscriptions, list) if len(subscriptions) == 0: return [] diff --git a/src/device/service/drivers/microwave/IETFApiDriver.py b/src/device/service/drivers/microwave/IETFApiDriver.py index 4d5ec439f4085575fc0f7fddb228d30dab3010b5..3660eb7195c96eca3d95ed16f665ba6363c3d7b5 100644 --- a/src/device/service/drivers/microwave/IETFApiDriver.py +++ b/src/device/service/drivers/microwave/IETFApiDriver.py @@ -13,7 +13,9 @@ # limitations under the License. import logging, requests, threading +from requests.auth import HTTPBasicAuth from typing import Any, Iterator, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.type_checkers.Checkers import chk_string, chk_type from device.service.driver_api._Driver import _Driver from . import ALL_RESOURCE_KEYS @@ -21,20 +23,27 @@ from .Tools import create_connectivity_service, find_key, config_getter, delete_ LOGGER = logging.getLogger(__name__) +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': 'microwave'}) + class IETFApiDriver(_Driver): def __init__(self, address: str, port: int, **settings) -> None: # pylint: disable=super-init-not-called self.__lock = threading.Lock() self.__started = threading.Event() self.__terminate = threading.Event() - self.__ietf_root = 'https://' + address + ':' + str(port) + username = settings.get('username') + password = settings.get('password') + self.__auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None + scheme = settings.get('scheme', 'http') + self.__ietf_root = '{:s}://{:s}:{:d}'.format(scheme, address, int(port)) self.__timeout = int(settings.get('timeout', 120)) + self.__node_ids = set(settings.get('node_ids', [])) def Connect(self) -> bool: url = self.__ietf_root + '/nmswebs/restconf/data/ietf-network:networks' with self.__lock: if self.__started.is_set(): return True try: - requests.get(url, timeout=self.__timeout, verify=False) + requests.get(url, timeout=self.__timeout, verify=False, auth=self.__auth) except requests.exceptions.Timeout: LOGGER.exception('Timeout connecting {:s}'.format(str(self.__ietf_root))) return False @@ -50,10 +59,12 @@ class IETFApiDriver(_Driver): self.__terminate.set() return True + @metered_subclass_method(METRICS_POOL) def GetInitialConfig(self) -> List[Tuple[str, Any]]: with self.__lock: return [] + @metered_subclass_method(METRICS_POOL) def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: chk_type('resources', resource_keys, list) results = [] @@ -62,9 +73,12 @@ class IETFApiDriver(_Driver): for i, resource_key in enumerate(resource_keys): str_resource_name = 'resource_key[#{:d}]'.format(i) chk_string(str_resource_name, resource_key, allow_empty=False) - results.extend(config_getter(self.__ietf_root, resource_key, self.__timeout)) + results.extend(config_getter( + self.__ietf_root, resource_key, timeout=self.__timeout, auth=self.__auth, + node_ids=self.__node_ids)) return results + @metered_subclass_method(METRICS_POOL) def SetConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: results = [] if len(resources) == 0: @@ -81,10 +95,12 @@ class IETFApiDriver(_Driver): uuid = find_key(resource, 'uuid') data = create_connectivity_service( - self.__ietf_root, self.__timeout, uuid, node_id_src, tp_id_src, node_id_dst, tp_id_dst, vlan_id) + self.__ietf_root, uuid, node_id_src, tp_id_src, node_id_dst, tp_id_dst, vlan_id, + timeout=self.__timeout, auth=self.__auth) results.extend(data) return results + @metered_subclass_method(METRICS_POOL) def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: results = [] if len(resources) == 0: return results @@ -92,13 +108,16 @@ class IETFApiDriver(_Driver): for resource in resources: LOGGER.info('resource = {:s}'.format(str(resource))) uuid = find_key(resource, 'uuid') - results.extend(delete_connectivity_service(self.__ietf_root, self.__timeout, uuid)) + results.extend(delete_connectivity_service( + self.__ietf_root, uuid, timeout=self.__timeout, auth=self.__auth)) return results + @metered_subclass_method(METRICS_POOL) def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: # TODO: IETF API Driver does not support monitoring by now return [False for _ in subscriptions] + @metered_subclass_method(METRICS_POOL) def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: # TODO: IETF API Driver does not support monitoring by now return [False for _ in subscriptions] diff --git a/src/device/service/drivers/microwave/Tools.py b/src/device/service/drivers/microwave/Tools.py index 4f74def4dd6c370a9d2bf07b1fbe85670f5c2956..a91c60af5bf9e7057aa8f3fe9a98947f84859cd3 100644 --- a/src/device/service/drivers/microwave/Tools.py +++ b/src/device/service/drivers/microwave/Tools.py @@ -13,6 +13,8 @@ # limitations under the License. import json, logging, requests +from requests.auth import HTTPBasicAuth +from typing import Optional, Set from device.service.driver_api._Driver import RESOURCE_ENDPOINTS LOGGER = logging.getLogger(__name__) @@ -28,6 +30,8 @@ def find_key(resource, key): return json.loads(resource[1])[key] # this function exports only the endpoints which are not already involved in a microwave physical link +# TODO: improvement: create a Set[Tuple[node_id:str, tp_id:str]] containing the endpoints involved in links +# TODO: exportable endpoints are those not in this set. That will prevent looping through links for every endpoint def is_exportable_endpoint(node, termination_point_id, links): # for each link we check if the endpoint (termination_point_id) is already used by an existing link for link in links: @@ -39,7 +43,10 @@ def is_exportable_endpoint(node, termination_point_id, links): return False return True -def config_getter(root_url, resource_key, timeout): +def config_getter( + root_url : str, resource_key : str, auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None, + node_ids : Set[str] = set() +): # getting endpoints network_name = 'SIAE-ETH-TOPOLOGY' FIELDS = ''.join([ @@ -51,51 +58,53 @@ def config_getter(root_url, resource_key, timeout): url = URL_TEMPLATE.format(root_url, network_name, FIELDS) result = [] - try: - response = requests.get(url, timeout=timeout, verify=False) - except requests.exceptions.Timeout: - LOGGER.exception('Timeout connecting {:s}'.format(url)) - except Exception as e: # pylint: disable=broad-except - LOGGER.exception('Exception retrieving {:s}'.format(resource_key)) - result.append((resource_key, e)) - else: - context = json.loads(response.content) - if resource_key == RESOURCE_ENDPOINTS: + if resource_key == RESOURCE_ENDPOINTS: + # getting existing endpoints + try: + response = requests.get(url, timeout=timeout, verify=False, auth=auth) + context = json.loads(response.content) network_instance = context.get('ietf-network:network', {}) links = network_instance.get('ietf-network-topology:link', []) - for sip in network_instance['node']: - tp = sip['ietf-network-topology:termination-point'] - node_id = sip['node-id'] - for te in tp: - tp_id = te['tp-id'] + for node in network_instance['node']: + node_id = node['node-id'] + if len(node_ids) > 0 and node_id not in node_ids: continue + tp_list = node['ietf-network-topology:termination-point'] + for tp in tp_list: + tp_id = tp['tp-id'] if not is_exportable_endpoint(node_id, tp_id, links): continue - resource_key = '/endpoints/endpoint[{:s}:{:s}]'.format(node_id,tp_id) - resource_value = {'uuid': tp_id, 'type': te['ietf-te-topology:te']['name']} + tp_uuid = '{:s}:{:s}'.format(node_id,tp_id) + resource_key = '/endpoints/endpoint[{:s}]'.format(tp_uuid) + resource_value = {'uuid': tp_uuid, 'type': tp['ietf-te-topology:te']['name']} result.append((resource_key, resource_value)) - - # getting created services - url = '{:s}/nmswebs/restconf/data/ietf-eth-tran-service:etht-svc'.format(root_url) - try: - response = requests.get(url, timeout=timeout, verify=False) - except requests.exceptions.Timeout: - LOGGER.exception('Timeout connecting {:s}'.format(url)) - except Exception as e: # pylint: disable=broad-except - LOGGER.exception('Exception retrieving {:s}'.format(resource_key)) - result.append((resource_key, e)) + except requests.exceptions.Timeout: + LOGGER.exception('Timeout connecting {:s}'.format(url)) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Exception retrieving/parsing endpoints for {:s}'.format(resource_key)) + result.append((resource_key, e)) else: - context = json.loads(response.content) - if resource_key == RESOURCE_ENDPOINTS: + # getting created services + url = '{:s}/nmswebs/restconf/data/ietf-eth-tran-service:etht-svc'.format(root_url) + try: + response = requests.get(url, timeout=timeout, verify=False, auth=auth) + context = json.loads(response.content) etht_service = context.get('ietf-eth-tran-service:etht-svc', {}) service_instances = etht_service.get('etht-svc-instances', []) for service in service_instances: service_name = service['etht-svc-name'] resource_key = '/services/service[{:s}]'.format(service_name) - resource_value = {'uuid': service_name, 'type': service['etht-svc-type']} - result.append((resource_key, resource_value)) + result.append((resource_key, service)) + except requests.exceptions.Timeout: + LOGGER.exception('Timeout connecting {:s}'.format(url)) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Exception retrieving/parsing services for {:s}'.format(resource_key)) + result.append((resource_key, e)) + return result def create_connectivity_service( - root_url, timeout, uuid, node_id_src, tp_id_src, node_id_dst, tp_id_dst, vlan_id): + root_url, uuid, node_id_src, tp_id_src, node_id_dst, tp_id_dst, vlan_id, + auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None +): url = '{:s}/nmswebs/restconf/data/ietf-eth-tran-service:etht-svc'.format(root_url) headers = {'content-type': 'application/json'} @@ -128,7 +137,8 @@ def create_connectivity_service( results = [] try: LOGGER.info('Connectivity service {:s}: {:s}'.format(str(uuid), str(data))) - response = requests.post(url=url, data=json.dumps(data), timeout=timeout, headers=headers, verify=False) + response = requests.post( + url=url, data=json.dumps(data), timeout=timeout, headers=headers, verify=False, auth=auth) LOGGER.info('Microwave Driver response: {:s}'.format(str(response))) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Exception creating ConnectivityService(uuid={:s}, data={:s})'.format(str(uuid), str(data))) @@ -140,12 +150,12 @@ def create_connectivity_service( results.append(response.status_code in HTTP_OK_CODES) return results -def delete_connectivity_service(root_url, timeout, uuid): +def delete_connectivity_service(root_url, uuid, auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None): url = '{:s}/nmswebs/restconf/data/ietf-eth-tran-service:etht-svc/etht-svc-instances={:s}' url = url.format(root_url, uuid) results = [] try: - response = requests.delete(url=url, timeout=timeout, verify=False) + response = requests.delete(url=url, timeout=timeout, verify=False, auth=auth) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Exception deleting ConnectivityService(uuid={:s})'.format(str(uuid))) results.append(e) diff --git a/src/device/service/drivers/openconfig/OpenConfigDriver.py b/src/device/service/drivers/openconfig/OpenConfigDriver.py index 9342e650b9fadb21fa1b65fb951a08ae6f066a3c..4aa42b180d9816a9ecdf37a1ec351cb52b9ba41c 100644 --- a/src/device/service/drivers/openconfig/OpenConfigDriver.py +++ b/src/device/service/drivers/openconfig/OpenConfigDriver.py @@ -21,6 +21,7 @@ from apscheduler.job import Job from apscheduler.jobstores.memory import MemoryJobStore from apscheduler.schedulers.background import BackgroundScheduler from ncclient.manager import Manager, connect_ssh +from common.method_wrappers.Decorator import MetricTypeEnum, MetricsPool, metered_subclass_method, INF from common.tools.client.RetryDecorator import delay_exponential from common.type_checkers.Checkers import chk_length, chk_string, chk_type, chk_float from device.service.driver_api.Exceptions import UnsupportedResourceKeyException @@ -222,6 +223,24 @@ def edit_config( results[i] = e # if validation fails, store the exception return results +HISTOGRAM_BUCKETS = ( + # .005, .01, .025, .05, .075, .1, .25, .5, .75, 1.0, INF + 0.0001, 0.00025, 0.00050, 0.00075, + 0.0010, 0.0025, 0.0050, 0.0075, + 0.0100, 0.0250, 0.0500, 0.0750, + 0.1000, 0.2500, 0.5000, 0.7500, + 1.0000, 2.5000, 5.0000, 7.5000, + 10.0, 25.0, 50.0, 75.0, + 100.0, INF +) +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': 'openconfig'}) +METRICS_POOL.get_or_create('GetInitialConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('GetConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('SetConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('SubscribeState', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('UnsubscribeState', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) + class OpenConfigDriver(_Driver): def __init__(self, address : str, port : int, **settings) -> None: # pylint: disable=super-init-not-called self.__lock = threading.Lock() @@ -260,10 +279,12 @@ class OpenConfigDriver(_Driver): self.__netconf_handler.disconnect() return True + @metered_subclass_method(METRICS_POOL) def GetInitialConfig(self) -> List[Tuple[str, Any]]: with self.__lock: return [] + @metered_subclass_method(METRICS_POOL) def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: chk_type('resources', resource_keys, list) results = [] @@ -284,6 +305,7 @@ class OpenConfigDriver(_Driver): results.append((resource_key, e)) # if validation fails, store the exception return results + @metered_subclass_method(METRICS_POOL) def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] @@ -303,6 +325,7 @@ class OpenConfigDriver(_Driver): results = edit_config(self.__netconf_handler, resources) return results + @metered_subclass_method(METRICS_POOL) def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] @@ -322,6 +345,7 @@ class OpenConfigDriver(_Driver): results = edit_config(self.__netconf_handler, resources, delete=True) return results + @metered_subclass_method(METRICS_POOL) def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: chk_type('subscriptions', subscriptions, list) if len(subscriptions) == 0: return [] @@ -359,6 +383,7 @@ class OpenConfigDriver(_Driver): results.append(True) return results + @metered_subclass_method(METRICS_POOL) def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: chk_type('subscriptions', subscriptions, list) if len(subscriptions) == 0: return [] diff --git a/src/device/service/drivers/p4/p4_driver.py b/src/device/service/drivers/p4/p4_driver.py index b8ff795fbd9466874b07f1f752fce682ea741111..606bb91ebe5e14804bbdd4f34e7c795c6cfd1b32 100644 --- a/src/device/service/drivers/p4/p4_driver.py +++ b/src/device/service/drivers/p4/p4_driver.py @@ -21,6 +21,7 @@ import json import logging import threading from typing import Any, Iterator, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.type_checkers.Checkers import chk_type, chk_length, chk_string from .p4_common import matches_ipv4, matches_ipv6, valid_port,\ P4_ATTR_DEV_ID, P4_ATTR_DEV_NAME, P4_ATTR_DEV_VENDOR,\ @@ -40,6 +41,7 @@ except ImportError: LOGGER = logging.getLogger(__name__) +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': 'p4'}) class P4Driver(_Driver): """ @@ -158,6 +160,7 @@ class P4Driver(_Driver): return True + @metered_subclass_method(METRICS_POOL) def GetInitialConfig(self) -> List[Tuple[str, Any]]: """ Retrieve the initial configuration of a P4 device. @@ -172,6 +175,7 @@ class P4Driver(_Driver): self.__endpoint) return [] + @metered_subclass_method(METRICS_POOL) def GetConfig(self, resource_keys: List[str] = [])\ -> List[Tuple[str, Union[Any, None, Exception]]]: """ @@ -199,6 +203,7 @@ class P4Driver(_Driver): with self.__lock: return self.__get_resources(resource_keys) + @metered_subclass_method(METRICS_POOL) def SetConfig(self, resources: List[Tuple[str, Any]])\ -> List[Union[bool, Exception]]: """ @@ -222,6 +227,7 @@ class P4Driver(_Driver): with self.__lock: return self.__set_resources(resources) + @metered_subclass_method(METRICS_POOL) def DeleteConfig(self, resources: List[Tuple[str, Any]])\ -> List[Union[bool, Exception]]: """ @@ -268,6 +274,7 @@ class P4Driver(_Driver): LOGGER.warning("GetState() RPC not yet implemented by the P4 driver") return [] + @metered_subclass_method(METRICS_POOL) def SubscribeState(self, subscriptions: List[Tuple[str, float, float]])\ -> List[Union[bool, Exception]]: """ @@ -280,6 +287,7 @@ class P4Driver(_Driver): "SubscribeState() RPC not yet implemented by the P4 driver") return [False for _ in subscriptions] + @metered_subclass_method(METRICS_POOL) def UnsubscribeState(self, subscriptions: List[Tuple[str, float, float]])\ -> List[Union[bool, Exception]]: """ diff --git a/src/device/service/drivers/transport_api/Tools.py b/src/device/service/drivers/transport_api/Tools.py index 6ae928eb8f6bf8371dbf28b7ee9cc1995b3c191f..8989294194203d384348f4d2499252555fcb9aaa 100644 --- a/src/device/service/drivers/transport_api/Tools.py +++ b/src/device/service/drivers/transport_api/Tools.py @@ -47,7 +47,15 @@ def config_getter(root_url, resource_key, timeout): elif 'context' in context: context = context['context'] for sip in context['service-interface-point']: - endpoint_type = sip.get('layer-protocol-name', '10Gbps') + layer_protocol_name = sip.get('layer-protocol-name', '?') + supportable_spectrum = sip.get('tapi-photonic-media:media-channel-service-interface-point-spec', {}) + supportable_spectrum = supportable_spectrum.get('mc-pool', {}) + supportable_spectrum = supportable_spectrum.get('supportable-spectrum', []) + supportable_spectrum = supportable_spectrum[0] if len(supportable_spectrum) == 1 else {} + grid_type = supportable_spectrum.get('frequency-constraint', {}).get('grid-type') + granularity = supportable_spectrum.get('frequency-constraint', {}).get('adjustment-granularity') + direction = sip.get('direction', '?') + endpoint_type = ':'.join([layer_protocol_name, grid_type, granularity, direction]) endpoint_url = '/endpoints/endpoint[{:s}]'.format(sip['uuid']) endpoint_data = {'uuid': sip['uuid'], 'type': endpoint_type} result.append((endpoint_url, endpoint_data)) diff --git a/src/device/service/drivers/transport_api/TransportApiDriver.py b/src/device/service/drivers/transport_api/TransportApiDriver.py index b0ecfe32f63b2568d7b5fb7498e532935aee018c..71d7aa33678cb945443565e1766de3234d947ef8 100644 --- a/src/device/service/drivers/transport_api/TransportApiDriver.py +++ b/src/device/service/drivers/transport_api/TransportApiDriver.py @@ -14,6 +14,7 @@ import logging, requests, threading from typing import Any, Iterator, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.type_checkers.Checkers import chk_string, chk_type from device.service.driver_api._Driver import _Driver from . import ALL_RESOURCE_KEYS @@ -21,6 +22,8 @@ from .Tools import create_connectivity_service, find_key, config_getter, delete_ LOGGER = logging.getLogger(__name__) +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': 'transport_api'}) + class TransportApiDriver(_Driver): def __init__(self, address: str, port: int, **settings) -> None: # pylint: disable=super-init-not-called self.__lock = threading.Lock() @@ -50,10 +53,12 @@ class TransportApiDriver(_Driver): self.__terminate.set() return True + @metered_subclass_method(METRICS_POOL) def GetInitialConfig(self) -> List[Tuple[str, Any]]: with self.__lock: return [] + @metered_subclass_method(METRICS_POOL) def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: chk_type('resources', resource_keys, list) results = [] @@ -65,6 +70,7 @@ class TransportApiDriver(_Driver): results.extend(config_getter(self.__tapi_root, resource_key, self.__timeout)) return results + @metered_subclass_method(METRICS_POOL) def SetConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: results = [] if len(resources) == 0: @@ -88,6 +94,7 @@ class TransportApiDriver(_Driver): results.extend(data) return results + @metered_subclass_method(METRICS_POOL) def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: results = [] if len(resources) == 0: return results @@ -98,10 +105,12 @@ class TransportApiDriver(_Driver): results.extend(delete_connectivity_service(self.__tapi_root, self.__timeout, uuid)) return results + @metered_subclass_method(METRICS_POOL) def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: # TODO: TAPI does not support monitoring by now return [False for _ in subscriptions] + @metered_subclass_method(METRICS_POOL) def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: # TODO: TAPI does not support monitoring by now return [False for _ in subscriptions] diff --git a/src/device/service/drivers/xr/README_XR.md b/src/device/service/drivers/xr/README_XR.md index f7c2316ce5fa810969d373e1fad7bc5ca83b9e49..3bfdf5b019b3c36e7ded09d58ac625a48add36a9 100644 --- a/src/device/service/drivers/xr/README_XR.md +++ b/src/device/service/drivers/xr/README_XR.md @@ -110,7 +110,7 @@ Upload descriptors_emulatex_xr.json via WEB UI to setup fake topology. Setup service by following commands in src directory. Kubernetes endpoins change on every build, so setup script is mandatory. ```bash - source tests/ofc22/setup_test_env.sh + source device/service/drivers/xr/setup_test_env.sh python -m pytest --verbose tests/ofc22/tests/test_functional_create_service_xr.py ``` diff --git a/src/device/service/drivers/xr/XrDriver.py b/src/device/service/drivers/xr/XrDriver.py index 51fd29ad11af5ccdad7e5c49e7d069a1bf2e8ffb..1c1ee7d865715c7455969745987378f825aafbcb 100644 --- a/src/device/service/drivers/xr/XrDriver.py +++ b/src/device/service/drivers/xr/XrDriver.py @@ -18,6 +18,7 @@ import threading import json from typing import Any, Iterator, List, Optional, Tuple, Union import urllib3 +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.type_checkers.Checkers import chk_type from device.service.driver_api._Driver import _Driver from .cm.cm_connection import CmConnection @@ -29,6 +30,8 @@ urllib3.disable_warnings() LOGGER = logging.getLogger(__name__) +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': 'xr'}) + class XrDriver(_Driver): def __init__(self, address: str, port: int, **settings) -> None: # pylint: disable=super-init-not-called self.__lock = threading.Lock() @@ -74,6 +77,7 @@ class XrDriver(_Driver): return [] #pylint: disable=dangerous-default-value + @metered_subclass_method(METRICS_POOL) def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: LOGGER.info(f"GetConfig[{self}]: {resource_keys=}") chk_type('resources', resource_keys, list) @@ -89,6 +93,7 @@ class XrDriver(_Driver): else: return [] + @metered_subclass_method(METRICS_POOL) def SetConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: LOGGER.info(f"SetConfig[{self}]: {resources=}") # Logged config seems like: @@ -116,6 +121,7 @@ class XrDriver(_Driver): return results + @metered_subclass_method(METRICS_POOL) def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: LOGGER.info(f"DeleteConfig[{self}]: {resources=}") @@ -156,10 +162,12 @@ class XrDriver(_Driver): return results + @metered_subclass_method(METRICS_POOL) def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: # Not supported return [False for _ in subscriptions] + @metered_subclass_method(METRICS_POOL) def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: # Not supported return [False for _ in subscriptions] diff --git a/src/device/service/drivers/xr/cm/cm_connection.py b/src/device/service/drivers/xr/cm/cm_connection.py index 7e0fc61b72e7028fae00886cea4dcb2f922bfbf4..b4aee586668e842b372c3aa7b87240c5041c8118 100644 --- a/src/device/service/drivers/xr/cm/cm_connection.py +++ b/src/device/service/drivers/xr/cm/cm_connection.py @@ -61,7 +61,14 @@ class HttpResult: def __str__(self): status_code = self.status_code if self.status_code is not None else "<not executed>" - return f"{self.method} {self.url} {self.params}, status {status_code}" + if self.text: + if len(self.text) > 1024: + body_text = self.text[:1024] + "..." + else: + body_text = self.text + else: + body_text = "NONE" + return f"{self.method} {self.url} {self.params}, status {status_code}, body {body_text}" def process_http_response(self, response: requests.Response, permit_empty_body:bool = False): LOGGER.info(f"process_http_response(): {self.method}: {self.url} qparams={self.params} ==> {response.status_code}") # FIXME: params diff --git a/src/device/service/drivers/xr/cm/connection.py b/src/device/service/drivers/xr/cm/connection.py index e88995842eb0b6266d4d8eb42e2cc3197d89bea1..088c743d50d6c04fd0688b5c6318e35eae4d7dc0 100644 --- a/src/device/service/drivers/xr/cm/connection.py +++ b/src/device/service/drivers/xr/cm/connection.py @@ -79,6 +79,9 @@ class Connection: state = from_json["state"] self.name = state["name"] if "name" in state else None #Name is optional self.serviceMode = state["serviceMode"] + # Implicit transport capacity is a string, where value "none" has special meaning. + # So "none" is correct value, not "None" for missing attribute + self.implicitTransportCapacity = config["implicitTransportCapacity"] if "implicitTransportCapacity" in config else "none" self.mc = config["mc"] if "mc" in config else None self.vlan_filter = state["outerVID"] if "outerVID" in state else None self.href = from_json["href"] @@ -100,12 +103,15 @@ class Connection: # VLANs to interface names. Correspondingly cm-cli user has to know # to use VLANs on low level test APIs when using VTI mode. self.serviceMode = self.__guess_service_mode_from_emulated_enpoints() - if self.serviceMode == "portMode": + if self.serviceMode == "XR-L1": self.vlan_filter = None self.mc = None + self.implicitTransportCapacity ="portMode" else: self.vlan_filter = str(self.__guess_vlan_id()) + " " # Needs to be in string format, can contain ranges, regexp is buggy, trailin space is needed for single VLAN self.mc = "matchOuterVID" + # String "none" has a special meaning for implicitTransportCapacity + self.implicitTransportCapacity ="none" self.cm_data = None else: @@ -120,8 +126,8 @@ class Connection: def __guess_service_mode_from_emulated_enpoints(self): for ep in self.endpoints: if ep.vlan is not None: - return "vtiP2pSymmetric" - return "portMode" + return "XR-VTI-P2P" + return "XR-L1" def __guess_vlan_id(self) -> int: vlans = [] @@ -140,6 +146,7 @@ class Connection: cfg = {} set_optional_parameter(cfg, "name", self.name) cfg["serviceMode"] = self.serviceMode + cfg["implicitTransportCapacity"] = self.implicitTransportCapacity if self.endpoints: cfg["endpoints"] = [ep.create_config() for ep in self.endpoints] set_optional_parameter(cfg, "outerVID", self.vlan_filter) diff --git a/src/device/service/drivers/xr/cm/tests/resources/connections-expanded.json b/src/device/service/drivers/xr/cm/tests/resources/connections-expanded.json index f9f064ea20c3764ad0a5e4d0d3dfb60b468c2556..f4ee31189cb0dc698d4d79420bef4a8df6874b0e 100644 --- a/src/device/service/drivers/xr/cm/tests/resources/connections-expanded.json +++ b/src/device/service/drivers/xr/cm/tests/resources/connections-expanded.json @@ -2,7 +2,8 @@ { "config": { "name": "FooBar123", - "serviceMode": "portMode" + "serviceMode": "XR-L1", + "implicitTransportCapacity": "portMode" }, "endpoints": [ { @@ -141,12 +142,14 @@ "createdBy": "host", "lifecycleState": "configured", "name": "FooBar123", - "serviceMode": "portMode" + "serviceMode": "XR-L1", + "implicitTransportCapacity": "portMode" } }, { "config": { - "serviceMode": "portMode" + "serviceMode": "XR-L1", + "implicitTransportCapacity": "portMode" }, "endpoints": [ { @@ -284,7 +287,8 @@ "state": { "createdBy": "host", "lifecycleState": "configured", - "serviceMode": "portMode" + "serviceMode": "XR-L1", + "implicitTransportCapacity": "portMode" } } ] \ No newline at end of file diff --git a/src/device/service/drivers/xr/cm/tests/resources/single-connection-2022-12.json b/src/device/service/drivers/xr/cm/tests/resources/single-connection-2022-12.json new file mode 100644 index 0000000000000000000000000000000000000000..d4c0262cdbcf68194ed831670ec3314d4b11a906 --- /dev/null +++ b/src/device/service/drivers/xr/cm/tests/resources/single-connection-2022-12.json @@ -0,0 +1,160 @@ +[ + { + "config": { + "implicitTransportCapacity": "portMode", + "name": "test2", + "serviceMode": "XR-L1" + }, + "endpoints": [ + { + "acs": [], + "config": { + "selector": { + "moduleIfSelectorByModuleName": { + "moduleClientIfAid": "XR-T2", + "moduleName": "XR HUB 1" + } + } + }, + "href": "/network-connections/38675444-3f08-4dbe-a9c4-523ef309a518/endpoints/4801ecf5-fe37-4b8e-864f-2a0409210cb0", + "id": "4801ecf5-fe37-4b8e-864f-2a0409210cb0", + "parentId": "38675444-3f08-4dbe-a9c4-523ef309a518", + "rt": [ + "cm.network-connection.endpoint" + ], + "state": { + "capacity": 100, + "hostPort": { + "chassisId": "192.168.100.1", + "chassisIdSubtype": "networkAddress", + "name": "", + "portDescr": "et-1/0/0:1", + "portId": "et-1/0/0:1", + "portIdSubtype": "interfaceName", + "portSourceMAC": "58:00:BB:00:00:12", + "sysName": "SanJose" + }, + "moduleIf": { + "clientIfAid": "XR-T2", + "clientIfColId": 2, + "clientIfPortSpeed": 100, + "currentRole": "hub", + "macAddress": "00:0B:F8:00:00:01", + "moduleId": "68c23c59-3bcf-4d35-7042-a4a2d8a73e3f", + "moduleName": "XR HUB 1", + "serialNumber": "000000009" + } + } + }, + { + "acs": [], + "config": { + "selector": { + "moduleIfSelectorByModuleName": { + "moduleClientIfAid": "XR-T1", + "moduleName": "XR LEAF 2" + } + } + }, + "href": "/network-connections/38675444-3f08-4dbe-a9c4-523ef309a518/endpoints/123fc228-59ed-423e-8537-c189f3434a38", + "id": "123fc228-59ed-423e-8537-c189f3434a38", + "parentId": "38675444-3f08-4dbe-a9c4-523ef309a518", + "rt": [ + "cm.network-connection.endpoint" + ], + "state": { + "capacity": 100, + "hostPort": { + "chassisId": "192.168.101.2", + "chassisIdSubtype": "networkAddress", + "name": "", + "portDescr": "et-0/0/0:0", + "portId": "et-0/0/0:0", + "portIdSubtype": "interfaceName", + "portSourceMAC": "58:00:BB:00:12:01", + "sysName": "Cupertino" + }, + "moduleIf": { + "clientIfAid": "XR-T1", + "clientIfColId": 1, + "clientIfPortSpeed": 100, + "currentRole": "leaf", + "macAddress": "00:0B:F8:00:01:02", + "moduleId": "095a7a6b-1f69-4d2e-5581-cdffbb85e40f", + "moduleName": "XR LEAF 2", + "serialNumber": "00000000C" + } + } + } + ], + "href": "/network-connections/38675444-3f08-4dbe-a9c4-523ef309a518", + "id": "38675444-3f08-4dbe-a9c4-523ef309a518", + "lcs": [ + { + "config": { + "clientAid": "XR-T2", + "direction": "txRx", + "dscgAid": "XRCARRIERDSCG-3", + "moduleId": "68c23c59-3bcf-4d35-7042-a4a2d8a73e3f" + }, + "href": "/lcs/0d5929d8-6498-4c54-b38b-43c6cb85a18b", + "id": "0d5929d8-6498-4c54-b38b-43c6cb85a18b", + "parentIds": [ + "38675444-3f08-4dbe-a9c4-523ef309a518" + ], + "rt": [ + "cm.network-connection.local-connection" + ], + "state": { + "clientAid": "XR-T2", + "colId": 2, + "direction": "txRx", + "dscgAid": "XRCARRIERDSCG-3", + "lcAid": "XRLC-3", + "lineAid": "", + "macAddress": "00:0B:F8:00:00:01", + "moduleId": "68c23c59-3bcf-4d35-7042-a4a2d8a73e3f", + "remoteClientId": "", + "remoteModuleId": "" + } + }, + { + "config": { + "clientAid": "XR-T1", + "direction": "txRx", + "dscgAid": "XRCARRIERDSCG-3", + "moduleId": "095a7a6b-1f69-4d2e-5581-cdffbb85e40f" + }, + "href": "/lcs/1d6cc8bf-de89-4950-a01d-4b4522c65f8c", + "id": "1d6cc8bf-de89-4950-a01d-4b4522c65f8c", + "parentIds": [ + "38675444-3f08-4dbe-a9c4-523ef309a518" + ], + "rt": [ + "cm.network-connection.local-connection" + ], + "state": { + "clientAid": "XR-T1", + "colId": 1, + "direction": "txRx", + "dscgAid": "XRCARRIERDSCG-3", + "lcAid": "XRLC-3", + "lineAid": "", + "macAddress": "00:0B:F8:00:01:02", + "moduleId": "095a7a6b-1f69-4d2e-5581-cdffbb85e40f", + "remoteClientId": "", + "remoteModuleId": "" + } + } + ], + "rt": [ + "cm.network-connection" + ], + "state": { + "createdBy": "cm", + "lifecycleState": "configured", + "name": "test2", + "serviceMode": "XR-L1" + } + } +] \ No newline at end of file diff --git a/src/device/service/drivers/xr/cm/tests/test_connection.py b/src/device/service/drivers/xr/cm/tests/test_connection.py index 0792033a34d029628a853b9383af8c8a2c6272ad..cf1f9f8744dd58a31c15fc28a7f8e893aa17fb97 100644 --- a/src/device/service/drivers/xr/cm/tests/test_connection.py +++ b/src/device/service/drivers/xr/cm/tests/test_connection.py @@ -29,21 +29,21 @@ def test_connection_json(): connection = Connection(j[0]) assert connection.name == "FooBar123" - assert "name: FooBar123, id: /network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03, service-mode: portMode, end-points: [(XR LEAF 1|XR-T1, 0), (XR HUB 1|XR-T1, 0)]" == str(connection) + assert "name: FooBar123, id: /network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03, service-mode: XR-L1, end-points: [(XR LEAF 1|XR-T1, 0), (XR HUB 1|XR-T1, 0)]" == str(connection) config = connection.create_config() - expected_config = {'name': 'FooBar123', 'serviceMode': 'portMode', 'endpoints': [{'selector': {'ifSelectorByModuleName': {'moduleName': 'XR LEAF 1', 'moduleClientIfAid': 'XR-T1'}}}, {'selector': {'ifSelectorByModuleName': {'moduleName': 'XR HUB 1', 'moduleClientIfAid': 'XR-T1'}}}]} + expected_config = {'name': 'FooBar123', 'serviceMode': 'XR-L1', 'implicitTransportCapacity': 'portMode', 'endpoints': [{'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR LEAF 1', 'moduleClientIfAid': 'XR-T1'}}}, {'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR HUB 1', 'moduleClientIfAid': 'XR-T1'}}}]} assert config == expected_config # Remove mandatory key from leaf endpoint. It will not be parsed, but hub endpoint will del j[0]["endpoints"][0]["state"]["moduleIf"]["clientIfAid"] connection = Connection(j[0]) - assert "name: FooBar123, id: /network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03, service-mode: portMode, end-points: [(XR HUB 1|XR-T1, 0)]" == str(connection) + assert "name: FooBar123, id: /network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03, service-mode: XR-L1, end-points: [(XR HUB 1|XR-T1, 0)]" == str(connection) # Remove Name, it is optional (although TF will always configure it) del j[0]["state"]["name"] connection = Connection(j[0]) - assert "name: <NO NAME>, id: /network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03, service-mode: portMode, end-points: [(XR HUB 1|XR-T1, 0)]" == str(connection) + assert "name: <NO NAME>, id: /network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03, service-mode: XR-L1, end-points: [(XR HUB 1|XR-T1, 0)]" == str(connection) # Remove mandatory key, will raise an exception del j[0]["state"] @@ -66,14 +66,14 @@ def test_connection_ep_change_compute(): new_connection = Connection(from_tf_service=TFService("FooBar123", "XR LEAF 1|XR-T1", "XR HUB 1|changed here", 0)) ep_deletes, ep_creates, ep_updates = new_connection.get_endpoint_updates(existing_connection) assert ep_deletes == ['/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/1d58ba8f-4d51-4213-83e1-97a0e0bdd388'] - assert ep_creates == [{'selector': {'ifSelectorByModuleName': {'moduleClientIfAid': 'changed here', 'moduleName': 'XR HUB 1'}}}] + assert ep_creates == [{'selector': {'moduleIfSelectorByModuleName': {'moduleClientIfAid': 'changed here', 'moduleName': 'XR HUB 1'}}}] assert not ep_updates # Change one of the endpoints and capacity new_connection = Connection(from_tf_service=TFService("FooBar123", "XR LEAF 1|XR-T1", "XR HUB 1|changed here", 125)) ep_deletes, ep_creates, ep_updates = new_connection.get_endpoint_updates(existing_connection) assert ep_deletes == ['/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/1d58ba8f-4d51-4213-83e1-97a0e0bdd388'] - assert ep_creates == [{'selector': {'ifSelectorByModuleName': {'moduleClientIfAid': 'changed here', 'moduleName': 'XR HUB 1'}}, "capacity": 125}] + assert ep_creates == [{'selector': {'moduleIfSelectorByModuleName': {'moduleClientIfAid': 'changed here', 'moduleName': 'XR HUB 1'}}, "capacity": 125}] assert ep_updates == [('/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/230516d0-7e38-44b1-b174-1ba7d4454ee6', {'capacity': 125})] # No change at all @@ -93,13 +93,13 @@ def test_connection_ep_change_compute(): def test_connection_from_service(): # Port mode connection = Connection(from_tf_service=TFService("FooBar123", "XR LEAF 1|XR-T1", "XR HUB 1|XR-T1", 0)) - assert connection.create_config() == {'name': 'TF:FooBar123', 'serviceMode': 'portMode', 'endpoints': [{'selector': {'ifSelectorByModuleName': {'moduleName': 'XR LEAF 1', 'moduleClientIfAid': 'XR-T1'}}}, {'selector': {'ifSelectorByModuleName': {'moduleName': 'XR HUB 1', 'moduleClientIfAid': 'XR-T1'}}}]} + assert connection.create_config() == {'name': 'TF:FooBar123', 'serviceMode': 'XR-L1', 'implicitTransportCapacity': 'portMode', 'endpoints': [{'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR LEAF 1', 'moduleClientIfAid': 'XR-T1'}}}, {'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR HUB 1', 'moduleClientIfAid': 'XR-T1'}}}]} # VTI mode connection = Connection(from_tf_service=TFService("FooBar123", "XR LEAF 1|XR-T1.A", "XR HUB 1|XR-T1.100", 0)) # In endpoint selectors VLANs are note present (CM does not know about them, encoding them to aids is purely internal to Teraflow) # However VLAN adds outerVID and some other fields - assert connection.create_config() == {'name': 'TF:FooBar123', 'serviceMode': 'vtiP2pSymmetric', 'endpoints': [{'selector': {'ifSelectorByModuleName': {'moduleName': 'XR LEAF 1', 'moduleClientIfAid': 'XR-T1'}}}, {'selector': {'ifSelectorByModuleName': {'moduleName': 'XR HUB 1', 'moduleClientIfAid': 'XR-T1'}}}], 'outerVID': '100 ', 'mc': 'matchOuterVID'} + assert connection.create_config() == {'name': 'TF:FooBar123', 'serviceMode': 'XR-VTI-P2P', 'implicitTransportCapacity': 'none', 'endpoints': [{'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR LEAF 1', 'moduleClientIfAid': 'XR-T1'}}}, {'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR HUB 1', 'moduleClientIfAid': 'XR-T1'}}}], 'outerVID': '100 ', 'mc': 'matchOuterVID'} # Invalid configuration, differring VLANs on different sides with pytest.raises(InconsistentVlanConfiguration) as _e_info: diff --git a/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py b/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py index cfdadae6a5e150e9890076dba0e657aea6fa3b1e..7ed085337ac25b1c6983f868de1374fff18633a7 100644 --- a/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py +++ b/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py @@ -34,7 +34,7 @@ def test_transport_capacity_json(): assert str(tc) == "name: Transport capacity service example, id: /transport-capacities/6ce3aa86-2685-44b0-9f86-49e6a6c991a8, capacity-mode: dedicatedDownlinkSymmetric, end-points: [(XR Device|XR T1, 100), (XR Device 2|XR T1, 100)]" config = tc.create_config() - assert config == {'config': {'name': 'Transport capacity service example'}, 'endpoints': [{'capacity': 100, 'selector': {'ifSelectorByModuleName': {'moduleName': 'XR Device', 'moduleClientIfAid': 'XR T1'}}}, {'capacity': 100, 'selector': {'ifSelectorByModuleName': {'moduleName': 'XR Device 2', 'moduleClientIfAid': 'XR T1'}}}]} + assert config == {'config': {'name': 'Transport capacity service example'}, 'endpoints': [{'capacity': 100, 'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR Device', 'moduleClientIfAid': 'XR T1'}}}, {'capacity': 100, 'selector': {'moduleIfSelectorByModuleName': {'moduleName': 'XR Device 2', 'moduleClientIfAid': 'XR T1'}}}]} def test_transport_capacity_comparison(): # Same content must compare same diff --git a/src/device/service/drivers/xr/cm/utils.py b/src/device/service/drivers/xr/cm/utils.py index cdf9e58c348f572c1547bb392a8cddba7669d0b0..ad59dc6616f50023f923dac67025b0b5aa74cf16 100644 --- a/src/device/service/drivers/xr/cm/utils.py +++ b/src/device/service/drivers/xr/cm/utils.py @@ -43,7 +43,7 @@ def ifname_to_module_aid_vlan(ifname: str) -> Tuple[str, str, Optional[str]]: # state it has clientIfAid... def make_selector(mod, aid, _vlan) -> Dict[str, Any]: selector = { - "ifSelectorByModuleName": { + "moduleIfSelectorByModuleName": { "moduleName": mod, "moduleClientIfAid": aid, } diff --git a/src/device/service/drivers/xr/ipm_rest_api_0_6_71.json b/src/device/service/drivers/xr/ipm_rest_api_0_6_71.json new file mode 100644 index 0000000000000000000000000000000000000000..72c641c5da6add9d32f094a18728030056869312 --- /dev/null +++ b/src/device/service/drivers/xr/ipm_rest_api_0_6_71.json @@ -0,0 +1,26618 @@ +{ + "openapi": "3.0.2", + "info": { + "description": "Infinera XR Optics Intelligent Pluggables Manager Application API", + "title": "IPM", + "version": "1.0", + "x-initials": "NDUS", + "x-cm-api-version": "v0.6.71" + }, + "servers": [ + { + "url": "/api/v1" + } + ], + "paths": { + "/modules": { + "get": { + "operationId": "getModules", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.module" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of modules" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all modules" + } + }, + "/modules/{moduleId}": { + "delete": { + "operationId": "deleteSpecificModule", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "delete specific module" + }, + "get": { + "operationId": "getModuleByID", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific module data" + }, + "put": { + "operationId": "UpdateModule", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.update" + } + } + }, + "description": "Update Module", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "update module data" + } + }, + "/modules/{moduleId}/linePtps": { + "get": { + "operationId": "getLinePtps", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.module.linePtp" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of module line ports" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all module line ports" + } + }, + "/modules/{moduleId}/linePtps/{linePtpColId}": { + "get": { + "operationId": "getLinePtpByID", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within module.", + "explode": false, + "in": "path", + "name": "linePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.linePtp" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific module line port data" + }, + "put": { + "operationId": "UpdateLinePtp", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within module.", + "explode": false, + "in": "path", + "name": "linePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.linePtp.update" + } + } + }, + "description": "Update module line port", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update module line port data" + } + }, + "/modules/{moduleId}/ethernetClients": { + "get": { + "operationId": "getEthernetClients", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.module.ethernetClient" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of ethernetClients" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all module client ethernet interfaces" + } + }, + "/modules/{moduleId}/ethernetClients/{ethernetColId}": { + "get": { + "operationId": "getEthernetClientByID", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Ethernet client signal identifier within module.", + "explode": false, + "in": "path", + "name": "ethernetColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.ethernetClient" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific client ethernet interface data" + }, + "put": { + "operationId": "updateEthernetClient", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Ethernet client signal identifier within module.", + "explode": false, + "in": "path", + "name": "ethernetColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.ethernetClient.update" + } + } + }, + "description": "Update client ethernet interface", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update module client ethernet interface data" + } + }, + "/modules/{moduleId}/ethernetClients/{ethernetColId}/acs": { + "get": { + "operationId": "getEthernetClientAcs", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Ethernet client signal identifier within module.", + "explode": false, + "in": "path", + "name": "ethernetColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ac" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of ethernetClients" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all attachment circuits of a module client ethernet interface" + } + }, + "/modules/{moduleId}/ethernetClients/{ethernetColId}/acs/{acColId}": { + "get": { + "operationId": "getEthernetClientAcByID", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Ethernet client signal identifier within module.", + "explode": false, + "in": "path", + "name": "ethernetColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "attachment circuit identifier within module client ethernet interface.", + "explode": false, + "in": "path", + "name": "acColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ac" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific client ethernet attachment circuit data" + } + }, + "/modules/{moduleId}/localConnections": { + "get": { + "operationId": "getLcs", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.module.localConnection" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of local connections" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all module localConnections" + } + }, + "/modules/{moduleId}/localConnections/{lcColId}": { + "get": { + "operationId": "getLcByID", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "local connection identifier within module.", + "explode": false, + "in": "path", + "name": "lcColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.localConnection" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific module local connection data" + } + }, + "/modules/{moduleId}/otus": { + "get": { + "operationId": "getOtus", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.module.otu" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of otus" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all module OTUs" + } + }, + "/modules/{moduleId}/otus/{otuColId}": { + "get": { + "operationId": "getOtuByID", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "OTU signal identifier within module.", + "explode": false, + "in": "path", + "name": "otuColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.otu" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific module OTU data" + }, + "put": { + "operationId": "updateOtu", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "OTU signal identifier within module.", + "explode": false, + "in": "path", + "name": "otuColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.otu.update" + } + } + }, + "description": "Update OTU", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update module OTU data" + } + }, + "/modules/{moduleId}/otus/{otuColId}/odus": { + "get": { + "operationId": "getOdus", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "OTU signal identifier within module.", + "explode": false, + "in": "path", + "name": "otuColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.module.odu" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of hosts" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all module ODUs" + } + }, + "/modules/{moduleId}/otus/{otuColId}/odus/{oduColId}": { + "get": { + "operationId": "getOduByID", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "OTU signal identifier within module.", + "explode": false, + "in": "path", + "name": "otuColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "ODU signal identifier within module.", + "explode": false, + "in": "path", + "name": "oduColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.odu" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific module ODU data" + } + }, + "/modules/{moduleId}/linePtps/{linePtpColId}/carriers": { + "get": { + "operationId": "getCarriers", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within module.", + "explode": false, + "in": "path", + "name": "linePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of module carriers" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all module carriers" + } + }, + "/modules/{moduleId}/linePtps/{linePtpColId}/carriers/{carrierColId}": { + "get": { + "operationId": "getCarrierByID", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within module.", + "explode": false, + "in": "path", + "name": "linePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Carrier identifier within module line port.", + "explode": false, + "in": "path", + "name": "carrierColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific module carrier data" + }, + "put": { + "operationId": "updateCarrier", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within module.", + "explode": false, + "in": "path", + "name": "linePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Carrier identifier within module line port.", + "explode": false, + "in": "path", + "name": "carrierColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.update" + } + } + }, + "description": "Update Carrier", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update module Carrier data" + } + }, + "/modules/{moduleId}/linePtps/{linePtpColId}/carriers/{carrierColId}/dscgs": { + "get": { + "operationId": "getDscgs", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within module.", + "explode": false, + "in": "path", + "name": "linePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Carrier identifier within module line port.", + "explode": false, + "in": "path", + "name": "carrierColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dscg" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of otus" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all module Dscgs" + } + }, + "/modules/{moduleId}/linePtps/{linePtpColId}/carriers/{carrierColId}/dscgs/{dscgColId}": { + "get": { + "operationId": "getDscgByID", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within module.", + "explode": false, + "in": "path", + "name": "linePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Carrier identifier within module line port.", + "explode": false, + "in": "path", + "name": "carrierColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "DSCG identifier within module carrier.", + "explode": false, + "in": "path", + "name": "dscgColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dscg" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific module dscg data" + } + }, + "/modules/{moduleId}/linePtps/{linePtpColId}/carriers/{carrierColId}/dscs": { + "get": { + "operationId": "getCarrierDscs", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within module.", + "explode": false, + "in": "path", + "name": "linePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Carrier identifier within module line port.", + "explode": false, + "in": "path", + "name": "carrierColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of modules" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all carrier dscs" + } + }, + "/modules/{moduleId}/linePtps/{linePtpColId}/carriers/{carrierColId}/dscs/{dscColId}": { + "get": { + "operationId": "getCarrierDscByID", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within module.", + "explode": false, + "in": "path", + "name": "linePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Carrier identifier within module line port.", + "explode": false, + "in": "path", + "name": "carrierColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "DSC identifier within module carrier.", + "explode": false, + "in": "path", + "name": "dscColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific carrier dsc data" + }, + "put": { + "operationId": "UpdateCarrierDsc", + "parameters": [ + { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within module.", + "explode": false, + "in": "path", + "name": "linePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Carrier identifier within module line port.", + "explode": false, + "in": "path", + "name": "carrierColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "DSC identifier within module carrier.", + "explode": false, + "in": "path", + "name": "dscColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.update" + } + } + }, + "description": "Update carrier DSC", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update carrier DSC data" + } + }, + "/devices": { + "get": { + "operationId": "getDevices", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": [ + { + "href": "/devices/02dbd2b0-3baf-43f0-51c8-5da9498709e4", + "rt": [ + "cm.device" + ], + "id": "02dbd2b0-3baf-43f0-51c8-5da9498709e4", + "config": { + "status": "onboarded" + }, + "state": { + "moduleName": "XR LEAF 1", + "piid": "abb81108-8bbf-4222-9bf3-0a6bbb75ac65", + "dmn": { + "language": "en", + "value": "Infinera" + }, + "ownershipStatus": "owned", + "status": "onboarded", + "online": true + } + } + ], + "schema": { + "items": { + "$ref": "#/components/schemas/cm.device" + }, + "type": "array" + } + } + }, + "description": "Sucessful response containing an array of network connections" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieves available devices cached in the system" + }, + "put": { + "operationId": "UpdateDevices", + "requestBody": { + "content": { + "application/json": { + "example": [ + { + "id": "02dbd2b0-3baf-43f0-51c8-5da9498709e4", + "config": { + "status": "onboarded" + } + }, + { + "id": "230bfea9-1579-412d-54b9-860e8a832608", + "config": { + "status": "offboarded" + } + } + ], + "schema": { + "items": { + "$ref": "#/components/schemas/cm.device.updateRequest" + }, + "type": "array" + } + } + }, + "description": "Update device onboard status", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "update Devices" + } + }, + "/devices/{deviceIdx}": { + "get": { + "operationId": "getDeviceByID", + "parameters": [ + { + "description": "Index into the device list", + "explode": false, + "in": "path", + "name": "deviceIdx", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "href": "/devices/02dbd2b0-3baf-43f0-51c8-5da9498709e4", + "rt": [ + "cm.device" + ], + "id": "02dbd2b0-3baf-43f0-51c8-5da9498709e4", + "config": { + "status": "onboarded" + }, + "state": { + "moduleName": "XR LEAF 1", + "piid": "abb81108-8bbf-4222-9bf3-0a6bbb75ac65", + "dmn": { + "language": "en", + "value": "Infinera" + }, + "ownershipStatus": "owned", + "status": "onboarded", + "online": true + } + }, + "schema": { + "$ref": "#/components/schemas/cm.device" + } + } + }, + "description": "Successful response containing the specified device" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific device cached in the system" + }, + "put": { + "operationId": "UpdateDevice", + "parameters": [ + { + "description": "Index into the device list", + "explode": false, + "in": "path", + "name": "deviceIdx", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "example": { + "status": "onboarded" + }, + "schema": { + "$ref": "#/components/schemas/cm.device.config" + } + } + }, + "description": "Update specific device onboard status", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "update Device" + } + }, + "/sw/actions": { + "get": { + "operationId": "getSwCtrlActions", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.sw.action" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of software control action objects" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of software control action objects" + }, + "post": { + "operationId": "createSwCtrlActions", + "requestBody": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.sw.action.create" + }, + "maxLength": 1, + "type": "array" + } + } + }, + "description": "Software control actions", + "required": true + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.resource" + }, + "type": "array" + } + } + }, + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Create software control actions" + } + }, + "/sw/actions/{actionId}": { + "get": { + "operationId": "getSwCtrlActionByID", + "parameters": [ + { + "description": "Software control action identifier within the sw action list", + "explode": false, + "in": "path", + "name": "actionId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.sw.action" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific software control action data" + } + }, + "/sw/moduleActions/": { + "get": { + "operationId": "getSwCtrlModuleActions", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.sw.moduleAction" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of module software control actions" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of module software control actions of an action request" + } + }, + "/sw/moduleActions/{moduleActionId}": { + "get": { + "operationId": "getSwCtrlModuleActionByID", + "parameters": [ + { + "description": "Software control action identifier within the module sw action list", + "explode": false, + "in": "path", + "name": "moduleActionId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.sw.moduleAction" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific module software control action data" + } + }, + "/sw/inventory/ctrl": { + "get": { + "operationId": "getSwImages", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.sw.ctrl" + }, + "type": "array" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all XR module SW images" + } + }, + "/sw/inventory/device/{deviceId}/ctrl": { + "get": { + "operationId": "getSwCtrlByID", + "parameters": [ + { + "description": "Device identifier (XR pluggable module or NDU).", + "explode": false, + "in": "path", + "name": "deviceId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.sw.ctrl" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific software control object data" + } + }, + "/sw/inventory/device/{deviceId}/swBanks": { + "get": { + "operationId": "getSwBanks", + "parameters": [ + { + "description": "Device identifier (XR pluggable module or NDU).", + "explode": false, + "in": "path", + "name": "deviceId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.sw.banks" + } + } + }, + "description": "Successful response containing an array of hosts" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all software banks in a XR pluggable module or ndu device" + } + }, + "/sw/inventory/device/{deviceId}/swBanks/{swBankColId}": { + "get": { + "operationId": "getSwBankByID", + "parameters": [ + { + "description": "Device identifier (XR pluggable module or NDU).", + "explode": false, + "in": "path", + "name": "deviceId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Software bank identifier within module.\n- '1': Refers to Bank A\n- '2': Refers to Bank B\n", + "explode": false, + "in": "path", + "name": "swBankColId", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.sw.bank" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific software bank data" + } + }, + "/network-connections": { + "get": { + "operationId": "getConnections", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.network-connection" + }, + "type": "array" + } + } + }, + "description": "Successful" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all network connections" + }, + "post": { + "operationId": "createConnections", + "requestBody": { + "content": { + "application/json": { + "example": [ + { + "name": "connection 01: Sunnyvale <> San Jose", + "owner": "CM", + "endpoints": [ + { + "hostPortSelector": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/1:2" + } + }, + { + "hostPortSelector": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:0B:F8:00:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0" + } + } + ] + } + ], + "schema": { + "items": { + "$ref": "#/components/schemas/cm.network-connection.create" + }, + "maxLength": 30, + "type": "array" + } + } + }, + "description": "Network connection configuration data", + "required": true + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.resource" + }, + "type": "array" + } + } + }, + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "example": { + "errors": [ + { + "code": "NCS-07-006", + "message": "Missing endpoint selector configuration" + } + ] + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Create network connections" + } + }, + "/network-connections/{ncId}": { + "delete": { + "operationId": "deleteConnection", + "parameters": [ + { + "description": "Connection identifier within the connection list", + "explode": false, + "in": "path", + "name": "ncId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "example": { + "errors": [ + { + "code": "NCS-07-006", + "message": "Network-Connection must be owned by CM" + } + ] + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Delete specific network connection" + }, + "get": { + "operationId": "getConnectionByID", + "parameters": [ + { + "description": "Connection identifier within the connection list", + "explode": false, + "in": "path", + "name": "ncId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.network-connection" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific network connection data" + }, + "put": { + "operationId": "updateConnection", + "parameters": [ + { + "description": "Connection identifier within the connection list", + "explode": false, + "in": "path", + "name": "ncId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "example": { + "name": "connection 01: Sunnyvale <> San Jose", + "owner": "CM" + }, + "schema": { + "$ref": "#/components/schemas/cm.network-connection.update" + } + } + }, + "description": "Update connection", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update specific network connection data" + } + }, + "/network-connections/{ncId}/endpoints": { + "get": { + "operationId": "getConnectionEndpoints", + "parameters": [ + { + "description": "Connection identifier within the connection list", + "explode": false, + "in": "path", + "name": "ncId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.network-connection.endpoint" + }, + "type": "array" + } + } + }, + "description": "Successful" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve network connection endpoints" + }, + "post": { + "operationId": "createConnectionEndpoints", + "parameters": [ + { + "description": "Connection identifier within the connection list", + "explode": false, + "in": "path", + "name": "ncId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.network-connection.endpoint.create" + }, + "maxLength": 30, + "type": "array" + } + } + }, + "description": "Connection endpoints info", + "required": true + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.resource" + }, + "type": "array" + } + } + }, + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Create network connection endpoints" + } + }, + "/network-connections/{ncId}/endpoints/{epId}": { + "delete": { + "operationId": "deleteConnectionEndpoint", + "parameters": [ + { + "description": "Connection identifier within the connection list", + "explode": false, + "in": "path", + "name": "ncId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Endpoint identifier within the connection", + "explode": false, + "in": "path", + "name": "epId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "example": { + "errors": [ + { + "code": "NCS-07-006", + "message": "Network-Connection must be owned by CM" + } + ] + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Delete specific network connection endpoint" + }, + "get": { + "operationId": "getConnectionEndpointByID", + "parameters": [ + { + "description": "Connection identifier within the connection list", + "explode": false, + "in": "path", + "name": "ncId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Endpoint identifier within the connection", + "explode": false, + "in": "path", + "name": "epId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.network-connection.endpoint" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific endpoint data from a network connection" + }, + "put": { + "operationId": "updateConnectionEndpoint", + "parameters": [ + { + "description": "Connection identifier within the connection list", + "explode": false, + "in": "path", + "name": "ncId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Endpoint identifier within the connection", + "explode": false, + "in": "path", + "name": "epId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.network-connection.endpoint.update" + } + } + }, + "description": "Update connection endpoint", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update specific network connection endpoint data" + } + }, + "/lcs": { + "get": { + "operationId": "getLocalConnections", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.network-connection.local-connection" + }, + "type": "array" + } + } + }, + "description": "Successful" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all local connections with associated network connections information" + } + }, + "/lcs/{lcId}": { + "get": { + "operationId": "getConnectionLocalConnectionByID", + "parameters": [ + { + "description": "Local connection identifier within the connection scope", + "explode": false, + "in": "path", + "name": "lcId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.network-connection.local-connection" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific local connection data with associated network connections" + } + }, + "/acs": { + "get": { + "operationId": "getAcs", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.network-connection.ac" + }, + "type": "array" + } + } + }, + "description": "Successful" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all attachment circuits with associated network connections information" + } + }, + "/acs/{acId}": { + "get": { + "operationId": "getAcByID", + "parameters": [ + { + "description": "Attachment circuit identifier within the connection scope", + "explode": false, + "in": "path", + "name": "acId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.network-connection.ac" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific attachment circuit data with associated network connections" + } + }, + "/xr-networks": { + "get": { + "operationId": "getConstellations", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.xr-network" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of xr networks" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all xr-network objects" + }, + "post": { + "operationId": "createConstellation", + "requestBody": { + "content": { + "application/json": { + "example": [ + { + "config": { + "name": "Sunnyvale Constellation", + "constellationFrequency": 193000000, + "modulation": "16QAM" + }, + "hubModule": { + "config": { + "selector": { + "hostPortSelector": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/1:2" + } + }, + "module": { + "trafficMode": "L1Mode", + "fiberConnectionMode": "dual", + "maxAllowedDSCs": 16 + } + } + }, + "leafModules": [ + { + "config": { + "selector": { + "hostPortSelector": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:0B:F8:00:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0" + } + }, + "module": { + "trafficMode": "L1Mode", + "fiberConnectionMode": "dual" + } + } + }, + { + "config": { + "selector": { + "hostPortSelector": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:99:F8:2c:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0" + } + }, + "module": { + "trafficMode": "L1Mode", + "fiberConnectionMode": "dual" + } + } + } + ] + } + ], + "schema": { + "items": { + "$ref": "#/components/schemas/cm.xr-network.createRequest" + }, + "maxLength": 30, + "type": "array" + } + } + }, + "description": "Constellation info", + "required": true + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.resource" + }, + "type": "array" + } + } + }, + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Create xr-network" + } + }, + "/xr-networks/{networkId}": { + "delete": { + "operationId": "deleteConstellation", + "parameters": [ + { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "delete specific xr-network" + }, + "get": { + "operationId": "getConstellationByID", + "parameters": [ + { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.xr-network" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific xr-network data" + }, + "put": { + "operationId": "UpdateConstellation", + "parameters": [ + { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.xr-network.update" + } + } + }, + "description": "Update xr-network", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update xr-network" + } + }, + "/xr-networks/{networkId}/hubModule": { + "get": { + "operationId": "getConstellationHub", + "parameters": [ + { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.xr-network.hubModule" + }, + "type": "array" + } + } + }, + "description": "Successful response containing xr-network hub node" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve xr-network hub info" + }, + "put": { + "operationId": "UpdateConstellationHub", + "parameters": [ + { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.xr-network.node.update" + } + } + }, + "description": "Update hub module constellation parameters", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update hub module constellation parameters" + } + }, + "/xr-networks/{networkId}/leafModules": { + "get": { + "operationId": "getConstellationLeafModules", + "parameters": [ + { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.xr-network.leafModule" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of xr-network leaf modules" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve xr-network leaf modules" + }, + "post": { + "operationId": "createConstellationLeafModule", + "parameters": [ + { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.xr-network.node.create" + }, + "maxLength": 30, + "type": "array" + } + } + }, + "description": "Constellation leaf module info", + "required": true + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.resource" + }, + "type": "array" + } + } + }, + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Add xr-network leaf modules" + } + }, + "/xr-networks/{networkId}/leafModules/{nodeId}": { + "delete": { + "operationId": "deleteConstellationLeafModule", + "parameters": [ + { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Index of leaf module into xr-network list", + "explode": false, + "in": "path", + "name": "nodeId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "delete specific xr-network leaf module" + }, + "get": { + "operationId": "getConstellationLeafModuleByID", + "parameters": [ + { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Index of leaf module into xr-network list", + "explode": false, + "in": "path", + "name": "nodeId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.xr-network.leafModule" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific xr-network leaf module data" + }, + "put": { + "operationId": "UpdateConstellationLeafModule", + "parameters": [ + { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Index of leaf module into xr-network list", + "explode": false, + "in": "path", + "name": "nodeId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.xr-network.node.update" + } + } + }, + "description": "Update leaf module constellation parameters", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update leaf module constellation parameters" + } + }, + "/xr-networks/{networkId}/reachableModules": { + "get": { + "operationId": "getConstellationreachableModules", + "parameters": [ + { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.xr-network.reachableModule" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of xr-network reachableModules" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve xr-network reachableModules" + } + }, + "/xr-networks/{networkId}/reachableModules/{nodeId}": { + "get": { + "operationId": "getConstellationReachableModuleByID", + "parameters": [ + { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Index of leaf module into xr-network list", + "explode": false, + "in": "path", + "name": "nodeId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.xr-network.reachableModule" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific xr-network reachableModule data" + } + }, + "/transport-capacities": { + "get": { + "operationId": "getTransportCapacities", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.transport-capacity" + }, + "type": "array" + } + } + }, + "description": "Successful" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all transport-capacity services" + }, + "post": { + "operationId": "createTransportCapacities", + "requestBody": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.transport-capacity.createRequest" + }, + "maxLength": 30, + "type": "array" + } + } + }, + "description": "transport-capacity configuration data", + "required": true + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.resource" + }, + "type": "array" + } + } + }, + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Create transport-capacity services" + } + }, + "/transport-capacities/{tcId}": { + "delete": { + "operationId": "deleteTransportCapacity", + "parameters": [ + { + "description": "Index into the transport-connection list", + "explode": false, + "in": "path", + "name": "tcId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Delete specific transport-capacity" + }, + "get": { + "operationId": "getTransportCapacityByID", + "parameters": [ + { + "description": "Index into the transport-connection list", + "explode": false, + "in": "path", + "name": "tcId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.transport-capacity" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific transport-capacity data" + }, + "put": { + "operationId": "UpdateTransportCapacity", + "parameters": [ + { + "description": "Index into the transport-connection list", + "explode": false, + "in": "path", + "name": "tcId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.transport-capacity.update" + } + } + }, + "description": "Update transport-capacity", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update specific transport-capacity data" + } + }, + "/transport-capacities/{tcId}/endpoints": { + "get": { + "operationId": "getTransportCapacityEndpoints", + "parameters": [ + { + "description": "Index into the transport-connection list", + "explode": false, + "in": "path", + "name": "tcId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoint" + }, + "type": "array" + } + } + }, + "description": "Successful" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve transport-capacity connection endpoints" + } + }, + "/transport-capacities/{tcId}/endpoints/{epId}": { + "get": { + "operationId": "getTransportCapacityEndpointByID", + "parameters": [ + { + "description": "Index into the transport-connection list", + "explode": false, + "in": "path", + "name": "tcId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Endpoint identifier within the transport-connection", + "explode": false, + "in": "path", + "name": "epId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoint" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific endpoint data from a transport-capacity connection" + }, + "put": { + "operationId": "updateTransportCapacityEndpoint", + "parameters": [ + { + "description": "Index into the transport-connection list", + "explode": false, + "in": "path", + "name": "tcId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Endpoint identifier within the transport-connection", + "explode": false, + "in": "path", + "name": "epId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoint.update" + } + } + }, + "description": "Update transport-capacity endpoint", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update specific transport-capacity connection endpoint data" + } + }, + "/capacity-links": { + "get": { + "operationId": "getCapacityLinks", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.capacity-link" + }, + "type": "array" + } + } + }, + "description": "Successful" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all capacity-links" + } + }, + "/capacity-links/{clId}": { + "get": { + "operationId": "getCapacityLinkByID", + "parameters": [ + { + "description": "Index into the capacity-link list", + "explode": false, + "in": "path", + "name": "clId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.capacity-link" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific capacity-link data" + } + }, + "/subscriptions": { + "get": { + "operationId": "getSubscriptions", + "responses": { + "200": { + "content": { + "application/json": { + "example": [ + { + "href": "/subscription/a9575258-c1ce-4c35-9930-d3d902061cf3", + "rt": [ + "cm.subscription" + ], + "subscriptionId": "a9575258-c1ce-4c35-9930-d3d902061cf3", + "subscriptionName": "ConstellationNeighboursTable", + "notificationChannel": { + "streamAddress": "/api/v1/ws/a9575258-c1ce-4c35-9930-d3d902061cf3" + }, + "subscriptionFilters": [ + { + "requestedNotificationTypes": [ + "AVC" + ], + "requestedResources": [ + { + "resourceType": "cm.network", + "ids": [ + "c664b89e-6a3c-4747-559f-d79d0563a6a9" + ] + } + ] + }, + { + "requestedNotificationTypes": [ + "AVC" + ], + "requestedResources": [ + { + "resourceType": "cm.network", + "moduleIds": [ + "0705ee6f-2c79-40c0-41ce-967da13fbf8f" + ] + } + ] + }, + { + "requestedNotificationTypes": [ + "AVC" + ], + "requestedResources": [ + { + "resourceType": "cm.module", + "moduleIds": [ + "0705ee6f-2c79-40c0-41ce-967da13fbf8f" + ] + } + ] + } + ] + } + ], + "schema": { + "items": { + "$ref": "#/components/schemas/cm.subscription" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array subscriptions" + }, + "400": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-001", + "message": "Invalid URI: /api/v1/eg/subscriptions/?error" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of subscriptions" + }, + "post": { + "operationId": "createSubscriptions", + "requestBody": { + "content": { + "application/json": { + "example": [ + { + "subscriptionName": "ConstellationNeighboursTable", + "subscriptionFilters": [ + { + "requestedNotificationTypes": [ + "AVC" + ], + "requestedResources": [ + { + "resourceType": "cm.network", + "ids": [ + "c664b89e-6a3c-4747-559f-d79d0563a6a9" + ] + } + ] + }, + { + "requestedNotificationTypes": [ + "AVC" + ], + "requestedResources": [ + { + "resourceType": "cm.network", + "moduleIds": [ + "0705ee6f-2c79-40c0-41ce-967da13fbf8f" + ] + } + ] + }, + { + "requestedNotificationTypes": [ + "AVC" + ], + "requestedResources": [ + { + "resourceType": "cm.network", + "moduleIds": [ + "0705ee6f-2c79-40c0-41ce-967da13fbf8f" + ] + } + ] + } + ] + } + ], + "schema": { + "items": { + "$ref": "#/components/schemas/cm.subscription.request" + }, + "maxLength": 30, + "type": "array" + } + } + }, + "description": "Subscription info", + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "example": [ + { + "subscriptionId": "a9575258-c1ce-4c35-9930-d3d902061cf3", + "notificationChannel": { + "streamAddress": "/ws/a9575258-c1ce-4c35-9930-d3d902061cf3" + } + } + ], + "schema": { + "items": { + "$ref": "#/components/schemas/cm.subscription.response" + }, + "type": "array" + } + } + }, + "description": "Request has been fulfilled and new a new subscription resource has been created." + }, + "400": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-01-001", + "message": "Invalid request body: line \"5\"; parameter: \"subscriptionFilter.resourceType\"; value: \"cm.invalidResourceType\"" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "503": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Create Subscriptions" + } + }, + "/subscriptions/{subscriptionIdx}": { + "delete": { + "operationId": "deleteSubscription", + "parameters": [ + { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "subscriptionIdx", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-002", + "message": "Path: \"/subscriptions/0e64146b-1335-4fa6-61ad-f05f9fdde3e0\"; Resource Type: \"cm.subscription\"; ID: \"0e64146b-1335-4fa6-61ad-f05f9fdde3e0\"" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Delete subscription" + }, + "get": { + "operationId": "getSubscriptionById", + "parameters": [ + { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "subscriptionIdx", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.subscription" + } + } + }, + "description": "Successful response containing subscription data" + }, + "401": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-002", + "message": "Path: \"/subscriptions/0e64146b-1335-4fa6-61ad-f05f9fdde3e0\"; Resource Type: \"cm.subscription\"; ID: \"0e64146b-1335-4fa6-61ad-f05f9fdde3e0\"" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific subscription data" + }, + "put": { + "operationId": "UpdateSubscription", + "parameters": [ + { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "subscriptionIdx", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.subscription.request" + } + } + }, + "description": "Subscription data to be updated", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-01-001", + "message": "Invalid request body: line \"5\"; parameter: \"subscriptionFilter.resourceType\"; value: \"cm.invalidResourceType\"" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-002", + "message": "Path: \"/subscriptions/0e64146b-1335-4fa6-61ad-f05f9fdde3e0\"; Resource Type: \"cm.subscription\"; ID: \"0e64146b-1335-4fa6-61ad-f05f9fdde3e0\"" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "example": { + "errors": { + "code": "EG-00-xxx", + "message": "xxxTBDxxx" + } + }, + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update subscription data" + } + }, + "/{subscriptionIdx}": { + "description": "WebSocket endpoints for existing subscriptions", + "servers": [ + { + "url": "/api/v1/ws" + } + ] + }, + "/hosts": { + "get": { + "operationId": "getHosts", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": [ + { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a", + "rt": [ + "cm.host" + ], + "id": "d9672ef1-ddc1-cd6b-3c77-ea86b442545a", + "config": { + "name": "Sunnyvale Router 001", + "managedBy": "CM", + "location": { + "latitude": 20, + "longitude": 134.1 + }, + "selector": { + "hostSelectorByChassisId": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40" + } + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + }, + "state": { + "name": "Sunnyvale Router 001", + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "sysName": "Vendor A Router", + "sysDescr": "", + "managedBy": "CM", + "lldpState": "Present", + "location": { + "latitude": 37.368832, + "longitude": -122.036346 + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + }, + "ports": [ + { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/ports/5f8c47b4-c02a-6242-260c-185dd04b8faf", + "rt": [ + "cm.host.port" + ], + "id": "5f8c47b4-c02a-6242-260c-185dd04b8faf", + "config": { + "name": "towards San Jose", + "managedBy": "CM", + "selector": { + "ifSelectorByHostPortSourceMAC": { + "portSourceMAC": "28:c0:da:3e:3e:44" + } + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + }, + "state": { + "name": "towards San Jose", + "managedBy": "CM", + "lldpState": "Present", + "hostPort": { + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0", + "portSourceMAC": "28:c0:da:3e:3e:44" + }, + "moduleIf": { + "moduleId": "aa079e7c-02df-43ed-636e-71f7bfc212ff", + "moduleName": "Sunnyvale-1/0/0", + "macAddress": "00:0B:F8:00:01:01", + "serialNumber": "12345678901", + "clientIfAid": "XR-T1" + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + } + }, + { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/ports/4868c57e-0f4f-11ec-82a8-0242ac130003", + "rt": [ + "cm.host.port" + ], + "id": "4868c57e-0f4f-11ec-82a8-0242ac130003", + "config": { + "name": "towards Santa Clara", + "managedBy": "CM", + "selector": { + "ifSelectorByModuleMAC": { + "moduleMAC": "00:0B:F8:00:01:01", + "clientIfAid": "XR-T1" + } + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + }, + "state": { + "name": "towards Santa Clara", + "managedBy": "Host", + "lldpState": "Present", + "hostPort": { + "portIdSubtype": "interfaceName", + "portId": "et-1/0/2:0", + "portSourceMAC": "58:00:BB:00:00:12" + }, + "moduleIf": { + "moduleId": "4e58f211-oa575-41ae-65d6-54fbeba5a2fe", + "moduleName": "Sunnyvale-1/0/2", + "macAddress": "00:0B:F8:00:01:01", + "serialNumber": "12345678901", + "clientIfAid": "XR-T2" + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + } + } + ] + } + ], + "schema": { + "items": { + "$ref": "#/components/schemas/cm.host" + }, + "type": "array" + } + } + }, + "description": "Sucessful response containing an array of hosts" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all hosts" + }, + "post": { + "operationId": "createHosts", + "requestBody": { + "content": { + "application/json": { + "example": [ + { + "name": "Sunnyvale Router 001", + "location": { + "latitude": 37.368832, + "longitude": -122.036346 + }, + "selector": { + "hostSelectorByChassisId": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40" + } + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + }, + { + "name": "Santa Clara", + "location": { + "latitude": 37.354107, + "longitude": -121.955238 + }, + "selector": { + "hostSelectorByChassisId": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:10" + } + } + } + ], + "schema": { + "items": { + "$ref": "#/components/schemas/cm.host.create" + }, + "maxLength": 30, + "type": "array" + } + } + }, + "description": "Host info", + "required": true + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.resource" + }, + "type": "array" + } + } + }, + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Create hosts" + } + }, + "/hosts/{hostId}": { + "delete": { + "operationId": "deleteSpecificHost", + "parameters": [ + { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "hostId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "delete specific host" + }, + "get": { + "operationId": "getHostByID", + "parameters": [ + { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "hostId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a", + "rt": [ + "cm.host" + ], + "id": "d9672ef1-ddc1-cd6b-3c77-ea86b442545a", + "config": { + "name": "Sunnyvale Router 001", + "managedBy": "CM", + "location": { + "latitude": 37.368832, + "longitude": -122.036346 + }, + "selector": { + "hostSelectorByChassisId": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40" + } + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + }, + "ports": [ + { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/ports/5f8c47b4-c02a-6242-260c-185dd04b8faf" + }, + { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/ports/4868c57e-0f4f-11ec-82a8-0242ac130003" + } + ] + }, + "state": { + "name": "Sunnyvale Router 001", + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "sysName": "Vendor A Router", + "sysDescr": "", + "lldpState": "Present", + "managedBy": "CM", + "location": { + "latitude": 37.368832, + "longitude": -122.036346 + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + }, + "ports": [ + { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/ports/5f8c47b4-c02a-6242-260c-185dd04b8faf", + "rt": [ + "cm.host.port" + ] + }, + { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/ports/4868c57e-0f4f-11ec-82a8-0242ac130003", + "rt": [ + "cm.host.port" + ] + } + ] + } + }, + "schema": { + "$ref": "#/components/schemas/cm.host" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific host data" + }, + "put": { + "operationId": "UpdateHost", + "parameters": [ + { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "hostId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "example": { + "name": "Madrid Router 001", + "location": { + "latitude": 40.416775, + "longitude": -3.70379 + } + }, + "schema": { + "$ref": "#/components/schemas/cm.host.update" + } + } + }, + "description": "Update Host", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "update host" + } + }, + "/hosts/{hostId}/ports": { + "get": { + "operationId": "getHostPorts", + "parameters": [ + { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "hostId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": [ + { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/ports/5f8c47b4-c02a-6242-260c-185dd04b8faf", + "rt": [ + "cm.host.port" + ] + }, + { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/ports/4868c57e-0f4f-11ec-82a8-0242ac130003", + "rt": [ + "cm.host.port" + ] + } + ], + "schema": { + "items": { + "$ref": "#/components/schemas/cm.host.port" + }, + "type": "array" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve host' ports" + }, + "post": { + "operationId": "createHostPorts", + "parameters": [ + { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "hostId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "example": [ + { + "name": "towards Lisbon", + "managedBy": "CM", + "selector": { + "ifSelectorByHostPortId": { + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0" + } + }, + "labels": { + "region": "Iberia", + "city": "Madrid" + } + } + ], + "schema": { + "items": { + "$ref": "#/components/schemas/cm.host.port.create" + }, + "maxLength": 30, + "type": "array" + } + } + }, + "description": "Host ports info", + "required": true + }, + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.resource" + }, + "type": "array" + } + } + }, + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Create host ports" + } + }, + "/hosts/{hostId}/ports/{portIdx}": { + "delete": { + "operationId": "deleteHostPort", + "parameters": [ + { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "hostId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Index into the Ports list", + "explode": false, + "in": "path", + "name": "portIdx", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "delete specific host port" + }, + "get": { + "operationId": "getHostPort", + "parameters": [ + { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "hostId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Index into the Ports list", + "explode": false, + "in": "path", + "name": "portIdx", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.host.port" + } + } + }, + "description": "Successful" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + } + }, + "summary": "Retrieve specific host's port" + }, + "put": { + "operationId": "updateHostPort", + "parameters": [ + { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "hostId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Index into the Ports list", + "explode": false, + "in": "path", + "name": "portIdx", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.host.port.update" + } + } + }, + "description": "Update Host Port", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "update hosts' Port" + } + }, + "/ndus": { + "get": { + "operationId": "getNdus", + "parameters": [ + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDUs" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDUs" + } + }, + "/ndus/{nduId}": { + "delete": { + "operationId": "deleteSpecificNdu", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "delete specific NDU" + }, + "get": { + "operationId": "getNduByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU data" + }, + "put": { + "operationId": "UpdateNdu", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.update" + } + } + }, + "description": "Update NDU", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "update NDU data" + } + }, + "/ndus/{nduId}/ports": { + "get": { + "operationId": "getNduPorts", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.port" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDU ports" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU ports" + } + }, + "/ndus/{nduId}/ports/{nduPortColId}": { + "get": { + "operationId": "getNduPortByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.port" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU port data" + }, + "put": { + "operationId": "UpdateNduPort", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.port.update" + } + } + }, + "description": "Update NDU port", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update NDU port data" + } + }, + "/ndus/{nduId}/ports/{nduPortColId}/toms": { + "get": { + "operationId": "getNduToms", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.port.tom" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDU TOMs" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU TOMs" + } + }, + "/ndus/{nduId}/ports/{nduPortColId}/toms/{nduTomColId}": { + "get": { + "operationId": "getNduTomByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Tom identifier within NDU port.", + "explode": false, + "in": "path", + "name": "nduTomColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.port.tom" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU port TOM data" + }, + "put": { + "operationId": "UpdateNduTom", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Tom identifier within NDU port.", + "explode": false, + "in": "path", + "name": "nduTomColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.port.tom.update" + } + } + }, + "description": "Update NDU TOM", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update NDU port TOM data" + } + }, + "/ndus/{nduId}/ports/{nduPortColId}/xrs": { + "get": { + "operationId": "getNduXRs", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.port.xr" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDU XRs" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU XR pluggable interfaces" + } + }, + "/ndus/{nduId}/ports/{nduPortColId}/xrs/{nduXrColId}": { + "get": { + "operationId": "getNduXrByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "XR pluggable identifier within NDU port.", + "explode": false, + "in": "path", + "name": "nduXrColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.port.xr" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU port XR pluggable data" + }, + "put": { + "operationId": "UpdateNduXr", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "XR pluggable identifier within NDU port.", + "explode": false, + "in": "path", + "name": "nduXrColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.port.xr.update" + } + } + }, + "description": "Update NDU XR pluggable", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update NDU port XR pluggable data" + } + }, + "/ndus/{nduId}/ports/{nduPortColId}/edfas": { + "get": { + "operationId": "getNduEdfas", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.port.edfa" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDU EDFAa" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU EDFAa" + } + }, + "/ndus/{nduId}/ports/{nduPortColId}/edfas/{nduEdfaColId}": { + "get": { + "operationId": "getNduEdfaByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Edfa identifier within NDU port.", + "explode": false, + "in": "path", + "name": "nduEdfaColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.port.edfa" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU port EDFA data" + }, + "put": { + "operationId": "UpdateNduEdfa", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Edfa identifier within NDU port.", + "explode": false, + "in": "path", + "name": "nduEdfaColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.port.edfa.update" + } + } + }, + "description": "Update NDU EDFA", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update NDU port EDFA data" + } + }, + "/ndus/{nduId}/ports/{nduPortColId}/voas": { + "get": { + "operationId": "getNduVoas", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.port.voa" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDU VOAs" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU VOAs" + } + }, + "/ndus/{nduId}/ports/{nduPortColId}/voas/{nduVoaColId}": { + "get": { + "operationId": "getNduVoaByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "VOA identifier within NDU port.", + "explode": false, + "in": "path", + "name": "nduVoaColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.port.voa" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU port VOA data" + }, + "put": { + "operationId": "UpdateNduVoa", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "VOA identifier within NDU port.", + "explode": false, + "in": "path", + "name": "nduVoaColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.port.voa.update" + } + } + }, + "description": "Update NDU VOA", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update NDU port VOA data" + } + }, + "/ndus/{nduId}/lineptps": { + "get": { + "operationId": "getNduLinePtps", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.linePtp" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDU line ports" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU line ports" + } + }, + "/ndus/{nduId}/lineptps/{nduLinePtpColId}": { + "get": { + "operationId": "getNduLinePtpByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduLinePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.linePtp" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU line port data" + } + }, + "/ndus/{nduId}/lineptps/{nduLinePtpColId}/carriers": { + "get": { + "operationId": "getNduLinePtpCarriers", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduLinePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.linePtp.carrier" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDU line port carriers" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU line port carriers" + } + }, + "/ndus/{nduId}/lineptps/{nduLinePtpColId}/carriers/{nduCarrierColId}": { + "get": { + "operationId": "getNduLinePtpCarrierByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Line port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduLinePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Carrier identifier within NDU line port.", + "explode": false, + "in": "path", + "name": "nduCarrierColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.linePtp.carrier" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU line port carrier data" + } + }, + "/ndus/{nduId}/tribPtps": { + "get": { + "operationId": "getNduTribPtps", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.tribPtp" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDU tributary ports" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU tributary ports" + } + }, + "/ndus/{nduId}/tribPtps/{nduTribPtpColId}": { + "get": { + "operationId": "getNduTribPtpByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Triburaty port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduTribPtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.tribPtp" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU tributary port data" + }, + "put": { + "operationId": "UpdateNduTribPtp", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Triburaty port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduTribPtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.tribPtp.update" + } + } + }, + "description": "Update NDU tributary port", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update NDU tributary port data" + } + }, + "/ndus/{nduId}/otus": { + "get": { + "operationId": "getNduOtus", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.otu" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDU OTUs" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU OTUs" + } + }, + "/ndus/{nduId}/otus/{nduOtuColId}": { + "get": { + "operationId": "getNduOtuByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "OTU signal identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduOtuColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.otu" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU OTU data" + }, + "put": { + "operationId": "updateNduOtu", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "OTU signal identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduOtuColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.otu.update" + } + } + }, + "description": "Update NDU OTU", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update NDU OTU data" + } + }, + "/ndus/{nduId}/otus/{nduOtuColId}/odus": { + "get": { + "operationId": "getNduOdus", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "OTU signal identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduOtuColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.otu.odu" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of ODUs" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of ODUs from a NDU OTU" + } + }, + "/ndus/{nduId}/otus/{nduOtuColId}/odus/{nduOduColId}": { + "get": { + "operationId": "getNduOduByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "OTU signal identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduOtuColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "ODU signal identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduOduColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.otu.odu" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific ODU data from a NDU OTU" + } + }, + "/ndus/{nduId}/ethernetClients": { + "get": { + "operationId": "getNduEthernetClients", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.ethernetClient" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDU ethernet clients" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU ethernet clients" + } + }, + "/ndus/{nduId}/ethernetClients/{nduEthernetColId}": { + "get": { + "operationId": "getNduEthernetClientByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Ethernet client signal identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduEthernetColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.ethernetClient" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU ethernet client data" + }, + "put": { + "operationId": "updateNduEthernetClient", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Ethernet client signal identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduEthernetColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.ethernetClient.update" + } + } + }, + "description": "Update NDU Ethernet client", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update NDU Ethernet client data" + } + }, + "/ndus/{nduId}/trails": { + "get": { + "operationId": "getNduTrails", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.trail" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDU trails" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU trail" + } + }, + "/ndus/{nduId}/trails/{nduTrailColId}": { + "get": { + "operationId": "getNduTrailByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Trail identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduTrailColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.trail" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU ethernetClient data" + } + }, + "/ndus/{nduId}/fans": { + "get": { + "operationId": "getNduFans", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/cm.ndu.fan" + }, + "type": "array" + } + } + }, + "description": "Successful response containing an array of NDU fan modules" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU fan modules" + } + }, + "/ndus/{nduId}/fans/{nduFanColId}": { + "get": { + "operationId": "getNduFanByID", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Fan identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduFanColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.fan" + } + } + }, + "description": "Successful" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve specific NDU fan module data" + } + }, + "/ndus/{nduId}/pem": { + "get": { + "operationId": "getNduPem", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.pem" + } + } + }, + "description": "Successful response containing an NDU pem module" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU pem module" + }, + "put": { + "operationId": "updateNduPem", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.pem.update" + } + } + }, + "description": "Update NDU PEM", + "required": true + }, + "responses": { + "202": { + "description": "Request has been accepted for processing, but the processing has not been completed." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Update NDU PEM data" + } + }, + "/ndus/{nduId}/leds": { + "get": { + "operationId": "getNduLeds", + "parameters": [ + { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Query content type\n- 'base' indicates response payload links are not resolved.\n- 'all' indicates that response payload is resolved (i.e. resource representation) and links are not resolved.\n- 'expanded' indicates that response payload and links are resolved\n", + "in": "query", + "name": "content", + "required": false, + "schema": { + "default": "base", + "enum": [ + "base", + "all", + "expanded" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/cm.ndu.leds" + } + } + }, + "description": "Successful response containing an NDU LEDs" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "BadRequest" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Not Found" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Service Unavailable" + }, + "504": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errors" + } + } + }, + "description": "Gateway Timeout" + } + }, + "summary": "Retrieve list of all NDU LEDs" + } + } + }, + "components": { + "parameters": { + "moduleId": { + "description": "Module identifier.", + "explode": false, + "in": "path", + "name": "moduleId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "linePtpColId": { + "description": "Line port identifier within module.", + "explode": false, + "in": "path", + "name": "linePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "carrierColId": { + "description": "Carrier identifier within module line port.", + "explode": false, + "in": "path", + "name": "carrierColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "dscgColId": { + "description": "DSCG identifier within module carrier.", + "explode": false, + "in": "path", + "name": "dscgColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "dscColId": { + "description": "DSC identifier within module carrier.", + "explode": false, + "in": "path", + "name": "dscColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "otuColId": { + "description": "OTU signal identifier within module.", + "explode": false, + "in": "path", + "name": "otuColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "oduColId": { + "description": "ODU signal identifier within module.", + "explode": false, + "in": "path", + "name": "oduColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "ethernetColId": { + "description": "Ethernet client signal identifier within module.", + "explode": false, + "in": "path", + "name": "ethernetColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "hostNeighborColId": { + "description": "hostNeighbor data identifier.", + "explode": false, + "in": "path", + "name": "hostNeighborColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "ethernetLldpColId": { + "description": "ethernet LLDP data identifier.", + "explode": false, + "in": "path", + "name": "ethernetLldpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "lcColId": { + "description": "local connection identifier within module.", + "explode": false, + "in": "path", + "name": "lcColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "acColId": { + "description": "attachment circuit identifier within module client ethernet interface.", + "explode": false, + "in": "path", + "name": "acColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "deviceIdx": { + "description": "Index into the device list", + "explode": false, + "in": "path", + "name": "deviceIdx", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "actionId": { + "description": "Software control action identifier within the sw action list", + "explode": false, + "in": "path", + "name": "actionId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "moduleActionId": { + "description": "Software control action identifier within the module sw action list", + "explode": false, + "in": "path", + "name": "moduleActionId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "deviceId": { + "description": "Device identifier (XR pluggable module or NDU).", + "explode": false, + "in": "path", + "name": "deviceId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "swBankColId": { + "description": "Software bank identifier within module.\n- '1': Refers to Bank A\n- '2': Refers to Bank B\n", + "explode": false, + "in": "path", + "name": "swBankColId", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + }, + "style": "simple" + }, + "ncId": { + "description": "Connection identifier within the connection list", + "explode": false, + "in": "path", + "name": "ncId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "epId": { + "description": "Endpoint identifier within the transport-connection", + "explode": false, + "in": "path", + "name": "epId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "lcId": { + "description": "Local connection identifier within the connection scope", + "explode": false, + "in": "path", + "name": "lcId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "acId": { + "description": "Attachment circuit identifier within the connection scope", + "explode": false, + "in": "path", + "name": "acId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "networkId": { + "description": "Index into the xr-network list", + "explode": false, + "in": "path", + "name": "networkId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "nodeId": { + "description": "Index of leaf module into xr-network list", + "explode": false, + "in": "path", + "name": "nodeId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "tcId": { + "description": "Index into the transport-connection list", + "explode": false, + "in": "path", + "name": "tcId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "clId": { + "description": "Index into the capacity-link list", + "explode": false, + "in": "path", + "name": "clId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "subscriptionIdx": { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "subscriptionIdx", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "hostId": { + "description": "Index into the Hosts list", + "explode": false, + "in": "path", + "name": "hostId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "portIdx": { + "description": "Index into the Ports list", + "explode": false, + "in": "path", + "name": "portIdx", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "nduId": { + "description": "NDU identifier.", + "explode": false, + "in": "path", + "name": "nduId", + "required": true, + "schema": { + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "type": "string" + }, + "style": "simple" + }, + "nduPortColId": { + "description": "NDU port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduPortColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "nduTomColId": { + "description": "Tom identifier within NDU port.", + "explode": false, + "in": "path", + "name": "nduTomColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "nduXrColId": { + "description": "XR pluggable identifier within NDU port.", + "explode": false, + "in": "path", + "name": "nduXrColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "nduEdfaColId": { + "description": "Edfa identifier within NDU port.", + "explode": false, + "in": "path", + "name": "nduEdfaColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "nduVoaColId": { + "description": "VOA identifier within NDU port.", + "explode": false, + "in": "path", + "name": "nduVoaColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "nduLinePtpColId": { + "description": "Line port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduLinePtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "nduTribPtpColId": { + "description": "Triburaty port identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduTribPtpColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "nduCarrierColId": { + "description": "Carrier identifier within NDU line port.", + "explode": false, + "in": "path", + "name": "nduCarrierColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "nduOtuColId": { + "description": "OTU signal identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduOtuColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "nduOduColId": { + "description": "ODU signal identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduOduColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "nduEthernetColId": { + "description": "Ethernet client signal identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduEthernetColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "nduTrailColId": { + "description": "Trail identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduTrailColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + }, + "nduFanColId": { + "description": "Fan identifier within NDU.", + "explode": false, + "in": "path", + "name": "nduFanColId", + "required": true, + "schema": { + "type": "integer" + }, + "style": "simple" + } + }, + "schemas": { + "cm.module": { + "description": "Definition of host object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "config": { + "$ref": "#/components/schemas/cm.module.config" + }, + "state": { + "$ref": "#/components/schemas/cm.module.state" + }, + "linePtps": { + "$ref": "#/components/schemas/cm.module.linePtps" + }, + "otus": { + "$ref": "#/components/schemas/cm.module.otus" + }, + "ethernetClients": { + "$ref": "#/components/schemas/cm.module.ethernetClients" + }, + "localConnections": { + "$ref": "#/components/schemas/cm.module.localConnections" + } + } + }, + "cm.module.config": { + "additionalProperties": false, + "description": "Definition of module configurable parameters", + "properties": { + "moduleName": { + "$ref": "#/components/schemas/cm.module.parameters.moduleName" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.module.state": { + "description": "Definition of module state object", + "properties": { + "moduleName": { + "$ref": "#/components/schemas/xr.device.n" + }, + "moduleAid": { + "$ref": "#/components/schemas/xr.device.aid" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + }, + "configuredRole": { + "$ref": "#/components/schemas/xr.configuration.configuredRole" + }, + "currentRole": { + "$ref": "#/components/schemas/xr.configuration.currentRole" + }, + "roleStatus": { + "$ref": "#/components/schemas/xr.configuration.roleStatus" + }, + "trafficMode": { + "$ref": "#/components/schemas/xr.configuration.trafficMode" + }, + "serdesRate": { + "$ref": "#/components/schemas/xr.configuration.serdesRate" + }, + "fiberConnectionMode": { + "$ref": "#/components/schemas/xr.configuration.fiberConnectionMode" + }, + "tcMode": { + "$ref": "#/components/schemas/xr.configuration.tcMode" + }, + "connectivityState": { + "$ref": "#/components/schemas/cm.module.parameters.connectivityState" + }, + "hwDescription": { + "$ref": "#/components/schemas/cm.module.state.hwDescription" + } + } + }, + "cm.module.state.hwDescription": { + "description": "Definition of module platform properties", + "properties": { + "pi": { + "$ref": "#/components/schemas/xr.platform.pi" + }, + "mnfv": { + "$ref": "#/components/schemas/xr.platform.mnfv" + }, + "mnmn": { + "$ref": "#/components/schemas/xr.platform.mnmn" + }, + "mnmo": { + "$ref": "#/components/schemas/xr.platform.mnmo" + }, + "mnhw": { + "$ref": "#/components/schemas/xr.platform.mnhw" + }, + "mndt": { + "$ref": "#/components/schemas/xr.platform.mndt" + }, + "serialNumber": { + "$ref": "#/components/schemas/xr.platform.mnsel" + }, + "clei": { + "$ref": "#/components/schemas/xr.platform.clei" + }, + "macAddress": { + "$ref": "#/components/schemas/xr.platform.macAddress" + }, + "connectorType": { + "$ref": "#/components/schemas/xr.platform.connectorType" + }, + "formFactor": { + "$ref": "#/components/schemas/xr.platform.formFactor" + }, + "piid": { + "$ref": "#/components/schemas/xr.device.piid" + }, + "dmn": { + "$ref": "#/components/schemas/xr.device.dmn" + }, + "sv": { + "$ref": "#/components/schemas/xr.device.sv" + }, + "icv": { + "$ref": "#/components/schemas/xr.device.icv" + } + }, + "x-oapi-codegen-extra-tags": { + "bson": "hwDescription" + } + }, + "cm.module.parameters.moduleName": { + "description": "Property to change the device name. This is also reflected in the same property in oic.wk.d", + "maxLength": 64, + "title": "Device name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "moduleName" + } + }, + "cm.module.parameters.connectivityState": { + "description": "The CM connectivity state between the CM and the device.", + "enum": [ + "active", + "inactive" + ], + "title": "Connectivity state", + "type": "string", + "x-enum-varnames": [ + "Active", + "Inactive" + ], + "x-oapi-codegen-extra-tags": { + "bson": "connectivityState" + } + }, + "cm.module.update": { + "additionalProperties": false, + "description": "Definition of module editable parameters", + "minProperties": 1, + "properties": { + "moduleName": { + "$ref": "#/components/schemas/cm.module.parameters.moduleName" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.module.linePtp": { + "description": "Definition of module line port object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/xr.common.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.module.linePtp.config" + }, + "state": { + "$ref": "#/components/schemas/cm.module.linePtp.state" + }, + "carriers": { + "$ref": "#/components/schemas/cm.module.linePtp.carriers" + } + } + }, + "cm.module.linePtps": { + "items": { + "$ref": "#/components/schemas/cm.module.linePtp" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "linePtps" + } + }, + "cm.module.linePtp.config": { + "additionalProperties": false, + "description": "Definition of module port configurable parameters", + "properties": { + "administrativeState": { + "$ref": "#/components/schemas/cm.module.linePtp.parameters.administrativeState" + } + }, + "type": "object" + }, + "cm.module.linePtp.state": { + "description": "Definition of module line port state object", + "properties": { + "linePtpAid": { + "$ref": "#/components/schemas/xr.lineptp.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.lineptp.parentAid" + }, + "administrativeState": { + "$ref": "#/components/schemas/cm.module.linePtp.parameters.administrativeState" + }, + "operStatus": { + "$ref": "#/components/schemas/xr.lineptp.operStatus" + }, + "discoveredNeighbors": { + "$ref": "#/components/schemas/cm.module.linePtp.discoveredNeighbors" + }, + "ctrlPlaneNeighbors": { + "$ref": "#/components/schemas/cm.module.linePtp.ctrlPlaneNeighbors" + } + }, + "type": "object" + }, + "cm.module.linePtp.ctrlPlaneNeighbor": { + "properties": { + "macAddress": { + "$ref": "#/components/schemas/xr.controlplane.neighbor.macAddress" + }, + "currentRole": { + "$ref": "#/components/schemas/xr.controlplane.neighbor.currentRole" + }, + "constellationFrequency": { + "$ref": "#/components/schemas/xr.controlplane.neighbor.constellationFrequency" + }, + "conState": { + "$ref": "#/components/schemas/xr.controlplane.neighbor.conState" + }, + "lastConStateChange": { + "$ref": "#/components/schemas/xr.controlplane.neighbor.lastConStateChange" + } + } + }, + "cm.module.linePtp.ctrlPlaneNeighbors": { + "description": "Array of XR modules to which control plane connectivity is, or has been, established.", + "items": { + "$ref": "#/components/schemas/cm.module.linePtp.ctrlPlaneNeighbor" + }, + "maxItems": 20, + "minItems": 0, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "ctrlPlaneNeighbors" + } + }, + "cm.module.linePtp.discoveredNeighbor": { + "properties": { + "macAddress": { + "$ref": "#/components/schemas/xr.discovered.neighbor.macAddress" + }, + "currentRole": { + "$ref": "#/components/schemas/xr.discovered.neighbor.currentRole" + }, + "discoveredTime": { + "$ref": "#/components/schemas/xr.discovered.neighbor.discoveredTime" + }, + "constellationFrequency": { + "$ref": "#/components/schemas/xr.discovered.neighbor.constellationFrequency" + } + } + }, + "cm.module.linePtp.discoveredNeighbors": { + "description": "Array of XR modules discovered in the last performed fast scan.\nEntities in the ctrlPlaneNeighbors array will not be shown here.\n", + "items": { + "$ref": "#/components/schemas/cm.module.linePtp.discoveredNeighbor" + }, + "maxItems": 10, + "minItems": 0, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "discoveredNeighbors" + } + }, + "cm.module.linePtp.parameters.administrativeState": { + "description": "Configurable admin state of the line side port", + "enum": [ + "lock", + "unlock", + "maintenance" + ], + "title": "Administrative State", + "type": "string", + "x-enum-varnames": [ + "Lock", + "Unlock", + "Maintenance" + ], + "x-oapi-codegen-extra-tags": { + "bson": "administrativeState" + }, + "x-trafficAffecting": true + }, + "cm.module.linePtp.update": { + "additionalProperties": false, + "description": "Definition of module line port editable parameters", + "minProperties": 1, + "properties": { + "administrativeState": { + "$ref": "#/components/schemas/cm.module.linePtp.parameters.administrativeState" + } + }, + "type": "object" + }, + "cm.module.linePtp.carrier": { + "description": "Definition of module carrier object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/xr.common.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.config" + }, + "state": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.state" + }, + "dscgs": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dscgs" + }, + "dscs": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dscs" + } + } + }, + "cm.module.linePtp.carriers": { + "items": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "carriers" + } + }, + "cm.module.linePtp.carrier.config": { + "description": "Definition of module carrier configurable parameters", + "properties": { + "loopback": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.parameters.loopback" + } + }, + "type": "object" + }, + "cm.module.linePtp.carrier.state": { + "description": "Definition of module carrier state object", + "properties": { + "carrierAid": { + "$ref": "#/components/schemas/xr.carrier.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.carrier.parentAid" + }, + "frequencyCtrl": { + "$ref": "#/components/schemas/xr.carrier.frequencyCtrl" + }, + "constellationFrequency": { + "$ref": "#/components/schemas/xr.carrier.constellationFrequency" + }, + "operatingFrequency": { + "$ref": "#/components/schemas/xr.carrier.operatingFrequency" + }, + "ncoFrequency": { + "$ref": "#/components/schemas/xr.carrier.ncoFrequency" + }, + "modulation": { + "$ref": "#/components/schemas/xr.carrier.modulation" + }, + "capacity": { + "$ref": "#/components/schemas/xr.carrier.capacity" + }, + "clientPortMode": { + "$ref": "#/components/schemas/xr.carrier.clientPortMode" + }, + "baudRate": { + "$ref": "#/components/schemas/xr.carrier.baudRate" + }, + "maxAllowedDSCs": { + "$ref": "#/components/schemas/xr.carrier.maxAllowedDSCs" + }, + "txPowerTargetPerDsc": { + "$ref": "#/components/schemas/xr.carrier.txPowerTargetPerDsc" + }, + "loopback": { + "$ref": "#/components/schemas/xr.carrier.diagnostic.loopback" + } + }, + "type": "object" + }, + "cm.module.linePtp.carrier.parameters.loopback": { + "default": "disabled", + "description": "Enable/Disable loopback", + "enum": [ + "disabled", + "terminal" + ], + "title": "Loopback", + "type": "string", + "x-enum-varnames": [ + "Disabled", + "Terminal" + ], + "x-oapi-codegen-extra-tags": { + "bson": "loopback" + }, + "x-trafficAffecting": true + }, + "cm.module.linePtp.carrier.update": { + "additionalProperties": false, + "description": "Definition of module carrier editable parameters", + "minProperties": 1, + "properties": { + "loopback": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.parameters.loopback" + } + }, + "type": "object" + }, + "cm.module.linePtp.carrier.dsc": { + "description": "Definition of module dsc object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/xr.common.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.config" + }, + "state": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.state" + } + } + }, + "cm.module.linePtp.carrier.dscs": { + "items": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "dscs" + } + }, + "cm.module.linePtp.carrier.dsc.config": { + "additionalProperties": false, + "description": "Definition of module dsc configurable parameters", + "properties": { + "usability": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.parameters.usability" + }, + "txEnabled": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.parameters.txEnabled" + }, + "rxEnabled": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.parameters.rxEnabled" + }, + "facPRBSGenEnabled": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.parameters.facPRBSGenEnabled" + }, + "facPRBSMonEnabled": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.parameters.facPRBSMonEnabled" + }, + "powerOffset": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.parameters.powerOffset" + } + }, + "type": "object" + }, + "cm.module.linePtp.carrier.dsc.state": { + "description": "Definition of module dsc state object", + "properties": { + "dscAid": { + "$ref": "#/components/schemas/xr.carrier.dsc.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.carrier.dsc.parentAid" + }, + "cDsc": { + "$ref": "#/components/schemas/xr.carrier.dsc.cDsc" + }, + "usability": { + "$ref": "#/components/schemas/xr.carrier.dsc.usability" + }, + "txEnabled": { + "$ref": "#/components/schemas/xr.carrier.dsc.txEnabled" + }, + "rxEnabled": { + "$ref": "#/components/schemas/xr.carrier.dsc.rxEnabled" + }, + "txStatus": { + "$ref": "#/components/schemas/xr.carrier.dsc.txStatus" + }, + "rxStatus": { + "$ref": "#/components/schemas/xr.carrier.dsc.rxStatus" + }, + "powerOffset": { + "$ref": "#/components/schemas/xr.carrier.dsc.powerOffset" + }, + "facPRBSGenEnabled": { + "$ref": "#/components/schemas/xr.carrier.dsc.diagnostic.facPRBSGenEnabled" + }, + "facPRBSMonEnabled": { + "$ref": "#/components/schemas/xr.carrier.dsc.diagnostic.facPRBSMonEnabled" + } + }, + "type": "object" + }, + "cm.module.linePtp.carrier.dsc.parameters.usability": { + "default": "usable", + "description": "Usability of this DSC. Configurable to control the allowed uses.\n * `usable` - DSC is usable for either PRBS or data.\n * `prbsOnly` - DSC is usable only for PRBS. This is done for optical power balancing reasons.\n * `reserved` - DSC is reserved and is not usable for either PRBS or data.\n", + "enum": [ + "usable", + "prbsOnly", + "reserved" + ], + "title": "Usability", + "type": "string", + "x-enum-varnames": [ + "Usable", + "PRBS only", + "Reserved" + ], + "x-oapi-codegen-extra-tags": { + "bson": "usability" + }, + "x-trafficAffecting": true + }, + "cm.module.linePtp.carrier.dsc.parameters.txEnabled": { + "default": false, + "description": "Configurable to enable/disable Tx transmission on this DSC. \nWhen disabled, this prevents any traffic from going out of the DSC.\n", + "title": "TX Enabled", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "txEnabled" + }, + "x-trafficAffecting": true + }, + "cm.module.linePtp.carrier.dsc.parameters.rxEnabled": { + "default": true, + "description": "Configurable to enable/disable the DSC to receive traffic.", + "title": "Rx Enabled", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "rxEnabled" + }, + "x-trafficAffecting": true + }, + "cm.module.linePtp.carrier.dsc.parameters.facPRBSGenEnabled": { + "default": false, + "description": "Configurable to enable/disable facility PRBS test pattern generation", + "title": "Facility PRBS generation", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "facPRBSGenEnabled" + }, + "x-trafficAffecting": true + }, + "cm.module.linePtp.carrier.dsc.parameters.facPRBSMonEnabled": { + "default": false, + "description": "Configurable to enable/disable facility PRBS test pattern monitoring", + "title": "Facility PRBS monitoring", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "facPRBSMonEnabled" + }, + "x-trafficAffecting": true + }, + "cm.module.linePtp.carrier.dsc.parameters.powerOffset": { + "default": 0, + "description": "Power offset relative to the average DSC power.", + "format": "double", + "maximum": 6, + "minimum": -6, + "multipleOf": 0.1, + "title": "Power offset", + "type": "number", + "x-unit": "dB", + "x-oapi-codegen-extra-tags": { + "bson": "powerOffset" + }, + "x-trafficAffecting": true + }, + "cm.module.linePtp.carrier.dsc.update": { + "additionalProperties": false, + "description": "Definition of module dsc editable parameters", + "minProperties": 1, + "properties": { + "usability": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.parameters.usability" + }, + "txEnabled": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.parameters.txEnabled" + }, + "rxEnabled": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.parameters.rxEnabled" + }, + "facPRBSGenEnabled": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.parameters.facPRBSGenEnabled" + }, + "facPRBSMonEnabled": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.parameters.facPRBSMonEnabled" + }, + "powerOffset": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dsc.parameters.powerOffset" + } + }, + "type": "object" + }, + "cm.module.linePtp.carrier.dscg": { + "description": "Definition of module dscg object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/xr.common.colId" + }, + "state": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dscg.state" + } + } + }, + "cm.module.linePtp.carrier.dscgs": { + "items": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dscg" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "dscgs" + } + }, + "cm.module.linePtp.carrier.dscg.state": { + "description": "Definition of module dscg state object", + "properties": { + "dscgAid": { + "$ref": "#/components/schemas/xr.carrier.dscg.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.carrier.dscg.parentAid" + }, + "txDSCs": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dscg.txDSCs" + }, + "rxDSCs": { + "$ref": "#/components/schemas/cm.module.linePtp.carrier.dscg.rxDSCs" + } + }, + "type": "object" + }, + "cm.module.linePtp.carrier.dscg.txDSCs": { + "items": { + "$ref": "#/components/schemas/xr.carrier.dsc.aid" + }, + "maxItems": 16, + "minItems": 0, + "type": "array", + "uniqueItems": true, + "x-oapi-codegen-extra-tags": { + "bson": "txDSCs" + } + }, + "cm.module.linePtp.carrier.dscg.rxDSCs": { + "items": { + "$ref": "#/components/schemas/xr.carrier.dsc.aid" + }, + "maxItems": 16, + "minItems": 0, + "type": "array", + "uniqueItems": true, + "x-oapi-codegen-extra-tags": { + "bson": "rxDSCs" + } + }, + "cm.module.otu": { + "description": "Definition of module otu object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/xr.common.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.module.otu.config" + }, + "state": { + "$ref": "#/components/schemas/cm.module.otu.state" + }, + "odus": { + "$ref": "#/components/schemas/cm.module.odus" + } + } + }, + "cm.module.otus": { + "items": { + "$ref": "#/components/schemas/cm.module.otu" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "otus" + } + }, + "cm.module.otu.config": { + "additionalProperties": false, + "description": "Definition of module otu configurable parameters", + "properties": { + "txTTI": { + "$ref": "#/components/schemas/cm.module.otu.parameters.txTTI" + }, + "expectedTTI": { + "$ref": "#/components/schemas/cm.module.otu.parameters.expectedTTI" + }, + "facPRBSGen": { + "$ref": "#/components/schemas/cm.module.otu.parameters.facPRBSGen" + }, + "facPRBSMon": { + "$ref": "#/components/schemas/cm.module.otu.parameters.facPRBSMon" + } + }, + "type": "object" + }, + "cm.module.otu.state": { + "description": "Definition of module otu state object", + "properties": { + "otuAid": { + "$ref": "#/components/schemas/xr.otu.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.otu.parentAid" + }, + "otuType": { + "$ref": "#/components/schemas/xr.otu.otuType" + }, + "rate": { + "$ref": "#/components/schemas/xr.otu.rate" + }, + "operStatus": { + "$ref": "#/components/schemas/xr.otu.operStatus" + }, + "txTTI": { + "$ref": "#/components/schemas/xr.otu.txTTI" + }, + "rxTTI": { + "$ref": "#/components/schemas/xr.otu.rxTTI" + }, + "expectedTTI": { + "$ref": "#/components/schemas/xr.otu.expectedTTI" + }, + "facPRBSGen": { + "$ref": "#/components/schemas/xr.otu.diagnostic.facPRBSGen" + }, + "facPRBSMon": { + "$ref": "#/components/schemas/xr.otu.diagnostic.facPRBSMon" + } + }, + "type": "object" + }, + "cm.module.otu.parameters.txTTI": { + "default": "", + "description": "Up to 64 byte string for transmitting as TTI.", + "maxLength": 64, + "title": "Transmit TTI", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "txTTI" + } + }, + "cm.module.otu.parameters.expectedTTI": { + "default": "", + "description": "Up to 64 byte string of TTI that is expected to be received.", + "maxLength": 64, + "title": "Expected TTI", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "expectedTTI" + } + }, + "cm.module.otu.parameters.facPRBSGen": { + "default": "disabled", + "description": "Enable/Disable facility PRBS test pattern generation", + "enum": [ + "enabled", + "disabled" + ], + "title": "Facility PRBS generation", + "type": "string", + "x-enum-varnames": [ + "Enabled", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "facPRBSGen" + }, + "x-trafficAffecting": true + }, + "cm.module.otu.parameters.facPRBSMon": { + "default": "disabled", + "description": "Enable/Disable facility PRBS test pattern monitoring", + "enum": [ + "enabled", + "disabled" + ], + "title": "Facility PRBS monitoring", + "type": "string", + "x-enum-varnames": [ + "Enabled", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "facPRBSMon" + }, + "x-trafficAffecting": true + }, + "cm.module.otu.update": { + "additionalProperties": false, + "description": "Definition of module otu editable parameters", + "minProperties": 1, + "properties": { + "txTTI": { + "$ref": "#/components/schemas/cm.module.otu.parameters.txTTI" + }, + "expectedTTI": { + "$ref": "#/components/schemas/cm.module.otu.parameters.expectedTTI" + }, + "facPRBSGen": { + "$ref": "#/components/schemas/cm.module.otu.parameters.facPRBSGen" + }, + "facPRBSMon": { + "$ref": "#/components/schemas/cm.module.otu.parameters.facPRBSMon" + } + }, + "type": "object" + }, + "cm.module.odu": { + "description": "Definition of module odu object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/xr.common.colId" + }, + "state": { + "$ref": "#/components/schemas/cm.module.odu.state" + } + } + }, + "cm.module.odus": { + "items": { + "$ref": "#/components/schemas/cm.module.odu" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "odus" + } + }, + "cm.module.odu.state": { + "description": "Definition of module odu state object", + "properties": { + "oduAid": { + "$ref": "#/components/schemas/xr.otu.odu.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.otu.odu.parentAid" + }, + "oduType": { + "$ref": "#/components/schemas/xr.otu.odu.oduType" + }, + "operStatus": { + "$ref": "#/components/schemas/xr.otu.odu.operStatus" + } + } + }, + "cm.module.ethernetClient": { + "description": "Definition of module ethernetClient object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/xr.common.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.module.ethernetClient.config" + }, + "state": { + "$ref": "#/components/schemas/cm.module.ethernetClient.state" + }, + "acs": { + "$ref": "#/components/schemas/cm.module.ethernetClient.acs" + } + } + }, + "cm.module.ethernetClients": { + "items": { + "$ref": "#/components/schemas/cm.module.ethernetClient" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "ethernetClients" + } + }, + "cm.module.ethernetClient.config": { + "additionalProperties": false, + "description": "Definition of module ethernetClient configuration object", + "properties": { + "fecMode": { + "$ref": "#/components/schemas/cm.module.ethernetClient.parameters.fecMode" + }, + "loopbackType": { + "$ref": "#/components/schemas/cm.module.ethernetClient.parameters.loopbackType" + }, + "loopbackMode": { + "$ref": "#/components/schemas/cm.module.ethernetClient.parameters.loopbackMode" + }, + "lldp": { + "$ref": "#/components/schemas/cm.module.ethernetClient.config.lldp" + } + }, + "type": "object" + }, + "cm.module.ethernetClient.config.lldp": { + "additionalProperties": false, + "description": "Definition of module ethernetClient ethernetLLDP configurable parameters", + "properties": { + "adminStatus": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ethernetLLDP.parameters.adminStatus" + }, + "gccFwd": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ethernetLLDP.parameters.gccFwd" + }, + "hostRxDrop": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ethernetLLDP.parameters.hostRxDrop" + }, + "TTLUsage": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ethernetLLDP.parameters.TTLUsage" + }, + "clrStats": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ethernetLLDP.parameters.clrStats" + }, + "flushHostDb": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ethernetLLDP.parameters.flushHostDb" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "lldp" + } + }, + "cm.module.ethernetClient.state": { + "description": "Definition of module ethernetClient state parameters", + "properties": { + "clientIfAid": { + "$ref": "#/components/schemas/xr.ethernet.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.ethernet.parentAid" + }, + "clientIfPortSpeed": { + "$ref": "#/components/schemas/xr.ethernet.portSpeed" + }, + "fecType": { + "$ref": "#/components/schemas/xr.ethernet.fecType" + }, + "fecMode": { + "$ref": "#/components/schemas/xr.ethernet.fecMode" + }, + "loopbackType": { + "$ref": "#/components/schemas/xr.ethernet.diagnostic.loopbackType" + }, + "loopbackMode": { + "$ref": "#/components/schemas/xr.ethernet.diagnostic.loopbackMode" + }, + "lldp": { + "$ref": "#/components/schemas/cm.module.ethernetClient.state.lldp" + } + }, + "type": "object" + }, + "cm.module.ethernetClient.state.lldp": { + "description": "Definition of module ethernetClient ethernetLLDP state parameters", + "properties": { + "lldpconfigAid": { + "$ref": "#/components/schemas/xr.ethernet.lldpconfig.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.ethernet.lldpconfig.parentAid" + }, + "adminStatus": { + "$ref": "#/components/schemas/xr.ethernet.lldpconfig.adminStatus" + }, + "gccFwd": { + "$ref": "#/components/schemas/xr.ethernet.lldpconfig.gccFwd" + }, + "hostRxDrop": { + "$ref": "#/components/schemas/xr.ethernet.lldpconfig.hostRxDrop" + }, + "TTLUsage": { + "$ref": "#/components/schemas/xr.ethernet.lldpconfig.TTLUsage" + }, + "tooManyNeighbors": { + "$ref": "#/components/schemas/xr.ethernet.lldpconfig.tooManyNeighbors" + }, + "clrStats": { + "$ref": "#/components/schemas/xr.ethernet.lldpconfig.clrStats" + }, + "flushHostDb": { + "$ref": "#/components/schemas/xr.ethernet.lldpconfig.flushHostDb" + }, + "neighbors": { + "$ref": "#/components/schemas/cm.module.ethernetClient.state.lldp.neighbors" + } + }, + "x-oapi-codegen-extra-tags": { + "bson": "lldp" + } + }, + "cm.module.ethernetClient.state.lldp.neighbors": { + "items": { + "$ref": "#/components/schemas/cm.module.ethernetClient.state.lldp.neighbor" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "neighbors" + } + }, + "cm.module.ethernetClient.state.lldp.neighbor": { + "description": "Definition of module host neighbors state parameters", + "properties": { + "hostneighborAid": { + "$ref": "#/components/schemas/xr.ethernet.hostneighbors.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.ethernet.hostneighbors.parentAid" + }, + "portSourceMAC": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.localPortSourceMAC" + }, + "chassisIdSubtype": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.chassisIdSubtype" + }, + "chassisId": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.chassisId" + }, + "portIdSubtype": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.portIdSubtype" + }, + "portId": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.portId" + }, + "portDescr": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.portDescr" + }, + "sysName": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.sysName" + }, + "sysDescr": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.sysDescr" + }, + "sysTTL": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.sysTTL" + }, + "lldpPDU": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.lldpPDU" + } + }, + "x-oapi-codegen-extra-tags": { + "bson": "neighbor" + } + }, + "cm.module.ethernetClient.parameters.fecMode": { + "default": "enabled", + "description": "Forward error correction mode of operation", + "enum": [ + "enabled", + "disabled" + ], + "title": "Forward error correction mode", + "type": "string", + "x-enum-varnames": [ + "Enabled", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "fecMode" + }, + "x-trafficAffecting": true + }, + "cm.module.ethernetClient.parameters.loopbackType": { + "default": "loopbackAndContinue", + "description": "Loopback type.\n* `loopbackAndContinue` - Signal is looped back and is also forwarded downstream.\n* `loopback` - Signal is looped back and LF maintenance signal is sent downstream.\n", + "enum": [ + "loopbackAndContinue", + "loopback" + ], + "title": "Loopback type", + "type": "string", + "x-enum-varnames": [ + "Loopback and continue", + "Loopback" + ], + "x-oapi-codegen-extra-tags": { + "bson": "loopbackType" + } + }, + "cm.module.ethernetClient.parameters.loopbackMode": { + "default": "disabled", + "description": "Post-FEC Loopback mode for the ethernet client.", + "enum": [ + "disabled", + "facility", + "terminal" + ], + "title": "Loopback mode", + "type": "string", + "x-enum-varnames": [ + "Disabled", + "Facility", + "Terminal" + ], + "x-oapi-codegen-extra-tags": { + "bson": "loopbackMode" + }, + "x-trafficAffecting": true + }, + "cm.module.ethernetClient.ethernetLLDP.parameters.adminStatus": { + "default": "disabled", + "description": "Administrative state to Enable/Disable LLDP in rxOnly mode.", + "enum": [ + "rxOnly", + "disabled" + ], + "title": "Admin state", + "type": "string", + "x-enum-varnames": [ + "RX only", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "adminStatus" + } + }, + "cm.module.ethernetClient.ethernetLLDP.parameters.gccFwd": { + "default": false, + "description": "Enable/Disable forwarding of untagged LLDP frames over GCC.\n * `true` - Enabled.\n * `false` - Disabled.\n", + "title": "Forward GCC", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "gccFwd" + } + }, + "cm.module.ethernetClient.ethernetLLDP.parameters.hostRxDrop": { + "default": false, + "description": "Enable/Disable LLDP drop in Rx direction of Ethernet Client ports.\n * `true`: - Enabled.\n * `false`: - Disabled.\n", + "title": "LLDP drop", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "hostRxDrop" + } + }, + "cm.module.ethernetClient.ethernetLLDP.parameters.TTLUsage": { + "default": true, + "description": "Enable/Disable usage of TTL values for flushing/starting LLDP internal flush timer.\n * `true`: - Enabled.\n * `false`: - Disabled.\n", + "title": "TTL usage", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "TTLUsage" + } + }, + "cm.module.ethernetClient.ethernetLLDP.parameters.clrStats": { + "default": false, + "description": "Action to clear LLDP statistics. Set to true to trigger the action. Server resets it to false when action is completed.", + "title": "Clear LLDP statistics", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "clrStats" + } + }, + "cm.module.ethernetClient.ethernetLLDP.parameters.flushHostDb": { + "default": false, + "description": "Action to flush the learned host system information. Set to true to trigger the action. Server resets it to false when action is completed.", + "title": "Flush neighbor information", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "flushHostDb" + } + }, + "cm.module.ethernetClient.update": { + "additionalProperties": false, + "description": "Definition of module ethernetClient editable object", + "minProperties": 1, + "properties": { + "fecMode": { + "$ref": "#/components/schemas/cm.module.ethernetClient.parameters.fecMode" + }, + "loopbackType": { + "$ref": "#/components/schemas/cm.module.ethernetClient.parameters.loopbackType" + }, + "loopbackMode": { + "$ref": "#/components/schemas/cm.module.ethernetClient.parameters.loopbackMode" + }, + "lldp": { + "$ref": "#/components/schemas/cm.module.ethernetClient.update.lldp" + } + }, + "type": "object" + }, + "cm.module.ethernetClient.update.lldp": { + "additionalProperties": false, + "description": "Definition of module ethernetClient lldp editable parameters", + "minProperties": 1, + "properties": { + "adminStatus": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ethernetLLDP.parameters.adminStatus" + }, + "gccFwd": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ethernetLLDP.parameters.gccFwd" + }, + "hostRxDrop": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ethernetLLDP.parameters.hostRxDrop" + }, + "TTLUsage": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ethernetLLDP.parameters.TTLUsage" + }, + "clrStats": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ethernetLLDP.parameters.clrStats" + }, + "flushHostDb": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ethernetLLDP.parameters.flushHostDb" + } + }, + "type": "object" + }, + "cm.module.ethernetClient.ac": { + "description": "Definition of module ethernetClient attachmentCircuit object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/xr.common.colId" + }, + "state": { + "$ref": "#/components/schemas/cm.module.ethernetClient.attachmentCircuit.state" + } + } + }, + "cm.module.ethernetClient.acs": { + "items": { + "$ref": "#/components/schemas/cm.module.ethernetClient.ac" + }, + "maxItems": 16, + "minItems": 0, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "acs" + } + }, + "cm.module.ethernetClient.attachmentCircuit.state": { + "description": "Definition of module ethernet client attachment circuit state parameters", + "properties": { + "attachmentCircuitAid": { + "$ref": "#/components/schemas/xr.ethernet.ac.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.ethernet.ac.parentAid" + }, + "capacity": { + "$ref": "#/components/schemas/xr.ethernet.ac.capacity" + }, + "imc": { + "$ref": "#/components/schemas/xr.ethernet.ac.imc" + }, + "imcOuterVID": { + "$ref": "#/components/schemas/xr.ethernet.ac.imcOuterVID" + }, + "emc": { + "$ref": "#/components/schemas/xr.ethernet.ac.emc" + }, + "emcOuterVID": { + "$ref": "#/components/schemas/xr.ethernet.ac.emcOuterVID" + } + }, + "type": "object" + }, + "cm.module.localConnection": { + "description": "Definition of module localConnection object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/xr.common.colId" + }, + "state": { + "$ref": "#/components/schemas/cm.module.localConnection.state" + } + } + }, + "cm.module.localConnections": { + "items": { + "$ref": "#/components/schemas/cm.module.localConnection" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "localConnections" + } + }, + "cm.module.localConnection.state": { + "description": "Definition of module ethernetClient state parameters", + "properties": { + "lcAid": { + "$ref": "#/components/schemas/xr.lc.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.lc.parentAid" + }, + "direction": { + "$ref": "#/components/schemas/xr.lc.direction" + }, + "clientAid": { + "$ref": "#/components/schemas/xr.lc.clientAid" + }, + "dscgAid": { + "$ref": "#/components/schemas/xr.lc.dscgAid" + }, + "lineAid": { + "$ref": "#/components/schemas/xr.lc.lineAid" + }, + "remoteModuleId": { + "$ref": "#/components/schemas/xr.lc.remoteModuleId" + }, + "remoteClientId": { + "$ref": "#/components/schemas/xr.lc.remoteClientId" + } + } + }, + "errors": { + "properties": { + "errors": { + "description": "List of errors for a given request", + "items": { + "$ref": "#/components/schemas/cm.error" + }, + "type": "array" + } + }, + "type": "object" + }, + "cm.error": { + "description": "Error message.", + "minLength": 1, + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "title": "Error Message", + "type": "object" + }, + "cm.parameters.href": { + "description": "Resource HREF", + "title": "ResourceHREF", + "type": "string", + "uniqueItems": true, + "x-oapi-codegen-extra-tags": { + "bson": "href" + } + }, + "cm.parameters.rt": { + "description": "Resource Type or set of Resource Types", + "items": { + "maxLength": 64, + "type": "string" + }, + "minItems": 1, + "readOnly": true, + "title": "Resource Type", + "type": "array", + "uniqueItems": true, + "x-oapi-codegen-extra-tags": { + "bson": "rt" + } + }, + "cm.parameters.uuid": { + "description": "Object identifier", + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "title": "ID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "id" + } + }, + "cm.parameters.labels": { + "additionalProperties": { + "maxLength": 64, + "minLength": 1, + "pattern": "^([A-Za-z0-9_\\-.,: ]*)$", + "type": "string" + }, + "description": "Assign key:value labels to objects", + "title": "Labels", + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "labels" + } + }, + "xr.device.n": { + "description": "Friendly name of the device", + "maxLength": 64, + "readOnly": true, + "title": "Module name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "moduleName" + } + }, + "xr.device.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "moduleAid" + } + }, + "xr.configuration.configuredRole": { + "default": "auto", + "description": "Module role configured by user.\nPossible values:\n- auto: When role is automatically assigned by XR or by user via the Host interface\n- hub\n- leaf\n", + "enum": [ + "hub", + "leaf", + "auto" + ], + "title": "Configured Role", + "type": "string", + "x-enum-varnames": [ + "Hub", + "Leaf", + "Auto" + ], + "x-oapi-codegen-extra-tags": { + "bson": "configuredRole" + } + }, + "xr.configuration.currentRole": { + "default": "unknown", + "description": "Current module role\nPossible values:\n- unknown\n- hub\n- leaf\n", + "enum": [ + "hub", + "leaf", + "unknown" + ], + "readOnly": true, + "title": "Current Role", + "type": "string", + "x-enum-varnames": [ + "Hub", + "Leaf", + "Unknown" + ], + "x-oapi-codegen-extra-tags": { + "bson": "currentRole" + } + }, + "xr.configuration.roleStatus": { + "default": "scanning", + "description": "Transitional state when currentRole is unknown or user is changing currentRole to a new role.\nPossible values:\n- scanning\n- changeInProgress\n- ready\n", + "enum": [ + "scanning", + "changeInProgress", + "ready" + ], + "readOnly": true, + "title": "Role Status", + "type": "string", + "x-enum-varnames": [ + "Scanning", + "Change in progress", + "Ready" + ], + "x-oapi-codegen-extra-tags": { + "bson": "roleStatus" + } + }, + "xr.configuration.trafficMode": { + "default": "L1Mode", + "description": "Possible Values:\n- L1Mode: Allows transparent transport of client traffic between XR hub and leaf client ports\n- VTIMode: Allows transport of VLAN flows between an XR hub client port to 1 or more XR leaf client ports\n", + "enum": [ + "L1Mode", + "VTIMode" + ], + "title": "Traffic mode", + "type": "string", + "x-enum-varnames": [ + "L1 mode", + "VTI mode" + ], + "x-oapi-codegen-extra-tags": { + "bson": "trafficMode" + } + }, + "xr.configuration.serdesRate": { + "default": "25", + "description": "Rate of serdes lanes as configured by the Host device in Gbps", + "enum": [ + "undefined", + "25", + "50" + ], + "readOnly": true, + "title": "Serdes lane rate", + "type": "string", + "x-enum-varnames": [ + "Undefined", + "25", + "50" + ], + "x-unit": "Gbps", + "x-oapi-codegen-extra-tags": { + "bson": "serdesRate" + } + }, + "xr.configuration.fiberConnectionMode": { + "description": "Possible Values:\n- single: only one fiber is connected for by-directional traffic\n- dual: separate fibers for transmit and receive\n", + "enum": [ + "single", + "dual" + ], + "title": "Fiber Mode", + "type": "string", + "x-enum-varnames": [ + "Single", + "Dual" + ], + "x-oapi-codegen-extra-tags": { + "bson": "fiberConnectionMode" + } + }, + "xr.configuration.tcMode": { + "default": true, + "description": "Enable/Disable IEEE 1588 Transparent Clock for VTI-mode.\n- true: Enabled\n- false: Disabled\n", + "title": "1588 Transparent Clock", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "tcMode" + } + }, + "xr.platform.pi": { + "description": "Unique UUID for the hardware platform calculated from the mac address", + "maxLength": 36, + "minLength": 36, + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "readOnly": true, + "title": "Platform UUID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "pi" + } + }, + "xr.platform.mnfv": { + "description": "Manufacturer's firmware version", + "maxLength": 64, + "readOnly": true, + "title": "Firmware version", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "mnfv" + } + }, + "xr.platform.mnmn": { + "description": "Manufacturer name", + "maxLength": 64, + "readOnly": true, + "title": "Manufacturer", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "mnmn" + } + }, + "xr.platform.mnmo": { + "description": "Manufacturer's Model/Part number", + "maxLength": 64, + "readOnly": true, + "title": "Model number", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "mnmo" + } + }, + "xr.platform.mnhw": { + "description": "Platform Hardware Version", + "maxLength": 64, + "readOnly": true, + "title": "HW Version", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "mnhw" + } + }, + "xr.platform.mndt": { + "description": "HW Manufacturing date", + "pattern": "([0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|2[0-9]|1[0-9]|0[1-9])", + "readOnly": true, + "title": "Manufacturing date", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "mndt" + } + }, + "xr.platform.mnsel": { + "description": "Device Serial number", + "maxLength": 64, + "readOnly": true, + "title": "Serial number", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "serialNumber" + } + }, + "xr.platform.clei": { + "description": "Globally unique 10-character alphanumeric intelligent code identifying equipment in a structured naming format", + "readOnly": true, + "title": "CLEI Code", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "clei" + } + }, + "xr.platform.macAddress": { + "description": "Device MAC Address", + "readOnly": true, + "title": "MAC address", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "macAddress" + } + }, + "xr.platform.connectorType": { + "description": "Module connector type", + "enum": [ + "lcConnector" + ], + "readOnly": true, + "title": "Connector type", + "type": "string", + "x-enum-varnames": [ + "LC connector" + ], + "x-oapi-codegen-extra-tags": { + "bson": "connectorType" + } + }, + "xr.platform.formFactor": { + "description": "Module form factor", + "enum": [ + "cfp2-dco", + "qsfp-dd" + ], + "readOnly": true, + "title": "Form factor", + "type": "string", + "x-enum-varnames": [ + "CFP2-DCO", + "QSFP-DD" + ], + "x-oapi-codegen-extra-tags": { + "bson": "formFactor" + } + }, + "xr.device.piid": { + "description": "Protocol independent unique identifier for the Device that is immutable.", + "maxLength": 36, + "minLength": 36, + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "readOnly": true, + "title": "PIID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "piid" + } + }, + "xr.device.dmn": { + "properties": { + "language": { + "$ref": "#/components/schemas/xr.device.dmn.language" + }, + "value": { + "$ref": "#/components/schemas/xr.device.dmn.value" + } + }, + "x-oapi-codegen-extra-tags": { + "bson": "dmn" + } + }, + "xr.device.dmn.language": { + "description": "Format pattern according to IETF RFC 5646 (language tag).", + "pattern": "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})", + "title": "Language", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "language" + } + }, + "xr.device.dmn.value": { + "description": "Vendor name", + "maxLength": 64, + "readOnly": true, + "title": "Vendor", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "value" + } + }, + "xr.device.sv": { + "description": "Software version.", + "maxLength": 64, + "readOnly": true, + "title": "Software version", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "sv" + } + }, + "xr.device.icv": { + "description": "Device HW version.", + "maxLength": 64, + "readOnly": true, + "title": "Hardware version", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "icv" + } + }, + "cm.parameters.parentId": { + "description": "Parent Object identifier", + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "title": "Parent ID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "parentId" + } + }, + "xr.common.colId": { + "description": "Object identifier in the supporting collection.", + "readOnly": true, + "title": "Collection Id", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "colId" + } + }, + "xr.lineptp.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "linePtpAid" + } + }, + "xr.lineptp.parentAid": { + "items": { + "$ref": "#/components/schemas/xr.device.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.lineptp.operStatus": { + "description": "Operational Status of line port.", + "enum": [ + "enabled", + "disabled" + ], + "readOnly": true, + "title": "Operational status", + "type": "string", + "x-enum-varnames": [ + "Enabled", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "operStatus" + } + }, + "xr.controlplane.neighbor.macAddress": { + "description": "MAC address of the XR neighbor", + "readOnly": true, + "title": "MAC address", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "macAddress" + } + }, + "xr.controlplane.neighbor.currentRole": { + "description": "Role of the XR neighbor", + "enum": [ + "hub", + "leaf", + "unknown" + ], + "readOnly": true, + "title": "Current role", + "type": "string", + "x-enum-varnames": [ + "Hub", + "Leaf", + "Unknown" + ], + "x-oapi-codegen-extra-tags": { + "bson": "currentRole" + } + }, + "xr.controlplane.neighbor.constellationFrequency": { + "description": "Carrier center frequency of the Hub module within the constellation.", + "readOnly": true, + "title": "Constellation frequency", + "type": "integer", + "x-unit": "MHz", + "x-oapi-codegen-extra-tags": { + "bson": "constellationFrequency" + } + }, + "xr.controlplane.neighbor.conState": { + "description": "Shows if the control plane towards this XR module is currently active or not", + "enum": [ + "active", + "inactive" + ], + "readOnly": true, + "title": "Connection Status", + "type": "string", + "x-enum-varnames": [ + "Active", + "Inactive" + ], + "x-oapi-codegen-extra-tags": { + "bson": "conState" + } + }, + "xr.controlplane.neighbor.lastConStateChange": { + "description": "Timestamp of last change in connectivity in date-time format pattern according to IETF RFC 3339.\nIf conState is inactive, this timestamp shows when connectivity was lost.\nIf conState is active this timestamp shows when connection was established.\n", + "format": "date-time", + "readOnly": true, + "title": "Update Time", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "lastConStateChange" + } + }, + "xr.discovered.neighbor.macAddress": { + "description": "Device MAC address of the discovered XR neighbor", + "readOnly": true, + "title": "MAC address", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "macAddress" + } + }, + "xr.discovered.neighbor.currentRole": { + "description": "Role of the discovered XR neighbor", + "enum": [ + "hub", + "leaf", + "unknown" + ], + "readOnly": true, + "title": "Current role", + "type": "string", + "x-enum-varnames": [ + "Hub", + "Leaf", + "Unknown" + ], + "x-oapi-codegen-extra-tags": { + "bson": "currentRole" + } + }, + "xr.discovered.neighbor.discoveredTime": { + "description": "Timestamp of latest discovered beacon message from this XR neighbor in date-time format pattern according to IETF RFC 3339.", + "format": "date-time", + "readOnly": true, + "title": "Discovery Time", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "discoveredTime" + } + }, + "xr.discovered.neighbor.constellationFrequency": { + "description": "Constellation frequency of the discovered XR neighbor. I.e. the frequency at which this neighbor was discovered.", + "readOnly": true, + "title": "Constellation Frequency", + "type": "integer", + "x-unit": "MHz", + "x-oapi-codegen-extra-tags": { + "bson": "constellationFrequency" + } + }, + "xr.carrier.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "carrierAid" + } + }, + "xr.carrier.parentAid": { + "items": { + "$ref": "#/components/schemas/xr.lineptp.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.carrier.frequencyCtrl": { + "default": "xr", + "description": "Shows the ownership of the constellation frequency configuration.\nPossible Values:\n- xr: hubFrequency can also be configured by XR CM\n- host: host system where the module is inserted is the master of constellationFrequency configuration.\n", + "enum": [ + "xr", + "host" + ], + "readOnly": true, + "title": "Frequency control", + "type": "string", + "x-enum-varnames": [ + "XR", + "Host" + ], + "x-oapi-codegen-extra-tags": { + "bson": "frequencyCtrl" + } + }, + "xr.carrier.constellationFrequency": { + "description": "The center frequency in MHz of the Hub within the constellation. \nConfigurable on both Hub and Leaf modules when frequencyCtrl is \"xr\".\nPossible values:\n- Minimum: 191000000\n- Maximum: 196100000\nOr\n- Value '0': used for \"Undefined\"\n", + "readOnly": true, + "title": "Constellation Frequency", + "type": "integer", + "x-unit": "MHz", + "x-oapi-codegen-extra-tags": { + "bson": "constellationFrequency" + } + }, + "xr.carrier.operatingFrequency": { + "description": "Carrier center frequency.\nPossible values:\n- Minimum: 191000000\n- Maximum: 196100000\n Or\n- Value '0': used for \"Undefined\"\n", + "readOnly": true, + "title": "Operating frequency", + "type": "integer", + "x-unit": "MHz", + "x-oapi-codegen-extra-tags": { + "bson": "operatingFrequency" + } + }, + "xr.carrier.ncoFrequency": { + "description": "Nominal carrier central frequency overloaded in MHz. \nPossible values:\n- Minimum: 191000000\n- Maximum: 196100000\n Or\n- Value '0': used for \"Undefined\".\n", + "readOnly": true, + "title": "Nominal central frequency overloaded", + "type": "integer", + "x-unit": "MHz", + "x-oapi-codegen-extra-tags": { + "bson": "ncoFrequency" + } + }, + "xr.carrier.modulation": { + "default": "16QAM", + "description": "Constellation carrier signal modulation (applied to Hub and leaf modules).\nPossible values: '16QAM', 'QPSK' ' 8QAM'\n", + "enum": [ + "16QAM", + "QPSK", + "8QAM" + ], + "title": "Modulation", + "type": "string", + "x-enum-varnames": [ + "16QAM", + "QPSK", + "8QAM" + ], + "x-oapi-codegen-extra-tags": { + "bson": "modulation" + } + }, + "xr.carrier.capacity": { + "description": "Modulation and maximum digital subcarriers determine the capacity in Gbps.\nPossible values: [ 25,50,100,200,300,400 ]\n", + "enum": [ + 25, + 50, + 100, + 200, + 300, + 400 + ], + "readOnly": true, + "title": "Capacity", + "type": "integer", + "x-enum-varnames": [ + "25", + "50", + "100", + "200", + "300", + "400" + ], + "x-unit": "Gbps", + "x-oapi-codegen-extra-tags": { + "bson": "capacity" + } + }, + "xr.carrier.clientPortMode": { + "default": "ethernet", + "description": "User can configure expected client port type", + "enum": [ + "ethernet", + "ethernetOtn" + ], + "title": "Client port mode", + "type": "string", + "x-enum-varnames": [ + "Ethernet", + "Ethernet or OTN" + ], + "x-oapi-codegen-extra-tags": { + "bson": "clientPortMode" + } + }, + "xr.carrier.baudRate": { + "description": "Baud rate in Giga-baud", + "readOnly": true, + "title": "Baud rate", + "type": "integer", + "x-unit": "GBd", + "x-oapi-codegen-extra-tags": { + "bson": "baudRate" + } + }, + "xr.carrier.maxAllowedDSCs": { + "description": "Number of digital subcarriers allowed to be used", + "enum": [ + 2, + 4, + 8, + 16 + ], + "readOnly": true, + "title": "Max number of digital subcarriers", + "type": "integer", + "x-enum-varnames": [ + "2", + "4", + "8", + "16" + ], + "x-oapi-codegen-extra-tags": { + "bson": "maxAllowedDSCs" + } + }, + "xr.carrier.txPowerTargetPerDsc": { + "default": -100, + "description": "Target power per DSC (applicable for all DSCs on the carrier) in dBm.\nPossible values:\n- Minimum: -35\n- Maximum: 0\n- Step: 0.1\n Or\n- Value '-100': used for \"Not configured\"\n", + "format": "double", + "maximum": 0, + "minimum": -100, + "multipleOf": 0.1, + "title": "Target power per DSC", + "type": "number", + "x-unit": "dBm", + "x-oapi-codegen-extra-tags": { + "bson": "txPowerTargetPerDsc" + } + }, + "xr.carrier.diagnostic.loopback": { + "default": "disabled", + "description": "Enable/Disable loopback", + "enum": [ + "disabled", + "terminal" + ], + "title": "Loopback", + "type": "string", + "x-enum-varnames": [ + "Disabled", + "Terminal" + ], + "x-oapi-codegen-extra-tags": { + "bson": "loopback" + }, + "x-trafficAffecting": true + }, + "xr.carrier.dsc.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "dscAid" + } + }, + "xr.carrier.dsc.parentAid": { + "items": { + "$ref": "#/components/schemas/xr.carrier.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.carrier.dsc.cDsc": { + "description": "Constellation/Hub DSC ID assigned to a Leaf module. \nIn case of a Hub module, it defaults to the DSC instance ID (e.g., 1 to 16 when Hub is a 400G module\n", + "title": "Constellation DSC", + "type": "integer" + }, + "xr.carrier.dsc.usability": { + "default": "usable", + "description": "Usability of this DSC. Configurable to control the allowed uses.\n * `usable` - DSC is usable for either PRBS or data.\n * `prbsOnly` - DSC is usable only for PRBS. This is done for optical power balancing reasons.\n * `reserved` - DSC is reserved and is not usable for either PRBS or data.\n", + "enum": [ + "usable", + "prbsOnly", + "reserved" + ], + "title": "Usability", + "type": "string", + "x-enum-varnames": [ + "Usable", + "PRBS only", + "Reserved" + ], + "x-oapi-codegen-extra-tags": { + "bson": "usability" + }, + "x-trafficAffecting": true + }, + "xr.carrier.dsc.txEnabled": { + "default": false, + "description": "Configurable to enable/disable Tx transmission on this DSC. When disabled, this prevents any traffic from going out of the DSC.", + "title": "TX Enabled", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "txEnabled" + }, + "x-trafficAffecting": true + }, + "xr.carrier.dsc.rxEnabled": { + "default": true, + "description": "Configurable to enable/disable the DSC to receive traffic.", + "title": "Rx Enabled", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "rxEnabled" + }, + "x-trafficAffecting": true + }, + "xr.carrier.dsc.txStatus": { + "description": "Current DSC TX status.", + "enum": [ + "disabled", + "data", + "prbs" + ], + "readOnly": true, + "title": "TX status", + "type": "string", + "x-enum-varnames": [ + "Disabled", + "Data", + "PRBS" + ], + "x-oapi-codegen-extra-tags": { + "bson": "txStatus" + } + }, + "xr.carrier.dsc.rxStatus": { + "description": "Current DSC RX status.", + "enum": [ + "disabled", + "data", + "prbs" + ], + "readOnly": true, + "title": "RX status", + "type": "string", + "x-enum-varnames": [ + "Disabled", + "Data", + "PRBS" + ], + "x-oapi-codegen-extra-tags": { + "bson": "rxStatus" + } + }, + "xr.carrier.dsc.powerOffset": { + "default": 0, + "description": "Power offset relative to the average DSC power.", + "format": "double", + "maximum": 6, + "minimum": -6, + "multipleOf": 0.1, + "title": "Power offset", + "type": "number", + "x-unit": "dB", + "x-oapi-codegen-extra-tags": { + "bson": "powerOffset" + }, + "x-trafficAffecting": true + }, + "xr.carrier.dsc.diagnostic.facPRBSGenEnabled": { + "default": false, + "description": "Configurable to enable/disable facility PRBS test pattern generation", + "title": "Facility PRBS generation", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "facPRBSGenEnabled" + }, + "x-trafficAffecting": true + }, + "xr.carrier.dsc.diagnostic.facPRBSMonEnabled": { + "default": false, + "description": "Configurable to enable/disable facility PRBS test pattern monitoring", + "title": "Facility PRBS monitoring", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "facPRBSMonEnabled" + }, + "x-trafficAffecting": true + }, + "xr.carrier.dscg.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "dscgAid" + } + }, + "xr.carrier.dscg.parentAid": { + "items": { + "$ref": "#/components/schemas/xr.carrier.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.otu.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "otuAid" + } + }, + "xr.otu.parentAid": { + "items": { + "$ref": "#/components/schemas/xr.carrier.dscg.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.otu.otuType": { + "description": "OTU Type", + "enum": [ + "OTUCni", + "OTUCn", + "OTUCni-M", + "OTU4" + ], + "readOnly": true, + "title": "OTU type", + "type": "string", + "x-enum-varnames": [ + "OTUCni", + "OTUCn", + "OTUCni-M", + "OTU4" + ], + "x-oapi-codegen-extra-tags": { + "bson": "otuType" + } + }, + "xr.otu.rate": { + "description": "Rate of the OTU.", + "enum": [ + 25, + 50, + 100, + 200, + 400 + ], + "readOnly": true, + "title": "Rate", + "type": "integer", + "x-enum-varnames": [ + "25", + "50", + "100", + "200", + "400" + ], + "x-unit": "Gbps", + "x-oapi-codegen-extra-tags": { + "bson": "rate" + } + }, + "xr.otu.operStatus": { + "description": "Operational Status of OTU.", + "enum": [ + "enabled", + "disabled" + ], + "readOnly": true, + "title": "Operational status", + "type": "string", + "x-enum-varnames": [ + "Enabled", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "operStatus" + } + }, + "xr.otu.txTTI": { + "default": "", + "description": "Up to 64 byte string for transmitting as TTI.", + "maxLength": 64, + "title": "Transmit TTI", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "txTTI" + } + }, + "xr.otu.rxTTI": { + "description": "Up to 64 byte string of received TTI.", + "maxLength": 64, + "readOnly": true, + "title": "Received TTI", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "rxTTI" + } + }, + "xr.otu.expectedTTI": { + "default": "", + "description": "Up to 64 byte string of TTI that is expected to be received.", + "maxLength": 64, + "title": "Expected TTI", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "expectedTTI" + } + }, + "xr.otu.diagnostic.facPRBSGen": { + "default": "disabled", + "description": "Enable/Disable facility PRBS test pattern generation", + "enum": [ + "enabled", + "disabled" + ], + "title": "Facility PRBS generation", + "type": "string", + "x-enum-varnames": [ + "Enabled", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "facPRBSGen" + }, + "x-trafficAffecting": true + }, + "xr.otu.diagnostic.facPRBSMon": { + "default": "disabled", + "description": "Enable/Disable facility PRBS test pattern monitoring", + "enum": [ + "enabled", + "disabled" + ], + "title": "Facility PRBS monitoring", + "type": "string", + "x-enum-varnames": [ + "Enabled", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "facPRBSMon" + }, + "x-trafficAffecting": true + }, + "xr.otu.odu.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "oduAid" + } + }, + "xr.otu.odu.parentAid": { + "items": { + "$ref": "#/components/schemas/xr.carrier.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.otu.odu.oduType": { + "description": "ODU type", + "enum": [ + "ODUCni", + "ODUflexi", + "ODUCni-M", + "ODU4i" + ], + "readOnly": true, + "title": "ODU type", + "type": "string", + "x-enum-varnames": [ + "ODUCni", + "ODUflexi", + "ODUCni-M", + "ODU4i" + ], + "x-oapi-codegen-extra-tags": { + "bson": "oduType" + } + }, + "xr.otu.odu.operStatus": { + "description": "Operational Status of ODU.", + "enum": [ + "enabled", + "disabled" + ], + "readOnly": true, + "title": "Operational status", + "type": "string", + "x-enum-varnames": [ + "Enabled", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "operStatus" + } + }, + "xr.ethernet.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "clientIfAid" + } + }, + "xr.ethernet.parentAid": { + "items": { + "$ref": "#/components/schemas/xr.device.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.ethernet.portSpeed": { + "description": "Ethernet port speed in Gbps", + "enum": [ + 100, + 400, + 200, + 50, + 25 + ], + "readOnly": true, + "title": "Port speed", + "type": "integer", + "x-enum-varnames": [ + "100", + "400", + "200", + "50", + "25" + ], + "x-unit": "Gbps", + "x-oapi-codegen-extra-tags": { + "bson": "clientIfPortSpeed" + } + }, + "xr.ethernet.fecType": { + "description": "Automatically set by the module based on SerDes and Port configuration.", + "enum": [ + "KR4", + "KP4" + ], + "readOnly": true, + "title": "Fec type", + "type": "string", + "x-enum-varnames": [ + "KR4", + "KP4" + ], + "x-oapi-codegen-extra-tags": { + "bson": "fecType" + } + }, + "xr.ethernet.fecMode": { + "default": "enabled", + "description": "Forward error correction mode of operation", + "enum": [ + "enabled", + "disabled" + ], + "title": "Forward error correction mode", + "type": "string", + "x-enum-varnames": [ + "Enabled", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "fecMode" + }, + "x-trafficAffecting": true + }, + "xr.ethernet.diagnostic.loopbackType": { + "default": "loopbackAndContinue", + "description": "Loopback type.\n- 'loopbackAndContinue': Signal is looped back and is also forwarded downstream.\n- 'loopback': Signal is looped back and LF maintenance signal is sent downstream.\n", + "enum": [ + "loopbackAndContinue", + "loopback" + ], + "title": "Loopback type", + "type": "string", + "x-enum-varnames": [ + "Loopback and continue", + "Loopback" + ], + "x-oapi-codegen-extra-tags": { + "bson": "loopbackType" + } + }, + "xr.ethernet.diagnostic.loopbackMode": { + "default": "disabled", + "description": "Post-FEC Loopback mode for the ethernet client.", + "enum": [ + "disabled", + "facility", + "terminal" + ], + "title": "Loopback mode", + "type": "string", + "x-enum-varnames": [ + "Disabled", + "Facility", + "Terminal" + ], + "x-oapi-codegen-extra-tags": { + "bson": "loopbackMode" + }, + "x-trafficAffecting": true + }, + "xr.ethernet.lldpconfig.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "lldpconfigAid" + } + }, + "xr.ethernet.lldpconfig.parentAid": { + "items": { + "$ref": "#/components/schemas/xr.ethernet.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.ethernet.lldpconfig.adminStatus": { + "default": "disabled", + "description": "Administrative state to Enable/Disable LLDP in rxOnly mode.", + "enum": [ + "rxOnly", + "disabled" + ], + "title": "Administrative State", + "type": "string", + "x-enum-varnames": [ + "RX only", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "adminStatus" + } + }, + "xr.ethernet.lldpconfig.gccFwd": { + "default": false, + "description": "Enable/Disable forwarding of untagged LLDP frames over GCC.\n * `true` - Enabled.\n * `false` - Disabled.\n", + "title": "Forward GCC", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "gccFwd" + } + }, + "xr.ethernet.lldpconfig.hostRxDrop": { + "default": false, + "description": "Enable/Disable LLDP drop in Rx direction of Ethernet Client ports.\n * `true`: - Enabled.\n * `false`: - Disabled.\n", + "title": "LLDP drop", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "hostRxDrop" + } + }, + "xr.ethernet.lldpconfig.TTLUsage": { + "default": true, + "description": "Enable/Disable usage of TTL values for flushing/starting LLDP internal flush timer.\n * `true`: - Enabled.\n * `false`: - Disabled.\n", + "title": "TTL usage", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "TTLUsage" + } + }, + "xr.ethernet.lldpconfig.tooManyNeighbors": { + "description": "Indication that this LLDP Agent has too many discovered neighbors.", + "readOnly": true, + "title": "Too many neighbors", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "tooManyNeighbors" + } + }, + "xr.ethernet.lldpconfig.clrStats": { + "default": false, + "description": "Action to clear LLDP statistics.\nSet to true to trigger the action.\nServer resets it to false when action is completed.\n", + "title": "Clear LLDP statistics", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "clrStats" + } + }, + "xr.ethernet.lldpconfig.flushHostDb": { + "default": false, + "description": "Action to flush the learned host system information.\nSet to true to trigger the action.\nServer resets it to false when action is completed.\n", + "title": "Flush neighbor information", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "flushHostDb" + } + }, + "xr.ethernet.hostneighbors.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "hostneighborAid" + } + }, + "xr.ethernet.hostneighbors.parentAid": { + "items": { + "$ref": "#/components/schemas/xr.ethernet.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.ethernet.neighbor.localPortSourceMAC": { + "description": "Neighbor MAC addres", + "readOnly": true, + "title": "MAC address", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "portSourceMAC" + } + }, + "xr.ethernet.neighbor.chassisIdSubtype": { + "default": "macAddress", + "description": "Encoding of chassisId within LLDP data.", + "enum": [ + "reserved", + "chassisComponent", + "interfaceAlias", + "portComponent", + "macAddress", + "networkAddress", + "interfaceName", + "local" + ], + "readOnly": true, + "title": "LLDP Chassis ID encoding", + "type": "string", + "x-enum-varnames": [ + "Reserved", + "Chassis component", + "Interface alias", + "Port component", + "MAC address", + "Network address", + "Interface name", + "Locally assigned" + ], + "x-oapi-codegen-extra-tags": { + "bson": "chassisIdSubtype" + } + }, + "xr.ethernet.neighbor.chassisId": { + "description": "Host chassis ID within LLDP data.", + "readOnly": true, + "title": "LLDP Chassis ID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "chassisId" + } + }, + "xr.ethernet.neighbor.portIdSubtype": { + "default": "macAddress", + "description": "Encoding of portId within LLDP data.", + "enum": [ + "interfaceAlias", + "portComponent", + "macAddress", + "networkAddress", + "interfaceName", + "agentCircuitId", + "local" + ], + "readOnly": true, + "title": "LLDP Port ID encoding", + "type": "string", + "x-enum-varnames": [ + "Interface alias", + "Port component", + "MAC address", + "Network address", + "Interface name", + "Agent circuit ID", + "Locally assigned" + ], + "x-oapi-codegen-extra-tags": { + "bson": "portIdSubtype" + } + }, + "xr.ethernet.neighbor.portId": { + "description": "Host port ID within LLDP data.", + "readOnly": true, + "title": "LLDP Port ID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "portId" + } + }, + "xr.ethernet.neighbor.portDescr": { + "description": "Port Description of Neighbor within LLDP data.", + "readOnly": true, + "title": "LLDP Port description", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "portDescr" + } + }, + "xr.ethernet.neighbor.sysName": { + "description": "Host System Name within LLDP data.", + "readOnly": true, + "title": "LLDP System Name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "sysName" + } + }, + "xr.ethernet.neighbor.sysDescr": { + "description": "Host System description within LLDP data.", + "readOnly": true, + "title": "LLDP System Description", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "sysDescr" + } + }, + "xr.ethernet.neighbor.sysTTL": { + "description": "LLDP TTL (time to live) of Neighbor, in seconds", + "readOnly": true, + "title": "Neighbor LLDP TTL", + "type": "integer", + "x-unit": "s", + "x-oapi-codegen-extra-tags": { + "bson": "sysTTL" + } + }, + "xr.ethernet.neighbor.lldpPDU": { + "description": "Complete LLDP PDU received from this Neighbor, to enable external analysis and extraction of additional TLVs.", + "readOnly": true, + "title": "LLDP PDU", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "lldpPDU" + } + }, + "xr.ethernet.ac.aid": { + "description": "Attachment Circuit Access Identifier (AID) - unique instance within a xr.ethernet resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "attachmentCircuitAid" + } + }, + "xr.ethernet.ac.parentAid": { + "items": { + "$ref": "#/components/schemas/xr.ethernet.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.ethernet.ac.capacity": { + "description": "Capacity of the attachment circuit expressed in multiples of 25Gbps.", + "maximum": 16, + "minimum": 1, + "title": "Rate", + "type": "integer", + "x-unit": "Gbps", + "x-oapi-codegen-extra-tags": { + "bson": "capacity" + } + }, + "xr.ethernet.ac.imc": { + "description": "Ingress match criteria of the AC for traffic coming from the host", + "enum": [ + "matchAll", + "matchOuterVID", + "none" + ], + "title": "Ingress Match Criteria", + "type": "string", + "x-enum-varnames": [ + "Match all", + "Match outer VLAN Id", + "None" + ], + "x-oapi-codegen-extra-tags": { + "bson": "imc" + } + }, + "xr.ethernet.ac.imcOuterVID": { + "description": "String format listing of one or more individual VLAN IDs separated by \"&\" and/or ranges of VLAN IDs connected with \"&&\". For example \"10 & 20 & 50 && 100\" to represent the 52 VLAN IDs 10, 20 and 50-100.", + "pattern": "((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\&\\& (409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))* | ((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\&)* | (409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])", + "title": "Ingress Match Criteria VLAN IDs", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "imcOuterVID" + } + }, + "xr.ethernet.ac.emc": { + "description": "Egress match criteria of the AC for traffic going out to the host", + "enum": [ + "matchAll", + "matchOuterVID", + "none" + ], + "title": "Egress Match Criteria", + "type": "string", + "x-enum-varnames": [ + "Match all", + "Match outer VLAN Id", + "None" + ], + "x-oapi-codegen-extra-tags": { + "bson": "emc" + } + }, + "xr.ethernet.ac.emcOuterVID": { + "description": "String format listing of one or more individual VLAN IDs separated by \"&\" and/or ranges of VLAN IDs connected with \"&&\". For example \"10 & 20 & 50 && 100\" to represent the 52 VLAN IDs 10, 20 and 50-100.", + "pattern": "((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\&\\& (409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))* | ((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\&)* | (409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])", + "title": "Egress Match Criteria VLAN IDs", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "emcOuterVID" + } + }, + "xr.lc.aid": { + "description": "Access Identifier (AID) of a local connection", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "lcAid" + } + }, + "xr.lc.parentAid": { + "items": { + "$ref": "#/components/schemas/xr.common.aid" + }, + "maxItems": 2, + "minItems": 2, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.common.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string" + }, + "xr.lc.direction": { + "default": "txRx", + "description": "Directionality of the local connection. \nPossible values:\n- 'txRx': Both Transmit (Client to Line) and Receive (Line to Client) direction \n- 'tx': Client to Line direction only. \n- 'rx': Line to Client direction only.\n", + "enum": [ + "txRx", + "tx", + "rx" + ], + "title": "Directionality of the LC.", + "type": "string", + "x-enum-varnames": [ + "Tx and RX", + "TX only", + "RX only" + ], + "x-oapi-codegen-extra-tags": { + "bson": "direction" + } + }, + "xr.lc.clientAid": { + "description": "Points to the AID of the connected client side resource of the LC. \nThis could be an ethernet resource or a specific attachment circuit on an ethernet resource.\n", + "title": "Client side AID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "clientAid" + } + }, + "xr.lc.dscgAid": { + "description": "Points to the AID of the DSCG which is used at the optical layer at the line side. This is entered as part of LC creation.", + "title": "DSCG AID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "dscgAid" + } + }, + "xr.lc.lineAid": { + "description": "Points to the AID of the connected LO-ODU resource at the line side of the LC.", + "readOnly": true, + "title": "Line side AID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "lineAid" + } + }, + "xr.lc.remoteModuleId": { + "description": "Remote service endpoint module ID. Set by Host device as part of service creation.", + "readOnly": true, + "title": "Remote module ID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "remoteModuleId" + } + }, + "xr.lc.remoteClientId": { + "description": "Remote service endpoint client resource AID. Set by Host device as part of service creation.", + "readOnly": true, + "title": "Remote module Client AID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "remoteClientId" + } + }, + "cm.device": { + "description": "Device data definition for onboarding tool", + "example": { + "href": "/devices/02dbd2b0-3baf-43f0-51c8-5da9498709e4", + "rt": [ + "cm.device" + ], + "id": "02dbd2b0-3baf-43f0-51c8-5da9498709e4", + "config": { + "status": "onboarded" + }, + "state": { + "moduleName": "XR LEAF 1", + "piid": "abb81108-8bbf-4222-9bf3-0a6bbb75ac65", + "dmn": { + "language": "en", + "value": "Infinera" + }, + "ownershipStatus": "owned", + "status": "onboarded", + "online": true + } + }, + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "config": { + "$ref": "#/components/schemas/cm.device.config" + }, + "state": { + "$ref": "#/components/schemas/cm.device.state" + } + }, + "type": "object" + }, + "cm.device.config": { + "additionalProperties": false, + "description": "Configurable device parameters", + "properties": { + "status": { + "$ref": "#/components/schemas/cm.device.config.parameters.status" + } + }, + "type": "object" + }, + "cm.device.state": { + "description": "Definition of device state parameters", + "properties": { + "moduleName": { + "$ref": "#/components/schemas/xr.device.n" + }, + "piid": { + "$ref": "#/components/schemas/xr.device.piid" + }, + "dmn": { + "$ref": "#/components/schemas/xr.device.dmn" + }, + "ownership": { + "$ref": "#/components/schemas/cm.device.parameters.ownershipStatus" + }, + "status": { + "$ref": "#/components/schemas/cm.device.state.parameters.status" + }, + "online": { + "$ref": "#/components/schemas/cm.device.parameters.online" + } + }, + "type": "object" + }, + "cm.device.parameters.ownershipStatus": { + "description": "Device ownership status\nPossible values:\n- 'readytobeowned': The device is discovered and ready to be owned\n- 'owned': Device is owned by this onboard tool user\n- 'ownedbyother': Device is owned by another user\n- 'unknown': Device is unsecure or status cannot be obtained\n", + "enum": [ + "readytobeowned", + "owned", + "ownedbyother", + "unknown" + ], + "readOnly": true, + "title": "Status", + "type": "string", + "x-enum-varnames": [ + "Ready to be owned", + "Owned", + "Owned by other", + "Unknown" + ] + }, + "cm.device.parameters.online": { + "description": "Indicates if device is currently reachable", + "readOnly": true, + "title": "Online", + "type": "boolean" + }, + "cm.device.config.parameters.status": { + "description": "Device onboard status configuration", + "enum": [ + "onboarded", + "offboarded" + ], + "title": "Status", + "type": "string", + "x-enum-varnames": [ + "Onboarded", + "Offboarded" + ] + }, + "cm.device.state.parameters.status": { + "description": "Device onboard status state", + "enum": [ + "discovered", + "onboardPending", + "onboarded", + "onboardFailed", + "offboardPending", + "offboardFailed", + "offboarded" + ], + "readOnly": true, + "title": "Status", + "type": "string", + "x-enum-varnames": [ + "Discovered", + "Onboard pending", + "Onboarded", + "Onboard failed", + "Offboard pending", + "Offboard failed", + "Offboarded" + ] + }, + "cm.device.updateRequest": { + "additionalProperties": false, + "description": "Object used in the request body of PUT requests in /devices endpoint.\nContains the device identifier and its onboard status.\n", + "properties": { + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "config": { + "$ref": "#/components/schemas/cm.device.update" + } + }, + "required": [ + "config", + "id" + ], + "type": "object" + }, + "cm.device.update": { + "additionalProperties": false, + "description": "Configurable device parameters", + "minProperties": 1, + "properties": { + "status": { + "$ref": "#/components/schemas/cm.device.config.parameters.status" + } + }, + "type": "object" + }, + "cm.sw.action": { + "description": "Definition of CM software action requests", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "config": { + "$ref": "#/components/schemas/cm.sw.action.config" + }, + "state": { + "$ref": "#/components/schemas/cm.sw.action.state" + }, + "moduleActions": { + "$ref": "#/components/schemas/cm.sw.moduleActions" + } + } + }, + "cm.sw.action.config": { + "additionalProperties": false, + "description": "Definition of software action configuration parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "selectors": { + "$ref": "#/components/schemas/cm.sw.action.config.selectors" + }, + "operations": { + "$ref": "#/components/schemas/cm.sw.action.config.operations" + } + }, + "type": "object" + }, + "cm.sw.action.config.selectors": { + "description": "List of software action target modules.\nModules can be specified individually (via module ID), per constellation, per NDU or per host.\n", + "items": { + "$ref": "#/components/schemas/cm.sw.action.config.selector" + }, + "minItems": 1, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "selectors" + } + }, + "cm.sw.action.config.selector": { + "maxProperties": 1, + "minProperties": 1, + "properties": { + "moduleIds": { + "$ref": "#/components/schemas/cm.sw.action.config.selector.moduleIds" + }, + "nduIds": { + "$ref": "#/components/schemas/cm.sw.action.config.selector.nduIds" + } + }, + "type": "object" + }, + "cm.sw.action.config.selector.moduleIds": { + "items": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "minItems": 1, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "moduleIds" + } + }, + "cm.sw.action.config.selector.nduIds": { + "items": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "minItems": 1, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "nduIds" + } + }, + "cm.sw.action.config.operations": { + "description": "List of software actions to be executed on target modules.\nPossible values:\n- 'clearBank' \n- 'validateUrl'\n- 'download'\n- 'prepareUpgrade'\n- 'commit'\n- 'abort' \nIf multiple modules are target, action is executed in parallel for different modules.\nIf multiple operations are defined, they are executed per module with the following priority:\n- 1: 'abort'\n- 2: 'activate' with 'rollback' option\n- 3: 'clearBank'\n- 4: 'validateUrl'\n- 5: 'download'\n- 6: 'prepareUpgrade'\n- 8: 'activate' with 'apply' option\nIf an operation fails , remaining module operations are aborted.\nIf an 'abort' operation is executed, remaining operations for that module are aborted.\nIf an 'activate' with 'rollback' option is executed, remaining operations for that module are aborted.\n", + "items": { + "$ref": "#/components/schemas/cm.sw.action.config.operation" + }, + "minItems": 1, + "title": "Actions", + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "operations" + } + }, + "cm.sw.action.config.operation": { + "additionalProperties": false, + "maxProperties": 1, + "minProperties": 1, + "properties": { + "clearBank": { + "$ref": "#/components/schemas/cm.sw.action.config.operation.clearBank" + }, + "validateUrl": { + "$ref": "#/components/schemas/cm.sw.action.config.operation.validateUrl" + }, + "download": { + "$ref": "#/components/schemas/cm.sw.action.config.operation.download" + }, + "prepareUpgrade": { + "$ref": "#/components/schemas/cm.sw.action.config.operation.prepareUpgrade" + }, + "activate": { + "$ref": "#/components/schemas/cm.sw.action.config.operation.activate" + }, + "abort": { + "$ref": "#/components/schemas/cm.sw.action.config.operation.abort" + } + }, + "type": "object" + }, + "cm.sw.action.config.operation.clearBank": { + "description": "Operation to delete the software image and associated configuration from the inactive bank.", + "enum": [ + true + ], + "title": "clear", + "type": "boolean", + "x-enum-varnames": [ + "True" + ], + "x-oapi-codegen-extra-tags": { + "bson": "clearBank" + } + }, + "cm.sw.action.config.operation.validateUrl": { + "additionalProperties": false, + "description": "Operation to validate that the software image file is available at specified location.", + "minProperties": 1, + "properties": { + "swURL": { + "$ref": "#/components/schemas/cm.sw.action.parameters.swURL" + } + }, + "title": "validate", + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "validateUrl" + } + }, + "cm.sw.action.config.operation.download": { + "additionalProperties": false, + "description": "Operation to executes the download of the software image to the upgrade bank.", + "minProperties": 1, + "properties": { + "swURL": { + "$ref": "#/components/schemas/cm.sw.action.parameters.swURL" + } + }, + "title": "download", + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "download" + } + }, + "cm.sw.action.config.operation.prepareUpgrade": { + "description": "Operation to classify the upgrade impact (i.e., the impact of executing the software in the upgrade bank).\nResult is available on upgradeClassification property of the respective module swCtrl object.\n", + "enum": [ + true + ], + "title": "clear", + "type": "boolean", + "x-enum-varnames": [ + "True" + ], + "x-oapi-codegen-extra-tags": { + "bson": "prepareUpgrade" + } + }, + "cm.sw.action.config.operation.activate": { + "additionalProperties": false, + "description": "Operation to execute software image and commit it upon successful module restart.\nIf executed with 'apply' option, execution is done over the upgrade bank image\n(note that after commit, the former upgrade bank becomes active bank and the former active bank becomes previous bank).\nIf executed with 'rollback' option, execution is done over the previous active bank image\n(note that no commit is executed after module restart)\n", + "minProperties": 1, + "properties": { + "option": { + "$ref": "#/components/schemas/cm.sw.action.parameters.activateOptions" + } + }, + "title": "clear", + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "activate" + } + }, + "cm.sw.action.config.operation.abort": { + "description": "Operation to abort module current action (if any) and clear pending operations.", + "enum": [ + true + ], + "title": "Abort", + "type": "boolean", + "x-enum-varnames": [ + "True" + ], + "x-oapi-codegen-extra-tags": { + "bson": "abort" + } + }, + "cm.sw.action.state": { + "description": "Definition of module state object", + "properties": { + "lifecycleState": { + "$ref": "#/components/schemas/cm.sw.action.state.parameters.lifecycleState" + } + } + }, + "cm.sw.action.parameters.swURL": { + "description": "Source of software package for download to upgrade bank.", + "format": "uri", + "maxLength": 255, + "title": "Software URL", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "swURL" + } + }, + "cm.sw.action.parameters.activateOptions": { + "description": "Activate operation options.\nPossible values:\n- 'apply': Activation is done over the upgrade bank image and is committed upon successful module restart.\n- 'rollback': Activation is done over the previous active bank image and no commit is issue upon module restart.\n", + "enum": [ + "apply", + "rollback" + ], + "title": "Activate option", + "type": "string", + "x-enum-varnames": [ + "Apply", + "Rollback" + ], + "x-oapi-codegen-extra-tags": { + "bson": "option" + } + }, + "cm.sw.action.state.parameters.lifecycleState": { + "description": "Provides the aggregated status of a software module action.\nPossible values:\n- 'pending': This state occurs when all module operations related to this request are not yet created or in pending state.\n- 'executing': This state occurs when all module operations related to this request are currently under execution.\n- 'partiallyExecuted': This state may occur when at least one module operation related to this request is in executed state.\n- 'executed': This state occurs when all module operations related to this request are in executed state.\n- 'partiallyFailed': This state may occur when at least one module operation related to this request is in failed state.\n- 'failed': This state occurs when all module operations related to this request are in failed state.\n- 'deleted': This state occurs when an action is removed.\n", + "enum": [ + "pending", + "executing", + "partiallyExecuted", + "executed", + "partiallyFailed", + "failed", + "deleted" + ], + "readOnly": true, + "title": "Lifecycle State", + "type": "string", + "x-enum-varnames": [ + "Pending", + "Executing", + "Partially executed", + "Executed", + "Partially failed", + "Failed", + "Deleted" + ] + }, + "cm.sw.action.create": { + "additionalProperties": false, + "description": "Software action creation parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "selectors": { + "$ref": "#/components/schemas/cm.sw.action.config.selectors" + }, + "operations": { + "$ref": "#/components/schemas/cm.sw.action.config.operations" + } + }, + "required": [ + "operations", + "selectors" + ], + "type": "object" + }, + "cm.sw.moduleAction": { + "description": "Definition of CM operations resulting from a software action request", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "state": { + "$ref": "#/components/schemas/cm.sw.moduleAction.state" + } + }, + "title": "Operations" + }, + "cm.sw.moduleActions": { + "items": { + "$ref": "#/components/schemas/cm.sw.moduleAction" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "moduleActions" + } + }, + "cm.sw.moduleAction.state": { + "description": "Definition of moduleAction state object", + "properties": { + "moduleId": { + "$ref": "#/components/schemas/xr.device.di" + }, + "action": { + "$ref": "#/components/schemas/cm.sw.moduleAction.action" + }, + "actionDate": { + "$ref": "#/components/schemas/cm.sw.moduleAction.parameters.actionDate" + }, + "actionSource": { + "$ref": "#/components/schemas/cm.sw.moduleAction.parameters.actionSource" + }, + "moduleSwmStatus": { + "$ref": "#/components/schemas/cm.sw.moduleAction.parameters.moduleSwmStatus" + }, + "actionResult": { + "$ref": "#/components/schemas/cm.sw.moduleAction.state.actionResult" + }, + "lifecycleState": { + "$ref": "#/components/schemas/cm.sw.moduleAction.parameters.lifecycleState" + } + } + }, + "cm.sw.moduleAction.action": { + "description": "Definition of module software operations", + "maxProperties": 1, + "minProperties": 1, + "properties": { + "wipeoutBank": { + "$ref": "#/components/schemas/cm.sw.moduleAction.action.wipeoutBank" + }, + "validateSwUrl": { + "$ref": "#/components/schemas/cm.sw.moduleAction.action.validateSwUrl" + }, + "download": { + "$ref": "#/components/schemas/cm.sw.moduleAction.action.download" + }, + "classifyUpgradeImpact": { + "$ref": "#/components/schemas/cm.sw.moduleAction.action.classifyUpgradeImpact" + }, + "execute": { + "$ref": "#/components/schemas/cm.sw.moduleAction.action.execute" + }, + "commit": { + "$ref": "#/components/schemas/cm.sw.moduleAction.action.commit" + }, + "abort": { + "$ref": "#/components/schemas/cm.sw.moduleAction.action.abort" + }, + "rollback": { + "$ref": "#/components/schemas/cm.sw.moduleAction.action.rollback" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "action" + } + }, + "cm.sw.moduleAction.action.wipeoutBank": { + "additionalProperties": false, + "description": "Action to delete the SW and associated configuration in this Bank. Set to true to trigger the action..\nUpon completion, the module cm.sw.moduleAction.actionResult 'result' parameter is updated.\n", + "enum": [ + true + ], + "type": "object", + "x-enum-varnames": [ + "True" + ], + "x-oapi-codegen-extra-tags": { + "bson": "wipeoutBank" + } + }, + "cm.sw.moduleAction.action.validateSwUrl": { + "additionalProperties": false, + "description": "Action to validate software image location.\nUpon completion, the module cm.swCtrl.state.actionResult 'moduleClassification' and 'result' parameters is updated.\n", + "properties": { + "source": { + "$ref": "#/components/schemas/cm.sw.moduleAction.parameters.source" + } + }, + "required": [ + "source" + ], + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "validateSwUrl" + } + }, + "cm.sw.moduleAction.action.download": { + "additionalProperties": false, + "description": "Action to download software image to upgrade bank.\nUpon execution, the module cm.swCtrl.config.swURL parameter is updated to the source URL and an URL validation is executed. \nDuring execution, the module cm.swCtrl.state.status parameter is updated to [1] 'Downloading'.\nDuring execution, the module cm.swCtrl.state.downloadProgress parameter is updated to reflect the download process.\nUpon completion, the module cm.sw.moduleAction.actionResult 'moduleClassification' and 'result' parameters are updated.\n", + "properties": { + "source": { + "$ref": "#/components/schemas/cm.sw.moduleAction.parameters.source" + } + }, + "required": [ + "source" + ], + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "download" + } + }, + "cm.sw.moduleAction.action.classifyUpgradeImpact": { + "additionalProperties": false, + "description": "Action to validate the software image in upgrade bank.\nUpon completion, the module cm.sw.moduleAction.actionResult 'upgradeClassification' and 'result' parameters are updated.\n", + "enum": [ + true + ], + "type": "object", + "x-enum-varnames": [ + "True" + ], + "x-oapi-codegen-extra-tags": { + "bson": "classifyUpgradeImpact" + } + }, + "cm.sw.moduleAction.action.execute": { + "additionalProperties": false, + "description": "Action to execute software in upgradeBank.\nUpon completion, the module cm.sw.moduleAction.actionResult 'result' parameter is updated.\n", + "enum": [ + true + ], + "type": "object", + "x-enum-varnames": [ + "True" + ], + "x-oapi-codegen-extra-tags": { + "bson": "executeSwImage" + } + }, + "cm.sw.moduleAction.action.commit": { + "additionalProperties": false, + "description": "Action to commit software in upgradeBank. \nAfter restart, previous active bank becomes inactive and previous bank, the upgrade bank becomes active bank.\nUpon completion, the module cm.sw.moduleAction.actionResult 'result' parameter is updated.\n", + "enum": [ + true + ], + "type": "object", + "x-enum-varnames": [ + "True" + ], + "x-oapi-codegen-extra-tags": { + "bson": "commitSwImage" + } + }, + "cm.sw.moduleAction.action.abort": { + "additionalProperties": false, + "description": "Action to abort current upgrade process. \nUpon completion, the module cm.sw.moduleAction.actionResult 'result' parameter is updated.\n", + "enum": [ + true + ], + "type": "object", + "x-enum-varnames": [ + "True" + ], + "x-oapi-codegen-extra-tags": { + "bson": "abortSwUpgrade" + } + }, + "cm.sw.moduleAction.action.rollback": { + "additionalProperties": false, + "description": "Action to fall back to previous running bank. \nUpon completion, the module cm.sw.moduleAction.actionResult 'result' parameter is updated.\n", + "enum": [ + true + ], + "type": "object", + "x-enum-varnames": [ + "True" + ], + "x-oapi-codegen-extra-tags": { + "bson": "rollback" + } + }, + "cm.sw.moduleAction.state.actionResult": { + "description": "Action' result as reported by module.\n'downloadProgress' property is only applicable to 'download' action\n'upgradeClassification' property is only applicable to 'classifyUpgradeImpact' action\n", + "properties": { + "downloadProgress": { + "$ref": "#/components/schemas/cm.sw.moduleAction.actionResult.parameters.downloadProgress" + }, + "moduleClassification": { + "$ref": "#/components/schemas/cm.sw.moduleAction.actionResult.parameters.moduleClassification" + }, + "upgradeClassification": { + "$ref": "#/components/schemas/cm.sw.moduleAction.actionResult.parameters.upgradeClassification" + }, + "result": { + "$ref": "#/components/schemas/cm.sw.moduleAction.actionResult.parameters.result" + } + }, + "readOnly": true, + "title": "Action result", + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "actionResult" + } + }, + "cm.sw.moduleAction.parameters.source": { + "description": "Software image URL", + "title": "Source", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "source" + } + }, + "cm.sw.moduleAction.parameters.actionDate": { + "description": "Timestamp in date-time format pattern according to IETF RFC 3339.", + "format": "date-time", + "readOnly": true, + "title": "Action Date", + "type": "string" + }, + "cm.sw.moduleAction.parameters.actionSource": { + "description": "Defines the source of the module action request.\nPossible values:\n- '0': NA\n- '1': CM\n- '2': Host\n", + "enum": [ + 0, + 1, + 2 + ], + "readOnly": true, + "title": "Action Source", + "type": "integer", + "x-enum-varnames": [ + "Not applicable", + "IPM", + "Host" + ] + }, + "cm.sw.moduleAction.parameters.moduleSwmStatus": { + "description": "State of ongoing download or upgrade procedure. \nWhen no upgrade procedure is in progress the status is Idle.\nPossible values:\n- '0': Idle\n- '1': Downloading\n- '2': Executing\n- '3': Restarting\n- '4': runningNotCommitted\n- '5': Committing\n- '6': Reverting\n- '7': Falling Back\n", + "readOnly": true, + "title": "Status", + "type": "integer" + }, + "cm.sw.moduleAction.actionResult.parameters.downloadProgress": { + "description": "Percentage of SW package download, 0-100, when download is in progress.\n", + "readOnly": true, + "title": "Download progress", + "type": "integer" + }, + "cm.sw.moduleAction.actionResult.parameters.moduleClassification": { + "description": "Classification of the module so a client can identify which XR Deliverable Packages are suitable for it.", + "maxLength": 40, + "readOnly": true, + "title": "Module classification", + "type": "string" + }, + "cm.sw.moduleAction.actionResult.parameters.upgradeClassification": { + "description": "Classification of upgrade impact of executing the software in upgradeBank. \nResult of swm Action to classify upgrade impact.\nPossible values:\n- '0': Upgrade not classified yet\n- '1': Upgrade classification failed\n- '2': Configuration cannot be migrated\n- '3': Service affecting upgrade\n- '4': Non-service affecting upgrade\n", + "readOnly": true, + "title": "Upgrade classification", + "type": "integer" + }, + "cm.sw.moduleAction.actionResult.parameters.result": { + "description": "Result of the last completed swm Action.\nEither successfully or reason for failure.\nResult is Unknown during the execution of an action.\nPossible value:\n- '0': Unknown\n- '1': Success\n- '2': Fail -Invalid or unreachable software URL\n- '3': Fail -Not Enough RAM\n- '4': Fail -Not Enough Flash\n- '5': Fail -Connection Lost\n- '6': Fail -SW validation failure\n- '7': Wrong SW For Module\n- '8': Validating\n- '9': Downloading\n- '10': Upgrade Classificating\n- '21': Activate Fail - Connection Lost\n- '22': Activate Fail - SW execute failure\n- '23': Activate Fail - Commit failure\n- '24': Executing software in upgradeBank\n- '25': Committing software in upgradeBank\n- '25': Falling back - Execute software in previous Bank\n- '30': Aborting\n", + "readOnly": true, + "title": "Action Result", + "type": "integer" + }, + "cm.sw.moduleAction.parameters.lifecycleState": { + "description": "Provides the status of a software module action.\nPossible values:\n- 'pending': This state occurs when the module configuration was not yet sent to the module.\n- 'executing': This state occurs when the module configuration was sent to the module and is currently under execution.\n- 'executed': This state occurs when the module configuration was already executed and reported finished.\n- 'failed': This state occurs when the module configuration was rejected by the module.\n- 'deleted': This state occurs when a moduleAction is removed.\n", + "enum": [ + "pending", + "executing", + "executed", + "failed", + "deleted" + ], + "readOnly": true, + "title": "Lifecycle State", + "type": "string", + "x-enum-varnames": [ + "Pending", + "Executing", + "Executed", + "Failed", + "Deleted" + ] + }, + "cm.sw.ctrl": { + "description": "Definition of CM module/ndu software control object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "state": { + "$ref": "#/components/schemas/cm.sw.ctrl.state" + }, + "swBanks": { + "$ref": "#/components/schemas/cm.sw.banks" + } + } + }, + "cm.sw.ctrl.state": { + "description": "Definition of module/ndu software bank state parameters", + "properties": { + "deviceType": { + "$ref": "#/components/schemas/cm.parameters.deviceType" + }, + "deviceId": { + "$ref": "#/components/schemas/cm.parameters.deviceId" + }, + "deviceName": { + "$ref": "#/components/schemas/xr.device.n" + }, + "deviceLabels": { + "$ref": "#/components/schemas/cm.parameters.labels" + }, + "activeBank": { + "$ref": "#/components/schemas/xr.swmctrl.activeBank" + }, + "committedBank": { + "$ref": "#/components/schemas/xr.swmctrl.committedBank" + }, + "previousActiveBank": { + "$ref": "#/components/schemas/xr.swmctrl.previousActiveBank" + }, + "status": { + "$ref": "#/components/schemas/xr.swmctrl.swmStatus" + }, + "latestAction": { + "$ref": "#/components/schemas/cm.sw.ctrl.state.latestAction" + }, + "latestStatusChangedTime": { + "$ref": "#/components/schemas/xr.swmctrl.latestStatusChangedTime" + } + } + }, + "cm.sw.ctrl.state.latestAction": { + "description": "Module latest action parameters", + "properties": { + "timestamp": { + "$ref": "#/components/schemas/xr.swmctrl.recentSWMActionDateTime" + }, + "action": { + "$ref": "#/components/schemas/xr.swmctrl.recentSWMAction" + }, + "source": { + "$ref": "#/components/schemas/xr.swmctrl.recentSWMActionSource" + }, + "bank": { + "$ref": "#/components/schemas/xr.swmctrl.recentSWMActionUpgradeBank" + }, + "swUrl": { + "$ref": "#/components/schemas/xr.swmctrl.recentSWMActionSWURL" + }, + "revertTimeout": { + "$ref": "#/components/schemas/xr.swmctrl.recentSWMActionRevertTimeout" + }, + "downloadProgress": { + "$ref": "#/components/schemas/xr.swmctrl.recentDownloadProgress" + }, + "upgradeClassification": { + "$ref": "#/components/schemas/xr.swmctrl.recentUpgradeClassification" + }, + "result": { + "$ref": "#/components/schemas/xr.swmctrl.recentSWMActionResult" + } + } + }, + "cm.sw.bank": { + "description": "Definition of xr-network object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/xr.common.colId" + }, + "state": { + "$ref": "#/components/schemas/cm.sw.bank.state" + } + } + }, + "cm.sw.banks": { + "items": { + "$ref": "#/components/schemas/cm.sw.bank" + }, + "maxItems": 2, + "minItems": 2, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "swBanks" + } + }, + "cm.sw.bank.state": { + "description": "Definition of module software bank state parameters", + "properties": { + "version": { + "$ref": "#/components/schemas/xr.swmbank.version" + }, + "bankStatus": { + "$ref": "#/components/schemas/cm.sw.bank.state.bankStatus" + }, + "imageStatus": { + "$ref": "#/components/schemas/cm.sw.bank.state.imageStatus" + }, + "configCompVersion": { + "$ref": "#/components/schemas/xr.swmbank.configCompVersion" + }, + "configDataSentry": { + "$ref": "#/components/schemas/xr.swmbank.configDataSentry" + }, + "imageActivationHistory": { + "$ref": "#/components/schemas/cm.sw.bank.state.imageActivationHistory" + }, + "imageConfiguration": { + "$ref": "#/components/schemas/cm.sw.bank.state.imageConfiguration" + }, + "action": { + "$ref": "#/components/schemas/xr.swmbank.action" + } + } + }, + "cm.sw.bank.state.bankStatus": { + "description": "Indicates the software bank status\nPossible values:\n- 'empty': Software bank image is empty\n- 'installing': Software image is under installation\n- 'installed': Software image is installed in the bank\n- 'invalid': Signature of the software in this bank is invalid\n", + "enum": [ + "empty", + "installing", + "installed", + "invalid" + ], + "readOnly": true, + "title": "Bank status", + "type": "string", + "x-enum-varnames": [ + "Empty", + "Installing", + "Installed", + "Invalid" + ] + }, + "cm.sw.bank.state.imageStatus": { + "description": "Indicates the software image status in the bank\nPossible values:\n- 'notApplicable': Bank is empty\n- 'inactive': Software image is currently\n- 'running':\n- 'runningNotCommitted'\n", + "enum": [ + "notApplicable", + "inactive", + "running", + "runningNotCommitted" + ], + "readOnly": true, + "title": "Image status", + "type": "string", + "x-enum-varnames": [ + "Not applicable", + "Inactive", + "Running", + "Running not committed" + ] + }, + "cm.sw.bank.state.imageActivationHistory": { + "description": "Indicates the software image status in the bank\nPossible values:\n- 'notApplicable': Software image in the bank was never activated\n- 'failed': Software image latest activation failed\n- 'succeed': Software image latest activation succeed\n", + "enum": [ + "notApplicable", + "failed", + "succeed" + ], + "readOnly": true, + "title": "Image status", + "type": "string", + "x-enum-varnames": [ + "Not applicable", + "Failed", + "Succeed" + ] + }, + "cm.sw.bank.state.imageConfiguration": { + "description": "Indicates the software image status in the bank\nPossible values:\n- 'notApplicable': Software image is invalid or not present.\n- 'none': Software in this bank has no associated config data.\n- 'upgradeNotClassified': Software in this bank has associated config data but upgrade classification was not executed.\n- 'upgradeClassificationFailed': Software upgrade classification failed.\n- 'invalidUpgradeConfiguration': Software configuration cannot be migrated.\n- 'validUpgradeServiceAffecting': Software configuration is valid and upgrade is service affecting.\n- 'validUpgradeNonServiceAffecting': Software configuration is valid and upgrade is non-service affecting.\n- 'validRunning': Software configuration is valid and applied.\n", + "enum": [ + "notApplicable", + "none", + "upgradeNotClassified", + "upgradeClassificationFailed", + "invalidUpgradeConfiguration", + "validUpgradeServiceAffecting", + "validUpgradeNonServiceAffecting", + "validRunning" + ], + "readOnly": true, + "title": "Image status", + "type": "string", + "x-enum-varnames": [ + "Not applicable", + "None", + "Upgrade not classified", + "Upgrade classification failed", + "Invalid upgrade configuration", + "Valid upgrade service affecting", + "Valid upgrade non service affecting", + "Valid running" + ] + }, + "cm.resource": { + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + } + }, + "type": "object" + }, + "cm.parameters.name": { + "description": "User defined object name.\n", + "maxLength": 64, + "pattern": "^([A-Za-z0-9_\\-.,: ]*)$", + "title": "Name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "name" + } + }, + "xr.device.di": { + "description": "Device identifier.", + "readOnly": true, + "title": "Device identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "moduleId" + } + }, + "cm.parameters.deviceType": { + "description": "Device type\nPossible values:\n- 'ndu'\n- 'moduleHub'\n- 'moduleLeaf'\n- 'moduleUnknown\n", + "enum": [ + "ndu", + "moduleHub", + "moduleLeaf", + "moduleUnknown" + ], + "readOnly": true, + "type": "string", + "x-enum-varnames": [ + "NDU", + "Hub", + "Leaf", + "Unknown" + ], + "x-oapi-codegen-extra-tags": { + "bson": "deviceType" + } + }, + "cm.parameters.deviceId": { + "description": "Object identifier", + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "title": "ID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "deviceId" + } + }, + "xr.swmctrl.activeBank": { + "description": "Bank ID of currently active running SW.", + "readOnly": true, + "title": "Running SW bank", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "activeBank" + } + }, + "xr.swmctrl.committedBank": { + "description": "Bank ID of currently committed SW. \n0 = NoValue, 1 = A, 2 = B. \nThis will be the Bank to be used at startup.\n", + "readOnly": true, + "title": "Module Classification", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "committedBank" + } + }, + "xr.swmctrl.previousActiveBank": { + "description": "Bank ID of the previously Active Bank before the currently running SW. 0 is used for N/A.", + "readOnly": true, + "title": "Previous SW bank", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "previousActiveBank" + } + }, + "xr.swmctrl.swmStatus": { + "description": "State of ongoing download or upgrade procedure.\nWhen no upgrade procedure is in progress the status is Idle.\n- '0': Idle\n- '1': Downloading\n- '2': Executing\n- '3': Restarting\n- '4': runningNotCommitted\n- '5': Committing\n- '6': Reverting\n- '7': Falling Back\n", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "readOnly": true, + "type": "integer", + "x-enum-varnames": [ + "Idle", + "Downloading", + "Executing", + "Restarting", + "runningNotCommitted", + "Committing", + "Reverting", + "Falling Back" + ], + "x-oapi-codegen-extra-tags": { + "bson": "status" + } + }, + "xr.swmctrl.latestStatusChangedTime": { + "description": "Timestamp of last sw change in date-time format pattern according to IETF RFC 3339.\nEmpty if there is no image in the bank.\n", + "format": "date-time", + "readOnly": true, + "title": "Request Date", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "latestChangedDate" + } + }, + "xr.swmctrl.recentSWMActionDateTime": { + "format": "date-time", + "readOnly": true, + "title": "Action Date Time", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "timestamp" + } + }, + "xr.swmctrl.recentSWMAction": { + "default": 0, + "description": "Software Management Action. \nSet to a non-zero value to trigger the different SWM actions.\n- '0': No Action\n- '1': Validate swURL\n- '2': Start software download to upgradeBank\n- '3': Classify upgrade impact. I.e. the impact of executing the software in upgradeBank. Result is seen on upgradeClassification property.\n- '4': Execute software in upgradeBank\n- '5': Commit software in runningBank\n- '6': Execute software in previousBank (Fallback)\n- '7': Abort\n", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "readOnly": true, + "title": "SWM Action", + "type": "integer", + "x-enum-varnames": [ + "No Action", + "Validate swURL", + "Start software download to upgradeBank", + "Classify upgrade impact.", + "Execute software in upgradeBank", + "Commit software in runningBank", + "Execute software in previousBank (Fallback)", + "Abort" + ], + "x-oapi-codegen-extra-tags": { + "bson": "action" + } + }, + "xr.swmctrl.recentSWMActionSource": { + "description": "- 0: NA \n- 1: CM \n- 2: Host\n", + "enum": [ + 0, + 1, + 2 + ], + "readOnly": true, + "type": "integer", + "x-enum-varnames": [ + "Not applicable", + "CM", + "Host" + ], + "x-oapi-codegen-extra-tags": { + "bson": "source" + } + }, + "xr.swmctrl.recentSWMActionUpgradeBank": { + "default": 0, + "description": "Bank ID used for swm Actions. \nInactive bank ID is used if not set.\n", + "maximum": 2, + "minimum": 0, + "readOnly": true, + "title": "Upgrade SW bank", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "bank" + } + }, + "xr.swmctrl.recentSWMActionSWURL": { + "default": "", + "description": "Source of software package for download to upgradebank. \nSet to empty if it is not applicable for the recent SWM cction.\n", + "format": "uri", + "maxLength": 255, + "readOnly": true, + "title": "SW URL", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "swUrl" + } + }, + "xr.swmctrl.recentSWMActionRevertTimeout": { + "default": 120, + "description": "Seconds until automatic revert to previousBank after executing new SW, unless the new SW is committed. 0 used for no revert. Set to empty if it is not applicable for the recent SWM action.", + "readOnly": true, + "title": "Revert timeout", + "type": "integer", + "x-unit": "s", + "x-oapi-codegen-extra-tags": { + "bson": "revertTimeout" + } + }, + "xr.swmctrl.recentDownloadProgress": { + "description": "Percentage of SW package download, 0-100, when download is in progress. \n255 is used for \"N/A\" when no download is in progress. \nSet to empty if it is not applicable for the recent SWM action.\n", + "readOnly": true, + "title": "Download progress", + "type": "integer", + "x-unit": "%", + "x-oapi-codegen-extra-tags": { + "bson": "downloadProgress" + } + }, + "xr.swmctrl.recentUpgradeClassification": { + "description": "Classification of upgrade impact of executing the software in upgradeBank. \nResult of swmAction to classify upgrade impact. \nSet to empty if it is not applicable for the recent SWM action.\nPossible values:\n- '0': Upgrade not classified yet\n- '1': Upgrade classification failed\n- '2': Configuration cannot be migrated\n- '3': Service affecting upgrade\n- '4': Non-service affecting upgrade\n", + "readOnly": true, + "title": "Upgrade classification", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "upgradeClassification" + } + }, + "xr.swmctrl.recentSWMActionResult": { + "description": "Result of the last completed swmAction. \nEither successfull or reason for failure.\nResult is Unknown during the execution of an SWM action and can be monitored to see both when an SWM action is completed and the result.\nPossible values:\n- '0': Unknown\n- '1': Success. The last SWM action was run successfully.\n- '2': Invalid or unreachable software URL. \n- '3': Not Enough RAM \n- '4': Not Enough Flash\n- '5': Connection Lost\n- '6': SW validation failure\n- '7': SW execute failure\n- '8': Commit failure\n- '9': Wrong SW For Module.\n", + "readOnly": true, + "title": "Last Action Result", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "result" + } + }, + "xr.swmbank.version": { + "description": "Version of the SW deliverable stored in this bank.", + "maxLength": 20, + "readOnly": true, + "title": "Version", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "version" + } + }, + "xr.swmbank.configCompVersion": { + "description": "This is compiled into the SW. \nSee Migration above for details Divided into Major Minor Version. \n0xFFFFFFFF = n/a, i.e. there is no data\n", + "readOnly": true, + "title": "Configuration Compatibility Version", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "configCompVersion" + } + }, + "xr.swmbank.configDataSentry": { + "description": "Incremented at every change of user configuration. \nThis refers to the data stored in association with this specific version. \n0xFFFFFFFF = n/a, i.e. there is no data.\n", + "readOnly": true, + "title": "Configuration Data Sentry", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "configDataSentry" + } + }, + "xr.swmbank.action": { + "description": "Bank operation.\nPossible values:\n- 'none'\n- 'wipeout': Action to delete the SW and associated configuration in this Bank. Set to true to trigger the action.\n", + "enum": [ + "wipeout", + "none" + ], + "title": "Action", + "type": "string", + "x-enum-varnames": [ + "Wipeout", + "None" + ], + "x-oapi-codegen-extra-tags": { + "bson": "action" + } + }, + "cm.network-connection": { + "description": "Definition of network connection", + "example": { + "href": "/network-connections/d9672ef1-ddc1-cd6b-3c77-ea86b442545a", + "rt": [ + "cm.network-connection" + ], + "id": "d9672ef1-ddc1-cd6b-3c77-ea86b442545a", + "config": { + "name": "connection 01: Sunnyvale <> San Jose", + "serviceMode": "portMode", + "labels": { + "region": "West Coast" + } + }, + "state": { + "name": "connection 01: Sunnyvale <> San Jose", + "createdBy": "cm", + "lifecycleState": "configured", + "operationalStatus": "enabled", + "labels": { + "region": "West Coast" + } + }, + "endpoints": [ + { + "href": "/network-connections/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/endpoints/9d37cb82-e7e3-45f0-bf9d-0a9f9b7ffd72", + "rt": [ + "cm.network-connection.endpoint" + ], + "id": "9d37cb82-e7e3-45f0-bf9d-0a9f9b7ffd72", + "parentId": "d9672ef1-ddc1-cd6b-3c77-ea86b442545a", + "config": { + "selector": { + "ifSelectorByHostPortId": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/1:2" + } + } + }, + "state": { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/1:2", + "portSourceMAC": "28:c0:da:3e:3e:44" + }, + "moduleIf": { + "moduleId": "18e47620-8848-4c7e-710f-05c668478c57", + "moduleName": "XR Device", + "moduleMAC": "3c:2c:99:c0:89:00", + "moduleSerialNumber": "12345678900", + "moduleRole": "hub", + "moduleClientIfColId": 2, + "moduleClientIfAid": "XR T2", + "moduleClientIfPortSpeed": 100 + } + } + }, + { + "href": "/network-connections/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/endpoints/bc8079be-8b19-4f28-a47e-9b30c8fe41f6", + "rt": [ + "cm.network-connection.endpoint" + ], + "id": "bc8079be-8b19-4f28-a47e-9b30c8fe41f6", + "parentId": "d9672ef1-ddc1-cd6b-3c77-ea86b442545a", + "config": { + "selector": { + "ifSelectorByHostPortId": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:0B:F8:00:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0" + } + } + }, + "state": { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:0B:F8:00:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0", + "portSourceMAC": "28:c0:da:3e:3e:44" + }, + "moduleIf": { + "moduleId": "37fb48e6-bc3f-4f98-766c-5e8fdc7d0335", + "moduleName": "XR Device", + "moduleMAC": "2b-d3-3f-e4-77-c2", + "moduleSerialNumber": "12345678901", + "moduleClientIfAid": "XR T1", + "role": "leaf" + }, + "bandwidth": 100, + "policy": { + "ingressMatchCriteria": "matchAll", + "ingressMatchOuterVlanId": "", + "egressMatchCriteria": "matchAll", + "egressMatchOuterVlanId": "" + } + } + } + ], + "localConnections": [ + { + "href": "/network-connections/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/local-connections/138ffcf5-5e77-4121-9e84-9fb9e677cbc4", + "rt": [ + "cm.network-connection.localConnection" + ], + "id": "138ffcf5-5e77-4121-9e84-9fb9e677cbc4", + "parentId": "d9672ef1-ddc1-cd6b-3c77-ea86b442545a", + "config": { + "moduleId": "37fb48e6-bc3f-4f98-766c-5e8fdc7d0335", + "clientAid": "XR T1", + "dscgAid": "XR-L1-C1-DSCG1", + "directionality": "biDir" + }, + "state": { + "lcColId": 1, + "aid": "XR-T1,XR-L1-C1-ODUCni-1-ODUji-1", + "directionality": "biDir", + "moduleId": "37fb48e6-bc3f-4f98-766c-5e8fdc7d0335", + "moduleMAC": "2b-d3-3f-e4-77-c2", + "clientAid": "XR-T1", + "lineAid": "XR-L1-C1-ODUCni-1-ODUji-1", + "dscgAid": "XR-L1-C1-DSCG1", + "remoteModuleMAC": "3c:2c:99:c0:89:00", + "remoteClientAid": "XR T2" + } + }, + { + "href": "/network-connections/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/local-connections/92c8cd71-4d8b-412f-90b4-de4ec3448eb2", + "rt": [ + "cm.network-connection.localConnection" + ], + "id": "92c8cd71-4d8b-412f-90b4-de4ec3448eb2", + "parentId": "d9672ef1-ddc1-cd6b-3c77-ea86b442545a", + "config": { + "moduleId": "18e47620-8848-4c7e-710f-05c668478c57", + "clientAid": "XR T2", + "dscgAid": "XR-L1-C1-DSCG1", + "directionality": "biDir" + }, + "state": { + "lcColId": 1, + "aid": "XR-T2,XR-L1-C1-ODUCni-1-ODUji-1", + "directionality": "biDir", + "moduleId": "18e47620-8848-4c7e-710f-05c668478c57", + "moduleMAC": "2b-d3-3f-e4-77-c2", + "clientAid": "XR-T2", + "lineAid": "XR-L1-C1-ODUCni-1-ODUji-1", + "dscgAid": "XR-L1-C1-DSCG1", + "remoteModuleMAC": "3c:2c:99:c0:89:00", + "remoteClientAid": "XR T2" + } + } + ] + }, + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "config": { + "$ref": "#/components/schemas/cm.network-connection.config" + }, + "state": { + "$ref": "#/components/schemas/cm.network-connection.state" + }, + "endpoints": { + "$ref": "#/components/schemas/cm.network-connection.endpoints" + }, + "lcs": { + "$ref": "#/components/schemas/cm.network-connection.local-connections" + } + }, + "type": "object" + }, + "cm.network-connection.config": { + "additionalProperties": false, + "description": "Definition of network connection configurable parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "serviceMode": { + "$ref": "#/components/schemas/cm.network-connection.parameters.serviceMode" + }, + "mc": { + "$ref": "#/components/schemas/cm.network-connection.parameters.mc" + }, + "outerVID": { + "$ref": "#/components/schemas/cm.network-connection.parameters.outerVID" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.network-connection.state": { + "description": "Definition of network connection state parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "serviceMode": { + "$ref": "#/components/schemas/cm.network-connection.parameters.serviceMode" + }, + "createdBy": { + "$ref": "#/components/schemas/cm.network-connection.parameters.createdBy" + }, + "lifecycleState": { + "$ref": "#/components/schemas/cm.network-connection.parameters.lifecycleState" + }, + "lifecycleStateCause": { + "$ref": "#/components/schemas/cm.parameters.lifecycleStateCause" + }, + "operationalStatus": { + "$ref": "#/components/schemas/cm.network-connection.parameters.operationalStatus" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.network-connection.parameters.serviceMode": { + "default": "portMode", + "description": "Provides the network connection type.\nPossible values:\n- 'portMode': Provides transparent transport of Ethernet or OTN traffic between XR hub and leaf client ports\n- 'vtiP2mpMode': Provides transport of VLAN flows between XR hub and leaf client ports where downstream traffic and bandwidth from Hub module can be shared by multiple Leaf modules\n- 'vtiP2pSymmetric': Provides transport of VLAN flows between XR hub and leaf client ports using a symmetric P2P bidirectional (upstream and downstream) flow between a Hub and a Leaf module\n- 'vtiP2pAsymmetric': Provides transport of VLAN flows between XR hub and leaf client ports using an asymmetric P2P bidirectional (upstream and downstream) flow between a Hub and a Leaf module\n", + "enum": [ + "portMode", + "vtiP2mpMode", + "vtiP2pSymmetric", + "vtiP2pAsymmetric" + ], + "title": "Service Mode", + "type": "string", + "x-enum-varnames": [ + "Port mode", + "VTI P2MP mode", + "VTI P2MP symmetric", + "VTI P2MP asymmetric" + ], + "x-oapi-codegen-extra-tags": { + "bson": "serviceMode" + } + }, + "cm.network-connection.parameters.createdBy": { + "description": "Indicates whether network-connection orchestration should be done through CM interface or through Host interface\nPossible values: 'host', 'cm'\n- 'host': Created through host interface and discovered by CM\n Cannot be edited or deleted through CM interface\n- 'cm': Created through CM interface\n Can be edited or deleted through CM interface\n", + "enum": [ + "host", + "cm" + ], + "readOnly": true, + "title": "Created by", + "type": "string", + "x-enum-varnames": [ + "Host", + "IPM" + ], + "x-oapi-codegen-extra-tags": { + "bson": "createdBy" + } + }, + "cm.network-connection.parameters.lifecycleState": { + "description": "Provides the configuration status of a network connection.\nPossible values:\n- 'pendingConfiguration': This state occurs when one of the network connection modules is pending configuration or pending deletion.\n- 'configured': This state occurs when all network connection modules are configured.\n- 'configurationFailed': This state may occur when at least a configuration of a module from this network connection failed or timeout.\n- 'pendingDeletion': This state may occur when a request to delete this network connection is being processed.\n- 'deletionFailed': This state may occur when at least a removal of a module from this network connection failed or timeout.\n- 'networkConflict': This state may occur when there is a conflict in a network connection module configuration.\n- 'deleted': This state occurs when a network connection is removed.\n", + "enum": [ + "pendingConfiguration", + "configured", + "configurationFailed", + "pendingDeletion", + "deletionFailed", + "networkConflict", + "deleted" + ], + "readOnly": true, + "title": "Lifecycle State", + "type": "string", + "x-enum-varnames": [ + "Pending configuration", + "Configured", + "Configuration failed", + "Pending deletion", + "Deletion failed", + "Network conflict", + "Deleted" + ], + "x-oapi-codegen-extra-tags": { + "bson": "lifecycleState" + } + }, + "cm.network-connection.parameters.operationalStatus": { + "description": "Operational Status.", + "enum": [ + "enabled", + "disabled" + ], + "readOnly": true, + "title": "Operational status", + "type": "string", + "x-enum-varnames": [ + "Enabled", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "operationalStatus" + } + }, + "cm.network-connection.parameters.mc": { + "description": "Match Criteria applied to the packets received from network side before sending to the client side.\nPossible Values:\n- 'matchAll': All packets from the associated client interface\n- 'matchOuterVID': Based on outer VLAN ID\n- 'none'\n", + "enum": [ + "matchAll", + "matchOuterVID", + "none" + ], + "type": "string", + "x-enum-varnames": [ + "Match all", + "Match outer VLAN Id", + "None" + ], + "x-oapi-codegen-extra-tags": { + "bson": "mc" + } + }, + "cm.network-connection.parameters.outerVID": { + "description": "String format listing of one or more individual VLAN IDs separated by \"&\" and/or ranges of VLAN IDs connected with \"&&\". \nExample \"10 & 20 & 50 && 100\" represents the VLAN IDs 10, 20 and 50-100.\n", + "pattern": "((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\&\\& (409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))* | ((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\&)* | (409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])", + "title": "Match Criteria VLAN IDs", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "outerVID" + } + }, + "cm.network-connection.create": { + "additionalProperties": false, + "description": "Definition of network connection creation parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "serviceMode": { + "$ref": "#/components/schemas/cm.network-connection.parameters.serviceMode" + }, + "mc": { + "$ref": "#/components/schemas/cm.network-connection.parameters.mc" + }, + "outerVID": { + "$ref": "#/components/schemas/cm.network-connection.parameters.outerVID" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + }, + "endpoints": { + "items": { + "$ref": "#/components/schemas/cm.network-connection.endpoint.create" + }, + "minItems": 2, + "type": "array" + } + }, + "required": [ + "endpoints", + "name", + "serviceMode" + ], + "type": "object" + }, + "cm.network-connection.update": { + "additionalProperties": false, + "description": "Definition of network connection configurable parameters", + "minProperties": 1, + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "serviceMode": { + "$ref": "#/components/schemas/cm.network-connection.parameters.serviceMode" + }, + "mc": { + "$ref": "#/components/schemas/cm.network-connection.parameters.mc" + }, + "outerVID": { + "$ref": "#/components/schemas/cm.network-connection.parameters.outerVID" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.network-connection.endpoint": { + "description": "Definition of network connection endpoint object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "config": { + "$ref": "#/components/schemas/cm.network-connection.endpoint.config" + }, + "state": { + "$ref": "#/components/schemas/cm.network-connection.endpoint.state" + }, + "acs": { + "$ref": "#/components/schemas/cm.network-connection.acs" + } + } + }, + "cm.network-connection.endpoints": { + "description": "List of network connection endpoints", + "items": { + "$ref": "#/components/schemas/cm.network-connection.endpoint" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "endpoints" + } + }, + "cm.network-connection.endpoint.config": { + "additionalProperties": false, + "description": "Definition of network connection endpoint configurable parameters", + "properties": { + "selector": { + "$ref": "#/components/schemas/cm.selectors.ifSelector" + }, + "capacity": { + "$ref": "#/components/schemas/cm.network-connection.endpoint.parameters.capacity" + } + }, + "type": "object" + }, + "cm.network-connection.endpoint.state": { + "description": "Definition of network-connection endpoint state object", + "properties": { + "hostPort": { + "$ref": "#/components/schemas/cm.interface.hostPort" + }, + "moduleIf": { + "$ref": "#/components/schemas/cm.interface.moduleIf" + }, + "capacity": { + "$ref": "#/components/schemas/cm.network-connection.endpoint.parameters.capacity" + } + } + }, + "cm.network-connection.endpoint.parameters.capacity": { + "description": "Client to network capacity of the attachment circuit.\nPossible values are defined in multiples of 25Gbps up to maximum module rate.\n", + "title": "Capacity", + "type": "integer", + "x-unit": "Gbps", + "x-oapi-codegen-extra-tags": { + "bson": "capacity" + } + }, + "cm.network-connection.endpoint.create": { + "additionalProperties": false, + "description": "Definition of network connection endpoint creation parameters", + "properties": { + "selector": { + "$ref": "#/components/schemas/cm.selectors.ifSelector" + }, + "capacity": { + "$ref": "#/components/schemas/cm.network-connection.endpoint.parameters.capacity" + } + }, + "required": [ + "selector" + ], + "type": "object" + }, + "cm.network-connection.endpoint.update": { + "additionalProperties": false, + "description": "Definition of network connection endpoint editable parameters", + "properties": { + "capacity": { + "$ref": "#/components/schemas/cm.network-connection.endpoint.parameters.capacity" + } + }, + "required": [ + "capacity" + ], + "type": "object" + }, + "cm.network-connection.ac": { + "description": "Attachment circuit", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentIds": { + "$ref": "#/components/schemas/cm.parameters.parentIds" + }, + "config": { + "$ref": "#/components/schemas/cm.network-connection.ac.config" + }, + "state": { + "$ref": "#/components/schemas/cm.network-connection.ac.state" + } + }, + "type": "object" + }, + "cm.network-connection.acs": { + "description": "List of attachment circuits", + "items": { + "$ref": "#/components/schemas/cm.network-connection.ac" + }, + "maxItems": 2, + "minItems": 1, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "acs" + } + }, + "cm.network-connection.ac.config": { + "description": "Definition attachment circuit configurable parameters", + "properties": { + "capacity": { + "$ref": "#/components/schemas/cm.network-connection.ac.parameters.capacity" + }, + "imc": { + "$ref": "#/components/schemas/cm.network-connection.ac.parameters.imc" + }, + "imcOuterVID": { + "$ref": "#/components/schemas/cm.network-connection.ac.parameters.imcOuterVID" + }, + "emc": { + "$ref": "#/components/schemas/cm.network-connection.ac.parameters.emc" + }, + "emcOuterVID": { + "$ref": "#/components/schemas/cm.network-connection.ac.parameters.emcOuterVID" + } + }, + "type": "object" + }, + "cm.network-connection.ac.state": { + "description": "Definition of the attachment circuit state parameters.", + "properties": { + "colId": { + "$ref": "#/components/schemas/xr.common.colId" + }, + "capacity": { + "$ref": "#/components/schemas/xr.ethernet.ac.capacity" + }, + "imc": { + "$ref": "#/components/schemas/xr.ethernet.ac.imc" + }, + "imcOuterVID": { + "$ref": "#/components/schemas/xr.ethernet.ac.imcOuterVID" + }, + "emc": { + "$ref": "#/components/schemas/xr.ethernet.ac.emc" + }, + "emcOuterVID": { + "$ref": "#/components/schemas/xr.ethernet.ac.emcOuterVID" + }, + "lifecycleState": { + "$ref": "#/components/schemas/cm.network-connection.ac.parameters.lifecycleState" + } + }, + "type": "object" + }, + "cm.network-connection.ac.parameters.capacity": { + "description": "Client to network capacity of the attachment circuit.\nPossible values are defined in multiples of 25Gbps up to maximum module rate.\n", + "title": "Capacity", + "type": "integer", + "x-unit": "Gbps", + "x-oapi-codegen-extra-tags": { + "bson": "capacity" + } + }, + "cm.network-connection.ac.parameters.imc": { + "description": "Ingress Match Criteria applied to the packets received from client port before sending to the network side.\nPossible Values:\n- 'matchAll': All packets from the associated client interface\n- 'matchOuterVID': Based on outer VLAN ID\n- 'none'\n", + "enum": [ + "matchAll", + "matchOuterVID", + "none" + ], + "type": "string", + "x-enum-varnames": [ + "Match all", + "Match outer VLAN Id", + "None" + ], + "x-oapi-codegen-extra-tags": { + "bson": "imc" + } + }, + "cm.network-connection.ac.parameters.emc": { + "description": "Egress Match Criteria applied to the packets received from network side before sending to the client side.\nPossible Values:\n- 'matchAll': All packets from the associated client interface\n- 'matchOuterVID': Based on outer VLAN ID\n- 'none'\n", + "enum": [ + "matchAll", + "matchOuterVID", + "none" + ], + "type": "string", + "x-enum-varnames": [ + "Match all", + "Match outer VLAN Id", + "None" + ], + "x-oapi-codegen-extra-tags": { + "bson": "emc" + } + }, + "cm.network-connection.ac.parameters.imcOuterVID": { + "description": "String format listing of one or more individual VLAN IDs separated by \"&\" and/or ranges of VLAN IDs connected with \"&&\".\nExample \"10 & 20 & 50 && 100\" represents the VLAN IDs 10, 20 and 50-100.\n", + "pattern": "((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\&\\& (409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))* | ((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\&)* | (409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])", + "title": "Ingress Match Criteria VLAN IDs", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "imcOuterVID" + } + }, + "cm.network-connection.ac.parameters.emcOuterVID": { + "description": "String format listing of one or more individual VLAN IDs separated by \"&\" and/or ranges of VLAN IDs connected with \"&&\". \nExample \"10 & 20 & 50 && 100\" represents the VLAN IDs 10, 20 and 50-100.\n", + "pattern": "((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\&\\& (409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))* | ((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\&)* | (409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])", + "title": "Egress Match Criteria VLAN IDs", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "emcOuterVID" + } + }, + "cm.network-connection.ac.parameters.lifecycleState": { + "description": "Provides the configuration status of an attachment circuit.\nPossible values:\n- 'pendingConfiguration': This state occurs when the module ac configuration is required.\n- 'configured': This state occurs when the module is configured in the network according to its ac requirements.\n- 'configurationFailed': This state occurs when the module ac configuration failed or timeout.\n- 'pendingDeletion': This state occurs when the module shall be removed from the current network-connection.\n- 'deletionFailed': This state occurs when the configuration to remove the module from the network-connection failed or timeout.\n- 'networkConflict': The current module configuration does not match the request or was already a member of other existing network-connection.\n- 'deleted': This state occurs when the current module is removed from the network-connection.\n", + "title": "Lifecycle State" + }, + "cm.network-connection.local-connection": { + "description": "Cross-connection between ethernet interface and optical line interface within a device", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentIds": { + "$ref": "#/components/schemas/cm.parameters.parentIds" + }, + "config": { + "$ref": "#/components/schemas/cm.network-connection.local-connection.config" + }, + "state": { + "$ref": "#/components/schemas/cm.network-connection.local-connection.state" + } + }, + "type": "object" + }, + "cm.network-connection.local-connections": { + "description": "List of local connections", + "items": { + "$ref": "#/components/schemas/cm.network-connection.local-connection" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "lcs" + } + }, + "cm.network-connection.local-connection.config": { + "additionalProperties": false, + "description": "Definition of local-connection configurable parameters", + "properties": { + "moduleId": { + "$ref": "#/components/schemas/cm.network-connection.local-connection.parameters.moduleId" + }, + "clientAid": { + "$ref": "#/components/schemas/cm.network-connection.local-connection.parameters.clientAid" + }, + "dscgAid": { + "$ref": "#/components/schemas/cm.network-connection.local-connection.parameters.dscgAid" + }, + "direction": { + "$ref": "#/components/schemas/cm.network-connection.local-connection.parameters.direction" + } + }, + "type": "object" + }, + "cm.network-connection.local-connection.state": { + "description": "Definition of network-connection state parameters", + "properties": { + "lcAid": { + "$ref": "#/components/schemas/xr.lc.aid" + }, + "colId": { + "$ref": "#/components/schemas/xr.common.colId" + }, + "direction": { + "$ref": "#/components/schemas/xr.lc.direction" + }, + "moduleId": { + "$ref": "#/components/schemas/xr.device.di" + }, + "macAddress": { + "$ref": "#/components/schemas/xr.platform.macAddress" + }, + "clientAid": { + "$ref": "#/components/schemas/xr.lc.clientAid" + }, + "lineAid": { + "$ref": "#/components/schemas/xr.lc.lineAid" + }, + "dscgAid": { + "$ref": "#/components/schemas/xr.lc.dscgAid" + }, + "remoteModuleId": { + "$ref": "#/components/schemas/xr.lc.remoteModuleId" + }, + "remoteClientAid": { + "$ref": "#/components/schemas/xr.lc.remoteClientId" + } + }, + "type": "object" + }, + "cm.network-connection.local-connection.parameters.moduleId": { + "description": "Module identifier", + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "title": "ID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "moduleId" + } + }, + "cm.network-connection.local-connection.parameters.clientAid": { + "description": "Access Identifier (AID) within module and client interface collection.", + "maxLength": 64, + "title": "Client AID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "clientAid" + } + }, + "cm.network-connection.local-connection.parameters.dscgAid": { + "description": "Access Identifier (AID) within module and DSCG collection.", + "maxLength": 64, + "title": "DSCG AID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "dscgAid" + } + }, + "cm.network-connection.local-connection.parameters.direction": { + "description": "Directionality of the local connection. \nPossible values:\n- 'txRx': Both Transmit (Client to Line) and Receive (Line to Client) direction \n- 'tx': Client to Line direction only. \n- 'rx': Line to Client direction only.\n", + "enum": [ + "txRx", + "tx", + "rx" + ], + "title": "Directionality of the LC.", + "type": "string", + "x-enum-varnames": [ + "TX and RX", + "TX only", + "RX only" + ], + "x-oapi-codegen-extra-tags": { + "bson": "direction" + } + }, + "cm.parameters.lifecycleStateCause": { + "description": "Detailed information regarding the object lifecycle state.", + "properties": { + "action": { + "$ref": "#/components/schemas/cm.lifecycleStateCause.parameters.action" + }, + "timestamp": { + "$ref": "#/components/schemas/cm.lifecycleStateCause.parameters.timestamp" + }, + "traceId": { + "$ref": "#/components/schemas/cm.lifecycleStateCause.parameters.traceId" + }, + "errors": { + "items": { + "$ref": "#/components/schemas/cm.error" + }, + "type": "array" + } + }, + "title": "Lifecycle State Cause", + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "lifecycleStateCause" + } + }, + "cm.lifecycleStateCause.parameters.action": { + "description": "Internal id of the action that triggered the current lifecycle state change.", + "readOnly": true, + "title": "Action", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "action" + } + }, + "cm.lifecycleStateCause.parameters.timestamp": { + "description": "Timestamp of the action that triggered the current lifecycle state change in date-time format pattern according to IETF RFC 3339.", + "format": "date-time", + "readOnly": true, + "title": "Timestamp", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "timestamp" + } + }, + "cm.lifecycleStateCause.parameters.traceId": { + "description": "Id assigned to the request, job, or action that triggered the current lifecycle state change.", + "readOnly": true, + "title": "Trace Id", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "traceId" + } + }, + "cm.selectors.ifSelector": { + "description": "Definition of selector", + "maxProperties": 1, + "minProperties": 1, + "properties": { + "hostPortSelectorByName": { + "$ref": "#/components/schemas/cm.selector.hostPortSelectorByName" + }, + "hostPortSelectorByPortId": { + "$ref": "#/components/schemas/cm.selector.hostPortSelectorByPortId" + }, + "hostPortSelectorBySysName": { + "$ref": "#/components/schemas/cm.selector.hostPortSelectorBySysName" + }, + "hostPortSelectorByPortSourceMAC": { + "$ref": "#/components/schemas/cm.selector.hostPortSelectorByPortSourceMAC" + }, + "moduleIfSelectorByModuleId": { + "$ref": "#/components/schemas/cm.selector.moduleIfSelectorByModuleId" + }, + "moduleIfSelectorByModuleName": { + "$ref": "#/components/schemas/cm.selector.moduleIfSelectorByModuleName" + }, + "moduleIfSelectorByModuleMAC": { + "$ref": "#/components/schemas/cm.selector.moduleIfSelectorByModuleMAC" + }, + "moduleIfSelectorByModuleSerialNumber": { + "$ref": "#/components/schemas/cm.selector.moduleIfSelectorByModuleSerialNumber" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "selector" + } + }, + "cm.selector.hostPortSelectorByName": { + "additionalProperties": false, + "description": "Definition of host port selector based on host port name information", + "maxProperties": 3, + "minProperties": 3, + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "portIdSubtype": { + "$ref": "#/components/schemas/cm.selector.hostPortSelector.parameters.portIdSubtype" + }, + "portId": { + "$ref": "#/components/schemas/cm.selector.hostPortSelector.parameters.portId" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "hostPortSelectorByName" + } + }, + "cm.selector.hostPortSelector.parameters.portIdSubtype": { + "description": "Only applicable when pre-planning objects.\nIf defined, this parameter is used as matching criteria for associating the host port to a module client interface using the tuple chassisIdSubtype, chassisId, portIdSubtype, portId.\n", + "enum": [ + "interfaceAlias", + "portComponent", + "macAddress", + "networkAddress", + "interfaceName", + "agentCircuitId", + "local" + ], + "title": "LLDP Port ID encoding", + "type": "string", + "x-enum-varnames": [ + "Interface alias", + "Port component", + "MAC address", + "Network address", + "Interface name", + "Agent circuit ID", + "Locally assigned" + ], + "x-oapi-codegen-extra-tags": { + "bson": "portIdSubtype" + } + }, + "cm.selector.hostPortSelector.parameters.portId": { + "description": "Only applicable when pre-planning objects.\nIf defined, this parameter is used as matching criteria for associating the host port to a module client interface using the tuple chassisIdSubtype, chassisId, portIdSubtype, portId.\n", + "title": "LLDP Port ID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "portId" + } + }, + "cm.selector.hostPortSelectorByPortId": { + "additionalProperties": false, + "description": "Definition of host port selector based on host port id and chassis id information", + "maxProperties": 4, + "minProperties": 4, + "properties": { + "chassisIdSubtype": { + "$ref": "#/components/schemas/cm.selector.hostSelector.parameters.chassisIdSubtype" + }, + "chassisId": { + "$ref": "#/components/schemas/cm.selector.hostSelector.parameters.chassisId" + }, + "portIdSubtype": { + "$ref": "#/components/schemas/cm.selector.hostPortSelector.parameters.portIdSubtype" + }, + "portId": { + "$ref": "#/components/schemas/cm.selector.hostPortSelector.parameters.portId" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "hostPortSelectorByPortId" + } + }, + "cm.selector.hostSelector.parameters.chassisIdSubtype": { + "default": "macAddress", + "description": "Value of chassisIdSubtype (encoding of chassisId) within LLDP data.\nOnly applicable when pre-planning objects.\nIf defined, this parameter is used as matching criteria when associating discovered XR modules.\n", + "enum": [ + "reserved", + "chassisComponent", + "interfaceAlias", + "portComponent", + "macAddress", + "networkAddress", + "interfaceName", + "local" + ], + "title": "LLDP Chassis ID encoding", + "type": "string", + "x-enum-varnames": [ + "Reserved", + "Chassis component", + "Interface alias", + "Port component", + "MAC address", + "Network address", + "Interface name", + "Locally assigned" + ], + "x-oapi-codegen-extra-tags": { + "bson": "chassisIdSubtype" + } + }, + "cm.selector.hostSelector.parameters.chassisId": { + "description": "Value of chassisId within LLDP data\nOnly applicable when pre-planning objects.\nIf defined, this parameter is used as matching criteria when associating discovered XR modules.\n", + "title": "LLDP Chassis ID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "chassisId" + } + }, + "cm.selector.hostPortSelectorBySysName": { + "additionalProperties": false, + "description": "Definition of host port selector based on host port id and host system name information", + "maxProperties": 3, + "minProperties": 3, + "properties": { + "sysName": { + "$ref": "#/components/schemas/cm.selector.hostSelector.parameters.sysName" + }, + "portIdSubtype": { + "$ref": "#/components/schemas/cm.selector.hostPortSelector.parameters.portIdSubtype" + }, + "portId": { + "$ref": "#/components/schemas/cm.selector.hostPortSelector.parameters.portId" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "hostPortSelectorBySysName" + } + }, + "cm.selector.hostSelector.parameters.sysName": { + "description": "Value of System Name within LLDP data\nOnly applicable when pre-planning objects.\nIf defined, this parameter is used as matching criteria when associating discovered XR modules.\n", + "title": "LLDP System Name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "sysName" + } + }, + "cm.selector.hostPortSelectorByPortSourceMAC": { + "additionalProperties": false, + "description": "Definition of host port selector based on host port source MAC address id information", + "maxProperties": 1, + "minProperties": 1, + "properties": { + "portSourceMAC": { + "$ref": "#/components/schemas/cm.selector.hostPortSelector.parameters.portSourceMAC" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "hostPortSelectorByPortSourceMAC" + } + }, + "cm.selector.hostPortSelector.parameters.portSourceMAC": { + "description": "Only applicable when pre-planning objects.\nIf defined, this parameter is used as matching criteria for associating the host port to a module client interface using the portSourceMAC.\n", + "title": "Host Port MAC Address", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "portSourceMAC" + } + }, + "cm.selector.moduleIfSelectorByModuleId": { + "additionalProperties": false, + "description": "Definition of host port selector based on module id information", + "maxProperties": 2, + "minProperties": 2, + "properties": { + "moduleId": { + "$ref": "#/components/schemas/cm.selector.moduleSelector.parameters.moduleId" + }, + "moduleClientIfAid": { + "$ref": "#/components/schemas/cm.selector.moduleIfSelector.parameters.moduleClientIfAid" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "moduleIfSelectorByModuleId" + } + }, + "cm.selector.moduleSelector.parameters.moduleId": { + "description": "Only applicable when pre-planning objects.\nIf defined, this parameter is used as matching criteria when associating discovered XR modules using moduleId.\n", + "title": "Module Identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "moduleId" + } + }, + "cm.selector.moduleIfSelector.parameters.moduleClientIfAid": { + "description": "TODO\n", + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "moduleClientIfAid" + } + }, + "cm.selector.moduleIfSelectorByModuleName": { + "additionalProperties": false, + "description": "Definition of host port selector based on module serial number information", + "maxProperties": 2, + "minProperties": 2, + "properties": { + "moduleName": { + "$ref": "#/components/schemas/cm.selector.moduleSelector.parameters.moduleName" + }, + "moduleClientIfAid": { + "$ref": "#/components/schemas/cm.selector.moduleIfSelector.parameters.moduleClientIfAid" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "moduleIfSelectorByModuleName" + } + }, + "cm.selector.moduleSelector.parameters.moduleName": { + "description": "Only applicable when pre-planning objects.\nIf defined, this parameter is used as matching criteria when associating discovered XR modules.\n", + "title": "Name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "moduleName" + } + }, + "cm.selector.moduleIfSelectorByModuleMAC": { + "additionalProperties": false, + "description": "Definition of host port selector based on module MAC address information", + "maxProperties": 2, + "minProperties": 2, + "properties": { + "moduleMAC": { + "$ref": "#/components/schemas/cm.selector.moduleSelector.parameters.moduleMAC" + }, + "moduleClientIfAid": { + "$ref": "#/components/schemas/cm.selector.moduleIfSelector.parameters.moduleClientIfAid" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "moduleIfSelectorByModuleMAC" + } + }, + "cm.selector.moduleSelector.parameters.moduleMAC": { + "description": "Only applicable when pre-planning objects.\nIf defined, this parameter is used as matching criteria when associating discovered XR modules.\n", + "title": "MAC Address", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "moduleMAC" + } + }, + "cm.selector.moduleIfSelectorByModuleSerialNumber": { + "additionalProperties": false, + "description": "Definition of host port selector based on module serial number information", + "maxProperties": 2, + "minProperties": 2, + "properties": { + "moduleSerialNumber": { + "$ref": "#/components/schemas/cm.selector.moduleSelector.parameters.moduleSerialNumber" + }, + "moduleClientIfAid": { + "$ref": "#/components/schemas/cm.selector.moduleIfSelector.parameters.moduleClientIfAid" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "moduleIfSelectorByModuleSerialNumber" + } + }, + "cm.selector.moduleSelector.parameters.moduleSerialNumber": { + "description": "Only applicable when pre-planning objects.\nIf defined, this parameter is used as matching criteria when associating discovered XR modules.\n", + "title": "Serial number", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "moduleSerialNumber" + } + }, + "cm.interface.hostPort": { + "description": "Definition of interface host parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "hostName": { + "$ref": "#/components/schemas/cm.parameters.hostName" + }, + "chassisIdSubtype": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.chassisIdSubtype" + }, + "chassisId": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.chassisId" + }, + "sysName": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.sysName" + }, + "portIdSubtype": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.portIdSubtype" + }, + "portId": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.portId" + }, + "portSourceMAC": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.localPortSourceMAC" + }, + "portDescr": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.portDescr" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "hostPort" + } + }, + "cm.parameters.hostName": { + "description": "User defined object name.", + "maxLength": 64, + "pattern": "^([A-Za-z0-9_\\-.,: ]*)$", + "title": "Name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "hostName" + } + }, + "cm.interface.moduleIf": { + "description": "Definition of interface module parameters", + "properties": { + "moduleId": { + "$ref": "#/components/schemas/xr.device.di" + }, + "moduleName": { + "$ref": "#/components/schemas/xr.device.n" + }, + "macAddress": { + "$ref": "#/components/schemas/xr.platform.macAddress" + }, + "serialNumber": { + "$ref": "#/components/schemas/xr.platform.mnsel" + }, + "currentRole": { + "$ref": "#/components/schemas/xr.configuration.currentRole" + }, + "clientIfColId": { + "$ref": "#/components/schemas/xr.ethernet.colId" + }, + "clientIfAid": { + "$ref": "#/components/schemas/xr.ethernet.aid" + }, + "clientIfPortSpeed": { + "$ref": "#/components/schemas/xr.ethernet.portSpeed" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "moduleIf" + } + }, + "cm.parameters.parentIds": { + "description": "List of Parent Object identifiers", + "items": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "title": "Parent IDs", + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentIds" + } + }, + "xr.ethernet.colId": { + "description": "Object identifier in the supporting Ethernet collection.", + "title": "Collection Id", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "clientIfColId" + } + }, + "cm.xr-network": { + "description": "Definition of xr-network object", + "example": { + "href": "/networks/5f8c47b4-c02a-6242-260c-185dd04b8faf", + "rt": [ + "cm.network" + ], + "id": "5f8c47b4-c02a-6242-260c-185dd04b8faf", + "config": { + "name": "Sunnyvale Constellation", + "constellationFrequency": 193100000, + "modulation": "16QAM" + }, + "state": { + "name": "Sunnyvale Constellation", + "constellationFrequency": 193100000, + "modulation": "16QAM", + "lifecycleState": "configured", + "reachableModules": [ + { + "discoveredTime": "2022-04-05T14:32Z", + "module": { + "moduleId": "c85c2904-1794-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:03", + "moduleSerialNumber": "12345678903", + "configuredRole": "Auto", + "currentRole": "Hub", + "roleStatus": "Ready", + "trafficMode": "L1Mode", + "fiberConnectionMode": "dual", + "frequencyCtrl": "XR", + "constellationFrequency": 194100000, + "operatingFrequency": 194100000, + "ncoFrequency": 194100000, + "modulation": "16QAM", + "capacity": 400, + "clientPortMode": "ethernet", + "baudRate": 32, + "maxAllowedDSCs": 16, + "txPowerTargetPerDsc": -6.4 + }, + "endpoints": [ + { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "49:48:59:74:0F:05", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0", + "portSourceMAC": "6F:B9:08:F0:C2:49", + "portDescr": "et-1/0/0:0" + }, + "module": { + "moduleId": "c85c2904-1794-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:03", + "moduleSerialNumber": "12345678903", + "moduleCurrentRole": "Hub", + "moduleClientIfColId": 1, + "moduleClientIfAid": "XR T1", + "moduleClientIfPortSpeed": 400 + } + } + ] + }, + { + "discoveredTime": "2022-04-05T14:32Z", + "module": { + "moduleId": "18e47620-8848-4c7e-710f-05c668478c57", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:00", + "moduleSerialNumber": "12345678900", + "configuredRole": "Auto", + "currentRole": "hub", + "roleStatus": "Ready", + "trafficMode": "L1Mode", + "fiberConnectionMode": "dual", + "frequencyCtrl": "XR", + "constellationFrequency": 193100000, + "operatingFrequency": 193100000, + "ncoFrequency": 193100000, + "modulation": "16QAM", + "capacity": 400, + "clientPortMode": "ethernet", + "baudRate": 32, + "maxAllowedDSCs": 16, + "txPowerTargetPerDsc": -6.4, + "endpoints": [ + { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0", + "portSourceMAC": "da:3d:c2:4c:55:40", + "portDescr": "et-1/0/0:0" + }, + "moduleIf": { + "moduleId": "18e47620-8848-4c7e-710f-05c668478c57", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:00", + "moduleSerialNumber": "12345678900", + "moduleCurrentRole": "hub", + "moduleClientIfColId": 1, + "moduleClientIfAid": "XR T1", + "moduleClientIfPortSpeed": 100 + } + }, + { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/1:0", + "portSourceMAC": "04:34:D6:88:A8:CB", + "portDescr": "et-1/0/1:0" + }, + "moduleIf": { + "moduleId": "18e47620-8848-4c7e-710f-05c668478c57", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:00", + "moduleSerialNumber": "12345678900", + "moduleCurrentRole": "hub", + "moduleClientIfColId": 2, + "moduleClientIfAid": "XR T2", + "moduleClientIfPortSpeed": 100 + } + } + ] + } + }, + { + "discoveredTime": "2022-04-05T14:32Z", + "module": { + "moduleId": "153a21fc-1a30-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:02", + "moduleSerialNumber": "12345678901", + "configuredRole": "Auto", + "currentRole": "Leaf", + "roleStatus": "Ready", + "trafficMode": "L1Mode", + "fiberConnectionMode": "dual", + "frequencyCtrl": "XR", + "constellationFrequency": 193100000, + "operatingFrequency": 193074500, + "ncoFrequency": 193074500, + "modulation": "16QAM", + "capacity": 100, + "clientPortMode": "ethernet", + "baudRate": 32, + "maxAllowedDSCs": 4, + "txPowerTargetPerDsc": -6.4, + "endpoints": [ + { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:0B:F8:00:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0", + "portSourceMAC": "8C:23:5E:E9:72:1C", + "portDescr": "et-1/0/0:0" + }, + "moduleIf": { + "moduleId": "153a21fc-1a30-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:02", + "moduleSerialNumber": "12345678901", + "moduleCurrentRole": "Leaf", + "moduleClientIfColId": 1, + "moduleClientIfAid": "XR T1", + "moduleClientIfPortSpeed": 100 + } + }, + { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:0B:F8:00:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/1:0", + "portSourceMAC": "B9:0B:80:0E:0B:70", + "portDescr": "et-1/0/1:0" + }, + "moduleIf": { + "moduleId": "153a21fc-1a30-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:02", + "moduleSerialNumber": "12345678901", + "moduleCurrentRole": "Leaf", + "moduleClientIfColId": 2, + "moduleClientIfAid": "XR T2", + "moduleClientIfPortSpeed": 100 + } + } + ] + } + }, + { + "discoveredTime": "2022-04-05T14:32Z", + "module": { + "moduleId": "23ffd75e-1a30-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:02", + "moduleSerialNumber": "12345678902", + "configuredRole": "Auto", + "currentRole": "Leaf", + "roleStatus": "Ready", + "trafficMode": "L1Mode", + "frequencyCtrl": "XR", + "fiberConnectionMode": "dual", + "constellationFrequency": 193100000, + "operatingFrequency": 193074500, + "ncoFrequency": 193074500, + "modulation": "16QAM", + "capacity": 100, + "clientPortMode": "ethernet", + "baudRate": 32, + "maxAllowedDSCs": 4, + "txPowerTargetPerDsc": -6.4, + "endpoints": [ + { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:99:F8:2c:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0", + "portSourceMAC": "da:3d:c2:4c:55:40", + "portDescr": "et-1/0/0:0" + }, + "moduleIf": { + "moduleId": "23ffd75e-1a30-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:02", + "moduleSerialNumber": "12345678902", + "moduleCurrentRole": "Leaf", + "moduleClientIfColId": 2, + "moduleClientIfAid": "XR T1", + "moduleClientIfPortSpeed": 100 + } + } + ] + } + } + ], + "controlLinks": [ + { + "sourceModuleId": "18e47620-8848-4c7e-710f-05c668478c57", + "destinationModuleId": "153a21fc-1a30-11ec-9621-0242ac130002", + "conState": "Active", + "lastConStateChange": 1628084981 + }, + { + "sourceModuleId": "153a21fc-1a30-11ec-9621-0242ac130002", + "destinationModuleId": "18e47620-8848-4c7e-710f-05c668478c57", + "conState": "Active", + "lastConStateChange": 1628084981 + }, + { + "sourceModuleId": "18e47620-8848-4c7e-710f-05c668478c57", + "destinationModuleId": "23ffd75e-1a30-11ec-9621-0242ac130002", + "conState": "Active", + "lastConStateChange": 1628081381 + }, + { + "sourceModuleId": "23ffd75e-1a30-11ec-9621-0242ac130002", + "destinationModuleId": "18e47620-8848-4c7e-710f-05c668478c57", + "conState": "Active", + "lastConStateChange": 1628081381 + } + ], + "availableServices": [ + { + "type": "100G", + "maximum": 4, + "available": 2, + "used": 2 + }, + { + "type": "75G", + "maximum": 4, + "available": 0, + "used": 0 + }, + { + "type": "50G", + "maximum": 8, + "available": 0, + "used": 0 + }, + { + "type": "25G", + "maximum": 16, + "available": 0, + "used": 0 + } + ] + }, + "hub": { + "href": "/networks/5f8c47b4-c02a-6242-260c-185dd04b8faf/hub/80da9300-8e6d-49d6-890f-c6436188b0fb", + "rt": [ + "cm.xr-network.hub" + ], + "id": "80da9300-8e6d-49d6-890f-c6436188b0fb", + "parentId": "5f8c47b4-c02a-6242-260c-185dd04b8faf", + "config": { + "selector": { + "hostPortSelector": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/1:2" + } + }, + "module": { + "trafficMode": "L1Mode", + "fiberConnectionMode": "dual", + "maxAllowedDSCs": 16 + } + }, + "state": { + "lifecycleState": "configured", + "module": { + "moduleId": "18e47620-8848-4c7e-710f-05c668478c57", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:00", + "moduleSerialNumber": "12345678900", + "configuredRole": "Auto", + "currentRole": "hub", + "roleStatus": "Ready", + "trafficMode": "L1Mode", + "fiberConnectionMode": "dual", + "frequencyCtrl": "XR", + "constellationFrequency": 193100000, + "operatingFrequency": 193100000, + "ncoFrequency": 193100000, + "modulation": "16QAM", + "capacity": 400, + "clientPortMode": "ethernet", + "baudRate": 32, + "maxAllowedDSCs": 16, + "txPowerTargetPerDsc": -6.4 + }, + "endpoints": [ + { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0", + "portSourceMAC": "da:3d:c2:4c:55:40", + "portDescr": "et-1/0/0:0" + }, + "moduleIf": { + "moduleId": "18e47620-8848-4c7e-710f-05c668478c57", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:00", + "moduleSerialNumber": "12345678900", + "moduleCurrentRole": "hub", + "moduleClientIfColId": 1, + "moduleClientIfAid": "XR T1", + "moduleClientIfPortSpeed": 100 + } + }, + { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/1:0", + "portSourceMAC": "04:34:D6:88:A8:CB", + "portDescr": "et-1/0/1:0" + }, + "moduleIf": { + "moduleId": "18e47620-8848-4c7e-710f-05c668478c57", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:00", + "moduleSerialNumber": "12345678900", + "moduleCurrentRole": "hub", + "moduleClientIfColId": 2, + "moduleClientIfAid": "XR T2", + "moduleClientIfPortSpeed": 100 + } + } + ] + } + }, + "leafModules": [ + { + "href": "/networks/5f8c47b4-c02a-6242-260c-185dd04b8faf/leafModules/0f4d67fe-02aa-44ec-a5d8-4c7a71b240cb", + "rt": [ + "cm.xr-network.hub" + ], + "id": "0f4d67fe-02aa-44ec-a5d8-4c7a71b240cb", + "parentId": "5f8c47b4-c02a-6242-260c-185dd04b8faf", + "config": { + "selector": { + "hostPortSelector": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:0B:F8:00:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0" + } + }, + "module": { + "trafficMode": "L1Mode", + "fiberConnectionMode": "dual" + } + }, + "state": { + "lifecycleState": "configured", + "module": { + "moduleId": "153a21fc-1a30-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:02", + "moduleSerialNumber": "12345678901", + "configuredRole": "Auto", + "currentRole": "Leaf", + "roleStatus": "Ready", + "trafficMode": "L1Mode", + "fiberConnectionMode": "dual", + "frequencyCtrl": "XR", + "constellationFrequency": 193100000, + "operatingFrequency": 193074500, + "ncoFrequency": 193074500, + "modulation": "16QAM", + "capacity": 100, + "clientPortMode": "ethernet", + "baudRate": 32, + "maxAllowedDSCs": 4, + "txPowerTargetPerDsc": -6.4 + }, + "endpoints": [ + { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:0B:F8:00:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0", + "portSourceMAC": "8C:23:5E:E9:72:1C", + "portDescr": "et-1/0/0:0" + }, + "moduleIf": { + "moduleId": "153a21fc-1a30-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:02", + "moduleSerialNumber": "12345678901", + "moduleCurrentRole": "Leaf", + "moduleClientIfColId": 1, + "moduleClientIfAid": "XR T1", + "moduleClientIfPortSpeed": 100 + } + }, + { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:0B:F8:00:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/1:0", + "portSourceMAC": "B9:0B:80:0E:0B:70", + "portDescr": "et-1/0/1:0" + }, + "moduleIf": { + "moduleId": "153a21fc-1a30-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:02", + "moduleSerialNumber": "12345678901", + "moduleCurrentRole": "Leaf", + "moduleClientIfColId": 2, + "moduleClientIfAid": "XR T2", + "moduleClientIfPortSpeed": 100 + } + } + ] + } + }, + { + "href": "/networks/5f8c47b4-c02a-6242-260c-185dd04b8faf/leafModules/0a6cd54a-7767-43b9-915b-0ccc643412b9", + "rt": [ + "cm.xr-network.hub" + ], + "id": "0a6cd54a-7767-43b9-915b-0ccc643412b9", + "parentId": "5f8c47b4-c02a-6242-260c-185dd04b8faf", + "config": { + "selector": { + "hostPortSelector": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:99:F8:2c:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0" + } + }, + "module": { + "trafficMode": "L1Mode", + "fiberConnectionMode": "dual" + } + }, + "state": { + "lifecycleState": "configured", + "module": { + "moduleId": "23ffd75e-1a30-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:02", + "moduleSerialNumber": "12345678902", + "configuredRole": "Auto", + "currentRole": "Leaf", + "roleStatus": "Ready", + "trafficMode": "L1Mode", + "frequencyCtrl": "XR", + "fiberConnectionMode": "dual", + "constellationFrequency": 193100000, + "operatingFrequency": 193074500, + "ncoFrequency": 193074500, + "modulation": "16QAM", + "capacity": 100, + "clientPortMode": "ethernet", + "baudRate": 32, + "maxAllowedDSCs": 4, + "txPowerTargetPerDsc": -6.4 + }, + "endpoints": [ + { + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:99:F8:2c:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0", + "portSourceMAC": "da:3d:c2:4c:55:40", + "portDescr": "et-1/0/0:0" + }, + "moduleIf": { + "moduleId": "23ffd75e-1a30-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:02", + "moduleSerialNumber": "12345678902", + "moduleCurrentRole": "Leaf", + "moduleClientIfColId": 2, + "moduleClientIfAid": "XR T1", + "moduleClientIfPortSpeed": 100 + } + } + ] + } + } + ] + }, + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "config": { + "$ref": "#/components/schemas/cm.xr-network.config" + }, + "state": { + "$ref": "#/components/schemas/cm.xr-network.state" + }, + "hubModule": { + "$ref": "#/components/schemas/cm.xr-network.hubModule" + }, + "leafModules": { + "$ref": "#/components/schemas/cm.xr-network.leafModules" + }, + "reachableModules": { + "$ref": "#/components/schemas/cm.xr-network.reachableModules" + } + }, + "type": "object" + }, + "cm.xr-network.config": { + "additionalProperties": false, + "description": "Definition of xr-network configurable parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.xr-network.parameters.name" + }, + "constellationFrequency": { + "$ref": "#/components/schemas/cm.xr-network.parameters.constellationFrequency" + }, + "modulation": { + "$ref": "#/components/schemas/cm.xr-network.parameters.modulation" + } + }, + "type": "object" + }, + "cm.xr-network.state": { + "description": "Definition of constellation state", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.xr-network.parameters.name" + }, + "constellationFrequency": { + "$ref": "#/components/schemas/xr.carrier.constellationFrequency" + }, + "modulation": { + "$ref": "#/components/schemas/xr.carrier.modulation" + }, + "lifecycleState": { + "$ref": "#/components/schemas/cm.xr-network.parameters.lifecycleState" + }, + "lifecycleStateCause": { + "$ref": "#/components/schemas/cm.parameters.lifecycleStateCause" + }, + "controlLinks": { + "$ref": "#/components/schemas/cm.xr-network.state.controlLinks" + }, + "availableServices": { + "$ref": "#/components/schemas/cm.xr-network.state.availableServices" + } + }, + "type": "object" + }, + "cm.xr-network.state.controlLink": { + "description": "Definition of constellation control link parameters", + "properties": { + "sourceModuleId": { + "$ref": "#/components/schemas/xr.controlplane.neighbor.sourceModuleId" + }, + "destinationModuleId": { + "$ref": "#/components/schemas/xr.controlplane.neighbor.destinationModuleId" + }, + "conState": { + "$ref": "#/components/schemas/xr.controlplane.neighbor.conState" + }, + "lastConStateChange": { + "$ref": "#/components/schemas/xr.controlplane.neighbor.lastConStateChange" + } + }, + "type": "object" + }, + "cm.xr-network.state.controlLinks": { + "description": "List of constellation control links", + "items": { + "$ref": "#/components/schemas/cm.xr-network.state.controlLink" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "controlLinks" + } + }, + "cm.xr-network.state.availableService": { + "description": "Possible, used and available services on the constellation", + "properties": { + "type": { + "$ref": "#/components/schemas/cm.xr-network.availableService.parameters.type" + }, + "maximum": { + "$ref": "#/components/schemas/cm.xr-network.availableService.parameters.maximum" + }, + "available": { + "$ref": "#/components/schemas/cm.xr-network.availableService.parameters.available" + }, + "used": { + "$ref": "#/components/schemas/cm.xr-network.availableService.parameters.used" + } + }, + "type": "object" + }, + "cm.xr-network.state.availableServices": { + "description": "List of possible and configured services over the constellation", + "items": { + "$ref": "#/components/schemas/cm.xr-network.state.availableService" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "availableServices" + } + }, + "cm.xr-network.parameters.name": { + "description": "User defined xr-network name", + "maxLength": 64, + "title": "Name", + "type": "string", + "uniqueItems": true, + "x-oapi-codegen-extra-tags": { + "bson": "name" + } + }, + "cm.xr-network.parameters.constellationFrequency": { + "description": "Carrier center frequency of the Hub module within the constellation (applied to Hub and leaf modules).", + "maximum": 196100000, + "minimum": 191000000, + "title": "Frequency", + "type": "integer", + "x-unit": "MHz", + "x-oapi-codegen-extra-tags": { + "bson": "constellationFrequency" + } + }, + "cm.xr-network.parameters.modulation": { + "description": "Constellation carrier signal mdoulation (applied to Hub and leaf modules).\nPossible values: '16QAM', 'QPSK' ' 8QAM'\n", + "enum": [ + "16QAM", + "QPSK", + "8QAM" + ], + "title": "Modulation", + "type": "string", + "x-enum-varnames": [ + "16QAM", + "QPSK", + "8QAM" + ], + "x-oapi-codegen-extra-tags": { + "bson": "modulation" + } + }, + "cm.xr-network.parameters.lifecycleState": { + "description": "Provides the configuration status of an object.\nPossible values:\n- 'pendingConfiguration': This state occurs when one of the xr-network modules is pending configuration or pending deletion.\n- 'configured': This state occurs when all xr-network modules are configured. \n- 'configurationFailed': This state may occur when at least a configuration of a module from this xr-network failed or timeout.\n- 'pendingDeletion': This state may occur when a request to delete this xr-network is being processed.\n- 'deletionFailed': This state may occur when at least a removal of a module from this xr-network failed or timeout.\n- 'networkConflict': This state may occur when there is a conflict in a xr-network module configuration.\n- 'deleted': This state occurs when a xr-network is removed.\n", + "enum": [ + "pendingConfiguration", + "configured", + "configurationFailed", + "pendingDeletion", + "deletionFailed", + "networkConflict", + "deleted" + ], + "readOnly": true, + "title": "Lifecycle State", + "type": "string", + "x-enum-varnames": [ + "Pending configuration", + "Configured", + "Configuration failed", + "Pending deletion", + "Deletion failed", + "Network conflict", + "Deleted" + ], + "x-oapi-codegen-extra-tags": { + "bson": "lifecycleState" + } + }, + "cm.xr-network.availableService.parameters.type": { + "description": "Represents the bandwidth of the possible services in the hub module\nPossible values:\n- 400G\n- 100G\n- 75G\n- 50G\n- 25G\n", + "enum": [ + "100G", + "75G", + "50G", + "25G" + ], + "title": "Bandwidth", + "type": "string", + "x-enum-varnames": [ + "100G", + "75G", + "50G", + "25G" + ], + "x-oapi-codegen-extra-tags": { + "bson": "type" + } + }, + "cm.xr-network.availableService.parameters.maximum": { + "description": "Number of maximum services of the above type that can exist in the constellation.", + "title": "Maximum", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "maximum" + } + }, + "cm.xr-network.availableService.parameters.available": { + "description": "Number of available services of the above type that can be configured in the constellation taking in account the existing hub and leaf modules available resources.", + "title": "Available", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "available" + } + }, + "cm.xr-network.availableService.parameters.used": { + "description": "Number of maximum services of the above type that exist in the constellation.", + "title": "Used", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "used" + } + }, + "cm.xr-network.createRequest": { + "additionalProperties": false, + "description": "Object used in the request body of POST requests in /xr-networks endpoint.\nContains the xr-network, hub and leaf module configuration parameters.\n", + "properties": { + "config": { + "$ref": "#/components/schemas/cm.xr-network.create" + }, + "hubModule": { + "$ref": "#/components/schemas/cm.xr-network.node.create" + }, + "leafModules": { + "items": { + "$ref": "#/components/schemas/cm.xr-network.node.create" + }, + "type": "array" + } + }, + "required": [ + "config", + "hubModule" + ], + "type": "object" + }, + "cm.xr-network.create": { + "additionalProperties": false, + "description": "Definition of xr-network configurable parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.xr-network.parameters.name" + }, + "constellationFrequency": { + "$ref": "#/components/schemas/cm.xr-network.parameters.constellationFrequency" + }, + "modulation": { + "$ref": "#/components/schemas/cm.xr-network.parameters.modulation" + } + }, + "required": [ + "constellationFrequency", + "modulation", + "name" + ], + "type": "object" + }, + "cm.xr-network.update": { + "additionalProperties": false, + "description": "Definition of xr-network editable parameters", + "minProperties": 1, + "properties": { + "name": { + "$ref": "#/components/schemas/cm.xr-network.parameters.name" + }, + "constellationFrequency": { + "$ref": "#/components/schemas/cm.xr-network.parameters.constellationFrequency" + }, + "modulation": { + "$ref": "#/components/schemas/cm.xr-network.parameters.modulation" + } + }, + "type": "object" + }, + "cm.xr-network.hubModule": { + "$ref": "#/components/schemas/cm.xr-network.node" + }, + "cm.xr-network.leafModule": { + "$ref": "#/components/schemas/cm.xr-network.node" + }, + "cm.xr-network.leafModules": { + "description": "List of network connection endpoints", + "items": { + "$ref": "#/components/schemas/cm.xr-network.leafModule" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "leafModules" + } + }, + "cm.xr-network.reachableModule": { + "$ref": "#/components/schemas/cm.xr-network.node" + }, + "cm.xr-network.reachableModules": { + "description": "List of reachable modules of this network", + "items": { + "$ref": "#/components/schemas/cm.xr-network.reachableModule" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "reachableModules" + } + }, + "cm.xr-network.node": { + "description": "Definition of xr-network module object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "config": { + "$ref": "#/components/schemas/cm.xr-network.node.config" + }, + "state": { + "$ref": "#/components/schemas/cm.xr-network.node.state" + } + } + }, + "cm.xr-network.node.config": { + "additionalProperties": false, + "description": "Definition of constellation hub and leaf module configurable parameters", + "properties": { + "selector": { + "$ref": "#/components/schemas/cm.selectors.moduleSelector" + }, + "module": { + "$ref": "#/components/schemas/cm.xr-network.node.config.module" + } + }, + "type": "object" + }, + "cm.xr-network.node.config.module": { + "additionalProperties": false, + "description": "Definition of constellation hub and leaf module configurable parameters", + "properties": { + "trafficMode": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.trafficMode" + }, + "fiberConnectionMode": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.fiberConnectionMode" + }, + "maxAllowedDSCs": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.maxAllowedDSCs" + }, + "txPowerTargetPerDsc": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.txPowerTargetPerDsc" + } + }, + "type": "object" + }, + "cm.xr-network.node.state": { + "description": "Definition of constellation hub and leaf module state object", + "properties": { + "lifecycleState": { + "$ref": "#/components/schemas/cm.xr-network.node.parameters.lifecycleState" + }, + "lifecycleStateCause": { + "$ref": "#/components/schemas/cm.parameters.lifecycleStateCause" + }, + "discoveredTime": { + "$ref": "#/components/schemas/xr.discovered.neighbor.discoveredTime" + }, + "module": { + "$ref": "#/components/schemas/cm.xr-network.node.state.module" + }, + "endpoints": { + "$ref": "#/components/schemas/cm.xr-network.node.state.endpoints" + } + } + }, + "cm.xr-network.node.state.module": { + "description": "Definition of constellation hub and leaf module state parameters", + "properties": { + "moduleId": { + "$ref": "#/components/schemas/xr.device.di" + }, + "moduleName": { + "$ref": "#/components/schemas/xr.device.n" + }, + "macAddress": { + "$ref": "#/components/schemas/xr.platform.macAddress" + }, + "serialNumber": { + "$ref": "#/components/schemas/xr.platform.mnsel" + }, + "configuredRole": { + "$ref": "#/components/schemas/xr.configuration.configuredRole" + }, + "currentRole": { + "$ref": "#/components/schemas/xr.configuration.currentRole" + }, + "roleStatus": { + "$ref": "#/components/schemas/xr.configuration.roleStatus" + }, + "trafficMode": { + "$ref": "#/components/schemas/xr.configuration.trafficMode" + }, + "fiberConnectionMode": { + "$ref": "#/components/schemas/xr.configuration.fiberConnectionMode" + }, + "frequencyCtrl": { + "$ref": "#/components/schemas/xr.carrier.frequencyCtrl" + }, + "constellationFrequency": { + "$ref": "#/components/schemas/xr.carrier.constellationFrequency" + }, + "operatingFrequency": { + "$ref": "#/components/schemas/xr.carrier.operatingFrequency" + }, + "ncoFrequency": { + "$ref": "#/components/schemas/xr.carrier.ncoFrequency" + }, + "modulation": { + "$ref": "#/components/schemas/xr.carrier.modulation" + }, + "capacity": { + "$ref": "#/components/schemas/xr.carrier.capacity" + }, + "clientPortMode": { + "$ref": "#/components/schemas/xr.carrier.clientPortMode" + }, + "baudRate": { + "$ref": "#/components/schemas/xr.carrier.baudRate" + }, + "maxAllowedDSCs": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.maxAllowedDSCs" + }, + "txPowerTargetPerDsc": { + "$ref": "#/components/schemas/xr.carrier.txPowerTargetPerDsc" + } + }, + "type": "object" + }, + "cm.xr-network.node.state.endpoint": { + "description": "Result of module association", + "properties": { + "hostPort": { + "$ref": "#/components/schemas/cm.interface.hostPort" + }, + "moduleIf": { + "$ref": "#/components/schemas/cm.xr-network.node.state.endpoint.moduleIf" + } + }, + "type": "object" + }, + "cm.xr-network.node.state.endpoint.moduleIf": { + "description": "Definition of selector", + "properties": { + "clientIfColId": { + "$ref": "#/components/schemas/xr.ethernet.colId" + }, + "clientIfAid": { + "$ref": "#/components/schemas/xr.ethernet.aid" + }, + "clientIfPortSpeed": { + "$ref": "#/components/schemas/xr.ethernet.portSpeed" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "moduleIf" + } + }, + "cm.xr-network.node.state.endpoints": { + "description": "List of module client interfaces", + "items": { + "$ref": "#/components/schemas/cm.xr-network.node.state.endpoint" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "endpoints" + } + }, + "cm.xr-network.node.module.parameters.trafficMode": { + "description": "Possible Values:\n- L1Mode: Allows transparent transport of client traffic between XR hub and leaf module client ports\n- VTIMode: Allows transport of VLAN flows between an XR hub module client port to 1 or more XR leaf module client ports\n", + "enum": [ + "L1Mode", + "VTIMode" + ], + "title": "Traffic Mode", + "type": "string", + "x-enum-varnames": [ + "L1 mode", + "VTI mode" + ], + "x-oapi-codegen-extra-tags": { + "bson": "trafficMode" + } + }, + "cm.xr-network.node.module.parameters.fiberConnectionMode": { + "description": "Possible Values:\n- single: only one fiber is connected for by-directional traffic\n- dual: separate fibers for transmit and receive\n", + "enum": [ + "single", + "dual" + ], + "title": "Fiber Mode", + "type": "string", + "x-enum-varnames": [ + "Single", + "Dual" + ], + "x-oapi-codegen-extra-tags": { + "bson": "fiberConnectionMode" + } + }, + "cm.xr-network.node.module.parameters.maxAllowedDSCs": { + "description": "Number of digital subcarriers allowed to be used", + "enum": [ + 2, + 4, + 8, + 16 + ], + "title": "Max DSCs", + "type": "integer", + "x-enum-varnames": [ + "2", + "4", + "8", + "16" + ], + "x-oapi-codegen-extra-tags": { + "bson": "maxAllowedDSCs" + } + }, + "cm.xr-network.node.module.parameters.txPowerTargetPerDsc": { + "default": -100, + "description": "Target power per DSC.\nApplicable for all DSCs on the Carrier.\nValue \"-100 us\" used for \"Not configured\".\n", + "format": "double", + "maximum": 0, + "minimum": -100, + "multipleOf": 0.1, + "title": "Target power per DSC", + "type": "number", + "x-unit": "dBm", + "x-oapi-codegen-extra-tags": { + "bson": "txPowerTargetPerDsc" + } + }, + "cm.xr-network.node.parameters.lifecycleState": { + "description": "Provides the configuration status of a node within a network.\nPossible values:\n- 'pendingConfiguration': This state occurs when the module xr-network configuration is required.\n- 'configured': This state occurs when the module is configured in the network according to its xr-network requirements.\n- 'configurationFailed': This state occurs when the module xr-network configuration failed or timeout.\n- 'pendingDeletion': This state occurs when the module shall be removed from the current xr-network.\n- 'deletionFailed': This state occurs when the configuration to remove the module from the xr-network failed or timeout.\n- 'networkConflict': The current module configuration does not match the request or was already a member of other existing xr-network.\n- 'deleted': This state occurs when the current module is removed from the xr-network.\n", + "enum": [ + "pendingConfiguration", + "configured", + "configurationFailed", + "pendingDeletion", + "deletionFailed", + "networkConflict", + "deleted" + ], + "readOnly": true, + "title": "Lifecycle State", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "lifecycleState" + } + }, + "cm.xr-network.node.create": { + "additionalProperties": false, + "description": "Definition of constellation hub and leaf module creation parameters", + "properties": { + "selector": { + "$ref": "#/components/schemas/cm.selectors.moduleSelector" + }, + "module": { + "$ref": "#/components/schemas/cm.xr-network.node.module.create" + } + }, + "required": [ + "module", + "selector" + ], + "type": "object" + }, + "cm.xr-network.node.module.create": { + "additionalProperties": false, + "description": "Definition of constellation hub and leaf module creation parameters", + "properties": { + "trafficMode": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.trafficMode" + }, + "fiberConnectionMode": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.fiberConnectionMode" + }, + "maxAllowedDSCs": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.maxAllowedDSCs" + }, + "txPowerTargetPerDsc": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.txPowerTargetPerDsc" + } + }, + "required": [ + "trafficMode" + ], + "type": "object" + }, + "cm.xr-network.node.update": { + "properties": { + "module": { + "$ref": "#/components/schemas/cm.xr-network.node.module.update" + } + } + }, + "cm.xr-network.node.module.update": { + "additionalProperties": false, + "description": "Definition of constellation hub and leaf module editable parameters", + "minProperties": 1, + "properties": { + "trafficMode": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.trafficMode" + }, + "fiberConnectionMode": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.fiberConnectionMode" + }, + "maxAllowedDSCs": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.maxAllowedDSCs" + }, + "txPowerTargetPerDsc": { + "$ref": "#/components/schemas/cm.xr-network.node.module.parameters.txPowerTargetPerDsc" + } + }, + "type": "object" + }, + "cm.transport-capacity": { + "description": "Definition of transport-capacity object", + "example": { + "href": "/transport-capacities/6ce3aa86-2685-44b0-9f86-49e6a6c991a8", + "rt": [ + "cm.transport-capacity" + ], + "id": "6ce3aa86-2685-44b0-9f86-49e6a6c991a8", + "config": { + "name": "Transport capacity service example", + "capacityMode": "dedicatedDownlinkSymmetric" + }, + "state": { + "name": "Transport capacity service example", + "capacityMode": "dedicatedDownlinkSymmetric", + "lifecycleState": "configured", + "labels": [] + }, + "endpoints": [ + { + "href": "/transport-capacities/6ce3aa86-2685-44b0-9f86-49e6a6c991a8/endpoints/4511bc3d-617b-4757-9f4c-41bc7d8912eb", + "rt": [ + "cm.transport-capacity.hub" + ], + "id": "4511bc3d-617b-4757-9f4c-41bc7d8912eb", + "parentId": "6ce3aa86-2685-44b0-9f86-49e6a6c991a8", + "config": { + "capacity": 100, + "selector": { + "hostPortSelector": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/1:2" + } + } + }, + "state": { + "capacity": 100, + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0", + "portSourceMAC": "da:3d:c2:4c:55:40", + "portDescr": "et-1/0/0:0" + }, + "moduleIf": { + "moduleId": "18e47620-8848-4c7e-710f-05c668478c57", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:00", + "moduleSerialNumber": "12345678900", + "moduleCurrentRole": "hub", + "moduleClientIfColId": 1, + "moduleClientIfAid": "XR T1", + "moduleClientIfPortSpeed": 100 + }, + "lifecycleState": "configured", + "labels": [] + } + }, + { + "href": "/transport-capacities/6ce3aa86-2685-44b0-9f86-49e6a6c991a8/endpoints/35e92b25-a682-4805-964a-6ce893a7aa56", + "rt": [ + "cm.transport-capacity.leaf" + ], + "id": "35e92b25-a682-4805-964a-6ce893a7aa56", + "parentId": "6ce3aa86-2685-44b0-9f86-49e6a6c991a8", + "config": { + "capacity": 100, + "selector": { + "hostPortSelector": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:99:F8:2c:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0" + } + } + }, + "state": { + "capacity": 100, + "hostPort": { + "chassisIdSubtype": "macAddress", + "chassisId": "00:99:F8:2c:01:01", + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0", + "portSourceMAC": "da:3d:c2:4c:55:40", + "portDescr": "et-1/0/0:0" + }, + "moduleIf": { + "moduleId": "23ffd75e-1a30-11ec-9621-0242ac130002", + "moduleName": "XR Device", + "moduleMAC": "46:00:84:A0:0C:02", + "moduleSerialNumber": "12345678902", + "moduleCurrentRole": "Leaf", + "moduleClientIfColId": 2, + "moduleClientIfAid": "XR T1", + "moduleClientIfPortSpeed": 100 + }, + "lifecycleState": "configured", + "labels": [] + } + } + ], + "capacity-links": [ + { + "href": "/capacity-links/d9580972-7a72-43e7-91d9-5473251040ca", + "rt": [ + "cm.capacity-link" + ], + "id": "d9580972-7a72-43e7-91d9-5473251040ca", + "parentId": "6ce3aa86-2685-44b0-9f86-49e6a6c991a8", + "config": { + "directionality": "biDir", + "hubModule": { + "moduleId": "18e47620-8848-4c7e-710f-05c668478c57", + "dscgShared": false, + "dscs": [ + 7, + 5, + 3, + 1 + ] + }, + "leafModule": { + "moduleId": "23ffd75e-1a30-11ec-9621-0242ac130002", + "dscgShared": false, + "dscs": [ + 3, + 1, + 2, + 4 + ] + } + }, + "state": { + "directionality": "biDir", + "hubModule": { + "moduleId": "18e47620-8848-4c7e-710f-05c668478c57", + "dscgId": "552d4e35-c7fc-4fdf-bb31-1688f926582e", + "dscgShared": false, + "dscs": [ + 7, + 5, + 3, + 1 + ], + "lifecycleState": "configured" + }, + "leafModule": { + "moduleId": "23ffd75e-1a30-11ec-9621-0242ac130002", + "dscgId": "831884a0-fac7-4f1a-8c0d-74f82498921c", + "dscgShared": false, + "dscs": [ + 3, + 1, + 2, + 4 + ], + "lifecycleState": "configured" + } + } + } + ] + }, + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "config": { + "$ref": "#/components/schemas/cm.transport-capacity.config" + }, + "state": { + "$ref": "#/components/schemas/cm.transport-capacity.state" + }, + "endpoints": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoints" + }, + "capacityLinks": { + "$ref": "#/components/schemas/cm.capacity-links" + } + }, + "type": "object" + }, + "cm.transport-capacity.config": { + "additionalProperties": false, + "description": "Definition of transport-capacity configurable parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "capacityMode": { + "$ref": "#/components/schemas/cm.transport-capacity.parameters.capacityMode" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.transport-capacity.state": { + "description": "Definition of transport-capacity state parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "createdBy": { + "$ref": "#/components/schemas/cm.transport-capacity.parameters.createdBy" + }, + "capacityMode": { + "$ref": "#/components/schemas/cm.transport-capacity.parameters.capacityMode" + }, + "lifecycleState": { + "$ref": "#/components/schemas/cm.transport-capacity.parameters.lifecycleState" + }, + "lifecycleStateCause": { + "$ref": "#/components/schemas/cm.parameters.lifecycleStateCause" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.transport-capacity.parameters.createdBy": { + "description": "Indicates whether transport-capacity orchestration should be done through CM interface or through Host interface\nPossible values: 'host', 'cm'\n- 'host': Created through host interface and discovered by CM\n Cannot be edited or deleted through CM interface\n- 'cm': Created through CM interface\n Can be edited or deleted through CM interface\n", + "enum": [ + "host", + "cm" + ], + "readOnly": true, + "title": "Created by", + "type": "string", + "x-enum-varnames": [ + "Host", + "IPM" + ], + "x-oapi-codegen-extra-tags": { + "bson": "createdBy" + } + }, + "cm.transport-capacity.parameters.capacityMode": { + "description": "Defines the traffic characteristics of the transport capacity service.\nPossible values:\n- 'portMode': Provides transparent transport between XR hub and leaf modules\n- 'dedicatedDownlinkSymmetric': VLAN based P2P bidirectional flow between Hub and a Leaf modules with symmetric upstream and downstream bandwidths.\n- 'dedicatedDownlinkAsymmetric': VLAN based P2P bidirectional flow between Hub and a Leaf modules with asymmetric upstream and downstream bandwidths.\n- 'sharedDownlink': VLAN based bidirectional flow between Hub and Leaf modules where downstream traffic (hub to leaf) can be shared by multiple Leaf modules (as in a P2MP).\n", + "enum": [ + "portMode", + "dedicatedDownlinkSymmetric", + "dedicatedDownlinkAsymmetric", + "sharedDownlink" + ], + "readOnly": true, + "title": "Capacity Mode", + "type": "string", + "x-enum-varnames": [ + "Port mode", + "Dedicated downlink Symmetric", + "Dedicated downlink asymmetric", + "Shared downlink" + ], + "x-oapi-codegen-extra-tags": { + "bson": "capacityMode" + } + }, + "cm.transport-capacity.parameters.lifecycleState": { + "description": "Provides the configuration status of a transport capacity connection (i.e., the aggregated status of its endpoints).\nPossible values:\n- 'pendingConfiguration': This state occurs when one of the transport capacity connection modules is pending configuration or pending deletion.\n- 'configured': This state occurs when all transport capacity connection modules are configured.\n- 'configurationFailed': This state may occur when at least a configuration of a module from this transport capacity connection failed or timeout.\n- 'pendingDeletion': This state may occur when a request to delete this transport capacity connection is being processed.\n- 'deletionFailed': This state may occur when at least a removal of a module from this transport capacity connection failed or timeout.\n- 'networkConflict': This state may occur when there is a conflict in a transport capacity connection module configuration.\n- 'deleted': This state occurs when a transport capacity connection is removed.\n", + "enum": [ + "pendingConfiguration", + "configured", + "configurationFailed", + "pendingDeletion", + "deletionFailed", + "networkConflict", + "deleted" + ], + "readOnly": true, + "title": "Lifecycle State", + "type": "string", + "x-enum-varnames": [ + "Pending configuration", + "Configured", + "Configuration failed", + "Pending deletion", + "Deletion failed", + "Network conflict", + "Deleted" + ], + "x-oapi-codegen-extra-tags": { + "bson": "lifecycleState" + } + }, + "cm.transport-capacity.createRequest": { + "additionalProperties": false, + "description": "Object used in the request body of POST requests in /transport-capacities endpoint.\nContains configuration parameters for transport-capacity and its ednpoint.\n", + "properties": { + "config": { + "$ref": "#/components/schemas/cm.transport-capacity.create" + }, + "endpoints": { + "items": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoint.create" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": [ + "config", + "endpoints" + ], + "type": "object" + }, + "cm.transport-capacity.create": { + "additionalProperties": false, + "description": "Definition of transport-capacity creation parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "capacityMode": { + "$ref": "#/components/schemas/cm.transport-capacity.parameters.capacityMode" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "required": [ + "capacityMode" + ], + "type": "object" + }, + "cm.transport-capacity.update": { + "additionalProperties": false, + "description": "Definition of transport-capacity editable parameters", + "minProperties": 1, + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.transport-capacity.endpoint": { + "description": "Definition of transport-capacity endpoint object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "config": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoint.config" + }, + "state": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoint.state" + } + } + }, + "cm.transport-capacity.endpoints": { + "items": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoint" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "endpoints" + } + }, + "cm.transport-capacity.endpoint.config": { + "additionalProperties": false, + "description": "Definition of transport-capacity endpoint configurable parameters", + "properties": { + "capacity": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoint.parameters.capacity" + }, + "selector": { + "$ref": "#/components/schemas/cm.selectors.ifSelector" + } + }, + "type": "object" + }, + "cm.transport-capacity.endpoint.state": { + "description": "Definition of transport-capacity endpoint state parameters", + "properties": { + "capacity": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoint.parameters.capacity" + }, + "hostPort": { + "$ref": "#/components/schemas/cm.interface.hostPort" + }, + "moduleIf": { + "$ref": "#/components/schemas/cm.interface.moduleIf" + }, + "lifecycleState": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoint.parameters.lifecycleState" + }, + "lifecycleStateCause": { + "$ref": "#/components/schemas/cm.parameters.lifecycleStateCause" + } + }, + "type": "object" + }, + "cm.transport-capacity.endpoint.parameters.capacity": { + "description": "Client to network capacity of the infrastructure connection dscg", + "title": "Upstream bandwidth", + "type": "integer", + "x-unit": "Gbps", + "x-oapi-codegen-extra-tags": { + "bson": "capacity" + } + }, + "cm.transport-capacity.endpoint.parameters.lifecycleState": { + "description": "Provides the configuration status of a transport capacity endpoint.\nPossible values: \n- 'pendingConfiguration': This state occurs when the module transport capacity connection configuration is required.\n- 'configured': This state occurs when the module is configured in the network according to its transport capacity connection requirements.\n- 'configurationFailed': This state occurs when the module transport capacity connection configuration failed or timeout.\n- 'pendingDeletion': This state occurs when the module shall be removed from the current transport capacity connection.\n- 'deletionFailed': This state occurs when the configuration to remove the module from the transport capacity connection failed or timeout.\n- 'networkConflict': The current module is configured changed and no longer matches the transport capacity connection requirements.\n- 'deleted': This state occurs when the current module is removed from the xr-network.\n", + "enum": [ + "pendingConfiguration", + "configured", + "configurationFailed", + "pendingDeletion", + "deletionFailed", + "networkConflict", + "deleted" + ], + "readOnly": true, + "title": "Lifecycle State", + "type": "string", + "x-enum-varnames": [ + "Pending configuration", + "Configured", + "Configuration failed", + "Pending deletion", + "Deletion failed", + "Network conflict", + "Deleted" + ], + "x-oapi-codegen-extra-tags": { + "bson": "lifecycleState" + } + }, + "cm.transport-capacity.endpoint.create": { + "additionalProperties": false, + "description": "Definition of transport-capacity endpoint creation parameters", + "properties": { + "capacity": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoint.parameters.capacity" + }, + "selector": { + "$ref": "#/components/schemas/cm.selectors.ifSelector" + } + }, + "required": [ + "selector" + ], + "type": "object" + }, + "cm.transport-capacity.endpoint.update": { + "additionalProperties": false, + "description": "Definition of transport-capacity endpoint editable parameters", + "minProperties": 1, + "properties": { + "capacity": { + "$ref": "#/components/schemas/cm.transport-capacity.endpoint.parameters.capacity" + } + }, + "required": [ + "capacity" + ], + "type": "object" + }, + "cm.capacity-link": { + "description": "Definition of capacity-link object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "config": { + "$ref": "#/components/schemas/cm.capacity-link.config" + }, + "state": { + "$ref": "#/components/schemas/cm.capacity-link.state" + } + }, + "type": "object" + }, + "cm.capacity-links": { + "items": { + "$ref": "#/components/schemas/cm.capacity-link" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "capacityLinks" + } + }, + "cm.capacity-link.config": { + "additionalProperties": false, + "description": "Definition of capacity-link configurable parameters", + "properties": { + "directionality": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.directionality" + }, + "hubModule": { + "$ref": "#/components/schemas/cm.capacity-link.config.node" + }, + "leafModule": { + "$ref": "#/components/schemas/cm.capacity-link.config.node" + } + }, + "type": "object" + }, + "cm.capacity-link.config.node": { + "additionalProperties": false, + "description": "Definition of capacity-link hub module configurable parameters.", + "properties": { + "moduleId": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.moduleId" + }, + "dscgShared": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.dscgShared" + }, + "txDSCs": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.txDSCs" + }, + "rxDSCs": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.rxDSCs" + } + }, + "required": [ + "dscgMode", + "dscs", + "moduleId" + ], + "type": "object" + }, + "cm.capacity-link.state": { + "description": "Definition of capacity-link state parameters", + "properties": { + "directionality": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.directionality" + }, + "hubModule": { + "$ref": "#/components/schemas/cm.capacity-link.state.hubModule" + }, + "leafModule": { + "$ref": "#/components/schemas/cm.capacity-link.state.leafModule" + }, + "lifecycleState": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.lifecycleState" + }, + "lifecycleStateCause": { + "$ref": "#/components/schemas/cm.parameters.lifecycleStateCause" + } + }, + "type": "object" + }, + "cm.capacity-link.state.hubModule": { + "additionalProperties": false, + "description": "Definition of capacity-link hub module state parameters.", + "properties": { + "moduleId": { + "$ref": "#/components/schemas/xr.device.di" + }, + "dscgId": { + "$ref": "#/components/schemas/xr.carrier.dscg.id" + }, + "dscgAid": { + "$ref": "#/components/schemas/xr.carrier.dscg.aid" + }, + "dscgShared": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.dscgShared" + }, + "txDSCs": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.txDSCs" + }, + "rxDSCs": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.rxDSCs" + }, + "lifecycleState": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.lifecycleState" + }, + "lifecycleStateCause": { + "$ref": "#/components/schemas/cm.parameters.lifecycleStateCause" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "hubModule" + } + }, + "cm.capacity-link.state.leafModule": { + "additionalProperties": false, + "description": "Definition of capacity-link leaf module state parameters.", + "properties": { + "moduleId": { + "$ref": "#/components/schemas/xr.device.di" + }, + "dscgId": { + "$ref": "#/components/schemas/xr.carrier.dscg.id" + }, + "dscgAid": { + "$ref": "#/components/schemas/xr.carrier.dscg.aid" + }, + "dscgShared": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.dscgShared" + }, + "txDSCs": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.txDSCs" + }, + "rxDSCs": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.rxDSCs" + }, + "lifecycleState": { + "$ref": "#/components/schemas/cm.capacity-link.parameters.lifecycleState" + }, + "lifecycleStateCause": { + "$ref": "#/components/schemas/cm.parameters.lifecycleStateCause" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "leafModule" + } + }, + "cm.capacity-link.parameters.moduleId": { + "description": "Module identifier", + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "title": "ID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "moduleId" + } + }, + "cm.capacity-link.parameters.directionality": { + "description": "Directionality of the capacity-link. \nuniDirUs: Refers to upstream direction from Leaf to Hub. \nuniDirDs: Refers to downstream traffic direction from Hub to Leaf.\n", + "enum": [ + "biDir", + "uniDirUs", + "uniDirDs" + ], + "title": "Directionality", + "type": "string", + "x-enum-varnames": [ + "Bidirectional", + "Unidirectional upstream", + "Unidirectional downstream" + ], + "x-oapi-codegen-extra-tags": { + "bson": "directionality" + } + }, + "cm.capacity-link.parameters.lifecycleState": { + "description": "Provides the configuration status of a capacity-link.\nPossible values:\n- 'pendingConfiguration': This state occurs when the hub or leaf module of the transport capacity connection is pending its DSCG configuration.\n- 'configured': This state occurs when there are matching DSCG configurations in the hub and leaf modules.\n- 'configurationFailed': This state may occur when the hub or leaf module DSCG configurations failed or timeout.\n- 'pendingDeletion': This state may occur when a request to delete a capacity-link is being processed.\n- 'deletionFailed': This state may occur when the configuration to remove a DSCG from the hub or leaf module failed or timeout.\n- 'networkConflict': This state may occur when there is a conflict in the hub or leaf module DSCG configurations.\n- 'deleted': This state occurs when a capacity-link is removed.\n", + "enum": [ + "pendingConfiguration", + "configured", + "configurationFailed", + "pendingDeletion", + "deletionFailed", + "networkConflict", + "deleted" + ], + "readOnly": true, + "title": "Lifecycle State", + "type": "string", + "x-enum-varnames": [ + "Pending configuration", + "Configured", + "Configuration failed", + "Pending deletion", + "Deletion failed", + "Network conflict", + "Deleted" + ], + "x-oapi-codegen-extra-tags": { + "bson": "lifecycleState" + } + }, + "cm.capacity-link.parameters.dscgShared": { + "description": "Indicates whether the dscg can be shared by multiple transport-capacity connection.\n'True' option is only applicable to hub module unidirectional downstream DSCGs\n", + "title": "Shared", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "dscgShared" + } + }, + "cm.capacity-link.parameters.txDSCs": { + "items": { + "type": "integer" + }, + "maxItems": 16, + "minItems": 0, + "type": "array", + "uniqueItems": true, + "x-oapi-codegen-extra-tags": { + "bson": "txDSCs" + } + }, + "cm.capacity-link.parameters.rxDSCs": { + "items": { + "type": "integer" + }, + "maxItems": 16, + "minItems": 0, + "type": "array", + "uniqueItems": true, + "x-oapi-codegen-extra-tags": { + "bson": "rxDSCs" + } + }, + "xr.controlplane.neighbor.sourceModuleId": { + "description": "Represents the source module device identifier of control-link.", + "readOnly": true, + "title": "Device identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "sourceModuleId" + } + }, + "xr.controlplane.neighbor.destinationModuleId": { + "description": "Represents the destimation module device identifier of control-link.", + "readOnly": true, + "title": "Device identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "destinationModuleId" + } + }, + "cm.selectors.moduleSelector": { + "description": "Definition of the parameters provided upon host creation used as matching criteria for discovered hosts", + "maxProperties": 1, + "minProperties": 1, + "properties": { + "moduleSelectorByModuleId": { + "$ref": "#/components/schemas/cm.selector.moduleSelectorByModuleId" + }, + "moduleSelectorByModuleName": { + "$ref": "#/components/schemas/cm.selector.moduleSelectorByModuleName" + }, + "moduleSelectorByModuleMAC": { + "$ref": "#/components/schemas/cm.selector.moduleSelectorByModuleMAC" + }, + "moduleSelectorByModuleSerialNumber": { + "$ref": "#/components/schemas/cm.selector.moduleSelectorByModuleSerialNumber" + }, + "hostPortSelectorByName": { + "$ref": "#/components/schemas/cm.selector.hostPortSelectorByName" + }, + "hostPortSelectorByPortId": { + "$ref": "#/components/schemas/cm.selector.hostPortSelectorByPortId" + }, + "hostPortSelectorBySysName": { + "$ref": "#/components/schemas/cm.selector.hostPortSelectorBySysName" + }, + "hostPortSelectorByPortSourceMAC": { + "$ref": "#/components/schemas/cm.selector.hostPortSelectorByPortSourceMAC" + } + }, + "title": "Host Selector", + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "selector" + } + }, + "cm.selector.moduleSelectorByModuleId": { + "additionalProperties": false, + "description": "Definition of module selector based on module Id information", + "maxProperties": 1, + "minProperties": 1, + "properties": { + "moduleId": { + "$ref": "#/components/schemas/cm.selector.moduleSelector.parameters.moduleId" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "moduleSelectorByModuleId" + } + }, + "cm.selector.moduleSelectorByModuleName": { + "additionalProperties": false, + "description": "Definition of port selector based on module aid information", + "maxProperties": 1, + "minProperties": 1, + "properties": { + "moduleName": { + "$ref": "#/components/schemas/cm.selector.moduleSelector.parameters.moduleName" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "moduleSelectorByModuleName" + } + }, + "cm.selector.moduleSelectorByModuleMAC": { + "additionalProperties": false, + "description": "Definition of module selector based on mac address information", + "maxProperties": 1, + "minProperties": 1, + "properties": { + "moduleMAC": { + "$ref": "#/components/schemas/cm.selector.moduleSelector.parameters.moduleMAC" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "moduleSelectorByModuleMAC" + } + }, + "cm.selector.moduleSelectorByModuleSerialNumber": { + "additionalProperties": false, + "description": "Definition of module selector based on module serial number information", + "maxProperties": 1, + "minProperties": 1, + "properties": { + "moduleSerialNumber": { + "$ref": "#/components/schemas/cm.selector.moduleSelector.parameters.moduleSerialNumber" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "moduleSelectorByModuleSerialNumber" + } + }, + "xr.carrier.dscg.id": { + "description": "DSCG Object identifier", + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "readOnly": true, + "title": "DSCG ID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "dscgId" + } + }, + "cm.subscription": { + "description": "Subscription data", + "properties": { + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "subscriptionId": { + "$ref": "#/components/schemas/cm.subscription.parameters.subscriptionId" + }, + "subscriptionName": { + "$ref": "#/components/schemas/cm.subscription.parameters.subscriptionName" + }, + "notificationChannel": { + "$ref": "#/components/schemas/cm.subscription.notificationChannel" + }, + "subscriptionFilters": { + "$ref": "#/components/schemas/cm.subscription.subscriptionFilters" + }, + "conState": { + "$ref": "#/components/schemas/cm.subscription.parameters.conState" + }, + "lastConnectionTime": { + "$ref": "#/components/schemas/cm.subscription.parameters.lastConnectionTime" + } + }, + "title": "Subscription", + "type": "object" + }, + "cm.subscription.notificationChannel": { + "description": "Definition of subscription notification-channel", + "properties": { + "streamAddress": { + "$ref": "#/components/schemas/cm.subscription.parameters.notificationChannel.streamAddress" + } + }, + "title": "Notification Channel", + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "notificationChannel" + } + }, + "cm.subscription.subscriptionFilters": { + "description": "List of subscription-filters", + "items": { + "$ref": "#/components/schemas/cm.subscription.subscriptionFilter" + }, + "minItems": 1, + "title": "Subscription Filters", + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "subscriptionFilters" + } + }, + "cm.subscription.subscriptionFilter": { + "description": "Definition of subscription-filters", + "properties": { + "requestedNotificationTypes": { + "$ref": "#/components/schemas/cm.subscription.parameters.subscriptionFilter.requestedNotificationTypes" + }, + "requestedResources": { + "$ref": "#/components/schemas/cm.subscription.subscriptionFilter.requestedResources" + } + }, + "title": "Subscription Filter", + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "subscriptionFilter" + } + }, + "cm.subscription.subscriptionFilter.requestedResources": { + "description": "Required resource types to be available in the notification channel with optional filter by resource ids and/or moduleIds", + "items": { + "$ref": "#/components/schemas/cm_subscription_subscriptionFilter_requestedResources_inner" + }, + "minItems": 1, + "title": "Resource Types", + "type": "array", + "uniqueItems": true + }, + "cm.subscription.parameters.subscriptionId": { + "description": "Universally unique identifier (UUID) of a subscription.", + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", + "readOnly": true, + "title": "UUID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "subscriptionId" + } + }, + "cm.subscription.parameters.subscriptionName": { + "description": "User defined subscription name.", + "title": "Name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "subscriptionName" + } + }, + "cm.subscription.parameters.conState": { + "description": "Shows if the subscription is currently active or not", + "enum": [ + "active", + "inactive" + ], + "readOnly": true, + "title": "Connection Status", + "type": "string", + "x-enum-varnames": [ + "Active", + "Inactive" + ], + "x-oapi-codegen-extra-tags": { + "bson": "conState" + } + }, + "cm.subscription.parameters.lastConnectionTime": { + "description": "Timestamp of last connectivity in date-time format pattern according to IETF RFC 3339.\nIf subscription is inactive, this timestamp shows when connectivity was lost.\nIf subscription is active this timestamp shows when connection was established.\n", + "format": "date-time", + "readOnly": true, + "title": "Connection Time", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "lastConnectionTime" + } + }, + "cm.subscription.parameters.notificationChannel.streamAddress": { + "description": "WebSocket URI made available upon subscription creation", + "readOnly": true, + "title": "WebSocket URI", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "streamAddress" + } + }, + "cm.subscription.parameters.subscriptionFilter.requestedNotificationTypes": { + "description": "Required notification types to be available in the notification channel\n- OC: Object Creation\n- OD: Object Deletion\n- AVC: Attribute Value Change\n- ERROR: Error notifications\n", + "items": { + "enum": [ + "OC", + "OD", + "AVC", + "Error" + ], + "type": "string", + "x-enum-varnames": [ + "OC", + "OD", + "AVC", + "Error" + ] + }, + "minItems": 1, + "title": "Notification Types", + "type": "array", + "uniqueItems": true, + "x-oapi-codegen-extra-tags": { + "bson": "requestedNotificationTypes" + } + }, + "cm.subscription.parameters.subscriptionFilter.requestedResources.resourceType": { + "description": "Required resource types to be available in the notification channel\nResource types are identified by the 'rt' link in the resource object\n", + "enum": [ + "cm.device", + "cm.host", + "cm.host.port", + "cm.module", + "cm.module.linePtp", + "cm.module.linePtp.carrier", + "cm.module.linePtp.carrier.dscg", + "cm.module.linePtp.carrier.dsc", + "cm.module.otu", + "cm.module.odu", + "cm.module.ethernetClient", + "cm.module.localConnection", + "cm.transport-capacity", + "cm.transport-capacity.endpoint", + "cm.capacity-link", + "cm.network-connection", + "cm.network-connection.endpoint", + "cm.network-connection.local-connection", + "cm.xr-network", + "cm.xr-network.hubModule", + "cm.xr-network.leafModule", + "cm.xr-network.reachableModule", + "cm.sw.action", + "cm.sw.moduleAction", + "cm.sw.ctrl", + "cm.sw.bank" + ], + "title": "Resource Type", + "type": "string", + "x-enum-varnames": [ + "cm.device", + "cm.host", + "cm.host.port", + "cm.module", + "cm.module.linePtp", + "cm.module.linePtp.carrier", + "cm.module.linePtp.carrier.dscg", + "cm.module.linePtp.carrier.dsc", + "cm.module.otu", + "cm.module.odu", + "cm.module.ethernetClient", + "cm.module.localConnection", + "cm.transport-capacity", + "cm.transport-capacity.endpoint", + "cm.capacity-link", + "cm.network-connection", + "cm.network-connection.endpoint", + "cm.network-connection.local-connection", + "cm.xr-network", + "cm.xr-network.hubModule", + "cm.xr-network.leafModule", + "cm.xr-network.reachableModule", + "cm.sw.action", + "cm.sw.moduleAction", + "cm.sw.ctrl", + "cm.sw.bank" + ], + "x-oapi-codegen-extra-tags": { + "bson": "resourceType" + } + }, + "cm.subscription.parameters.subscriptionFilter.requestedResources.ids": { + "description": "Required resource ids (with type defined in resourceType) to be available in the notification channel", + "items": { + "type": "string" + }, + "minItems": 1, + "title": "Resource Ids", + "type": "array", + "uniqueItems": true, + "x-oapi-codegen-extra-tags": { + "bson": "ids" + } + }, + "cm.subscription.parameters.subscriptionFilter.requestedResources.moduleIds": { + "description": "Required device ids (di property) within the defined resourceType (i.e. resource type containing the device ids) to be available in the notification channel", + "items": { + "type": "string" + }, + "minItems": 1, + "title": "Device Ids", + "type": "array", + "uniqueItems": true, + "x-oapi-codegen-extra-tags": { + "bson": "moduleIds" + } + }, + "cm.subscription.parameters.subscriptionFilter.requestedResources.hrefs": { + "description": "Required HREFs to be available in the notification channel.\nNote that this filter definition supports regex.\n", + "items": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "minItems": 1, + "title": "HREFs", + "type": "array", + "uniqueItems": true, + "x-oapi-codegen-extra-tags": { + "bson": "hrefs" + } + }, + "cm.subscription.request": { + "additionalProperties": false, + "description": "Subscription creation request body content", + "properties": { + "subscriptionName": { + "$ref": "#/components/schemas/cm.subscription.parameters.subscriptionName" + }, + "subscriptionFilters": { + "items": { + "$ref": "#/components/schemas/cm.subscription.subscriptionFilter" + }, + "minItems": 1, + "type": "array" + } + }, + "title": "Subscription request body content", + "type": "object" + }, + "cm.subscription.response": { + "description": "Subscription creation response body content", + "properties": { + "subscriptionId": { + "$ref": "#/components/schemas/cm.subscription.parameters.subscriptionId" + }, + "notificationChannel": { + "$ref": "#/components/schemas/cm.subscription.notificationChannel" + } + }, + "title": "Subscription response body content", + "type": "object" + }, + "cm_subscription_subscriptionFilter_requestedResources_inner": { + "properties": { + "resourceType": { + "$ref": "#/components/schemas/cm.subscription.parameters.subscriptionFilter.requestedResources.resourceType" + }, + "ids": { + "$ref": "#/components/schemas/cm.subscription.parameters.subscriptionFilter.requestedResources.ids" + }, + "moduleIds": { + "$ref": "#/components/schemas/cm.subscription.parameters.subscriptionFilter.requestedResources.moduleIds" + }, + "hrefs": { + "$ref": "#/components/schemas/cm.subscription.parameters.subscriptionFilter.requestedResources.hrefs" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "requestedResources" + } + }, + "cm.host": { + "description": "Definition of host object", + "example": { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a", + "rt": [ + "cm.host" + ], + "id": "d9672ef1-ddc1-cd6b-3c77-ea86b442545a", + "config": { + "name": "Sunnyvale Router 001", + "managedBy": "CM", + "location": { + "latitude": 20, + "longitude": 134.1 + }, + "selector": { + "hostSelectorByChassisId": { + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40" + } + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + }, + "state": { + "name": "Sunnyvale Router 001", + "chassisIdSubtype": "macAddress", + "chassisId": "28:c0:da:3e:3e:40", + "sysName": "Vendor A Router", + "sysDescr": "", + "lldpState": "Present", + "managedBy": "CM", + "location": { + "latitude": 20, + "longitude": 134.1 + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + }, + "ports": [ + { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/ports/5f8c47b4-c02a-6242-260c-185dd04b8faf", + "rt": [ + "cm.host.port" + ], + "id": "d9672ef1-ddc1-cd6b-3c77-ea86b442545a/ports/5f8c47b4-c02a-6242-260c-185dd04b8faf", + "config": { + "managedBy": "CM", + "selector": { + "ifSelectorByHostPortSourceMAC": { + "portSourceMAC": "28:c0:da:3e:3e:44" + } + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + }, + "state": { + "name": "towards San Jose", + "managedBy": "CM", + "lldpState": "Present", + "hostPort": { + "portIdSubtype": "interfaceName", + "portId": "et-1/0/0:0", + "portSourceMAC": "28:c0:da:3e:3e:44" + }, + "moduleIf": { + "moduleId": "aa079e7c-02df-43ed-636e-71f7bfc212ff", + "moduleName": "Sunnyvale-1/0/0", + "macAddress": "00:0B:F8:00:01:01", + "serialNumber": "12345678901", + "clientIfAid": "XR-T1" + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + } + }, + { + "href": "/hosts/d9672ef1-ddc1-cd6b-3c77-ea86b442545a/ports/4868c57e-0f4f-11ec-82a8-0242ac130003", + "rt": [ + "cm.host.port" + ], + "id": "4868c57e-0f4f-11ec-82a8-0242ac130003", + "config": { + "name": "towards Santa Clara", + "managedBy": "CM", + "selector": { + "ifSelectorByModuleMAC": { + "moduleMAC": "00:0B:F8:00:01:01", + "clientIfAid": "XR-T1" + } + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + }, + "state": { + "name": "towards Santa Clara", + "managedBy": "Host", + "lldpState": "Present", + "hostPort": { + "portIdSubtype": "interfaceName", + "portId": "et-1/0/2:0", + "portSourceMAC": "58:00:BB:00:00:12" + }, + "moduleIf": { + "moduleId": "4e58f211-oa575-41ae-65d6-54fbeba5a2fe", + "moduleName": "Sunnyvale-1/0/2", + "macAddress": "00:0B:F8:00:01:01", + "serialNumber": "12345678901", + "clientIfAid": "XR-T2" + }, + "labels": { + "region": "West Coast", + "city": "Sunnyvale" + } + } + } + ] + }, + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "config": { + "$ref": "#/components/schemas/cm.host.config" + }, + "state": { + "$ref": "#/components/schemas/cm.host.state" + }, + "ports": { + "$ref": "#/components/schemas/cm.host.ports" + } + } + }, + "cm.host.config": { + "additionalProperties": false, + "description": "Configurable host parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "managedBy": { + "$ref": "#/components/schemas/cm.host.parameters.managedBy" + }, + "location": { + "$ref": "#/components/schemas/cm.parameters.location" + }, + "selector": { + "$ref": "#/components/schemas/cm.selectors.hostSelector" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.host.state": { + "description": "Definition of host state parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "chassisIdSubtype": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.chassisIdSubtype" + }, + "chassisId": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.chassisId" + }, + "sysName": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.sysName" + }, + "sysDescr": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.sysDescr" + }, + "lldpState": { + "$ref": "#/components/schemas/cm.host.parameters.lldpState" + }, + "managedBy": { + "$ref": "#/components/schemas/cm.host.parameters.managedBy" + }, + "location": { + "$ref": "#/components/schemas/cm.parameters.location" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.host.parameters.lldpState": { + "description": "Represents the consolidated LLDP state of the XR modules in the host.\nPossible Values:\n- 'Pending': Applicable for pre-planned scenarios when the host port is not yet discovered from an XR module or there is no XR module associated to the host.\n- 'NotPresent': Applicable when the XR module is not reporting host LLDP information.\n- 'Present': Applicable when the XR module is reporting host LLDP information.\n- 'Unknown': Applicable when the XR module is in 'Offline' state\nNote that the information presented for hosts with 'Unknown' state refers to the last known host information.\n", + "enum": [ + "Pending", + "Present", + "Unknown", + "NotPresent" + ], + "readOnly": true, + "title": "State", + "type": "string", + "x-enum-varnames": [ + "Pending", + "Present", + "Unknown", + "Not present" + ], + "x-oapi-codegen-extra-tags": { + "bson": "lldpState" + } + }, + "cm.host.parameters.managedBy": { + "description": "Defines the ownership of the object.\nPossible values: 'Host', 'CM'\n- Host: Applicable to discovered objects that are automaticcaly created / deleted based on Host reported information.\n- CM: Applicable to pre-planned objects or objects with exising depondencies (e.g. host ports used in a service with the respective host selector).\n", + "enum": [ + "Host", + "CM" + ], + "title": "Managed by", + "type": "string", + "x-enum-varnames": [ + "Host", + "CM" + ], + "x-oapi-codegen-extra-tags": { + "bson": "managedBy" + } + }, + "cm.host.create": { + "additionalProperties": false, + "description": "Host creation parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "managedBy": { + "$ref": "#/components/schemas/cm.host.parameters.managedBy" + }, + "location": { + "$ref": "#/components/schemas/cm.parameters.location" + }, + "selector": { + "$ref": "#/components/schemas/cm.selectors.hostSelector" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "required": [ + "selector" + ], + "type": "object" + }, + "cm.host.update": { + "additionalProperties": false, + "description": "Editable host parameters", + "minProperties": 1, + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "managedBy": { + "$ref": "#/components/schemas/cm.host.parameters.managedBy" + }, + "location": { + "$ref": "#/components/schemas/cm.parameters.location" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.host.port": { + "description": "Definition of host port object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "config": { + "$ref": "#/components/schemas/cm.host.port.config" + }, + "state": { + "$ref": "#/components/schemas/cm.host.port.state" + } + } + }, + "cm.host.ports": { + "description": "List of host ports", + "items": { + "$ref": "#/components/schemas/cm.host.port" + }, + "type": "array" + }, + "cm.host.port.config": { + "additionalProperties": false, + "description": "Definition of host port configurable parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "managedBy": { + "$ref": "#/components/schemas/cm.host.parameters.managedBy" + }, + "selector": { + "$ref": "#/components/schemas/cm.selectors.ifSelector" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.host.port.state": { + "description": "Definition of host port state object", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "hostName": { + "$ref": "#/components/schemas/cm.parameters.hostName" + }, + "chassisIdSubtype": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.chassisIdSubtype" + }, + "chassisId": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.chassisId" + }, + "sysName": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.sysName" + }, + "portIdSubtype": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.portIdSubtype" + }, + "portId": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.portId" + }, + "portSourceMAC": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.localPortSourceMAC" + }, + "portDescr": { + "$ref": "#/components/schemas/xr.ethernet.neighbor.portDescr" + }, + "managedBy": { + "$ref": "#/components/schemas/cm.host.parameters.managedBy" + }, + "lldpState": { + "$ref": "#/components/schemas/cm.host.port.parameters.lldpState" + }, + "moduleIf": { + "$ref": "#/components/schemas/cm.interface.moduleIf" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.host.port.parameters.lldpState": { + "description": "Represents the consolidated LLDP state of the XR modules in the host.\nPossible Values:\n- Pending: Applicable for pre-planned scenarios when the host port is not yet discovered from an XR module\n- NotPresent: Applicable when the XR module is not reporting host LLDP information.\n- Present: Applicable when the XR module is reporting host LLDP information.\n- Unknown: Applicable when the XR module is in 'Offline' state or there is no XR module associated to the host.\nNote that the information presented for hosts with 'Unknown' state refers to the last known host information.\n", + "enum": [ + "Pending", + "Present", + "Unknown", + "NotPresent" + ], + "readOnly": true, + "title": "State", + "type": "string", + "x-enum-varnames": [ + "Pending", + "Present", + "Unknown", + "Not present" + ], + "x-oapi-codegen-extra-tags": { + "bson": "lldpState" + } + }, + "cm.host.port.create": { + "additionalProperties": false, + "description": "Host port creation parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "managedBy": { + "$ref": "#/components/schemas/cm.host.parameters.managedBy" + }, + "selector": { + "$ref": "#/components/schemas/cm.selectors.ifSelector" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "required": [ + "selector" + ], + "type": "object" + }, + "cm.host.port.update": { + "additionalProperties": false, + "description": "Definition of host port editable parameters", + "minProperties": 1, + "properties": { + "name": { + "$ref": "#/components/schemas/cm.parameters.name" + }, + "managedBy": { + "$ref": "#/components/schemas/cm.host.parameters.managedBy" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.parameters.location": { + "description": "Geographic coordinates in decimal degree.\n", + "properties": { + "latitude": { + "format": "double", + "maximum": 90, + "minimum": -90, + "title": "Latitude", + "type": "number", + "x-oapi-codegen-extra-tags": { + "bson": "latitude" + } + }, + "longitude": { + "format": "double", + "maximum": 180, + "minimum": -180, + "title": "Longitude", + "type": "number", + "x-oapi-codegen-extra-tags": { + "bson": "longitude" + } + } + }, + "title": "Location", + "type": "object" + }, + "cm.selectors.hostSelector": { + "description": "Definition of the parameters provided upon host creation used as matching criteria for discovered hosts", + "maxProperties": 1, + "minProperties": 1, + "properties": { + "hostSelectorByHostChassisId": { + "$ref": "#/components/schemas/cm.selector.hostSelectorByChassisId" + }, + "moduleSelectorByModuleId": { + "$ref": "#/components/schemas/cm.selector.moduleSelectorByModuleId" + }, + "moduleSelectorByModuleName": { + "$ref": "#/components/schemas/cm.selector.moduleSelectorByModuleName" + }, + "moduleSelectorByModuleMAC": { + "$ref": "#/components/schemas/cm.selector.moduleSelectorByModuleMAC" + }, + "moduleSelectorByModuleSerialNumber": { + "$ref": "#/components/schemas/cm.selector.moduleSelectorByModuleSerialNumber" + } + }, + "title": "Host Selector", + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "selector" + } + }, + "cm.selector.hostSelectorByChassisId": { + "additionalProperties": false, + "description": "Definition of host selector based on chassisId information", + "maxProperties": 2, + "minProperties": 2, + "properties": { + "chassisIdSubtype": { + "$ref": "#/components/schemas/cm.selector.hostSelector.parameters.chassisIdSubtype" + }, + "chassisId": { + "$ref": "#/components/schemas/cm.selector.hostSelector.parameters.chassisId" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "hostSelectorByChassisId" + } + }, + "cm.ndu": { + "description": "Definition of ndu object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "config": { + "$ref": "#/components/schemas/cm.ndu.config" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.state" + }, + "ports": { + "$ref": "#/components/schemas/cm.ndu.ports" + }, + "linePtps": { + "$ref": "#/components/schemas/cm.ndu.linePtps" + }, + "tribPtps": { + "$ref": "#/components/schemas/cm.ndu.tribPtps" + }, + "otus": { + "$ref": "#/components/schemas/cm.ndu.otus" + }, + "ethernetClients": { + "$ref": "#/components/schemas/cm.ndu.ethernetClients" + }, + "trails": { + "$ref": "#/components/schemas/cm.ndu.trails" + }, + "fans": { + "$ref": "#/components/schemas/cm.ndu.fans" + }, + "pem": { + "$ref": "#/components/schemas/cm.ndu.pem" + }, + "leds": { + "$ref": "#/components/schemas/cm.ndu.leds" + } + } + }, + "cm.ndu.config": { + "additionalProperties": false, + "description": "Definition of module configurable parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/cm.ndu.parameters.name" + }, + "location": { + "$ref": "#/components/schemas/cm.ndu.config.location" + }, + "contact": { + "$ref": "#/components/schemas/ndu.configuration.contact" + }, + "managedBy": { + "$ref": "#/components/schemas/ndu.configuration.mgmtMode" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.ndu.config.location": { + "additionalProperties": false, + "description": "Location parameter", + "minProperties": 1, + "properties": { + "description": { + "$ref": "#/components/schemas/ndu.configuration.neLocation" + }, + "clli": { + "$ref": "#/components/schemas/ndu.configuration.clli" + }, + "latitude": { + "$ref": "#/components/schemas/ndu.configuration.latitude" + }, + "longitude": { + "$ref": "#/components/schemas/ndu.configuration.longitude" + }, + "altitude": { + "$ref": "#/components/schemas/ndu.configuration.altitude" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "location" + } + }, + "cm.ndu.state": { + "description": "Definition of module state object", + "properties": { + "name": { + "$ref": "#/components/schemas/ndu.device.n" + }, + "nduAid": { + "$ref": "#/components/schemas/ndu.device.aid" + }, + "location": { + "$ref": "#/components/schemas/cm.ndu.config.location" + }, + "contact": { + "$ref": "#/components/schemas/ndu.configuration.contact" + }, + "managedBy": { + "$ref": "#/components/schemas/ndu.configuration.mgmtMode" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + }, + "connectivityState": { + "$ref": "#/components/schemas/cm.ndu.parameters.connectivityState" + }, + "hwDescription": { + "$ref": "#/components/schemas/cm.ndu.state.hwDescription" + } + } + }, + "cm.ndu.state.hwDescription": { + "description": "Definition of module platform properties", + "properties": { + "pi": { + "$ref": "#/components/schemas/ndu.platform.pi" + }, + "mnfv": { + "$ref": "#/components/schemas/ndu.platform.mnfv" + }, + "mnmn": { + "$ref": "#/components/schemas/ndu.platform.mnmn" + }, + "mnmo": { + "$ref": "#/components/schemas/ndu.platform.mnmo" + }, + "mnhw": { + "$ref": "#/components/schemas/ndu.platform.mnhw" + }, + "mndt": { + "$ref": "#/components/schemas/ndu.platform.mndt" + }, + "serialNumber": { + "$ref": "#/components/schemas/ndu.platform.mnsel" + }, + "clei": { + "$ref": "#/components/schemas/ndu.platform.clei" + }, + "macAddress": { + "$ref": "#/components/schemas/ndu.platform.macAddress" + }, + "piid": { + "$ref": "#/components/schemas/ndu.device.piid" + }, + "dmn": { + "$ref": "#/components/schemas/ndu.device.dmn" + }, + "sv": { + "$ref": "#/components/schemas/ndu.device.sv" + }, + "icv": { + "$ref": "#/components/schemas/ndu.device.icv" + } + }, + "x-oapi-codegen-extra-tags": { + "bson": "hwDescription" + } + }, + "cm.ndu.parameters.name": { + "description": "Property to change the NDU name. \nThis is also reflected in the same property in oic.wk.d\n", + "maxLength": 64, + "title": "NDU name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "name" + } + }, + "cm.ndu.parameters.connectivityState": { + "description": "The CM connectivity state between the CM and the device.", + "enum": [ + "active", + "inactive" + ], + "title": "Connectivity state", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "connectivityState" + } + }, + "cm.ndu.update": { + "additionalProperties": false, + "description": "Definition of ndu editable parameters", + "minProperties": 1, + "properties": { + "name": { + "$ref": "#/components/schemas/cm.ndu.parameters.name" + }, + "location": { + "$ref": "#/components/schemas/cm.ndu.config.location" + }, + "contact": { + "$ref": "#/components/schemas/ndu.configuration.contact" + }, + "managedBy": { + "$ref": "#/components/schemas/ndu.configuration.mgmtMode" + }, + "labels": { + "$ref": "#/components/schemas/cm.parameters.labels" + } + }, + "type": "object" + }, + "cm.ndu.port": { + "description": "Definition of NDU port object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.ndu.port.config" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.port.state" + }, + "toms": { + "$ref": "#/components/schemas/cm.ndu.port.toms" + }, + "xrs": { + "$ref": "#/components/schemas/cm.ndu.port.xrs" + }, + "edfas": { + "$ref": "#/components/schemas/cm.ndu.port.edfas" + }, + "voas": { + "$ref": "#/components/schemas/cm.ndu.port.voas" + } + } + }, + "cm.ndu.ports": { + "items": { + "$ref": "#/components/schemas/cm.ndu.port" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "ports" + } + }, + "cm.ndu.port.config": { + "additionalProperties": false, + "description": "Definition of ndu port configurable parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/ndu.port.label" + }, + "connectedTo": { + "$ref": "#/components/schemas/ndu.port.connectedTo" + }, + "externalConnectivity": { + "$ref": "#/components/schemas/ndu.port.externalConnectivity" + } + }, + "type": "object" + }, + "cm.ndu.port.state": { + "description": "Definition of ndu port state object", + "properties": { + "portAid": { + "$ref": "#/components/schemas/ndu.port.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/ndu.port.parentAid" + }, + "name": { + "$ref": "#/components/schemas/ndu.port.label" + }, + "category": { + "$ref": "#/components/schemas/ndu.port.portType" + }, + "supportedTypes": { + "$ref": "#/components/schemas/ndu.port.supportedType" + }, + "installedType": { + "$ref": "#/components/schemas/ndu.port.installedType" + }, + "connectedTo": { + "$ref": "#/components/schemas/ndu.port.connectedTo" + }, + "externalConnectivity": { + "$ref": "#/components/schemas/ndu.port.externalConnectivity" + } + }, + "type": "object" + }, + "cm.ndu.port.update": { + "additionalProperties": false, + "description": "Definition of ndu port editable parameters", + "minProperties": 1, + "properties": { + "name": { + "$ref": "#/components/schemas/ndu.port.label" + }, + "connectedTo": { + "$ref": "#/components/schemas/ndu.port.connectedTo" + }, + "externalConnectivity": { + "$ref": "#/components/schemas/ndu.port.externalConnectivity" + } + }, + "type": "object" + }, + "cm.ndu.port.tom": { + "description": "Definition of NDU TOM object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.ndu.port.tom.config" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.port.tom.state" + } + } + }, + "cm.ndu.port.toms": { + "items": { + "$ref": "#/components/schemas/cm.ndu.port.tom" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "toms" + } + }, + "cm.ndu.port.tom.config": { + "additionalProperties": false, + "description": "Definition of ndu TOM configurable parameters", + "properties": { + "requiredType": { + "$ref": "#/components/schemas/ndu.tom.requiredType" + }, + "enableSerdes": { + "$ref": "#/components/schemas/ndu.enableSerdes" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "serDes" + } + }, + "cm.ndu.port.tom.state": { + "description": "Definition of ndu TOM state object", + "properties": { + "tomAid": { + "$ref": "#/components/schemas/ndu.tom.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/ndu.tom.parentAid" + }, + "enableSerdes": { + "$ref": "#/components/schemas/ndu.enableSerdes" + }, + "serDes": { + "items": { + "$ref": "#/components/schemas/ndu.serDesData" + }, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "serDes" + } + }, + "inventory": { + "$ref": "#/components/schemas/ndu.inventory" + } + }, + "type": "object" + }, + "cm.ndu.port.tom.update": { + "additionalProperties": false, + "description": "Definition of ndu TOM editable parameters", + "minProperties": 1, + "properties": { + "requiredType": { + "$ref": "#/components/schemas/ndu.tom.requiredType" + }, + "enableSerdes": { + "$ref": "#/components/schemas/ndu.enableSerdes" + } + }, + "type": "object" + }, + "cm.ndu.port.xr": { + "description": "Definition of NDU XR pluggable interface object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.ndu.port.xr.config" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.port.xr.state" + } + } + }, + "cm.ndu.port.xrs": { + "items": { + "$ref": "#/components/schemas/cm.ndu.port.xr" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "xrs" + } + }, + "cm.ndu.port.xr.config": { + "additionalProperties": false, + "description": "Definition of ndu XR pluggable interface configurable parameters", + "properties": { + "enableSerdes": { + "$ref": "#/components/schemas/ndu.enableSerdes" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "serDes" + } + }, + "cm.ndu.port.xr.state": { + "description": "Definition of ndu XR pluggable interface state object", + "properties": { + "xrAid": { + "$ref": "#/components/schemas/ndu.xr.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/ndu.xr.parentAid" + }, + "enableSerdes": { + "$ref": "#/components/schemas/ndu.enableSerdes" + }, + "serDes": { + "items": { + "$ref": "#/components/schemas/ndu.serDesData" + }, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "serDes" + } + }, + "inventory": { + "$ref": "#/components/schemas/ndu.inventory" + } + }, + "type": "object" + }, + "cm.ndu.port.xr.update": { + "additionalProperties": false, + "description": "Definition of ndu XR pluggable interface editable parameters", + "minProperties": 1, + "properties": { + "enableSerdes": { + "$ref": "#/components/schemas/ndu.enableSerdes" + } + }, + "type": "object" + }, + "cm.ndu.port.edfa": { + "description": "Definition of NDU EDFA object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.ndu.port.edfa.config" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.port.edfa.state" + } + } + }, + "cm.ndu.port.edfas": { + "items": { + "$ref": "#/components/schemas/cm.ndu.port.edfa" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "edfas" + } + }, + "cm.ndu.port.edfa.config": { + "additionalProperties": false, + "description": "Definition of ndu EDFA configurable parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/ndu.edfa.label" + }, + "enableSerdes": { + "$ref": "#/components/schemas/ndu.enableSerdes" + }, + "function": { + "$ref": "#/components/schemas/ndu.edfa.function" + }, + "amplifierEnable": { + "$ref": "#/components/schemas/ndu.edfa.amplifierEnable" + }, + "controlMode": { + "$ref": "#/components/schemas/ndu.edfa.controlMode" + }, + "amplifierMode": { + "$ref": "#/components/schemas/ndu.edfa.amplifierMode" + }, + "gainTarget": { + "$ref": "#/components/schemas/ndu.edfa.gainTarget" + }, + "optimumEdfaGain": { + "$ref": "#/components/schemas/ndu.edfa.optimumEdfaGain" + }, + "inputPowerMon": { + "$ref": "#/components/schemas/ndu.edfa.inputPowerMon" + }, + "outputPowerMon": { + "$ref": "#/components/schemas/ndu.edfa.outputPowerMon" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "serDes" + } + }, + "cm.ndu.port.edfa.state": { + "description": "Definition of ndu EDFA state object", + "properties": { + "name": { + "$ref": "#/components/schemas/ndu.edfa.label" + }, + "edfaAid": { + "$ref": "#/components/schemas/ndu.edfa.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/ndu.edfa.parentAid" + }, + "enableSerdes": { + "$ref": "#/components/schemas/ndu.enableSerdes" + }, + "serDes": { + "items": { + "$ref": "#/components/schemas/ndu.serDesData" + }, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "serDes" + } + }, + "function": { + "$ref": "#/components/schemas/ndu.edfa.function" + }, + "amplifierEnable": { + "$ref": "#/components/schemas/ndu.edfa.amplifierEnable" + }, + "controlMode": { + "$ref": "#/components/schemas/ndu.edfa.controlMode" + }, + "amplifierMode": { + "$ref": "#/components/schemas/ndu.edfa.amplifierMode" + }, + "gainTarget": { + "$ref": "#/components/schemas/ndu.edfa.gainTarget" + }, + "optimumEdfaGain": { + "$ref": "#/components/schemas/ndu.edfa.optimumEdfaGain" + }, + "inputPowerMon": { + "$ref": "#/components/schemas/ndu.edfa.inputPowerMon" + }, + "outputPowerMon": { + "$ref": "#/components/schemas/ndu.edfa.outputPowerMon" + }, + "inventory": { + "$ref": "#/components/schemas/ndu.inventory" + } + }, + "type": "object" + }, + "cm.ndu.port.edfa.update": { + "additionalProperties": false, + "description": "Definition of ndu EDFA editable parameters", + "minProperties": 1, + "properties": { + "name": { + "$ref": "#/components/schemas/ndu.edfa.label" + }, + "enableSerdes": { + "$ref": "#/components/schemas/ndu.enableSerdes" + }, + "function": { + "$ref": "#/components/schemas/ndu.edfa.function" + }, + "amplifierEnable": { + "$ref": "#/components/schemas/ndu.edfa.amplifierEnable" + }, + "controlMode": { + "$ref": "#/components/schemas/ndu.edfa.controlMode" + }, + "amplifierMode": { + "$ref": "#/components/schemas/ndu.edfa.amplifierMode" + }, + "gainTarget": { + "$ref": "#/components/schemas/ndu.edfa.gainTarget" + }, + "optimumEdfaGain": { + "$ref": "#/components/schemas/ndu.edfa.optimumEdfaGain" + }, + "inputPowerMon": { + "$ref": "#/components/schemas/ndu.edfa.inputPowerMon" + }, + "outputPowerMon": { + "$ref": "#/components/schemas/ndu.edfa.outputPowerMon" + } + }, + "type": "object" + }, + "cm.ndu.port.voa": { + "description": "Definition of NDU VOA object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.ndu.port.voa.config" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.port.voa.state" + } + } + }, + "cm.ndu.port.voas": { + "items": { + "$ref": "#/components/schemas/cm.ndu.port.voa" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "voas" + } + }, + "cm.ndu.port.voa.config": { + "additionalProperties": false, + "description": "Definition of ndu VOA configurable parameters", + "properties": { + "enableSerdes": { + "$ref": "#/components/schemas/ndu.enableSerdes" + }, + "outputVoaAttenuation": { + "$ref": "#/components/schemas/ndu.voa.outputVoaAttenuation" + } + }, + "type": "object", + "x-oapi-codegen-extra-tags": { + "bson": "serDes" + } + }, + "cm.ndu.port.voa.state": { + "description": "Definition of ndu VOA state object", + "properties": { + "voaAid": { + "$ref": "#/components/schemas/ndu.voa.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/ndu.voa.parentAid" + }, + "enableSerdes": { + "$ref": "#/components/schemas/ndu.enableSerdes" + }, + "serDes": { + "items": { + "$ref": "#/components/schemas/ndu.serDesData" + }, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "serDes" + } + }, + "outputVoaAttenuation": { + "$ref": "#/components/schemas/ndu.voa.outputVoaAttenuation" + }, + "outputVoaActual": { + "$ref": "#/components/schemas/ndu.voa.outputVoaActual" + }, + "inputPowerMon": { + "$ref": "#/components/schemas/ndu.voa.inputPowerMon" + }, + "outputPowerMon": { + "$ref": "#/components/schemas/ndu.voa.outputPowerMon" + }, + "inventory": { + "$ref": "#/components/schemas/ndu.inventory" + } + }, + "type": "object" + }, + "cm.ndu.port.voa.update": { + "additionalProperties": false, + "description": "Definition of ndu VOA editable parameters", + "minProperties": 1, + "properties": { + "enableSerdes": { + "$ref": "#/components/schemas/ndu.enableSerdes" + }, + "outputVoaAttenuation": { + "$ref": "#/components/schemas/ndu.voa.outputVoaAttenuation" + }, + "outputVoaActual": { + "$ref": "#/components/schemas/ndu.voa.outputVoaActual" + } + }, + "type": "object" + }, + "cm.ndu.linePtp": { + "description": "Definition of ndu line port object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.linePtp.state" + }, + "carriers": { + "$ref": "#/components/schemas/cm.ndu.linePtp.carriers" + } + } + }, + "cm.ndu.linePtps": { + "items": { + "$ref": "#/components/schemas/cm.ndu.linePtp" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "linePtps" + } + }, + "cm.ndu.linePtp.state": { + "description": "Definition of module line port state object", + "properties": { + "linePtpAid": { + "$ref": "#/components/schemas/ndu.lineptp.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/ndu.lineptp.parentAid" + } + }, + "type": "object" + }, + "cm.ndu.linePtp.carrier": { + "description": "Definition of ndu carrier object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.linePtp.carrier.state" + } + } + }, + "cm.ndu.linePtp.carriers": { + "items": { + "$ref": "#/components/schemas/cm.ndu.linePtp.carrier" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "carriers" + } + }, + "cm.ndu.linePtp.carrier.state": { + "description": "Definition of module carrier state object", + "properties": { + "carrierAid": { + "$ref": "#/components/schemas/xr.carrier.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.carrier.parentAid" + } + }, + "type": "object" + }, + "cm.ndu.tribPtp": { + "description": "Definition of NDU tributary port object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.ndu.tribPtp.config" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.tribPtp.state" + } + } + }, + "cm.ndu.tribPtps": { + "items": { + "$ref": "#/components/schemas/cm.ndu.tribPtp" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "tribPtps" + } + }, + "cm.ndu.tribPtp.config": { + "additionalProperties": false, + "description": "Definition of ndu tributary port configurable parameters", + "properties": { + "name": { + "$ref": "#/components/schemas/ndu.ptp.label" + }, + "serviceType": { + "$ref": "#/components/schemas/ndu.ptp.serviceType" + }, + "disableAction": { + "$ref": "#/components/schemas/ndu.ptp.tributaryDisableAction" + }, + "disableActionHoldOff": { + "$ref": "#/components/schemas/ndu.ptp.tributaryDisableActionHoldoff" + }, + "powerThresholdLow": { + "$ref": "#/components/schemas/ndu.ptp.powerThresholdLow" + }, + "powerThresholdLowOffset": { + "$ref": "#/components/schemas/ndu.ptp.powerThresholdLowOffset" + }, + "powerThresholdHigh": { + "$ref": "#/components/schemas/ndu.ptp.powerThresholdHigh" + }, + "powerThresholdHighOffset": { + "$ref": "#/components/schemas/ndu.ptp.powerThresholdHighOffset" + } + }, + "type": "object" + }, + "cm.ndu.tribPtp.state": { + "description": "Definition of ndu tributary port state object", + "properties": { + "tribPtpAid": { + "$ref": "#/components/schemas/ndu.ptp.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/ndu.lineptp.parentAid" + }, + "name": { + "$ref": "#/components/schemas/ndu.ptp.label" + }, + "serviceType": { + "$ref": "#/components/schemas/ndu.ptp.serviceType" + }, + "disableAction": { + "$ref": "#/components/schemas/ndu.ptp.tributaryDisableAction" + }, + "disableActionHoldOff": { + "$ref": "#/components/schemas/ndu.ptp.tributaryDisableActionHoldoff" + }, + "powerThresholdLow": { + "$ref": "#/components/schemas/ndu.ptp.powerThresholdLow" + }, + "powerThresholdLowOffset": { + "$ref": "#/components/schemas/ndu.ptp.powerThresholdLowOffset" + }, + "powerThresholdHigh": { + "$ref": "#/components/schemas/ndu.ptp.powerThresholdHigh" + }, + "powerThresholdHighOffset": { + "$ref": "#/components/schemas/ndu.ptp.powerThresholdHighOffset" + } + }, + "type": "object" + }, + "cm.ndu.tribPtp.update": { + "additionalProperties": false, + "description": "Definition of ndu tributary port editable parameters", + "minProperties": 1, + "properties": { + "name": { + "$ref": "#/components/schemas/ndu.ptp.label" + }, + "serviceType": { + "$ref": "#/components/schemas/ndu.ptp.serviceType" + }, + "disableAction": { + "$ref": "#/components/schemas/ndu.ptp.tributaryDisableAction" + }, + "disableActionHoldOff": { + "$ref": "#/components/schemas/ndu.ptp.tributaryDisableActionHoldoff" + }, + "powerThresholdLow": { + "$ref": "#/components/schemas/ndu.ptp.powerThresholdLow" + }, + "powerThresholdLowOffset": { + "$ref": "#/components/schemas/ndu.ptp.powerThresholdLowOffset" + }, + "powerThresholdHigh": { + "$ref": "#/components/schemas/ndu.ptp.powerThresholdHigh" + }, + "powerThresholdHighOffset": { + "$ref": "#/components/schemas/ndu.ptp.powerThresholdHighOffset" + } + }, + "type": "object" + }, + "cm.ndu.otu": { + "description": "Definition of NDU otu object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.ndu.otu.config" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.otu.state" + }, + "odus": { + "$ref": "#/components/schemas/cm.ndu.otu.odus" + } + } + }, + "cm.ndu.otus": { + "items": { + "$ref": "#/components/schemas/cm.ndu.otu" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "otus" + } + }, + "cm.ndu.otu.config": { + "additionalProperties": false, + "description": "Definition of NDU otu configurable parameters", + "properties": { + "txTTI": { + "$ref": "#/components/schemas/xr.ndu.otu.txTTI" + }, + "expectedTTI": { + "$ref": "#/components/schemas/xr.ndu.otu.expectedTTI" + }, + "facPRBSGen": { + "$ref": "#/components/schemas/xr.ndu.otu.diagnostic.facPRBSGen" + }, + "facPRBSMon": { + "$ref": "#/components/schemas/xr.ndu.otu.diagnostic.facPRBSMon" + } + }, + "type": "object" + }, + "cm.ndu.otu.state": { + "description": "Definition of NDU otu state object", + "properties": { + "otuAid": { + "$ref": "#/components/schemas/xr.ndu.otu.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.ndu.otu.parentAid" + }, + "otuType": { + "$ref": "#/components/schemas/xr.ndu.otu.otuType" + }, + "rate": { + "$ref": "#/components/schemas/xr.ndu.otu.rate" + }, + "txTTI": { + "$ref": "#/components/schemas/xr.ndu.otu.txTTI" + }, + "rxTTI": { + "$ref": "#/components/schemas/xr.ndu.otu.rxTTI" + }, + "expectedTTI": { + "$ref": "#/components/schemas/xr.ndu.otu.expectedTTI" + }, + "facPRBSGen": { + "$ref": "#/components/schemas/xr.ndu.otu.diagnostic.facPRBSGen" + }, + "facPRBSMon": { + "$ref": "#/components/schemas/xr.ndu.otu.diagnostic.facPRBSMon" + } + }, + "type": "object" + }, + "cm.ndu.otu.update": { + "additionalProperties": false, + "description": "Definition of NDU otu editable parameters", + "minProperties": 1, + "properties": { + "txTTI": { + "$ref": "#/components/schemas/xr.ndu.otu.txTTI" + }, + "expectedTTI": { + "$ref": "#/components/schemas/xr.ndu.otu.expectedTTI" + }, + "facPRBSGen": { + "$ref": "#/components/schemas/xr.ndu.otu.diagnostic.facPRBSGen" + }, + "facPRBSMon": { + "$ref": "#/components/schemas/xr.ndu.otu.diagnostic.facPRBSMon" + } + }, + "type": "object" + }, + "cm.ndu.otu.odu": { + "description": "Definition of NTU ODU object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.otu.odu.state" + } + } + }, + "cm.ndu.otu.odus": { + "items": { + "$ref": "#/components/schemas/cm.ndu.otu.odu" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "odus" + } + }, + "cm.ndu.otu.odu.state": { + "description": "Definition of NDU ODU state object", + "properties": { + "oduAid": { + "$ref": "#/components/schemas/xr.ndu.otu.odu.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.ndu.otu.odu.parentAid" + }, + "oduType": { + "$ref": "#/components/schemas/xr.ndu.otu.odu.oduType" + } + } + }, + "cm.ndu.ethernetClient": { + "description": "Definition of NDU ethernetClient object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "config": { + "$ref": "#/components/schemas/cm.ndu.ethernetClient.config" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.ethernetClient.state" + } + } + }, + "cm.ndu.ethernetClients": { + "items": { + "$ref": "#/components/schemas/cm.ndu.ethernetClient" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "ethernetClients" + } + }, + "cm.ndu.ethernetClient.config": { + "additionalProperties": false, + "description": "Definition of NDU ethernetClient configuration object", + "properties": { + "fecMode": { + "$ref": "#/components/schemas/xr.ndu.ethernet.fecMode" + }, + "loopbackType": { + "$ref": "#/components/schemas/xr.ndu.ethernet.diagnostic.loopbackType" + }, + "loopbackMode": { + "$ref": "#/components/schemas/xr.ndu.ethernet.diagnostic.loopbackMode" + } + }, + "type": "object" + }, + "cm.ndu.ethernetClient.state": { + "description": "Definition of module ethernetClient state parameters", + "properties": { + "clientIfAid": { + "$ref": "#/components/schemas/xr.ndu.ethernet.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/xr.ndu.ethernet.parentAid" + }, + "clientIfPortSpeed": { + "$ref": "#/components/schemas/xr.ndu.ethernet.portSpeed" + }, + "fecType": { + "$ref": "#/components/schemas/xr.ndu.ethernet.fecType" + }, + "fecMode": { + "$ref": "#/components/schemas/xr.ndu.ethernet.fecMode" + }, + "loopbackType": { + "$ref": "#/components/schemas/xr.ndu.ethernet.diagnostic.loopbackType" + }, + "loopbackMode": { + "$ref": "#/components/schemas/xr.ndu.ethernet.diagnostic.loopbackMode" + } + }, + "type": "object" + }, + "cm.ndu.ethernetClient.update": { + "additionalProperties": false, + "description": "Definition of NDU ethernetClient editable object", + "minProperties": 1, + "properties": { + "fecMode": { + "$ref": "#/components/schemas/xr.ndu.ethernet.fecMode" + }, + "loopbackType": { + "$ref": "#/components/schemas/xr.ndu.ethernet.diagnostic.loopbackType" + }, + "loopbackMode": { + "$ref": "#/components/schemas/xr.ndu.ethernet.diagnostic.loopbackMode" + } + }, + "type": "object" + }, + "cm.ndu.trail": { + "description": "Definition of NTU trail object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.trail.state" + } + } + }, + "cm.ndu.trails": { + "items": { + "$ref": "#/components/schemas/cm.ndu.trail" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "trails" + } + }, + "cm.ndu.trail.state": { + "description": "Definition of NDU ODU state object", + "properties": { + "trailAid": { + "$ref": "#/components/schemas/ndu.trail.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/ndu.trail.parentAid" + }, + "trailType": { + "$ref": "#/components/schemas/ndu.trail.trailType" + }, + "clientAid": { + "$ref": "#/components/schemas/ndu.trail.Aid_A" + }, + "lineAid": { + "$ref": "#/components/schemas/ndu.trail.Aid_Z" + } + } + }, + "cm.ndu.fan": { + "description": "Definition of NTU fan object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.fan.state" + } + } + }, + "cm.ndu.fans": { + "items": { + "$ref": "#/components/schemas/cm.ndu.fan" + }, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "fans" + } + }, + "cm.ndu.fan.state": { + "description": "Definition of NDU fan state object", + "properties": { + "fanAid": { + "$ref": "#/components/schemas/ndu.fan.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/ndu.fan.parentAid" + }, + "inventory": { + "$ref": "#/components/schemas/ndu.inventory" + } + } + }, + "cm.ndu.pem": { + "description": "Definition of NDU PEM object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.pem.state" + } + } + }, + "cm.ndu.pem.state": { + "description": "Definition of NDU PEM state object", + "properties": { + "pemAid": { + "$ref": "#/components/schemas/ndu.fan.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/ndu.fan.parentAid" + }, + "availablePower": { + "$ref": "#/components/schemas/ndu.pem.availablePower" + }, + "pemUnderVoltageThreshold": { + "$ref": "#/components/schemas/ndu.pem.pemUnderVoltageThreshold" + }, + "pemOverVoltageThreshold": { + "$ref": "#/components/schemas/ndu.pem.pemOverVoltageThreshold" + }, + "inventory": { + "$ref": "#/components/schemas/ndu.inventory" + } + }, + "type": "object" + }, + "cm.ndu.pem.update": { + "additionalProperties": false, + "description": "Definition of ndu PEM editable parameters", + "minProperties": 1, + "properties": { + "pemUnderVoltageThreshold": { + "$ref": "#/components/schemas/ndu.pem.pemUnderVoltageThreshold" + }, + "pemOverVoltageThreshold": { + "$ref": "#/components/schemas/ndu.pem.pemOverVoltageThreshold" + } + }, + "type": "object" + }, + "cm.ndu.leds": { + "description": "Definition of NDU LEDs object", + "properties": { + "href": { + "$ref": "#/components/schemas/cm.parameters.href" + }, + "rt": { + "$ref": "#/components/schemas/cm.parameters.rt" + }, + "id": { + "$ref": "#/components/schemas/cm.parameters.uuid" + }, + "parentId": { + "$ref": "#/components/schemas/cm.parameters.parentId" + }, + "colId": { + "$ref": "#/components/schemas/ndu.colId" + }, + "state": { + "$ref": "#/components/schemas/cm.ndu.leds.state" + } + } + }, + "cm.ndu.leds.state": { + "description": "Definition of NDU LEDs state object", + "properties": { + "ledsAid": { + "$ref": "#/components/schemas/ndu.leds.aid" + }, + "parentAid": { + "$ref": "#/components/schemas/ndu.leds.parentAid" + }, + "leds": { + "$ref": "#/components/schemas/ndu.leds.leds" + } + } + }, + "ndu.configuration.contact": { + "description": "Contact info of administrator of NDU", + "title": "Contact", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "contact" + } + }, + "ndu.configuration.mgmtMode": { + "description": "Defines the ownership of the object.", + "enum": [ + "local", + "CM" + ], + "title": "Managed by", + "type": "string", + "x-enum-varnames": [ + "Local", + "IPM" + ], + "x-oapi-codegen-extra-tags": { + "bson": "managedBy" + } + }, + "ndu.configuration.neLocation": { + "description": "NE location, defined by operator.", + "maxLength": 64, + "title": "Description", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "description" + } + }, + "ndu.configuration.clli": { + "description": "Common Location Language Identifier", + "maxLength": 11, + "minLength": 6, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "clli" + } + }, + "ndu.configuration.latitude": { + "description": "Latitude location info. \nRange: -90 to +90\n", + "format": "double", + "maximum": 90, + "minimum": -90, + "title": "Latitude", + "type": "number", + "x-oapi-codegen-extra-tags": { + "bson": "latitude" + } + }, + "ndu.configuration.longitude": { + "description": "Longitude location info. \nRange: -180 to +180\n", + "format": "double", + "maximum": 180, + "minimum": -180, + "title": "Longitude", + "type": "number", + "x-oapi-codegen-extra-tags": { + "bson": "longitude" + } + }, + "ndu.configuration.altitude": { + "title": "Altitude", + "type": "integer", + "x-unit": "Meters", + "x-oapi-codegen-extra-tags": { + "bson": "altitude" + } + }, + "ndu.device.n": { + "description": "Friendly name of the device", + "maxLength": 64, + "readOnly": true, + "title": "NDU name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "name" + } + }, + "ndu.device.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "nduAid" + } + }, + "ndu.platform.pi": { + "description": "Unique UUID for the hardware platform calculated from the mac address", + "maxLength": 36, + "minLength": 36, + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "readOnly": true, + "title": "Platform UUID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "pi" + } + }, + "ndu.platform.mnfv": { + "description": "Manufacturer's firmware version", + "maxLength": 64, + "readOnly": true, + "title": "Firmware version", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "mnfv" + } + }, + "ndu.platform.mnmn": { + "description": "Manufacturer name", + "maxLength": 64, + "readOnly": true, + "title": "Manufacturer", + "type": "string" + }, + "ndu.platform.mnmo": { + "description": "Manufacturer's Model/Part number", + "maxLength": 64, + "readOnly": true, + "title": "Model number", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "mnmo" + } + }, + "ndu.platform.mnhw": { + "description": "Platform Hardware Version", + "maxLength": 64, + "readOnly": true, + "title": "HW Version", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "mnhw" + } + }, + "ndu.platform.mndt": { + "description": "HW Manufacturing date", + "pattern": "([0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|2[0-9]|1[0-9]|0[1-9])", + "readOnly": true, + "title": "Manufacturing date", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "mndt" + } + }, + "ndu.platform.mnsel": { + "description": "Device Serial number", + "maxLength": 64, + "readOnly": true, + "title": "Serial number", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "serialNumber" + } + }, + "ndu.platform.clei": { + "description": "Globally unique 10-character alphanumeric intelligent code identifying equipment in a structured naming format", + "readOnly": true, + "title": "CLEI Code", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "clei" + } + }, + "ndu.platform.macAddress": { + "description": "Device MAC Address", + "readOnly": true, + "title": "MAC address", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "macAddress" + } + }, + "ndu.device.piid": { + "description": "Protocol independent unique identifier for the Device that is immutable.", + "maxLength": 36, + "minLength": 36, + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", + "readOnly": true, + "title": "PIID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "piid" + } + }, + "ndu.device.dmn": { + "properties": { + "language": { + "$ref": "#/components/schemas/ndu.device.dmn.language" + }, + "value": { + "$ref": "#/components/schemas/ndu.device.dmn.value" + } + }, + "x-oapi-codegen-extra-tags": { + "bson": "dmn" + } + }, + "ndu.device.dmn.language": { + "description": "Format pattern according to IETF RFC 5646 (language tag).", + "pattern": "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})", + "title": "Language", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "language" + } + }, + "ndu.device.dmn.value": { + "description": "Manufacturer name", + "maxLength": 64, + "readOnly": true, + "title": "Manufacturer", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "value" + } + }, + "ndu.device.sv": { + "description": "Software version.", + "maxLength": 64, + "readOnly": true, + "title": "Software version", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "sv" + } + }, + "ndu.device.icv": { + "description": "Device HW version.", + "maxLength": 64, + "readOnly": true, + "title": "Hardware version", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "icv" + } + }, + "ndu.colId": { + "description": "Object identifier in the supporting collection.", + "readOnly": true, + "title": "Collection Id", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "colId" + } + }, + "ndu.port.label": { + "description": "User defined port label", + "maxLength": 64, + "title": "Name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "name" + } + }, + "ndu.port.connectedTo": { + "description": "User configurable neighbor entity information", + "maxLength": 64, + "title": "Neighbor", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "connectedTo" + } + }, + "ndu.port.externalConnectivity": { + "description": "Whether port has NMS external connectivity.", + "title": "External Connectivity", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "externalConnectivity" + } + }, + "ndu.port.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type..", + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "portAid" + } + }, + "ndu.port.parentAid": { + "items": { + "$ref": "#/components/schemas/ndu.device.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "ndu.port.portType": { + "description": "Describes the port type", + "enum": [ + "line", + "tributary", + "usb", + "dcn", + "uplink", + "optical" + ], + "readOnly": true, + "title": "Type", + "type": "string", + "x-enum-varnames": [ + "Line", + "Tributary", + "USB", + "DCN", + "Uplink", + "Optical" + ], + "x-oapi-codegen-extra-tags": { + "bson": "category" + } + }, + "ndu.port.supportedType": { + "description": "List of supported pluggable interfaces", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "supportedTypes" + } + }, + "ndu.port.installedType": { + "description": "Installed pluggable interface", + "readOnly": true, + "type": "string" + }, + "ndu.tom.requiredType": { + "default": "", + "description": "User defined required type.\nInserted value should match a tom value defined in port supportedTypes.\n", + "maxLength": 64, + "title": "Required Type", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "requiredType" + } + }, + "ndu.enableSerdes": { + "description": "Serdes control parameter", + "title": "Enable Serdes", + "type": "boolean", + "x-oapi-codegen-extra-tags": { + "bson": "enableSerdes" + } + }, + "ndu.tom.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "tomAid" + } + }, + "ndu.tom.parentAid": { + "items": { + "$ref": "#/components/schemas/ndu.port.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "ndu.serDesData": { + "properties": { + "name": { + "$ref": "#/components/schemas/ndu.serDes.name" + }, + "value": { + "$ref": "#/components/schemas/ndu.serDes.value" + }, + "status": { + "$ref": "#/components/schemas/ndu.serDes.status" + } + } + }, + "ndu.serDes.name": { + "description": "Serdes name", + "readOnly": true, + "title": "Name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "name" + } + }, + "ndu.serDes.value": { + "description": "Serdes value", + "readOnly": true, + "title": "Value", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "value" + } + }, + "ndu.serDes.status": { + "description": "Serdes status", + "enum": [ + "set", + "unknown", + "inProgress", + "failed", + "notSupported" + ], + "readOnly": true, + "title": "Status", + "type": "string", + "x-enum-varnames": [ + "Set", + "Unknown", + "In progress", + "Failed", + "Not supported" + ], + "x-oapi-codegen-extra-tags": { + "bson": "status" + } + }, + "ndu.inventory": { + "properties": { + "hardwareVersion": { + "$ref": "#/components/schemas/ndu.inventory.hardwareVersion" + }, + "actualType": { + "$ref": "#/components/schemas/ndu.inventory.actualType" + }, + "PON": { + "$ref": "#/components/schemas/ndu.inventory.pon" + }, + "serialNumber": { + "$ref": "#/components/schemas/ndu.inventory.serialNumber" + }, + "clei": { + "$ref": "#/components/schemas/ndu.inventory.clei" + }, + "vendor": { + "$ref": "#/components/schemas/ndu.inventory.vendor" + }, + "partNumber": { + "$ref": "#/components/schemas/ndu.inventory.partNumber" + }, + "manufactureDate": { + "$ref": "#/components/schemas/ndu.inventory.manufactureDate" + }, + "fwName": { + "$ref": "#/components/schemas/ndu.inventory.fwName" + }, + "fwVersion": { + "$ref": "#/components/schemas/ndu.inventory.fwVersion" + }, + "expectedFWVersion": { + "$ref": "#/components/schemas/ndu.inventory.expectedFWVersion" + }, + "fwStatus": { + "$ref": "#/components/schemas/ndu.inventory.fwStatus" + } + }, + "x-oapi-codegen-extra-tags": { + "bson": "hardwareVersion" + } + }, + "ndu.inventory.hardwareVersion": { + "readOnly": true, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "inventory" + } + }, + "ndu.inventory.actualType": { + "readOnly": true, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "actualType" + } + }, + "ndu.inventory.pon": { + "readOnly": true, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "PON" + } + }, + "ndu.inventory.serialNumber": { + "readOnly": true, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "serialNumber" + } + }, + "ndu.inventory.clei": { + "readOnly": true, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "clei" + } + }, + "ndu.inventory.vendor": { + "readOnly": true, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "vendor" + } + }, + "ndu.inventory.partNumber": { + "readOnly": true, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "partNumber" + } + }, + "ndu.inventory.manufactureDate": { + "readOnly": true, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "manufactureDate" + } + }, + "ndu.inventory.fwName": { + "readOnly": true, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "fwName" + } + }, + "ndu.inventory.fwVersion": { + "readOnly": true, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "fwVersion" + } + }, + "ndu.inventory.expectedFWVersion": { + "readOnly": true, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "expectedFWVersion" + } + }, + "ndu.inventory.fwStatus": { + "enum": [ + "notApplicable", + "current", + "notCurrent", + "unavailable" + ], + "readOnly": true, + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "fwStatus" + } + }, + "ndu.xr.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "xrAid" + } + }, + "ndu.xr.parentAid": { + "items": { + "$ref": "#/components/schemas/ndu.port.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "ndu.edfa.label": { + "description": "User defined label", + "maxLength": 64, + "title": "Name", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "name" + } + }, + "ndu.edfa.function": { + "description": "booster amplifier or pre-amplifier", + "enum": [ + "pa", + "ba" + ], + "title": "Function", + "type": "string", + "x-enum-varnames": [ + "Pre-amplifier", + "Booster amplifier" + ], + "x-oapi-codegen-extra-tags": { + "bson": "function" + } + }, + "ndu.edfa.amplifierEnable": { + "description": "The enable switch for the amplifier.", + "enum": [ + "enabled", + "disabled" + ], + "title": "Status", + "type": "string", + "x-enum-varnames": [ + "Enabled", + "Disabled" + ], + "x-oapi-codegen-extra-tags": { + "bson": "amplifierEnable" + } + }, + "ndu.edfa.controlMode": { + "description": "Mode of control of the amplifier (user defined targeting or automatic power targeting)", + "enum": [ + "autoMaxPw", + "manual" + ], + "title": "Power Control", + "type": "string", + "x-enum-varnames": [ + "Automatic", + "Manual" + ], + "x-oapi-codegen-extra-tags": { + "bson": "controlMode" + } + }, + "ndu.edfa.amplifierMode": { + "description": "Mode of operation.", + "enum": [ + "constantPower", + "constantGain" + ], + "title": "Amplifier Mode", + "type": "string", + "x-enum-varnames": [ + "Power control", + "Gain control" + ], + "x-oapi-codegen-extra-tags": { + "bson": "amplifierMode" + } + }, + "ndu.edfa.gainTarget": { + "description": "Target gain to be achieved by the amplifier.", + "format": "double", + "title": "Target Gain", + "type": "number", + "x-oapi-codegen-extra-tags": { + "bson": "gainTarget" + } + }, + "ndu.edfa.optimumEdfaGain": { + "description": "Optimum EDFA gain of the emplifier", + "format": "double", + "readOnly": true, + "type": "number", + "x-oapi-codegen-extra-tags": { + "bson": "optimumEdfaGain" + } + }, + "ndu.edfa.inputPowerMon": { + "description": "Monitored input power.", + "format": "double", + "readOnly": true, + "type": "number", + "x-oapi-codegen-extra-tags": { + "bson": "inputPowerMon" + } + }, + "ndu.edfa.outputPowerMon": { + "description": "Monitored output power", + "format": "double", + "readOnly": true, + "type": "number", + "x-oapi-codegen-extra-tags": { + "bson": "outputPowerMon" + } + }, + "ndu.edfa.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "edfaAid" + } + }, + "ndu.edfa.parentAid": { + "items": { + "$ref": "#/components/schemas/ndu.port.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "ndu.voa.outputVoaAttenuation": { + "default": 0, + "description": "Attenuation setting on VOA. \nRange 0.. 20, \nUnit: dB, \nDefault: 0\n", + "format": "double", + "maximum": 20, + "minimum": 0, + "title": "VOA Attenuation", + "type": "number", + "x-unit": "dB", + "x-oapi-codegen-extra-tags": { + "bson": "outputVoaAttenuation" + } + }, + "ndu.voa.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "voaAid" + } + }, + "ndu.voa.parentAid": { + "items": { + "$ref": "#/components/schemas/ndu.port.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "ndu.voa.outputVoaActual": { + "description": "Attenuation setting monitor (actual)", + "readOnly": true, + "title": "Actual VOA Attenuation", + "type": "integer", + "x-oapi-codegen-extra-tags": { + "bson": "outputVoaActual" + } + }, + "ndu.voa.inputPowerMon": { + "description": "Monitored input power", + "format": "double", + "readOnly": true, + "title": "Input power", + "type": "number", + "x-oapi-codegen-extra-tags": { + "bson": "inputPowerMon" + } + }, + "ndu.voa.outputPowerMon": { + "description": "Monitored output power", + "format": "double", + "readOnly": true, + "title": "Output power", + "type": "number", + "x-oapi-codegen-extra-tags": { + "bson": "outputPowerMon" + } + }, + "ndu.lineptp.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "linePtpAid" + } + }, + "ndu.lineptp.parentAid": { + "items": { + "$ref": "#/components/schemas/ndu.device.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "ndu.ptp.label": { + "description": "User defined label", + "maxLength": 64, + "title": "Description", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "name" + } + }, + "ndu.ptp.serviceType": { + "enum": [ + "100GBE", + "4x25GBE", + "OTU4" + ], + "title": "Service Type", + "type": "string", + "x-enum-varnames": [ + "100GBE", + "4x25GBE", + "OTU4" + ], + "x-oapi-codegen-extra-tags": { + "bson": "serviceType" + } + }, + "ndu.ptp.tributaryDisableAction": { + "description": "Defines the applicable disable action for the tributary port", + "enum": [ + "laserShutoff", + "sendIdles", + "sendLf" + ], + "title": "Disable action", + "type": "string", + "x-enum-varnames": [ + "Laser shutdown", + "Send idle", + "Send loss of frame" + ], + "x-oapi-codegen-extra-tags": { + "bson": "disableAction" + } + }, + "ndu.ptp.tributaryDisableActionHoldoff": { + "description": "Time in ms before TDA kicks in.", + "maximum": 10000, + "minimum": 0, + "title": "Disable action hold-off time", + "type": "integer", + "x-unit": "ms", + "x-oapi-codegen-extra-tags": { + "bson": "disableActionHoldOff" + } + }, + "ndu.ptp.powerThresholdLow": { + "description": "The threshold below which the system raises the OPR-OORL alarm. \nRange: -55.00 to +55.00 \nUnits: dBm\n", + "format": "double", + "maximum": 55, + "minimum": -55, + "title": "Under Power Threshold", + "type": "number", + "x-unit": "dB", + "x-oapi-codegen-extra-tags": { + "bson": "powerThresholdLow" + } + }, + "ndu.ptp.powerThresholdLowOffset": { + "description": "Adjustment factor for low alarm. \nThe effective threshold will be (threshold-low + threshold-low-offset). \nRange: -10.00 to +10.00\nUnits: dB\n", + "format": "double", + "maximum": 10, + "minimum": -10, + "title": "Under Power Threshold Offset", + "type": "number", + "x-unit": "dB", + "x-oapi-codegen-extra-tags": { + "bson": "powerThresholdLowOffset" + } + }, + "ndu.ptp.powerThresholdHigh": { + "description": "The threshold above which the system raises the OPR-OORH alarm. \nRange: -55.00 to +55.00 \nUnits: dB\n", + "format": "double", + "maximum": 55, + "minimum": -55, + "title": "Over Power Threshold", + "type": "number", + "x-unit": "dB", + "x-oapi-codegen-extra-tags": { + "bson": "powerThresholdHigh" + } + }, + "ndu.ptp.powerThresholdHighOffset": { + "description": "Adjustment factor for low alarm.\nThe effective threshold will be (threshold-high+ threshold-high-offset)\nRange: -10.00 to +10.00 \nUnits: dB\n", + "format": "double", + "maximum": 10, + "minimum": -10, + "title": "Over Power Threshold Offset", + "type": "number", + "x-unit": "dB", + "x-oapi-codegen-extra-tags": { + "bson": "powerThresholdHighOffset" + } + }, + "ndu.ptp.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "tribPtpAid" + } + }, + "xr.ndu.otu.txTTI": { + "default": "", + "description": "Up to 64 byte string for transmitting as TTI.", + "maxLength": 64, + "title": "Transmit TTI", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "txTTI" + } + }, + "xr.ndu.otu.expectedTTI": { + "default": "", + "description": "Up to 64 byte string of TTI that is expected to be received.", + "maxLength": 64, + "title": "Expected TTI", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "expectedTTI" + } + }, + "xr.ndu.otu.diagnostic.facPRBSGen": { + "default": "disabled", + "description": "Enable/Disable facility PRBS test pattern generation", + "enum": [ + "enabled", + "disabled" + ], + "title": "Facility PRBS generation", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "facPRBSGen" + } + }, + "xr.ndu.otu.diagnostic.facPRBSMon": { + "default": "disabled", + "description": "Enable/Disable facility PRBS test pattern monitoring", + "enum": [ + "enabled", + "disabled" + ], + "title": "Facility PRBS monitoring", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "facPRBSMon" + } + }, + "xr.ndu.otu.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "otuAid" + } + }, + "xr.ndu.otu.parentAid": { + "items": { + "$ref": "#/components/schemas/ndu.device.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.ndu.otu.otuType": { + "description": "OTU Type", + "enum": [ + "OTUCni", + "OTUCn", + "OTUCni-M", + "OTU4" + ], + "readOnly": true, + "title": "OTU type", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "otuType" + } + }, + "xr.ndu.otu.rate": { + "description": "Rate of the OTU.", + "enum": [ + 25, + 50, + 100, + 200, + 400 + ], + "readOnly": true, + "title": "Rate", + "type": "integer", + "x-unit": "Gbps", + "x-oapi-codegen-extra-tags": { + "bson": "rate" + } + }, + "xr.ndu.otu.rxTTI": { + "description": "Up to 64 byte string of received TTI.", + "maxLength": 64, + "readOnly": true, + "title": "Received TTI", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "rxTTI" + } + }, + "xr.ndu.otu.odu.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "oduAid" + } + }, + "xr.ndu.otu.odu.parentAid": { + "items": { + "$ref": "#/components/schemas/ndu.carrier.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "ndu.carrier.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "carrierAid" + } + }, + "xr.ndu.otu.odu.oduType": { + "description": "ODU type", + "enum": [ + "ODUCni", + "ODUflexi", + "ODUCni-M", + "ODU4i" + ], + "readOnly": true, + "title": "ODU type", + "type": "string", + "x-enum-varnames": [ + "ODUCni", + "ODUflexi", + "ODUCni-M", + "ODU4i" + ], + "x-oapi-codegen-extra-tags": { + "bson": "oduType" + } + }, + "xr.ndu.ethernet.fecMode": { + "default": "enabled", + "description": "Forward error correction mode of operation", + "enum": [ + "enabled", + "disabled" + ], + "title": "Forward error correction mode", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "fecMode" + } + }, + "xr.ndu.ethernet.diagnostic.loopbackType": { + "default": "loopbackAndContinue", + "description": "Loopback type. - 'loopbackAndContinue': Signal is looped back and is also forwarded downstream. - 'loopback': Signal is looped back and LF maintenance signal is sent downstream.\n", + "enum": [ + "loopbackAndContinue", + "loopback" + ], + "title": "Loopback type", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "loopbackType" + } + }, + "xr.ndu.ethernet.diagnostic.loopbackMode": { + "default": "disabled", + "description": "Post-FEC Loopback mode for the ethernet client.", + "enum": [ + "disabled", + "facility", + "terminal" + ], + "title": "Loopback mode", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "loopbackMode" + } + }, + "xr.ndu.ethernet.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "clientIfAid" + } + }, + "xr.ndu.ethernet.parentAid": { + "items": { + "$ref": "#/components/schemas/ndu.device.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "xr.ndu.ethernet.portSpeed": { + "description": "Ethernet port speed in Gbps", + "enum": [ + 100, + 400, + 200, + 50, + 25 + ], + "readOnly": true, + "title": "Port speed", + "type": "integer", + "x-unit": "Gbps", + "x-oapi-codegen-extra-tags": { + "bson": "clientIfPortSpeed" + } + }, + "xr.ndu.ethernet.fecType": { + "description": "Automatically set by the module based on SerDes and Port configuration.", + "enum": [ + "KR4", + "KP4" + ], + "readOnly": true, + "title": "Fec type", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "fecType" + } + }, + "ndu.trail.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "maxLength": 64, + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "trailAid" + } + }, + "ndu.trail.parentAid": { + "items": { + "$ref": "#/components/schemas/ndu.device.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "ndu.trail.trailType": { + "default": "biDir", + "description": "Directionality of the LC", + "enum": [ + "biDir" + ], + "title": "Directionality", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "trailType" + } + }, + "ndu.trail.Aid_A": { + "description": "Points to the AID of the connected resource A of the trail.", + "title": "Client side AID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "clientAid" + } + }, + "ndu.trail.Aid_Z": { + "description": "Points to the AID of the connected resource Z of the trail.", + "readOnly": true, + "title": "Line side AID", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "lineAid" + } + }, + "ndu.fan.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "readOnly": true, + "title": "Access identifier", + "type": "string" + }, + "ndu.fan.parentAid": { + "items": { + "$ref": "#/components/schemas/ndu.device.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "ndu.pem.availablePower": { + "format": "double", + "readOnly": true, + "title": "Available Power", + "type": "number" + }, + "ndu.pem.pemUnderVoltageThreshold": { + "description": "Ranges:\n- 40.5 to 57.0 for DC PEM,\n- 100 to 260V for AC PEM\n", + "format": "double", + "title": "Under Voltage Threshold", + "type": "number" + }, + "ndu.pem.pemOverVoltageThreshold": { + "description": "Ranges:\n- 40.5 to -57.0 for DC PEM,\n- 100 to 260V for AC PEM\n", + "format": "double", + "title": "Over Voltage Threshold", + "type": "number" + }, + "ndu.leds.aid": { + "description": "Access Identifier (AID) - unique instance within a device and specific resource type.", + "readOnly": true, + "title": "Access identifier", + "type": "string", + "x-oapi-codegen-extra-tags": { + "bson": "ledsAid" + } + }, + "ndu.leds.parentAid": { + "items": { + "$ref": "#/components/schemas/ndu.device.aid" + }, + "maxItems": 1, + "minItems": 1, + "readOnly": true, + "type": "array", + "x-oapi-codegen-extra-tags": { + "bson": "parentAid" + } + }, + "ndu.leds.leds": { + "items": { + "$ref": "#/components/schemas/ndu.ledState" + }, + "readOnly": true, + "type": "array", + "uniqueItems": true, + "x-oapi-codegen-extra-tags": { + "bson": "leds" + } + }, + "ndu.ledState": { + "properties": { + "ledId": { + "$ref": "#/components/schemas/ndu.ledState.ledId" + }, + "state": { + "$ref": "#/components/schemas/ndu.ledState.state" + } + }, + "type": "object" + }, + "ndu.ledState.ledId": { + "enum": [ + "CFP_RX", + "CFP_TX", + "POL_Upper", + "POL_Lower", + "QSFP28_1_RX", + "QSFP28_2_RX", + "QSFP28_1_TX", + "QSFP28_2_TX", + "QSFP28_1_Service", + "QSFP28_2_Service", + "Maintenance", + "IpAuth", + "Power", + "Status", + "Fips" + ], + "readOnly": true, + "type": "string", + "x-enum-varnames": [ + "CFP_RX", + "CFP_TX", + "POL_Upper", + "POL_Lower", + "QSFP28 Port #1 RX", + "QSFP28 Port #2 RX", + "QSFP28 Port #1 TX", + "QSFP28 Port #2 TX", + "QSFP28 Port #1 Service", + "QSFP28 Port #2 Service", + "Maintenance", + "IP Authentication", + "Power", + "Status", + "Fips" + ], + "x-oapi-codegen-extra-tags": { + "bson": "ledId" + } + }, + "ndu.ledState.state": { + "enum": [ + "Unknown", + "Off", + "Green", + "GreenSlowSingleFlash", + "GreenSlowDoubleFlash", + "GreenSlowIsoPhase", + "GreenQuickIsoPhase", + "GreenFastIsoPhase", + "GreenOneSecondFlicker", + "GreenTwoSecondFlicker", + "GreenInvertedSingleFlash", + "GreenInvertedDoubleFlash", + "Red", + "RedSlowSingleFlash", + "RedSlowDoubleFlash", + "RedSlowIsoPhase", + "RedQuickIsoPhase", + "RedInvertedSingleFlash", + "RedInvertedDoubleFlash", + "Yellow", + "YellowSlowIsoPhase", + "GreenRedSlowIsoPhase" + ], + "readOnly": true, + "type": "string", + "x-enum-varnames": [ + "Unknown", + "Off", + "Green", + "GreenSlowSingleFlash", + "GreenSlowDoubleFlash", + "GreenSlowIsoPhase", + "GreenQuickIsoPhase", + "GreenFastIsoPhase", + "GreenOneSecondFlicker", + "GreenTwoSecondFlicker", + "GreenInvertedSingleFlash", + "GreenInvertedDoubleFlash", + "Red", + "RedSlowSingleFlash", + "RedSlowDoubleFlash", + "RedSlowIsoPhase", + "RedQuickIsoPhase", + "RedInvertedSingleFlash", + "RedInvertedDoubleFlash", + "Yellow", + "YellowSlowIsoPhase", + "GreenRedSlowIsoPhase" + ], + "x-oapi-codegen-extra-tags": { + "bson": "state" + } + } + } + } +} diff --git a/src/device/service/drivers/xr/setup_test_env.sh b/src/device/service/drivers/xr/setup_test_env.sh new file mode 100755 index 0000000000000000000000000000000000000000..1f8b0a5a7a8dc986715c6f54a62151f6afa4ad80 --- /dev/null +++ b/src/device/service/drivers/xr/setup_test_env.sh @@ -0,0 +1,9 @@ +#!/bin/sh +export CONTEXTSERVICE_SERVICE_HOST=$(kubectl get service/contextservice --namespace tfs --template '{{.spec.clusterIP}}') +export CONTEXTSERVICE_SERVICE_PORT_GRPC=$(kubectl get service/contextservice --namespace tfs -o jsonpath='{.spec.ports[?(@.name=="grpc")].port}') +export COMPUTESERVICE_SERVICE_HOST=$(kubectl get service/computeservice --namespace tfs --template '{{.spec.clusterIP}}') +export COMPUTESERVICE_SERVICE_PORT_HTTP=$(kubectl get service/computeservice --namespace tfs -o jsonpath='{.spec.ports[?(@.name=="http")].port}') +echo "CONTEXTSERVICE_SERVICE_HOST=$CONTEXTSERVICE_SERVICE_HOST" +echo "CONTEXTSERVICE_SERVICE_PORT_GRPC=$CONTEXTSERVICE_SERVICE_PORT_GRPC" +echo "COMPUTESERVICE_SERVICE_HOST=$COMPUTESERVICE_SERVICE_HOST" +echo "COMPUTESERVICE_SERVICE_PORT_HTTP=$COMPUTESERVICE_SERVICE_PORT_HTTP" diff --git a/src/dlt/connector/service/DltConnectorServiceServicerImpl.py b/src/dlt/connector/service/DltConnectorServiceServicerImpl.py index 6c5401cb1724f8a759001d790e835ab78ce4c6c6..9af1ae6ead6fa66722e9d92d96ed07e2731c5ab4 100644 --- a/src/dlt/connector/service/DltConnectorServiceServicerImpl.py +++ b/src/dlt/connector/service/DltConnectorServiceServicerImpl.py @@ -13,11 +13,12 @@ # limitations under the License. import grpc, logging -from common.proto.context_pb2 import DeviceId, Empty, LinkId, ServiceId, SliceId, TopologyId +from typing import Optional +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.proto.context_pb2 import Empty, TopologyId from common.proto.dlt_connector_pb2 import DltDeviceId, DltLinkId, DltServiceId, DltSliceId from common.proto.dlt_connector_pb2_grpc import DltConnectorServiceServicer from common.proto.dlt_gateway_pb2 import DltRecord, DltRecordId, DltRecordOperationEnum, DltRecordTypeEnum -from common.rpc_method_wrapper.Decorator import create_metrics, safe_and_metered_rpc_method from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient from dlt.connector.client.DltGatewayClient import DltGatewayClient @@ -25,137 +26,122 @@ from .tools.Checkers import record_exists LOGGER = logging.getLogger(__name__) -SERVICE_NAME = 'DltConnector' -METHOD_NAMES = [ - 'RecordAll', - 'RecordAllDevices', 'RecordDevice', - 'RecordAllLinks', 'RecordLink', - 'RecordAllServices', 'RecordService', - 'RecordAllSlices', 'RecordSlice', -] -METRICS = create_metrics(SERVICE_NAME, METHOD_NAMES) +METRICS_POOL = MetricsPool('DltConnector', 'RPC') class DltConnectorServiceServicerImpl(DltConnectorServiceServicer): def __init__(self): LOGGER.debug('Creating Servicer...') LOGGER.debug('Servicer Created') - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RecordAll(self, request : TopologyId, context : grpc.ServicerContext) -> Empty: return Empty() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RecordAllDevices(self, request : TopologyId, context : grpc.ServicerContext) -> Empty: return Empty() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RecordDevice(self, request : DltDeviceId, context : grpc.ServicerContext) -> Empty: - context_client = ContextClient() - device = context_client.GetDevice(request.device_id) - - dltgateway_client = DltGatewayClient() - - dlt_record_id = DltRecordId() - dlt_record_id.domain_uuid.uuid = request.topology_id.topology_uuid.uuid - dlt_record_id.type = DltRecordTypeEnum.DLTRECORDTYPE_DEVICE - dlt_record_id.record_uuid.uuid = device.device_id.device_uuid.uuid - - LOGGER.info('[RecordDevice] sent dlt_record_id = {:s}'.format(grpc_message_to_json_string(dlt_record_id))) - dlt_record = dltgateway_client.GetFromDlt(dlt_record_id) - LOGGER.info('[RecordDevice] recv dlt_record = {:s}'.format(grpc_message_to_json_string(dlt_record))) - - exists = record_exists(dlt_record) - LOGGER.info('[RecordDevice] exists = {:s}'.format(str(exists))) - - dlt_record = DltRecord() - dlt_record.record_id.CopyFrom(dlt_record_id) - dlt_record.operation = \ - DltRecordOperationEnum.DLTRECORDOPERATION_UPDATE \ - if exists else \ - DltRecordOperationEnum.DLTRECORDOPERATION_ADD - - dlt_record.data_json = grpc_message_to_json_string(device) - LOGGER.info('[RecordDevice] sent dlt_record = {:s}'.format(grpc_message_to_json_string(dlt_record))) - dlt_record_status = dltgateway_client.RecordToDlt(dlt_record) - LOGGER.info('[RecordDevice] recv dlt_record_status = {:s}'.format(grpc_message_to_json_string(dlt_record_status))) + data_json = None + if not request.delete: + context_client = ContextClient() + device = context_client.GetDevice(request.device_id) + data_json = grpc_message_to_json_string(device) + + self._record_entity( + request.topology_id.topology_uuid.uuid, DltRecordTypeEnum.DLTRECORDTYPE_DEVICE, + request.device_id.device_uuid.uuid, request.delete, data_json) return Empty() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RecordAllLinks(self, request : TopologyId, context : grpc.ServicerContext) -> Empty: return Empty() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RecordLink(self, request : DltLinkId, context : grpc.ServicerContext) -> Empty: - context_client = ContextClient() - link = context_client.GetLink(request.link_id) - - dltgateway_client = DltGatewayClient() - - dlt_record_id = DltRecordId() - dlt_record_id.domain_uuid.uuid = request.topology_id.topology_uuid.uuid - dlt_record_id.type = DltRecordTypeEnum.DLTRECORDTYPE_LINK - dlt_record_id.record_uuid.uuid = link.link_id.link_uuid.uuid - - LOGGER.info('[RecordLink] sent dlt_record_id = {:s}'.format(grpc_message_to_json_string(dlt_record_id))) - dlt_record = dltgateway_client.GetFromDlt(dlt_record_id) - LOGGER.info('[RecordLink] recv dlt_record = {:s}'.format(grpc_message_to_json_string(dlt_record))) - - exists = record_exists(dlt_record) - LOGGER.info('[RecordLink] exists = {:s}'.format(str(exists))) - - dlt_record = DltRecord() - dlt_record.record_id.CopyFrom(dlt_record_id) - dlt_record.operation = \ - DltRecordOperationEnum.DLTRECORDOPERATION_UPDATE \ - if exists else \ - DltRecordOperationEnum.DLTRECORDOPERATION_ADD - - dlt_record.data_json = grpc_message_to_json_string(link) - LOGGER.info('[RecordLink] sent dlt_record = {:s}'.format(grpc_message_to_json_string(dlt_record))) - dlt_record_status = dltgateway_client.RecordToDlt(dlt_record) - LOGGER.info('[RecordLink] recv dlt_record_status = {:s}'.format(grpc_message_to_json_string(dlt_record_status))) + data_json = None + if not request.delete: + context_client = ContextClient() + link = context_client.GetLink(request.link_id) + data_json = grpc_message_to_json_string(link) + + self._record_entity( + request.topology_id.topology_uuid.uuid, DltRecordTypeEnum.DLTRECORDTYPE_LINK, + request.link_id.link_uuid.uuid, request.delete, data_json) return Empty() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RecordAllServices(self, request : TopologyId, context : grpc.ServicerContext) -> Empty: return Empty() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RecordService(self, request : DltServiceId, context : grpc.ServicerContext) -> Empty: + data_json = None + if not request.delete: + context_client = ContextClient() + service = context_client.GetService(request.service_id) + data_json = grpc_message_to_json_string(service) + + self._record_entity( + request.topology_id.topology_uuid.uuid, DltRecordTypeEnum.DLTRECORDTYPE_SERVICE, + request.service_id.service_uuid.uuid, request.delete, data_json) return Empty() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RecordAllSlices(self, request : TopologyId, context : grpc.ServicerContext) -> Empty: return Empty() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RecordSlice(self, request : DltSliceId, context : grpc.ServicerContext) -> Empty: - context_client = ContextClient() - slice_ = context_client.GetSlice(request.slice_id) + data_json = None + if not request.delete: + context_client = ContextClient() + slice_ = context_client.GetSlice(request.slice_id) + data_json = grpc_message_to_json_string(slice_) + + self._record_entity( + request.topology_id.topology_uuid.uuid, DltRecordTypeEnum.DLTRECORDTYPE_SLICE, + request.slice_id.slice_uuid.uuid, request.delete, data_json) + return Empty() + def _record_entity( + self, dlt_domain_uuid : str, dlt_record_type : DltRecordTypeEnum, dlt_record_uuid : str, delete : bool, + data_json : Optional[str] = None + ) -> None: dltgateway_client = DltGatewayClient() dlt_record_id = DltRecordId() - dlt_record_id.domain_uuid.uuid = request.topology_id.topology_uuid.uuid - dlt_record_id.type = DltRecordTypeEnum.DLTRECORDTYPE_SLICE - dlt_record_id.record_uuid.uuid = slice_.slice_id.slice_uuid.uuid + dlt_record_id.domain_uuid.uuid = dlt_domain_uuid # pylint: disable=no-member + dlt_record_id.type = dlt_record_type + dlt_record_id.record_uuid.uuid = dlt_record_uuid # pylint: disable=no-member - LOGGER.info('[RecordSlice] sent dlt_record_id = {:s}'.format(grpc_message_to_json_string(dlt_record_id))) + str_dlt_record_id = grpc_message_to_json_string(dlt_record_id) + LOGGER.debug('[_record_entity] sent dlt_record_id = {:s}'.format(str_dlt_record_id)) dlt_record = dltgateway_client.GetFromDlt(dlt_record_id) - LOGGER.info('[RecordSlice] recv dlt_record = {:s}'.format(grpc_message_to_json_string(dlt_record))) + str_dlt_record = grpc_message_to_json_string(dlt_record) + LOGGER.debug('[_record_entity] recv dlt_record = {:s}'.format(str_dlt_record)) exists = record_exists(dlt_record) - LOGGER.info('[RecordSlice] exists = {:s}'.format(str(exists))) + LOGGER.debug('[_record_entity] exists = {:s}'.format(str(exists))) dlt_record = DltRecord() - dlt_record.record_id.CopyFrom(dlt_record_id) - dlt_record.operation = \ - DltRecordOperationEnum.DLTRECORDOPERATION_UPDATE \ - if exists else \ - DltRecordOperationEnum.DLTRECORDOPERATION_ADD - - dlt_record.data_json = grpc_message_to_json_string(slice_) - LOGGER.info('[RecordSlice] sent dlt_record = {:s}'.format(grpc_message_to_json_string(dlt_record))) + dlt_record.record_id.CopyFrom(dlt_record_id) # pylint: disable=no-member + if delete and exists: + dlt_record.operation = DltRecordOperationEnum.DLTRECORDOPERATION_DELETE + elif not delete and exists: + dlt_record.operation = DltRecordOperationEnum.DLTRECORDOPERATION_UPDATE + if data_json is None: raise Exception('data_json must be provided when updating') + dlt_record.data_json = data_json + elif not delete and not exists: + dlt_record.operation = DltRecordOperationEnum.DLTRECORDOPERATION_ADD + if data_json is None: raise Exception('data_json must be provided when adding') + dlt_record.data_json = data_json + else: + return + + str_dlt_record = grpc_message_to_json_string(dlt_record) + LOGGER.debug('[_record_entity] sent dlt_record = {:s}'.format(str_dlt_record)) dlt_record_status = dltgateway_client.RecordToDlt(dlt_record) - LOGGER.info('[RecordSlice] recv dlt_record_status = {:s}'.format(grpc_message_to_json_string(dlt_record_status))) - return Empty() + str_dlt_record_status = grpc_message_to_json_string(dlt_record_status) + LOGGER.debug('[_record_entity] recv dlt_record_status = {:s}'.format(str_dlt_record_status)) diff --git a/src/interdomain/service/InterdomainServiceServicerImpl.py b/src/interdomain/service/InterdomainServiceServicerImpl.py index a178095aeee81c3e6407cf1c6706b047fd1c65fc..3fb3e72b9b7e2f4c8ea03f0bb2dfce76ac4fcbcd 100644 --- a/src/interdomain/service/InterdomainServiceServicerImpl.py +++ b/src/interdomain/service/InterdomainServiceServicerImpl.py @@ -16,7 +16,7 @@ import grpc, logging, uuid from common.Constants import DEFAULT_CONTEXT_UUID, DEFAULT_TOPOLOGY_UUID from common.proto.context_pb2 import AuthenticationResult, Slice, SliceId, SliceStatusEnum, TeraFlowController, TopologyId from common.proto.interdomain_pb2_grpc import InterdomainServiceServicer -from common.rpc_method_wrapper.Decorator import create_metrics, safe_and_metered_rpc_method +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.tools.context_queries.Context import create_context from common.tools.context_queries.InterDomain import ( compute_interdomain_path, compute_traversed_domains, get_local_device_uuids, is_inter_domain, is_multi_domain) @@ -33,9 +33,7 @@ from .Tools import compose_slice, compute_slice_owner, map_abstract_endpoints_to LOGGER = logging.getLogger(__name__) -SERVICE_NAME = 'Interdomain' -METHOD_NAMES = ['RequestSlice', 'Authenticate', 'LookUpSlice', 'OrderSliceFromCatalog', 'CreateSliceAndAddToCatalog'] -METRICS = create_metrics(SERVICE_NAME, METHOD_NAMES) +METRICS_POOL = MetricsPool('Interdomain', 'RPC') class InterdomainServiceServicerImpl(InterdomainServiceServicer): def __init__(self, remote_domain_clients : RemoteDomainClients): @@ -43,7 +41,7 @@ class InterdomainServiceServicerImpl(InterdomainServiceServicer): self.remote_domain_clients = remote_domain_clients LOGGER.debug('Servicer Created') - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RequestSlice(self, request : Slice, context : grpc.ServicerContext) -> SliceId: context_client = ContextClient() pathcomp_client = PathCompClient() @@ -133,14 +131,14 @@ class InterdomainServiceServicerImpl(InterdomainServiceServicer): slice_id = context_client.SetSlice(reply) return slice_id - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def Authenticate(self, request : TeraFlowController, context : grpc.ServicerContext) -> AuthenticationResult: auth_result = AuthenticationResult() auth_result.context_id.CopyFrom(request.context_id) # pylint: disable=no-member auth_result.authenticated = True return auth_result - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def LookUpSlice(self, request : Slice, context : grpc.ServicerContext) -> SliceId: try: context_client = ContextClient() @@ -150,12 +148,12 @@ class InterdomainServiceServicerImpl(InterdomainServiceServicer): #LOGGER.exception('Unable to get slice({:s})'.format(grpc_message_to_json_string(request.slice_id))) return SliceId() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def OrderSliceFromCatalog(self, request : Slice, context : grpc.ServicerContext) -> Slice: raise NotImplementedError('OrderSliceFromCatalog') #return Slice() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def CreateSliceAndAddToCatalog(self, request : Slice, context : grpc.ServicerContext) -> Slice: context_client = ContextClient() slice_client = SliceClient() diff --git a/src/interdomain/service/_old_code/InterdomainServiceServicerImpl.py b/src/interdomain/service/_old_code/InterdomainServiceServicerImpl.py index 01ba90ef5a6cb098e6d419fa0d6abb450893f8c6..f3818578186360365e3b828810d942def5722cea 100644 --- a/src/interdomain/service/_old_code/InterdomainServiceServicerImpl.py +++ b/src/interdomain/service/_old_code/InterdomainServiceServicerImpl.py @@ -13,7 +13,7 @@ # limitations under the License. import grpc, logging -from common.rpc_method_wrapper.Decorator import create_metrics, safe_and_metered_rpc_method +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.proto.context_pb2 import ( AuthenticationResult, Slice, SliceId, SliceStatus, SliceStatusEnum, TeraFlowController) from common.proto.interdomain_pb2_grpc import InterdomainServiceServicer @@ -24,9 +24,7 @@ from slice.client.SliceClient import SliceClient LOGGER = logging.getLogger(__name__) -SERVICE_NAME = 'Interdomain' -METHOD_NAMES = ['RequestSlice', 'Authenticate', 'LookUpSlice', 'OrderSliceFromCatalog', 'CreateSliceAndAddToCatalog'] -METRICS = create_metrics(SERVICE_NAME, METHOD_NAMES) +METRICS_POOL = MetricsPool('Interdomain', 'RPC') class InterdomainServiceServicerImpl(InterdomainServiceServicer): def __init__(self, remote_domain_clients : RemoteDomainClients): @@ -34,7 +32,7 @@ class InterdomainServiceServicerImpl(InterdomainServiceServicer): self.remote_domain_clients = remote_domain_clients LOGGER.debug('Servicer Created') - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RequestSlice(self, request : Slice, context : grpc.ServicerContext) -> SliceId: context_client = ContextClient() slice_client = SliceClient() @@ -121,14 +119,14 @@ class InterdomainServiceServicerImpl(InterdomainServiceServicer): context_client.SetSlice(reply) return reply.slice_id - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def Authenticate(self, request : TeraFlowController, context : grpc.ServicerContext) -> AuthenticationResult: auth_result = AuthenticationResult() auth_result.context_id.CopyFrom(request.context_id) # pylint: disable=no-member auth_result.authenticated = True return auth_result - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def LookUpSlice(self, request : Slice, context : grpc.ServicerContext) -> SliceId: try: context_client = ContextClient() @@ -138,12 +136,12 @@ class InterdomainServiceServicerImpl(InterdomainServiceServicer): #LOGGER.exception('Unable to get slice({:s})'.format(grpc_message_to_json_string(request.slice_id))) return SliceId() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def OrderSliceFromCatalog(self, request : Slice, context : grpc.ServicerContext) -> Slice: raise NotImplementedError('OrderSliceFromCatalog') #return Slice() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def CreateSliceAndAddToCatalog(self, request : Slice, context : grpc.ServicerContext) -> Slice: context_client = ContextClient() slice_client = SliceClient() diff --git a/src/monitoring/service/EventTools.py b/src/monitoring/service/EventTools.py index 4999d2a95991d79ed5417948e220d35aa668c653..189e78ce617c69dc4514e9e0b713dece10ef9669 100644 --- a/src/monitoring/service/EventTools.py +++ b/src/monitoring/service/EventTools.py @@ -17,7 +17,7 @@ from queue import Queue import grpc -from common.rpc_method_wrapper.ServiceExceptions import ServiceException +from common.method_wrappers.ServiceExceptions import ServiceException from context.client.ContextClient import ContextClient from common.proto.context_pb2 import Empty, EventTypeEnum diff --git a/src/monitoring/service/MonitoringServiceServicerImpl.py b/src/monitoring/service/MonitoringServiceServicerImpl.py index 548f34c8a07a1d8df17f2702879dbbadf60f6d13..c2bceefd794e3c5bd6acb35e41cef78dc1c205e9 100644 --- a/src/monitoring/service/MonitoringServiceServicerImpl.py +++ b/src/monitoring/service/MonitoringServiceServicerImpl.py @@ -27,7 +27,7 @@ from common.proto.monitoring_pb2_grpc import MonitoringServiceServicer from common.proto.monitoring_pb2 import AlarmResponse, AlarmDescriptor, AlarmList, SubsList, KpiId, \ KpiDescriptor, KpiList, KpiQuery, SubsDescriptor, SubscriptionID, AlarmID, KpiDescriptorList, \ MonitorKpiRequest, Kpi, AlarmSubscription, SubsResponse, RawKpiTable, RawKpi, RawKpiList -from common.rpc_method_wrapper.ServiceExceptions import ServiceException +from common.method_wrappers.ServiceExceptions import ServiceException from common.tools.timestamp.Converters import timestamp_string_to_float, timestamp_utcnow_to_float from monitoring.service import ManagementDBTools, MetricsDBTools diff --git a/src/opticalattackmitigator/service/OpticalAttackMitigatorServiceServicerImpl.py b/src/opticalattackmitigator/service/OpticalAttackMitigatorServiceServicerImpl.py index 4a2dd041b52eaf89bda65acb7ae1e46beed8c48a..39a783ac40218930b1c08bd0a1cf55788ce7f0b9 100644 --- a/src/opticalattackmitigator/service/OpticalAttackMitigatorServiceServicerImpl.py +++ b/src/opticalattackmitigator/service/OpticalAttackMitigatorServiceServicerImpl.py @@ -14,16 +14,14 @@ import os, grpc, logging, random from influxdb import InfluxDBClient -from common.rpc_method_wrapper.Decorator import create_metrics, safe_and_metered_rpc_method +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from opticalattackmitigator.proto.optical_attack_mitigator_pb2_grpc import ( AttackMitigatorServicer) from opticalattackmitigator.proto.optical_attack_mitigator_pb2 import AttackDescription, AttackResponse LOGGER = logging.getLogger(__name__) -SERVICE_NAME = 'OpticalAttackMitigator' -METHOD_NAMES = ['NotifyAttack'] -METRICS = create_metrics(SERVICE_NAME, METHOD_NAMES) +METRICS_POOL = MetricsPool('OpticalAttackMitigator', 'RPC') class OpticalAttackMitigatorServiceServicerImpl(AttackMitigatorServicer): @@ -32,7 +30,7 @@ class OpticalAttackMitigatorServiceServicerImpl(AttackMitigatorServicer): LOGGER.debug('Creating Servicer...') LOGGER.debug('Servicer Created') - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def NotifyAttack(self, request : AttackDescription, context : grpc.ServicerContext) -> AttackResponse: LOGGER.debug(f"NotifyAttack: {request}") response: AttackResponse = AttackResponse() diff --git a/src/opticalcentralizedattackdetector/service/OpticalCentralizedAttackDetectorServiceServicerImpl.py b/src/opticalcentralizedattackdetector/service/OpticalCentralizedAttackDetectorServiceServicerImpl.py index d4c71476f016081f7d230a3cfe87e73b35654987..0009f8d9128983b412ecadb3f1011faa0d29dd88 100644 --- a/src/opticalcentralizedattackdetector/service/OpticalCentralizedAttackDetectorServiceServicerImpl.py +++ b/src/opticalcentralizedattackdetector/service/OpticalCentralizedAttackDetectorServiceServicerImpl.py @@ -14,7 +14,7 @@ import os, grpc, logging, random from influxdb import InfluxDBClient -from common.rpc_method_wrapper.Decorator import create_metrics, safe_and_metered_rpc_method +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from context.client.ContextClient import ContextClient from monitoring.client.MonitoringClient import MonitoringClient from service.client.ServiceClient import ServiceClient @@ -37,9 +37,7 @@ from opticalcentralizedattackdetector.Config import ( LOGGER = logging.getLogger(__name__) -SERVICE_NAME = 'OpticalCentralizedAttackDetector' -METHOD_NAMES = ['NotifyServiceUpdate', 'DetectAttack', 'ReportSummarizedKpi', 'ReportKpi'] -METRICS = create_metrics(SERVICE_NAME, METHOD_NAMES) +METRICS_POOL = MetricsPool('OpticalCentralizedAttackDetector', 'RPC') INFLUXDB_HOSTNAME = os.environ.get("INFLUXDB_HOSTNAME") INFLUXDB_USER = os.environ.get("INFLUXDB_USER") @@ -63,11 +61,11 @@ class OpticalCentralizedAttackDetectorServiceServicerImpl(OpticalCentralizedAtta LOGGER.debug('Creating Servicer...') LOGGER.debug('Servicer Created') - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def NotifyServiceUpdate(self, request : Service, context : grpc.ServicerContext) -> Empty: return Empty() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def DetectAttack(self, request : Empty, context : grpc.ServicerContext) -> Empty: # retrieve list with current contexts @@ -131,10 +129,10 @@ class OpticalCentralizedAttackDetectorServiceServicerImpl(OpticalCentralizedAtta # if attack is detected, run the attack mitigator return Empty() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def ReportSummarizedKpi(self, request : KpiList, context : grpc.ServicerContext) -> Empty: return Empty() - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def ReportKpi(self, request : KpiList, context : grpc.ServicerContext) -> Empty: return Empty() diff --git a/src/pathcomp/backend/pathComp_tools.h b/src/pathcomp/backend/pathComp_tools.h index 8fe704c3932c219e0f04046fcc62d6f1da5f9b66..adbbf30c4fda48564c126369b0aace839cdf5d93 100644 --- a/src/pathcomp/backend/pathComp_tools.h +++ b/src/pathcomp/backend/pathComp_tools.h @@ -121,7 +121,7 @@ struct map_nodes_t { }; #define MAX_NUM_VERTICES 20 // 100 # LGR: reduced from 100 to 20 to divide by 5 the memory used -#define MAX_NUM_EDGES 10 // 100 # LGR: reduced from 100 to 10 to divide by 10 the memory used +#define MAX_NUM_EDGES 20 // 100 # LGR: reduced from 100 to 20 to divide by 5 the memory used // Structures for the graph composition struct targetNodes_t { // remote / targeted node diff --git a/src/pathcomp/frontend/service/PathCompServiceServicerImpl.py b/src/pathcomp/frontend/service/PathCompServiceServicerImpl.py index 205306d0ec2d156a2050d1f95c5c1e990796e018..ca4132754fc4886704cb2984519ebc21a19bfd9c 100644 --- a/src/pathcomp/frontend/service/PathCompServiceServicerImpl.py +++ b/src/pathcomp/frontend/service/PathCompServiceServicerImpl.py @@ -12,12 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc, logging +import grpc, logging, threading from common.Constants import DEFAULT_CONTEXT_UUID, INTERDOMAIN_TOPOLOGY_UUID +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.proto.context_pb2 import ContextId, Empty from common.proto.pathcomp_pb2 import PathCompReply, PathCompRequest from common.proto.pathcomp_pb2_grpc import PathCompServiceServicer -from common.rpc_method_wrapper.Decorator import create_metrics, safe_and_metered_rpc_method from common.tools.context_queries.Device import get_devices_in_topology from common.tools.context_queries.Link import get_links_in_topology from common.tools.context_queries.InterDomain import is_inter_domain @@ -28,20 +28,19 @@ from pathcomp.frontend.service.algorithms.Factory import get_algorithm LOGGER = logging.getLogger(__name__) -SERVICE_NAME = 'PathComp' -METHOD_NAMES = ['Compute'] -METRICS = create_metrics(SERVICE_NAME, METHOD_NAMES) +METRICS_POOL = MetricsPool('PathComp', 'RPC') ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_UUID)) class PathCompServiceServicerImpl(PathCompServiceServicer): def __init__(self) -> None: LOGGER.debug('Creating Servicer...') + self._lock = threading.Lock() LOGGER.debug('Servicer Created') - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def Compute(self, request : PathCompRequest, context : grpc.ServicerContext) -> PathCompReply: - LOGGER.info('[Compute] begin ; request = {:s}'.format(grpc_message_to_json_string(request))) + LOGGER.debug('[Compute] begin ; request = {:s}'.format(grpc_message_to_json_string(request))) context_client = ContextClient() @@ -68,8 +67,10 @@ class PathCompServiceServicerImpl(PathCompServiceServicer): #import time #ts = time.time() #algorithm.execute('request-{:f}.json'.format(ts), 'reply-{:f}.json'.format(ts)) - algorithm.execute() + with self._lock: + # ensure backend receives requests one at a time + algorithm.execute() reply = algorithm.get_reply() - LOGGER.info('[Compute] end ; reply = {:s}'.format(grpc_message_to_json_string(reply))) + LOGGER.debug('[Compute] end ; reply = {:s}'.format(grpc_message_to_json_string(reply))) return reply diff --git a/src/pathcomp/frontend/service/algorithms/_Algorithm.py b/src/pathcomp/frontend/service/algorithms/_Algorithm.py index 3833642457bc5f8c2ba7b7d09f384a87dfabe41d..a24ef769313c7d71d28e6bcc5526cbc398e05c08 100644 --- a/src/pathcomp/frontend/service/algorithms/_Algorithm.py +++ b/src/pathcomp/frontend/service/algorithms/_Algorithm.py @@ -93,22 +93,22 @@ class _Algorithm: def execute(self, dump_request_filename : Optional[str] = None, dump_reply_filename : Optional[str] = None) -> None: request = {'serviceList': self.service_list, 'deviceList': self.device_list, 'linkList': self.link_list} - self.logger.info('[execute] request={:s}'.format(str(request))) + self.logger.debug('[execute] request={:s}'.format(str(request))) if dump_request_filename is not None: with open(dump_request_filename, 'w', encoding='UTF-8') as f: f.write(json.dumps(request, sort_keys=True, indent=4)) - self.logger.info('[execute] BACKEND_URL: {:s}'.format(str(BACKEND_URL))) + self.logger.debug('[execute] BACKEND_URL: {:s}'.format(str(BACKEND_URL))) reply = requests.post(BACKEND_URL, json=request) self.status_code = reply.status_code self.raw_reply = reply.content.decode('UTF-8') - self.logger.info('[execute] status_code={:s} reply={:s}'.format(str(reply.status_code), str(self.raw_reply))) + self.logger.debug('[execute] status_code={:s} reply={:s}'.format(str(reply.status_code), str(self.raw_reply))) if dump_reply_filename is not None: with open(dump_reply_filename, 'w', encoding='UTF-8') as f: f.write('status_code={:s} reply={:s}'.format(str(self.status_code), str(self.raw_reply))) - if reply.status_code not in {requests.codes.ok}: + if reply.status_code not in {requests.codes.ok}: # pylint: disable=no-member raise Exception('Backend error({:s}) for request({:s})'.format( str(self.raw_reply), json.dumps(request, sort_keys=True))) diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py index 71fe14f53395e2ac57884911fe846c9c1b2c2834..bf152027037af46283c0901f0701ffb83d8a508e 100644 --- a/src/service/service/ServiceServiceServicerImpl.py +++ b/src/service/service/ServiceServiceServicerImpl.py @@ -14,11 +14,11 @@ import grpc, json, logging from typing import Optional +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.method_wrappers.ServiceExceptions import AlreadyExistsException, InvalidArgumentException from common.proto.context_pb2 import Empty, Service, ServiceId, ServiceStatusEnum from common.proto.pathcomp_pb2 import PathCompRequest from common.proto.service_pb2_grpc import ServiceServiceServicer -from common.rpc_method_wrapper.Decorator import create_metrics, safe_and_metered_rpc_method -from common.rpc_method_wrapper.ServiceExceptions import AlreadyExistsException, InvalidArgumentException from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string from context.client.ContextClient import ContextClient from pathcomp.frontend.client.PathCompClient import PathCompClient @@ -28,9 +28,7 @@ from .task_scheduler.TaskScheduler import TasksScheduler LOGGER = logging.getLogger(__name__) -SERVICE_NAME = 'Service' -METHOD_NAMES = ['CreateService', 'UpdateService', 'DeleteService'] -METRICS = create_metrics(SERVICE_NAME, METHOD_NAMES) +METRICS_POOL = MetricsPool('Service', 'RPC') class ServiceServiceServicerImpl(ServiceServiceServicer): def __init__(self, service_handler_factory : ServiceHandlerFactory) -> None: @@ -38,7 +36,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): self.service_handler_factory = service_handler_factory LOGGER.debug('Servicer Created') - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def CreateService(self, request : Service, context : grpc.ServicerContext) -> ServiceId: LOGGER.info('[CreateService] begin ; request = {:s}'.format(grpc_message_to_json_string(request))) @@ -89,7 +87,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): service_id = context_client.SetService(request) return service_id - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def UpdateService(self, request : Service, context : grpc.ServicerContext) -> ServiceId: LOGGER.info('[UpdateService] begin ; request = {:s}'.format(grpc_message_to_json_string(request))) @@ -118,9 +116,10 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): else: pathcomp_request.k_disjoint_path.num_disjoint = num_disjoint_paths - pathcomp = PathCompClient() LOGGER.info('pathcomp_request={:s}'.format(grpc_message_to_json_string(pathcomp_request))) + pathcomp = PathCompClient() pathcomp_reply = pathcomp.Compute(pathcomp_request) + pathcomp.close() LOGGER.info('pathcomp_reply={:s}'.format(grpc_message_to_json_string(pathcomp_reply))) # Feed TaskScheduler with this path computation reply. TaskScheduler identifies inter-dependencies among @@ -131,7 +130,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): tasks_scheduler.execute_all() return request.service_id - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def DeleteService(self, request : ServiceId, context : grpc.ServicerContext) -> Empty: LOGGER.info('[DeleteService] begin ; request = {:s}'.format(grpc_message_to_json_string(request))) diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index 4310a17d71d43d621f96876b6f68694e680bd6e1..78978cc6c39c31340bd10139cb00f2cc18a7ef13 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -15,6 +15,7 @@ from common.proto.context_pb2 import DeviceDriverEnum, ServiceTypeEnum from ..service_handler_api.FilterFields import FilterFieldEnum from .l2nm_emulated.L2NMEmulatedServiceHandler import L2NMEmulatedServiceHandler +from .l2nm_openconfig.L2NMOpenConfigServiceHandler import L2NMOpenConfigServiceHandler from .l3nm_emulated.L3NMEmulatedServiceHandler import L3NMEmulatedServiceHandler from .l3nm_openconfig.L3NMOpenConfigServiceHandler import L3NMOpenConfigServiceHandler from .p4.p4_service_handler import P4ServiceHandler @@ -28,6 +29,12 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_UNDEFINED, } ]), + (L2NMOpenConfigServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L2NM, + FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_OPENCONFIG, + } + ]), (L3NMEmulatedServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L3NM, diff --git a/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py b/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py index 19deabda3c8ddcd9f252098570ec07f82bef65a7..bc628c160eaaa9ac282c81bd4c0e02536e88a80c 100644 --- a/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py +++ b/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py @@ -14,6 +14,7 @@ import anytree, json, logging from typing import Any, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricTypeEnum, MetricsPool, metered_subclass_method, INF from common.proto.context_pb2 import ConfigActionEnum, ConfigRule, DeviceId, Service from common.tools.object_factory.Device import json_device_id from common.type_checkers.Checkers import chk_length, chk_type @@ -24,6 +25,23 @@ from .ConfigRules import setup_config_rules, teardown_config_rules LOGGER = logging.getLogger(__name__) +HISTOGRAM_BUCKETS = ( + # .005, .01, .025, .05, .075, .1, .25, .5, .75, 1.0, INF + 0.0010, 0.0025, 0.0050, 0.0075, + 0.0100, 0.0250, 0.0500, 0.0750, + 0.1000, 0.2500, 0.5000, 0.7500, + 1.0000, 2.5000, 5.0000, 7.5000, + 10.0000, 25.000, 50.0000, 75.000, + 100.0, INF +) +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'l2nm_emulated'}) +METRICS_POOL.get_or_create('SetEndpoint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteEndpoint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('SetConstraint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteConstraint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('SetConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) + class L2NMEmulatedServiceHandler(_ServiceHandler): def __init__( # pylint: disable=super-init-not-called self, service : Service, task_executor : TaskExecutor, **settings @@ -46,6 +64,7 @@ class L2NMEmulatedServiceHandler(_ServiceHandler): elif action == ConfigActionEnum.CONFIGACTION_DELETE: delete_subnode(self.__resolver, self.__config, resource_key) + @metered_subclass_method(METRICS_POOL) def SetEndpoint( self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: @@ -80,6 +99,7 @@ class L2NMEmulatedServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def DeleteEndpoint( self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: @@ -114,6 +134,7 @@ class L2NMEmulatedServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def SetConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('constraints', constraints, list) if len(constraints) == 0: return [] @@ -122,6 +143,7 @@ class L2NMEmulatedServiceHandler(_ServiceHandler): LOGGER.warning(msg.format(str(constraints))) return [True for _ in range(len(constraints))] + @metered_subclass_method(METRICS_POOL) def DeleteConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('constraints', constraints, list) if len(constraints) == 0: return [] @@ -130,6 +152,7 @@ class L2NMEmulatedServiceHandler(_ServiceHandler): LOGGER.warning(msg.format(str(constraints))) return [True for _ in range(len(constraints))] + @metered_subclass_method(METRICS_POOL) def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] @@ -147,6 +170,7 @@ class L2NMEmulatedServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] diff --git a/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py b/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py new file mode 100644 index 0000000000000000000000000000000000000000..f12c9ab984205b9057dd1507114e5bc17d8deaa6 --- /dev/null +++ b/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py @@ -0,0 +1,134 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, List +from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set +from service.service.service_handler_api.AnyTreeTools import TreeNode + +def setup_config_rules( + service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, + service_settings : TreeNode, endpoint_settings : TreeNode +) -> List[Dict]: + + json_settings : Dict = {} if service_settings is None else service_settings.value + json_endpoint_settings : Dict = {} if endpoint_settings is None else endpoint_settings.value + + mtu = json_settings.get('mtu', 1450 ) # 1512 + #address_families = json_settings.get('address_families', [] ) # ['IPV4'] + #bgp_as = json_settings.get('bgp_as', 0 ) # 65000 + #bgp_route_target = json_settings.get('bgp_route_target', '0:0') # 65000:333 + + router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' + #route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801' + sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 + vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 + #address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1' + #address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30 + remote_router = json_endpoint_settings.get('remote_router', '0.0.0.0') # '5.5.5.5' + circuit_id = json_endpoint_settings.get('circuit_id', '000' ) # '111' + + if_cirid_name = '{:s}.{:s}'.format(endpoint_uuid, str(circuit_id)) + network_instance_name = 'ELAN-AC:{:s}'.format(str(circuit_id)) + connection_point_id = 'VC-1' + + json_config_rules = [ + json_config_rule_set( + '/network_instance[default]', + {'name': 'default', 'type': 'DEFAULT_INSTANCE', 'router_id': router_id}), + + json_config_rule_set( + '/network_instance[default]/protocols[OSPF]', + {'name': 'default', 'identifier': 'OSPF', 'protocol_name': 'OSPF'}), + + json_config_rule_set( + '/network_instance[default]/protocols[STATIC]', + {'name': 'default', 'identifier': 'STATIC', 'protocol_name': 'STATIC'}), + + json_config_rule_set( + '/network_instance[{:s}]'.format(network_instance_name), + {'name': network_instance_name, 'type': 'L2VSI'}), + + json_config_rule_set( + '/interface[{:s}]/subinterface[{:d}]'.format(if_cirid_name, sub_interface_index), + {'name': if_cirid_name, 'type': 'l2vlan', 'index': sub_interface_index, 'vlan_id': vlan_id}), + + json_config_rule_set( + '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_cirid_name), + {'name': network_instance_name, 'id': if_cirid_name, 'interface': if_cirid_name, + 'subinterface': sub_interface_index}), + + json_config_rule_set( + '/network_instance[{:s}]/connection_point[{:s}]'.format(network_instance_name, connection_point_id), + {'name': network_instance_name, 'connection_point': connection_point_id, 'VC_ID': circuit_id, + 'remote_system': remote_router}), + ] + return json_config_rules + +def teardown_config_rules( + service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, + service_settings : TreeNode, endpoint_settings : TreeNode +) -> List[Dict]: + + #json_settings : Dict = {} if service_settings is None else service_settings.value + json_endpoint_settings : Dict = {} if endpoint_settings is None else endpoint_settings.value + + #mtu = json_settings.get('mtu', 1450 ) # 1512 + #address_families = json_settings.get('address_families', [] ) # ['IPV4'] + #bgp_as = json_settings.get('bgp_as', 0 ) # 65000 + #bgp_route_target = json_settings.get('bgp_route_target', '0:0') # 65000:333 + + router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' + #route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801' + sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 + #vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 + #address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1' + #address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30 + #remote_router = json_endpoint_settings.get('remote_router', '0.0.0.0') # '5.5.5.5' + circuit_id = json_endpoint_settings.get('circuit_id', '000' ) # '111' + + if_cirid_name = '{:s}.{:s}'.format(endpoint_uuid, str(circuit_id)) + network_instance_name = 'ELAN-AC:{:s}'.format(str(circuit_id)) + connection_point_id = 'VC-1' + + json_config_rules = [ + json_config_rule_delete( + '/network_instance[{:s}]/connection_point[{:s}]'.format(network_instance_name, connection_point_id), + {'name': network_instance_name, 'connection_point': connection_point_id}), + + json_config_rule_delete( + '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_cirid_name), + {'name': network_instance_name, 'id': if_cirid_name, 'interface': if_cirid_name, + 'subinterface': sub_interface_index}), + + json_config_rule_delete( + '/interface[{:s}]/subinterface[{:d}]'.format(if_cirid_name, sub_interface_index), + {'name': if_cirid_name, 'index': sub_interface_index}), + + json_config_rule_delete( + '/network_instance[{:s}]'.format(network_instance_name), + {'name': network_instance_name}), + + json_config_rule_delete( + '/network_instance[default]/protocols[STATIC]', + {'name': 'default', 'identifier': 'STATIC', 'protocol_name': 'STATIC'}), + + json_config_rule_delete( + '/network_instance[default]/protocols[OSPF]', + {'name': 'default', 'identifier': 'OSPF', 'protocol_name': 'OSPF'}), + + json_config_rule_delete( + '/network_instance[default]', + {'name': 'default', 'type': 'DEFAULT_INSTANCE', 'router_id': router_id}), + ] + return json_config_rules diff --git a/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py b/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..23df44413c17e66a631988eb6256316badf0d554 --- /dev/null +++ b/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py @@ -0,0 +1,187 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import anytree, json, logging +from typing import Any, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricTypeEnum, MetricsPool, metered_subclass_method, INF +from common.proto.context_pb2 import ConfigActionEnum, ConfigRule, DeviceId, Service +from common.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_length, chk_type +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.AnyTreeTools import TreeNode, delete_subnode, get_subnode, set_subnode_value +from service.service.task_scheduler.TaskExecutor import TaskExecutor +from .ConfigRules import setup_config_rules, teardown_config_rules + +LOGGER = logging.getLogger(__name__) + +HISTOGRAM_BUCKETS = ( + # .005, .01, .025, .05, .075, .1, .25, .5, .75, 1.0, INF + 0.0010, 0.0025, 0.0050, 0.0075, + 0.0100, 0.0250, 0.0500, 0.0750, + 0.1000, 0.2500, 0.5000, 0.7500, + 1.0000, 2.5000, 5.0000, 7.5000, + 10.0000, 25.000, 50.0000, 75.000, + 100.0, INF +) +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'l2nm_openconfig'}) +METRICS_POOL.get_or_create('SetEndpoint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteEndpoint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('SetConstraint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteConstraint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('SetConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) + +class L2NMOpenConfigServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings + ) -> None: + self.__service = service + self.__task_executor = task_executor # pylint: disable=unused-private-member + self.__resolver = anytree.Resolver(pathattr='name') + self.__config = TreeNode('.') + for config_rule in service.service_config.config_rules: + action = config_rule.action + if config_rule.WhichOneof('config_rule') != 'custom': continue + resource_key = config_rule.custom.resource_key + resource_value = config_rule.custom.resource_value + if action == ConfigActionEnum.CONFIGACTION_SET: + try: + resource_value = json.loads(resource_value) + except: # pylint: disable=bare-except + pass + set_subnode_value(self.__resolver, self.__config, resource_key, resource_value) + elif action == ConfigActionEnum.CONFIGACTION_DELETE: + delete_subnode(self.__resolver, self.__config, resource_key) + + @metered_subclass_method(METRICS_POOL) + def SetEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + + service_uuid = self.__service.service_id.service_uuid.uuid + settings : TreeNode = get_subnode(self.__resolver, self.__config, '/settings', None) + + results = [] + for endpoint in endpoints: + try: + chk_type('endpoint', endpoint, (tuple, list)) + chk_length('endpoint', endpoint, min_length=2, max_length=3) + device_uuid, endpoint_uuid = endpoint[0:2] # ignore topology_uuid by now + + endpoint_settings_uri = '/device[{:s}]/endpoint[{:s}]/settings'.format(device_uuid, endpoint_uuid) + endpoint_settings : TreeNode = get_subnode(self.__resolver, self.__config, endpoint_settings_uri, None) + + json_config_rules = setup_config_rules( + service_uuid, connection_uuid, device_uuid, endpoint_uuid, settings, endpoint_settings) + + device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + del device.device_config.config_rules[:] + for json_config_rule in json_config_rules: + device.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(device) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetEndpoint({:s})'.format(str(endpoint))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + + service_uuid = self.__service.service_id.service_uuid.uuid + settings : TreeNode = get_subnode(self.__resolver, self.__config, '/settings', None) + + results = [] + for endpoint in endpoints: + try: + chk_type('endpoint', endpoint, (tuple, list)) + chk_length('endpoint', endpoint, min_length=2, max_length=3) + device_uuid, endpoint_uuid = endpoint[0:2] # ignore topology_uuid by now + + endpoint_settings_uri = '/device[{:s}]/endpoint[{:s}]/settings'.format(device_uuid, endpoint_uuid) + endpoint_settings : TreeNode = get_subnode(self.__resolver, self.__config, endpoint_settings_uri, None) + + json_config_rules = teardown_config_rules( + service_uuid, connection_uuid, device_uuid, endpoint_uuid, settings, endpoint_settings) + + device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + del device.device_config.config_rules[:] + for json_config_rule in json_config_rules: + device.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(device) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteEndpoint({:s})'.format(str(endpoint))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def SetConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[SetConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + @metered_subclass_method(METRICS_POOL) + def DeleteConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[DeleteConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + resource_key, resource_value = resource + resource_value = json.loads(resource_value) + set_subnode_value(self.__resolver, self.__config, resource_key, resource_value) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetConfig({:s})'.format(str(resource))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + resource_key, _ = resource + delete_subnode(self.__resolver, self.__config, resource_key) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteConfig({:s})'.format(str(resource))) + results.append(e) + + return results diff --git a/src/service/service/service_handlers/l2nm_openconfig/__init__.py b/src/service/service/service_handlers/l2nm_openconfig/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..70a33251242c51f49140e596b8208a19dd5245f7 --- /dev/null +++ b/src/service/service/service_handlers/l2nm_openconfig/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py b/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py index 54fb52630c68154865513d3969cdee9a06848c01..f161225192dfe7f9eb0804b9d9bff4e5acba9e21 100644 --- a/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py @@ -14,6 +14,7 @@ import anytree, json, logging from typing import Any, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricTypeEnum, MetricsPool, metered_subclass_method, INF from common.proto.context_pb2 import ConfigActionEnum, ConfigRule, DeviceId, Service from common.tools.object_factory.Device import json_device_id from common.type_checkers.Checkers import chk_length, chk_type @@ -24,6 +25,23 @@ from .ConfigRules import setup_config_rules, teardown_config_rules LOGGER = logging.getLogger(__name__) +HISTOGRAM_BUCKETS = ( + # .005, .01, .025, .05, .075, .1, .25, .5, .75, 1.0, INF + 0.0010, 0.0025, 0.0050, 0.0075, + 0.0100, 0.0250, 0.0500, 0.0750, + 0.1000, 0.2500, 0.5000, 0.7500, + 1.0000, 2.5000, 5.0000, 7.5000, + 10.0000, 25.000, 50.0000, 75.000, + 100.0, INF +) +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'l3nm_emulated'}) +METRICS_POOL.get_or_create('SetEndpoint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteEndpoint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('SetConstraint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteConstraint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('SetConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) + class L3NMEmulatedServiceHandler(_ServiceHandler): def __init__( # pylint: disable=super-init-not-called self, service : Service, task_executor : TaskExecutor, **settings @@ -46,6 +64,7 @@ class L3NMEmulatedServiceHandler(_ServiceHandler): elif action == ConfigActionEnum.CONFIGACTION_DELETE: delete_subnode(self.__resolver, self.__config, resource_key) + @metered_subclass_method(METRICS_POOL) def SetEndpoint( self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: @@ -80,6 +99,7 @@ class L3NMEmulatedServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def DeleteEndpoint( self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: @@ -114,6 +134,7 @@ class L3NMEmulatedServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def SetConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('constraints', constraints, list) if len(constraints) == 0: return [] @@ -122,6 +143,7 @@ class L3NMEmulatedServiceHandler(_ServiceHandler): LOGGER.warning(msg.format(str(constraints))) return [True for _ in range(len(constraints))] + @metered_subclass_method(METRICS_POOL) def DeleteConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('constraints', constraints, list) if len(constraints) == 0: return [] @@ -130,6 +152,7 @@ class L3NMEmulatedServiceHandler(_ServiceHandler): LOGGER.warning(msg.format(str(constraints))) return [True for _ in range(len(constraints))] + @metered_subclass_method(METRICS_POOL) def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] @@ -147,6 +170,7 @@ class L3NMEmulatedServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] diff --git a/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py b/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py index bdf6881647ef1a0861a312496c45512c8734afd9..0f5cb6c558c1515b81d011074ecda7e167c47e90 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py @@ -14,6 +14,7 @@ import anytree, json, logging from typing import Any, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricTypeEnum, MetricsPool, metered_subclass_method, INF from common.proto.context_pb2 import ConfigActionEnum, ConfigRule, DeviceId, Service from common.tools.object_factory.Device import json_device_id from common.type_checkers.Checkers import chk_length, chk_type @@ -24,6 +25,23 @@ from .ConfigRules import setup_config_rules, teardown_config_rules LOGGER = logging.getLogger(__name__) +HISTOGRAM_BUCKETS = ( + # .005, .01, .025, .05, .075, .1, .25, .5, .75, 1.0, INF + 0.0010, 0.0025, 0.0050, 0.0075, + 0.0100, 0.0250, 0.0500, 0.0750, + 0.1000, 0.2500, 0.5000, 0.7500, + 1.0000, 2.5000, 5.0000, 7.5000, + 10.0000, 25.000, 50.0000, 75.000, + 100.0, INF +) +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'l3nm_openconfig'}) +METRICS_POOL.get_or_create('SetEndpoint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteEndpoint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('SetConstraint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteConstraint', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('SetConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) +METRICS_POOL.get_or_create('DeleteConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) + class L3NMOpenConfigServiceHandler(_ServiceHandler): def __init__( # pylint: disable=super-init-not-called self, service : Service, task_executor : TaskExecutor, **settings @@ -46,6 +64,7 @@ class L3NMOpenConfigServiceHandler(_ServiceHandler): elif action == ConfigActionEnum.CONFIGACTION_DELETE: delete_subnode(self.__resolver, self.__config, resource_key) + @metered_subclass_method(METRICS_POOL) def SetEndpoint( self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: @@ -80,6 +99,7 @@ class L3NMOpenConfigServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def DeleteEndpoint( self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: @@ -114,6 +134,7 @@ class L3NMOpenConfigServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def SetConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('constraints', constraints, list) if len(constraints) == 0: return [] @@ -122,6 +143,7 @@ class L3NMOpenConfigServiceHandler(_ServiceHandler): LOGGER.warning(msg.format(str(constraints))) return [True for _ in range(len(constraints))] + @metered_subclass_method(METRICS_POOL) def DeleteConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('constraints', constraints, list) if len(constraints) == 0: return [] @@ -130,6 +152,7 @@ class L3NMOpenConfigServiceHandler(_ServiceHandler): LOGGER.warning(msg.format(str(constraints))) return [True for _ in range(len(constraints))] + @metered_subclass_method(METRICS_POOL) def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] @@ -147,6 +170,7 @@ class L3NMOpenConfigServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] diff --git a/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py b/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py index 1ae08bbf6a7b0f6aeedbf9d571dfbc154e22dace..fb54a1bc1db3071e88fd26e935c7779c7c2f19ee 100644 --- a/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py +++ b/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py @@ -14,6 +14,7 @@ import anytree, json, logging from typing import Any, Dict, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.proto.context_pb2 import ConfigActionEnum, ConfigRule, DeviceId, Service from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set from common.tools.object_factory.Device import json_device_id @@ -30,6 +31,8 @@ def check_endpoint(endpoint : str, service_uuid : str) -> Tuple[str, str]: raise Exception('Endpoint({:s}) is malformed for Service({:s})'.format(str(endpoint), str(service_uuid))) return endpoint_split +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'microwave'}) + class MicrowaveServiceHandler(_ServiceHandler): def __init__( # pylint: disable=super-init-not-called self, service : Service, task_executor : TaskExecutor, **settings @@ -52,6 +55,7 @@ class MicrowaveServiceHandler(_ServiceHandler): elif action == ConfigActionEnum.CONFIGACTION_DELETE: delete_subnode(self.__resolver, self.__config, resource_key) + @metered_subclass_method(METRICS_POOL) def SetEndpoint( self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: @@ -77,7 +81,7 @@ class MicrowaveServiceHandler(_ServiceHandler): device_uuid = endpoints[0][0] device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) - json_config_rule = json_config_rule_set('/service[{:s}]'.format(service_uuid), { + json_config_rule = json_config_rule_set('/services/service[{:s}]'.format(service_uuid), { 'uuid' : service_uuid, 'node_id_src': node_id_src, 'tp_id_src' : tp_id_src, @@ -95,6 +99,7 @@ class MicrowaveServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def DeleteEndpoint( self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: @@ -106,11 +111,13 @@ class MicrowaveServiceHandler(_ServiceHandler): results = [] try: chk_type('endpoints', endpoints, list) - if len(endpoints) != 2: raise Exception('len(endpoints) != 2') + if len(endpoints) < 1: raise Exception('len(endpoints) < 1') device_uuid = endpoints[0][0] device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) - json_config_rule = json_config_rule_delete('/service[{:s}]'.format(service_uuid), {'uuid': service_uuid}) + json_config_rule = json_config_rule_delete('/services/service[{:s}]'.format(service_uuid), { + 'uuid': service_uuid + }) del device.device_config.config_rules[:] device.device_config.config_rules.append(ConfigRule(**json_config_rule)) self.__task_executor.configure_device(device) @@ -121,6 +128,7 @@ class MicrowaveServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def SetConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('constraints', constraints, list) if len(constraints) == 0: return [] @@ -129,6 +137,7 @@ class MicrowaveServiceHandler(_ServiceHandler): LOGGER.warning(msg.format(str(constraints))) return [True for _ in range(len(constraints))] + @metered_subclass_method(METRICS_POOL) def DeleteConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('constraints', constraints, list) if len(constraints) == 0: return [] @@ -137,6 +146,7 @@ class MicrowaveServiceHandler(_ServiceHandler): LOGGER.warning(msg.format(str(constraints))) return [True for _ in range(len(constraints))] + @metered_subclass_method(METRICS_POOL) def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] @@ -154,6 +164,7 @@ class MicrowaveServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] diff --git a/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py b/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py index f94948129f23c1aff3a3db3dbb4c236ae161e5e1..24371203ad599d7ad9a7f66e5ad96874471be00b 100644 --- a/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py +++ b/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py @@ -14,6 +14,7 @@ import anytree, json, logging from typing import Any, Dict, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.proto.context_pb2 import ConfigActionEnum, ConfigRule, DeviceId, Service from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set from common.tools.object_factory.Device import json_device_id @@ -24,6 +25,8 @@ from service.service.task_scheduler.TaskExecutor import TaskExecutor LOGGER = logging.getLogger(__name__) +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'tapi_tapi'}) + class TapiServiceHandler(_ServiceHandler): def __init__( # pylint: disable=super-init-not-called self, service : Service, task_executor : TaskExecutor, **settings @@ -46,6 +49,7 @@ class TapiServiceHandler(_ServiceHandler): elif action == ConfigActionEnum.CONFIGACTION_DELETE: delete_subnode(self.__resolver, self.__config, resource_key) + @metered_subclass_method(METRICS_POOL) def SetEndpoint( self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: @@ -89,6 +93,7 @@ class TapiServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def DeleteEndpoint( self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: @@ -114,6 +119,7 @@ class TapiServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def SetConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('constraints', constraints, list) if len(constraints) == 0: return [] @@ -122,6 +128,7 @@ class TapiServiceHandler(_ServiceHandler): LOGGER.warning(msg.format(str(constraints))) return [True for _ in range(len(constraints))] + @metered_subclass_method(METRICS_POOL) def DeleteConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('constraints', constraints, list) if len(constraints) == 0: return [] @@ -130,6 +137,7 @@ class TapiServiceHandler(_ServiceHandler): LOGGER.warning(msg.format(str(constraints))) return [True for _ in range(len(constraints))] + @metered_subclass_method(METRICS_POOL) def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] @@ -147,6 +155,7 @@ class TapiServiceHandler(_ServiceHandler): return results + @metered_subclass_method(METRICS_POOL) def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] diff --git a/src/service/service/task_scheduler/TaskExecutor.py b/src/service/service/task_scheduler/TaskExecutor.py index 757a660590dde1b3fb2eee7090b2329cd45ec8cb..7c96eb665e75a08f2a47fa9d78a0bd9cc37a876e 100644 --- a/src/service/service/task_scheduler/TaskExecutor.py +++ b/src/service/service/task_scheduler/TaskExecutor.py @@ -14,8 +14,8 @@ from enum import Enum from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from common.method_wrappers.ServiceExceptions import NotFoundException from common.proto.context_pb2 import Connection, ConnectionId, Device, DeviceId, Service, ServiceId -from common.rpc_method_wrapper.ServiceExceptions import NotFoundException from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from service.service.service_handler_api.ServiceHandlerFactory import ServiceHandlerFactory, get_service_handler_class diff --git a/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py b/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py index beb7e5a0426b7705dbf780d8305a587a3d4fec14..cfafd54e51f73b78d18d13a1c6d9e2c18ac4c944 100644 --- a/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py +++ b/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from common.method_wrappers.ServiceExceptions import OperationFailedException from common.proto.context_pb2 import ConnectionId -from common.rpc_method_wrapper.ServiceExceptions import OperationFailedException from common.tools.grpc.Tools import grpc_message_to_json_string from service.service.service_handler_api.Tools import check_errors_setendpoint from service.service.task_scheduler.TaskExecutor import TaskExecutor diff --git a/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py b/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py index c04d950a8993166c3bbfab3c083d4f2898dcd3e8..4c8b75b2f365724215a690b97e98198405f4632c 100644 --- a/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py +++ b/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from common.method_wrappers.ServiceExceptions import OperationFailedException from common.proto.context_pb2 import ConnectionId -from common.rpc_method_wrapper.ServiceExceptions import OperationFailedException from common.tools.grpc.Tools import grpc_message_to_json_string from service.service.service_handler_api.Tools import check_errors_deleteendpoint from service.service.task_scheduler.TaskExecutor import TaskExecutor diff --git a/src/slice/service/SliceServiceServicerImpl.py b/src/slice/service/SliceServiceServicerImpl.py index ada7218588391766147a02f9713b540016522aa7..aa41a77ac7b5ce1ec6dabba0f841692ce2f8f42e 100644 --- a/src/slice/service/SliceServiceServicerImpl.py +++ b/src/slice/service/SliceServiceServicerImpl.py @@ -16,7 +16,7 @@ import grpc, json, logging #, deepdiff from common.proto.context_pb2 import ( Empty, Service, ServiceId, ServiceStatusEnum, ServiceTypeEnum, Slice, SliceId, SliceStatusEnum) from common.proto.slice_pb2_grpc import SliceServiceServicer -from common.rpc_method_wrapper.Decorator import create_metrics, safe_and_metered_rpc_method +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.tools.context_queries.InterDomain import is_multi_domain from common.tools.grpc.ConfigRules import copy_config_rules from common.tools.grpc.Constraints import copy_constraints @@ -29,9 +29,7 @@ from service.client.ServiceClient import ServiceClient LOGGER = logging.getLogger(__name__) -SERVICE_NAME = 'Slice' -METHOD_NAMES = ['CreateSlice', 'UpdateSlice', 'DeleteSlice'] -METRICS = create_metrics(SERVICE_NAME, METHOD_NAMES) +METRICS_POOL = MetricsPool('Slice', 'RPC') class SliceServiceServicerImpl(SliceServiceServicer): def __init__(self): @@ -158,7 +156,7 @@ class SliceServiceServicerImpl(SliceServiceServicer): context_client.SetSlice(slice_active) return slice_id - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def CreateSlice(self, request : Slice, context : grpc.ServicerContext) -> SliceId: #try: # slice_ = context_client.GetSlice(request.slice_id) @@ -168,7 +166,7 @@ class SliceServiceServicerImpl(SliceServiceServicer): #return slice_id return self.create_update(request) - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def UpdateSlice(self, request : Slice, context : grpc.ServicerContext) -> SliceId: #slice_id = context_client.SetSlice(request) #if len(request.slice_endpoint_ids) != 2: return slice_id @@ -186,7 +184,7 @@ class SliceServiceServicerImpl(SliceServiceServicer): # raise NotImplementedError('Slice should create local services for single domain slice') return self.create_update(request) - @safe_and_metered_rpc_method(METRICS, LOGGER) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def DeleteSlice(self, request : SliceId, context : grpc.ServicerContext) -> Empty: context_client = ContextClient() try: diff --git a/src/tests/benchmark/automation/.gitignore b/src/tests/benchmark/automation/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..0a3f4400d5c88b1af32c7667d69d2fdc12d5424e --- /dev/null +++ b/src/tests/benchmark/automation/.gitignore @@ -0,0 +1,2 @@ +# Add here your files containing confidential testbed details such as IP addresses, ports, usernames, passwords, etc. +descriptors_real.json diff --git a/src/tests/benchmark/automation/README.md b/src/tests/benchmark/automation/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8b5b2a01efc357b5d8eca6a6890b051b4ffac260 --- /dev/null +++ b/src/tests/benchmark/automation/README.md @@ -0,0 +1,17 @@ + +# Grafana k6 load testing tool + +# K6 Installation Instructions on Ubuntu + +sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69 +echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list +sudo apt-get update +sudo apt-get install k6 + +Or install k6 via snap: + +sudo apt install snapd +sudo snap install k6 + +# Running K6 +k6 run script.js \ No newline at end of file diff --git a/src/tests/benchmark/automation/ZtpAdd.js b/src/tests/benchmark/automation/ZtpAdd.js new file mode 100644 index 0000000000000000000000000000000000000000..0f649b8ccfbd910faadcc41549eddf34b83c6795 --- /dev/null +++ b/src/tests/benchmark/automation/ZtpAdd.js @@ -0,0 +1,55 @@ +import grpc from 'k6/net/grpc'; +import exec from "k6/execution"; +import { check, sleep } from 'k6'; + +const client = new grpc.Client(); +client.load(['../../../../proto'], 'automation.proto'); + +export const data = []; +for (let i = 1; i < 801; i++) { + data.push({ + "devRoleType": "DEV_CONF", + "devRoleId": { + "devId": {"device_uuid": {"uuid": "EMU-" + i}}, + "devRoleId": {"uuid": "EMU-" + i} + } + }); +}; + +export const options = { + scenarios :{ + + "ZtpAdd-scenario": { + executor: "shared-iterations", + vus: 800, + iterations: data.length, + maxDuration: "1h" + } + } +}; + +export default () => { + client.connect('10.1.255.239:5050', { + plaintext: true, + timeout: 10000 + }); + + var item = data[exec.scenario.iterationInInstance]; + const response = client.invoke('automation.AutomationService/ZtpAdd', item); + + check(response, { + 'status is OK': (r) => r && r.status === grpc.StatusOK, + }); + + console.log(JSON.stringify(response.message)); + + client.close(); + sleep(1); +}; + +export function handleSummary(data) { + + return { + 'summary_add_800.json': JSON.stringify(data.metrics.grpc_req_duration.values), //the default data object + }; +} diff --git a/src/tests/benchmark/automation/ZtpDelete.js b/src/tests/benchmark/automation/ZtpDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..58af9f25d924dda254e142dcf3962b62359ff42c --- /dev/null +++ b/src/tests/benchmark/automation/ZtpDelete.js @@ -0,0 +1,55 @@ +import grpc from 'k6/net/grpc'; +import exec from "k6/execution"; +import { check, sleep } from 'k6'; + +const client = new grpc.Client(); +client.load(['../../../../proto'], 'automation.proto'); + +export const data = []; +for (let i = 1; i < 801; i++) { + data.push({ + "devRoleType": "DEV_CONF", + "devRoleId": { + "devId": {"device_uuid": {"uuid": "EMU-" + i}}, + "devRoleId": {"uuid": "EMU-" + i} + } + }); +}; + +export const options = { + scenarios :{ + + "ZtpAdd-scenario": { + executor: "shared-iterations", + vus: 800, + iterations: data.length, + maxDuration: "1h" + } + } +}; + +export default () => { + client.connect('10.1.255.232:5050', { + plaintext: true, + timeout: 10000 + }); + + var item = data[exec.scenario.iterationInInstance]; + const response = client.invoke('automation.AutomationService/ZtpDelete', item); + + check(response, { + 'status is OK': (r) => r && r.status === grpc.StatusOK, + }); + + console.log(JSON.stringify(response.message)); + + client.close(); + sleep(1); +}; + +export function handleSummary(data) { + + return { + 'summary_delete_800.json': JSON.stringify(data.metrics.grpc_req_duration.values), //the default data object + }; +} diff --git a/src/tests/benchmark/automation/ZtpUpdate.js b/src/tests/benchmark/automation/ZtpUpdate.js new file mode 100755 index 0000000000000000000000000000000000000000..39135ec58643339562ff87c96a03be3968c198d4 --- /dev/null +++ b/src/tests/benchmark/automation/ZtpUpdate.js @@ -0,0 +1,60 @@ +import grpc from 'k6/net/grpc'; +import exec from "k6/execution"; +import { check, sleep } from 'k6'; + +const client = new grpc.Client(); +client.load(['../../../../proto'], 'automation.proto'); + +export const data = []; +for (let i = 1; i < 801; i++) { + data.push({ + "devRole": { + "devRoleType": "DEV_CONF", + "devRoleId": { + "devId": {"device_uuid": {"uuid": "EMU-"+i}}, + "devRoleId": {"uuid": "1"} + } + }, + "devConfig": { + "config_rules": [] + } + }); +}; + +export const options = { + scenarios :{ + + "ZtpAdd-scenario": { + executor: "shared-iterations", + vus: 800, + iterations: data.length, + maxDuration: "1h" + } + } +}; + +export default () => { + client.connect('10.1.255.250:5050', { + plaintext: true, + timeout: 10000 + }); + + var item = data[exec.scenario.iterationInInstance]; + const response = client.invoke('automation.AutomationService/ZtpUpdate', item); + + check(response, { + 'status is OK': (r) => r && r.status === grpc.StatusOK, + }); + + console.log(JSON.stringify(response.message)); + + client.close(); + sleep(1); +}; + +export function handleSummary(data) { + + return { + 'summaryUpdate801.json': JSON.stringify(data.metrics.grpc_req_duration.values), //the default data object + }; +} diff --git a/src/tests/benchmark/automation/__init__.py b/src/tests/benchmark/automation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..70a33251242c51f49140e596b8208a19dd5245f7 --- /dev/null +++ b/src/tests/benchmark/automation/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/tests/benchmark/automation/run_test_01_bootstrap.sh b/src/tests/benchmark/automation/run_test_01_bootstrap.sh new file mode 100755 index 0000000000000000000000000000000000000000..dee1739270944bc19e370bb249b083f740e60737 --- /dev/null +++ b/src/tests/benchmark/automation/run_test_01_bootstrap.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +pytest --verbose --log-level=INFO -o log_cli=true -o log_cli_level=INFO src/tests/benchmark/automation/tests/test_functional_bootstrap.py diff --git a/src/tests/benchmark/automation/run_test_02_cleanup.sh b/src/tests/benchmark/automation/run_test_02_cleanup.sh new file mode 100755 index 0000000000000000000000000000000000000000..8f68302d6abfeac6750fff7183524c644355008e --- /dev/null +++ b/src/tests/benchmark/automation/run_test_02_cleanup.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +pytest --verbose --log-level=INFO -o log_cli=true -o log_cli_level=INFO src/tests/benchmark/automation/tests/test_functional_cleanup.py diff --git a/src/tests/benchmark/automation/tests/.gitignore b/src/tests/benchmark/automation/tests/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..76cb708d1b532c9b69166e55f36bcb912fd5e370 --- /dev/null +++ b/src/tests/benchmark/automation/tests/.gitignore @@ -0,0 +1,2 @@ +# Add here your files containing confidential testbed details such as IP addresses, ports, usernames, passwords, etc. +Credentials.py diff --git a/src/tests/benchmark/automation/tests/Fixtures.py b/src/tests/benchmark/automation/tests/Fixtures.py new file mode 100644 index 0000000000000000000000000000000000000000..3b35a12e299ba776e909fbdd2739e971431083a6 --- /dev/null +++ b/src/tests/benchmark/automation/tests/Fixtures.py @@ -0,0 +1,28 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest, logging +from common.Settings import get_setting +from tests.tools.mock_osm.Constants import WIM_PASSWORD, WIM_USERNAME +from tests.tools.mock_osm.MockOSM import MockOSM +from .Objects import WIM_MAPPING + +LOGGER = logging.getLogger(__name__) + +@pytest.fixture(scope='session') +def osm_wim(): + wim_url = 'http://{:s}:{:s}'.format( + get_setting('COMPUTESERVICE_SERVICE_HOST'), str(get_setting('COMPUTESERVICE_SERVICE_PORT_HTTP'))) + LOGGER.info('WIM_MAPPING = {:s}'.format(str(WIM_MAPPING))) + return MockOSM(wim_url, WIM_MAPPING, WIM_USERNAME, WIM_PASSWORD) diff --git a/src/tests/benchmark/automation/tests/Objects.py b/src/tests/benchmark/automation/tests/Objects.py new file mode 100644 index 0000000000000000000000000000000000000000..8ea6f500807e3dbcc2e34dbd559614ff91c955d8 --- /dev/null +++ b/src/tests/benchmark/automation/tests/Objects.py @@ -0,0 +1,54 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, List, Tuple +from common.Constants import DEFAULT_CONTEXT_UUID, DEFAULT_TOPOLOGY_UUID +from common.tools.object_factory.Context import json_context, json_context_id +from common.tools.object_factory.Device import ( + json_device_connect_rules, json_device_emulated_connect_rules, json_device_emulated_packet_router_disabled, + json_device_emulated_tapi_disabled, json_device_id, json_device_packetrouter_disabled, json_device_tapi_disabled) +from common.tools.object_factory.EndPoint import json_endpoint, json_endpoint_id +from common.tools.object_factory.Link import json_link, json_link_id +from common.tools.object_factory.Topology import json_topology, json_topology_id +from common.proto.kpi_sample_types_pb2 import KpiSampleType + +# ----- Context -------------------------------------------------------------------------------------------------------- +CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_UUID) +CONTEXT = json_context(DEFAULT_CONTEXT_UUID) + +# ----- Topology ------------------------------------------------------------------------------------------------------- +TOPOLOGY_ID = json_topology_id(DEFAULT_TOPOLOGY_UUID, context_id=CONTEXT_ID) +TOPOLOGY = json_topology(DEFAULT_TOPOLOGY_UUID, context_id=CONTEXT_ID) + +# ----- Monitoring Samples --------------------------------------------------------------------------------------------- +PACKET_PORT_SAMPLE_TYPES = [ + KpiSampleType.KPISAMPLETYPE_PACKETS_TRANSMITTED, + KpiSampleType.KPISAMPLETYPE_PACKETS_RECEIVED, + KpiSampleType.KPISAMPLETYPE_BYTES_TRANSMITTED, + KpiSampleType.KPISAMPLETYPE_BYTES_RECEIVED, +] + +# ----- Devices -------------------------------------------------------------------------------------------------------- +DEVICE_ENDPOINT_DEFS = [('13/0/0', 'optical', []), ('13/1/2', 'copper', PACKET_PORT_SAMPLE_TYPES)] +DEVICE_CONNECT_RULES = json_device_emulated_connect_rules(DEVICE_ENDPOINT_DEFS) + +# ----- Object Collections --------------------------------------------------------------------------------------------- +CONTEXTS = [CONTEXT] +TOPOLOGIES = [TOPOLOGY] + +DEVICES = [] +for x in range(1, 1000): + DEVICE_UUID = 'EMU-' + str(x) + DEVICE = json_device_emulated_packet_router_disabled(DEVICE_UUID) + DEVICES.append((DEVICE, DEVICE_CONNECT_RULES)) diff --git a/src/tests/benchmark/automation/tests/__init__.py b/src/tests/benchmark/automation/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..70a33251242c51f49140e596b8208a19dd5245f7 --- /dev/null +++ b/src/tests/benchmark/automation/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/tests/benchmark/automation/tests/test_functional_bootstrap.py b/src/tests/benchmark/automation/tests/test_functional_bootstrap.py new file mode 100644 index 0000000000000000000000000000000000000000..3d588801511ae3bc6b5be87566c61b04bf54e467 --- /dev/null +++ b/src/tests/benchmark/automation/tests/test_functional_bootstrap.py @@ -0,0 +1,110 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import copy, logging, pytest +from common.Settings import get_setting +from common.proto.monitoring_pb2 import KpiDescriptorList +from common.tests.EventTools import EVENT_CREATE, EVENT_UPDATE, check_events +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Device import json_device_id +from common.tools.object_factory.Link import json_link_id +from common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from monitoring.client.MonitoringClient import MonitoringClient +from context.client.EventsCollector import EventsCollector +from common.proto.context_pb2 import Context, ContextId, Device, Empty, Topology +from device.client.DeviceClient import DeviceClient +from .Objects import CONTEXT_ID, CONTEXTS, DEVICES, TOPOLOGIES +from tests.Fixtures import context_client, device_client, monitoring_client + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + + +def test_scenario_empty(context_client : ContextClient): # pylint: disable=redefined-outer-name + # ----- List entities - Ensure database is empty ------------------------------------------------------------------- + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == 0 + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == 0 + + +def test_prepare_scenario(context_client : ContextClient): # pylint: disable=redefined-outer-name + + # ----- Create Contexts and Topologies ----------------------------------------------------------------------------- + for context in CONTEXTS: + context_uuid = context['context_id']['context_uuid']['uuid'] + LOGGER.info('Adding Context {:s}'.format(context_uuid)) + response = context_client.SetContext(Context(**context)) + assert response.context_uuid.uuid == context_uuid + + for topology in TOPOLOGIES: + context_uuid = topology['topology_id']['context_id']['context_uuid']['uuid'] + topology_uuid = topology['topology_id']['topology_uuid']['uuid'] + LOGGER.info('Adding Topology {:s}/{:s}'.format(context_uuid, topology_uuid)) + response = context_client.SetTopology(Topology(**topology)) + assert response.context_id.context_uuid.uuid == context_uuid + assert response.topology_uuid.uuid == topology_uuid + context_id = json_context_id(context_uuid) + + +def test_scenario_ready(context_client : ContextClient): # pylint: disable=redefined-outer-name + # ----- List entities - Ensure scenario is ready ------------------------------------------------------------------- + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == len(CONTEXTS) + + response = context_client.ListTopologies(ContextId(**CONTEXT_ID)) + assert len(response.topologies) == len(TOPOLOGIES) + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == 0 + + +def test_devices_bootstraping( + context_client : ContextClient, device_client : DeviceClient): # pylint: disable=redefined-outer-name + + # ----- Create Devices and Validate Collected Events --------------------------------------------------------------- + for device, connect_rules in DEVICES: + device_uuid = device['device_id']['device_uuid']['uuid'] + LOGGER.info('Adding Device {:s}'.format(device_uuid)) + + device_with_connect_rules = copy.deepcopy(device) + device_with_connect_rules['device_config']['config_rules'].extend(connect_rules) + response = device_client.AddDevice(Device(**device_with_connect_rules)) + assert response.device_uuid.uuid == device_uuid + + +def test_devices_bootstrapped(context_client : ContextClient): # pylint: disable=redefined-outer-name + # ----- List entities - Ensure bevices are created ----------------------------------------------------------------- + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == len(CONTEXTS) + + response = context_client.ListTopologies(ContextId(**CONTEXT_ID)) + assert len(response.topologies) == len(TOPOLOGIES) + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == len(DEVICES) + + +def test_links_created(context_client : ContextClient): # pylint: disable=redefined-outer-name + # ----- List entities - Ensure links are created ------------------------------------------------------------------- + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == len(CONTEXTS) + + response = context_client.ListTopologies(ContextId(**CONTEXT_ID)) + assert len(response.topologies) == len(TOPOLOGIES) + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == len(DEVICES) \ No newline at end of file diff --git a/src/tests/benchmark/automation/tests/test_functional_cleanup.py b/src/tests/benchmark/automation/tests/test_functional_cleanup.py new file mode 100644 index 0000000000000000000000000000000000000000..9b6e51c3e296261e52669980f656c6fdf12ceb65 --- /dev/null +++ b/src/tests/benchmark/automation/tests/test_functional_cleanup.py @@ -0,0 +1,68 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, pytest +from common.Settings import get_setting +from common.tests.EventTools import EVENT_REMOVE, check_events +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Device import json_device_id +from common.tools.object_factory.Link import json_link_id +from common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from context.client.EventsCollector import EventsCollector +from common.proto.context_pb2 import ContextId, DeviceId, Empty, LinkId, TopologyId +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client +from .Objects import CONTEXT_ID, CONTEXTS, DEVICES, TOPOLOGIES + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_scenario_cleanup( + context_client : ContextClient, device_client : DeviceClient): # pylint: disable=redefined-outer-name + + # ----- Delete Devices and Validate Collected Events --------------------------------------------------------------- + for device, _ in DEVICES: + device_id = device['device_id'] + device_uuid = device_id['device_uuid']['uuid'] + LOGGER.info('Deleting Device {:s}'.format(device_uuid)) + device_client.DeleteDevice(DeviceId(**device_id)) + #expected_events.append(('DeviceEvent', EVENT_REMOVE, json_device_id(device_uuid))) + + # ----- Delete Topologies and Validate Collected Events ------------------------------------------------------------ + for topology in TOPOLOGIES: + topology_id = topology['topology_id'] + context_uuid = topology_id['context_id']['context_uuid']['uuid'] + topology_uuid = topology_id['topology_uuid']['uuid'] + LOGGER.info('Deleting Topology {:s}/{:s}'.format(context_uuid, topology_uuid)) + context_client.RemoveTopology(TopologyId(**topology_id)) + context_id = json_context_id(context_uuid) + #expected_events.append(('TopologyEvent', EVENT_REMOVE, json_topology_id(topology_uuid, context_id=context_id))) + + # ----- Delete Contexts and Validate Collected Events -------------------------------------------------------------- + for context in CONTEXTS: + context_id = context['context_id'] + context_uuid = context_id['context_uuid']['uuid'] + LOGGER.info('Deleting Context {:s}'.format(context_uuid)) + context_client.RemoveContext(ContextId(**context_id)) + #expected_events.append(('ContextEvent', EVENT_REMOVE, json_context_id(context_uuid))) + + +def test_scenario_empty_again(context_client : ContextClient): # pylint: disable=redefined-outer-name + # ----- List entities - Ensure database is empty again ------------------------------------------------------------- + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == 0 + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == 0 diff --git a/src/tests/benchmark/policy/.gitignore b/src/tests/benchmark/policy/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..0a3f4400d5c88b1af32c7667d69d2fdc12d5424e --- /dev/null +++ b/src/tests/benchmark/policy/.gitignore @@ -0,0 +1,2 @@ +# Add here your files containing confidential testbed details such as IP addresses, ports, usernames, passwords, etc. +descriptors_real.json diff --git a/src/tests/benchmark/policy/PolicyAddService.js b/src/tests/benchmark/policy/PolicyAddService.js new file mode 100644 index 0000000000000000000000000000000000000000..708209ba01862a169dd7007a05e2ba29a198282a --- /dev/null +++ b/src/tests/benchmark/policy/PolicyAddService.js @@ -0,0 +1,72 @@ +import grpc from 'k6/net/grpc'; +import exec from "k6/execution"; +import { check, sleep } from 'k6'; + +const client = new grpc.Client(); +client.load(['../proto'], 'policy.proto'); + +export const data = []; +for (let i = 1; i < 2; i++) { + data.push( + { + "serviceId": { + "context_id": { + "context_uuid": {"uuid": "admin"} + }, + "service_uuid": { + "uuid": "6942d780-cfa9-4dea-a946-a8a0b3f7eab2" + } + }, + "policyRuleBasic": { + "policyRuleId": {"uuid": {"uuid": i.toString()}}, + "policyRuleState": {"policyRuleState": "POLICY_UNDEFINED"}, + "priority": 0, + "conditionList": [{"kpiId": {"kpi_id": {"uuid": "1"}}, + "numericalOperator": "POLICYRULE_CONDITION_NUMERICAL_EQUAL", + "kpiValue": {"boolVal": false} + + }], + "actionList": [{}], + "booleanOperator": "POLICYRULE_CONDITION_BOOLEAN_UNDEFINED" + } + } + ); +}; + +export const options = { + scenarios :{ + + "AddPolicy-scenario": { + executor: "shared-iterations", + vus: 1, + iterations: data.length, + maxDuration: "1h" + } + } +}; + +export default () => { + client.connect('10.1.255.198:6060', { + plaintext: true, +// timeout: 10000 + }); + + var item = data[exec.scenario.iterationInInstance]; + const response = client.invoke('policy.PolicyService/PolicyAddService', item); + + check(response, { + 'status is OK': (r) => r && r.status === grpc.StatusOK, + }); + + console.log(JSON.stringify(response.message)); + + client.close(); + sleep(1); +}; + +export function handleSummary(data) { + + return { + 'summary_add_1.json': JSON.stringify(data.metrics.grpc_req_duration.values), //the default data object + }; +} diff --git a/src/tests/benchmark/policy/PolicyDelete.js b/src/tests/benchmark/policy/PolicyDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..85946837eb1123bd698f907e13415b7281a779d2 --- /dev/null +++ b/src/tests/benchmark/policy/PolicyDelete.js @@ -0,0 +1,53 @@ +import grpc from 'k6/net/grpc'; +import exec from "k6/execution"; +import { check, sleep } from 'k6'; + +const client = new grpc.Client(); +client.load(['../proto'], 'policy.proto'); + +export const data = []; +for (let i = 1; i < 2; i++) { + data.push( + { + "uuid": {"uuid": i.toString()} + } + ); +}; + +export const options = { + scenarios :{ + + "AddPolicy-scenario": { + executor: "shared-iterations", + vus: 1, + iterations: data.length, + maxDuration: "1h" + } + } +}; + +export default () => { + client.connect('10.1.255.198:6060', { + plaintext: true, +// timeout: 10000 + }); + + var item = data[exec.scenario.iterationInInstance]; + const response = client.invoke('policy.PolicyService/PolicyDelete', item); + + check(response, { + 'status is OK': (r) => r && r.status === grpc.StatusOK, + }); + + console.log(JSON.stringify(response.message)); + + client.close(); + sleep(1); +}; + +export function handleSummary(data) { + + return { + 'summary_delete_1.json': JSON.stringify(data.metrics.grpc_req_duration.values), //the default data object + }; +} diff --git a/src/tests/benchmark/policy/PolicyUpdateService.js b/src/tests/benchmark/policy/PolicyUpdateService.js new file mode 100644 index 0000000000000000000000000000000000000000..a3774f9dac0dec420b88e6e236e8dcd2e698e3cd --- /dev/null +++ b/src/tests/benchmark/policy/PolicyUpdateService.js @@ -0,0 +1,72 @@ +import grpc from 'k6/net/grpc'; +import exec from "k6/execution"; +import { check, sleep } from 'k6'; + +const client = new grpc.Client(); +client.load(['../proto'], 'policy.proto'); + +export const data = []; +for (let i = 1; i < 2; i++) { + data.push( + { + "serviceId": { + "context_id": { + "context_uuid": {"uuid": "admin"} + }, + "service_uuid": { + "uuid": "6942d780-cfa9-4dea-a946-a8a0b3f7eab2" + } + }, + "policyRuleBasic": { + "policyRuleId": {"uuid": {"uuid": i.toString()}}, + "policyRuleState": {"policyRuleState": "POLICY_UNDEFINED"}, + "priority": 0, + "conditionList": [{"kpiId": {"kpi_id": {"uuid": "1"}}, + "numericalOperator": "POLICYRULE_CONDITION_NUMERICAL_EQUAL", + "kpiValue": {"boolVal": false} + + }], + "actionList": [{}], + "booleanOperator": "POLICYRULE_CONDITION_BOOLEAN_UNDEFINED" + } + } + ); +}; + +export const options = { + scenarios :{ + + "AddPolicy-scenario": { + executor: "shared-iterations", + vus: 1, + iterations: data.length, + maxDuration: "1h" + } + } +}; + +export default () => { + client.connect('10.1.255.198:6060', { + plaintext: true, +// timeout: 10000 + }); + + var item = data[exec.scenario.iterationInInstance]; + const response = client.invoke('policy.PolicyService/PolicyUpdateService', item); + + check(response, { + 'status is OK': (r) => r && r.status === grpc.StatusOK, + }); + + console.log(JSON.stringify(response.message)); + + client.close(); + sleep(1); +}; + +export function handleSummary(data) { + + return { + 'summary_add_1.json': JSON.stringify(data.metrics.grpc_req_duration.values), //the default data object + }; +} diff --git a/src/tests/benchmark/policy/README.md b/src/tests/benchmark/policy/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8b5b2a01efc357b5d8eca6a6890b051b4ffac260 --- /dev/null +++ b/src/tests/benchmark/policy/README.md @@ -0,0 +1,17 @@ + +# Grafana k6 load testing tool + +# K6 Installation Instructions on Ubuntu + +sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69 +echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list +sudo apt-get update +sudo apt-get install k6 + +Or install k6 via snap: + +sudo apt install snapd +sudo snap install k6 + +# Running K6 +k6 run script.js \ No newline at end of file diff --git a/src/tests/benchmark/policy/__init__.py b/src/tests/benchmark/policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..70a33251242c51f49140e596b8208a19dd5245f7 --- /dev/null +++ b/src/tests/benchmark/policy/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/tests/benchmark/policy/deploy_specs.sh b/src/tests/benchmark/policy/deploy_specs.sh new file mode 100644 index 0000000000000000000000000000000000000000..ffd91da35186fe21f418950493ef797a9af1b522 --- /dev/null +++ b/src/tests/benchmark/policy/deploy_specs.sh @@ -0,0 +1,26 @@ +# Set the URL of your local Docker registry where the images will be uploaded to. +export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" + +# Set the list of components, separated by spaces, you want to build images for, and deploy. +# Supported components are: +# context device automation policy service compute monitoring webui +# interdomain slice pathcomp dlt +# dbscanserving opticalattackmitigator opticalattackdetector +# l3_attackmitigator l3_centralizedattackdetector l3_distributedattackdetector +export TFS_COMPONENTS="context device automation monitoring pathcomp service slice compute webui" + +# Set the tag you want to use for your images. +export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE="tfs" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Set the new Grafana admin password +export TFS_GRAFANA_PASSWORD="admin123+" + +# If not already set, disable skip-build flag. +# If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used. +export TFS_SKIP_BUILD=${TFS_SKIP_BUILD:-""} diff --git a/src/tests/benchmark/policy/descriptors_emulated.json b/src/tests/benchmark/policy/descriptors_emulated.json new file mode 100644 index 0000000000000000000000000000000000000000..a71d454f41f324cabb48a023d6d840a59245800c --- /dev/null +++ b/src/tests/benchmark/policy/descriptors_emulated.json @@ -0,0 +1,121 @@ +{ + "contexts": [ + { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_ids": [], + "service_ids": [] + } + ], + "topologies": [ + { + "topology_id": {"topology_uuid": {"uuid": "admin"}, "context_id": {"context_uuid": {"uuid": "admin"}}}, + "device_ids": [ + {"device_uuid": {"uuid": "R1-EMU"}}, + {"device_uuid": {"uuid": "R2-EMU"}}, + {"device_uuid": {"uuid": "R3-EMU"}}, + {"device_uuid": {"uuid": "R4-EMU"}}, + {"device_uuid": {"uuid": "O1-OLS"}} + ], + "link_ids": [ + {"link_uuid": {"uuid": "R1-EMU/13/0/0==O1-OLS/aade6001-f00b-5e2f-a357-6a0a9d3de870"}}, + {"link_uuid": {"uuid": "R2-EMU/13/0/0==O1-OLS/eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}}, + {"link_uuid": {"uuid": "R3-EMU/13/0/0==O1-OLS/0ef74f99-1acc-57bd-ab9d-4b958b06c513"}}, + {"link_uuid": {"uuid": "R4-EMU/13/0/0==O1-OLS/50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}} + ] + } + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "R1-EMU"}}, "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [0], "device_endpoints": [], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "13/0/0", "type": "optical", "sample_types": []}, + {"uuid": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R2-EMU"}}, "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [0], "device_endpoints": [], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "13/0/0", "type": "optical", "sample_types": []}, + {"uuid": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R3-EMU"}}, "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [0], "device_endpoints": [], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "13/0/0", "type": "optical", "sample_types": []}, + {"uuid": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R4-EMU"}}, "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [0], "device_endpoints": [], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "13/0/0", "type": "optical", "sample_types": []}, + {"uuid": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "O1-OLS"}}, "device_type": "emu-open-line-system", + "device_operational_status": 1, "device_drivers": [0], "device_endpoints": [], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "aade6001-f00b-5e2f-a357-6a0a9d3de870", "type": "optical", "sample_types": []}, + {"uuid": "eb287d83-f05e-53ec-ab5a-adf6bd2b5418", "type": "optical", "sample_types": []}, + {"uuid": "0ef74f99-1acc-57bd-ab9d-4b958b06c513", "type": "optical", "sample_types": []}, + {"uuid": "50296d99-58cc-5ce7-82f5-fc8ee4eec2ec", "type": "optical", "sample_types": []} + ]}}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "R1-EMU/13/0/0==O1-OLS/aade6001-f00b-5e2f-a357-6a0a9d3de870"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1-EMU"}}, "endpoint_uuid": {"uuid": "13/0/0"}}, + {"device_id": {"device_uuid": {"uuid": "O1-OLS"}}, "endpoint_uuid": {"uuid": "aade6001-f00b-5e2f-a357-6a0a9d3de870"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R2-EMU/13/0/0==O1-OLS/eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2-EMU"}}, "endpoint_uuid": {"uuid": "13/0/0"}}, + {"device_id": {"device_uuid": {"uuid": "O1-OLS"}}, "endpoint_uuid": {"uuid": "eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R3-EMU/13/0/0==O1-OLS/0ef74f99-1acc-57bd-ab9d-4b958b06c513"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3-EMU"}}, "endpoint_uuid": {"uuid": "13/0/0"}}, + {"device_id": {"device_uuid": {"uuid": "O1-OLS"}}, "endpoint_uuid": {"uuid": "0ef74f99-1acc-57bd-ab9d-4b958b06c513"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R4-EMU/13/0/0==O1-OLS/50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4-EMU"}}, "endpoint_uuid": {"uuid": "13/0/0"}}, + {"device_id": {"device_uuid": {"uuid": "O1-OLS"}}, "endpoint_uuid": {"uuid": "50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}} + ] + } + ] +} \ No newline at end of file diff --git a/src/tests/benchmark/policy/run_test_01_bootstrap.sh b/src/tests/benchmark/policy/run_test_01_bootstrap.sh new file mode 100755 index 0000000000000000000000000000000000000000..10b18257b937a5aae82a66cd5e3df83abd44e1d8 --- /dev/null +++ b/src/tests/benchmark/policy/run_test_01_bootstrap.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +pytest --verbose --log-level=INFO -o log_cli=true -o log_cli_level=INFO src/tests/benchmark/policy/tests/test_functional_bootstrap.py diff --git a/src/tests/benchmark/policy/run_test_02_create_service.sh b/src/tests/benchmark/policy/run_test_02_create_service.sh new file mode 100755 index 0000000000000000000000000000000000000000..69ef34ff954d550fbe2c22719f0afb2eb3360525 --- /dev/null +++ b/src/tests/benchmark/policy/run_test_02_create_service.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +pytest --verbose --log-level=INFO -o log_cli=true -o log_cli_level=INFO src/tests/benchmark/policy/tests/test_functional_create_service.py diff --git a/src/tests/benchmark/policy/run_test_03_delete_service.sh b/src/tests/benchmark/policy/run_test_03_delete_service.sh new file mode 100755 index 0000000000000000000000000000000000000000..01eb521310053b06538c91cbfaae80aa3b2fdd45 --- /dev/null +++ b/src/tests/benchmark/policy/run_test_03_delete_service.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +pytest --verbose --log-level=INFO -o log_cli=true -o log_cli_level=INFO src/tests/benchmark/policy/tests/test_functional_delete_service.py diff --git a/src/tests/benchmark/policy/run_test_04_cleanup.sh b/src/tests/benchmark/policy/run_test_04_cleanup.sh new file mode 100755 index 0000000000000000000000000000000000000000..a2be265de04552cbebe83decba538656232bf904 --- /dev/null +++ b/src/tests/benchmark/policy/run_test_04_cleanup.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +pytest --verbose --log-level=INFO -o log_cli=true -o log_cli_level=INFO src/tests/benchmark/policy/tests/test_functional_cleanup.py diff --git a/src/tests/benchmark/policy/tests/.gitignore b/src/tests/benchmark/policy/tests/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..76cb708d1b532c9b69166e55f36bcb912fd5e370 --- /dev/null +++ b/src/tests/benchmark/policy/tests/.gitignore @@ -0,0 +1,2 @@ +# Add here your files containing confidential testbed details such as IP addresses, ports, usernames, passwords, etc. +Credentials.py diff --git a/src/tests/benchmark/policy/tests/Fixtures.py b/src/tests/benchmark/policy/tests/Fixtures.py new file mode 100644 index 0000000000000000000000000000000000000000..3b35a12e299ba776e909fbdd2739e971431083a6 --- /dev/null +++ b/src/tests/benchmark/policy/tests/Fixtures.py @@ -0,0 +1,28 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest, logging +from common.Settings import get_setting +from tests.tools.mock_osm.Constants import WIM_PASSWORD, WIM_USERNAME +from tests.tools.mock_osm.MockOSM import MockOSM +from .Objects import WIM_MAPPING + +LOGGER = logging.getLogger(__name__) + +@pytest.fixture(scope='session') +def osm_wim(): + wim_url = 'http://{:s}:{:s}'.format( + get_setting('COMPUTESERVICE_SERVICE_HOST'), str(get_setting('COMPUTESERVICE_SERVICE_PORT_HTTP'))) + LOGGER.info('WIM_MAPPING = {:s}'.format(str(WIM_MAPPING))) + return MockOSM(wim_url, WIM_MAPPING, WIM_USERNAME, WIM_PASSWORD) diff --git a/src/tests/benchmark/policy/tests/Objects.py b/src/tests/benchmark/policy/tests/Objects.py new file mode 100644 index 0000000000000000000000000000000000000000..7bfbe9fce558d6a86d965ecb6421369d7f544d4d --- /dev/null +++ b/src/tests/benchmark/policy/tests/Objects.py @@ -0,0 +1,38 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from common.tools.object_factory.Device import json_device_id +from common.tools.object_factory.EndPoint import json_endpoint_id +from tests.tools.mock_osm.Tools import connection_point, wim_mapping + +# ----- WIM Service Settings ------------------------------------------------------------------------------------------- + +WIM_DC1_SITE_ID = '1' +WIM_DC1_DEVICE_ID = json_device_id('R1-EMU') +WIM_DC1_ENDPOINT_ID = json_endpoint_id(WIM_DC1_DEVICE_ID, '13/1/2') + +WIM_DC2_SITE_ID = '2' +WIM_DC2_DEVICE_ID = json_device_id('R3-EMU') +WIM_DC2_ENDPOINT_ID = json_endpoint_id(WIM_DC2_DEVICE_ID, '13/1/2') + +WIM_SEP_DC1, WIM_MAP_DC1 = wim_mapping(WIM_DC1_SITE_ID, WIM_DC1_ENDPOINT_ID) +WIM_SEP_DC2, WIM_MAP_DC2 = wim_mapping(WIM_DC2_SITE_ID, WIM_DC2_ENDPOINT_ID) +WIM_MAPPING = [WIM_MAP_DC1, WIM_MAP_DC2] + +WIM_SRV_VLAN_ID = 300 +WIM_SERVICE_TYPE = 'ELINE' +WIM_SERVICE_CONNECTION_POINTS = [ + connection_point(WIM_SEP_DC1, 'dot1q', WIM_SRV_VLAN_ID), + connection_point(WIM_SEP_DC2, 'dot1q', WIM_SRV_VLAN_ID), +] diff --git a/src/tests/benchmark/policy/tests/__init__.py b/src/tests/benchmark/policy/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..70a33251242c51f49140e596b8208a19dd5245f7 --- /dev/null +++ b/src/tests/benchmark/policy/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/tests/benchmark/policy/tests/test_functional_bootstrap.py b/src/tests/benchmark/policy/tests/test_functional_bootstrap.py new file mode 100644 index 0000000000000000000000000000000000000000..71deb9d596b1494e148b140902ca927e5d664dd3 --- /dev/null +++ b/src/tests/benchmark/policy/tests/test_functional_bootstrap.py @@ -0,0 +1,95 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, time +from common.proto.context_pb2 import ContextId, Empty +from common.proto.monitoring_pb2 import KpiDescriptorList +from common.tests.LoadScenario import load_scenario_from_descriptor +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from monitoring.client.MonitoringClient import MonitoringClient +from tests.Fixtures import context_client, device_client, monitoring_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'ofc22/descriptors_emulated.json' + +def test_scenario_bootstrap( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + # ----- List entities - Ensure database is empty ------------------------------------------------------------------- + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == 0 + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == 0 + + response = context_client.ListLinks(Empty()) + assert len(response.links) == 0 + + + # ----- Load Scenario ---------------------------------------------------------------------------------------------- + descriptor_loader = load_scenario_from_descriptor( + DESCRIPTOR_FILE, context_client, device_client, None, None) + + + # ----- List entities - Ensure scenario is ready ------------------------------------------------------------------- + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == descriptor_loader.num_contexts + + for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): + response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) + assert len(response.topologies) == num_topologies + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == descriptor_loader.num_devices + + response = context_client.ListLinks(Empty()) + assert len(response.links) == descriptor_loader.num_links + + for context_uuid, _ in descriptor_loader.num_services.items(): + response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) + assert len(response.services) == 0 + +def test_scenario_kpis_created( + context_client : ContextClient, # pylint: disable=redefined-outer-name + monitoring_client: MonitoringClient, # pylint: disable=redefined-outer-name +) -> None: + """ + This test validates that KPIs related to the service/device/endpoint were created + during the service creation process. + """ + response = context_client.ListDevices(Empty()) + kpis_expected = set() + for device in response.devices: + device_uuid = device.device_id.device_uuid.uuid + for endpoint in device.device_endpoints: + endpoint_uuid = endpoint.endpoint_id.endpoint_uuid.uuid + for kpi_sample_type in endpoint.kpi_sample_types: + kpis_expected.add((device_uuid, endpoint_uuid, kpi_sample_type)) + num_kpis_expected = len(kpis_expected) + LOGGER.info('Num KPIs expected: {:d}'.format(num_kpis_expected)) + + num_kpis_created, num_retry = 0, 0 + while (num_kpis_created != num_kpis_expected) and (num_retry < 5): + response: KpiDescriptorList = monitoring_client.GetKpiDescriptorList(Empty()) + num_kpis_created = len(response.kpi_descriptor_list) + LOGGER.info('Num KPIs created: {:d}'.format(num_kpis_created)) + time.sleep(0.5) + num_retry += 1 + assert num_kpis_created == num_kpis_expected diff --git a/src/tests/benchmark/policy/tests/test_functional_cleanup.py b/src/tests/benchmark/policy/tests/test_functional_cleanup.py new file mode 100644 index 0000000000000000000000000000000000000000..be807eaa0242f2363b5b6c189ce4de264528a54c --- /dev/null +++ b/src/tests/benchmark/policy/tests/test_functional_cleanup.py @@ -0,0 +1,80 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from common.tools.descriptor.Loader import DescriptorLoader +from common.tools.object_factory.Context import json_context_id +from common.proto.context_pb2 import ContextId, DeviceId, Empty, LinkId, TopologyId +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'ofc22/descriptors_emulated.json' + + +def test_services_removed( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + # ----- List entities - Ensure service is removed ------------------------------------------------------------------ + with open(DESCRIPTOR_FILE, 'r', encoding='UTF-8') as f: + descriptors = f.read() + + descriptor_loader = DescriptorLoader(descriptors) + + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == descriptor_loader.num_contexts + + for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): + response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) + assert len(response.topologies) == num_topologies + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == descriptor_loader.num_devices + + response = context_client.ListLinks(Empty()) + assert len(response.links) == descriptor_loader.num_links + + for context_uuid, _ in descriptor_loader.num_services.items(): + response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) + assert len(response.services) == 0 + + + # ----- Delete Links, Devices, Topologies, Contexts ---------------------------------------------------------------- + for link in descriptor_loader.links: + context_client.RemoveLink(LinkId(**link['link_id'])) + + for device in descriptor_loader.devices: + device_client .DeleteDevice(DeviceId(**device['device_id'])) + + for context_uuid, topology_list in descriptor_loader.topologies.items(): + for topology in topology_list: + context_client.RemoveTopology(TopologyId(**topology['topology_id'])) + + for context in descriptor_loader.contexts: + context_client.RemoveContext(ContextId(**context['context_id'])) + + + # ----- List entities - Ensure database is empty again ------------------------------------------------------------- + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == 0 + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == 0 + + response = context_client.ListLinks(Empty()) + assert len(response.links) == 0 diff --git a/src/tests/benchmark/policy/tests/test_functional_create_service.py b/src/tests/benchmark/policy/tests/test_functional_create_service.py new file mode 100644 index 0000000000000000000000000000000000000000..e606d060d52631ba72e191d7c025bd7b43048b39 --- /dev/null +++ b/src/tests/benchmark/policy/tests/test_functional_create_service.py @@ -0,0 +1,124 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, random +from common.DeviceTypes import DeviceTypeEnum +from common.proto.context_pb2 import ContextId, Empty +from common.proto.kpi_sample_types_pb2 import KpiSampleType +from common.tools.descriptor.Loader import DescriptorLoader +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from monitoring.client.MonitoringClient import MonitoringClient +from tests.Fixtures import context_client, device_client, monitoring_client # pylint: disable=unused-import +from tests.tools.mock_osm.MockOSM import MockOSM +from .Fixtures import osm_wim # pylint: disable=unused-import +from .Objects import WIM_SERVICE_CONNECTION_POINTS, WIM_SERVICE_TYPE + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DEVTYPE_EMU_PR = DeviceTypeEnum.EMULATED_PACKET_ROUTER.value +DEVTYPE_EMU_OLS = DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM.value + +DESCRIPTOR_FILE = 'ofc22/descriptors_emulated.json' + +def test_service_creation(context_client : ContextClient, osm_wim : MockOSM): # pylint: disable=redefined-outer-name + # ----- List entities - Ensure scenario is ready ------------------------------------------------------------------- + with open(DESCRIPTOR_FILE, 'r', encoding='UTF-8') as f: + descriptors = f.read() + + descriptor_loader = DescriptorLoader(descriptors) + + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == descriptor_loader.num_contexts + + for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): + response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) + assert len(response.topologies) == num_topologies + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == descriptor_loader.num_devices + + response = context_client.ListLinks(Empty()) + assert len(response.links) == descriptor_loader.num_links + + for context_uuid, num_services in descriptor_loader.num_services.items(): + response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) + assert len(response.services) == 0 + + + # ----- Create Service --------------------------------------------------------------------------------------------- + service_uuid = osm_wim.create_connectivity_service(WIM_SERVICE_TYPE, WIM_SERVICE_CONNECTION_POINTS) + osm_wim.get_connectivity_service_status(service_uuid) + + + # ----- List entities - Ensure service is created ------------------------------------------------------------------ + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == descriptor_loader.num_contexts + + for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): + response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) + assert len(response.topologies) == num_topologies + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == descriptor_loader.num_devices + + response = context_client.ListLinks(Empty()) + assert len(response.links) == descriptor_loader.num_links + + for context_uuid, num_services in descriptor_loader.num_services.items(): + response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) + LOGGER.info('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 2*num_services # OLS & L3NM => (L3NM + TAPI) + + for service in response.services: + service_id = service.service_id + response = context_client.ListConnections(service_id) + LOGGER.info(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), + grpc_message_to_json_string(response))) + assert len(response.connections) == 1 # one connection per service + + +def test_scenario_kpi_values_created( + monitoring_client: MonitoringClient, # pylint: disable=redefined-outer-name +) -> None: + """ + This test validates that KPI values have been inserted into the monitoring database. + We short k KPI descriptors to test. + """ + response = monitoring_client.GetKpiDescriptorList(Empty()) + kpi_descriptors = random.choices(response.kpi_descriptor_list, k=2) + + for kpi_descriptor in kpi_descriptors: + MSG = 'KPI(kpi_uuid={:s}, device_uuid={:s}, endpoint_uuid={:s}, service_uuid={:s}, kpi_sample_type={:s})...' + LOGGER.info(MSG.format( + str(kpi_descriptor.kpi_id.kpi_id.uuid), str(kpi_descriptor.device_id.device_uuid.uuid), + str(kpi_descriptor.endpoint_id.endpoint_uuid.uuid), str(kpi_descriptor.service_id.service_uuid.uuid), + str(KpiSampleType.Name(kpi_descriptor.kpi_sample_type)))) + response = monitoring_client.GetInstantKpi(kpi_descriptor.kpi_id) + kpi_uuid = response.kpi_id.kpi_id.uuid + assert kpi_uuid == kpi_descriptor.kpi_id.kpi_id.uuid + kpi_value_type = response.kpi_value.WhichOneof('value') + if kpi_value_type is None: + MSG = ' KPI({:s}): No instant value found' + LOGGER.warning(MSG.format(str(kpi_uuid))) + else: + kpi_timestamp = response.timestamp.timestamp + assert kpi_timestamp > 0 + assert kpi_value_type == 'floatVal' + kpi_value = getattr(response.kpi_value, kpi_value_type) + MSG = ' KPI({:s}): timestamp={:s} value_type={:s} value={:s}' + LOGGER.info(MSG.format(str(kpi_uuid), str(kpi_timestamp), str(kpi_value_type), str(kpi_value))) diff --git a/src/tests/benchmark/policy/tests/test_functional_delete_service.py b/src/tests/benchmark/policy/tests/test_functional_delete_service.py new file mode 100644 index 0000000000000000000000000000000000000000..0f8d088012bed164e4603a813bfe9154eda8f568 --- /dev/null +++ b/src/tests/benchmark/policy/tests/test_functional_delete_service.py @@ -0,0 +1,99 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from common.Constants import DEFAULT_CONTEXT_UUID +from common.DeviceTypes import DeviceTypeEnum +from common.proto.context_pb2 import ContextId, Empty, ServiceTypeEnum +from common.tools.descriptor.Loader import DescriptorLoader +from common.tools.object_factory.Context import json_context_id +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient +from tests.Fixtures import context_client # pylint: disable=unused-import +from tests.tools.mock_osm.MockOSM import MockOSM +from .Fixtures import osm_wim # pylint: disable=unused-import + + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DEVTYPE_EMU_PR = DeviceTypeEnum.EMULATED_PACKET_ROUTER.value +DEVTYPE_EMU_OLS = DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM.value + +DESCRIPTOR_FILE = 'ofc22/descriptors_emulated.json' + + +def test_service_removal(context_client : ContextClient, osm_wim : MockOSM): # pylint: disable=redefined-outer-name + # ----- List entities - Ensure service is created ------------------------------------------------------------------ + with open(DESCRIPTOR_FILE, 'r', encoding='UTF-8') as f: + descriptors = f.read() + + descriptor_loader = DescriptorLoader(descriptors) + + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == descriptor_loader.num_contexts + + for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): + response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) + assert len(response.topologies) == num_topologies + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == descriptor_loader.num_devices + + response = context_client.ListLinks(Empty()) + assert len(response.links) == descriptor_loader.num_links + + l3nm_service_uuids = set() + response = context_client.ListServices(ContextId(**json_context_id(DEFAULT_CONTEXT_UUID))) + assert len(response.services) == 2 # OLS & L3NM => (L3NM + TAPI) + for service in response.services: + service_id = service.service_id + + if service.service_type == ServiceTypeEnum.SERVICETYPE_L3NM: + service_uuid = service_id.service_uuid.uuid + l3nm_service_uuids.add(service_uuid) + osm_wim.conn_info[service_uuid] = {} + + response = context_client.ListConnections(service_id) + LOGGER.info(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), + grpc_message_to_json_string(response))) + assert len(response.connections) == 1 # one connection per service + + # Identify service to delete + assert len(l3nm_service_uuids) == 1 # assume a single L3NM service has been created + l3nm_service_uuid = set(l3nm_service_uuids).pop() + + + # ----- Delete Service --------------------------------------------------------------------------------------------- + osm_wim.delete_connectivity_service(l3nm_service_uuid) + + + # ----- List entities - Ensure service is removed ------------------------------------------------------------------ + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == descriptor_loader.num_contexts + + for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): + response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) + assert len(response.topologies) == num_topologies + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == descriptor_loader.num_devices + + response = context_client.ListLinks(Empty()) + assert len(response.links) == descriptor_loader.num_links + + for context_uuid, num_services in descriptor_loader.num_services.items(): + response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) + assert len(response.services) == 0 diff --git a/src/tests/ofc22/descriptors_emulated_xr.json b/src/tests/ofc22/descriptors_emulated_xr.json index 30bd97dddeb94f836d3fe66e51fce729c34ceced..4cb0dbfca891faebf4c812c2fbb77f4ecd91330a 100644 --- a/src/tests/ofc22/descriptors_emulated_xr.json +++ b/src/tests/ofc22/descriptors_emulated_xr.json @@ -9,8 +9,19 @@ "topologies": [ { "topology_id": {"topology_uuid": {"uuid": "admin"}, "context_id": {"context_uuid": {"uuid": "admin"}}}, - "device_ids": [], - "link_ids": [] + "device_ids": [ + {"device_uuid": {"uuid": "R1-EMU"}}, + {"device_uuid": {"uuid": "R2-EMU"}}, + {"device_uuid": {"uuid": "R3-EMU"}}, + {"device_uuid": {"uuid": "R4-EMU"}}, + {"device_uuid": {"uuid": "X1-XR-CONSTELLATION"}} + ], + "link_ids": [ + {"link_uuid": {"uuid": "R1-EMU/13/0/0==XR HUB 1|XR-T4"}}, + {"link_uuid": {"uuid": "R2-EMU/13/0/0==XR HUB 1|XR-T3"}}, + {"link_uuid": {"uuid": "R3-EMU/13/0/0==XR1-XR LEAF 1|XR-T1"}}, + {"link_uuid": {"uuid": "R4-EMU/13/0/0==XR LEAF 2|XR-T1"}} + ] } ], "devices": [ diff --git a/src/tests/ofc22/tests/test_functional_create_service_xr.py b/src/tests/ofc22/tests/test_functional_create_service_xr.py index bb78abc1efe7701308448ad4b83ef2a6e32079c4..6008eaa10702f0491742f6195a5fdf15735e5f14 100644 --- a/src/tests/ofc22/tests/test_functional_create_service_xr.py +++ b/src/tests/ofc22/tests/test_functional_create_service_xr.py @@ -20,7 +20,7 @@ from common.tools.object_factory.Connection import json_connection_id from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.Service import json_service_id from common.tools.grpc.Tools import grpc_message_to_json_string -from compute.tests.mock_osm.MockOSM import MockOSM +from tests.tools.mock_osm.MockOSM import MockOSM from context.client.ContextClient import ContextClient from context.client.EventsCollector import EventsCollector from common.proto.context_pb2 import ContextId, Empty diff --git a/src/tests/ofc22/tests/test_functional_delete_service_xr.py b/src/tests/ofc22/tests/test_functional_delete_service_xr.py index f28828be056e755058a0f6b15bd8ea3e9acbbdeb..546a8781bee125dd48723c67cddd2aec26dc3ed9 100644 --- a/src/tests/ofc22/tests/test_functional_delete_service_xr.py +++ b/src/tests/ofc22/tests/test_functional_delete_service_xr.py @@ -20,7 +20,7 @@ from common.tools.object_factory.Connection import json_connection_id from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.Service import json_service_id from common.tools.grpc.Tools import grpc_message_to_json_string -from compute.tests.mock_osm.MockOSM import MockOSM +from tests.tools.mock_osm.MockOSM import MockOSM from context.client.ContextClient import ContextClient from context.client.EventsCollector import EventsCollector from common.proto.context_pb2 import ContextId, Empty, ServiceTypeEnum diff --git a/src/tests/tools/load_gen/Constants.py b/src/tests/tools/load_gen/Constants.py new file mode 100644 index 0000000000000000000000000000000000000000..32b457bae849a50ccbe61e1997aec944cb6a2257 --- /dev/null +++ b/src/tests/tools/load_gen/Constants.py @@ -0,0 +1,28 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from enum import Enum + +class RequestType(Enum): + SERVICE_L2NM = 'svc-l2nm' + SERVICE_L3NM = 'svc-l3nm' + SERVICE_TAPI = 'svc-tapi' + SERVICE_MW = 'svc-mw' + SLICE_L2NM = 'slc-l2nm' + SLICE_L3NM = 'slc-l3nm' + +ENDPOINT_COMPATIBILITY = { + 'PHOTONIC_MEDIA:FLEX:G_6_25GHZ:INPUT': 'PHOTONIC_MEDIA:FLEX:G_6_25GHZ:OUTPUT', + 'PHOTONIC_MEDIA:DWDM:G_50GHZ:INPUT' : 'PHOTONIC_MEDIA:DWDM:G_50GHZ:OUTPUT', +} diff --git a/src/tests/tools/load_gen/DltTools.py b/src/tests/tools/load_gen/DltTools.py new file mode 100644 index 0000000000000000000000000000000000000000..34d195ad701c3af9bd0d32acb786013151ec01f8 --- /dev/null +++ b/src/tests/tools/load_gen/DltTools.py @@ -0,0 +1,123 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, queue +from typing import Optional, Set, Tuple +from common.proto.context_pb2 import DeviceId, LinkId, ServiceId, SliceId, TopologyId +from common.proto.dlt_connector_pb2 import DltDeviceId, DltLinkId, DltServiceId, DltSliceId +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from dlt.connector.client.DltConnectorClient import DltConnectorClient + +def explore_entities_to_record( + slice_id : Optional[SliceId] = None, service_id : Optional[ServiceId] = None +) -> Tuple[Set[str], Set[str], Set[str]]: + + context_client = ContextClient() + + slices_to_record : Set[str] = set() + services_to_record : Set[str] = set() + devices_to_record : Set[str] = set() + + slices_to_explore = queue.Queue() + services_to_explore = queue.Queue() + if slice_id is not None: slices_to_explore.put(slice_id) + if service_id is not None: services_to_explore.put(service_id) + + while not slices_to_explore.empty(): + slice_id = slices_to_explore.get() + slices_to_record.add(grpc_message_to_json_string(slice_id)) + + slice_ = context_client.GetSlice(slice_id) + + for endpoint_id in slice_.slice_endpoint_ids: + devices_to_record.add(grpc_message_to_json_string(endpoint_id.device_id)) + for subslice_id in slice_.slice_subslice_ids: + slices_to_explore.put(subslice_id) + for service_id in slice_.slice_service_ids: + services_to_explore.put(service_id) + + while not services_to_explore.empty(): + service_id = services_to_explore.get() + services_to_record.add(grpc_message_to_json_string(service_id)) + + service = context_client.GetService(service_id) + + for endpoint_id in service.service_endpoint_ids: + devices_to_record.add(grpc_message_to_json_string(endpoint_id.device_id)) + + connections = context_client.ListConnections(service_id) + for connection in connections.connections: + for endpoint_id in connection.path_hops_endpoint_ids: + devices_to_record.add(grpc_message_to_json_string(endpoint_id.device_id)) + for service_id in connection.sub_service_ids: + services_to_explore.put(service_id) + + return slices_to_record, services_to_record, devices_to_record + +def record_device_to_dlt( + dlt_connector_client : DltConnectorClient, domain_id : TopologyId, device_id : DeviceId, delete : bool = False +) -> None: + dlt_device_id = DltDeviceId() + dlt_device_id.topology_id.CopyFrom(domain_id) # pylint: disable=no-member + dlt_device_id.device_id.CopyFrom(device_id) # pylint: disable=no-member + dlt_device_id.delete = delete + dlt_connector_client.RecordDevice(dlt_device_id) + +def record_link_to_dlt( + dlt_connector_client : DltConnectorClient, domain_id : TopologyId, link_id : LinkId, delete : bool = False +) -> None: + dlt_link_id = DltLinkId() + dlt_link_id.topology_id.CopyFrom(domain_id) # pylint: disable=no-member + dlt_link_id.link_id.CopyFrom(link_id) # pylint: disable=no-member + dlt_link_id.delete = delete + dlt_connector_client.RecordLink(dlt_link_id) + +def record_service_to_dlt( + dlt_connector_client : DltConnectorClient, domain_id : TopologyId, service_id : ServiceId, delete : bool = False +) -> None: + dlt_service_id = DltServiceId() + dlt_service_id.topology_id.CopyFrom(domain_id) # pylint: disable=no-member + dlt_service_id.service_id.CopyFrom(service_id) # pylint: disable=no-member + dlt_service_id.delete = delete + dlt_connector_client.RecordService(dlt_service_id) + +def record_slice_to_dlt( + dlt_connector_client : DltConnectorClient, domain_id : TopologyId, slice_id : SliceId, delete : bool = False +) -> None: + dlt_slice_id = DltSliceId() + dlt_slice_id.topology_id.CopyFrom(domain_id) # pylint: disable=no-member + dlt_slice_id.slice_id.CopyFrom(slice_id) # pylint: disable=no-member + dlt_slice_id.delete = delete + dlt_connector_client.RecordSlice(dlt_slice_id) + +def record_entities( + slices_to_record : Set[str] = set(), services_to_record : Set[str] = set(), devices_to_record : Set[str] = set(), + delete : bool = False +) -> None: + dlt_connector_client = DltConnectorClient() + dlt_domain_id = TopologyId(**json_topology_id('dlt-perf-eval')) + + for str_device_id in devices_to_record: + device_id = DeviceId(**(json.loads(str_device_id))) + record_device_to_dlt(dlt_connector_client, dlt_domain_id, device_id, delete=delete) + + for str_service_id in services_to_record: + service_id = ServiceId(**(json.loads(str_service_id))) + record_service_to_dlt(dlt_connector_client, dlt_domain_id, service_id, delete=delete) + + for str_slice_id in slices_to_record: + slice_id = SliceId(**(json.loads(str_slice_id))) + record_slice_to_dlt(dlt_connector_client, dlt_domain_id, slice_id, delete=delete) diff --git a/src/tests/tools/load_gen/Parameters.py b/src/tests/tools/load_gen/Parameters.py new file mode 100644 index 0000000000000000000000000000000000000000..c74d18248c6000cd6da18d5c7e0e55ef2be41730 --- /dev/null +++ b/src/tests/tools/load_gen/Parameters.py @@ -0,0 +1,68 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import List, Optional + +class Parameters: + def __init__( + self, num_requests : int, request_types : List[str], offered_load : Optional[float] = None, + inter_arrival_time : Optional[float] = None, holding_time : Optional[float] = None, + dry_mode : bool = False, record_to_dlt : bool = False, dlt_domain_id : Optional[str] = None + ) -> None: + self._num_requests = num_requests + self._request_types = request_types + self._offered_load = offered_load + self._inter_arrival_time = inter_arrival_time + self._holding_time = holding_time + self._dry_mode = dry_mode + self._record_to_dlt = record_to_dlt + self._dlt_domain_id = dlt_domain_id + + if self._offered_load is None and self._holding_time is not None and self._inter_arrival_time is not None: + self._offered_load = self._holding_time / self._inter_arrival_time + elif self._offered_load is not None and self._holding_time is not None and self._inter_arrival_time is None: + self._inter_arrival_time = self._holding_time / self._offered_load + elif self._offered_load is not None and self._holding_time is None and self._inter_arrival_time is not None: + self._holding_time = self._offered_load * self._inter_arrival_time + else: + MSG = 'Exactly two of offered_load({:s}), inter_arrival_time({:s}), holding_time({:s}) must be specified.' + raise Exception(MSG.format(str(self._offered_load), str(self._inter_arrival_time), str(self._holding_time))) + + if self._record_to_dlt and self._dlt_domain_id is None: + MSG = 'Parameter dlt_domain_id({:s}) must be specified with record_to_dlt({:s}).' + raise Exception(MSG.format(str(self._dlt_domain_id), str(self._record_to_dlt))) + + @property + def num_requests(self): return self._num_requests + + @property + def request_types(self): return self._request_types + + @property + def offered_load(self): return self._offered_load + + @property + def inter_arrival_time(self): return self._inter_arrival_time + + @property + def holding_time(self): return self._holding_time + + @property + def dry_mode(self): return self._dry_mode + + @property + def record_to_dlt(self): return self._record_to_dlt + + @property + def dlt_domain_id(self): return self._dlt_domain_id diff --git a/src/tests/tools/load_gen/RequestGenerator.py b/src/tests/tools/load_gen/RequestGenerator.py new file mode 100644 index 0000000000000000000000000000000000000000..d38291d380d044fa3b91a1b653ea47f6e917fe16 --- /dev/null +++ b/src/tests/tools/load_gen/RequestGenerator.py @@ -0,0 +1,409 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, json, random, threading +from typing import Dict, Optional, Set, Tuple +from common.proto.context_pb2 import Empty, TopologyId +from common.tools.object_factory.Constraint import json_constraint_custom +from common.tools.object_factory.ConfigRule import json_config_rule_set +from common.tools.object_factory.Device import json_device_id +from common.tools.object_factory.EndPoint import json_endpoint_id +from common.tools.object_factory.Service import ( + json_service_l2nm_planned, json_service_l3nm_planned, json_service_tapi_planned) +from common.tools.object_factory.Slice import json_slice +from common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from dlt.connector.client.DltConnectorClient import DltConnectorClient +from tests.tools.load_gen.DltTools import record_device_to_dlt, record_link_to_dlt +from .Constants import ENDPOINT_COMPATIBILITY, RequestType +from .Parameters import Parameters + +LOGGER = logging.getLogger(__name__) + +class RequestGenerator: + def __init__(self, parameters : Parameters) -> None: + self._parameters = parameters + self._lock = threading.Lock() + self._num_requests = 0 + self._available_device_endpoints : Dict[str, Set[str]] = dict() + self._used_device_endpoints : Dict[str, Dict[str, str]] = dict() + self._endpoint_ids_to_types : Dict[Tuple[str, str], str] = dict() + self._endpoint_types_to_ids : Dict[str, Set[Tuple[str, str]]] = dict() + + def initialize(self) -> None: + with self._lock: + self._available_device_endpoints.clear() + self._used_device_endpoints.clear() + + context_client = ContextClient() + dlt_connector_client = DltConnectorClient() + + if self._parameters.record_to_dlt: + dlt_domain_id = TopologyId(**json_topology_id('dlt-perf-eval')) + + devices = context_client.ListDevices(Empty()) + for device in devices.devices: + device_uuid = device.device_id.device_uuid.uuid + _endpoints = self._available_device_endpoints.setdefault(device_uuid, set()) + for endpoint in device.device_endpoints: + endpoint_uuid = endpoint.endpoint_id.endpoint_uuid.uuid + endpoint_type = endpoint.endpoint_type + _endpoints.add(endpoint_uuid) + self._endpoint_ids_to_types.setdefault((device_uuid, endpoint_uuid), endpoint_type) + self._endpoint_types_to_ids.setdefault(endpoint_type, set()).add((device_uuid, endpoint_uuid)) + + if self._parameters.record_to_dlt: + record_device_to_dlt(dlt_connector_client, dlt_domain_id, device.device_id) + + links = context_client.ListLinks(Empty()) + for link in links.links: + for endpoint_id in link.link_endpoint_ids: + device_uuid = endpoint_id.device_id.device_uuid.uuid + endpoint_uuid = endpoint_id.endpoint_uuid.uuid + _endpoints = self._available_device_endpoints.get(device_uuid, set()) + _endpoints.discard(endpoint_uuid) + if len(_endpoints) == 0: self._available_device_endpoints.pop(device_uuid, None) + + endpoint_type = self._endpoint_ids_to_types.pop((device_uuid, endpoint_uuid), None) + if endpoint_type is None: continue + + if endpoint_type not in self._endpoint_types_to_ids: continue + endpoints_for_type = self._endpoint_types_to_ids[endpoint_type] + endpoint_key = (device_uuid, endpoint_uuid) + if endpoint_key not in endpoints_for_type: continue + endpoints_for_type.discard(endpoint_key) + + if self._parameters.record_to_dlt: + record_link_to_dlt(dlt_connector_client, dlt_domain_id, link.link_id) + + @property + def num_requests_generated(self): return self._num_requests + + def dump_state(self) -> None: + with self._lock: + _endpoints = { + device_uuid:[endpoint_uuid for endpoint_uuid in endpoint_uuids] + for device_uuid,endpoint_uuids in self._available_device_endpoints.items() + } + LOGGER.info('[dump_state] available_device_endpoints = {:s}'.format(json.dumps(_endpoints))) + LOGGER.info('[dump_state] used_device_endpoints = {:s}'.format(json.dumps(self._used_device_endpoints))) + + def _use_device_endpoint( + self, service_uuid : str, request_type : RequestType, endpoint_types : Optional[Set[str]] = None, + exclude_device_uuids : Set[str] = set(), exclude_endpoint_uuids : Set[Tuple[str, str]] = set(), + ) -> Optional[Tuple[str, str]]: + with self._lock: + compatible_endpoints : Set[Tuple[str, str]] = set() + elegible_device_endpoints : Dict[str, Set[str]] = {} + + if endpoint_types is None: + # allow all + elegible_device_endpoints : Dict[str, Set[str]] = { + device_uuid:[ + endpoint_uuid for endpoint_uuid in device_endpoint_uuids + if (len(exclude_endpoint_uuids) == 0) or \ + ((device_uuid,endpoint_uuid) not in exclude_endpoint_uuids) + ] + for device_uuid,device_endpoint_uuids in self._available_device_endpoints.items() + if (device_uuid not in exclude_device_uuids) and \ + (len(device_endpoint_uuids) > 0) + } + else: + # allow only compatible endpoints + for endpoint_type in endpoint_types: + if endpoint_type not in self._endpoint_types_to_ids: continue + compatible_endpoints.update(self._endpoint_types_to_ids[endpoint_type]) + + for device_uuid,device_endpoint_uuids in self._available_device_endpoints.items(): + if device_uuid in exclude_device_uuids or len(device_endpoint_uuids) == 0: continue + for endpoint_uuid in device_endpoint_uuids: + endpoint_key = (device_uuid,endpoint_uuid) + if endpoint_key in exclude_endpoint_uuids: continue + if endpoint_key not in compatible_endpoints: continue + elegible_device_endpoints.setdefault(device_uuid, set()).add(endpoint_uuid) + + if len(elegible_device_endpoints) == 0: + LOGGER.warning(' '.join([ + '>> No endpoint is available:', + 'endpoint_types={:s}'.format(str(endpoint_types)), + 'exclude_device_uuids={:s}'.format(str(exclude_device_uuids)), + 'self._endpoint_types_to_ids={:s}'.format(str(self._endpoint_types_to_ids)), + 'self._available_device_endpoints={:s}'.format(str(self._available_device_endpoints)), + 'compatible_endpoints={:s}'.format(str(compatible_endpoints)), + ])) + return None + + device_uuid = random.choice(list(elegible_device_endpoints.keys())) + device_endpoint_uuids = elegible_device_endpoints.get(device_uuid) + endpoint_uuid = random.choice(list(device_endpoint_uuids)) + if request_type not in {RequestType.SERVICE_MW}: + # reserve the resources + self._available_device_endpoints.setdefault(device_uuid, set()).discard(endpoint_uuid) + self._used_device_endpoints.setdefault(device_uuid, dict())[endpoint_uuid] = service_uuid + return device_uuid, endpoint_uuid + + def _release_device_endpoint(self, device_uuid : str, endpoint_uuid : str) -> None: + with self._lock: + self._used_device_endpoints.setdefault(device_uuid, dict()).pop(endpoint_uuid, None) + self._available_device_endpoints.setdefault(device_uuid, set()).add(endpoint_uuid) + + def compose_request(self) -> Optional[Dict]: + with self._lock: + self._num_requests += 1 + num_request = self._num_requests + + #request_uuid = str(uuid.uuid4()) + request_uuid = 'svc_{:d}'.format(num_request) + + # choose request type + request_type = random.choice(self._parameters.request_types) + + if request_type in { + RequestType.SERVICE_L2NM, RequestType.SERVICE_L3NM, RequestType.SERVICE_TAPI, RequestType.SERVICE_MW + }: + return self._compose_service(num_request, request_uuid, request_type) + elif request_type in {RequestType.SLICE_L2NM, RequestType.SLICE_L3NM}: + return self._compose_slice(num_request, request_uuid, request_type) + + def _compose_service(self, num_request : int, request_uuid : str, request_type : str) -> Optional[Dict]: + # choose source endpoint + src_endpoint_types = set(ENDPOINT_COMPATIBILITY.keys()) if request_type in {RequestType.SERVICE_TAPI} else None + src = self._use_device_endpoint(request_uuid, request_type, endpoint_types=src_endpoint_types) + if src is None: + LOGGER.warning('>> No source endpoint is available') + return None + src_device_uuid,src_endpoint_uuid = src + + # identify compatible destination endpoint types + src_endpoint_type = self._endpoint_ids_to_types.get((src_device_uuid,src_endpoint_uuid)) + dst_endpoint_type = ENDPOINT_COMPATIBILITY.get(src_endpoint_type) + dst_endpoint_types = {dst_endpoint_type} if request_type in {RequestType.SERVICE_TAPI} else None + + # identify excluded destination devices + exclude_device_uuids = {} if request_type in {RequestType.SERVICE_TAPI, RequestType.SERVICE_MW} else {src_device_uuid} + + # choose feasible destination endpoint + dst = self._use_device_endpoint( + request_uuid, request_type, endpoint_types=dst_endpoint_types, exclude_device_uuids=exclude_device_uuids, + exclude_endpoint_uuids={src}) + + # if destination endpoint not found, release source, and terminate current service generation + if dst is None: + LOGGER.warning('>> No destination endpoint is available') + self._release_device_endpoint(src_device_uuid, src_endpoint_uuid) + return None + + # compose endpoints + dst_device_uuid,dst_endpoint_uuid = dst + endpoint_ids = [ + json_endpoint_id(json_device_id(src_device_uuid), src_endpoint_uuid), + json_endpoint_id(json_device_id(dst_device_uuid), dst_endpoint_uuid), + ] + + if request_type == RequestType.SERVICE_L2NM: + constraints = [ + json_constraint_custom('bandwidth[gbps]', '10.0'), + json_constraint_custom('latency[ms]', '20.0'), + ] + vlan_id = num_request % 1000 + circuit_id = '{:03d}'.format(vlan_id) + src_router_id = '10.0.0.{:d}'.format(int(src_device_uuid.replace('R', ''))) + dst_router_id = '10.0.0.{:d}'.format(int(src_device_uuid.replace('R', ''))) + config_rules = [ + json_config_rule_set('/settings', { + 'mtu': 1512 + }), + json_config_rule_set('/device[{:s}]/endpoint[{:s}]/settings'.format(src_device_uuid, src_endpoint_uuid), { + 'router_id': src_router_id, + 'sub_interface_index': vlan_id, + 'vlan_id': vlan_id, + 'remote_router': dst_router_id, + 'circuit_id': circuit_id, + }), + json_config_rule_set('/device[{:s}]/endpoint[{:s}]/settings'.format(dst_device_uuid, dst_endpoint_uuid), { + 'router_id': dst_router_id, + 'sub_interface_index': vlan_id, + 'vlan_id': vlan_id, + 'remote_router': src_router_id, + 'circuit_id': circuit_id, + }), + ] + return json_service_l2nm_planned( + request_uuid, endpoint_ids=endpoint_ids, constraints=constraints, config_rules=config_rules) + + elif request_type == RequestType.SERVICE_L3NM: + constraints = [ + json_constraint_custom('bandwidth[gbps]', '10.0'), + json_constraint_custom('latency[ms]', '20.0'), + ] + vlan_id = num_request % 1000 + bgp_as = 60000 + (num_request % 10000) + bgp_route_target = '{:5d}:{:03d}'.format(bgp_as, 333) + route_distinguisher = '{:5d}:{:03d}'.format(bgp_as, vlan_id) + src_router_id = '10.0.0.{:d}'.format(int(src_device_uuid.replace('R', ''))) + dst_router_id = '10.0.0.{:d}'.format(int(src_device_uuid.replace('R', ''))) + src_address_ip = '.'.join([src_device_uuid.replace('R', ''), '0'] + src_endpoint_uuid.split('/')) + dst_address_ip = '.'.join([dst_device_uuid.replace('R', ''), '0'] + dst_endpoint_uuid.split('/')) + config_rules = [ + json_config_rule_set('/settings', { + 'mtu' : 1512, + 'bgp_as' : bgp_as, + 'bgp_route_target': bgp_route_target, + }), + json_config_rule_set('/device[{:s}]/endpoint[{:s}]/settings'.format(src_device_uuid, src_endpoint_uuid), { + 'router_id' : src_router_id, + 'route_distinguisher': route_distinguisher, + 'sub_interface_index': vlan_id, + 'vlan_id' : vlan_id, + 'address_ip' : src_address_ip, + 'address_prefix' : 16, + }), + json_config_rule_set('/device[{:s}]/endpoint[{:s}]/settings'.format(dst_device_uuid, dst_endpoint_uuid), { + 'router_id' : dst_router_id, + 'route_distinguisher': route_distinguisher, + 'sub_interface_index': vlan_id, + 'vlan_id' : vlan_id, + 'address_ip' : dst_address_ip, + 'address_prefix' : 16, + }), + ] + return json_service_l3nm_planned( + request_uuid, endpoint_ids=endpoint_ids, constraints=constraints, config_rules=config_rules) + + elif request_type == RequestType.SERVICE_TAPI: + config_rules = [ + json_config_rule_set('/settings', { + 'capacity_value' : 50.0, + 'capacity_unit' : 'GHz', + 'layer_proto_name': 'PHOTONIC_MEDIA', + 'layer_proto_qual': 'tapi-photonic-media:PHOTONIC_LAYER_QUALIFIER_NMC', + 'direction' : 'UNIDIRECTIONAL', + }), + ] + return json_service_tapi_planned( + request_uuid, endpoint_ids=endpoint_ids, constraints=[], config_rules=config_rules) + + elif request_type == RequestType.SERVICE_MW: + vlan_id = 1000 + num_request % 1000 + config_rules = [ + json_config_rule_set('/settings', { + 'vlan_id': vlan_id, + }), + ] + return json_service_l2nm_planned( + request_uuid, endpoint_ids=endpoint_ids, constraints=[], config_rules=config_rules) + + def _compose_slice(self, num_request : int, request_uuid : str, request_type : str) -> Optional[Dict]: + # choose source endpoint + src = self._use_device_endpoint(request_uuid, request_type) + if src is None: + LOGGER.warning('>> No source endpoint is available') + return None + src_device_uuid,src_endpoint_uuid = src + + # identify excluded destination devices + exclude_device_uuids = {} if request_type in {RequestType.SERVICE_TAPI, RequestType.SERVICE_MW} else {src_device_uuid} + + # choose feasible destination endpoint + dst = self._use_device_endpoint(request_uuid, request_type, exclude_device_uuids=exclude_device_uuids) + + # if destination endpoint not found, release source, and terminate current service generation + if dst is None: + LOGGER.warning('>> No destination endpoint is available') + self._release_device_endpoint(src_device_uuid, src_endpoint_uuid) + return None + + # compose endpoints + dst_device_uuid,dst_endpoint_uuid = dst + endpoint_ids = [ + json_endpoint_id(json_device_id(src_device_uuid), src_endpoint_uuid), + json_endpoint_id(json_device_id(dst_device_uuid), dst_endpoint_uuid), + ] + constraints = [ + json_constraint_custom('bandwidth[gbps]', '10.0'), + json_constraint_custom('latency[ms]', '20.0'), + ] + + if request_type == RequestType.SLICE_L2NM: + vlan_id = num_request % 1000 + circuit_id = '{:03d}'.format(vlan_id) + src_router_id = '10.0.0.{:d}'.format(int(src_device_uuid.replace('R', ''))) + dst_router_id = '10.0.0.{:d}'.format(int(src_device_uuid.replace('R', ''))) + config_rules = [ + json_config_rule_set('/settings', { + 'mtu': 1512 + }), + json_config_rule_set('/device[{:s}]/endpoint[{:s}]/settings'.format(src_device_uuid, src_endpoint_uuid), { + 'router_id': src_router_id, + 'sub_interface_index': vlan_id, + 'vlan_id': vlan_id, + 'remote_router': dst_router_id, + 'circuit_id': circuit_id, + }), + json_config_rule_set('/device[{:s}]/endpoint[{:s}]/settings'.format(dst_device_uuid, dst_endpoint_uuid), { + 'router_id': dst_router_id, + 'sub_interface_index': vlan_id, + 'vlan_id': vlan_id, + 'remote_router': src_router_id, + 'circuit_id': circuit_id, + }), + ] + + elif request_type == RequestType.SLICE_L3NM: + vlan_id = num_request % 1000 + bgp_as = 60000 + (num_request % 10000) + bgp_route_target = '{:5d}:{:03d}'.format(bgp_as, 333) + route_distinguisher = '{:5d}:{:03d}'.format(bgp_as, vlan_id) + src_router_id = '10.0.0.{:d}'.format(int(src_device_uuid.replace('R', ''))) + dst_router_id = '10.0.0.{:d}'.format(int(src_device_uuid.replace('R', ''))) + src_address_ip = '.'.join([src_device_uuid.replace('R', ''), '0'] + src_endpoint_uuid.split('/')) + dst_address_ip = '.'.join([dst_device_uuid.replace('R', ''), '0'] + dst_endpoint_uuid.split('/')) + config_rules = [ + json_config_rule_set('/settings', { + 'mtu' : 1512, + 'bgp_as' : bgp_as, + 'bgp_route_target': bgp_route_target, + }), + json_config_rule_set('/device[{:s}]/endpoint[{:s}]/settings'.format(src_device_uuid, src_endpoint_uuid), { + 'router_id' : src_router_id, + 'route_distinguisher': route_distinguisher, + 'sub_interface_index': vlan_id, + 'vlan_id' : vlan_id, + 'address_ip' : src_address_ip, + 'address_prefix' : 16, + }), + json_config_rule_set('/device[{:s}]/endpoint[{:s}]/settings'.format(dst_device_uuid, dst_endpoint_uuid), { + 'router_id' : dst_router_id, + 'route_distinguisher': route_distinguisher, + 'sub_interface_index': vlan_id, + 'vlan_id' : vlan_id, + 'address_ip' : dst_address_ip, + 'address_prefix' : 16, + }), + ] + + return json_slice( + request_uuid, endpoint_ids=endpoint_ids, constraints=constraints, config_rules=config_rules) + + def release_request(self, json_request : Dict) -> None: + if 'service_id' in json_request: + for endpoint_id in json_request['service_endpoint_ids']: + device_uuid = endpoint_id['device_id']['device_uuid']['uuid'] + endpoint_uuid = endpoint_id['endpoint_uuid']['uuid'] + self._release_device_endpoint(device_uuid, endpoint_uuid) + elif 'slice_id' in json_request: + for endpoint_id in json_request['slice_endpoint_ids']: + device_uuid = endpoint_id['device_id']['device_uuid']['uuid'] + endpoint_uuid = endpoint_id['endpoint_uuid']['uuid'] + self._release_device_endpoint(device_uuid, endpoint_uuid) diff --git a/src/tests/tools/load_gen/RequestScheduler.py b/src/tests/tools/load_gen/RequestScheduler.py new file mode 100644 index 0000000000000000000000000000000000000000..eafb95c30032e69ab4f2f7874656b11db4f6817f --- /dev/null +++ b/src/tests/tools/load_gen/RequestScheduler.py @@ -0,0 +1,192 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import copy, logging, pytz, random +from apscheduler.executors.pool import ThreadPoolExecutor +from apscheduler.jobstores.memory import MemoryJobStore +from apscheduler.schedulers.blocking import BlockingScheduler +from datetime import datetime, timedelta +from typing import Dict, Optional +from common.proto.context_pb2 import Service, ServiceId, Slice, SliceId +from service.client.ServiceClient import ServiceClient +from slice.client.SliceClient import SliceClient +from .DltTools import explore_entities_to_record, record_entities +from .Parameters import Parameters +from .RequestGenerator import RequestGenerator + +logging.getLogger('apscheduler.executors.default').setLevel(logging.WARNING) +logging.getLogger('apscheduler.scheduler').setLevel(logging.WARNING) + +LOGGER = logging.getLogger(__name__) + +class RequestScheduler: + def __init__(self, parameters : Parameters, generator : RequestGenerator) -> None: + self._scheduler = BlockingScheduler() + self._scheduler.configure( + jobstores = {'default': MemoryJobStore()}, + executors = {'default': ThreadPoolExecutor(max_workers=10)}, + job_defaults = { + 'coalesce': False, + 'max_instances': 100, + 'misfire_grace_time': 120, + }, + timezone=pytz.utc) + self._parameters = parameters + self._generator = generator + + def _schedule_request_setup(self) -> None: + if self._generator.num_requests_generated >= self._parameters.num_requests: + LOGGER.info('Generation Done!') + #self._scheduler.shutdown() + return + iat = random.expovariate(1.0 / self._parameters.inter_arrival_time) + run_date = datetime.utcnow() + timedelta(seconds=iat) + self._scheduler.add_job( + self._request_setup, trigger='date', run_date=run_date, timezone=pytz.utc) + + def _schedule_request_teardown(self, request : Dict) -> None: + ht = random.expovariate(1.0 / self._parameters.holding_time) + run_date = datetime.utcnow() + timedelta(seconds=ht) + self._scheduler.add_job( + self._request_teardown, args=(request,), trigger='date', run_date=run_date, timezone=pytz.utc) + + def start(self): + self._schedule_request_setup() + self._scheduler.start() + + def _request_setup(self) -> None: + self._schedule_request_setup() + + request = self._generator.compose_request() + if request is None: + LOGGER.warning('No resources available to compose new request') + return + + if 'service_id' in request: + service_uuid = request['service_id']['service_uuid']['uuid'] + src_device_uuid = request['service_endpoint_ids'][0]['device_id']['device_uuid']['uuid'] + src_endpoint_uuid = request['service_endpoint_ids'][0]['endpoint_uuid']['uuid'] + dst_device_uuid = request['service_endpoint_ids'][1]['device_id']['device_uuid']['uuid'] + dst_endpoint_uuid = request['service_endpoint_ids'][1]['endpoint_uuid']['uuid'] + LOGGER.info('Setup Service: uuid=%s src=%s:%s dst=%s:%s', + service_uuid, src_device_uuid, src_endpoint_uuid, dst_device_uuid, dst_endpoint_uuid) + self._create_update(service=request) + + elif 'slice_id' in request: + slice_uuid = request['slice_id']['slice_uuid']['uuid'] + src_device_uuid = request['slice_endpoint_ids'][0]['device_id']['device_uuid']['uuid'] + src_endpoint_uuid = request['slice_endpoint_ids'][0]['endpoint_uuid']['uuid'] + dst_device_uuid = request['slice_endpoint_ids'][1]['device_id']['device_uuid']['uuid'] + dst_endpoint_uuid = request['slice_endpoint_ids'][1]['endpoint_uuid']['uuid'] + LOGGER.info('Setup Slice: uuid=%s src=%s:%s dst=%s:%s', + slice_uuid, src_device_uuid, src_endpoint_uuid, dst_device_uuid, dst_endpoint_uuid) + self._create_update(slice_=request) + + self._schedule_request_teardown(request) + + def _request_teardown(self, request : Dict) -> None: + if 'service_id' in request: + service_uuid = request['service_id']['service_uuid']['uuid'] + src_device_uuid = request['service_endpoint_ids'][0]['device_id']['device_uuid']['uuid'] + src_endpoint_uuid = request['service_endpoint_ids'][0]['endpoint_uuid']['uuid'] + dst_device_uuid = request['service_endpoint_ids'][1]['device_id']['device_uuid']['uuid'] + dst_endpoint_uuid = request['service_endpoint_ids'][1]['endpoint_uuid']['uuid'] + LOGGER.info('Teardown Service: uuid=%s src=%s:%s dst=%s:%s', + service_uuid, src_device_uuid, src_endpoint_uuid, dst_device_uuid, dst_endpoint_uuid) + self._delete(service_id=ServiceId(**(request['service_id']))) + + elif 'slice_id' in request: + slice_uuid = request['slice_id']['slice_uuid']['uuid'] + src_device_uuid = request['slice_endpoint_ids'][0]['device_id']['device_uuid']['uuid'] + src_endpoint_uuid = request['slice_endpoint_ids'][0]['endpoint_uuid']['uuid'] + dst_device_uuid = request['slice_endpoint_ids'][1]['device_id']['device_uuid']['uuid'] + dst_endpoint_uuid = request['slice_endpoint_ids'][1]['endpoint_uuid']['uuid'] + LOGGER.info('Teardown Slice: uuid=%s src=%s:%s dst=%s:%s', + slice_uuid, src_device_uuid, src_endpoint_uuid, dst_device_uuid, dst_endpoint_uuid) + self._delete(slice_id=SliceId(**(request['slice_id']))) + + self._generator.release_request(request) + + def _create_update(self, service : Optional[Dict] = None, slice_ : Optional[Dict] = None) -> None: + if self._parameters.dry_mode: return + + service_id = None + if service is not None: + service_add = copy.deepcopy(service) + service_add['service_endpoint_ids'] = [] + service_add['service_constraints'] = [] + service_add['service_config'] = {'config_rules': []} + + service_client = ServiceClient() + service_id = service_client.CreateService(Service(**service_add)) + service_client.close() + + slice_id = None + if slice_ is not None: + slice_add = copy.deepcopy(slice_) + slice_add['slice_endpoint_ids'] = [] + slice_add['slice_constraints'] = [] + slice_add['slice_config'] = {'config_rules': []} + + slice_client = SliceClient() + slice_id = slice_client.CreateSlice(Slice(**slice_add)) + slice_client.close() + + if self._parameters.record_to_dlt: + entities_to_record = explore_entities_to_record(slice_id=slice_id, service_id=service_id) + slices_to_record, services_to_record, devices_to_record = entities_to_record + record_entities( + slices_to_record=slices_to_record, services_to_record=services_to_record, + devices_to_record=devices_to_record, delete=False) + + service_id = None + if service is not None: + service_client = ServiceClient() + service_id = service_client.UpdateService(Service(**service)) + service_client.close() + + slice_id = None + if slice_ is not None: + slice_client = SliceClient() + slice_id = slice_client.UpdateSlice(Slice(**slice_)) + slice_client.close() + + if self._parameters.record_to_dlt: + entities_to_record = explore_entities_to_record(slice_id=slice_id, service_id=service_id) + slices_to_record, services_to_record, devices_to_record = entities_to_record + record_entities( + slices_to_record=slices_to_record, services_to_record=services_to_record, + devices_to_record=devices_to_record, delete=False) + + def _delete(self, service_id : Optional[ServiceId] = None, slice_id : Optional[SliceId] = None) -> None: + if self._parameters.dry_mode: return + + if self._parameters.record_to_dlt: + entities_to_record = explore_entities_to_record(slice_id=slice_id, service_id=service_id) + slices_to_record, services_to_record, devices_to_record = entities_to_record + + if slice_id is not None: + slice_client = SliceClient() + slice_client.DeleteSlice(slice_id) + slice_client.close() + + if service_id is not None: + service_client = ServiceClient() + service_client.DeleteService(service_id) + service_client.close() + + if self._parameters.record_to_dlt: + record_entities( + slices_to_record=slices_to_record, services_to_record=services_to_record, + devices_to_record=devices_to_record, delete=True) diff --git a/src/tests/tools/load_gen/__init__.py b/src/tests/tools/load_gen/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..70a33251242c51f49140e596b8208a19dd5245f7 --- /dev/null +++ b/src/tests/tools/load_gen/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/tests/tools/load_gen/__main__.py b/src/tests/tools/load_gen/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..9a5ea2b6949d1b6dd50d0a40407c6740bf266dd3 --- /dev/null +++ b/src/tests/tools/load_gen/__main__.py @@ -0,0 +1,55 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, sys +from .Constants import RequestType +from .Parameters import Parameters +from .RequestGenerator import RequestGenerator +from .RequestScheduler import RequestScheduler + +logging.basicConfig(level=logging.INFO) +LOGGER = logging.getLogger(__name__) + +def main(): + LOGGER.info('Starting...') + parameters = Parameters( + num_requests = 100, + request_types = [ + RequestType.SERVICE_L2NM, + RequestType.SERVICE_L3NM, + #RequestType.SERVICE_MW, + #RequestType.SERVICE_TAPI, + RequestType.SLICE_L2NM, + RequestType.SLICE_L3NM, + ], + offered_load = 50, + holding_time = 10, + dry_mode = False, # in dry mode, no request is sent to TeraFlowSDN + record_to_dlt = False, # if record_to_dlt, changes in device/link/service/slice are uploaded to DLT + dlt_domain_id = 'dlt-perf-eval', # domain used to uploaded entities, ignored when record_to_dlt = False + ) + + LOGGER.info('Initializing Generator...') + generator = RequestGenerator(parameters) + generator.initialize() + + LOGGER.info('Running Schedule...') + scheduler = RequestScheduler(parameters, generator) + scheduler.start() + + LOGGER.info('Done!') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/tests/tools/load_gen/deploy_specs.sh b/src/tests/tools/load_gen/deploy_specs.sh new file mode 100644 index 0000000000000000000000000000000000000000..a688f1c0ad920bab2fb5157dce72225671ed837e --- /dev/null +++ b/src/tests/tools/load_gen/deploy_specs.sh @@ -0,0 +1,26 @@ +# Set the URL of your local Docker registry where the images will be uploaded to. +export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" + +# Set the list of components, separated by spaces, you want to build images for, and deploy. +# Supported components are: +# context device automation policy service compute monitoring webui +# interdomain slice pathcomp dlt +# dbscanserving opticalattackmitigator opticalattackdetector +# l3_attackmitigator l3_centralizedattackdetector l3_distributedattackdetector +export TFS_COMPONENTS="context device pathcomp service slice webui" # automation monitoring compute dlt + +# Set the tag you want to use for your images. +export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE="tfs" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml manifests/servicemonitors.yaml" + +# Set the new Grafana admin password +export TFS_GRAFANA_PASSWORD="admin123+" + +# If not already set, disable skip-build flag. +# If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used. +export TFS_SKIP_BUILD="NO" #${TFS_SKIP_BUILD:-"YES"} diff --git a/src/tests/tools/load_gen/descriptors.json b/src/tests/tools/load_gen/descriptors.json new file mode 100644 index 0000000000000000000000000000000000000000..5fb0c086749cab3343277c28a902b3db48651320 --- /dev/null +++ b/src/tests/tools/load_gen/descriptors.json @@ -0,0 +1,229 @@ +{ + "contexts": [ + { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_ids": [], "service_ids": [] + } + ], + "topologies": [ + { + "topology_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_uuid": {"uuid": "admin"} + }, + "device_ids": [ + {"device_uuid": {"uuid": "R1"}}, + {"device_uuid": {"uuid": "R2"}}, + {"device_uuid": {"uuid": "R3"}}, + {"device_uuid": {"uuid": "R4"}}, + {"device_uuid": {"uuid": "R5"}}, + {"device_uuid": {"uuid": "R6"}}, + {"device_uuid": {"uuid": "R7"}} + ], + "link_ids": [ + {"link_uuid": {"uuid": "R1==R2"}}, + {"link_uuid": {"uuid": "R2==R3"}}, + {"link_uuid": {"uuid": "R3==R4"}}, + {"link_uuid": {"uuid": "R4==R5"}}, + {"link_uuid": {"uuid": "R5==R6"}}, + {"link_uuid": {"uuid": "R6==R1"}}, + {"link_uuid": {"uuid": "R1==R7"}}, + {"link_uuid": {"uuid": "R3==R7"}}, + {"link_uuid": {"uuid": "R5==R7"}} + ] + } + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "1/5"}, + {"sample_types": [], "type": "copper", "uuid": "1/6"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "1/5"}, + {"sample_types": [], "type": "copper", "uuid": "1/6"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "1/5"}, + {"sample_types": [], "type": "copper", "uuid": "1/6"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "1/5"}, + {"sample_types": [], "type": "copper", "uuid": "1/6"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "1/5"}, + {"sample_types": [], "type": "copper", "uuid": "1/6"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "1/5"}, + {"sample_types": [], "type": "copper", "uuid": "1/6"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"}, + {"sample_types": [], "type": "copper", "uuid": "2/4"}, + {"sample_types": [], "type": "copper", "uuid": "2/5"}, + {"sample_types": [], "type": "copper", "uuid": "2/6"} + ]}}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "R1==R2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R2==R3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R3==R4"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R4==R5"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R5==R6"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R6==R1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R1==R7"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R3==R7"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R5==R7"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} + ] + } + ] +} \ No newline at end of file diff --git a/src/tests/tools/load_gen/run.sh b/src/tests/tools/load_gen/run.sh new file mode 100755 index 0000000000000000000000000000000000000000..b16808ab6905927728212185681e2a6d4a5135ba --- /dev/null +++ b/src/tests/tools/load_gen/run.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python -m tests.tools.load_gen diff --git a/src/tests/tools/load_gen/test_dlt_functional.py b/src/tests/tools/load_gen/test_dlt_functional.py new file mode 100644 index 0000000000000000000000000000000000000000..9c6c3d5ba65d538628d75b2c0a0010963357f8b7 --- /dev/null +++ b/src/tests/tools/load_gen/test_dlt_functional.py @@ -0,0 +1,73 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sys +from common.proto.context_pb2 import ( + DEVICEOPERATIONALSTATUS_ENABLED, Device, DeviceId, LinkId, ServiceId, SliceId, TopologyId) +from common.proto.dlt_connector_pb2 import DltDeviceId, DltLinkId, DltServiceId, DltSliceId +from common.tools.object_factory.Device import json_device +from common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from dlt.connector.client.DltConnectorClient import DltConnectorClient + +def record_device_to_dlt( + dlt_connector_client : DltConnectorClient, domain_id : TopologyId, device_id : DeviceId, delete : bool = False +) -> None: + dlt_device_id = DltDeviceId() + dlt_device_id.topology_id.CopyFrom(domain_id) # pylint: disable=no-member + dlt_device_id.device_id.CopyFrom(device_id) # pylint: disable=no-member + dlt_device_id.delete = delete + dlt_connector_client.RecordDevice(dlt_device_id) + +def record_link_to_dlt( + dlt_connector_client : DltConnectorClient, domain_id : TopologyId, link_id : LinkId, delete : bool = False +) -> None: + dlt_link_id = DltLinkId() + dlt_link_id.topology_id.CopyFrom(domain_id) # pylint: disable=no-member + dlt_link_id.link_id.CopyFrom(link_id) # pylint: disable=no-member + dlt_link_id.delete = delete + dlt_connector_client.RecordLink(dlt_link_id) + +def record_service_to_dlt( + dlt_connector_client : DltConnectorClient, domain_id : TopologyId, service_id : ServiceId, delete : bool = False +) -> None: + dlt_service_id = DltServiceId() + dlt_service_id.topology_id.CopyFrom(domain_id) # pylint: disable=no-member + dlt_service_id.service_id.CopyFrom(service_id) # pylint: disable=no-member + dlt_service_id.delete = delete + dlt_connector_client.RecordService(dlt_service_id) + +def record_slice_to_dlt( + dlt_connector_client : DltConnectorClient, domain_id : TopologyId, slice_id : SliceId, delete : bool = False +) -> None: + dlt_slice_id = DltSliceId() + dlt_slice_id.topology_id.CopyFrom(domain_id) # pylint: disable=no-member + dlt_slice_id.slice_id.CopyFrom(slice_id) # pylint: disable=no-member + dlt_slice_id.delete = delete + dlt_connector_client.RecordSlice(dlt_slice_id) + +def main(): + context_client = ContextClient() + dlt_connector_client = DltConnectorClient() + + device = Device(**json_device('test-device', 'packet-router', DEVICEOPERATIONALSTATUS_ENABLED)) + device_id = context_client.SetDevice(device) + + dlt_domain_id = TopologyId(**json_topology_id('dlt-func-test')) + record_device_to_dlt(dlt_connector_client, dlt_domain_id, device_id, delete=False) + + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/tests/tools/load_scenario/README.md b/src/tests/tools/load_scenario/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3845cbf01dda4385c431a3b52d381360e6dc5e9f --- /dev/null +++ b/src/tests/tools/load_scenario/README.md @@ -0,0 +1,17 @@ +# Tool: Load Scenario: + +Simple tool to populate ETSI TeraFlowSDN controller with same descriptors that can be loaded through the WebUI. + +## Example: + +Deploy TeraFlowSDN controller with your specific settings: +```(bash) +cd ~/tfs-ctrl +source my_deploy.sh +./deploy.sh +``` + +Populate TeraFlowSDN controller with your descriptor file: +```(bash) +./src/tests/tools/load_scenario/run.sh src/tests/tools/load_scenario/example_descriptors.json +``` diff --git a/src/tests/tools/load_scenario/__init__.py b/src/tests/tools/load_scenario/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..70a33251242c51f49140e596b8208a19dd5245f7 --- /dev/null +++ b/src/tests/tools/load_scenario/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/tests/tools/load_scenario/__main__.py b/src/tests/tools/load_scenario/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2cd11919ab8afd116e6cab8d7d9a6d4fd3ce54b --- /dev/null +++ b/src/tests/tools/load_scenario/__main__.py @@ -0,0 +1,37 @@ +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, sys +from common.tests.LoadScenario import load_scenario_from_descriptor +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from slice.client.SliceClient import SliceClient + +logging.basicConfig(level=logging.INFO) +LOGGER = logging.getLogger(__name__) + +def main(): + context_client = ContextClient() + device_client = DeviceClient() + service_client = ServiceClient() + slice_client = SliceClient() + + LOGGER.info('Loading scenario...') + load_scenario_from_descriptor(sys.argv[1], context_client, device_client, service_client, slice_client) + LOGGER.info('Done!') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/tests/tools/load_scenario/example_descriptors.json b/src/tests/tools/load_scenario/example_descriptors.json new file mode 100644 index 0000000000000000000000000000000000000000..5fb0c086749cab3343277c28a902b3db48651320 --- /dev/null +++ b/src/tests/tools/load_scenario/example_descriptors.json @@ -0,0 +1,229 @@ +{ + "contexts": [ + { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_ids": [], "service_ids": [] + } + ], + "topologies": [ + { + "topology_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_uuid": {"uuid": "admin"} + }, + "device_ids": [ + {"device_uuid": {"uuid": "R1"}}, + {"device_uuid": {"uuid": "R2"}}, + {"device_uuid": {"uuid": "R3"}}, + {"device_uuid": {"uuid": "R4"}}, + {"device_uuid": {"uuid": "R5"}}, + {"device_uuid": {"uuid": "R6"}}, + {"device_uuid": {"uuid": "R7"}} + ], + "link_ids": [ + {"link_uuid": {"uuid": "R1==R2"}}, + {"link_uuid": {"uuid": "R2==R3"}}, + {"link_uuid": {"uuid": "R3==R4"}}, + {"link_uuid": {"uuid": "R4==R5"}}, + {"link_uuid": {"uuid": "R5==R6"}}, + {"link_uuid": {"uuid": "R6==R1"}}, + {"link_uuid": {"uuid": "R1==R7"}}, + {"link_uuid": {"uuid": "R3==R7"}}, + {"link_uuid": {"uuid": "R5==R7"}} + ] + } + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "1/5"}, + {"sample_types": [], "type": "copper", "uuid": "1/6"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "1/5"}, + {"sample_types": [], "type": "copper", "uuid": "1/6"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "1/5"}, + {"sample_types": [], "type": "copper", "uuid": "1/6"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "1/5"}, + {"sample_types": [], "type": "copper", "uuid": "1/6"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "1/5"}, + {"sample_types": [], "type": "copper", "uuid": "1/6"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "1/5"}, + {"sample_types": [], "type": "copper", "uuid": "1/6"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"}, + {"sample_types": [], "type": "copper", "uuid": "2/4"}, + {"sample_types": [], "type": "copper", "uuid": "2/5"}, + {"sample_types": [], "type": "copper", "uuid": "2/6"} + ]}}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "R1==R2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R2==R3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R3==R4"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R4==R5"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R5==R6"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R6==R1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R1==R7"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R3==R7"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R5==R7"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} + ] + } + ] +} \ No newline at end of file diff --git a/src/tests/tools/load_scenario/run.sh b/src/tests/tools/load_scenario/run.sh new file mode 100755 index 0000000000000000000000000000000000000000..0ec0c3725d27c1246b776fef8f89a57beb561555 --- /dev/null +++ b/src/tests/tools/load_scenario/run.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source tfs_runtime_env_vars.sh +python -m tests.tools.load_scenario $1