From 14736887804075b6ab6755560a977759ba58b104 Mon Sep 17 00:00:00 2001 From: Tim Hogarty Date: Thu, 14 Nov 2024 16:56:24 -0800 Subject: [PATCH] Update metricTypes to metricNames and update json catalog and README.md catalog --- README.md | 8 +- jsonschema/catalog.json | 189 +++++------------------ scripts/generate_json_catalog.py | 9 +- scripts/generate_readme_event_catalog.py | 6 +- 4 files changed, 54 insertions(+), 158 deletions(-) diff --git a/README.md b/README.md index a15660f..8ff306f 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ The following data payloads are the supported events and formats for Equinix Obs |Product|Schemas|Types| |-|-|-| -|Equinix Fabric ChangeAlert|[JSON](https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/ChangeAlert.json)|
Data Type:
`equinix.events.fabric.v1.ChangeAlert`
CloudEvent Type(s):
`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`
| -|Equinix Fabric ChangeEvent|[JSON](https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/ChangeEvent.json)|
Data Type:
`equinix.events.fabric.v1.ChangeEvent`
CloudEvent Type(s):
`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.deprovisioning`
`equinix.fabric.router.state.deprovisioned`
`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.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 MetricAlert|[JSON](https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/MetricAlert.json)|
Data Type:
`equinix.events.fabric.v1.MetricAlert`
CloudEvent Type(s):
`equinix.fabric.router.routes_ipv4_installed.utilization`
`equinix.fabric.router.routes_ipv6_installed.utilization`
| -|Equinix Fabric MetricEvent|[JSON](https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/MetricEvent.json)|
Data Type:
`equinix.events.fabric.v1.MetricEvent`
CloudEvent Type(s):
`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`
| +|Equinix Fabric ChangeAlert|[JSON](https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/ChangeAlert.json)|
Data Type:
`equinix.events.fabric.v1.ChangeAlert`
CloudEvent Type(s):

| +|Equinix Fabric ChangeEvent|[JSON](https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/ChangeEvent.json)|
Data Type:
`equinix.events.fabric.v1.ChangeEvent`
CloudEvent Type(s):
`equinix.fabric.router.state.provisioning`
`equinix.fabric.router.state.provisioned`
`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.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.deleted`
`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`
| +|Equinix Fabric MetricAlert|[JSON](https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/MetricAlert.json)|
Data Type:
`equinix.events.fabric.v1.MetricAlert`
CloudEvent Type(s):

| +|Equinix Fabric MetricEvent|[JSON](https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/MetricEvent.json)|
Data Type:
`equinix.events.fabric.v1.MetricEvent`
CloudEvent Type(s):
`equinix.fabric.metric`

Metric Type(s):
`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`
| diff --git a/jsonschema/catalog.json b/jsonschema/catalog.json index 83ef878..f303b6a 100644 --- a/jsonschema/catalog.json +++ b/jsonschema/catalog.json @@ -8,16 +8,7 @@ "name": "ChangeAlert", "description": "The data within all ChangeAlert events.", "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": [] }, { "url": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/ChangeEvent.json", @@ -26,141 +17,42 @@ "description": "The data within all ChangeEvent events.", "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" ] }, { @@ -169,10 +61,7 @@ "name": "MetricAlert", "description": "The data within all MetricAlert events.", "datatype": "equinix.events.fabric.v1.MetricAlert", - "cloudeventTypes": [ - "equinix.fabric.router.routes_ipv4_installed.utilization", - "equinix.fabric.router.routes_ipv6_installed.utilization" - ] + "cloudeventTypes": [] }, { "url": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/MetricEvent.json", @@ -181,18 +70,18 @@ "description": "The data within all MetricEvent events.", "datatype": "equinix.events.fabric.v1.MetricEvent", "cloudeventTypes": [ + "equinix.fabric.metric" + ], + "metricNames": [ + "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", - "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" + "equinix.fabric.port.bandwidth_tx.usage" ] } ] diff --git a/scripts/generate_json_catalog.py b/scripts/generate_json_catalog.py index ae11f41..114f148 100644 --- a/scripts/generate_json_catalog.py +++ b/scripts/generate_json_catalog.py @@ -9,14 +9,17 @@ def retrieve_json_schemas(): if file.endswith('.json') and file != "catalog.json": with open(root + "/" + file, "r") as eventFile: data = json.load(eventFile) - json_schemas.append({ + newItem = { "url": data["$id"], "product": data["product"], "name": data["name"], - "description": data["definitions"][data["name"]]["description"], + "description": data["definitions"]["Data"]["description"], "datatype": data["datatype"], "cloudeventTypes": data["cloudeventTypes"] - }) + } + if "metricNames" in data: + newItem["metricNames"] = data["metricNames"] + json_schemas.append(newItem) json_schemas.sort(key=lambda x: x["url"]) return json_schemas diff --git a/scripts/generate_readme_event_catalog.py b/scripts/generate_readme_event_catalog.py index 410158b..32fa4c1 100644 --- a/scripts/generate_readme_event_catalog.py +++ b/scripts/generate_readme_event_catalog.py @@ -3,7 +3,11 @@ def table_row(schema): cloudEventTypes = "
".join(map(lambda x: f"`{x}`", schema["cloudeventTypes"])) - return f"|{schema["product"]}|[JSON]({schema["url"]})|
Data Type:
`{schema["datatype"]}`
CloudEvent Type(s):
{cloudEventTypes}
|" + metrics = "" + if "metricNames" in schema: + metricNames = "
".join(map(lambda x: f"`{x}`", schema["metricNames"])) + metrics = f"
Metric Type(s):
{metricNames}
" + return f"|{schema["product"]}|[JSON]({schema["url"]})|
Data Type:
`{schema["datatype"]}`
CloudEvent Type(s):
{cloudEventTypes}
{metrics}|" def replace_readme_catalog(): readme_path = os.path.dirname(os.path.abspath(__file__)) + "/../README.md"