diff options
author | ajay_dp001 <ajay.deep.singh@est.tech> | 2021-04-11 23:05:32 +0530 |
---|---|---|
committer | ajay_dp001 <ajay.deep.singh@est.tech> | 2021-04-21 17:34:14 +0530 |
commit | 47276b70370d0e962b7f6c6423f5ec39d50c5ec1 (patch) | |
tree | 38ec26e297e7c7a63d24fe8fcd62abd72f6ccdc4 /components/pm-subscription-handler | |
parent | 835ad818323544acb8b030a4f274de14496d7b02 (diff) |
[DCAEGEN2] PMSH Update to Support Helm Transformation1.3.1-pmsh
- Update Config-key for PMSH Monitoring Policy
- Version bump
Issue-ID: DCAEGEN2-2713
Signed-off-by: ajay_dp001 <ajay.deep.singh@est.tech>
Change-Id: I70138795e5aa46e7c133415b02ba8a2a0f6ac0ba
Diffstat (limited to 'components/pm-subscription-handler')
7 files changed, 146 insertions, 138 deletions
diff --git a/components/pm-subscription-handler/Changelog.md b/components/pm-subscription-handler/Changelog.md index 91900070..be2a7a73 100755 --- a/components/pm-subscription-handler/Changelog.md +++ b/components/pm-subscription-handler/Changelog.md @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.3.1] +### Changed +* Updated Subscription object retrieving key from App Config data (DCAEGEN2-2713) + +## [1.3.0] +### Changed +* Change pmsh baseOS img to integration (DCAEGEN2-2420) + ## [1.2.0] ### Changed * Bug fix prevent sub threads from crashing permanently (DCAEGEN2-2501) diff --git a/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py b/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py index a5fc86e6..9ddff315 100755 --- a/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py +++ b/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py @@ -88,7 +88,7 @@ class AppConfig: self.operational_policy_name = conf['config'].get('operational_policy_name') self.control_loop_name = conf['config'].get('control_loop_name') self.sub_schema = _load_sub_schema_from_file() - self.subscription = Subscription(**conf['policy']['subscription']) + self.subscription = Subscription(**conf['config']['pmsh_policy']['subscription']) self.nf_filter = None def __new__(cls, *args, **kwargs): @@ -141,7 +141,7 @@ class AppConfig: """ try: app_conf = self._get_pmsh_config() - self.subscription = Subscription(**app_conf['policy']['subscription']) + self.subscription = Subscription(**app_conf['config']['pmsh_policy']['subscription']) logger.info("AppConfig data has been refreshed") except Exception: logger.error('Failed to refresh PMSH AppConfig') diff --git a/components/pm-subscription-handler/pom.xml b/components/pm-subscription-handler/pom.xml index d4f7eaf1..fbf44977 100644 --- a/components/pm-subscription-handler/pom.xml +++ b/components/pm-subscription-handler/pom.xml @@ -32,7 +32,7 @@ <groupId>org.onap.dcaegen2.services</groupId> <artifactId>pmsh</artifactId> <name>dcaegen2-services-pm-subscription-handler</name> - <version>1.3.0-SNAPSHOT</version> + <version>1.3.1-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <sonar.sources>.</sonar.sources> diff --git a/components/pm-subscription-handler/setup.py b/components/pm-subscription-handler/setup.py index 6a2ef242..e4d31332 100644 --- a/components/pm-subscription-handler/setup.py +++ b/components/pm-subscription-handler/setup.py @@ -21,7 +21,7 @@ from setuptools import setup, find_packages setup( name="pm_subscription_handler", - version="1.2.0", + version="1.3.1", packages=find_packages(), author="lego@est.tech", author_email="lego@est.tech", diff --git a/components/pm-subscription-handler/tests/data/cbs_data_1.json b/components/pm-subscription-handler/tests/data/cbs_data_1.json index 2e405d09..f872bb50 100644 --- a/components/pm-subscription-handler/tests/data/cbs_data_1.json +++ b/components/pm-subscription-handler/tests/data/cbs_data_1.json @@ -1,78 +1,78 @@ { - "policy":{ - "subscription":{ - "subscriptionName":"ExtraPM-All-gNB-R2B", - "administrativeState":"UNLOCKED", - "fileBasedGP":15, - "fileLocation":"\/pm\/pm.xml", - "nfFilter":{ - "nfNames":[ - "^pnf.*", - "^vnf.*" - ], - "modelInvariantIDs": [ - - ], - "modelVersionIDs": [ - - ], - "modelNames": [ - - ] - }, - "measurementGroups":[ - { - "measurementGroup":{ - "measurementTypes":[ - { - "measurementType":"countera" - }, - { - "measurementType":"counterb" - } - ], - "managedObjectDNsBasic":[ - { - "DN":"dna" - }, - { - "DN":"dnb" - } - ] - } - }, - { - "measurementGroup":{ - "measurementTypes":[ - { - "measurementType":"counterc" - }, - { - "measurementType":"counterd" - } - ], - "managedObjectDNsBasic":[ - { - "DN":"dnc" - }, - { - "DN":"dnd" - } - ] - } - } - ] - } - }, "config":{ - "control_loop_name": "pmsh-control-loop", - "operational_policy_name": "pmsh-operational-policy", + "control_loop_name":"pmsh-control-loop", + "operational_policy_name":"pmsh-operational-policy", "aaf_password":"demo123456!", "aaf_identity":"dcae@dcae.onap.org", "cert_path":"/opt/app/pmsh/etc/certs/cert.pem", "key_path":"/opt/app/pmsh/etc/certs/key.pem", "ca_cert_path":"/opt/app/pmsh/etc/certs/cacert.pem", "enable_tls":"true", + "pmsh_policy":{ + "subscription":{ + "subscriptionName":"ExtraPM-All-gNB-R2B", + "administrativeState":"UNLOCKED", + "fileBasedGP":15, + "fileLocation":"\/pm\/pm.xml", + "nfFilter":{ + "nfNames":[ + "^pnf.*", + "^vnf.*" + ], + "modelInvariantIDs":[ + + ], + "modelVersionIDs":[ + + ], + "modelNames":[ + + ] + }, + "measurementGroups":[ + { + "measurementGroup":{ + "measurementTypes":[ + { + "measurementType":"countera" + }, + { + "measurementType":"counterb" + } + ], + "managedObjectDNsBasic":[ + { + "DN":"dna" + }, + { + "DN":"dnb" + } + ] + } + }, + { + "measurementGroup":{ + "measurementTypes":[ + { + "measurementType":"counterc" + }, + { + "measurementType":"counterd" + } + ], + "managedObjectDNsBasic":[ + { + "DN":"dnc" + }, + { + "DN":"dnd" + } + ] + } + } + ] + } + }, "streams_subscribes":{ "aai_subscriber":{ "type":"message_router", diff --git a/components/pm-subscription-handler/tests/data/cbs_invalid_data.json b/components/pm-subscription-handler/tests/data/cbs_invalid_data.json index 92da2b9c..a6f63680 100644 --- a/components/pm-subscription-handler/tests/data/cbs_invalid_data.json +++ b/components/pm-subscription-handler/tests/data/cbs_invalid_data.json @@ -1,77 +1,77 @@ { - "policy":{ - "subscription":{ - "subscriptionName":"ExtraPM-All-gNB-R2B", - "administrativeState":"UNLOCKED", - "fileBasedGP":15, - "fileLocation":"\/pm\/pm.xml", - "nfFilter":{ - "nfNames":[ - - ], - "modelInvariantIDs": [ - - ], - "modelVersionIDs": [ - - ], - "modelNames": [ - - ] - }, - "measurementGroups":[ - { - "measurementGroup":{ - "measurementTypes":[ - { - "measurementType":"countera" - }, - { - "measurementType":"counterb" - } - ], - "managedObjectDNsBasic":[ - { - "DN":"dna" - }, - { - "DN":"dnb" - } - ] - } - }, - { - "measurementGroup":{ - "measurementTypes":[ - { - "measurementType":"counterc" - }, - { - "measurementType":"counterd" - } - ], - "managedObjectDNsBasic":[ - { - "DN":"dnc" - }, - { - "DN":"dnd" - } - ] - } - } - ] - } - }, "config":{ - "control_loop_name": "pmsh-control-loop", - "operational_policy_name": "pmsh-operational-policy", + "control_loop_name":"pmsh-control-loop", + "operational_policy_name":"pmsh-operational-policy", "aaf_password":"demo123456!", "aaf_identity":"dcae@dcae.onap.org", "cert_path":"/opt/app/pmsh/etc/certs/cert.pem", "key_path":"/opt/app/pmsh/etc/certs/key.pem", "ca_cert_path":"/opt/app/pmsh/etc/certs/cacert.pem", "enable_tls":"true", + "pmsh_policy":{ + "subscription":{ + "subscriptionName":"ExtraPM-All-gNB-R2B", + "administrativeState":"UNLOCKED", + "fileBasedGP":15, + "fileLocation":"\/pm\/pm.xml", + "nfFilter":{ + "nfNames":[ + + ], + "modelInvariantIDs":[ + + ], + "modelVersionIDs":[ + + ], + "modelNames":[ + + ] + }, + "measurementGroups":[ + { + "measurementGroup":{ + "measurementTypes":[ + { + "measurementType":"countera" + }, + { + "measurementType":"counterb" + } + ], + "managedObjectDNsBasic":[ + { + "DN":"dna" + }, + { + "DN":"dnb" + } + ] + } + }, + { + "measurementGroup":{ + "measurementTypes":[ + { + "measurementType":"counterc" + }, + { + "measurementType":"counterd" + } + ], + "managedObjectDNsBasic":[ + { + "DN":"dnc" + }, + { + "DN":"dnd" + } + ] + } + } + ] + } + }, "streams_subscribes":{ "aai_subscriber":{ "type":"message_router", diff --git a/components/pm-subscription-handler/version.properties b/components/pm-subscription-handler/version.properties index 7d6815b1..fee49286 100644 --- a/components/pm-subscription-handler/version.properties +++ b/components/pm-subscription-handler/version.properties @@ -1,6 +1,6 @@ major=1 minor=3 -patch=0 +patch=1 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT |