diff --git a/.gitignore b/.gitignore index 861b80f..44b38f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ +# OS X Finder Files +.DS_Store + # Local Setup Scripts for Repo local_helper_scripts/* diff --git a/DataLoader.json b/DataLoader.json new file mode 100644 index 0000000..8726a3c --- /dev/null +++ b/DataLoader.json @@ -0,0 +1,54 @@ +{ + "fabric": { + "eventTypes": [ + "equinix.fabric.connection.attribute.changed", + "equinix.fabric.connection.bgpipv4_session_status.connect", + "equinix.fabric.connection.bgpipv4_session_status.established", + "equinix.fabric.connection.bgpipv4_session_status.idle", + "equinix.fabric.connection.bgpipv6_session_status.connect", + "equinix.fabric.connection.bgpipv6_session_status.established", + "equinix.fabric.connection.bgpipv6_session_status.idle", + "equinix.fabric.connection.state.deprovisioned", + "equinix.fabric.connection.state.deprovisioning", + "equinix.fabric.connection.state.pending", + "equinix.fabric.connection.state.pending_approval", + "equinix.fabric.connection.state.pending_interface_configuration", + "equinix.fabric.connection.state.provisioned", + "equinix.fabric.connection.state.provisioning", + "equinix.fabric.connection.status.down", + "equinix.fabric.connection.status.up", + "equinix.fabric.metric", + "equinix.fabric.network.state.deprovisioned", + "equinix.fabric.network.state.deprovisioning", + "equinix.fabric.network.state.provisioned", + "equinix.fabric.network.state.provisioning", + "equinix.fabric.port.state.deprovisioned", + "equinix.fabric.port.state.failed", + "equinix.fabric.port.state.provisioned", + "equinix.fabric.port.status.down", + "equinix.fabric.port.status.up", + "equinix.fabric.router.state.deprovisioned", + "equinix.fabric.router.state.deprovisioning", + "equinix.fabric.router.state.failed", + "equinix.fabric.router.state.not_deprovisioned", + "equinix.fabric.router.state.not_provisioned", + "equinix.fabric.router.state.provisioned", + "equinix.fabric.router.state.provisioning", + "equinix.fabric.router.state.reprovisioning", + "equinix.fabric.service_token.attribute.changed", + "equinix.fabric.service_token.state.deleted", + "equinix.fabric.service_token.state.inactive" + ], + "metricTypes": [ + "equinix.fabric.connection.bandwidth_rx.usage", + "equinix.fabric.connection.bandwidth_tx.usage", + "equinix.fabric.metro.{:asideMetroCode}_{:zsideMetroCode}.latency", + "equinix.fabric.port.bandwidth_rx.usage", + "equinix.fabric.port.bandwidth_tx.usage", + "equinix.fabric.port.packets_dropped_rx.count", + "equinix.fabric.port.packets_dropped_tx.count", + "equinix.fabric.port.packets_erred_rx.count", + "equinix.fabric.port.packets_erred_tx.count" + ] + } +} diff --git a/SupportedEventTypes_DataLoader.json b/SupportedEventTypes_DataLoader.json deleted file mode 100644 index e930956..0000000 --- a/SupportedEventTypes_DataLoader.json +++ /dev/null @@ -1,149 +0,0 @@ -[ - "equinix.fabric.connection.bandwidth_rx.usage", - "equinix.fabric.connection.bandwidth_tx.usage", - "equinix.fabric.connection.bgp_ipv4_session.active", - "equinix.fabric.connection.bgp_ipv4_session.connect", - "equinix.fabric.connection.bgp_ipv4_session.established", - "equinix.fabric.connection.bgp_ipv4_session.idle", - "equinix.fabric.connection.bgp_ipv4_session.openconfirm", - "equinix.fabric.connection.bgp_ipv4_session.opensent", - "equinix.fabric.connection.bgp_ipv4_status.down", - "equinix.fabric.connection.bgp_ipv4_status.up", - "equinix.fabric.connection.bgp_ipv6_session.active", - "equinix.fabric.connection.bgp_ipv6_session.connect", - "equinix.fabric.connection.bgp_ipv6_session.established", - "equinix.fabric.connection.bgp_ipv6_session.idle", - "equinix.fabric.connection.bgp_ipv6_session.openconfirm", - "equinix.fabric.connection.bgp_ipv6_session.opensent", - "equinix.fabric.connection.bgp_ipv6_status.down", - "equinix.fabric.connection.bgp_ipv6_status.up", - "equinix.fabric.connection.clear_bgp_ipv4.failed", - "equinix.fabric.connection.clear_bgp_ipv4.succeeded", - "equinix.fabric.connection.clear_bgp_ipv4_inbound.failed", - "equinix.fabric.connection.clear_bgp_ipv4_inbound.succeeded", - "equinix.fabric.connection.clear_bgp_ipv6.failed", - "equinix.fabric.connection.clear_bgp_ipv6.succeeded", - "equinix.fabric.connection.clear_bgp_ipv6_inbound.failed", - "equinix.fabric.connection.clear_bgp_ipv6_inbound.succeeded", - "equinix.fabric.connection.reset_bgp_ipv4.failed", - "equinix.fabric.connection.reset_bgp_ipv4.succeeded", - "equinix.fabric.connection.reset_bgp_ipv6.failed", - "equinix.fabric.connection.reset_bgp_ipv6.succeeded", - "equinix.fabric.connection.routing_protocol_state.deprovisioned", - "equinix.fabric.connection.routing_protocol_state.deprovisioning", - "equinix.fabric.connection.routing_protocol_state.failed", - "equinix.fabric.connection.routing_protocol_state.provisioned", - "equinix.fabric.connection.routing_protocol_state.provisioning", - "equinix.fabric.connection.routing_protocol_state.reprovisioning", - "equinix.fabric.connection.state.active", - "equinix.fabric.connection.state.cancelled", - "equinix.fabric.connection.state.deprovisioned", - "equinix.fabric.connection.state.deprovisioning", - "equinix.fabric.connection.state.draft", - "equinix.fabric.connection.state.failed", - "equinix.fabric.connection.state.pending", - "equinix.fabric.connection.state.provisioned", - "equinix.fabric.connection.state.provisioning", - "equinix.fabric.connection.state.reprovisioning", - "equinix.fabric.connection.status.down", - "equinix.fabric.connection.status.up", - "equinix.fabric.metric", - "equinix.fabric.metro.{:asideMetroCode}_{:zsideMetroCode}.latency", - "equinix.fabric.network.state.active", - "equinix.fabric.network.state.deleted", - "equinix.fabric.network.state.inactive", - "equinix.fabric.port.bandwidth_rx.usage", - "equinix.fabric.port.bandwidth_tx.usage", - "equinix.fabric.port.frames_dropped_rx.count", - "equinix.fabric.port.frames_dropped_tx.count", - "equinix.fabric.port.frames_erred_rx.count", - "equinix.fabric.port.frames_erred_tx.count", - "equinix.fabric.port.state.active", - "equinix.fabric.port.state.added", - "equinix.fabric.port.state.deleted", - "equinix.fabric.port.state.deprovisioned", - "equinix.fabric.port.state.deprovisioning", - "equinix.fabric.port.state.failed", - "equinix.fabric.port.state.inactive", - "equinix.fabric.port.state.pending", - "equinix.fabric.port.state.provisioned", - "equinix.fabric.port.state.provisioning", - "equinix.fabric.port.state.to_be_added", - "equinix.fabric.port.state.to_be_deleted", - "equinix.fabric.port.status.down", - "equinix.fabric.port.status.up", - "equinix.fabric.route_filter.rule_state.deprovisioned", - "equinix.fabric.route_filter.rule_state.deprovisioning", - "equinix.fabric.route_filter.rule_state.not_deprovisioned", - "equinix.fabric.route_filter.rule_state.not_provisioned", - "equinix.fabric.route_filter.rule_state.provisionined", - "equinix.fabric.route_filter.rule_state.provisioning", - "equinix.fabric.route_filter.rule_state.reprovisioning", - "equinix.fabric.route_filter.state.deprovisioned", - "equinix.fabric.route_filter.state.deprovisioning", - "equinix.fabric.route_filter.state.not_deprovisioned", - "equinix.fabric.route_filter.state.not_provisioned", - "equinix.fabric.route_filter.state.provisioned", - "equinix.fabric.route_filter.state.provisioning", - "equinix.fabric.route_filter.state.reprovisioning", - "equinix.fabric.route_filter.status.attached", - "equinix.fabric.route_filter.status.attaching", - "equinix.fabric.route_filter.status.detached", - "equinix.fabric.route_filter.status.detaching", - "equinix.fabric.route_filter.status.failed", - "equinix.fabric.route_filter.status.pending_bgp_configuration", - "equinix.fabric.router.advertised_route_entry_update.failed", - "equinix.fabric.router.advertised_route_entry_update.pending", - "equinix.fabric.router.advertised_route_entry_update.succeeded", - "equinix.fabric.router.bgp_session_status_update.failed", - "equinix.fabric.router.bgp_session_status_update.pending", - "equinix.fabric.router.bgp_session_status_update.succeeded", - "equinix.fabric.router.received_route_entry_update.failed", - "equinix.fabric.router.received_route_entry_update.pending", - "equinix.fabric.router.received_route_entry_update.succeeded", - "equinix.fabric.router.route_table_entry_update.failed", - "equinix.fabric.router.route_table_entry_update.pending", - "equinix.fabric.router.route_table_entry_update.succeeded", - "equinix.fabric.router.routes_ipv4_installed.utilization", - "equinix.fabric.router.routes_ipv6_installed.utilization", - "equinix.fabric.router.state.deprovisioned", - "equinix.fabric.router.state.deprovisioning", - "equinix.fabric.router.state.locked", - "equinix.fabric.router.state.not_deprovisioned", - "equinix.fabric.router.state.not_provisioned", - "equinix.fabric.router.state.provisioned", - "equinix.fabric.router.state.provisioning", - "equinix.fabric.service_profile.state.active", - "equinix.fabric.service_profile.state.deleted", - "equinix.fabric.service_profile.state.pending_approval", - "equinix.fabric.service_profile.state.rejected", - "equinix.fabric.service_token.state.active", - "equinix.fabric.service_token.state.deleted", - "equinix.fabric.service_token.state.expired", - "equinix.fabric.service_token.state.inactive", - "equinix.fabric.stream.resource_status.attached", - "equinix.fabric.stream.resource_status.attaching", - "equinix.fabric.stream.resource_status.detached", - "equinix.fabric.stream.resource_status.detaching", - "equinix.fabric.stream.resource_status.failed", - "equinix.fabric.stream.state.deprovisioned", - "equinix.fabric.stream.state.deprovisioning", - "equinix.fabric.stream.state.failed", - "equinix.fabric.stream.state.provisioned", - "equinix.fabric.stream.state.provisioning", - "equinix.fabric.stream_subscription.state.deprovisioned", - "equinix.fabric.stream_subscription.state.deprovisioning", - "equinix.fabric.stream_subscription.state.failed", - "equinix.fabric.stream_subscription.state.provisioned", - "equinix.fabric.stream_subscription.state.provisioning", - "equinix.fabric.time_service.state.cancelled", - "equinix.fabric.time_service.state.configuring", - "equinix.fabric.time_service.state.configuring_failed", - "equinix.fabric.time_service.state.deprovisioned", - "equinix.fabric.time_service.state.deprovisioning", - "equinix.fabric.time_service.state.deprovisioning_failed", - "equinix.fabric.time_service.state.pending_configuration", - "equinix.fabric.time_service.state.provisioned", - "equinix.fabric.time_service.state.provisioning", - "equinix.fabric.time_service.state.provisioning_failed" -] diff --git a/jsonschema/equinix/events/fabric/v1/ChangeAlert.json b/jsonschema/equinix/events/fabric/v1/ChangeAlert.json index 7b0166c..3175b44 100644 --- a/jsonschema/equinix/events/fabric/v1/ChangeAlert.json +++ b/jsonschema/equinix/events/fabric/v1/ChangeAlert.json @@ -4,16 +4,7 @@ "examples": [], "package": "equinix.events.fabric.v1", "datatype": "equinix.events.fabric.v1.ChangeAlert", - "cloudeventTypes": [ - "equinix.fabric.connection.status.up", - "equinix.fabric.connection.status.down", - "equinix.fabric.connection.bgp_ipv4_status.up", - "equinix.fabric.connection.bgp_ipv4_status.down", - "equinix.fabric.connection.bgp_ipv6_status.up", - "equinix.fabric.connection.bgp_ipv6_status.down", - "equinix.fabric.port.status.up", - "equinix.fabric.port.status.down" - ], + "cloudeventTypes": [], "product": "Equinix Fabric ChangeAlert", "$schema": "http://json-schema.org/draft-04/schema#", "$ref": "#/definitions/Data", diff --git a/jsonschema/equinix/events/fabric/v1/ChangeEvent.json b/jsonschema/equinix/events/fabric/v1/ChangeEvent.json index 228f69d..ecc3f7f 100644 --- a/jsonschema/equinix/events/fabric/v1/ChangeEvent.json +++ b/jsonschema/equinix/events/fabric/v1/ChangeEvent.json @@ -5,141 +5,42 @@ "package": "equinix.events.fabric.v1", "datatype": "equinix.events.fabric.v1.ChangeEvent", "cloudeventTypes": [ - "equinix.fabric.connection.status.up", - "equinix.fabric.connection.status.down", - "equinix.fabric.connection.state.draft", - "equinix.fabric.connection.state.cancelled", - "equinix.fabric.connection.state.pending", - "equinix.fabric.connection.state.provisioning", - "equinix.fabric.connection.state.provisioned", - "equinix.fabric.connection.state.active", - "equinix.fabric.connection.state.reprovisioning", - "equinix.fabric.connection.state.deprovisioning", - "equinix.fabric.connection.state.deprovisioned", - "equinix.fabric.connection.state.failed", - "equinix.fabric.connection.routing_protocol_state.provisioning", - "equinix.fabric.connection.routing_protocol_state.provisioned", - "equinix.fabric.connection.routing_protocol_state.reprovisioning", - "equinix.fabric.connection.routing_protocol_state.deprovisioning", - "equinix.fabric.connection.routing_protocol_state.deprovisioned", - "equinix.fabric.connection.routing_protocol_state.failed", - "equinix.fabric.connection.bgp_ipv4_status.up", - "equinix.fabric.connection.bgp_ipv4_status.down", - "equinix.fabric.connection.bgp_ipv6_status.up", - "equinix.fabric.connection.bgp_ipv6_status.down", - "equinix.fabric.connection.bgp_ipv4_session.established", - "equinix.fabric.connection.bgp_ipv4_session.connect", - "equinix.fabric.connection.bgp_ipv4_session.opensent", - "equinix.fabric.connection.bgp_ipv4_session.openconfirm", - "equinix.fabric.connection.bgp_ipv4_session.active", - "equinix.fabric.connection.bgp_ipv4_session.idle", - "equinix.fabric.connection.bgp_ipv6_session.established", - "equinix.fabric.connection.bgp_ipv6_session.connect", - "equinix.fabric.connection.bgp_ipv6_session.opensent", - "equinix.fabric.connection.bgp_ipv6_session.openconfirm", - "equinix.fabric.connection.bgp_ipv6_session.active", - "equinix.fabric.connection.bgp_ipv6_session.idle", - "equinix.fabric.connection.reset_bgp_ipv4.succeeded", - "equinix.fabric.connection.reset_bgp_ipv4.failed", - "equinix.fabric.connection.reset_bgp_ipv6.succeeded", - "equinix.fabric.connection.reset_bgp_ipv6.failed", - "equinix.fabric.connection.clear_bgp_ipv4.succeeded", - "equinix.fabric.connection.clear_bgp_ipv4.failed", - "equinix.fabric.connection.clear_bgp_ipv6.succeeded", - "equinix.fabric.connection.clear_bgp_ipv6.failed", - "equinix.fabric.connection.clear_bgp_ipv4_inbound.succeeded", - "equinix.fabric.connection.clear_bgp_ipv4_inbound.failed", - "equinix.fabric.connection.clear_bgp_ipv6_inbound.succeeded", - "equinix.fabric.connection.clear_bgp_ipv6_inbound.failed", - "equinix.fabric.route_filter.state.provisioning", - "equinix.fabric.route_filter.state.provisioned", - "equinix.fabric.route_filter.state.reprovisioning", - "equinix.fabric.route_filter.state.deprovisioning", - "equinix.fabric.route_filter.state.deprovisioned", - "equinix.fabric.route_filter.state.not_provisioned", - "equinix.fabric.route_filter.state.not_deprovisioned", - "equinix.fabric.route_filter.rule_state.provisioning", - "equinix.fabric.route_filter.rule_state.provisionined", - "equinix.fabric.route_filter.rule_state.reprovisioning", - "equinix.fabric.route_filter.rule_state.deprovisioning", - "equinix.fabric.route_filter.rule_state.deprovisioned", - "equinix.fabric.route_filter.rule_state.not_provisioned", - "equinix.fabric.route_filter.rule_state.not_deprovisioned", - "equinix.fabric.route_filter.status.pending_bgp_configuration", - "equinix.fabric.route_filter.status.attaching", - "equinix.fabric.route_filter.status.attached", - "equinix.fabric.route_filter.status.detaching", - "equinix.fabric.route_filter.status.detached", - "equinix.fabric.route_filter.status.failed", - "equinix.fabric.port.status.up", - "equinix.fabric.port.status.down", - "equinix.fabric.port.state.pending", - "equinix.fabric.port.state.provisioning", - "equinix.fabric.port.state.provisioned", - "equinix.fabric.port.state.active", - "equinix.fabric.port.state.inactive", - "equinix.fabric.port.state.deprovisioning", - "equinix.fabric.port.state.deprovisioned", - "equinix.fabric.port.state.failed", - "equinix.fabric.port.state.to_be_added", - "equinix.fabric.port.state.to_be_deleted", - "equinix.fabric.port.state.added", - "equinix.fabric.port.state.deleted", "equinix.fabric.router.state.provisioning", "equinix.fabric.router.state.provisioned", - "equinix.fabric.router.state.locked", + "equinix.fabric.router.state.reprovisioning", "equinix.fabric.router.state.deprovisioning", "equinix.fabric.router.state.deprovisioned", + "equinix.fabric.router.state.failed", "equinix.fabric.router.state.not_provisioned", "equinix.fabric.router.state.not_deprovisioned", - "equinix.fabric.router.bgp_session_status_update.pending", - "equinix.fabric.router.bgp_session_status_update.succeeded", - "equinix.fabric.router.bgp_session_status_update.failed", - "equinix.fabric.router.route_table_entry_update.pending", - "equinix.fabric.router.route_table_entry_update.succeeded", - "equinix.fabric.router.route_table_entry_update.failed", - "equinix.fabric.router.received_route_entry_update.pending", - "equinix.fabric.router.received_route_entry_update.succeeded", - "equinix.fabric.router.received_route_entry_update.failed", - "equinix.fabric.router.advertised_route_entry_update.pending", - "equinix.fabric.router.advertised_route_entry_update.succeeded", - "equinix.fabric.router.advertised_route_entry_update.failed", - "equinix.fabric.network.state.active", - "equinix.fabric.network.state.inactive", - "equinix.fabric.network.state.deleted", - "equinix.fabric.time_service.state.pending_configuration", - "equinix.fabric.time_service.state.provisioning", - "equinix.fabric.time_service.state.provisioned", - "equinix.fabric.time_service.state.deprovisioning", - "equinix.fabric.time_service.state.deprovisioned", - "equinix.fabric.time_service.state.configuring_failed", - "equinix.fabric.time_service.state.provisioning_failed", - "equinix.fabric.time_service.state.deprovisioning_failed", - "equinix.fabric.time_service.state.configuring", - "equinix.fabric.time_service.state.cancelled", - "equinix.fabric.service_token.state.active", + "equinix.fabric.port.state.provisioned", + "equinix.fabric.port.state.deprovisioned", + "equinix.fabric.port.state.failed", + "equinix.fabric.port.status.up", + "equinix.fabric.port.status.down", "equinix.fabric.service_token.state.inactive", - "equinix.fabric.service_token.state.expired", "equinix.fabric.service_token.state.deleted", - "equinix.fabric.service_profile.state.pending_approval", - "equinix.fabric.service_profile.state.rejected", - "equinix.fabric.service_profile.state.active", - "equinix.fabric.service_profile.state.deleted", - "equinix.fabric.stream.state.provisioning", - "equinix.fabric.stream.state.provisioned", - "equinix.fabric.stream.state.deprovisioning", - "equinix.fabric.stream.state.deprovisioned", - "equinix.fabric.stream.state.failed", - "equinix.fabric.stream.resource_status.attaching", - "equinix.fabric.stream.resource_status.attached", - "equinix.fabric.stream.resource_status.detaching", - "equinix.fabric.stream.resource_status.detached", - "equinix.fabric.stream.resource_status.failed", - "equinix.fabric.stream_subscription.state.provisioning", - "equinix.fabric.stream_subscription.state.provisioned", - "equinix.fabric.stream_subscription.state.deprovisioning", - "equinix.fabric.stream_subscription.state.deprovisioned", - "equinix.fabric.stream_subscription.state.failed" + "equinix.fabric.service_token.attribute.changed", + "equinix.fabric.connection.state.pending", + "equinix.fabric.connection.state.pending_interface_configuration", + "equinix.fabric.connection.state.provisioning", + "equinix.fabric.connection.state.provisioned", + "equinix.fabric.connection.state.deprovisioning", + "equinix.fabric.connection.state.deprovisioned", + "equinix.fabric.connection.state.pending_approval", + "equinix.fabric.connection.attribute.changed", + "equinix.fabric.connection.status.up", + "equinix.fabric.connection.status.down", + "equinix.fabric.connection.bgpipv4_session_status.established", + "equinix.fabric.connection.bgpipv4_session_status.idle", + "equinix.fabric.connection.bgpipv4_session_status.connect", + "equinix.fabric.connection.bgpipv6_session_status.established", + "equinix.fabric.connection.bgpipv6_session_status.idle", + "equinix.fabric.connection.bgpipv6_session_status.connect", + "equinix.fabric.network.state.provisioning", + "equinix.fabric.network.state.provisioned", + "equinix.fabric.network.state.deprovisioning", + "equinix.fabric.network.state.deprovisioned" ], "product": "Equinix Fabric ChangeEvent", "$schema": "http://json-schema.org/draft-04/schema#", diff --git a/jsonschema/equinix/events/fabric/v1/MetricAlert.json b/jsonschema/equinix/events/fabric/v1/MetricAlert.json index b842895..41c55ae 100644 --- a/jsonschema/equinix/events/fabric/v1/MetricAlert.json +++ b/jsonschema/equinix/events/fabric/v1/MetricAlert.json @@ -4,10 +4,7 @@ "examples": [], "package": "equinix.events.fabric.v1", "datatype": "equinix.events.fabric.v1.MetricAlert", - "cloudeventTypes": [ - "equinix.fabric.router.routes_ipv4_installed.utilization", - "equinix.fabric.router.routes_ipv6_installed.utilization" - ], + "cloudeventTypes": [], "product": "Equinix Fabric MetricAlert", "$schema": "http://json-schema.org/draft-04/schema#", "$ref": "#/definitions/Data", diff --git a/jsonschema/equinix/events/fabric/v1/MetricEvent.json b/jsonschema/equinix/events/fabric/v1/MetricEvent.json index 7363ea6..090e75c 100644 --- a/jsonschema/equinix/events/fabric/v1/MetricEvent.json +++ b/jsonschema/equinix/events/fabric/v1/MetricEvent.json @@ -5,22 +5,22 @@ "package": "equinix.events.fabric.v1", "datatype": "equinix.events.fabric.v1.MetricEvent", "cloudeventTypes": [ - "equinix.fabric.connection.bandwidth_rx.usage", - "equinix.fabric.connection.bandwidth_tx.usage", - "equinix.fabric.port.bandwidth_rx.usage", - "equinix.fabric.port.bandwidth_tx.usage", - "equinix.fabric.port.frames_erred_rx.count", - "equinix.fabric.port.frames_erred_tx.count", - "equinix.fabric.port.frames_dropped_rx.count", - "equinix.fabric.port.frames_dropped_tx.count", - "equinix.fabric.router.routes_ipv4_installed.utilization", - "equinix.fabric.router.routes_ipv6_installed.utilization", - "equinix.fabric.metro.{:asideMetroCode}_{:zsideMetroCode}.latency", "equinix.fabric.metric" ], "product": "Equinix Fabric MetricEvent", "$schema": "http://json-schema.org/draft-04/schema#", "$ref": "#/definitions/Data", + "metricTypes": [ + "equinix.fabric.port.packets_erred_rx.count", + "equinix.fabric.port.packets_erred_tx.count", + "equinix.fabric.port.packets_dropped_rx.count", + "equinix.fabric.port.packets_dropped_tx.count", + "equinix.fabric.metro.{:asideMetroCode}_{:zsideMetroCode}.latency", + "equinix.fabric.connection.bandwidth_rx.usage", + "equinix.fabric.connection.bandwidth_tx.usage", + "equinix.fabric.port.bandwidth_rx.usage", + "equinix.fabric.port.bandwidth_tx.usage" + ], "definitions": { "Data": { "properties": { diff --git a/scripts/update_data_loader.py b/scripts/update_data_loader.py index 6ff3bf6..f66a641 100644 --- a/scripts/update_data_loader.py +++ b/scripts/update_data_loader.py @@ -1,20 +1,31 @@ import os import json +from collections import defaultdict def retrieve_supported_events(): directory = os.path.dirname(os.path.abspath(__file__)) + '/../jsonschema' - events = set() + dataLoaderStructure = {} for root, dirs, files in os.walk(directory): for file in files: - if file.endswith('.json') and file != "catalog.json": with open(root + "/" + file, "r") as eventFile: + product = root.split("/")[-2] data = json.load(eventFile) - events.update(data["cloudeventTypes"]) - return sorted(events) + if product not in dataLoaderStructure: + dataLoaderStructure[product] = { + "eventTypes": [], + "metricTypes": [], + } + dataLoaderStructure[product]["eventTypes"].extend(data["cloudeventTypes"]) + if "metricTypes" in data: + dataLoaderStructure[product]["metricTypes"].extend(data["metricTypes"]) + dataLoaderStructure[product]["eventTypes"] = sorted(set(dataLoaderStructure[product]["eventTypes"])) + dataLoaderStructure[product]["metricTypes"] = sorted(set(dataLoaderStructure[product]["metricTypes"])) + + return dict(sorted(dataLoaderStructure.items())) def writeSupportedEventsToDataLoaderFile(supportedEvents): - with open(os.path.dirname(os.path.abspath(__file__)) + "/../SupportedEventTypes_DataLoader.json", "w") as eventsFile: + with open(os.path.dirname(os.path.abspath(__file__)) + "/../DataLoader.json", "w") as eventsFile: eventsFile.write(json.dumps(supportedEvents, indent=4)) eventsFile.write("\n")