IETF-OPSAWG-WG / lxnm

L3 VPN Yang Model
8 stars 11 forks source link

Service status dependency #377

Closed boucadair closed 2 years ago

boucadair commented 2 years ago

Some guidelines are needed to help setting the various status clauses: e.g., the service status of a phy interface must be set to "true" whenever a sub-interface bound to this interface has the service enabled.

Are there other guidelines that we need to record?

An example is depicted here.

{
  "ietf-sap-ntw:service": [
    {
      "sap-type": "l3vpn",
      "service-attachment-point": [
        {
          "attachment-id": "GE0/6/1",
          "interface-type": "ietf-sap-ntw:phy",
          "interface-role": "ietf-sap-ntw:uni",
          "description": "Ready to host SAPs",
          "status": {
            "admin-status": {
              "status": "ietf-vpn-common:admin-up"
            },
            "oper-status": {
              "status": "ietf-vpn-common:op-up"
            }
          },
          "service-status": {
            "status": "ietf-vpn-common:op-up"
          }
        },
        {
          "attachment-id": "GE0/6/4",
          "interface-type": "ietf-sap-ntw:phy",
          "interface-role": "ietf-sap-ntw:uni",
          "description": "Ready to host SAPs",
          "status": {
            "admin-status": {
              "status": "ietf-vpn-common:admin-up"
            },
            "oper-status": {
              "status": "ietf-vpn-common:op-up"
            }
          },
          "service-status": {
            "status": "ietf-vpn-common:op-up"
          }
        },
        {
          "attachment-id": "GE0/6/4.1",
          "interface-type": "ietf-sap-ntw:logical",
          "parent-termination-point": "GE0/6/4",
          "encapsulation-type": "ietf-vpn-common:vlan",
          "description": "A first SAP description",
          "status": {
            "admin-status": {
              "status": "ietf-vpn-common:admin-up"
            },
            "oper-status": {
              "status": "ietf-vpn-common:op-up"
            }
          },
          "service-status": {
            "status": "ietf-vpn-common:op-up"
          }
        }
      ]
    },
    {
      "sap-type": "l2vpn",
      "service-attachment-point": [
        {
          "attachment-id": "GE0/6/1",
          "interface-type": "ietf-sap-ntw:phy",
          "interface-role": "ietf-sap-ntw:uni",
          "description": "Ready to host SAPs",
          "status": {
            "admin-status": {
              "status": "ietf-vpn-common:admin-up"
            },
            "oper-status": {
              "status": "ietf-vpn-common:op-up"
            }
          },
          "service-status": {
            "status": "ietf-vpn-common:op-up"
          }
        },
        {
          "attachment-id": "GE0/6/4",
          "interface-type": "ietf-sap-ntw:phy",
          "interface-role": "ietf-sap-ntw:uni",
          "description": "Ready to host SAPs",
          "status": {
            "admin-status": {
              "status": "ietf-vpn-common:admin-up"
            },
            "oper-status": {
              "status": "ietf-vpn-common:op-up"
            }
          },
          "service-status": {
            "status": "ietf-vpn-common:op-up"
          }
        },
        {
          "attachment-id": "GE0/6/4.2",
          "interface-type": "ietf-sap-ntw:logical",
          "parent-termination-point": "GE0/6/4",
          "encapsulation-type": "ietf-vpn-common:vlan",
          "description": "Another description",
          "status": {
            "admin-status": {
              "status": "ietf-vpn-common:admin-up"
            },
            "oper-status": {
              "status": "ietf-vpn-common:op-up"
            }
          },
          "service-status": {
            "status": "ietf-vpn-common:op-up"
          }
        }
      ]
    }
  ]
}
boucadair commented 2 years ago

https://github.com/IETF-OPSAWG-WG/lxnm/blob/master/I-D-sap/draft-ietf-opsawg-sap.txt includes now:

  When both a sub-interface and its parent interface are present,
  the status of the parent interface takes precedence over the
  status indicated for the sub-interface.