How to locally run and test KPI manager micro-service
Pre-requisets
Ensure the following requirements are met before executing the KPI management service:
- A virtual enviornment exist with all the required packages listed in "requirements.in" sucessfully installed.
- Verify the creation of required database and table. The KPI DB test python file lists the functions to create tables and the database.
Messages format templates
The "messages" python file contains templates for creating gRPC messages.
Flow of execution (Kpi Manager Service functions)
-
Call the gRPC method
SetKpiDescriptor(KpiDescriptor)->KpiId
to add the KpiDescriptor to theKpi
DB.KpiDescriptor
andKpiId
are both pre-defined gRPC message types. -
Call
GetKpiDescriptor(KpiId)->KpiDescriptor
to read theKpiDescriptor
from the DB andDeleteKpiDescriptor(KpiId)
to delete theKpiDescriptor
from the DB. -
Call
SelectKpiDescriptor(KpiDescriptorFilter)->KpiDescriptorList
to get allKpiDescriptor
objects that matches filter criteria.KpiDescriptorFilter
andKpiDescriptorList
are pre-defined gRPC message types.