From baf801f447baeb4474fdbcff257b28977eebdf1f Mon Sep 17 00:00:00 2001 From: rudranil Date: Mon, 20 Nov 2023 16:05:57 +0000 Subject: [PATCH] update setcontrolstate with lacp,isis for mixed configuration scenario with bgp --- control/protocol.yaml | 73 +++++++++++++++++++++++++++++++++++++++++++ control/state.yaml | 5 ++- 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/control/protocol.yaml b/control/protocol.yaml index 47a12668..914d3133 100644 --- a/control/protocol.yaml +++ b/control/protocol.yaml @@ -70,10 +70,15 @@ components: x-enum: admin: x-field-uid: 1 + member_ports: + x-field-uid: 2 x-field-uid: 1 admin: $ref: '#/components/schemas/State.Protocol.Lacp.Admin' x-field-uid: 2 + member_ports: + $ref: '#/components/schemas/State.Protocol.Lacp.MemberPorts' + x-field-uid: 3 State.Protocol.Lacp.Admin: description: >- Sets admin state of LACP configured on LAG members @@ -102,6 +107,32 @@ components: x-field-uid: 1 down: x-field-uid: 2 + State.Protocol.Lacp.MemberPorts: + description: >- + Sets state of LACP member ports configured on LAG. + required: + - state + properties: + lag_member_names: + description: >- + The names of LAG members (ports) for which the state has to be applied. + An empty or null list will control all LAG members. + type: array + items: + type: string + x-constraint: + - '/components/schemas/Port/properties/name' + x-field-uid: 1 + state: + description: >- + The desired LACP member port state. + type: string + x-field-uid: 2 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 State.Protocol.Bgp: description: >- Sets state of configured BGP peers. @@ -140,6 +171,48 @@ components: The desired state of BGP peer. type: string x-field-uid: 2 + x-enum: + up: + x-field-uid: 1 + down: + x-field-uid: 2 + State.Protocol.Isis: + description: >- + Sets state of configured ISIS routers. + type: object + required: + - choice + properties: + choice: + type: string + x-enum: + routers: + x-field-uid: 1 + x-field-uid: 1 + routers: + $ref: '#/components/schemas/State.Protocol.Isis.Routers' + x-field-uid: 2 + State.Protocol.Isis.Routers: + description: >- + Sets state of configured ISIS routers. + required: + - state + properties: + router_names: + description: >- + The names of ISIS routers for which the state has to be applied. + An empty or null list will control all ISIS routers. + type: array + items: + type: string + x-constraint: + - "/components/schemas/Device.IsisRouter/properties/name" + x-field-uid: 1 + state: + description: >- + The desired state of ISIS router. + type: string + x-field-uid: 2 x-enum: up: x-field-uid: 1 diff --git a/control/state.yaml b/control/state.yaml index f733582e..473684cf 100644 --- a/control/state.yaml +++ b/control/state.yaml @@ -99,4 +99,7 @@ components: x-field-uid: 4 bgp: $ref: './protocol.yaml#/components/schemas/State.Protocol.Bgp' - x-field-uid: 5 \ No newline at end of file + x-field-uid: 5 + isis: + $ref: './protocol.yaml#/components/schemas/State.Protocol.Isis' + x-field-uid: 6 \ No newline at end of file