From d29495b89539f2ea0752ba6f832aeb56770a7d2c Mon Sep 17 00:00:00 2001 From: Nathan Kamm Date: Thu, 19 Sep 2019 09:14:38 -0700 Subject: [PATCH] Update Enrichment Schemas --- yahoo_panoptes/enrichment/schema/neighbor.py | 15 +++++++++++---- yahoo_panoptes/enrichment/schema/operational.py | 6 ++++++ yahoo_panoptes/enrichment/schema/topology.py | 14 ++------------ 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/yahoo_panoptes/enrichment/schema/neighbor.py b/yahoo_panoptes/enrichment/schema/neighbor.py index 29ab884b..62336768 100644 --- a/yahoo_panoptes/enrichment/schema/neighbor.py +++ b/yahoo_panoptes/enrichment/schema/neighbor.py @@ -18,9 +18,9 @@ class PanoptesNeighborEnrichmentSchemaValidator(PanoptesEnrichmentSchemaValidato 'description': {'type': 'string', 'required': True}, 'type': {'type': 'string', 'required': True}, 'layer': {'type': 'integer', 'required': True}, - 'belongs_to_lag': {'type': 'dict', 'required': True}, - 'child_of_vlan': {'type': 'dict', 'required': True}, - 'parent_of': {'type': 'dict', 'required': True}, + 'member_of_lag': {'type': 'dict', 'required': True}, + 'member_of_svi': {'type': 'dict', 'required': True}, + 'lag_members': {'type': 'dict', 'required': True}, 'ipv6_neighbor': {'type': 'dict', 'required': True}, 'ipv4_neighbor': {'type': 'dict', 'required': True}, 'l2_neighbor': {'type': 'dict', 'required': True}, @@ -28,7 +28,14 @@ class PanoptesNeighborEnrichmentSchemaValidator(PanoptesEnrichmentSchemaValidato 'ipv4_address': {'type': 'list', 'required': True}, 'vlans': {'type': 'dict', 'required': True}, 'spanning_tree': {'type': 'dict', 'required': True}, - 'mac_address': {'type': 'string', 'required': True} + 'mac_address': {'type': 'string', 'required': True}, + 'svi_physical_members': {'type': 'dict', 'required': True}, + 'sub_interfaces': {'type': 'dict', 'required': True}, + 'primary_interface': {'type': 'dict', 'required': True}, + 'link_state': {'type': 'string', 'required': True}, + 'admin_state': {'type': 'string', 'required': True}, + 'category': {'type': 'string', 'required': True}, + 'name': {'type': 'string', 'required': True} } } } diff --git a/yahoo_panoptes/enrichment/schema/operational.py b/yahoo_panoptes/enrichment/schema/operational.py index 7dafe6fa..3e6759ca 100644 --- a/yahoo_panoptes/enrichment/schema/operational.py +++ b/yahoo_panoptes/enrichment/schema/operational.py @@ -17,6 +17,12 @@ class PanoptesOperationalEnrichmentSchemaValidator(PanoptesEnrichmentSchemaValid 'type': 'dict', 'schema': { 'snmpenginetime': {'type': 'integer', 'required': False}, # epoch seconds since last restart + 'sysdescr': {'type': 'string', 'required': False}, + 'device_vendor': {'type': 'string', 'required': False}, + 'device_model': {'type': 'string', 'required': False}, + 'device_os': {'type': 'string', 'required': False}, + 'device_os_version': {'type': 'string', 'required': False}, + # yahoo_panoptes.plugins.polling.utilities.polling_status.DEVICE_METRICS_STATES 'device_polling_status': {'type': 'integer', 'required': True}, 'last_updated': {'type': 'integer', 'required': False}, # epoch seconds since last update } diff --git a/yahoo_panoptes/enrichment/schema/topology.py b/yahoo_panoptes/enrichment/schema/topology.py index ab101f5a..433f461e 100644 --- a/yahoo_panoptes/enrichment/schema/topology.py +++ b/yahoo_panoptes/enrichment/schema/topology.py @@ -15,18 +15,8 @@ class PanoptesTopologyEnrichmentSchemaValidator(PanoptesEnrichmentSchemaValidato 'enrichment_label': { 'type': 'dict', 'schema': { - 'local_interface': {'type': 'string', 'required': True}, - 'local_interface_layer': {'type': 'integer', 'required': True}, - 'local_lag_members': {'type': 'list', 'required': True}, - 'local_interface_stp_mode': {'type': 'string', 'required': True}, - 'local_interface_ip_version': {'type': 'dict', 'required': True}, - 'remote_device': {'type': ['string', 'dict'], 'required': True}, - 'remote_interface': {'type': 'string', 'required': True}, - 'remote_interface_index': {'type': 'string', 'required': True}, - 'remote_interface_layer': {'type': 'integer', 'required': True}, - 'remote_interface_stp_mode': {'type': 'string', 'required': True}, - 'remote_lag_members': {'type': 'list', 'required': True}, - 'remote_interface_ip_version': {'type': 'dict', 'required': True}, + 'interface': {'type': 'string', 'required': True}, + 'neighbor': {'type': 'dict', 'required': True}, 'map_type': {'type': 'string', 'required': True} } }