From 255235644c8c302e1e92c41c13be3f3ad5973b16 Mon Sep 17 00:00:00 2001 From: JoeOLeary Date: Tue, 14 Jan 2020 10:54:59 +0000 Subject: Add support for TS 28.550/28.532 Issue-ID: DCAEGEN2-1912 Change-Id: If05c3673a240e6ea5e3d1caca3ff5bf5828590d3 Signed-off-by: JoeOLeary --- src/main/resources/Dockerfile | 6 +- .../resources/schemas/org.3GPP.28.550#measData | 131 +++++++++++++++++ .../resources/schemas/org.3GPP.32.435#measCollec | 159 +++++++++++++++++++++ .../resources/templates/org.3GPP.28.550#measData | 132 +++++++++++++++++ .../resources/templates/org.3GPP.32.435#measCollec | 133 +++++++++++++++++ 5 files changed, 558 insertions(+), 3 deletions(-) create mode 100644 src/main/resources/schemas/org.3GPP.28.550#measData create mode 100644 src/main/resources/schemas/org.3GPP.32.435#measCollec create mode 100644 src/main/resources/templates/org.3GPP.28.550#measData create mode 100644 src/main/resources/templates/org.3GPP.32.435#measCollec (limited to 'src/main/resources') diff --git a/src/main/resources/Dockerfile b/src/main/resources/Dockerfile index bf59524..c4eeb2e 100644 --- a/src/main/resources/Dockerfile +++ b/src/main/resources/Dockerfile @@ -1,6 +1,6 @@ # # ============LICENSE_START======================================================= -# Copyright (C) 2019 Nordix Foundation. +# Copyright (C) 2019-2020 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -34,8 +34,8 @@ USER pm-mapper COPY ${project.build.directory}/${ext.dep.dir.path}/ ${ext.dep.dir.path}/ COPY ${project.build.directory}/${JAR} . -COPY ${project.build.directory}/classes/mapping.ftl ./etc/mapping.ftl -COPY ${project.build.directory}/classes/measCollec_plusString.xsd ./etc/measCollec_plusString.xsd +COPY ${project.build.directory}/classes/schemas ./etc/schemas/ +COPY ${project.build.directory}/classes/templates ./etc/templates/ COPY ${project.build.directory}/classes/reconfigure.sh ./etc/reconfigure.sh COPY --chown=pm-mapper ${project.build.directory}/classes/logback.xml ./etc/logback.xml diff --git a/src/main/resources/schemas/org.3GPP.28.550#measData b/src/main/resources/schemas/org.3GPP.28.550#measData new file mode 100644 index 0000000..d3a9fef --- /dev/null +++ b/src/main/resources/schemas/org.3GPP.28.550#measData @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/org.3GPP.32.435#measCollec b/src/main/resources/schemas/org.3GPP.32.435#measCollec new file mode 100644 index 0000000..309bcb9 --- /dev/null +++ b/src/main/resources/schemas/org.3GPP.32.435#measCollec @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/org.3GPP.28.550#measData b/src/main/resources/templates/org.3GPP.28.550#measData new file mode 100644 index 0000000..653077e --- /dev/null +++ b/src/main/resources/templates/org.3GPP.28.550#measData @@ -0,0 +1,132 @@ +<#ftl> +<#-- + ============LICENSE_START======================================================= + Copyright (C) 2019-2020 Nordix Foundation. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + SPDX-License-Identifier: Apache-2.0 + ============LICENSE_END========================================================= + --> +<#compress> +<#assign fileHeader = xml.MeasDataFile.fileHeader> +<#assign fileFooter = xml.MeasDataFile.fileFooter> +<#assign measData = xml.MeasDataFile.measData> +<#setting datetime_format="iso"> +{ + "event": { + "commonEventHeader": <@commonEventHeader/> + <#if measData?has_content>, + "perf3gppFields": <@perf3gppFields/> + + } +} + + +<#macro commonEventHeader> +{ + "domain": "perf3gpp", + "eventId": "${eventId}", + "sequence": 0, + "eventName": "perf3gpp_${metadata.productName}-${metadata.vendorName}_pmMeasResult", + "sourceName": "${metadata.sourceName}", + "reportingEntityName": "", + "priority": "Normal", + "startEpochMicrosec": ${fileHeader.MeasData.@beginTime?datetime?long?c}, + "lastEpochMicrosec": ${fileFooter.MeasData.@endTime?datetime?long?c}, + "version": "4.0", + "vesEventListenerVersion": "7.1", + "timeZoneOffset": "${metadata.timeZoneOffset}" +} + + + +<#macro measTypes measInfo> +{ + "sMeasTypesList":[ + <#if measInfo.measType?has_content> + <#list measInfo.measType as measType> + "${measType}"<#sep>, + + <#else> + <#list measInfo.measTypes?split(" ") as measType> + "${measType}"<#sep>, + + + ] +} + + + +<#macro measValuesList measInfo> +[ +<#list measInfo.measValue as measValue> + { + "measObjInstId": "${measValue.@measObjLdn[0]!}", + "suspectFlag": "${measValue.suspect[0]! "false"}", + "measResults": [ + <#if measValue.r?has_content> + <#list measValue.r as r> + { + "p": ${r.@p}, + "sValue": "${r}" + }<#sep>, + + <#else> + <#list measValue.measResults?split(" ") as r> + { + "p":${r?index+1}, + "sValue": "${r}" + }<#sep>, + + + ] + } +<#sep>, + +] + + + +<#macro measInfoList> +[ +<#list measData.measInfo as measInfo> + { + "measInfoId": { + "sMeasInfoId": "${measInfo.@measInfoId[0]!}" + }, + "measTypes": <@measTypes measInfo/>, + "measValuesList": <@measValuesList measInfo/> + }<#sep>, + +] + + + +<#macro measDataCollection> +{ + "granularityPeriod": ${measData.measInfo.granPeriod.@endTime[0]!?datetime?long?c}, + "measuredEntityUserName": "${measData.measuredEntity.@userLabel[0]!}", + "measuredEntityDn": "${measData.measuredEntity.@localDn[0]!}", + "measuredEntitySoftwareVersion": "${measData.measuredEntity.@swVersion[0]!}", + "measInfoList": <@measInfoList/> +} + + +<#macro perf3gppFields> +{ + "perf3gppFieldsVersion": "1.0", + "measDataCollection": <@measDataCollection/> +} + + \ No newline at end of file diff --git a/src/main/resources/templates/org.3GPP.32.435#measCollec b/src/main/resources/templates/org.3GPP.32.435#measCollec new file mode 100644 index 0000000..422977e --- /dev/null +++ b/src/main/resources/templates/org.3GPP.32.435#measCollec @@ -0,0 +1,133 @@ +<#ftl> +<#-- + ============LICENSE_START======================================================= + Copyright (C) 2019-2020 Nordix Foundation. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + SPDX-License-Identifier: Apache-2.0 + ============LICENSE_END========================================================= + --> +<#compress> +<#assign fileHeader = xml.measCollecFile.fileHeader> +<#assign fileFooter = xml.measCollecFile.fileFooter> +<#assign measData = xml.measCollecFile.measData> +<#setting datetime_format="iso"> +{ + "event": { + "commonEventHeader": <@commonEventHeader/> + <#if measData?has_content>, + "perf3gppFields": <@perf3gppFields/> + + } +} + + +<#macro commonEventHeader> +{ + "domain": "perf3gpp", + "eventId": "${eventId}", + "sequence": 0, + "eventName": "perf3gpp_${metadata.productName}-${metadata.vendorName}_pmMeasResult", + "sourceName": "${metadata.sourceName}", + "reportingEntityName": "", + "priority": "Normal", + "startEpochMicrosec": ${fileHeader.measCollec.@beginTime?datetime?long?c}, + "lastEpochMicrosec": ${fileFooter.measCollec.@endTime?datetime?long?c}, + "version": "4.0", + "vesEventListenerVersion": "7.1", + "timeZoneOffset": "${metadata.timeZoneOffset}" +} + + + +<#macro measTypes measInfo> +{ + "sMeasTypesList":[ + <#if measInfo.measType?has_content> + <#list measInfo.measType as measType> + "${measType}"<#sep>, + + <#else> + <#list measInfo.measTypes?split(" ") as measType> + "${measType}"<#sep>, + + + ] +} + + + +<#macro measValuesList measInfo> +[ +<#list measInfo.measValue as measValue> + { + "measObjInstId": "${measValue.@measObjLdn[0]!}", + "suspectFlag": "${measValue.suspect[0]! "false"}", + "measResults": [ + <#if measValue.r?has_content> + <#list measValue.r as r> + { + "p": ${r.@p}, + "sValue": "${r}" + }<#sep>, + + <#else> + <#list measValue.measResults?split(" ") as r> + { + "p":${r?index+1}, + "sValue": "${r}" + }<#sep>, + + + ] + } +<#sep>, + +] + + + +<#macro measInfoList> +[ +<#list measData.measInfo as measInfo> + { + "measInfoId": { + "sMeasInfoId": "${measInfo.@measInfoId[0]!}" + }, + "measTypes": <@measTypes measInfo/>, + "measValuesList": <@measValuesList measInfo/> + }<#sep>, + +] + + + +<#macro measDataCollection> +{ + "granularityPeriod": ${measData.measInfo.granPeriod.@endTime[0]!?datetime?long?c}, + "measuredEntityUserName": "${measData.managedElement.@userLabel[0]!}", + "measuredEntityDn": "${measData.managedElement.@localDn[0]!}", + "measuredEntitySoftwareVersion": "${measData.managedElement.@swVersion[0]!}", + "measInfoList": <@measInfoList/> +} + + + +<#macro perf3gppFields> +{ + "perf3gppFieldsVersion": "1.0", + "measDataCollection": <@measDataCollection/> +} + + \ No newline at end of file -- cgit 1.2.3-korg