Skip to content

Commit

Permalink
Merge pull request #72 from yahoo/update_enrichment_schemas
Browse files Browse the repository at this point in the history
Update Enrichment Schemas
  • Loading branch information
rexfury-of-oath authored Sep 19, 2019
2 parents ec08e52 + d29495b commit a932a4b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
15 changes: 11 additions & 4 deletions yahoo_panoptes/enrichment/schema/neighbor.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,24 @@ 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},
'ipv6_address': {'type': 'list', 'required': True},
'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}
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions yahoo_panoptes/enrichment/schema/operational.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
14 changes: 2 additions & 12 deletions yahoo_panoptes/enrichment/schema/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
}
Expand Down

0 comments on commit a932a4b

Please sign in to comment.