Skip to content
Snippets Groups Projects
Commit f9c0b68f authored by Waleed Akbar's avatar Waleed Akbar
Browse files

Changes in Telemetry.

- GenericGrpcService inheritance is added in Telemetry backend class.
- Database folder were missing in working directory in DockerFile of Telemetry Frontend.
parent b7f60ece
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!258Resolve "Re-designing of Telemetry"
......@@ -24,6 +24,8 @@ from confluent_kafka import Consumer as KafkaConsumer
from confluent_kafka import KafkaError
from common.tools.kafka.Variables import KafkaConfig, KafkaTopic
from common.method_wrappers.Decorator import MetricsPool
from common.tools.service.GenericGrpcService import GenericGrpcService
LOGGER = logging.getLogger(__name__)
......@@ -31,12 +33,11 @@ METRICS_POOL = MetricsPool('TelemetryBackend', 'backendService')
# EXPORTER_ENDPOINT = "http://10.152.183.2:9100/metrics"
class TelemetryBackendService:
class TelemetryBackendService(GenericGrpcService):
"""
Class listens for request on Kafka topic, fetches requested metrics from device.
Produces metrics on both RESPONSE and VALUE kafka topics.
"""
def __init__(self):
LOGGER.info('Init TelemetryBackendService')
self.kafka_producer = KafkaProducer({'bootstrap.servers' : KafkaConfig.get_kafka_address()})
......
......@@ -64,6 +64,7 @@ RUN python3 -m pip install -r requirements.txt
WORKDIR /var/teraflow
COPY src/telemetry/__init__.py telemetry/__init__.py
COPY src/telemetry/frontend/. telemetry/frontend/
COPY src/telemetry/database/. telemetry/database/
# Start the service
ENTRYPOINT ["python", "-m", "telemetry.frontend.service"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment