diff options
author | 2021-10-29 14:47:40 -0400 | |
---|---|---|
committer | 2021-11-01 10:17:41 -0400 | |
commit | 5b935a9086ec1080f896b9a71c52283122aa0163 (patch) | |
tree | f28aee1327e5b6c8ad423dec5950d46f66ac201b /ms/gra/gra-docker/src | |
parent | 53b2788231f5ab3aeda4f09e1445a02c3a3b6be9 (diff) |
Sync local changes to support GRA microservice
Sync changes made downstream to support GRA microservice
Change-Id: If3bf5d879f7d61ab91209c63b0344d78128246a8
Issue-ID: CCSDK-3504
Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ms/gra/gra-docker/src')
30 files changed, 2077 insertions, 70 deletions
diff --git a/ms/gra/gra-docker/src/main/dc/docker-compose.yaml b/ms/gra/gra-docker/src/main/dc/docker-compose.yaml index 4b0bd46..682655e 100644 --- a/ms/gra/gra-docker/src/main/dc/docker-compose.yaml +++ b/ms/gra/gra-docker/src/main/dc/docker-compose.yaml @@ -12,15 +12,15 @@ services: - MYSQL_USER=${MYSQL_USER} - MYSQL_PASSWORD=${MYSQL_PASSWORD} - MYSQL_DATABASE=${MYSQL_DATABASE} - logging: + logging: driver: "json-file" - options: + options: max-size: "30m" max-file: "5" - - + + gra: - image: onap/sdnc-gra-image:latest + image: onap/sdnc-gra:latest depends_on: - db container_name: gra_controller @@ -28,10 +28,10 @@ services: - "8181:8080" - "8443:8443" volumes: - - ../resources/application.properties:/opt/onap/sdnc/config/application.properties - - ../resources/cadi-example.properties:/opt/onap/sdnc/config/cadi.properties - - ../resources/cadi-log.properties:/opt/onap/sdnc/config/cadi-log.properties - - ../resources/cadi.keyfile:/opt/onap/sdnc/config/cadi.keyfile + - ../resources/application.properties:/opt/sdnc/gra/config/application.properties + # Uncomment line below to authenticate with AAF + # - ../resources/cadi-example.properties:/opt/sdnc/gra/config/cadi.properties + - ../resources/cadi-log.properties:/opt/sdnc/gra/config/cadi-log.properties links: - db:dbhost environment: @@ -40,16 +40,21 @@ services: - MYSQL_USER=${MYSQL_USER} - MYSQL_PASSWORD=${MYSQL_PASSWORD} - MYSQL_DATABASE=${MYSQL_DATABASE} - - SDNC_CONFIG_DIR=/opt/onap/sdnc/config + - ODL_USER=${ODL_USER} + - AAF_MECHID_CRED=${ODL_PASSWORD} + - ODL_URI=http://localhost:8080 + - SDNC_CONFIG_DIR=/opt/sdnc/gra/config - LOG_LEVEL=DEBUG - TRUSTSTORE_PASSWORD=changeit - CACERT_PASSWORD=changeit - - SDNC_CERT_DIR=/opt/onap/sdnc/config + - SDNC_CERT_DIR=/opt/sdnc/gra/config - JAVA_SECURITY_DIR=/usr/lib/jvm/default-jvm/jre/lib/security - TRUSTSTORE=truststoreONAPall.jks - logging: + - SDNNFT_HOST=${SDNNFT_HOST:-localhost} + - LOG_PATH=/opt/sdnc/gra/logs + logging: driver: "json-file" - options: + options: max-size: "30m" max-file: "5" extra_hosts: @@ -67,7 +72,7 @@ services: ports: - "3200:3100" volumes: - - ${HOME}/gerrit/sdnc/oam/platform-logic:/opt/onap/ccsdk/platform-logic + - ${HOME}/st_sdncp/platform-logic:/opt/onap/ccsdk/platform-logic links: - db:dbhost - db:sdnctldb01 @@ -78,8 +83,8 @@ services: - MYSQL_USER=${MYSQL_USER} - MYSQL_PASSWORD=${MYSQL_PASSWORD} - MYSQL_DATABASE=${MYSQL_DATABASE} - logging: + logging: driver: "json-file" - options: + options: max-size: "30m" max-file: "5" diff --git a/ms/gra/gra-docker/src/main/docker/Dockerfile b/ms/gra/gra-docker/src/main/docker/Dockerfile index 37c2ee6..54e8c1a 100644 --- a/ms/gra/gra-docker/src/main/docker/Dockerfile +++ b/ms/gra/gra-docker/src/main/docker/Dockerfile @@ -1,44 +1,49 @@ # Prepare stage for multistage image build ## START OF STAGE0 ## -FROM @base.image.name@:@ccsdk.docker.version@ AS stage0 +FROM @base.image.name@:@base.image.version@ AS stage0 ENV LOG_PATH /var/log/onap/sdnc -ENV SDNC_CONFIG_DIR /opt/onap/sdnc/config -ENV TRUSTSTORE @onap.truststore@ +ENV SDNC_CONFIG_DIR /opt/sdnc/gra/config +ENV TRUSTSTORE @truststore.file@ ENV JAVA_SECURITY_DIR /opt/java/openjdk/lib/security USER root # copy deliverables to opt COPY opt /opt -# Install ONAP certificates +# Install certificates RUN keytool -importkeystore -srckeystore ${SDNC_CONFIG_DIR}/${TRUSTSTORE} -srcstorepass changeit -destkeystore ${JAVA_SECURITY_DIR}/cacerts -deststorepass changeit -noprompt ## END OF STAGE0 ## -FROM @base.image.name@:@ccsdk.docker.version@ +FROM @base.image.name@:@base.image.version@ MAINTAINER SDNC Team (onap-sdnc@lists.onap.org) ENV PROJECT_VERSION @project.version@ -ENV SDNC_HOME /opt/onap/sdnc -ENV SDNC_CONFIG_DIR /opt/onap/sdnc/config +ENV SDNC_HOME /opt/sdnc/gra +ENV SDNC_CONFIG_DIR /opt/sdnc/gra/config ENV GRA_JAR @sdnc.gra.jar@ -ENV SVCLOGIC_PROPERTIES /opt/onap/sdnc/config/svclogic.properties -ENV SVCLOGIC_DIR /opt/onap/sdnc/svclogic/graphs +ENV SDNC_UID @sdnc.uid@ +ENV SVCLOGIC_PROPERTIES /opt/sdnc/gra/config/svclogic.properties +ENV SVCLOGIC_DIR /opt/sdnc/gra/service-logic/graphs ENV LOG_PATH /var/log/onap/sdnc USER root -# Install sudo and IP utilities -RUN apk update && apk --no-cache add sudo iputils openssl +# Install sudo, IP utilities and openjdk 11 +RUN export http_proxy=http://sub.proxy.att.com:8080 \ + && export https_proxy=http://sub.proxy.att.com:8080 \ + && apk update && apk --no-cache add bash curl mysql-client sudo iputils openssl \ + && unset http_proxy \ + && unset https_proxy # Enable wheel group RUN sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' -i /etc/sudoers # Create sdnc user -RUN addgroup -S sdnc && adduser -S sdnc -G sdnc +RUN addgroup -g ${SDNC_UID} -S sdnc && adduser -u ${SDNC_UID} -G sdnc -S sdnc RUN addgroup sdnc wheel COPY --from=stage0 --chown=sdnc:sdnc /opt /opt @@ -48,5 +53,6 @@ RUN chmod +x ${SDNC_HOME}/bin/*.sh USER sdnc WORKDIR ${SDNC_HOME} -ENTRYPOINT /opt/onap/sdnc/bin/startGra.sh +ENTRYPOINT /opt/sdnc/gra/bin/startGra.sh EXPOSE 8443 8080 + diff --git a/ms/gra/gra-docker/src/main/resources/application.properties b/ms/gra/gra-docker/src/main/resources/application.properties index 3feb604..30f5077 100644 --- a/ms/gra/gra-docker/src/main/resources/application.properties +++ b/ms/gra/gra-docker/src/main/resources/application.properties @@ -23,3 +23,6 @@ spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.Ph spring.jpa.database=mysql cadi.properties.path=${SDNC_CONFIG_DIR}/cadi.properties +swagger-ui.host=${SDNNFT_HOST:localhost} +swagger-ui.title=SDN-NFT: GRA microservice +swagger-ui.description=SDN-NFT GRA microservice API documentation diff --git a/ms/gra/gra-docker/src/main/resources/contrail-adaptor.properties b/ms/gra/gra-docker/src/main/resources/contrail-adaptor.properties new file mode 100644 index 0000000..c6d98f4 --- /dev/null +++ b/ms/gra/gra-docker/src/main/resources/contrail-adaptor.properties @@ -0,0 +1,40 @@ +keystone.username=admin +keystone.password=admin +tenant.password=admin +contrail.template.dir=/opt/lsc/restapi/templates +max.retry.count=3 +retry.wait=5000 +request.timeout=10000 + +simulateResponse=false +keystone.dummy.cache=true +orm.dummy.cache=true +use.orm=true + +cloud.config.use=false +cloud.config.filename=cloud_config.json +cloud.config.refresh.timer=1000 + +#orm.default_keystone_url_version=/v3 +orm.default_keystone_url_version=/v2.0 +orm.default_keystone_version_regex=/[vV][0-9] +orm.default_orm_url_replace_this=8080 +orm.default_orm_url_replace_with_this=7080 +orm.aic.client=ECOMP-SDNCP +contrail.url.regex=sdn-l-config + +#properties need to create json for policymanager configBody +configBody.service:NetworkPolicy +configBody.version:1.3.0.1 +configBody.configName:Search +configBody.policyScope:SDNC +configBody.templateVersion:1607 +configBody.location:Search +configBody.uuid:Search +configBody.priority:2 +configBody.riskType:low +configBody.riskLevel:2 +configBody.guard:True + +aic.contrail.proxy=none +aic.keystone.proxy=none diff --git a/ms/gra/gra-docker/src/main/resources/contrail-api-path.properties b/ms/gra/gra-docker/src/main/resources/contrail-api-path.properties new file mode 100644 index 0000000..4c04d0e --- /dev/null +++ b/ms/gra/gra-docker/src/main/resources/contrail-api-path.properties @@ -0,0 +1,59 @@ +network-policy.create.path=/network-policys +network-policy.create.method=NetworkPolicy.createNetworkPolicy +network-policy.create.hasTemplateFile=Y + +network-policy.get.path=/network-policy/{contrail-network-policy-id} +network-policy.get.method=NetworkPolicy.getNetworkPolicy +network-policy.get.hasTemplateFile=N + +network-policy.delete.path=/network-policy/{contrail-network-policy-id} +network-policy.delete.method=NetworkPolicy.deleteNetworkPolicy +network-policy.delete.hasTemplateFile=N + +network-policy.update.path=/network-policy/{contrail-network-policy-id} +network-policy.update.method=NetworkPolicy.updateNetworkPolicy +network-policy.update.hasTemplateFile=Y + +network-policy.apply.path=/virtual-network/{contrail-virtual-network-id} +network-policy.apply.method=NetworkPolicy.applyNetworkPolicy +network-policy.apply.hasTemplateFile=N + +network-policy.remove.path=/virtual-network/{contrail-virtual-network-id} +network-policy.remove.method=NetworkPolicy.removeNetworkPolicy +network-policy.remove.hasTemplateFile=N + +virtual-networks.get.path=/virtual-networks +virtual-networks.get.method=NetworkPolicy.getVirtualNetworks +virtual-networks.get.hasTemplateFile=N + +virtual-network.get.path=/virtual-network/{contrail-virtual-network-id} +virtual-network.get.method=NetworkPolicy.getVirtualNetwork +virtual-network.get.hasTemplateFile=N + +fqname-to-uuid.get.path=/fqname-to-id +fqname-to-uuid.get.method=NetworkPolicy.getFqNameToUuid +fqname-to-uuid.get.hasTemplateFile=Y + +id-to-fqname.get.path=/id-to-fqname +id-to-fqname.get.method=NetworkPolicy.getIdToFqName +id-to-fqname.get.hasTemplateFile=N + +virtual-machine-interface.get.path=/virtual-machine-interface/{contrail-virtual-machine-interface-id} +virtual-machine-interface.get.method=PortMirroring.getVirtualMachineInterface +virtual-machine-interface.get.hasTemplateFile=N + +port-mirroring.enable.path=/virtual-machine-interface/{contrail-virtual-machine-interface-id} +port-mirroring.enable.method=PortMirroring.enablePortMirroring +port-mirroring.enable.hasTemplateFile=Y + +port-mirroring.disable.path=/virtual-machine-interface/{contrail-virtual-machine-interface-id} +port-mirroring.disable.method=PortMirroring.disablePortMirroring +port-mirroring.disable.hasTemplateFile=Y + +subnet.add.path=/virtual-network/{contrail-virtual-network-id} +subnet.add.method=NetworkPolicy.addSubnet +subnet.add.hasTemplateFile=N + +subnet.delete.path=/virtual-network/{contrail-virtual-network-id} +subnet.delete.method=NetworkPolicy.deleteSubnet +subnet.delete.hasTemplateFile=N diff --git a/ms/gra/gra-docker/src/main/resources/eipam.properties b/ms/gra/gra-docker/src/main/resources/eipam.properties new file mode 100644 index 0000000..22052fe --- /dev/null +++ b/ms/gra/gra-docker/src/main/resources/eipam.properties @@ -0,0 +1,63 @@ +eipam.templateDir=/opt/sdnc/gra/restapi/templates/ + +#mS is new in 1810, URL is driven by DME2 +eipam.service=microservice-router.lpp.att.com/services/microservice_router/v1/routes + +#DME proxy does not work in containers(1908), workaround is to call alternate.url +# 1906/1908 Can be Direct call or LGW to replace DME2 +#1906 Direct call +#eipam.alternate.url=https://st3-lppajsc.oss.att.com:8666/services/microservice_router/v1/routes +#1908 LGW to replace DME2 +#eipam.alternate.url=https://eipam1-ipaddress.dev.att.com +#eipam.rest.urlEndPoint=/eipam/rest/ipassignment/ +eipam.alternate.url=https://eipam-ipaddress1.stage.att.com + +# subContext for Direct Call, if used the LGW subContext below need to be commented out +#eipam.subContext.assign=/eipamIP/assign +#eipam.subContext.unassign=/eipamIP/unassign +#eipam.subContext.createPool=/eipamIP/createPool +#eipam.subContext.deletePool=/eipamIP/deletePool +#eipam.subContext.getPlanTopology=/eipamIP/topology +#eipam.subContext.getIPAddress=/eipamIP/getIP +#eipam.subContext.allocateSubnet=/eipamIP/allocate +#eipam.subContext.deallocateSubnet=/eipamIP/deallocate +#eipam.subContext.activateSubnet=/eipamIP/activateSubnet +#eipam.subContext.ping=/eipamIP/ping +#eipam.subContext.getPool=/eipamIP/getPool +#eipam.subContext.examineIP=/eipamIP/examineIP + +eipam.httpMethod.assign=PUT +eipam.httpMethod.unassign=POST +eipam.httpMethod.createPool=PUT +eipam.httpMethod.deletePool=POST +eipam.httpMethod.getPlanTopology=GET +eipam.httpMethod.getIPAddress=GET +eipam.httpMethod.allocateSubnet=PUT +eipam.httpMethod.deallocateSubnet=PUT +eipam.httpMethod.activateSubnet=PUT +eipam.httpMethod.ping=GET +eipam.httpMethod.getPool=POST +eipam.httpMethod.examineIP=POST + +# subContext for LGW, if used the above Direct Call subContext need to be commented out +eipam.subContext.assign=/eipam/restservices/v1/ipaddress/assign +eipam.subContext.unassign=/eipam/restservices/v1/ipaddress/unassign +eipam.subContext.createPool=/eipam/restservices/v1/ipaddress/pool +eipam.subContext.deletePool=/eipam/restservices/v1/ipaddress/pool/remove +eipam.subContext.getPlanTopology=/eipam/restservices/v1/ipaddress/plantopology +eipam.subContext.getIPAddress=/eipam/restservices/v1/ipaddress +eipam.subContext.allocateSubnet=/eipam/restservices/v1/ipaddress/subnet/allocate +eipam.subContext.deallocateSubnet=/eipam/restservices/v1/ipaddress/subnet/deallocate +eipam.subContext.activateSubnet=/eipam/restservices/v1/ipaddress/subnet/activate +eipam.subContext.ping=/eipam/restservices/v1/ipaddress/ping +eipam.subContext.getPool=/eipam/restservices/v1/ipaddress/pool +eipam.subContext.examineIP=/eipam/restservices/v1/ipaddress/examineIPAddressInfo + +eipam.connectionTimeout=30000 +eipam.receiveTimeout=60000 +#eipam.version=0.1 +#eipam.envContext=TEST +#eipam.routeOffer=ST3 +eipam.client=sdn_cp_ws +eipam.msgid=sdn +eipam.wss.user=sdn_cp_ws diff --git a/ms/gra/gra-docker/src/main/resources/generic-resource-api-dg.properties b/ms/gra/gra-docker/src/main/resources/generic-resource-api-dg.properties index 3751142..908c32b 100644 --- a/ms/gra/gra-docker/src/main/resources/generic-resource-api-dg.properties +++ b/ms/gra/gra-docker/src/main/resources/generic-resource-api-dg.properties @@ -1,7 +1,44 @@ -restapi.templateDir=/opt/onap/sdnc/restapi/templates +restapi.templateDir=/opt/sdnc/gra/restapi/templates controller.url=http://localhost:8080 controller.user=${ODL_USER} controller.pwd=${ODL_PASSWORD} +bondingservice.server=${ADMIN_PORTAL_URL} +bondingservice.user=${ODL_USER} +bondingservice.password=${ODL_PASSWORD} +bondingservice.authorization=${BONDING_SERVICE_CRED} +bondingservice.uri=/provisioningms/v1/bondingservice/{action} +cloud-region.cloud-owner=att-aic +policy-manager.url=${POLICY_MANAGER_URL} +policy-manager.authorization=${POLICY_AUTHORIZATION_CRED} +policy-manager.clientauth=${POLICY_CLIENTAUTH_CRED} +policy-manager.environment=TEST +# MICROSERVICE +rt.mS.user=${ODL_USER} +rt.mS.pwd=${ODL_PASSWORD} +rt.mS.routeTarget.type=dme2proxy +rt.mS.routeTarget.service=microservice-router.lpp.att.com/services/microservice_router/v1/routes +rt.ms.allocateRouteTarget.subContext=/nwrouting/allocateroutetarget/ +rt.ms.releaseRouteTarget.subContext=/nwrouting/releaseroutetarget/ +rt.ms.routeTarget.version=0.1 +rt.ms.routeTarget.envContext=TEST +rt.ms.routeTarget.routeOffer=ST3 +rt.ms.routeTarget.appId=SDNCP +# VLAN-TAG MICROSERVICE +vt.mS.url=${ADMIN_PORTAL_URL} +vt.mS.user=${ODL_USER} +vt.mS.pwd=${ODL_PASSWORD} +# MAC Address MICROSERVICE +ma.mS.url=${ADMIN_PORTAL_URL} +ma.mS.user=${ODL_USER} +ma.mS.pwd=${ODL_PASSWORD} +# CDS ipassign mS +ipassign.ms.url=${IPASSIGN_URL} +ipassign.ms.user=${ODL_USER} +ipassign.ms.pwd=${ODL_PASSWORD} +# CDS Naming mS +naming.ms.url=${NAMING_MS_URL} +naming.ms.user=${ODL_USER} +naming.ms.pwd=${ODL_PASSWORD} honeycomb.url=http://{honeycomb-instance-ip}:8183 honeycomb.user=${HONEYCOMB_USER} honeycomb.pwd=${HONEYCOMB_PASSWORD} @@ -29,6 +66,35 @@ restapi.vpp.xconnect.templatefile=vcpe-l2-interface.json restapi.tx.templatefile=tunnelxconn-allotted-resource.json restapi.parentsvc.templatefile=parent-provided-allotted-resource.json restapi.network-ar.templatefile=network-provided-allotted-resources.json +restapi.pm.getpolicy.templatefile=pm-get-policy.json +restapi.pm.createpolicy.templatefile=pm-create-policy.json +restapi.pm.pushpolicy.templatefile=pm-push-policy.json +restapi.pm.deletepolicypdp.templatefile=pm-delete-policy-pdp.json +restapi.pm.deletepolicypap.templatefile=pm-delete-policy-pap.json +restapi.portmirrorconfig.templatefile=port-mirror-configuration.json +restapi.genconfig.templatefile=gc-configuration.json +restapi.vnfsubinterfacegroup.templatefile=vnf-sub-interface-group.json +restapi.bondingservice.templatefile=bonding-service.json +restapi.bondingservicerebuild.templatefile=bonding-service-rebuild.json +restapi.forwardingpath.templatefile=forwarding-path.json +restapi.network.templatefile=network.json +restapi.network-instance-group.templatefile=network-instance-group.json +restapi.network-instance-group-network.templatefile=network-instance-group-network.json +restapi.network-instance-group-vpn-binding.templatefile=network-instance-group-vpn-binding.json +restapi.csm.serviceinstance.templatefile=csm-service-instance.json +restapi.mS.allocateRT.templatefile=allocate-route-target.json +restapi.mS.releaseRT.templatefile=release-route-target.json +restapi.ss.vnf.templatefile=self-serve-vnf-assignments.json +restapi.ss.vfmodule.templatefile=self-serve-vfmodule-assignments.json +restapi.ss.caprelease.templatefile=self-serve-capacity-release.json +restapi.ss.capreserve.templatefile=self-serve-capacity-reserve.json +restapi.ss.capreserve.targettype=Site +restapi.ss.mS.vlan.tag.assign.templatefile=self-serve-mS-vlan-tag-assignments.json +restapi.ss.mS.vlan.tag.unassign.templatefile=self-serve-mS-vlan-tag-unassignments.json +restapi.ss.mS.mac.address.assign.templatefile=self-serve-mS-mac-address-assign.json +restapi.ss.mS.mac.address.unassign.templatefile=self-serve-mS-mac-address-unassign.json +restapi.ss.cds.ipassign.templatefile=self-serve-ipassign-unassign.json +restapi.ss.cds.naming.templatefile=self-serve-naming-unassign.json restapi.vnf-ar.templatefile=vnf-provided-allotted-resources.json restapi.services.templatefile=vcpe-services-service.json restapi.services.vnf.vfmodule.templatefile=vfmodule-vim-parameters.vgw.json @@ -48,30 +114,49 @@ restapi.ss.mS.mac.address.unassign.templatefile=self-serve-mS-mac-address-unassi cloud-region.cloud-owner=CloudOwner # URLs -restapi.cr-allottedresource=/restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}/ -restapi.sz-allottedresource=/restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/{allotted-resource-id}/ restapi.brg-allottedresource=/restconf/config/GENERIC-RESOURCE-API:brg-allotted-resources/brg-allotted-resource/{allotted-resource-id}/ -restapi.vpp-honeycomb=/restconf/config/ietf-interfaces:interfaces/interface/{tunnel-name}/ -restapi.tx-allottedresource=/restconf/config/GENERIC-RESOURCE-API:tunnelxconn-allotted-resources/tunnelxconn-allotted-resource/{allotted-resource-id}/ -restapi.vnf-provided-allottedresource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-provided-allotted-resources/ +restapi.cds.ipassign.service=/ippm/restservices/v2/ipaddresses/unassign/ +restapi.cds.naming.service=/web/service/v1/genNetworkElementName/cds/ +restapi.connection-attachment-allottedresource=/restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/{allotted-resource-id}/ +restapi.cr-allottedresource=/restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}/ +restapi.forwarding-path=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/forwarding-paths/forwarding-path/ +restapi.gc-configuration=/restconf/config/GENERIC-RESOURCE-API:generic-configurations/gc-configuration/{configuration-id}/ +restapi.mS.allocateRT=/vpnmicroservice/v1/vpn/allocateroutetarget/ +restapi.mS.releaseRT=/vpnmicroservice/v1/vpn/releaseroutetarget/ +restapi.naming.gen-name.service=/web/service/v1/genNetworkElementName/ +restapi.network-by-id=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/ +restapi.network-instance-group-network=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-groups/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/ +restapi.network-instance-group-network=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-groups/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/ +restapi.network-instance-group-vpn-binding=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-groups/network-instance-group/{network-instance-group-id}/networks/network/{network-id}/vpn-bindings/{vpn-binding-id}/ +restapi.network-instance-group=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/network-instance-groups/network-instance-group/{network-instance-group-id}/ +restapi.network-level-oper-status=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-level-oper-status/ restapi.network-provided-allottedresource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-provided-allotted-resources/ -restapi.pm-configuration=/restconf/config/GENERIC-RESOURCE-API:port-mirror-configurations/port-mirror-configuration/{configuration-id}/ +restapi.network-provided-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-provided-allotted-resources/ +restapi.network-topology-identifier-structure=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-topology/network-topology-identifier-structure/ restapi.network=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/ -restapi.vnf=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/ -restapi.vnf-api.service-information=/restconf/config/VNF-API:vnfs/vnf-list/{vnf-id}/service-data/ restapi.parent-provided-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/provided-allotted-resources/provided-allotted-resource/{allotted-resource-id}/ -restapi.network-provided-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-provided-allotted-resources/ -restapi.services=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/ +restapi.pm-configuration=/restconf/config/GENERIC-RESOURCE-API:port-mirror-configurations/port-mirror-configuration/{configuration-id}/ +restapi.preload-network=/restconf/config/GENERIC-RESOURCE-API:preload-information/preload-list/{network-name}/network/preload-data/preload-network-topology-information/ +restapi.preloadinformation=/restconf/config/GENERIC-RESOURCE-API:preload-information/preload-list/ restapi.service.vnf.vfmodule-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/ -restapi.connection-attachment-allottedresource=/restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/{allotted-resource-id}/ -restapi.naming.gen-name.service=/web/service/v1/genNetworkElementName -restapi.ss-pnf-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/pnfs/pnf/{pnf-id}/ -restapi.ss-vnf-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/ -restapi.ss-vfmodule-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/ -restapi.ss-mS-vlan-tag-assign=/vlantagapi/v1/{action} +restapi.services=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/ restapi.ss-mS-mac-address-assign=/api/macaddress/v1/service/assign/ restapi.ss-mS-mac-address-unassign=/api/macaddress/v1/service/unassign/ -restapi.preload-network=/restconf/config/GENERIC-RESOURCE-API:preload-information/preload-list/{network-name}/network/preload-data/preload-network-topology-information/ -restapi.preloadinformation=/restconf/config/GENERIC-RESOURCE-API:preload-information/preload-list/ +restapi.ss-mS-vlan-tag-assign=/vlantagapi/v1/{action} +restapi.ss-pnf-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/pnfs/pnf/{pnf-id}/ +restapi.ss-vfmodule-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/ +restapi.ss-vnf-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/ +restapi.sz-allottedresource=/restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/{allotted-resource-id}/ +restapi.tx-allottedresource=/restconf/config/GENERIC-RESOURCE-API:tunnelxconn-allotted-resources/tunnelxconn-allotted-resource/{allotted-resource-id}/ restapi.vf-module=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/ +restapi.vnf-api.service-information=/restconf/config/VNF-API:vnfs/vnf-list/{vnf-id}/service-data/ restapi.vnf-assign=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/ +restapi.vnf-level-oper-status=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-level-oper-status/ +restapi.vnf-network=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/vnf-resource-assignments/vnf-networks/vnf-network/{network-role}/ +restapi.vnf-networks=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/vnf-resource-assignments/vnf-networks/ +restapi.vnf-onap-model-information=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/onap-model-information/ +restapi.vnf-provided-allottedresource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-provided-allotted-resources/ +restapi.vnf-sub-interface-group=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-sub-interface-groups/vnf-sub-interface-group/{vnfc-instance-group-function}/{network-instance-group-function}/{parent-port-role}/ +restapi.vnf-topology.onap-model-information=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-topology/onap-model-information/ +restapi.vnf=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/ +restapi.vpp-honeycomb=/restconf/config/ietf-interfaces:interfaces/interface/{tunnel-name}/ diff --git a/ms/gra/gra-docker/src/main/resources/log4j2.properties b/ms/gra/gra-docker/src/main/resources/log4j2.properties index 9bc78a3..c4f4b88 100644 --- a/ms/gra/gra-docker/src/main/resources/log4j2.properties +++ b/ms/gra/gra-docker/src/main/resources/log4j2.properties @@ -21,7 +21,7 @@ property.logDir = ${env:LOG_PATH:-./target} property.logLevel = ${env:LOG_LEVEL:-INFO} -property.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{currentGraph} - %X{nodeId} | %m%n +property.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|%-5.5p|%-32.32c{1}|%X{currentGraph} - %X{nodeId}|%replace{%m}{\\R}{ }%n #default mdc values property.ServiceName = INTERNAL @@ -63,7 +63,7 @@ appender.debug.filePattern = ${logDir}/debug.log.%i appender.debug.immediateFlush = true appender.debug.append = true appender.debug.layout.type = PatternLayout -appender.debug.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|%-5.5p|%-32.32c{1}|%X{currentGraph} - %X{nodeId}|%m%n +appender.debug.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|%-5.5p|%-32.32c{1}|%X{currentGraph} - %X{nodeId}|%replace{%m}{\\R}{ }%n appender.debug.policies.type = Policies appender.debug.policies.size.type = SizeBasedTriggeringPolicy appender.debug.policies.size.size = 10MB @@ -80,7 +80,7 @@ appender.error.filePattern = ${logDir}/error.log.%i appender.error.immediateFlush = true appender.error.append = true appender.error.layout.type = PatternLayout -appender.error.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|$${ctx:ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%p|$${ctx:ErrorCode}|$${ctx:ErrorDesc}|%m%n +appender.error.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|$${ctx:ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%p|$${ctx:ErrorCode}|$${ctx:ErrorDesc}|%replace{%m}{\\R}{ }%ex{full}{separator(\\n)}%n appender.error.policies.type = Policies appender.error.policies.size.type = SizeBasedTriggeringPolicy @@ -98,7 +98,7 @@ appender.metric.filePattern = ${logDir}/metric.log.%i appender.metric.immediateFlush = true appender.metric.append = true appender.metric.layout.type = PatternLayout -appender.metric.layout.pattern=%X{InvokeTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%-16.16t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceID}|%p|%X{Severity}|192.168.23.111|%X{ElapsedTime}|${hostName}|%X{ClientIPAddress}|%C{1}|||%X{TargetElement}|%markerSimpleName|%X|%X{currentGraph} - %X{nodeId}||%m%n +appender.metric.layout.pattern=%X{InvokeTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%-16.16t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceID}|%p|%X{Severity}|192.168.23.111|%X{ElapsedTime}|${hostName}|%X{ClientIPAddress}|%C{1}|||%X{TargetElement}|%markerSimpleName|%replace{%X}{\\u007B|\\u007D}{}|%X{currentGraph} - %X{nodeId}||%m%n appender.metric.policies.type = Policies appender.metric.policies.size.type = SizeBasedTriggeringPolicy appender.metric.policies.size.size = 10MB @@ -113,7 +113,7 @@ appender.audit.filePattern = ${logDir}/audit.log.%i appender.audit.immediateFlush = true appender.audit.append = true appender.audit.layout.type = PatternLayout -appender.audit.layout.pattern=%X{EntryTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%-16.16t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceID}|INFO|%X{Severity}|192.168.23.111|%X{ElapsedTime}|${hostName}|%X{ClientIPAddress}|%C{1}|%X{AUDIT-Unused}|%X{AUDIT-ProcessKey}|%markerSimpleName|%X|||%m%n +appender.audit.layout.pattern=%X{EntryTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%-16.16t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceID}|INFO|%X{Severity}|192.168.23.111|%X{ElapsedTime}|${hostName}|%X{ClientIPAddress}|%C{1}|%X{AUDIT-Unused}|%X{AUDIT-ProcessKey}|%markerSimpleName|%replace{%X}{\\u007B|\\u007D}{}|||%m%n appender.audit.policies.type = Policies appender.audit.policies.size.type = SizeBasedTriggeringPolicy appender.audit.policies.size.size = 10MB @@ -160,4 +160,4 @@ logger.ccsdk.name = org.onap.ccsdk logger.ccsdk.level = DEBUG logger.onaplogging.name = org.onap.logging -logger.onaplogging.level = DEBUG
\ No newline at end of file +logger.onaplogging.level = DEBUG diff --git a/ms/gra/gra-docker/src/main/resources/msoadaptor.properties b/ms/gra/gra-docker/src/main/resources/msoadaptor.properties new file mode 100644 index 0000000..fb7fac9 --- /dev/null +++ b/ms/gra/gra-docker/src/main/resources/msoadaptor.properties @@ -0,0 +1,5 @@ +adaptorName=com.att.sdnctl.sli.adaptor.mso.MSOAdaptor +mso.user=dummy +mso.passwd=dummy +mso.restriction.uri=https://msoapih-s3.ecomp.cci.att.com:30275/restriction +mso.sleep.timer=2000 diff --git a/ms/gra/gra-docker/src/main/resources/startGra.sh b/ms/gra/gra-docker/src/main/resources/startGra.sh index 6bca0e0..66dd721 100644 --- a/ms/gra/gra-docker/src/main/resources/startGra.sh +++ b/ms/gra/gra-docker/src/main/resources/startGra.sh @@ -21,22 +21,74 @@ # ============LICENSE_END========================================================= ### -export SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc} -export GRA_JAR=${GRA_JAR:-@sdnc.gra.jar@} -export SVCLOGIC_DIR=${SVCLOGIC_DIR:-opt/onap/sdnc/svclogic/graphs} -export LOG_PATH=${LOG_PATH:-/var/log/onap/sdnc} -export SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/onap/sdnc/config} -export MYSQL_DB_HOST=${MYSQL_DB_HOST:-dbhost} +export SDNC_HOME=${SDNC_HOME:-/opt/sdnc/gra} +export SVCLOGIC_DIR=${SVCLOGIC_DIR:-/opt/sdnc/gra/service-logic/graphs} +export LOG_PATH=${LOG_PATH:-/var/log/sdnc} +export SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/sdnc/gra/config} export SVCLOGIC_PROPERTIES=${SVCLOGIC_PROPERTIES:-${SDNC_CONFIG_DIR}/svclogic.properties} +export SSL_DIR=${SSL_DIR:-/opt/sdnc/data/ssl} +export SECRETS_DIR=${SECRETS_DIR:-/opt/app/secrets} +export K8_NAMESPACE=${K8_NAMESPACE:-default} -cd $SDNC_HOME +if [ -f ${SECRETS_DIR}/${K8_NAMESPACE}-keystore-cred ] +then + export AAF_KEYSTORE_CRED=$(cat ${SECRETS_DIR}/${K8_NAMESPACE}-keystore-cred) +else + ls -l ${SECRETS_DIR} + echo "Not found: ${SECRETS_DIR}/${K8_NAMESPACE}-keystore-cred" +fi + +if [ -f ${SECRETS_DIR}/${K8_NAMESPACE}-trustore-cred ] +then + export AAF_TRUSTORE_CRED=$(cat ${SECRETS_DIR}/${K8_NAMESPACE}-trustore-cred | grep cadi_truststore_password | cut -d '=' -f 2 ) +else + ls -l ${SECRETS_DIR} + echo "Not found: ${SECRETS_DIR}/${K8_NAMESPACE}-trusture-cred" +fi + +if [ -f ${SECRETS_DIR}/${K8_NAMESPACE}-keystore-jks ] +then + cat ${SECRETS_DIR}/${K8_NAMESPACE}-keystore-jks | base64 -d > ${SSL_DIR}/keystore.jks + echo "base64 dec ${SSL_DIR}/keystore.jks" +else + ls -l ${SECRETS_DIR} + echo "Not found: ${SECRETS_DIR}/${K8_NAMESPACE}-keystore-jks" +fi + +env | sort + +# +# Wait for database +# +echo "Waiting for database" +until mysqladmin ping -h ${MYSQL_DB_HOST} --silent; do + printf "." + sleep 1 +done +echo -e "\nDatabase ready" + +# Create tablespace and user account + +#mysql -h ${MYSQL_DB_HOST} -u root -p${MYSQL_ROOT_PASSWORD} mysql <<-END +#CREATE DATABASE ${MYSQL_DB_DATABASE}; +#CREATE USER '${MYSQL_DB_USER}'@'localhost' IDENTIFIED BY '${MYSQL_DB_PASSWD}'; +#CREATE USER '${MYSQL_DB_USER}'@'%' IDENTIFIED BY '${MYSQL_DB_PASSWD}'; +#GRANT ALL PRIVILEGES ON ${MYSQL_DB_DATABASE}.* TO '${MYSQL_DB_USER}'@'localhost' WITH GRANT OPTION; +#GRANT ALL PRIVILEGES ON ${MYSQL_DB_DATABASE}.* TO '${MYSQL_DB_USER}'@'%' WITH GRANT OPTION; +#commit; +#END - echo "Waiting for mysql" - until mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} &> /dev/null - do - printf "." - sleep 1 - done - echo -e "\nmysql ready" - -java -DserviceLogicDirectory=${SVCLOGIC_DIR} -DLOG_PATH=${LOG_PATH} -jar ${SDNC_HOME}/lib/${GRA_JAR} +# Initialize schema +if [ -f ${SDNC_CONFIG_DIR}/schema-mysql.sql ] +then + mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} < ${SDNC_CONFIG_DIR}/schema-mysql.sql +fi + +# Load data +if [ -f ${SDNC_CONFIG_DIR}/data-mysql.sql ] +then + mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} < ${SDNC_CONFIG_DIR}/data-mysql.sql +fi + +cd $SDNC_HOME +java ${JAVA_OPTS} -DserviceLogicDirectory=${SVCLOGIC_DIR} -DLOG_PATH=${LOG_PATH} -Dlog4j2.configurationFile=file:${SDNC_CONFIG_DIR}/log4j2.properties -jar ${SDNC_HOME}/lib/gra-app-*.jar diff --git a/ms/gra/gra-docker/src/main/resources/truststore.jks b/ms/gra/gra-docker/src/main/resources/truststore.jks Binary files differnew file mode 100644 index 0000000..6798c60 --- /dev/null +++ b/ms/gra/gra-docker/src/main/resources/truststore.jks diff --git a/ms/gra/gra-docker/src/main/scripts/chmodScripts.sh b/ms/gra/gra-docker/src/main/scripts/chmodScripts.sh new file mode 100644 index 0000000..50d959f --- /dev/null +++ b/ms/gra/gra-docker/src/main/scripts/chmodScripts.sh @@ -0,0 +1,3 @@ +#/bin/bash +echo $(pwd) +chmod 755 target/docker-stage/opt/sdnc/gra/bin/startGra.sh diff --git a/ms/gra/gra-docker/src/main/scripts/compareContrail.sh b/ms/gra/gra-docker/src/main/scripts/compareContrail.sh new file mode 100755 index 0000000..5c613e7 --- /dev/null +++ b/ms/gra/gra-docker/src/main/scripts/compareContrail.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +if [ $# -eq 2 ] +then + verbose=false + file1=$1 + file2=$2 +elif [ $# -eq 3 -a $1 = "-v" ] +then + verbose=true + file1=$2 + file2=$3 +else + echo "Usage: $0 [-v] file1 file2" + exit 1 +fi + +tmppfx=contrail$$ + +formattedfile1=/tmp/$tmppfx-formatted1 +formattedfile2=/tmp/$tmppfx-formatted2 +idlist1=/tmp/$tmppfx-contrail-ids-1 +idlist2=/tmp/$tmppfx-contrail-ids-2 + + +echo "Comparing $file1 to $file2 ...." + +cat $file1 | python3 -mjson.tool > $formattedfile1 +cat $file2 | python3 -mjson.tool > $formattedfile2 + +cat $formattedfile1 | grep '"allotted-resource-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $idlist1 +cat $formattedfile2 | grep '"allotted-resource-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $idlist2 + +echo +echo "Diff of allotted resource ids:" +echo "------------------------------" +diff $idlist1 $idlist2 + +if [ "$verbose" = "true" ] +then + echo + echo "Full diff:" + echo "----------" + diff $formattedfile1 $formattedfile2 +fi + +echo +echo "Allotted resource counts:" +echo "-------------------------" +echo " $file1 : $(cat $idlist1 | wc -l)" +echo " $file2 : $(cat $idlist2 | wc -l)" + + + + diff --git a/ms/gra/gra-docker/src/main/scripts/comparePortmirror.sh b/ms/gra/gra-docker/src/main/scripts/comparePortmirror.sh new file mode 100755 index 0000000..5a39660 --- /dev/null +++ b/ms/gra/gra-docker/src/main/scripts/comparePortmirror.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +if [ $# -eq 2 ] +then + verbose=false + file1=$1 + file2=$2 +elif [ $# -eq 3 -a $1 = "-v" ] +then + verbose=true + file1=$2 + file2=$3 +else + echo "Usage: $0 [-v] file1 file2" + exit 1 +fi + +tmppfx=portmirror$$ + +formattedfile1=/tmp/$tmppfx-formatted1 +formattedfile2=/tmp/$tmppfx-formatted2 +idlist1=/tmp/$tmppfx-configuration-ids-1 +idlist2=/tmp/$tmppfx-configuration-ids-2 + + +echo "Comparing $file1 to $file2 ...." + +cat $file1 | python3 -mjson.tool > $formattedfile1 +cat $file2 | python3 -mjson.tool > $formattedfile2 + +cat $formattedfile1 | grep '"configuration-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $idlist1 +cat $formattedfile2 | grep '"configuration-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $idlist2 + +echo +echo "Diff of configuration ids:" +echo "--------------------------" +diff $idlist1 $idlist2 + +if [ "$verbose" = "true" ] +then + echo + echo "Full diff:" + echo "----------" + diff $formattedfile1 $formattedfile2 +fi + +echo +echo "Configuration counts:" +echo "---------------------" +echo " $file1 : $(cat $idlist1 | wc -l)" +echo " $file2 : $(cat $idlist2 | wc -l)" + + + + diff --git a/ms/gra/gra-docker/src/main/scripts/comparePreload.sh b/ms/gra/gra-docker/src/main/scripts/comparePreload.sh new file mode 100755 index 0000000..4e8ab79 --- /dev/null +++ b/ms/gra/gra-docker/src/main/scripts/comparePreload.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +if [ $# -eq 2 ] +then + verbose=false + file1=$1 + file2=$2 +elif [ $# -eq 3 -a $1 = "-v" ] +then + verbose=true + file1=$2 + file2=$3 +else + echo "Usage: $0 [-v] file1 file2" + exit 1 +fi + +tmppfx=preload$$ + +formattedfile1=/tmp/$tmppfx-formatted1 +formattedfile2=/tmp/$tmppfx-formatted2 +idlist1=/tmp/$tmppfx-preload-ids-1 +idlist2=/tmp/$tmppfx-preload-ids-2 + + +echo "Comparing $file1 to $file2 ...." + +cat $file1 | python3 -mjson.tool > $formattedfile1 +cat $file2 | python3 -mjson.tool > $formattedfile2 + +cat $formattedfile1 | grep '"preload-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $idlist1 +cat $formattedfile2 | grep '"preload-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $idlist2 + +echo +echo "Diff of preload ids:" +echo "--------------------" +diff $idlist1 $idlist2 + +if [ "$verbose" = "true" ] +then + echo + echo "Full diff:" + echo "----------" + diff $formattedfile1 $formattedfile2 +fi + +echo +echo "Preload id counts:" +echo "------------------" +echo " $file1 : $(cat $idlist1 | wc -l)" +echo " $file2 : $(cat $idlist2 | wc -l)" + + + + diff --git a/ms/gra/gra-docker/src/main/scripts/compareSvc.sh b/ms/gra/gra-docker/src/main/scripts/compareSvc.sh new file mode 100755 index 0000000..0c977b5 --- /dev/null +++ b/ms/gra/gra-docker/src/main/scripts/compareSvc.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +if [ $# -eq 2 ] +then + verbose=false + file1=$1 + file2=$2 +elif [ $# -eq 3 -a $1 = "-v" ] +then + verbose=true + file1=$2 + file2=$3 +else + echo "Usage: $0 [-v] file1 file2" + exit 1 +fi + +tmppfx=svc$$ + +formattedfile1=/tmp/$tmppfx-formatted1 +formattedfile2=/tmp/$tmppfx-formatted2 +svcinstancelist1=/tmp/$tmppfx-svc-instance-ids-1 +svcinstancelist2=/tmp/$tmppfx-svc-instance-ids-2 + + +echo "Comparing $file1 to $file2 ...." + +cat $file1 | python3 -mjson.tool > $formattedfile1 +cat $file2 | python3 -mjson.tool > $formattedfile2 + +cat $formattedfile1 | grep '"service-instance-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $svcinstancelist1 +cat $formattedfile2 | grep '"service-instance-id":' | cut -d: -f2 | sed -e "s/,$//" -e 's/\"//g' -e '/^[[:space:]]*$/d' | sort -u > $svcinstancelist2 + +echo +echo "Diff of service instance ids:" +echo "-----------------------------" +diff $svcinstancelist1 $svcinstancelist2 + +if [ "$verbose" = "true" ] +then + echo + echo "Full diff:" + echo "----------" + diff $formattedfile1 $formattedfile2 +fi + +echo +echo "Service instance counts:" +echo "------------------------" +echo " $file1 : $(cat $svcinstancelist1 | wc -l)" +echo " $file2 : $(cat $svcinstancelist2 | wc -l)" + + + + diff --git a/ms/gra/gra-docker/src/main/scripts/exportGraDaexim.sh b/ms/gra/gra-docker/src/main/scripts/exportGraDaexim.sh new file mode 100644 index 0000000..08da8b0 --- /dev/null +++ b/ms/gra/gra-docker/src/main/scripts/exportGraDaexim.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +ODL_USER=${ODL_USER:-m27434@dev.sdncp.att.com} +ODL_PASSWORD=${AAF_MECHID_CRED:-admin} +ODL_URI=${ODL_URI:-https://localhost:8443} + +export TMPDIR=/tmp/daexim-$$ + +if [ $# -ne 1 ] +then + echo "Usage: $0 filename" + exit 1 +fi + + +set -e + +mkdir $TMPDIR + +if [[ $1 == /* ]] +then + tarfile=$1 +else + tarfile=$TMPDIR/$1 +fi + +echo "Exporting services ..." +curl -k -u${ODL_USER}:${ODL_PASSWORD} ${ODL_URI}/restconf/config/GENERIC-RESOURCE-API:services/ > ${TMPDIR}/services_config.json +echo "Exporting contrail data ..." +curl -k -u${ODL_USER}:${ODL_PASSWORD} ${ODL_URI}/restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/ > ${TMPDIR}/contrail_config.json +echo "Exporting port mirror data ..." +curl -k -u${ODL_USER}:${ODL_PASSWORD} ${ODL_URI}/restconf/config/GENERIC-RESOURCE-API:port-mirror-configurations/ > ${TMPDIR}/portmirror_config.json +echo "Exporting preload data ..." +curl -k -u${ODL_USER}:${ODL_PASSWORD} ${ODL_URI}/restconf/config/GENERIC-RESOURCE-API:preload-information/ > ${TMPDIR}/preload_config.json + +cd $TMPDIR +tar czf $tarfile ./*.json + +echo Exported data is in $tarfile + diff --git a/ms/gra/gra-docker/src/main/scripts/graToMdsal.sh b/ms/gra/gra-docker/src/main/scripts/graToMdsal.sh new file mode 100644 index 0000000..9fb62f8 --- /dev/null +++ b/ms/gra/gra-docker/src/main/scripts/graToMdsal.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +# Copies data from NFT Azure GRA node and stores in MDSAL in NFT EOM + +TMPNAME=gra-mdsal-$$ + +if [ $# -eq 2 ] +then + fetchFile=false + NFT_AZURE_EXPORT_FILE=$1 + NFT_EOM_URL=$2 +elif [ $# -eq 3 ] +then + fetchFile=true + NFT_AZURE_EXPORT_FILE=$TMPNAME.tar.gz + NFT_AZURE_NAMESPACE=$1 + NFT_AZURE_GRA_POD=$2 + NFT_EOM_URL=$3 +else + echo "Usage: $0 {export-file-name | nft-namespace gra-pod-name} eom-url" + exit 1 +fi + + +# Credentials configuration +NFT_AZURE_USER=${NFT_AZURE_USER:-m27434@dev.sdncp.att.com} +NFT_AZURE_PASSWORD=${NFT_AZURE_PASSWORD:-sdncp20190501} +NFT_EOM_USER=${NFT_EOM_USER:-admin} +NFT_EOM_PASSWORD=${NFT_EOM_PASSWORD:-admin} + +set -e + +TMPNAME=gra-mdsal-$$ +mkdir /tmp/$TMPNAME + +if [ "$fetchFile" = "true" ] +then + # Export data on Azure + kubectl -n $NFT_AZURE_NAMESPACE exec -ti $NFT_AZURE_GRA_POD -c gra -- env ODL_USER=$NFT_AZURE_USER AAF_MECHID_CRED=$NFT_AZURE_PASSWORD /opt/sdnc/gra/bin/exportGraDaexim.sh /tmp/$NFT_AZURE_EXPORT_FILE + + + # Put exported data to NFT EOM + kubectl -n $NFT_AZURE_NAMESPACE cp $NFT_AZURE_GRA_POD:/tmp/$NFT_AZURE_EXPORT_FILE /tmp/$TMPNAME/$NFT_AZURE_EXPORT_FILE +else + cp $NFT_AZURE_EXPORT_FILE /tmp/$TMPNAME +fi + +cd /tmp/$TMPNAME +tar xzf $NFT_AZURE_EXPORT_FILE + +# Massage files and create daexim input +echo "{" > lsc_backup_config_$TMPNAME.json +addComma=false +if [ -f services_config.json ] +then + echo "Converting service data ..." + cat services_config.json | python3 -mjson.tool | sed -e "s/services/GENERIC-RESOURCE-API:services/" -e "/\"gateway-address\": \"\"/d" > services_config_upd.json + cat services_config_upd.json | sed -e "1s/{//" -e "$ s/}//" >> lsc_backup_config_$TMPNAME.json + addComma=true +fi + +if [ -f contrail_config.json ] +then + if [ "$addComma" = "true" ] + then + echo "," >> lsc_backup_config_$TMPNAME.json + fi + cat contrail_config.json | sed -e "s/{//" -e "s/contrail-route-allotted-resources/GENERIC-RESOURCE-API:contrail-route-allotted-resources/" -e "s/}$//" >> lsc_backup_config_$TMPNAME.json + addComma=true +fi + +if [ -f portmirror_config.json ] +then + if [ "$addComma" = "true" ] + then + echo "," >> lsc_backup_config_$TMPNAME.json + fi + cat portmirror_config.json | sed -e "s/{//" -e "s/port-mirror-configurations/GENERIC-RESOURCE-API:port-mirror-configurations/" -e "s/}$//" >> lsc_backup_config_$TMPNAME.json + addComma=true +fi + +echo "}" >> lsc_backup_config_$TMPNAME.json + +echo "Exported data files are in /tmp/$TMPNAME" + +if [ -f services_config_upd.json ] +then + echo "Importing service data ..." + curl -k -v -u${NFT_EOM_USER}:${NFT_EOM_PASSWORD} -H "Content-Type: application/json" -X PUT -d@services_config_upd.json ${NFT_EOM_URL}/restconf/config/GENERIC-RESOURCE-API:services/ +fi + +if [ -f contrail_config.json ] +then + echo "Importing contrail data ..." + curl -k -v -u${NFT_EOM_USER}:${NFT_EOM_PASSWORD} -H "Content-Type: application/json" -X PUT -d@contrail_config.json ${NFT_EOM_URL}/restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/ +fi + +if [ -f portmirror_config.json ] +then + echo "Importing port mirror data ..." + curl -k -v -u${NFT_EOM_USER}:${NFT_EOM_PASSWORD} -H "Content-Type: application/json" -X PUT -d@portmirror_config.json ${NFT_EOM_URL}/restconf/config/GENERIC-RESOURCE-API:port-mirror-configurations/ +fi + + diff --git a/ms/gra/gra-docker/src/main/scripts/importGraDaexim.sh b/ms/gra/gra-docker/src/main/scripts/importGraDaexim.sh new file mode 100755 index 0000000..2c90421 --- /dev/null +++ b/ms/gra/gra-docker/src/main/scripts/importGraDaexim.sh @@ -0,0 +1,207 @@ +#!/bin/bash + +export CHUNK_SIZE=${CHUNK_SIZE:-75} +set -e +CURLFLAGS="--silent --show-error" +if [ $# -eq 3 ] +then + if [ "$1" != "-v" ] + then + echo "Usage: $0 [-v] filename controller-url" + exit 1 + fi + CURLFLAGS="-v" + filename=$2 + url=$3 +elif [ $# -eq 2 ] +then + filename=$1 + url=$2 +else + echo "Usage: $0 [-v] filename controller-url" + exit 1 +fi + +ODL_USER=${ODL_USER:-admin} +ODL_PASSWORD=${ODL_PASSWORD:-admin} + + +export TMPDIR=/tmp/daexim-$$ +# Unzip file +if [[ "$filename" == *.zip ]] +then + unzip -qd $TMPDIR $filename + DAEXIM_CONFIG=$(find $TMPDIR -name *config.json) +elif [[ "$filename" == *config.json ]] +then + mkdir $TMPDIR + DAEXIM_CONFIG=$filename +else + echo "$filename is not a recognized format" + exit 1 +fi + + + +cat ${DAEXIM_CONFIG} | python3 -c ' +import sys,json,os + +data = json.load(sys.stdin) + +chunk_size = int(os.environ["CHUNK_SIZE"]) +if chunk_size == "": + chunk_size = 75 + +if "GENERIC-RESOURCE-API:services" in data: + chunk = 0 + lineno = chunk_size + f = None + for service in data["GENERIC-RESOURCE-API:services"]["service"]: + if lineno >= chunk_size: + chunk = chunk+1 + lineno = 1 + if f != None: + print ("]}}", file=f) + f.flush() + f.close() + outfile = os.environ["TMPDIR"] + "/config_gra_services_"+str(chunk).zfill(3)+".json" + f = open(outfile, "w") + print("{\"services\":", file=f, end="") + print("{\"service\":[", file=f, end="") + json.dump(service, f) + else: + lineno = lineno+1 + print(",",file=f, end="") + json.dump(service, f) + if f != None: + print("]}}", file=f) + f.flush() + f.close() + print("Split "+str(len(data["GENERIC-RESOURCE-API:services"]["service"]))+ " services into "+str(chunk)+" chunks") + +if "GENERIC-RESOURCE-API:contrail-route-allotted-resources" in data: + chunk = 0 + lineno = chunk_size + f = None + for contrail_route in data["GENERIC-RESOURCE-API:contrail-route-allotted-resources"]["contrail-route-allotted-resource"]: + if lineno >= chunk_size: + chunk = chunk+1 + lineno = 1 + if f != None: + print ("]}}", file=f) + f.flush() + f.close() + outfile = os.environ["TMPDIR"] + "/config_gra_contrail_"+str(chunk).zfill(3)+".json" + f = open(outfile, "w") + print("{\"contrail-route-allotted-resources\":", file=f, end="") + print("{\"contrail-route-allotted-resource\":[", file=f, end="") + json.dump(contrail_route, f) + else: + lineno = lineno+1 + print(",",file=f, end="") + json.dump(contrail_route, f) + if f != None: + print("]}}", file=f) + f.flush() + f.close() + print("Split "+ str(len(data["GENERIC-RESOURCE-API:contrail-route-allotted-resources"]["contrail-route-allotted-resource"]))+ " contrail-route-allotted-services into "+str(chunk)+" chunks") + +if "GENERIC-RESOURCE-API:port-mirror-configurations" in data: + chunk = 0 + lineno = chunk_size + f = None + for port_mirror in data["GENERIC-RESOURCE-API:port-mirror-configurations"]["port-mirror-configuration"]: + if lineno >= chunk_size: + chunk = chunk+1 + lineno = 1 + if f != None: + print ("]}}", file=f) + f.flush() + f.close() + outfile = os.environ["TMPDIR"] + "/config_gra_port_mirror_"+str(chunk).zfill(3)+".json" + f = open(outfile, "w") + print("{\"port-mirror-configurations\":", file=f, end="") + print("{\"port-mirror-configuration\":[", file=f, end="") + json.dump(port_mirror, f) + else: + lineno = lineno+1 + print(",",file=f, end="") + json.dump(port_mirror, f) + if f != None: + print("]}}", file=f) + f.flush() + f.close() + print("Split "+str(len(data["GENERIC-RESOURCE-API:port-mirror-configurations"]["port-mirror-configuration"]))+" port-mirror-configuration into "+str(chunk)+" chunks") + +if "GENERIC-RESOURCE-API:preload-information" in data: + chunk = 0 + lineno = chunk_size + f = None + for preload in data["GENERIC-RESOURCE-API:preload-information"]["preload-list"]: + if lineno >= chunk_size: + chunk = chunk+1 + lineno = 0 + if f != None: + print ("]}}", file=f) + f.flush() + f.close() + outfile = os.environ["TMPDIR"] + "/config_gra_preloads_"+str(chunk).zfill(3)+".json" + f = open(outfile, "w") + print("{\"preload-information\":", file=f, end="") + print("{\"preload-list\":[", file=f, end="") + json.dump(preload, f) + else: + lineno = lineno+1 + print(",",file=f, end="") + json.dump(preload, f) + if f != None: + print("]}}", file=f) + f.flush() + f.close() + print ("Split "+str(len(data["GENERIC-RESOURCE-API:preload-information"]["preload-list"]))+" preloads into "+str(chunk)+" chunks")' + +first=true + +if [ $(ls -1 $TMPDIR/config_gra_services_*.json 2>/dev/null | wc -l) -gt 0 ] +then + echo "Transferring services data ..." + for file in $(ls $TMPDIR/config_gra_services_*.json) + do + echo "Transferring file $file ..." + curl ${CURLFLAGS} --fail -k -u${ODL_USER}:${ODL_PASSWORD} -H "Content-Type: application/json" -X PUT -d@$file ${url}/restconf/config/GENERIC-RESOURCE-API:services/ + done +fi + +if [ $(ls -1 $TMPDIR/config_gra_contrail_*.json 2>/dev/null | wc -l) -gt 0 ] +then + echo "Transferring contrail data ..." + for file in $(ls $TMPDIR/config_gra_contrail_*.json) + do + echo "Transferring file $file ..." + curl ${CURLFLAGS} --fail -k -u${ODL_USER}:${ODL_PASSWORD} -H "Content-Type: application/json" -X PUT -d@$file ${url}/restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/ + done +fi + +if [ $(ls -1 $TMPDIR/config_gra_port_mirror_*.json 2>/dev/null | wc -l) -gt 0 ] +then + echo "Transferring port mirror data ..." + for file in $(ls $TMPDIR/config_gra_port_mirror_*.json) + do + echo "Transferring file $file ..." + curl ${CURLFLAGS} --fail -k -u${ODL_USER}:${ODL_PASSWORD} -H "Content-Type: application/json" -X PUT -d@$file ${url}/restconf/config/GENERIC-RESOURCE-API:port-mirror-configurations/ + done +fi + +if [ $(ls -1 $TMPDIR/config_gra_preloads_*.json 2>/dev/null | wc -l) -gt 0 ] +then + echo "Transferring preload data ..." + first=true + for file in $(ls $TMPDIR/config_gra_preloads_*.json) + do + echo "Transferring file $file ..." + curl ${CURLFLAGS} --fail -k -u${ODL_USER}:${ODL_PASSWORD} -H "Content-Type: application/json" -X PUT -d@$file ${url}/restconf/config/GENERIC-RESOURCE-API:preload-information/ + done +fi + +rm -rf $TMPDIR +echo "Done!"
\ No newline at end of file diff --git a/ms/gra/gra-docker/src/main/templates/contrail-route-allotted-resource.json b/ms/gra/gra-docker/src/main/templates/contrail-route-allotted-resource.json new file mode 100644 index 0000000..f5d862d --- /dev/null +++ b/ms/gra/gra-docker/src/main/templates/contrail-route-allotted-resource.json @@ -0,0 +1,102 @@ +{ + "contrail-route-allotted-resource": { + "allotted-resource-id": ${ar.allotted-resource-id}, + "allotted-resource-data": { + "contrail-route-topology": { + "allotted-resource-identifiers": { + "consuming-service-instance-id": ${ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.consuming-service-instance-id}, + "allotted-resource-name": ${ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.allotted-resource-name}, + "allotted-resource-id": ${ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.allotted-resource-id}, + "parent-service-instance-id": ${ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.parent-service-instance-id}, + "allotted-resource-type": ${ar.allotted-resource-data.contrail-route-topology.allotted-resource-identifiers.allotted-resource-type} + }, + "onap-model-information": { + "model-invariant-uuid": ${ar.allotted-resource-data.contrail-route-topology.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${ar.allotted-resource-data.contrail-route-topology.onap-model-information.model-customization-uuid}, + "model-uuid": ${ar.allotted-resource-data.contrail-route-topology.onap-model-information.model-uuid}, + "model-version": ${ar.allotted-resource-data.contrail-route-topology.onap-model-information.model-version} + }, + "contrail-route-assignments": { + "fq-name": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.fq-name}, + "contrail-id": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-id}, + "vlan-tag": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.vlan-tag}, + "source-network": { + "network-id": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-id}, + "network-role": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.source-network.network-role} + }, + "dest-network": { + "network-id": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-id}, + "network-role": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.dest-network.network-role} + }, + "contrail-applied-service": { + "service-instance-id": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.service-instance-id}, + "vnf-id": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.vnf-id}, + "contrail-fqdn": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-assignments.contrail-applied-service.contrail-fqdn} + } + }, + "contrail-route-parameters": { + "param" : [ + ${repeat:ar.allotted-resource-data.contrail-route-topology.contrail-route-parameters_length: + { + "name": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-parameters[${1}].name}, + "value": ${ar.allotted-resource-data.contrail-route-topology.contrail-route-parameters[${1}].value} + } + } + ] + } + }, + "allotted-resource-operation-information": { + "allotted-resource-information": { + "allotted-resource-id": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.allotted-resource-id}, + "allotted-resource-type": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.allotted-resource-type}, + "parent-service-instance-id": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.parent-service-instance-id}, + "onap-model-information": { + "model-invariant-uuid": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-customization-uuid}, + "model-uuid": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-uuid}, + "model-version": ${ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-version} + } + }, + "sdnc-request-header": { + "svc-request-id": ${ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id}, + "svc-action": ${ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-action} + }, + "request-information": { + "request-id": ${ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-id}, + "source": ${ar.allotted-resource-data.allotted-resource-operation-information.request-information.source}, + "order-version": ${ar.allotted-resource-data.allotted-resource-operation-information.request-information.order-version}, + "order-number": ${ar.allotted-resource-data.allotted-resource-operation-information.request-information.order-number}, + "notification-url": ${ar.allotted-resource-data.allotted-resource-operation-information.request-information.notification-url}, + "request-action": ${ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action} + }, + "contrail-route-request-input": { + "source-network": { + "network-id": ${ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.source-network.network-id}, + "network-role": ${ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.source-network.network-role} + }, + "dest-network": { + "network-id": ${ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.dest-network.network-id}, + "network-role": ${ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.dest-network.network-role} + }, + "contrail-applied-service-info": { + "service-instance-id" : ${ar.allotted-resource-data.allotted-resource-operation-information.contrail-route-request-input.contrail-applied-service-info.service-instance-id} + } + } + }, + "allotted-resource-oper-status": { + "last-action": ${ar.allotted-resource-data.allotted-resource-oper-status.last-action}, + "modify-timestamp": ${ar.allotted-resource-data.allotted-resource-oper-status.modify-timestamp}, + "last-order-status": ${ar.allotted-resource-data.allotted-resource-oper-status.last-order-status}, + "create-timestamp": ${ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp}, + "order-status": ${ar.allotted-resource-data.allotted-resource-oper-status.order-status}, + "last-rpc-action": ${ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action}, + "last-svc-request-id": ${ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id} + } + }, + "allotted-resource-status" : { + "action": ${ar.allotted-resource-status.action}, + "rpc-name": ${ar.allotted-resource-status.rpc-name}, + "rpc-action": ${ar.allotted-resource-status.rpc-action} + } + } +} diff --git a/ms/gra/gra-docker/src/main/templates/csm-service-instance.json b/ms/gra/gra-docker/src/main/templates/csm-service-instance.json new file mode 100644 index 0000000..0df0df4 --- /dev/null +++ b/ms/gra/gra-docker/src/main/templates/csm-service-instance.json @@ -0,0 +1,15 @@ +{ + "service": { + "service-instance-id": ${tmp.service-instance-id}, + "service-data": { + "service-information": { + "global-customer-id": ${output-global-customer-id} + }, + "service-topology": { + "service-topology-identifier": { + "service-type": ${output-service-type} + } + } + } + } +} diff --git a/ms/gra/gra-docker/src/main/templates/network-instance-group-network.json b/ms/gra/gra-docker/src/main/templates/network-instance-group-network.json new file mode 100644 index 0000000..ed44a04 --- /dev/null +++ b/ms/gra/gra-docker/src/main/templates/network-instance-group-network.json @@ -0,0 +1,27 @@ +{
+ "network": {
+ "network-id": ${mdsal-nign.network[0].network-id},
+ "vpn-bindings": [
+ ${repeat:mdsal-nign.network[0].vpn-bindings_length:
+ {
+ "vpn-binding-id": ${mdsal-nign.network[0].vpn-bindings[${1}].vpn-binding-id},
+ "vpn-name": ${mdsal-nign.network[0].vpn-bindings[${1}].vpn-name},
+ "global-route-target": ${mdsal-nign.network[0].vpn-bindings[${1}].global-route-target},
+ "route-target-role": ${mdsal-nign.network[0].vpn-bindings[${1}].route-target-role},
+ "aic-zone": ${mdsal-nign.network[0].vpn-bindings[${1}].aic-zone}
+ }
+ }
+ ],
+ "vlan-tag-id": ${mdsal-nign.network[0].vlan-tag-id},
+ "network-status": ${mdsal-nign.network[0].network-status},
+ "customer-bonding-requests": {
+ "customer-bonding-request": [
+ ${repeat:mdsal-nign.network[0].customer-bonding-requests.customer-bonding-request_length:
+ {
+ "configuration-id": ${mdsal-nign.network[0].customer-bonding-requests.customer-bonding-request[${1}].configuration-id}
+ },
+ }
+ ]
+ }
+ }
+}
diff --git a/ms/gra/gra-docker/src/main/templates/network-level-oper-status.json b/ms/gra/gra-docker/src/main/templates/network-level-oper-status.json new file mode 100644 index 0000000..b38a17b --- /dev/null +++ b/ms/gra/gra-docker/src/main/templates/network-level-oper-status.json @@ -0,0 +1,11 @@ +{ + "oper-status": { + "order-status": ${network-level-oper-status.order-status}, + "last-rpc-action": ${network-level-oper-status.last-rpc-action}, + "last-action": ${network-level-oper-status.last-action}, + "last-svc-request-id": ${network-level-oper-status.last-svc-request-id}, + "last-order-status": ${network-level-oper-status.last-order-status}, + "create-timestamp": ${network-level-oper-status.create-timestamp}, + "modify-timestamp": ${network-level-oper-status.modify-timestamp} + } +} diff --git a/ms/gra/gra-docker/src/main/templates/network.json b/ms/gra/gra-docker/src/main/templates/network.json new file mode 100644 index 0000000..88d79e5 --- /dev/null +++ b/ms/gra/gra-docker/src/main/templates/network.json @@ -0,0 +1,145 @@ +{ + "network": { + "network-id": ${network-data.network-information.network-id}, + "network-data": { + "network-provided-allotted-resources": { + "network-provided-ar-id": [ +${repeat:network-data.network-provided-allotted-resources.network-provided-ar-id_length: + ${network-data.network-provided-allotted-resources.network-provided-ar-id[${1}]}, +} + ] + }, + "network-level-oper-status": { + "order-status": ${network-data.network-level-oper-status.order-status}, + "last-rpc-action": ${network-data.network-level-oper-status.last-rpc-action}, + "last-action": ${network-data.network-level-oper-status.last-action}, + "last-svc-request-id": ${network-data.network-level-oper-status.last-svc-request-id}, + "last-order-status": ${network-data.network-level-oper-status.last-order-status}, + "create-timestamp": ${network-data.network-level-oper-status.create-timestamp}, + "modify-timestamp": ${network-data.network-level-oper-status.modify-timestamp} + }, + "sdnc-request-header": { + "svc-request-id": ${network-data.sdnc-request-header.svc-request-id}, + "svc-action": ${network-data.sdnc-request-header.svc-action}, + "svc-notification-url": ${network-data.sdnc-request-header.svc-notification-url} + }, + "request-information": { + "request-id": ${network-data.request-information.request-id}, + "request-action": ${network-data.request-information.request-action}, + "source": ${network-data.request-information.source}, + "notification-url": ${network-data.request-information.notification-url}, + "order-number": ${network-data.request-information.order-number}, + "order-version": ${network-data.request-information.order-version} + }, + "network-request-input": { + "network-name": ${network-data.network-request-input.network-name}, + "network-input-parameters": { + "param": [ +${repeat:network-data.network-request.network-input-parameters.param_length: + { + "name": ${network-data.network-request-inputnetwork-input-parameters.param[${1}].name}, + "value": ${network-data.network-request-inputnetwork-input-parameters.param[${1}].value}, + "resource-resolution-data": { + "resource-key": [ +${repeat:network-data.network-request.network-input-parameters.param[${1}].resource-resolution-data.resource_key_length: + { + "name": ${network-data.network-request.network-input-parameters.param[${1}].resource-resolution-data.resource_key[${2}].name}, + "value": ${network-data.network-request.network-input-parameters.param[${1}].resource-resolution-data.resource_key[${2}].value} + } +} + ], + "status": ${network-data.network-request-inputnetwork-input-parameters.param[${1}].status}, + "capability-name": ${network-data.network-request-inputnetwork-input-parameters.param[${1}].capability-name} + } + }, +} + ] + }, + "network-instance-group-id": ${network-data.network-request-input.network-instance-group-id}, + "tenant": ${network-data.network-request-input.tenant}, + "aic-cloud-region": ${network-data.network-request-input.aic-cloud-region}, + "cloud-owner": ${network-data.network-request-input.cloud-owner}, + "aic-clli": ${network-data.network-request-input.aic-clli} + }, + "network-information": { + "network-id": ${network-data.network-information.network-id}, + "network-type": ${network-data.network-information.network-type}, + "network-technology": ${network-data.network-information.network-technology}, + "from-preload": ${network-data.network-information.from-preload}, + "onap-model-information": { + "model-invariant-uuid": ${network-data.network-topology.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${network-data.network-topology.onap-model-information.model-customization-uuid}, + "model-uuid": ${network-data.network-topology.onap-model-information.model-uuid}, + "model-version": ${network-data.network-topology.onap-model-information.model-version}, + "model-name": ${network-data.network-topology.onap-model-information.model-name} + } + }, + "service-information": { + "service-id": ${network-data.service-information.service-id}, + "subscription-service-type": ${network-data.service-information.subscription-service-type}, + "service-instance-id": ${network-data.service-information.service-instance-id}, + "global-customer-id": ${network-data.service-information.global-customer-id}, + "subscriber-name": ${network-data.service-information.subscriber-name}, + "onap-model-information": { + "model-invariant-uuid": ${network-data.service-information.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${network-data.onap-model-information.model-customization-uuid}, + "model-uuid": ${network-data.onap-model-information.model-uuid}, + "model-version": ${network-data.onap-model-information.model-version}, + "model-name": ${network-data.onap-model-information.model-name} + } + }, + "network-topology": { + "tenant": ${network-data.network-topology.tenant}, + "aic-cloud-region": ${network-data.network-topology.aic-cloud-region}, + "cloud-owner": ${network-data.network-topology.cloud-owner}, + "aic-clli": ${network-data.network-topology.aic-clli}, + "network-parameters": { + "network-parameter": [ +${repeat:network-data.network-topology.network-parameters.network-parameter_length: + { + "network-parameter-name": ${network-data.network-topology.network-parameters.network-parameter[${1}].network-parameter-name}, + "network-parameter-value": ${network-data.network-topology.network-parameters.network-parameter[${1}].network-parameter-value} + }, +} + ] + }, + "onap-model-information": { + "model-invariant-uuid": ${network-data.network-topology.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${network-data.network-topology.onap-model-information.model-customization-uuid}, + "model-uuid": ${network-data.network-topology.onap-model-information.model-uuid}, + "model-version": ${network-data.network-topology.onap-model-information.model-version}, + "model-name": ${network-data.network-topology.onap-model-information.model-name} + }, + "network-assignments": {}, + "network-topology-identifier-structure": { + "network-id": ${network-data.network-topology.network-topology-identifier-structure.network-id}, + "network-name": ${network-data.network-topology.network-topology-identifier-structure.network-name}, + "network-role": ${network-data.network-topology.network-topology-identifier-structure.network-role}, + "network-type": ${network-data.network-topology.network-topology-identifier-structure.network-type}, + "network-instance-group-id": ${network-data.network-topology.network-topology-identifier-structure.network-instance-group-id}, + "network-technology": ${network-data.network-topology.network-topology-identifier-structure.network-technology}, + "eipam-v4-address-plan": ${network-data.network-topology.network-topology-identifier-structure.eipam-v4-address-plan}, + "eipam-v6-address-plan": ${network-data.network-topology.network-topology-identifier-structure.eipam-v6-address-plan}, + "is-trunked": ${network-data.network-topology.network-topology-identifier-structure.is-trunked}, + "segmentation-id": ${network-data.network-topology.network-topology-identifier-structure.segmentation-id}, + "related-networks": { + "related-network": [ +${repeat:network-data.network-topology.network-topology-identifier-structure.related-networks.related-network_length: + { + "network-id": ${network-data.network-topology.network-topology-identifier-structure.related-networks.related-network[${1}].network-id}, + "network-role": ${network-data.network-topology.network-topology-identifier-structure.related-networks.related-network[${1}].network-role}, + "vlan-tags": { + "vlan-interface": ${network-data.network-topology.network-topology-identifier-structure.related-networks.related-network[${1}].vlan-tags.vlan-interface}, + "upper-tag-id": ${network-data.network-topology.network-topology-identifier-structure.related-networks.related-network[${1}].vlan-tags.upper-tag-id}, + "lower-tag-id": ${network-data.network-topology.network-topology-identifier-structure.related-networks.related-network[${1}].vlan-tags.lower-tag-id}, + "is-private": ${network-data.network-topology.network-topology-identifier-structure.related-networks.related-network[${1}].vlan-tags.is-private} + } + }, +} + ] + } + } + } + } + } +} diff --git a/ms/gra/gra-docker/src/main/templates/port-mirror-configuration.json b/ms/gra/gra-docker/src/main/templates/port-mirror-configuration.json new file mode 100644 index 0000000..f18d191 --- /dev/null +++ b/ms/gra/gra-docker/src/main/templates/port-mirror-configuration.json @@ -0,0 +1,152 @@ +{ + "port-mirror-configuration": { + "configuration-id": ${pm.configuration-id}, + "configuration-data": { + "configuration-operation-information": { + "sdnc-request-header": { + "svc-request-id": ${pm.configuration-data.configuration-operation-information.sdnc-request-header.svc-request-id}, + "svc-action": ${pm.configuration-data.configuration-operation-information.sdnc-request-header.svc-action}, + "svc-notification-url": ${pm.configuration-data.configuration-operation-information.sdnc-request-header.svc-notification-url} + }, + "request-information": { + "request-id": ${pm.configuration-data.configuration-operation-information.request-information.request-id}, + "request-action": ${pm.configuration-data.configuration-operation-information.request-information.request-action}, + "source": ${pm.configuration-data.configuration-operation-information.request-information.source}, + "notification-url": ${pm.configuration-data.configuration-operation-information.request-information.notification-url}, + "order-number": ${pm.configuration-data.configuration-operation-information.request-information.order-number}, + "order-version": ${pm.configuration-data.configuration-operation-information.request-information.order-version} + }, + "service-information": { + "service-id": ${pm.configuration-data.configuration-operation-information.service-information.service-id}, + "subscription-service-type": ${pm.configuration-data.configuration-operation-information.service-information.subscription-service-type}, + "onap-model-information": { + "model-invariant-uuid": ${pm.configuration-data.configuration-operation-information.service-information.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${pm.configuration-data.configuration-operation-information.service-information.onap-model-information.model-customization-uuid}, + "model-uuid": ${pm.configuration-data.configuration-operation-information.service-information.onap-model-information.model-uuid}, + "model-version": ${pm.configuration-data.configuration-operation-information.service-information.onap-model-information.model-version}, + "model-name": ${pm.configuration-data.configuration-operation-information.service-information.onap-model-information.model-name} + }, + "service-instance-id": ${pm.configuration-data.configuration-operation-information.service-information.service-instance-id}, + "global-customer-id": ${pm.configuration-data.configuration-operation-information.service-information.global-customer-id}, + "subscriber-name": ${pm.configuration-data.configuration-operation-information.service-information.subscriber-name} + }, + "configuration-information": { + "configuration-id": ${pm.configuration-data.configuration-operation-information.configuration-information.configuration-id}, + "configuration-type": ${pm.configuration-data.configuration-operation-information.configuration-information.configuration-type}, + "configuration-sub-type": ${pm.configuration-data.configuration-operation-information.configuration-information.configuration-sub-type}, + "onap-model-information": { + "model-invariant-uuid": ${pm.configuration-data.configuration-operation-information.configuration-information.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${pm.configuration-data.configuration-operation-information.configuration-information.onap-model-information.model-customization-uuid}, + "model-uuid": ${pm.configuration-data.configuration-operation-information.configuration-information.onap-model-information.model-uuid}, + "model-version": ${pm.configuration-data.configuration-operation-information.configuration-information.onap-model-information.model-version}, + "model-name": ${pm.configuration-data.configuration-operation-information.configuration-information.onap-model-information.model-name} + } + }, + "port-mirror-configuration-request-input": { + "source-port": { + "sevice-instance-id": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.source-port.service-instance-id}, + "vnf-information": { + "vnf-id": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.source-port.vnf-information.vnf-id}, + "vnf-type": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.source-port.vnf-information.vnf-type} + } + }, + "dest-port": { + "sevice-instance-id": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.dest-port.service-instance-id}, + "vnf-information": { + "vnf-id": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.dest-port.vnf-information.vnf-id}, + "vnf-type": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.dest-port.vnf-information.vnf-type} + }, + "pnf-information": { + "pnf-name": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.dest-port.pnf-information.pnf-name}, + "pnf-type": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.dest-port.pnf-information.pnf-type} + } + }, + "tenant": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.tenant}, + "aic-cloud-region": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.aic-cloud-region}, + "aic-clli": ${pm.configuration-data.configuration-operation-information.port-mirror-configuration-request-input.aic-clli} + } + }, + "port-mirror-configuration-topology": { + "configuration-identifiers": { + "configuration-id": ${pm.configuration-data.port-mirror-configuration-topology.configuration-identifiers.configuration-id}, + "configuration-name": ${pm.configuration-data.port-mirror-configuration-topology.configuration-identifiers.configuration-name}, + "configuration-type": ${pm.configuration-data.port-mirror-configuration-topology.configuration-identifiers.configuration-type}, + "configuration-sub-type": ${pm.configuration-data.port-mirror-configuration-topology.configuration-identifiers.configuration-sub-type}, + "parent-service-instance-id": ${pm.configuration-data.port-mirror-configuration-topology.configuration-identifiers.parent-service-instance-id} + }, + "onap-model-information": { + "model-invariant-uuid": ${pm.configuration-data.port-mirror-configuration-topology.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${pm.configuration-data.port-mirror-configuration-topology.onap-model-information.model-customization-uuid}, + "model-uuid": ${pm.configuration-data.port-mirror-configuration-topology.onap-model-information.model-uuid}, + "model-version" ${pm.configuration-data.port-mirror-configuration-topology.onap-model-information.model-version}, + "model-name": ${pm.configuration-data.port-mirror-configuration-topology.onap-model-information.model-name} + }, + "port-mirror-configuration-assignments": { + "vnics-group-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.vnics-group-id}, + "owning-entity": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.owning-entity}, + "tenant-context": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.tenant-context}, + "tenant": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.tenant}, + "tenant-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.tenant-id}, + "cloud-region-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.cloud-region-id}, + "cloud-owner": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.cloud-owner}, + "dest-network-fqdn": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-network-fqdn}, + "source-network-fqdn": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-network-fqdn}, + "source-capacity": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-capacity}, + "source-vnf-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-vnf-id}, + "dest-vnf-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-vnf-id}, + "dest-pnf-name": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-pnf-name}, + "dest-p-interface": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-p-interface}, + "dest-pnf-port-policy-name": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-pnf-port-policy-name}, + "probe-type": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.probe-type}, + "route-allotted-resource-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.route-allotted-resource-id}, + "source-vnfc-instance-group-id": { + "service-instance-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-vnfc-instance-group-id.service-instance-id}, + "nfc-function": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-vnfc-instance-group-id.nfc-function}, + "instance-group-role": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-vnfc-instance-group-id.instance-group-role}, + "configuration-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-vnfc-instance-group-id.configuration-id} + }, + "dest-vnfc-instance-group-id": { + "service-instance-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-vnfc-instance-group-id.service-instance-id}, + "nfc-function": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-vnfc-instance-group-id.nfc-function}, + "instance-group-role": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.dest-vnfc-instance-group-id.instance-group-role}, + "configuration-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-vnfc-instance-group-id.configuration-id} + }, + "source-to-dest-maps": { + "source-to-dest-map": [ + ${repeat:pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map_length: + { + "source-port-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].source-port-id}, + "source-port-name": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].source-port-name}, + "dest-port-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-port-id}, + "dest-port-name": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-port-name}, + "link-name": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].link-name}, + "source-vserver-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].source-vserver-id}, + "dest-vserver-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-vserver-id}, + "dest-ip-addresses": { + "ip-addresses": { + "ipv4-address": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-ip-addresses.ip-addresses.ipv4-address}, + "ipv6-address": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-ip-addresses.ip-addresses.ipv6-address}, + "vipv4-address": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-ip-addresses.ip-addresses.vipv4-address}, + "vipv6-address": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.source-to-dest-maps.source-to-dest-map[${1}].dest-ip-addresses.ip-addresses.vipv6-address} + } + } + }, + } + ] + }, + "port-mirror-configuration-instance-id": ${pm.configuration-data.port-mirror-configuration-topology.port-mirror-configuration-assignments.port-mirror-configuration-instance-id} + } + }, + "configuration-oper-status": { + "order-status": ${pm.configuration-data.configuration-oper-status.order-status}, + "last-rpc-action": ${pm.configuration-data.configuration-oper-status.last-rpc-action}, + "last-action": ${pm.configuration-data.configuration-oper-status.last-action}, + "last-svc-request-id": ${pm.configuration-data.configuration-oper-status.last-svc-request-id}, + "last-order-status": ${pm.configuration-data.configuration-oper-status.last-order-status}, + "create-timestamp": ${pm.configuration-data.configuration-oper-status.create-timestamp}, + "modify-timestamp": ${pm.configuration-data.configuration-oper-status.modify-timestamp} + } + } + } +} + diff --git a/ms/gra/gra-docker/src/main/templates/security-zone-allotted-resource.json b/ms/gra/gra-docker/src/main/templates/security-zone-allotted-resource.json new file mode 100644 index 0000000..afbd0bb --- /dev/null +++ b/ms/gra/gra-docker/src/main/templates/security-zone-allotted-resource.json @@ -0,0 +1,78 @@ +{ + "security-zone-allotted-resource": { + "allotted-resource-id": ${sz-ar.allotted-resource-id}, + "allotted-resource-data": { + "security-zone-topology": { + "allotted-resource-identifiers": { + "consuming-service-instance-id": ${sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.consuming-service-instance-id}, + "allotted-resource-name": ${sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.allotted-resource-name}, + "allotted-resource-id": ${sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.allotted-resource-id}, + "parent-service-instance-id": ${sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.parent-service-instance-id}, + "allotted-resource-type": ${sz-ar.allotted-resource-data.security-zone-topology.allotted-resource-identifiers.allotted-resource-type} + }, + "onap-model-information": { + "model-invariant-uuid": ${sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-customization-uuid}, + "model-uuid": ${sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-uuid}, + "model-version": ${sz-ar.allotted-resource-data.security-zone-topology.onap-model-information.model-version} + }, + "security-zone-assignments": { + "trusted-network-role": ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.trusted-network-role}, + "security-zone-name-trusted": ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-name-trusted}, + "security-zone-name-untrusted": ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-name-untrusted}, + "untrusted-network-role": ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.untrusted-network-role}, + "security-zone-service-instance-id" : ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-service-instance-id}, + "security-zone-vnf-id" : ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.security-zone-vnf-id}, + "vlan-tag": ${sz-ar.allotted-resource-data.security-zone-topology.security-zone-assignments.vlan-tag} + }, + "security-zone-parameters": { + } + + }, + "allotted-resource-operation-information": { + "allotted-resource-information": { + "allotted-resource-id": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.allotted-resource-id}, + "allotted-resource-type": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.allotted-resource-type}, + "parent-service-instance-id": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.parent-service-instance-id}, + "onap-model-information": { + "model-invariant-uuid": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-customization-uuid}, + "model-uuid": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-uuid}, + "model-version": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.allotted-resource-information.onap-model-information.model-version} + } + }, + "sdnc-request-header": { + "svc-request-id": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-request-id}, + "svc-action": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.sdnc-request-header.svc-action} + }, + "request-information": { + "request-id": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-id}, + "source": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.source}, + "order-version": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.order-version}, + "order-number": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.order-number}, + "notification-url": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.notification-url}, + "request-action": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.request-information.request-action} + }, + "security-zone-request-input": { + "vlan-tag": ${sz-ar.allotted-resource-data.allotted-resource-operation-information.security-zone-request-input.vlan-tag}, + "trusted-network-role" : ${sz-ar.allotted-resource-data.allotted-resource-operation-information.security-zone-request-input.trusted-network-role}, + "untrusted-network-role" : ${sz-ar.allotted-resource-data.allotted-resource-operation-information.security-zone-request-input.untrusted-network-role} + } + }, + "allotted-resource-oper-status": { + "last-action": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.last-action}, + "modify-timestamp": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.modify-timestamp}, + "last-order-status": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.last-order-status}, + "create-timestamp": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.create-timestamp}, + "order-status": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.order-status}, + "last-rpc-action": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.last-rpc-action}, + "last-svc-request-id": ${sz-ar.allotted-resource-data.allotted-resource-oper-status.last-svc-request-id} + } + }, + "allotted-resource-status" : { + "action": ${sz-ar.allotted-resource-status.action}, + "rpc-name": ${sz-ar.allotted-resource-status.rpc-name}, + "rpc-action": ${sz-ar.allotted-resource-status.rpc-action} + } + } +} diff --git a/ms/gra/gra-docker/src/main/templates/vf-module-assign.json b/ms/gra/gra-docker/src/main/templates/vf-module-assign.json new file mode 100644 index 0000000..ed2e4f0 --- /dev/null +++ b/ms/gra/gra-docker/src/main/templates/vf-module-assign.json @@ -0,0 +1,279 @@ +{ + "vf-module": { + "vf-module-id": ${vf-module-topology-operation-input.vf-module-information.vf-module-id}, + "vf-module-data": { + "sdnc-request-header": { + "svc-request-id": ${vf-module-data.sdnc-request-header.svc-request-id}, + "svc-action": ${vf-module-data.sdnc-request-header.svc-action}, + "svc-notification-url": ${vf-module-data.sdnc-request-header.svc-notification-url} + }, + "request-information": { + "request-id": ${vf-module-data.request-information.request-id}, + "request-action": ${vf-module-data.request-information.request-action}, + "source": ${vf-module-data.request-information.source}, + "notification-url": ${vf-module-data.request-information.notification-url}, + "order-number": ${vf-module-data.request-information.order-number}, + "order-version": ${vf-module-data.request-information.order-version} + }, + "service-information": { + "service-id": ${vf-module-data.service-information.service-id}, + "subscription-service-type": ${vf-module-data.service-information.subscription-service-type}, + "onap-model-information": { + "model-invariant-uuid": ${vf-module-data.service-information.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${vf-module-data.service-information.onap-model-information.model-customization-uuid}, + "model-uuid": ${vf-module-data.service-information.onap-model-information.model-uuid}, + "model-version": ${vf-module-data.service-information.onap-model-information.model-version}, + "model-name": ${vf-module-data.service-information.onap-model-information.model-name} + }, + "service-instance-id": ${vf-module-data.service-information.service-instance-id}, + "global-customer-id": ${vf-module-data.service-information.global-customer-id}, + "subscriber-name": ${vf-module-data.service-information.subscriber-name} + }, + "vnf-information": { + "vnf-id": ${vf-module-data.vnf-information.vnf-id}, + "vnf-type": ${vf-module-data.vnf-information.vnf-type}, + "vnf-name": ${vf-module-data.vnf-information.vnf-name}, + "onap-model-information": { + "model-invariant-uuid": ${vf-module-data.vnf-information.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${vf-module-data.vnf-information.onap-model-information.model-customization-uuid}, + "model-uuid": ${vf-module-data.vnf-information.onap-model-information.model-uuid}, + "model-version": ${vf-module-data.vnf-information.onap-model-information.model-version}, + "model-name": ${vf-module-data.vnf-information.onap-model-information.model-name} + } + }, + "vf-module-information": { + "vf-module-id": ${vf-module-data.vf-module-information.vf-module-id}, + "vf-module-type": ${vf-module-data.vf-module-information.vf-module-type}, + "from-preload": ${vf-module-data.vf-module-information.from-preload}, + "onap-model-information": { + "model-invariant-uuid": ${vf-module-data.vf-module-information.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${vf-module-data.vf-module-information.onap-model-information.model-customization-uuid}, + "model-uuid": ${vf-module-data.vf-module-information.onap-model-information.model-uuid}, + "model-version": ${vf-module-data.vf-module-information.onap-model-information.model-version}, + "model-name": ${vf-module-data.vf-module-information.onap-model-information.model-name} + } + }, + "vf-module-request-input": { + "request-version": ${vf-module-data.vf-module-request-input.request-version}, + "vf-module-name": ${vf-module-data.vf-module-request-input.vf-module-name}, + "tenant": ${vf-module-data.vf-module-request-input.tenant}, + "aic-cloud-region": ${vf-module-data.vf-module-request-input.aic-cloud-region}, + "aic-clli": ${vf-module-data.vf-module-request-input.aic-clli}, + "vf-module-input-parameters": { + "param": [ +${repeat:vf-module-data.vf-module-request-input.vf-module-input-parameters.param_length: + { + "name": ${vf-module-data.vf-module-request-input.vf-module-input-parameters.param[${1}].name}, + "value": ${vf-module-data.vf-module-request-input.vf-module-input-parameters.param[${1}].value} + }, +} + ] + } + }, + "vf-module-topology": { + "vf-module-topology-identifier": { + "vf-module-id": ${vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-id}, + "vf-module-name": ${vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-name}, + "vf-module-type": ${vf-module-data.vf-module-topology.vf-module-topology-identifier.vf-module-type} + }, + "tenant": ${vf-module-data.vf-module-topology.tenant}, + "aic-cloud-region": ${vf-module-data.vf-module-topology.aic-cloud-region}, + "cloud-owner": ${vf-module-data.vf-module-topology.cloud-owner}, + "aic-clli": ${vf-module-data.vf-module-topology.aic-clli}, + "onap-model-information": { + "model-invariant-uuid": ${vf-module-data.vf-module-topology.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${vf-module-data.vf-module-topology.onap-model-information.model-customization-uuid}, + "model-uuid": ${vf-module-data.vf-module-topology.onap-model-information.model-uuid}, + "model-version": ${vf-module-data.vf-module-topology.onap-model-information.model-version}, + "model-name": ${vf-module-data.vf-module-topology.onap-model-information.model-name} + }, + "vf-module-assignments": { + "vf-module-status": ${vf-module-data.vf-module-topology.vf-module-assignments.vf-module-status}, + "vms": { + "vm": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm_length: + { + "vm-type": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-type}, + "onap-model-information": { + "model-invariant-uuid": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].onap-model-information.model-customization-uuid}, + "model-uuid": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].onap-model-information.model-uuid}, + "model-version": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].onap-model-information.model-version}, + "model-name": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].onap-model-information.model-name} + }, + "nfc-naming-code": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].nfc-naming-code}, + "vm-type-tag": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-type-tag}, + "vm-count": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-count}, + "vm-names": { + "vm-name": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vm-name_length: + ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vm-name[${2}]}, +} + ], + "vnfc-names": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names_length: + { + "vnfc-name": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-name}, + "vnfc-networks": { + "vnfc-network-data": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data_length: + { + "vnfc-network-role": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-network-role}, + "vnfc-type": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-type}, + "connection-point": { + "connection-point-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.connection-point-id}, + "port-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.port-id}, + "vlan-data": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.vlan-data_length: + { + "vlan-uuid": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.vlan-data[${4}].vlan-uuid}, + "vlan-tag-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.vlan-data[${4}].vlan-tag-id}, + "vlan-tag-description": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.vlan-data[${4}].vlan-tag-description}, + "vlan-role": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].connection-point.vlan-data[${4}].vlan-role} + }, +} + ] + }, + "vnfc-subnet": { + "vnfc-subnet-role": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-subnet-role}, + "vnfc-ip-assignments": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments_length: + { + "vnfc-address-family": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-ip-assignments}, + "vnfc-subnet-dhcp": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-subnet-dhcp}, + "vnfc-subnet-ip-count": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-subnet-ip-count}, + "vnfc-subnet-ip": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-subnet-ip_length: + { + "vnfc-ip-address": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-subnet-ip[${5}].vnfc-ip-address}, + "vnfc-client-key": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-subnet-ip[${5}].vnfc-client-key}, + "ip-type": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-names.vnfc-names[${2}].vnfc-networks.vnfc-network-data[${3}].vnfc-subnet.vnfc-ip-assignments[${4}].vnfc-subnet-ip[${5}].ip-type} + } +} + ] + } +} + ] + } + }, +} + ] + } + }, +} + ] + }, + "vm-networks": { + "vm-network": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network_length: + { + "network-role": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-role}, + "network-role-tag": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-role-tag}, + "network-information-items": { + "network-information-item": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-information-items.network-information-item_length: + { + "ip-version": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-information-items.network-information-item[${3}].ip-version}, + "use-dhcp": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-information-items.network-information-item[${3}].use-dhcp}, + "ip-count": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-information-items.network-information-item[${3}].ip-count}, + "network-ips": { + "network-ip": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-information-items.network-information-item[${3}].network-ips.network-ip_length: + ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].network-information-items.network-information-item[${3}].network-ips.network-ip[${4}]}, +} + ] + } + }, +} + ] + }, + "mac-addresses": { + "mac-address": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].mac-addresses.mac-address_length: + ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].mac-addresses.mac-address[${3}]}, +} + ] + }, + "floating-ips": { + "floating-ip-v4": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].floating-ips.floating-ip-v4_length: + ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].floating-ips.floating-ip-v4[${3}]}, +} + ], + "floating-ip-v6": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].floating-ips.floating-ip-v6_length: + ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].floating-ips.floating-ip-v6[${3}]}, +} + ] + }, + "interface-route-prefixes": { + "interface-route-prefix": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].interface-route-prefixes.interface-route-prefix: + ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].interface-route-prefixes.interface-route-prefix[${3}]}, +} + ] + }, + "is-trunked": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].is-trunked}, + "segmentation-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].segmentation-id}, + "related-networks": { + "related-network": [ +${repeat:vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network_length: + { + "network-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network[${3}].network-id}, + "network-role": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network[${3}].network-role}, + "vlan-tags": { + "vlan-interface": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network[${3}].vlan-tags.vlan-interface}, + "upper-tag-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network[${3}].vlan-tags.upper-tag-id}, + "lower-tag-id": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network[${3}].vlan-tags.lower-tag-id}, + "is-private": ${vf-module-data.vf-module-topology.vf-module-assignments.vms.vm[${1}].vm-networks.vm-network[${2}].related-networks.related-network[${3}].vlan-tags.is-private} + } + }, +} + ] + } + }, +} + ] + } + }, +} + ] + } + }, + "vf-module-parameters": { + "param": [ +${repeat:vf-module-data.vf-module-topology.vf-module-parameters.param_length: + { + "name": ${vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].name}, + "value": ${vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].value}, + "resource-resolution-data": { + "resource-key": [ +${repeat:vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].resource-resolution-data.resource-key_length: + { + "name": ${vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].resource-resolution-data.resource-key[${2}].name}, + "value": ${vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].resource-resolution-data.resource-key[${2}].value} + }, +} + ], + "status": ${vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].resource-resolution-data.status}, + "capability-name": ${vf-module-data.vf-module-topology.vf-module-parameters.param[${1}].resource-resolution-data.capability-name} + }, + }, +} + ] + }, + "sdnc-generated-cloud-resources": ${vf-module-data.vf-module-topology.sdnc-generated-cloud-resources} + }, + "vf-module-level-oper-status": { + "order-status": ${vf-module-data.vf-module-level-oper-status.order-status}, + "last-rpc-action": ${vf-module-data.vf-module-level-oper-status.last-rpc-action}, + "last-action": ${vf-module-data.vf-module-level-oper-status.last-action}, + "last-svc-request-id": ${vf-module-data.vf-module-level-oper-status.last-svc-request-id}, + "last-order-status": ${vf-module-data.vf-module-level-oper-status.last-order-status}, + "create-timestamp": ${vf-module-data.vf-module-level-oper-status.create-timestamp}, + "modify-timestamp": ${vf-module-data.vf-module-level-oper-status.modify-timestamp} + } + } + } +} + diff --git a/ms/gra/gra-docker/src/main/templates/vnf-data-assign.json b/ms/gra/gra-docker/src/main/templates/vnf-data-assign.json new file mode 100644 index 0000000..a58c811 --- /dev/null +++ b/ms/gra/gra-docker/src/main/templates/vnf-data-assign.json @@ -0,0 +1,249 @@ +{ + "vnf": { + "vnf-id": ${vnf-topology-operation-input.vnf-information.vnf-id}, + "vnf-data": { + "sdnc-request-header": { + "svc-request-id": ${vnf-data.sdnc-request-header.svc-request-id}, + "svc-action": ${vnf-data.sdnc-request-header.svc-action}, + "svc-notification-url": ${vnf-data.sdnc-request-header.svc-notification-url} + }, + "request-information": { + "request-id": ${vnf-data.request-information.request-id}, + "request-action": ${vnf-data.request-information.request-action}, + "source": ${vnf-data.request-information.source}, + "notification-url": ${vnf-data.request-information.notification-url}, + "order-number": ${vnf-data.request-information.order-number}, + "order-version": ${vnf-data.request-information.order-version} + }, + "service-information": { + "service-id": ${vnf-data.service-information.service-id}, + "subscription-service-type": ${vnf-data.service-information.subscription-service-type}, + "onap-model-information": { + "model-invariant-uuid": ${vnf-data.service-information.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${vnf-data.service-information.onap-model-information.model-customization-uuid}, + "model-uuid": ${vnf-data.service-information.onap-model-information.model-uuid}, + "model-version": ${vnf-data.service-information.onap-model-information.model-version}, + "model-name": ${vnf-data.service-information.onap-model-information.model-name} + }, + "service-instance-id": ${vnf-data.service-information.service-instance-id}, + "global-customer-id": ${vnf-data.service-information.global-customer-id}, + "subscriber-name": ${vnf-data.service-information.subscriber-name} + }, + "vnf-information": { + "vnf-id": ${vnf-data.vnf-information.vnf-id}, + "vnf-type": ${vnf-data.vnf-information.vnf-type}, + "vnf-name": ${vnf-data.vnf-information.vnf-name}, + "onap-model-information": { + "model-invariant-uuid": ${vnf-data.vnf-information.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${vnf-data.vnf-information.onap-model-information.model-customization-uuid}, + "model-uuid": ${vnf-data.vnf-information.onap-model-information.model-uuid}, + "model-version": ${vnf-data.vnf-information.onap-model-information.model-version}, + "model-name": ${vnf-data.vnf-information.onap-model-information.model-name} + } + }, + "vnf-request-input": { + "request-version": ${vnf-data.vnf-request-input.request-version}, + "vnf-name": ${vnf-data.vnf-request-input.vnf-name}, + "tenant": ${vnf-data.vnf-request-input.tenant}, + "aic-cloud-region": ${vnf-data.vnf-request-input.aic-cloud-region}, + "cloud-owner": ${vnf-data.vnf-request-input.cloud-owner}, + "aic-clli": ${vnf-data.vnf-request-input.aic-clli}, + "vnf-networks": { + "vnf-network": [ +${repeat:vnf-data.vnf-request-input.vnf-networks.vnf-network_length: + { + "network-role": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].network-role}, + "network-name": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].network-name}, + "neutron-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].neutron-id}, + "network-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].network-id}, + "contrail-network-fqdn": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].contrail-network-fqdn}, + "subnets-data": { + "subnet-data": [ +${repeat:vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data_length: + { + "sdnc-subnet-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].sdnc-subnet-id}, + "subnet-role": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].subnet-role}, + "subnet-name": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].subnet-name}, + "ip-version": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].ip-version}, + "subnet-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].subnet-id}, + "dhcp-enabled": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].dhcp-enabled}, + "network-start-address": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].network-start-address}, + "gateway-address": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].gateway-address}, + "cidr-mask": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].cidr-mask} + }, +} + ] + }, + "is-trunked": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].is-trunked}, + "segmentation-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].segmentation-id}, + "related-networks": { + "related-network": [ +${repeat:vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network_length: + { + "network-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].network-id}, + "network-role": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].network-role}, + "vlan-tags": { + "vlan-interface": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.vlan-interface}, + "upper-tag-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.upper-tag-id}, + "lower-tag-id": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.lower-tag-id}, + "is-private": ${vnf-data.vnf-request-input.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.is-private} + } + }, +} + ] + }, + }, +} + ] + }, + "vnf-network-instance-group-ids": [ +${repeat:vnf-data.vnf-request-input.vnf-network-instance-group-ids_length: + { + "vnf-network-instance-group-id": ${vnf-data.vnf-request-input.vnf-network-instance-group-ids[${1}].vnf-network-instance-group-id} + }, +} + ], + "vnf-input-parameters": { + "param": [ +${repeat:vnf-data.vnf-request-input.vnf-input-parameters.param_length: + { + "name": ${vnf-data.vnf-request-input.vnf-input-parameters.param[${1}].name}, + "value": ${vnf-data.vnf-request-input.vnf-input-parameters.param[${1}].value} + }, +} + ] + } + }, + "vnf-topology": { + "vnf-topology-identifier-structure": { + "vnf-id": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-id}, + "vnf-type": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-type}, + "nf-type": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-type}, + "nf-role": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-role}, + "nf-function": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-function}, + "nf-code": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.nf-code}, + "vnf-name": ${vnf-data.vnf-topology.vnf-topology-identifier-structure.vnf-name}, + }, + "tenant": ${vnf-data.vnf-topology.tenant}, + "aic-cloud-region": ${vnf-data.vnf-topology.aic-cloud-region}, + "cloud-owner": ${vnf-data.vnf-topology.cloud-owner}, + "aic-clli": ${vnf-data.vnf-topology.aic-clli}, + "onap-model-information": { + "model-invariant-uuid": ${vnf-data.vnf-topology.onap-model-information.model-invariant-uuid}, + "model-customization-uuid": ${vnf-data.vnf-topology.onap-model-information.model-customization-uuid}, + "model-uuid": ${vnf-data.vnf-topology.onap-model-information.model-uuid}, + "model-version": ${vnf-data.vnf-topology.onap-model-information.model-version}, + "model-name": ${vnf-data.vnf-topology.onap-model-information.model-name}, + }, + "vnf-resource-assignments": { + "vnf-status": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-status}, + "availability-zones": { + "availability-zone": [ +${repeat:vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone_length: + ${vnf-data.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[${1}]}, +} + ] + }, + "vnf-networks": { + "vnf-network": [ +${repeat:vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network_length: + { + "network-role": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].network-role}, + "network-name": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].network-name}, + "neutron-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].neutron-id}, + "network-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].network-id}, + "contrail-network-fqdn": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].contrail-network-fqdn}, + "subnets-data": { + "subnet-data": [ +${repeat:vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data_length: + { + "sdnc-subnet-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].sdnc-subnet-id}, + "subnet-role": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].subnet-role}, + "subnet-name": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].subnet-name}, + "ip-version": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].ip-version}, + "subnet-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].subnet-id}, + "dhcp-enabled": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].dhcp-enabled}, + "network-start-address": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].network-start-address}, + "gateway-address": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].gateway-address}, + "cidr-mask": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].subnets-data.subnet-data[${2}].cidr-mask} + }, +} + ] + }, + "is-trunked": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].is-trunked}, + "segmentation-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].segmentation-id}, + "related-networks": { + "related-network": [ +${repeat:vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network_length: + { + "network-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].network-id}, + "network-role": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].network-role}, + "vlan-tags": { + "vlan-interface": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.vlan-interface}, + "upper-tag-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.upper-tag-id}, + "lower-tag-id": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.lower-tag-id}, + "is-private": ${vnf-data.vnf-topology.vnf-resource-assignments.vnf-networks.vnf-network[${1}].related-networks.related-network[${2}].vlan-tags.is-private} + } + }, +} + ] + } + }, +} + ] + } + }, + "vnf-parameters-data": { + "param": [ +${repeat:vnf-data.vnf-topology.vnf-parameters-data.param_length: + { + "name": ${vnf-data.vnf-topology.vnf-parameters-data.param[${1}].name}, + "value": ${vnf-data.vnf-topology.vnf-parameters-data.param[${1}].value} + }, +} + ] + }, + "sdnc-generated-cloud-resources": ${vnf-data.vnf-topology.sdnc-generated-cloud-resources}, + }, + "vnf-network-collections": { + "vnf-network-collection": [ +${repeat:vnf-data.vnf-network-collections.vnf-network-collection_length: + { + "network-instance-group-function": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].network-instance-group-function}, + "network-instance-group-id": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].network-instance-group-id}, + "network-collection-service-instance-id": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].network-collection-service-instance-id}, + "network-collection-customization-uuid": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].network-collection-customization-uuid}, + "networks": { + "network": [ +${repeat:vnf-data.vnf-network-collections.vnf-network-collection[${1}].networks.network_length: + { + "network-id": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].networks.network[${2}].network-id}, + "neutron-network-id": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].networks.network[${2}].neutron-network-id} + }, +} + ] + }, + "vnf-floating-ip": { + "ip-addresses": { + "ipv4-address": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].vnf-floating-ip.ip-addresses.ipv4-address}, + "ipv6-address": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].vnf-floating-ip.ip-addresses.ipv6-address}, + "vipv4-address": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].vnf-floating-ip.ip-addresses.vipv4-address}, + "vipv6-address": ${vnf-data.vnf-network-collections.vnf-network-collection[${1}].vnf-floating-ip.ip-addresses.vipv6-address} + } + } + }, +} + ] + }, + "vnf-level-oper-status": { + "order-status": ${vnf-data.vnf-level-oper-status.order-status}, + "last-rpc-action": ${vnf-data.vnf-level-oper-status.last-rpc-action}, + "last-action": ${vnf-data.vnf-level-oper-status.last-action}, + "last-svc-request-id": ${vnf-data.vnf-level-oper-status.last-svc-request-id}, + "last-order-status": ${vnf-data.vnf-level-oper-status.last-order-status}, + "create-timestamp": ${vnf-data.vnf-level-oper-status.create-timestamp}, + "modify-timestamp": ${vnf-data.vnf-level-oper-status.modify-timestamp} + } + } + } +} diff --git a/ms/gra/gra-docker/src/main/templates/vnf-level-oper-status.json b/ms/gra/gra-docker/src/main/templates/vnf-level-oper-status.json new file mode 100644 index 0000000..6f80b46 --- /dev/null +++ b/ms/gra/gra-docker/src/main/templates/vnf-level-oper-status.json @@ -0,0 +1,12 @@ +{ + "oper-status": { + "order-status": ${vnf-level-oper-status.order-status}, + "last-rpc-action": ${vnf-level-oper-status.last-rpc-action}, + "last-action": ${vnf-level-oper-status.last-action}, + "last-svc-request-id": ${vnf-level-oper-status.last-svc-request-id}, + "last-order-status": ${vnf-level-oper-status.last-order-status}, + "create-timestamp": ${vnf-level-oper-status.create-timestamp}, + "modify-timestamp": ${vnf-level-oper-status.modify-timestamp} + } +} + diff --git a/ms/gra/gra-docker/src/main/templates/vnf-network.json b/ms/gra/gra-docker/src/main/templates/vnf-network.json new file mode 100644 index 0000000..8fbf755 --- /dev/null +++ b/ms/gra/gra-docker/src/main/templates/vnf-network.json @@ -0,0 +1,45 @@ +{ + "vnf-network": { + "network-role": ${vnf-network-data.network-role}, + "network-name": ${vnf-network-data.network-name}, + "neutron-id": ${vnf-network-data.neutron-id}, + "network-id": ${vnf-network-data.network-id}, + "contrail-network-fqdn": ${vnf-network-data.contrail-network-fqdn}, + "subnets-data": { + "subnet-data": [ +${repeat:vnf-network-data.subnets-data.subnet-data_length: + { + "sdnc-subnet-id": ${vnf-network-data.subnets-data.subnet-data[${1}].sdnc-subnet-id}, + "subnet-role": ${vnf-network-data.subnets-data.subnet-data[${1}].subnet-role}, + "subnet-name": ${vnf-network-data.subnets-data.subnet-data[${1}].subnet-name}, + "ip-version": ${vnf-network-data.subnets-data.subnet-data[${1}].ip-version}, + "subnet-id": ${vnf-network-data.subnets-data.subnet-data[${1}].subnet-id}, + "dhcp-enabled": ${vnf-network-data.subnets-data.subnet-data[${1}].dhcp-enabled}, + "network-start-address": ${vnf-network-data.subnets-data.subnet-data[${1}].network-start-address}, + "gateway-address": ${vnf-network-data.subnets-data.subnet-data[${1}].gateway-address}, + "cidr-mask": ${vnf-network-data.subnets-data.subnet-data[${1}].cidr-mask} + }, +} + ] + }, + "is-trunked": ${vnf-network-data.is-trunked}, + "segmentation-id": ${vnf-network-data.segmentation-id}, + "related-networks": { + "related-network": [ +${repeat:vnf-network-data.related-networks.related-network_length: + { + "network-id": ${vnf-network-data.related-networks.related-network[${1}].network-id}, + "network-role": ${vnf-network-data.related-networks.related-network[${1}].network-role}, + "vlan-tags": { + "vlan-interface": ${vnf-network-data.related-networks.related-network[${1}].vlan-tags.vlan-interface}, + "upper-tag-id": ${vnf-network-data.related-networks.related-network[${1}].vlan-tags.upper-tag-id}, + "lower-tag-id": ${vnf-network-data.related-networks.related-network[${1}].vlan-tags.lower-tag-id}, + "is-private": ${vnf-network-data.related-networks.related-network[${1}].vlan-tags.is-private} + } + }, +} + ] + } + } +} + |