Commit 955980d0 authored by Carlos Natalino's avatar Carlos Natalino
Browse files

Progressing on the implementation of the optical attack detector.

parent 736cbd96
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -12,9 +12,9 @@ GRPC_GRACE_PERIOD = 60
MONITORING_INTERVAL = 2  # monitoring interval in seconds
#TODO: adjust the addresses below for the specific case
# MONITORING_SERVICE_ADDRESS = 'monitoring'  # address/name of the monitoring service
MONITORING_SERVICE_ADDRESS = '10.109.226.172'  # address/name of the monitoring service
MONITORING_SERVICE_ADDRESS = '10.98.180.171'  # address/name of the monitoring service
# CONTEXT_SERVICE_ADDRESS = 'context'  # address/name of the monitoring service
CONTEXT_SERVICE_ADDRESS = '10.98.160.79'  # address/name of the monitoring service
CONTEXT_SERVICE_ADDRESS = '10.97.61.5'  # address/name of the monitoring service
# SERVICE_SERVICE_ADDRESS = 'service'  # address/name of the service service
SERVICE_SERVICE_ADDRESS = '10.97.59.81'  # address/name of the service service
# INFERENCE_SERVICE_ADDRESS = 'dbscanserving'  # address/name of the inference service
+3 −0
Original line number Diff line number Diff line
@@ -27,14 +27,17 @@ touch proto/__init__.py
python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto context.proto
python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto service.proto
python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto monitoring.proto
python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto kpi_sample_types.proto

rm proto/context_pb2_grpc.py
rm proto/service_pb2_grpc.py
rm proto/monitoring_pb2_grpc.py
rm proto/kpi_sample_types_pb2_grpc.py

sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/context_pb2.py
sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/service_pb2.py
sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/monitoring_pb2.py
sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' proto/kpi_sample_types_pb2.py

# building current service protos
python -m grpc_tools.protoc -I../../proto --python_out=proto --grpc_python_out=proto optical_centralized_attack_detector.proto
+108 −98

File changed.

Preview size limit exceeded, changes collapsed.

+78 −0
Original line number Diff line number Diff line
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: kpi_sample_types.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()




DESCRIPTOR = _descriptor.FileDescriptor(
  name='kpi_sample_types.proto',
  package='kpi_sample_types',
  syntax='proto3',
  serialized_options=None,
  create_key=_descriptor._internal_create_key,
  serialized_pb=b'\n\x16kpi_sample_types.proto\x12\x10kpi_sample_types*x\n\rKpiSampleType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x17\n\x13PACKETS_TRANSMITTED\x10\x65\x12\x14\n\x10PACKETS_RECEIVED\x10\x66\x12\x16\n\x11\x42YTES_TRANSMITTED\x10\xc9\x01\x12\x13\n\x0e\x42YTES_RECEIVED\x10\xca\x01\x62\x06proto3'
)

_KPISAMPLETYPE = _descriptor.EnumDescriptor(
  name='KpiSampleType',
  full_name='kpi_sample_types.KpiSampleType',
  filename=None,
  file=DESCRIPTOR,
  create_key=_descriptor._internal_create_key,
  values=[
    _descriptor.EnumValueDescriptor(
      name='UNKNOWN', index=0, number=0,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='PACKETS_TRANSMITTED', index=1, number=101,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='PACKETS_RECEIVED', index=2, number=102,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='BYTES_TRANSMITTED', index=3, number=201,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='BYTES_RECEIVED', index=4, number=202,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
  ],
  containing_type=None,
  serialized_options=None,
  serialized_start=44,
  serialized_end=164,
)
_sym_db.RegisterEnumDescriptor(_KPISAMPLETYPE)

KpiSampleType = enum_type_wrapper.EnumTypeWrapper(_KPISAMPLETYPE)
UNKNOWN = 0
PACKETS_TRANSMITTED = 101
PACKETS_RECEIVED = 102
BYTES_TRANSMITTED = 201
BYTES_RECEIVED = 202


DESCRIPTOR.enum_types_by_name['KpiSampleType'] = _KPISAMPLETYPE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)


# @@protoc_insertion_point(module_scope)
+106 −310

File changed.

Preview size limit exceeded, changes collapsed.

Loading