Verified Commit 03da772c authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Add remote_system, remote_id to Sensor.

parent 60b69dc3
Pipeline #36348 failed with stages
in 15 minutes and 42 seconds
......@@ -14,7 +14,15 @@ from typing import Dict, Optional, Iterable, List
# Third-party modules
from mongoengine.document import Document
from mongoengine.fields import StringField, IntField, LongField, ListField, DateTimeField, DictField
from mongoengine.fields import (
StringField,
IntField,
LongField,
ListField,
DateTimeField,
DictField,
ReferenceField,
)
import cachetools
# NOC modules
......@@ -22,6 +30,7 @@ from noc.core.wf.decorator import workflow
from noc.core.bi.decorator import bi_sync
from noc.core.mongo.fields import PlainReferenceField, ForeignKeyField
from noc.main.models.label import Label
from noc.main.models.remotesystem import RemoteSystem
from noc.inv.models.object import Object
from noc.sa.models.managedobject import ManagedObject
from noc.pm.models.measurementunits import MeasurementUnits
......@@ -81,6 +90,11 @@ class Sensor(Document):
modbus_format = StringField(choices=MODBUS_FORMAT)
snmp_oid = StringField()
ipmi_id = StringField()
# Integration with external NRI and TT systems
# Reference to remote system object has been imported from
remote_system = ReferenceField(RemoteSystem)
# Object id in remote system
remote_id = StringField()
bi_id = LongField(unique=True)
# Labels
labels = ListField(StringField())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment