From 6469510af1da93ee5aac1a196746317e20b721f8 Mon Sep 17 00:00:00 2001 From: Binny Date: Mon, 21 Apr 2025 16:24:18 +0000 Subject: [PATCH] OLS-655 draft changes --- state/link-state.yml | 72 ++++++++++++++ state/state.yml | 75 +++++++++++++++ ucentral.state.pretty.json | 191 +++++++++++++++++++++++++++++++++++++ 3 files changed, 338 insertions(+) diff --git a/state/link-state.yml b/state/link-state.yml index d7b2e97..3e3c8be 100644 --- a/state/link-state.yml +++ b/state/link-state.yml @@ -191,3 +191,75 @@ properties: description: Max power (in Watts) module can drain. type: number + loop-detect-protocol: + description: Status and protocol information for loop detection or prevention mechanisms + active on this interface. Includes STP/xSTP/MSTP, Loopback Detection (LBD), etc. + type: object + properties: + stp: + description: Spanning Tree Protocol (IEEE 802.1D/RSTP/MSTP) state on the port. + type: object + properties: + protocol: + type: string + description: Variant of STP running (e.g., STP, RSTP, MSTP, RPVST+). + examples: + - RSTP + - MSTP + state: + type: string + description: STP state of the port. + enum: + - DISABLED + - BLOCKING + - LISTENING + - LEARNING + - FORWARDING + role: + type: string + description: Role of the port in STP topology. + enum: + - ROOT + - DESIGNATED + - ALTERNATE + - BACKUP + - DISABLED + bridge-id: + type: string + description: STP Bridge ID + root-bridge-id: + type: string + description: STP Root Bridge ID for the instance. + oper-edge-port: + type: boolean + description: Whether the port is operating as an edge port (no BPDU expected). + cost: + type: integer + description: Operational path cost of the port. + designated-cost: + type: integer + description: Cost advertised by the designated port. + transitions: + type: integer + description: Number of STP state transitions (forwarding/discarding) on this port. + lbd: + description: Loopback Detection (LBD) status on this port. + type: object + properties: + enabled: + type: boolean + description: Whether LBD is enabled on this port. + state: + type: string + description: Current loop detection status. + enum: + - NO_LOOP + - LOOP_DETECTED + - DISABLED + action: + type: string + description: Action taken when loop is detected (e.g., block, shutdown). + enum: + - NONE + - BLOCK + - SHUTDOWN \ No newline at end of file diff --git a/state/state.yml b/state/state.yml index 6c4b5e4..107b9c1 100644 --- a/state/state.yml +++ b/state/state.yml @@ -114,3 +114,78 @@ properties: blocked-interface: type: string description: The interface (e.g., port) where the blocked entry was detected. + stp: + description: Global status and configuration of the Spanning Tree Protocol (STP) across the switch. + Supports variants like STP, RSTP, MSTP. Includes bridge-wide parameters and protocol behavior. + type: object + properties: + enabled: + type: boolean + description: Whether STP is enabled globally on the switch. + mode: + type: string + description: Operational STP mode used across the switch. + enum: + - STP + - RSTP + - MSTP + - PVST + - RPVSTP + transmission-limit: + type: integer + description: Maximum number of BPDUs that can be transmitted per hello time. + path-cost-method: + type: string + description: Indicates whether "Short" or "Long" path cost method is in use. + enum: + - Short + - Long + max-hops: + type: integer + description: Maximum hop count used in MSTP. + instances: + type: array + description: List of STP instances (e.g., MSTP instances). + items: + type: object + properties: + instance-id: + type: integer + description: Instance number (for MSTP or multiple-instance support). + vlans: + type: string + description: VLAN ranges associated with the STP instance. + example: "1-4094" + bridge-priority: + type: integer + description: Bridge priority value for STP election. + bridge-hello-time: + type: integer + description: Hello Time interval (in seconds) configured on the bridge. + bridge-max-age: + type: integer + description: Max Age value (in seconds) used for aging STP information. + bridge-forward-delay: + type: integer + description: Delay (in seconds) before transitioning port to forwarding state. + remaining-hops: + type: integer + description: Remaining hop count from the Root Bridge to this bridge. + root-bridge-id: + type: string + description: Bridge ID of the current Root Bridge. + root-port: + type: string + description: Local interface acting as Root Port. + example: + - Ëthernet1 + root-cost: + type: integer + description: Cumulative cost to reach the Root Bridge. + topology-changes: + type: integer + description: Total number of topology changes detected. + last-topology-change-seconds: + type: integer + description: Time (in seconds) since the last topology change. + \ No newline at end of file diff --git a/ucentral.state.pretty.json b/ucentral.state.pretty.json index e678131..4da69fa 100644 --- a/ucentral.state.pretty.json +++ b/ucentral.state.pretty.json @@ -158,6 +158,103 @@ } } } + }, + "stp": { + "description": "Global status and configuration of the Spanning Tree Protocol (STP) across the switch. Supports variants like STP, RSTP, MSTP. Includes bridge-wide parameters and protocol behavior.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether STP is enabled globally on the switch." + }, + "mode": { + "type": "string", + "description": "Operational STP mode used across the switch.", + "enum": [ + "STP", + "RSTP", + "MSTP", + "PVST", + "RPVSTP" + ] + }, + "transmission-limit": { + "type": "integer", + "description": "Maximum number of BPDUs that can be transmitted per hello time." + }, + "path-cost-method": { + "type": "string", + "description": "Indicates whether \"Short\" or \"Long\" path cost method is in use.", + "enum": [ + "Short", + "Long" + ] + }, + "max-hops": { + "type": "integer", + "description": "Maximum hop count used in MSTP." + }, + "instances": null, + "type": "array", + "description": "List of STP instances (e.g., MSTP instances).", + "items": { + "type": "object", + "properties": { + "instance-id": { + "type": "integer", + "description": "Instance number (for MSTP or multiple-instance support)." + } + }, + "vlans": { + "type": "string", + "description": "VLAN ranges associated with the STP instance.", + "example": "1-4094" + }, + "bridge-priority": { + "type": "integer", + "description": "Bridge priority value for STP election." + }, + "bridge-hello-time": { + "type": "integer", + "description": "Hello Time interval (in seconds) configured on the bridge." + }, + "bridge-max-age": { + "type": "integer", + "description": "Max Age value (in seconds) used for aging STP information." + }, + "bridge-forward-delay": { + "type": "integer", + "description": "Delay (in seconds) before transitioning port to forwarding state." + }, + "remaining-hops": { + "type": "integer", + "description": "Remaining hop count from the Root Bridge to this bridge." + }, + "root-bridge-id": { + "type": "string", + "description": "Bridge ID of the current Root Bridge." + }, + "root-port": { + "type": "string", + "description": "Local interface acting as Root Port.", + "example": [ + "\u00cbthernet1" + ] + }, + "root-cost": { + "type": "integer", + "description": "Cumulative cost to reach the Root Bridge." + }, + "topology-changes": { + "type": "integer", + "description": "Total number of topology changes detected." + }, + "last-topology-change-seconds": { + "type": "integer", + "description": "Time (in seconds) since the last topology change." + } + } + } } }, "$defs": { @@ -1154,6 +1251,100 @@ "type": "number" } } + }, + "loop-detect-protocol": { + "description": "Status and protocol information for loop detection or prevention mechanisms active on this interface. Includes STP/xSTP/MSTP, Loopback Detection (LBD), etc.", + "type": "object", + "properties": { + "stp": { + "description": "Spanning Tree Protocol (IEEE 802.1D/RSTP/MSTP) state on the port.", + "type": "object", + "properties": { + "protocol": { + "type": "string", + "description": "Variant of STP running (e.g., STP, RSTP, MSTP, RPVST+).", + "examples": [ + "RSTP", + "MSTP" + ] + }, + "state": { + "type": "string", + "description": "STP state of the port.", + "enum": [ + "DISABLED", + "BLOCKING", + "LISTENING", + "LEARNING", + "FORWARDING" + ] + }, + "role": { + "type": "string", + "description": "Role of the port in STP topology.", + "enum": [ + "ROOT", + "DESIGNATED", + "ALTERNATE", + "BACKUP", + "DISABLED" + ] + }, + "bridge-id": { + "type": "string", + "description": "STP Bridge ID" + }, + "root-bridge-id": { + "type": "string", + "description": "STP Root Bridge ID for the instance." + }, + "oper-edge-port": { + "type": "boolean", + "description": "Whether the port is operating as an edge port (no BPDU expected)." + }, + "cost": { + "type": "integer", + "description": "Operational path cost of the port." + }, + "designated-cost": { + "type": "integer", + "description": "Cost advertised by the designated port." + }, + "transitions": { + "type": "integer", + "description": "Number of STP state transitions (forwarding/discarding) on this port." + } + } + }, + "lbd": { + "description": "Loopback Detection (LBD) status on this port.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether LBD is enabled on this port." + }, + "state": { + "type": "string", + "description": "Current loop detection status.", + "enum": [ + "NO_LOOP", + "LOOP_DETECTED", + "DISABLED" + ] + }, + "action": { + "type": "string", + "description": "Action taken when loop is detected (e.g., block, shutdown).", + "enum": [ + "NONE", + "BLOCK", + "SHUTDOWN" + ] + } + } + } + } } } },