aboutsummaryrefslogtreecommitdiffstats
path: root/miss_htbt_service
AgeCommit message (Collapse)AuthorFilesLines
2023-03-24Fix build job error2.6.1Vijay Venkatesh Kumar1-16/+11
black check failure https://jenkins.onap.org/view/dcaegen2/job/dcaegen2-services-heartbeat-master-release-version-java-daily/lastBuild/console onap-gerrit-review: -changelog-or-release-file-missing Change-Id: I0e57025285ea90c6e649feae0d2e955064b76083 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com> Issue-ID: DCAEGEN2-3366
2023-02-22heartbeat ms Test updatesVijay Venkatesh Kumar1-116/+121
Handle no-pragma cases Change-Id: I963542e39a59d6210645abed6e30a0cf5fc3159b Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com> Issue-ID: DCAEGEN2-2953 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com>
2023-01-09Fix black reported error in rls job2.6.0Vijay Venkatesh Kumar3-75/+85
Change-Id: I5b3b04214ca2a53a23df170bfbfd25c768dc8ac2 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com> Issue-ID: DCAEGEN2-3321 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com>
2023-01-05Heartbeat code refactoringVijay Venkatesh Kumar11-274/+283
code optimization & test improvement Issue-ID: DCAEGEN2-2953 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com> Change-Id: I99229d966c13ad666ac994ab5a582aeeaa306639 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com>
2022-10-25Fix black check compatibility issue2.5.0Vijay Venkatesh Kumar1-1/+1
Change-Id: Ide32d2287d4d760534edb41e2cf8201bb6e87d82 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com> Issue-ID: DCAEGEN2-3297 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com>
2022-10-21Handle MR connection errorVijay Venkatesh Kumar1-3/+8
Change-Id: I8defdd65093d19d4255427a8c7961cf5249007b8 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com> Issue-ID: DCAEGEN2-2952 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com>
2022-08-19lots of cleanup, no functional code changesHansen, Tony (th1395)11-462/+113
Change-Id: I9eefe4d34ae226bbd5a6f80422f89baeeaeb3471 Signed-off-by: Hansen, Tony (th1395) <th1395@att.com> Issue-ID: DCAEGEN2-2837
2021-12-02run the black formatting tool on python codeHansen, Tony (th1395)14-380/+601
also fix up some copyright & license block lines Change-Id: Ifb628e2ef1e5f13fed0a29964eec387d3982d605 Signed-off-by: Hansen, Tony (th1395) <th1395@att.com> Issue-ID: DCAEGEN2-2995 Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
2021-10-22Fix log rotation issueSatoshi Fujii6-29/+45
Writing log to a single file from multiple processes is not supported by python logging. It causes making fragmented log files at log rotation and logs are mixed up. This change is to use different log files for each sub-process to help developers check log for a specific process easily. This change does not affect to pod log (stdout log). Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Issue-ID: DCAEGEN2-2941 Change-Id: If8bcb2308863d1395a2c547d2e7b746301665fb0
2021-10-21Fix no such file or directory errorSatoshi Fujii1-26/+23
fetch_json_file() function is called from two processes, misshtbtd and cbs_polling. When they call the func at the same time, both procs try to remove download.json, so `No such file or directory` error occurs on one of them and the process stop working by the error. This change adds an exception handling to ignore the error. Issue-ID: DCAEGEN2-2872 Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Change-Id: I4f9f0a4522badcdef51392f4bbccfd6aa42fd9d0
2021-10-21Fix microsec timestamp not properly handledSatoshi Fujii1-0/+3
Current heartbeat service assumes lastEpochMicrosec timestamp in VES notification is represented as milli-seconds, but some devices sends micro-sec timestamp in the field. In that case, the heartbeat notification was not working due to timestamp comparison was not done properly. Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Issue-ID: DCAEGEN2-2940 Change-Id: Id7c9241de70cb3ff7ee59cf1e2c60089ff96a42b
2021-10-21Fix cbs polling process startup failureSatoshi Fujii3-29/+25
cbs polling process sometimes failed to start by `relation "hb_common" does not exist` error. The polling process tries to read hb_common table on startup, but the process is created before the parent process creates hb_common table. So the error may occur in race condition. cbs_polling process must be started after `hb_common` table populated. Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Issue-ID: DCAEGEN2-2944 Change-Id: Iee682b62a385dfaf2ec1355e781cda9c3def23c0
2021-10-15Fix pod become unready stateSatoshi Fujii2-3/+17
The original implementation used Popen but its stdout pipe became clogged because the captured output was not processed properly. As a result, readiness check failed due to health-check server not responding and the pod became unready state. Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Issue-ID: DCAEGEN2-2832 Change-Id: I98259e25fe40d5374a2c4236fc20bd631673f15e
2021-10-15Remove unused codeSatoshi Fujii2-242/+0
config_notif.py is not referenced from main code and not used at all. Also tests/HB_Array.json is not used by any test. Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Issue-ID: DCAEGEN2-2939 Change-Id: I6d462a406e2d36d0243f4a72b7faac2f79e353d9
2021-07-21Switch to 2.2.1 CBS client lib2.3.1vv770d2-5/+6
Change-Id: Id4569bf141dc7c48e15eed5d624042e498dde4ea Signed-off-by: vv770d <vv770d@att.com> Issue-ID: DCAEGEN2-2852 Signed-off-by: vv770d <vv770d@att.com>
2021-06-30Remove extraneous parenthesesSatoshi Fujii5-102/+100
Removed unnecessary parentheses from code. Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Issue-ID: DCAEGEN2-2837 Change-Id: I9a5f43a4bd894f44d0fc27c0841535faa79a39ac
2021-06-19Fix SQL security issueSatoshi Fujii4-71/+86
Constructing SQL statement by python % formatting operator is dangerous. Use psycopg2 placeholder to escape special characters. Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Issue-ID: DCAEGEN2-2836 Change-Id: I5ac804bc3e280c3eae14a5e224ca5fc7c7faccb7
2021-06-18Remove unused codeSatoshi Fujii8-52/+0
Just remove unused code Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Issue-ID: DCAEGEN2-2833 Change-Id: If81a5fcb918a2683e261807d6a3da5a8648e505d
2021-06-18Reformat codeSatoshi Fujii7-467/+516
Use 4 spaces for indentation and put spaces for better readability. Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Issue-ID: DCAEGEN2-2833 Change-Id: I99aa4df83a32b077e2a3f336d17b6b64184c3c12
2021-06-18Remove unused imports and bump version to 2.3.0Satoshi Fujii8-45/+36
Remove unused import statements from script. Bumped up version to 2.3.0. Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com> Issue-ID: DCAEGEN2-2833 Change-Id: I015e89f1b56ca12483e432bf67123f33140d722c
2021-05-11Change python baseOS img to integration-python2.2.0Alexander Mazuruk2-40/+10
Moved setting PYTHONPATH and PATH to Dockerfile as thats where python version is defined (baseOS image) Switched hardcoded python3.8 to python3. psycopg is recommended to be built from source for production use, yet CI environment does not have the dependencies to build it. To circumvent that, requirements were split into: - requirements-common.txt that should be included for each environment - requirements-docker.txt that force building of psycopg in docker - requirements.txt that use psycopg-binary for ci purposes Benefits from switching over: * minimal {java11,python} images maintained by integration team * using currently "blessed by seccom" versions (:latest tag used) * should limit spread of legal issues across layers * integration images will be the first to have automated compliance documentation * should limit spread of base layers (contributing to deployment footprint - more base layers = more to download, more to store etc...) Issue-ID: INT-1864 Issue-ID: DCAEGEN2-2420 Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com> Change-Id: I77be2fd9dd53613a1a6ad26f8f0b506073f1cca6
2021-04-09Dependencies update: PyYAML to 5.4Alexander Mazuruk3-3/+6
PyYAML changelog: https://github.com/yaml/pyyaml/blob/master/CHANGES Additionally resolved deprecation warnings from PyYAML. Issue-ID: DCAEGEN2-2720 Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com> Change-Id: Ifb06a8a32417e7b4d8fad2b509bc76cbcbc20c55
2021-04-09Dependencies update: Wheel, PyYAML, httplib2, HTTPrettyAlexander Mazuruk1-1/+2
Changelogs of updated pkgs: https://wheel.readthedocs.io/en/stable/news.html https://github.com/yaml/pyyaml/blob/master/CHANGES https://github.com/httplib2/httplib2/blob/master/CHANGELOG https://httpretty.readthedocs.io/en/latest/changelog.html Additionally resolved some warnings reported by tox: - remove unused func from tests that used deprecated python lib. - change collections import to collections.abc Issue-ID: DCAEGEN2-2720 Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com> Change-Id: I1dadbe9e6e410bdec1a06ea7c69e49576551218b
2020-07-31Run in Python 3.8Michal Jagiello10-41/+50
Use image recommended by SECCOM Issue-ID: DCAEGEN2-2292 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: I8d77f150c9fe314bf26bac2c9fac7ebc9782c9d8
2020-01-31increase code coverageHansen, Tony (th1395)18-80/+69
Change-Id: I30632d2e34401f8eff6e67b9b3d8abba32e80050 Signed-off-by: Hansen, Tony (th1395) <th1395@att.com> Issue-ID: DCAEGEN2-1902 Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
2019-11-25Fix relative imports and invalid exception handlingMiroslav Los9-95/+106
Make proper relative or absolute imports within miss_htbt_service. Use proper except Class as variable syntax. Avoid multiple parameters to print() for potential python2 usage. Add missing original AT&T license text to test modules. Add attribution to commiter's employer to modified files. Trailing whitespace fixes. Signed-off-by: Miroslav Los <miroslav.los@pantheon.tech> Issue-ID: DCAEGEN2-1939 Change-Id: Ibfc4bea3e33a512d06a41050ba5e591121eb9454
2019-03-12Test coverage for heartbeat MSPrakashH4-10/+10
Increased code coverage Issue-ID: DCAEGEN2-1260 Change-Id: Ide4c030d3228ac5594ac1ee7403ad6cfa102a64e Signed-off-by: PrakashH <pbhandar@techmahindra.com>
2019-01-31Heartbeat Microservice SupportPrakashH3-1/+6
Heartbeat service monitors missing HB notification Issue-ID: DCAEGEN2-267 Change-Id: I40a928fbf56164ec5288a4d489ffa10eee28e113 Signed-off-by: PrakashH <pbhandar@techmahindra.com>
2019-01-30Heartbeat Microservice SupportPrakashH1-1/+5
Heartbeat service monitors missing HB notifications Issue-ID: DCAEGEN2-267 Change-Id: I08046dc804e2e927ef03865d22940016acd00656 Signed-off-by: PrakashH <pbhandar@techmahindra.com>
2019-01-28Heartbeat Microservice SupportPrakashH9-155/+368
Heartbeat service monitors missing HB notification Issue-ID: DCAEGEN2-267 Change-Id: I0fd191b2a3495202e22f633ada4a1350a97557ad Signed-off-by: PrakashH <pbhandar@techmahindra.com>
2018-12-12Heartbeat Microservice SupportSrikanthNaidu18-616/+1486
Heartbeat service monitors missing HB notification Issue-ID: DCAEGEN2-267 Change-Id: I21f36056e9509a167bff476231a6bbd661aca1b9 Signed-off-by: SrikanthNaidu <sn8492@att.com>
2018-06-13Add json exception and VNF nameGokul Singaraju1-3/+9
Issue-ID: DCAEGEN2-279 Change-Id: I3f78eb87ce4c6eaa30efa8d2efa1e3f187b4e7a7 Signed-off-by: Gokul Singaraju <gs244f@att.com>
2018-06-11Fix cbs file path passedGokul Singaraju1-0/+1
Issue-ID: DCAEGEN2-279 Change-Id: I3f78eb87ce4c6eba30efb8d2ef91e3f187b4e7f7 Signed-off-by: Gokul Singaraju <gs244f@att.com>
2018-05-22Miss HB CBS integrationGokul Singaraju13-130/+1281
Issue-ID: DCAEGEN2-279 Change-Id: I3f78e0870d4c620a304fb8d218f1d30187b4fbef Signed-off-by: Gokul Singaraju <gs244f@att.com>
2018-05-02Fix heartbeat portGokul Singaraju1-12/+0
Issue-ID: DCAEGEN2-485 Change-Id: Ib0fa11fc5a7f242f54052f3c198a42920b3f79a8 Signed-off-by: Gokul Singaraju <gs244f@att.com>
2018-05-01Pass urls topics in docker envGokul Singaraju1-18/+24
Issue-ID: DCAEGEN2-278 Change-Id: Ib0fa11fc5a7ff47f54056f3c198a47120b3f73a8 Signed-off-by: Gokul Singaraju <gs244f@att.com>
2018-04-19Add healthcheck apiGokul Singaraju1-4/+4
Issue-ID: DCAEGEN2-456 Change-Id: I7455e357e5fb584f644768d33437ef43f53be6e5 Signed-Off-by: Gokul Singaraju <gs244f@att.com>
2018-03-27Added tests for heartbeat coverageGokul Singaraju1-42/+90
Issue-ID: DCAEGEN2-276 Change-Id: Ib0fa11fc5978f47854056f3c198347120b3873a8 Signed-off-by: Gokul Singaraju <gs244f@att.com>
2018-03-05Missing heartbeat microserviceJessica Wagantall3-0/+302
Issue-ID: DCAEGEN2-275 Change-Id: I2a2def9aef7664b58c6c3b74318343699fbf6c22 Signed-Off-by: Gokul Singaraju <gs244f@att.com>