Mapping
Mapping configuration files can be supplied to the CDR ASN.1 Streamer in a configuration source. You can also supply your configuration mapping file changes directly with Helm chart properties.
Mapping Configuration Properties describes properties for supplying mapping file changes using the Helm chart.
Property | Description |
---|---|
mapping.version | This the version of the 3GPP 5GC specification used. The default value is
R15-2019-12-to-R15-2020-03 , meaning open API
version R15-2019-12 to ASN.1 version R15-2020-03. |
mapping.activeMappingFile | The mapping file that is in use. The default value is CDR-to-CHFRecord.yaml. |
mapping.trace | When set to true , extra logging is created showing
how mapping was performed. The default value is
false . |
mapping.overrides.CDR-to-CHFRecord | This property has the contents of the
/opt/mtx/conf/mapping/version/CDR-to-CHFRecord.yaml
file within the CDR ASN.1 Streamer pod. A baseFile
attribute to
/opt/mtx/conf/mapping/version/base/CDR-to-CHFRecord.yaml
is added to the contents of this file. |
mapping.overrides.CDR-to-GPRSRecord | This property has the contents of the
/opt/mtx/conf/mapping/version/CDR-to-GPRSRecord.yaml
file within the CDR ASN.1 Streamer container. A
baseFile attribute to
/opt/mtx/conf/mapping/version/base/CDR-to-GPRSRecord.yaml
is added to the contents of this file. |
mapping.groovy | Entries in this configuration property are added to a ConfigMap whose content is copied to /opt/mtx/conf/mapping/version/groovy in the CDR ASN.1 Streamer container. |
The following example shows an overridden mapping configuration and a Groovy file. The mapping
file is placed in
/opt/mtx/conf/mapping/version/CDR-to-CHFRecord.yaml
and the Groovy file is placed in
/opt/mtx/conf/mapping/version/groovy/dynamic.groovy,
where version is the value specified with
mapping.version
.
mapping:
overrides:
CDR-to-CHFRecord:
postProcessors:
- name: "Dynamic Post Processor"
groovyFile: "groovy/dynamic.groovy"
groovy:
dynamic.groovy: |-
package com.matrixx.mapping.example
import com.matrixx.mapping.MappingContext
import com.matrixx.mapping.postprocess.MappingPostProcessor
class DynamicPostProcessor extends MappingPostProcessor {
@Override
void postProcess(final Object targetMessage, final MappingContext mappingContext)
{
println "I'm in a dynamic Mapping Post Processor!"
}
}
The baseFile
attribute of the configuration mapping is added. The contents of
/opt/mtx/conf/mapping/version/CDR-to-CHFRecord.yaml
become the following:
baseFile: ${current.directory}/base/CCDR-to-CHFRecord.yaml
postProcessors:
- name: "Dynamic Post Processor"
groovyFile: "groovy/dynamic.groovy"