From c5194855843e5f6df3b311dec13c7ec650955819 Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Tue, 22 Jan 2019 22:13:22 +0100 Subject: [PATCH] sync from today's OpenDaylight master (using #556 sync.sh) --- experimental/odp/README | 2 - experimental/odp/aaa-app-config.yang | 63 + experimental/odp/aaa-cert-mdsal.yang | 117 + experimental/odp/aaa-cert-rpc.yang | 87 + experimental/odp/aaa-cert.yang | 100 + .../odp/aaa-encrypt-service-config.yang | 48 + .../odp/aaa-password-service-config.yang | 33 + experimental/odp/aaa.yang | 169 + experimental/odp/acl-live-statistics.yang | 94 + experimental/odp/aclservice-config.yang | 64 + experimental/odp/aclservice.yang | 204 + experimental/odp/aliveness-monitor.yang | 231 + experimental/odp/arbitrator-reconcile.yang | 50 + experimental/odp/barrier-common.yang | 18 + experimental/odp/batch-common.yang | 17 + experimental/odp/bgp-epe.yang | 39 + experimental/odp/bgp-flowspec.yang | 665 ++ experimental/odp/bgp-inet.yang | 198 + experimental/odp/bgp-l3vpn-mcast.yang | 172 + experimental/odp/bgp-labeled-unicast.yang | 237 + .../odp/bgp-linkstate-app-config.yang | 29 + experimental/odp/bgp-linkstate.yang | 867 +++ experimental/odp/bgp-ll-graceful-restart.yang | 71 + experimental/odp/bgp-message.yang | 254 + experimental/odp/bgp-multiprotocol.yang | 192 + experimental/odp/bgp-mvpn-ipv4.yang | 86 + experimental/odp/bgp-mvpn-ipv6.yang | 86 + experimental/odp/bgp-mvpn.yang | 237 + .../odp/bgp-openconfig-extensions.yang | 233 + experimental/odp/bgp-peer-rpc.yang | 91 + experimental/odp/bgp-rib.yang | 146 + .../odp/bgp-route-target-constrain.yang | 152 + experimental/odp/bgp-segment-routing.yang | 330 + experimental/odp/bgp-state-config.yang | 34 + experimental/odp/bgp-types.yang | 516 ++ experimental/odp/bgp-vpn-ipv4.yang | 103 + experimental/odp/bgp-vpn-ipv6.yang | 103 + experimental/odp/bgp-vpn.yang | 56 + experimental/odp/bgp.yang | 1282 ++++ experimental/odp/bmp-message.yang | 608 ++ experimental/odp/bmp-monitor.yang | 174 + experimental/odp/callhome-status.yang | 24 + .../odp/cloud-servicechain-state.yang | 66 + experimental/odp/cluster-admin.yang | 312 + experimental/odp/coe-config.yang | 24 + .../odp/config-bgp-listener-impl.yang | 43 - experimental/odp/core.yang | 27 + experimental/odp/data-change-counter.yang | 45 + .../odp/data-export-import-internal.yang | 156 + experimental/odp/data-export-import.yang | 561 ++ experimental/odp/dhcp.yang | 34 + experimental/odp/dhcp_allocation_pool.yang | 74 + experimental/odp/dhcpservice-api.yang | 50 + experimental/odp/dhcpservice-config.yang | 27 + .../odp/distributed-datastore-provider.yang | 275 + experimental/odp/dot1q-types.yang | 237 + experimental/odp/dsbenchmark.yang | 227 + experimental/odp/ebgp-bfd.yang | 56 + experimental/odp/ebgp.yang | 422 + experimental/odp/elan-statistics.yang | 32 + experimental/odp/elan.yang | 351 + experimental/odp/elanmanager-config.yang | 80 + experimental/odp/entity-owners.yang | 47 + experimental/odp/etree.yang | 68 + experimental/odp/event-aggregator.yang | 131 + experimental/odp/event-source.yang | 127 + experimental/odp/ex-vlan.yang | 47 - experimental/odp/fib-rpc.yang | 89 + .../odp/flow-capable-transaction.yang | 33 +- experimental/odp/flow-errors.yang | 7 +- experimental/odp/flow-management.yang | 30 - experimental/odp/flow-node-inventory.yang | 212 +- experimental/odp/flow-topology-discovery.yang | 9 +- .../odp/forwardingrules-manager-config.yang | 35 + experimental/odp/frm-reconciliation.yang | 29 + experimental/odp/hwvtep.yang | 604 ++ .../odp/iana-afn-safi@2013-07-04.yang | 526 ++ .../odp/iana-hardware@2018-03-13.yang | 189 + experimental/odp/iana-if-type.yang | 1517 ---- experimental/odp/iana-if-type@2017-01-19.yang | 1619 ++++ .../odp/iana-routing-types@2017-12-04.yang | 471 ++ experimental/odp/iana.yang | 31 + experimental/odp/id-manager.yang | 158 + experimental/odp/ieee754.yang | 42 + .../odp/ietf-access-control-list.yang | 209 + .../odp/ietf-datastores@2018-02-14.yang | 117 + .../odp/ietf-hardware-state@2018-03-13.yang | 766 ++ .../odp/ietf-hardware@2018-03-13.yang | 1194 +++ .../odp/ietf-inet-types@2013-07-15.yang | 458 ++ .../odp/ietf-interfaces@2014-05-08.yang | 696 ++ .../odp/ietf-interfaces@2018-02-20.yang | 1123 +++ experimental/odp/ietf-ip@2014-06-16.yang | 701 ++ experimental/odp/ietf-ip@2018-02-22.yang | 876 +++ .../ietf-ipv4-unicast-routing@2018-03-13.yang | 377 + ...ipv6-router-advertisements@2018-03-13.yang | 501 ++ .../ietf-ipv6-unicast-routing@2018-03-13.yang | 387 + experimental/odp/ietf-lisp-address-types.yang | 675 ++ .../ietf-netconf-monitoring-extension.yang | 31 + experimental/odp/ietf-netconf-monitoring.yang | 596 ++ ...ietf-netconf-notifications@2012-02-06.yang | 363 + experimental/odp/ietf-netconf@2011-06-01.yang | 928 +++ .../odp/ietf-network-state@2018-02-26.yang | 176 + ...etf-network-topology-state@2018-02-26.yang | 273 + .../odp/ietf-network-topology@2018-02-26.yang | 294 + experimental/odp/ietf-network@2018-02-26.yang | 192 + experimental/odp/ietf-origin@2018-02-14.yang | 147 + experimental/odp/ietf-packet-fields.yang | 195 + .../ietf-restconf-monitoring@2017-01-26.yang | 149 + .../odp/ietf-restconf@2013-10-19.yang | 689 ++ .../odp/ietf-restconf@2017-01-26.yang | 279 + .../odp/ietf-routing-types@2017-12-04.yang | 771 ++ experimental/odp/ietf-routing@2018-03-13.yang | 684 ++ .../odp/ietf-yang-library@2016-06-21.yang | 244 + .../odp/ietf-yang-metadata@2016-08-05.yang | 84 + .../odp/ietf-yang-types@2013-07-15.yang | 474 ++ experimental/odp/ifm-config.yang | 38 + .../odp/instance-identifier-patch-module.yang | 50 + experimental/odp/inter-vpn-link.yang | 135 + experimental/odp/interface-statistics.yang | 58 + .../odp/ipfix-application-information.yang | 214 + experimental/odp/ipv6-nd-util.yang | 102 + experimental/odp/ipv6-neighbor-discovery.yang | 194 + experimental/odp/ipv6service-config.yang | 31 + .../odp/isis-topology@2013-10-21.yang | 143 + experimental/odp/itm-config.yang | 170 + experimental/odp/itm-rpc.yang | 416 + experimental/odp/itm-state.yang | 318 + experimental/odp/itm.yang | 152 + experimental/odp/k8s-cluster.yang | 33 + experimental/odp/k8s-node.yang | 63 + experimental/odp/k8s.yang | 22 + .../l3-unicast-igp-topology@2013-10-21.yang | 233 + experimental/odp/l3nexthop.yang | 35 + experimental/odp/l3vpn.yang | 944 +++ experimental/odp/lldp-speaker-config.yang | 22 + experimental/odp/lldp-speaker.yang | 57 + experimental/odp/lock-manager.yang | 71 + experimental/odp/mdsaltrace.yang | 38 + experimental/odp/mdsalutil.yang | 24 + experimental/odp/meta-v1.yang | 27 + experimental/odp/meter-management.yang | 30 - experimental/odp/natservice-config.yang | 30 + .../odp/nc-notifications@2008-07-14.yang | 95 + experimental/odp/ned.yang | 6777 +++++++++++++++++ .../netconf-clustered-topology-config.yang | 22 + experimental/odp/netconf-keystore.yang | 129 + experimental/odp/netconf-node-inventory.yang | 39 - experimental/odp/netconf-node-topology.yang | 367 + experimental/odp/netvirt-sfc-acl.yang | 53 + experimental/odp/netvirt-sfc-classifier.yang | 48 + experimental/odp/netvirt-sfc.yang | 15 + experimental/odp/network-concepts.yang | 72 + experimental/odp/network-config.yang | 33 + .../odp/network-pcep-topology-config.yang | 50 + .../odp/network-pcep-topology-stats.yang | 42 + experimental/odp/network-policy-aug.yang | 65 + experimental/odp/network-policy.yang | 281 + .../network-topology-pcep-programming.yang | 100 + experimental/odp/network-topology-pcep.yang | 323 + .../odp/network-topology-programming.yang | 39 + experimental/odp/network-topology-sr.yang | 93 + .../odp/network-topology@2013-10-21.yang | 339 + experimental/odp/neutron-L3-ext.yang | 39 + experimental/odp/neutron-L3.yang | 142 + experimental/odp/neutron-attrs.yang | 75 + experimental/odp/neutron-bgpvpns.yang | 110 + experimental/odp/neutron-binding.yang | 75 + experimental/odp/neutron-constants.yang | 184 + experimental/odp/neutron-extensions.yang | 115 + experimental/odp/neutron-fwaas.yang | 160 + experimental/odp/neutron-hostconfig.yang | 71 + experimental/odp/neutron-l2gateways.yang | 88 + experimental/odp/neutron-lbaasv2.yang | 248 + experimental/odp/neutron-metering.yang | 90 + experimental/odp/neutron-mtu-ext.yang | 35 + experimental/odp/neutron-mtu.yang | 31 + experimental/odp/neutron-networks.yang | 96 + experimental/odp/neutron-ports.yang | 103 + experimental/odp/neutron-portsecurity.yang | 42 + experimental/odp/neutron-provider-ext.yang | 42 + experimental/odp/neutron-provider.yang | 56 + experimental/odp/neutron-qos-ext.yang | 59 + experimental/odp/neutron-qos.yang | 117 + experimental/odp/neutron-secgroups.yang | 116 + .../odp/neutron-sfc-flow-classifier.yang | 119 + experimental/odp/neutron-sfc.yang | 167 + experimental/odp/neutron-subnets.yang | 115 + experimental/odp/neutron-tapaas.yang | 108 + experimental/odp/neutron-trunks.yang | 75 + experimental/odp/neutron-types.yang | 37 + experimental/odp/neutron-vpnaas.yang | 209 + experimental/odp/neutron.yang | 77 + experimental/odp/neutronvpn-config.yang | 21 + experimental/odp/neutronvpn.yang | 463 ++ experimental/odp/nicira-action.yang | 570 ++ experimental/odp/nicira-match.yang | 623 ++ experimental/odp/node-config.yang | 38 + experimental/odp/node-errors.yang | 191 + experimental/odp/northbound-api-config.yang | 22 + .../odp/notifications@2008-07-14.yang | 83 + experimental/odp/ntfbench-payload.yang | 24 + experimental/odp/ntfbenchmark.yang | 128 + experimental/odp/odl-arputil.yang | 159 + .../odl-bgp-app-peer-benchmark-config.yang | 28 + .../odp/odl-bgp-app-peer-benchmark.yang | 97 + experimental/odp/odl-bgp-default-policy.yang | 313 + experimental/odp/odl-bgp-evpn.yang | 542 ++ .../odp/odl-bgp-peer-acceptor-config.yang | 41 + experimental/odp/odl-bgp-topology-config.yang | 52 + experimental/odp/odl-bgp-topology-types.yang | 48 + experimental/odp/odl-bmp-monitor-config.yang | 82 + .../odp/odl-data-change-counter-config.yang | 32 + experimental/odp/odl-external-reference.yang | 41 + experimental/odp/odl-fib.yang | 220 + experimental/odp/odl-general-entity.yang | 17 + experimental/odp/odl-inet-binary-types.yang | 46 + experimental/odp/odl-interface-meta.yang | 151 + experimental/odp/odl-interface-rpc.yang | 205 + .../odp/odl-interface-service-bindings.yang | 259 + experimental/odp/odl-interface.yang | 305 + experimental/odp/odl-itm-meta.yang | 111 + experimental/odp/odl-l3vpn.yang | 759 ++ experimental/odp/odl-lisp-address-types.yang | 117 + experimental/odp/odl-lisp-proto.yang | 538 ++ experimental/odp/odl-lisp-sb.yang | 85 + experimental/odp/odl-mappingservice.yang | 307 + experimental/odp/odl-nat-rpc.yang | 233 + experimental/odp/odl-nat.yang | 228 + .../odp/odl-netconf-callhome-server.yang | 65 + experimental/odp/odl-network-topology.yang | 54 + experimental/odp/odl-pcep-auto-bandwidth.yang | 65 + .../odp/odl-pcep-ietf-initiated00.yang | 124 + .../odl-pcep-ietf-stateful07-app-config.yang | 61 + .../odp/odl-pcep-ietf-stateful07.yang | 448 ++ experimental/odp/odl-pcep-p2mp-te-lsp.yang | 49 + .../odp/odl-pcep-segment-routing.yang | 270 + experimental/odp/odl-pcep-stateful-stats.yang | 108 + experimental/odp/odl-pcep-stats-provider.yang | 34 + .../odp/odl-pcep-sync-optimizations.yang | 125 + ...ep-topology-sync-optimizations-config.yang | 44 + experimental/odp/onf-extensions.yang | 219 + .../odp/openconfig-bgp-multiprotocol.yang | 730 ++ .../odp/openconfig-bgp-operational.yang | 400 + experimental/odp/openconfig-bgp-policy.yang | 523 ++ experimental/odp/openconfig-bgp-types.yang | 410 + experimental/odp/openconfig-bgp.yang | 1050 +++ experimental/odp/openconfig-extensions.yang | 69 + experimental/odp/openconfig-interfaces.yang | 933 +++ .../odp/openconfig-local-routing.yang | 292 + .../openconfig-network-instance-types.yang | 98 + .../odp/openconfig-network-instance.yang | 657 ++ experimental/odp/openconfig-policy-types.yang | 184 + .../odp/openconfig-routing-policy.yang | 629 ++ experimental/odp/openconfig-types.yang | 88 + .../odp/opendaylight-action-types.yang | 146 +- ...opendaylight-arbitrary-bitmask-fields.yang | 34 + .../odp/opendaylight-direct-statistics.yang | 123 + .../odp/opendaylight-flow-statistics.yang | 46 +- .../opendaylight-flow-table-statistics.yang | 44 +- experimental/odp/opendaylight-flow-types.yang | 131 +- .../odp/opendaylight-group-statistics.yang | 85 +- .../odp/opendaylight-group-types.yang | 23 +- .../odp/opendaylight-inventory-config.yang | 21 - experimental/odp/opendaylight-inventory.yang | 129 +- ...aylight-ipv6-arbitrary-bitmask-fields.yang | 50 + .../odp/opendaylight-match-types.yang | 55 +- .../odp/opendaylight-md-sal-binding.yang | 46 - .../odp/opendaylight-md-sal-common.yang | 71 - experimental/odp/opendaylight-md-sal-dom.yang | 40 - .../odp/opendaylight-md-sal-remote.yang | 9 +- .../odp/opendaylight-meter-statistics.yang | 77 +- .../odp/opendaylight-meter-types.yang | 20 +- .../odp/opendaylight-multipart-types.yang | 33 + .../odp/opendaylight-port-statistics.yang | 32 +- experimental/odp/opendaylight-port-types.yang | 146 +- .../odp/opendaylight-queue-statistics.yang | 50 +- .../odp/opendaylight-queue-types.yang | 83 +- .../odp/opendaylight-statistics-types.yang | 79 +- .../odp/opendaylight-table-types.yang | 139 +- experimental/odp/openflow-action.yang | 211 + .../odp/openflow-approved-extensions.yang | 32 + experimental/odp/openflow-augments.yang | 136 + experimental/odp/openflow-configuration.yang | 59 + .../odp/openflow-extensible-match.yang | 673 ++ experimental/odp/openflow-instruction.yang | 75 + experimental/odp/openflow-protocol.yang | 1438 ++++ .../odp/openflow-provider-config.yang | 206 + .../openflow-switch-connection-config.yang | 128 + experimental/odp/openflow-types.yang | 1933 +++++ .../openflowplugin-experimenter-types.yang | 28 + .../odp/openflowplugin-extension-general.yang | 213 + ...penflowplugin-extension-nicira-action.yang | 1948 +++++ ...openflowplugin-extension-nicira-match.yang | 538 ++ .../odp/ospf-topology@2013-10-21.yang | 178 + experimental/odp/overlay.yang | 128 + experimental/odp/ovsdb.yang | 1366 ++++ experimental/odp/packet-processing.yang | 128 +- experimental/odp/pcep-app-config.yang | 104 + .../odp/pcep-auto-bandwidth-app-config.yang | 30 + experimental/odp/pcep-config.yang | 72 + experimental/odp/pcep-message.yang | 74 + experimental/odp/pcep-p2mp-te-lsp-config.yang | 29 + .../odp/pcep-segment-routing-app-config.yang | 35 + experimental/odp/pcep-session-stats.yang | 194 + experimental/odp/pcep-types.yang | 1412 ++++ experimental/odp/pmsi-tunnel.yang | 187 + experimental/odp/pod-meta.yang | 29 + experimental/odp/pod.yang | 108 + experimental/odp/policy-service.yang | 280 + experimental/odp/port-management.yang | 30 - .../odp/prefix-shard-configuration.yang | 34 + experimental/odp/programming.yang | 379 + experimental/odp/qos-alert-config.yang | 40 + experimental/odp/queue-management.yang | 33 - .../odp/recinciliation-result-state.yang | 26 + experimental/odp/reconciliation.yang | 88 + experimental/odp/rendered-service-path.yang | 283 + experimental/odp/rfc2385.yang | 35 + experimental/odp/rpc-context.yang | 32 - experimental/odp/rpcbench-payload.yang | 64 + experimental/odp/rpcbenchmark.yang | 112 + experimental/odp/rsp-manager.yang | 176 + experimental/odp/rsvp.yang | 1001 +++ experimental/odp/sal-async-config.yang | 102 + experimental/odp/sal-bulk-flow.yang | 261 + experimental/odp/sal-bundle.yang | 91 + experimental/odp/sal-echo.yang | 35 + .../odp/sal-experimenter-message.yang | 33 + .../odp/sal-experimenter-mp-message.yang | 26 + experimental/odp/sal-flat-batch.yang | 166 + experimental/odp/sal-flow.yang | 55 +- experimental/odp/sal-flows-batch.yang | 103 + experimental/odp/sal-group.yang | 18 +- experimental/odp/sal-groups-batch.yang | 89 + experimental/odp/sal-meter.yang | 17 +- experimental/odp/sal-meters-batch.yang | 97 + experimental/odp/sal-port.yang | 14 +- experimental/odp/sal-queue.yang | 29 +- experimental/odp/sal-remote-augment.yang | 47 + experimental/odp/sal-remote@2014-01-14.yang | 98 - experimental/odp/sal-role.yang | 44 + experimental/odp/sal-table.yang | 21 +- experimental/odp/scalein-rpc.yang | 35 + experimental/odp/service-function-acl.yang | 78 + experimental/odp/service-function-chain.yang | 187 + .../odp/service-function-classifier.yang | 89 + ...e-function-description-monitor-report.yang | 234 + .../service-function-description-monitor.yang | 36 + .../service-function-forwarder-logical.yang | 117 + ...-function-forwarder-metadata-features.yang | 105 + .../odp/service-function-forwarder-ofs.yang | 44 + .../odp/service-function-forwarder-ovs.yang | 289 + ...ervice-function-forwarder-termination.yang | 48 + .../odp/service-function-forwarder-vpp.yang | 113 + .../odp/service-function-forwarder.yang | 300 + .../odp/service-function-group-algorithm.yang | 113 + experimental/odp/service-function-group.yang | 110 + .../odp/service-function-mapping.yang | 95 + experimental/odp/service-function-ovs.yang | 55 + .../odp/service-function-path-metadata.yang | 140 + experimental/odp/service-function-path.yang | 222 + experimental/odp/service-function-proxy.yang | 71 + .../odp/service-function-scheduler-type.yang | 108 + experimental/odp/service-function-type.yang | 126 + experimental/odp/service-function.yang | 219 + experimental/odp/service-locator.yang | 238 + experimental/odp/service-node.yang | 94 + experimental/odp/service-path-id.yang | 260 + experimental/odp/service-statistics.yang | 100 + experimental/odp/service.yang | 183 + experimental/odp/sfc-common.yang | 84 + experimental/odp/sfc-ioam-nb-pot.yang | 227 + .../odp/sfc-ioam-sb-pot-hop-params.yang | 54 + experimental/odp/sfc-ioam-sb-pot-params.yang | 97 + experimental/odp/sfc-ioam-sb-pot.yang | 169 + experimental/odp/sfc-of-renderer.yang | 85 + .../odp/sfc-statistics-operations.yang | 99 + experimental/odp/sfc-vnfm-tacker-config.yang | 48 + experimental/odp/shutdown-impl.yang | 71 - experimental/odp/shutdown.yang | 29 - experimental/odp/southbound.yang | 9 + experimental/odp/srm-ops.yang | 50 + experimental/odp/srm-rpcs.yang | 109 + experimental/odp/srm-types.yang | 134 + experimental/odp/statistics-config.yang | 22 + .../odp/statistics-manager-control.yang | 44 + experimental/odp/statistics.yang | 205 + .../odp/subscribe-to-notification.yang | 18 + experimental/odp/system-notifications.yang | 31 + experimental/odp/table-management.yang | 32 - experimental/odp/tailf-cli-extensions.yang | 2611 +++++++ experimental/odp/tailf-common.yang | 3219 ++++++++ experimental/odp/tailf-meta-extensions.yang | 133 + experimental/odp/ted@2013-10-21.yang | 306 + experimental/odp/toaster-app-config.yang | 33 + experimental/odp/toaster-consumer-impl.yang | 81 - experimental/odp/toaster-consumer.yang | 26 - experimental/odp/toaster-provider-impl.yang | 89 - experimental/odp/toaster-provider.yang | 26 - .../odp/topology-lldp-discovery-config.yang | 40 + experimental/odp/topology-tunnel-p2p.yang | 72 + .../odp/topology-tunnel-pcep-config.yang | 51 + .../odp/topology-tunnel-pcep-programming.yang | 71 + experimental/odp/topology-tunnel-pcep.yang | 120 + .../odp/topology-tunnel-programming.yang | 90 + experimental/odp/topology-tunnel-sr.yang | 57 + experimental/odp/topology-tunnel.yang | 107 + experimental/odp/upgrade-config.yang | 24 + experimental/odp/v3po.yang | 839 ++ experimental/odp/vbridge-topology.yang | 174 + experimental/odp/vpn-rpc.yang | 90 + experimental/odp/vpnmanager-config.yang | 48 + experimental/odp/vpp-classfier-acl.yang | 163 + experimental/odp/vpp-classifier.yang | 215 + experimental/odp/vpp-nsh.yang | 319 + experimental/odp/yang-ext.yang | 21 +- experimental/odp/yanglib.yang | 39 + 417 files changed, 91447 insertions(+), 2998 deletions(-) delete mode 100644 experimental/odp/README create mode 100644 experimental/odp/aaa-app-config.yang create mode 100644 experimental/odp/aaa-cert-mdsal.yang create mode 100644 experimental/odp/aaa-cert-rpc.yang create mode 100644 experimental/odp/aaa-cert.yang create mode 100644 experimental/odp/aaa-encrypt-service-config.yang create mode 100644 experimental/odp/aaa-password-service-config.yang create mode 100644 experimental/odp/aaa.yang create mode 100644 experimental/odp/acl-live-statistics.yang create mode 100644 experimental/odp/aclservice-config.yang create mode 100644 experimental/odp/aclservice.yang create mode 100644 experimental/odp/aliveness-monitor.yang create mode 100644 experimental/odp/arbitrator-reconcile.yang create mode 100644 experimental/odp/barrier-common.yang create mode 100644 experimental/odp/batch-common.yang create mode 100644 experimental/odp/bgp-epe.yang create mode 100644 experimental/odp/bgp-flowspec.yang create mode 100644 experimental/odp/bgp-inet.yang create mode 100644 experimental/odp/bgp-l3vpn-mcast.yang create mode 100644 experimental/odp/bgp-labeled-unicast.yang create mode 100644 experimental/odp/bgp-linkstate-app-config.yang create mode 100644 experimental/odp/bgp-linkstate.yang create mode 100644 experimental/odp/bgp-ll-graceful-restart.yang create mode 100644 experimental/odp/bgp-message.yang create mode 100644 experimental/odp/bgp-multiprotocol.yang create mode 100644 experimental/odp/bgp-mvpn-ipv4.yang create mode 100644 experimental/odp/bgp-mvpn-ipv6.yang create mode 100644 experimental/odp/bgp-mvpn.yang create mode 100644 experimental/odp/bgp-openconfig-extensions.yang create mode 100644 experimental/odp/bgp-peer-rpc.yang create mode 100644 experimental/odp/bgp-rib.yang create mode 100644 experimental/odp/bgp-route-target-constrain.yang create mode 100644 experimental/odp/bgp-segment-routing.yang create mode 100644 experimental/odp/bgp-state-config.yang create mode 100644 experimental/odp/bgp-types.yang create mode 100644 experimental/odp/bgp-vpn-ipv4.yang create mode 100644 experimental/odp/bgp-vpn-ipv6.yang create mode 100644 experimental/odp/bgp-vpn.yang create mode 100644 experimental/odp/bgp.yang create mode 100644 experimental/odp/bmp-message.yang create mode 100644 experimental/odp/bmp-monitor.yang create mode 100644 experimental/odp/callhome-status.yang create mode 100755 experimental/odp/cloud-servicechain-state.yang create mode 100644 experimental/odp/cluster-admin.yang create mode 100644 experimental/odp/coe-config.yang delete mode 100644 experimental/odp/config-bgp-listener-impl.yang create mode 100644 experimental/odp/core.yang create mode 100644 experimental/odp/data-change-counter.yang create mode 100644 experimental/odp/data-export-import-internal.yang create mode 100644 experimental/odp/data-export-import.yang create mode 100644 experimental/odp/dhcp.yang create mode 100644 experimental/odp/dhcp_allocation_pool.yang create mode 100644 experimental/odp/dhcpservice-api.yang create mode 100644 experimental/odp/dhcpservice-config.yang create mode 100644 experimental/odp/distributed-datastore-provider.yang create mode 100644 experimental/odp/dot1q-types.yang create mode 100644 experimental/odp/dsbenchmark.yang create mode 100644 experimental/odp/ebgp-bfd.yang create mode 100644 experimental/odp/ebgp.yang create mode 100644 experimental/odp/elan-statistics.yang create mode 100644 experimental/odp/elan.yang create mode 100644 experimental/odp/elanmanager-config.yang create mode 100644 experimental/odp/entity-owners.yang create mode 100644 experimental/odp/etree.yang create mode 100644 experimental/odp/event-aggregator.yang create mode 100644 experimental/odp/event-source.yang delete mode 100644 experimental/odp/ex-vlan.yang create mode 100644 experimental/odp/fib-rpc.yang delete mode 100644 experimental/odp/flow-management.yang create mode 100644 experimental/odp/forwardingrules-manager-config.yang create mode 100644 experimental/odp/frm-reconciliation.yang create mode 100644 experimental/odp/hwvtep.yang create mode 100644 experimental/odp/iana-afn-safi@2013-07-04.yang create mode 100644 experimental/odp/iana-hardware@2018-03-13.yang delete mode 100644 experimental/odp/iana-if-type.yang create mode 100644 experimental/odp/iana-if-type@2017-01-19.yang create mode 100644 experimental/odp/iana-routing-types@2017-12-04.yang create mode 100644 experimental/odp/iana.yang create mode 100644 experimental/odp/id-manager.yang create mode 100644 experimental/odp/ieee754.yang create mode 100644 experimental/odp/ietf-access-control-list.yang create mode 100644 experimental/odp/ietf-datastores@2018-02-14.yang create mode 100644 experimental/odp/ietf-hardware-state@2018-03-13.yang create mode 100644 experimental/odp/ietf-hardware@2018-03-13.yang create mode 100644 experimental/odp/ietf-inet-types@2013-07-15.yang create mode 100644 experimental/odp/ietf-interfaces@2014-05-08.yang create mode 100644 experimental/odp/ietf-interfaces@2018-02-20.yang create mode 100644 experimental/odp/ietf-ip@2014-06-16.yang create mode 100644 experimental/odp/ietf-ip@2018-02-22.yang create mode 100644 experimental/odp/ietf-ipv4-unicast-routing@2018-03-13.yang create mode 100644 experimental/odp/ietf-ipv6-router-advertisements@2018-03-13.yang create mode 100644 experimental/odp/ietf-ipv6-unicast-routing@2018-03-13.yang create mode 100644 experimental/odp/ietf-lisp-address-types.yang create mode 100644 experimental/odp/ietf-netconf-monitoring-extension.yang create mode 100644 experimental/odp/ietf-netconf-monitoring.yang create mode 100644 experimental/odp/ietf-netconf-notifications@2012-02-06.yang create mode 100644 experimental/odp/ietf-netconf@2011-06-01.yang create mode 100644 experimental/odp/ietf-network-state@2018-02-26.yang create mode 100644 experimental/odp/ietf-network-topology-state@2018-02-26.yang create mode 100644 experimental/odp/ietf-network-topology@2018-02-26.yang create mode 100644 experimental/odp/ietf-network@2018-02-26.yang create mode 100644 experimental/odp/ietf-origin@2018-02-14.yang create mode 100644 experimental/odp/ietf-packet-fields.yang create mode 100644 experimental/odp/ietf-restconf-monitoring@2017-01-26.yang create mode 100644 experimental/odp/ietf-restconf@2013-10-19.yang create mode 100644 experimental/odp/ietf-restconf@2017-01-26.yang create mode 100644 experimental/odp/ietf-routing-types@2017-12-04.yang create mode 100644 experimental/odp/ietf-routing@2018-03-13.yang create mode 100644 experimental/odp/ietf-yang-library@2016-06-21.yang create mode 100644 experimental/odp/ietf-yang-metadata@2016-08-05.yang create mode 100644 experimental/odp/ietf-yang-types@2013-07-15.yang create mode 100644 experimental/odp/ifm-config.yang create mode 100644 experimental/odp/instance-identifier-patch-module.yang create mode 100755 experimental/odp/inter-vpn-link.yang create mode 100644 experimental/odp/interface-statistics.yang create mode 100644 experimental/odp/ipfix-application-information.yang create mode 100644 experimental/odp/ipv6-nd-util.yang create mode 100644 experimental/odp/ipv6-neighbor-discovery.yang create mode 100644 experimental/odp/ipv6service-config.yang create mode 100644 experimental/odp/isis-topology@2013-10-21.yang create mode 100644 experimental/odp/itm-config.yang create mode 100644 experimental/odp/itm-rpc.yang create mode 100644 experimental/odp/itm-state.yang create mode 100644 experimental/odp/itm.yang create mode 100644 experimental/odp/k8s-cluster.yang create mode 100644 experimental/odp/k8s-node.yang create mode 100644 experimental/odp/k8s.yang create mode 100644 experimental/odp/l3-unicast-igp-topology@2013-10-21.yang create mode 100644 experimental/odp/l3nexthop.yang create mode 100644 experimental/odp/l3vpn.yang create mode 100644 experimental/odp/lldp-speaker-config.yang create mode 100644 experimental/odp/lldp-speaker.yang create mode 100644 experimental/odp/lock-manager.yang create mode 100644 experimental/odp/mdsaltrace.yang create mode 100644 experimental/odp/mdsalutil.yang create mode 100644 experimental/odp/meta-v1.yang delete mode 100644 experimental/odp/meter-management.yang create mode 100644 experimental/odp/natservice-config.yang create mode 100644 experimental/odp/nc-notifications@2008-07-14.yang create mode 100644 experimental/odp/ned.yang create mode 100644 experimental/odp/netconf-clustered-topology-config.yang create mode 100644 experimental/odp/netconf-keystore.yang delete mode 100644 experimental/odp/netconf-node-inventory.yang create mode 100644 experimental/odp/netconf-node-topology.yang create mode 100644 experimental/odp/netvirt-sfc-acl.yang create mode 100644 experimental/odp/netvirt-sfc-classifier.yang create mode 100644 experimental/odp/netvirt-sfc.yang create mode 100644 experimental/odp/network-concepts.yang create mode 100644 experimental/odp/network-config.yang create mode 100644 experimental/odp/network-pcep-topology-config.yang create mode 100644 experimental/odp/network-pcep-topology-stats.yang create mode 100644 experimental/odp/network-policy-aug.yang create mode 100644 experimental/odp/network-policy.yang create mode 100644 experimental/odp/network-topology-pcep-programming.yang create mode 100644 experimental/odp/network-topology-pcep.yang create mode 100644 experimental/odp/network-topology-programming.yang create mode 100644 experimental/odp/network-topology-sr.yang create mode 100644 experimental/odp/network-topology@2013-10-21.yang create mode 100644 experimental/odp/neutron-L3-ext.yang create mode 100644 experimental/odp/neutron-L3.yang create mode 100644 experimental/odp/neutron-attrs.yang create mode 100644 experimental/odp/neutron-bgpvpns.yang create mode 100644 experimental/odp/neutron-binding.yang create mode 100644 experimental/odp/neutron-constants.yang create mode 100644 experimental/odp/neutron-extensions.yang create mode 100644 experimental/odp/neutron-fwaas.yang create mode 100644 experimental/odp/neutron-hostconfig.yang create mode 100644 experimental/odp/neutron-l2gateways.yang create mode 100644 experimental/odp/neutron-lbaasv2.yang create mode 100644 experimental/odp/neutron-metering.yang create mode 100755 experimental/odp/neutron-mtu-ext.yang create mode 100755 experimental/odp/neutron-mtu.yang create mode 100644 experimental/odp/neutron-networks.yang create mode 100644 experimental/odp/neutron-ports.yang create mode 100644 experimental/odp/neutron-portsecurity.yang create mode 100644 experimental/odp/neutron-provider-ext.yang create mode 100644 experimental/odp/neutron-provider.yang create mode 100644 experimental/odp/neutron-qos-ext.yang create mode 100644 experimental/odp/neutron-qos.yang create mode 100644 experimental/odp/neutron-secgroups.yang create mode 100644 experimental/odp/neutron-sfc-flow-classifier.yang create mode 100644 experimental/odp/neutron-sfc.yang create mode 100644 experimental/odp/neutron-subnets.yang create mode 100644 experimental/odp/neutron-tapaas.yang create mode 100644 experimental/odp/neutron-trunks.yang create mode 100644 experimental/odp/neutron-types.yang create mode 100644 experimental/odp/neutron-vpnaas.yang create mode 100644 experimental/odp/neutron.yang create mode 100644 experimental/odp/neutronvpn-config.yang create mode 100644 experimental/odp/neutronvpn.yang create mode 100644 experimental/odp/nicira-action.yang create mode 100644 experimental/odp/nicira-match.yang create mode 100644 experimental/odp/node-config.yang create mode 100644 experimental/odp/node-errors.yang create mode 100644 experimental/odp/northbound-api-config.yang create mode 100644 experimental/odp/notifications@2008-07-14.yang create mode 100644 experimental/odp/ntfbench-payload.yang create mode 100644 experimental/odp/ntfbenchmark.yang create mode 100644 experimental/odp/odl-arputil.yang create mode 100644 experimental/odp/odl-bgp-app-peer-benchmark-config.yang create mode 100644 experimental/odp/odl-bgp-app-peer-benchmark.yang create mode 100644 experimental/odp/odl-bgp-default-policy.yang create mode 100644 experimental/odp/odl-bgp-evpn.yang create mode 100644 experimental/odp/odl-bgp-peer-acceptor-config.yang create mode 100644 experimental/odp/odl-bgp-topology-config.yang create mode 100644 experimental/odp/odl-bgp-topology-types.yang create mode 100644 experimental/odp/odl-bmp-monitor-config.yang create mode 100644 experimental/odp/odl-data-change-counter-config.yang create mode 100644 experimental/odp/odl-external-reference.yang create mode 100644 experimental/odp/odl-fib.yang create mode 100644 experimental/odp/odl-general-entity.yang create mode 100644 experimental/odp/odl-inet-binary-types.yang create mode 100644 experimental/odp/odl-interface-meta.yang create mode 100644 experimental/odp/odl-interface-rpc.yang create mode 100644 experimental/odp/odl-interface-service-bindings.yang create mode 100644 experimental/odp/odl-interface.yang create mode 100644 experimental/odp/odl-itm-meta.yang create mode 100644 experimental/odp/odl-l3vpn.yang create mode 100644 experimental/odp/odl-lisp-address-types.yang create mode 100644 experimental/odp/odl-lisp-proto.yang create mode 100644 experimental/odp/odl-lisp-sb.yang create mode 100644 experimental/odp/odl-mappingservice.yang create mode 100644 experimental/odp/odl-nat-rpc.yang create mode 100644 experimental/odp/odl-nat.yang create mode 100644 experimental/odp/odl-netconf-callhome-server.yang create mode 100644 experimental/odp/odl-network-topology.yang create mode 100644 experimental/odp/odl-pcep-auto-bandwidth.yang create mode 100644 experimental/odp/odl-pcep-ietf-initiated00.yang create mode 100644 experimental/odp/odl-pcep-ietf-stateful07-app-config.yang create mode 100644 experimental/odp/odl-pcep-ietf-stateful07.yang create mode 100644 experimental/odp/odl-pcep-p2mp-te-lsp.yang create mode 100644 experimental/odp/odl-pcep-segment-routing.yang create mode 100644 experimental/odp/odl-pcep-stateful-stats.yang create mode 100644 experimental/odp/odl-pcep-stats-provider.yang create mode 100644 experimental/odp/odl-pcep-sync-optimizations.yang create mode 100644 experimental/odp/odl-pcep-topology-sync-optimizations-config.yang create mode 100644 experimental/odp/onf-extensions.yang create mode 100644 experimental/odp/openconfig-bgp-multiprotocol.yang create mode 100644 experimental/odp/openconfig-bgp-operational.yang create mode 100644 experimental/odp/openconfig-bgp-policy.yang create mode 100644 experimental/odp/openconfig-bgp-types.yang create mode 100644 experimental/odp/openconfig-bgp.yang create mode 100644 experimental/odp/openconfig-extensions.yang create mode 100644 experimental/odp/openconfig-interfaces.yang create mode 100644 experimental/odp/openconfig-local-routing.yang create mode 100644 experimental/odp/openconfig-network-instance-types.yang create mode 100644 experimental/odp/openconfig-network-instance.yang create mode 100644 experimental/odp/openconfig-policy-types.yang create mode 100644 experimental/odp/openconfig-routing-policy.yang create mode 100644 experimental/odp/openconfig-types.yang create mode 100644 experimental/odp/opendaylight-arbitrary-bitmask-fields.yang create mode 100644 experimental/odp/opendaylight-direct-statistics.yang delete mode 100644 experimental/odp/opendaylight-inventory-config.yang create mode 100644 experimental/odp/opendaylight-ipv6-arbitrary-bitmask-fields.yang delete mode 100644 experimental/odp/opendaylight-md-sal-binding.yang delete mode 100644 experimental/odp/opendaylight-md-sal-common.yang delete mode 100644 experimental/odp/opendaylight-md-sal-dom.yang create mode 100644 experimental/odp/opendaylight-multipart-types.yang create mode 100644 experimental/odp/openflow-action.yang create mode 100644 experimental/odp/openflow-approved-extensions.yang create mode 100755 experimental/odp/openflow-augments.yang create mode 100644 experimental/odp/openflow-configuration.yang create mode 100644 experimental/odp/openflow-extensible-match.yang create mode 100644 experimental/odp/openflow-instruction.yang create mode 100644 experimental/odp/openflow-protocol.yang create mode 100644 experimental/odp/openflow-provider-config.yang create mode 100644 experimental/odp/openflow-switch-connection-config.yang create mode 100755 experimental/odp/openflow-types.yang create mode 100644 experimental/odp/openflowplugin-experimenter-types.yang create mode 100755 experimental/odp/openflowplugin-extension-general.yang create mode 100644 experimental/odp/openflowplugin-extension-nicira-action.yang create mode 100644 experimental/odp/openflowplugin-extension-nicira-match.yang create mode 100644 experimental/odp/ospf-topology@2013-10-21.yang create mode 100644 experimental/odp/overlay.yang create mode 100755 experimental/odp/ovsdb.yang create mode 100644 experimental/odp/pcep-app-config.yang create mode 100644 experimental/odp/pcep-auto-bandwidth-app-config.yang create mode 100644 experimental/odp/pcep-config.yang create mode 100644 experimental/odp/pcep-message.yang create mode 100644 experimental/odp/pcep-p2mp-te-lsp-config.yang create mode 100644 experimental/odp/pcep-segment-routing-app-config.yang create mode 100644 experimental/odp/pcep-session-stats.yang create mode 100644 experimental/odp/pcep-types.yang create mode 100644 experimental/odp/pmsi-tunnel.yang create mode 100644 experimental/odp/pod-meta.yang create mode 100644 experimental/odp/pod.yang create mode 100644 experimental/odp/policy-service.yang delete mode 100644 experimental/odp/port-management.yang create mode 100644 experimental/odp/prefix-shard-configuration.yang create mode 100644 experimental/odp/programming.yang create mode 100644 experimental/odp/qos-alert-config.yang delete mode 100644 experimental/odp/queue-management.yang create mode 100644 experimental/odp/recinciliation-result-state.yang create mode 100644 experimental/odp/reconciliation.yang create mode 100644 experimental/odp/rendered-service-path.yang create mode 100644 experimental/odp/rfc2385.yang delete mode 100644 experimental/odp/rpc-context.yang create mode 100644 experimental/odp/rpcbench-payload.yang create mode 100644 experimental/odp/rpcbenchmark.yang create mode 100644 experimental/odp/rsp-manager.yang create mode 100644 experimental/odp/rsvp.yang create mode 100644 experimental/odp/sal-async-config.yang create mode 100644 experimental/odp/sal-bulk-flow.yang create mode 100644 experimental/odp/sal-bundle.yang create mode 100644 experimental/odp/sal-echo.yang create mode 100644 experimental/odp/sal-experimenter-message.yang create mode 100755 experimental/odp/sal-experimenter-mp-message.yang create mode 100644 experimental/odp/sal-flat-batch.yang create mode 100644 experimental/odp/sal-flows-batch.yang create mode 100644 experimental/odp/sal-groups-batch.yang create mode 100644 experimental/odp/sal-meters-batch.yang create mode 100644 experimental/odp/sal-remote-augment.yang delete mode 100644 experimental/odp/sal-remote@2014-01-14.yang create mode 100644 experimental/odp/sal-role.yang create mode 100644 experimental/odp/scalein-rpc.yang create mode 100644 experimental/odp/service-function-acl.yang create mode 100644 experimental/odp/service-function-chain.yang create mode 100644 experimental/odp/service-function-classifier.yang create mode 100755 experimental/odp/service-function-description-monitor-report.yang create mode 100644 experimental/odp/service-function-description-monitor.yang create mode 100644 experimental/odp/service-function-forwarder-logical.yang create mode 100644 experimental/odp/service-function-forwarder-metadata-features.yang create mode 100644 experimental/odp/service-function-forwarder-ofs.yang create mode 100644 experimental/odp/service-function-forwarder-ovs.yang create mode 100644 experimental/odp/service-function-forwarder-termination.yang create mode 100644 experimental/odp/service-function-forwarder-vpp.yang create mode 100644 experimental/odp/service-function-forwarder.yang create mode 100644 experimental/odp/service-function-group-algorithm.yang create mode 100644 experimental/odp/service-function-group.yang create mode 100644 experimental/odp/service-function-mapping.yang create mode 100644 experimental/odp/service-function-ovs.yang create mode 100644 experimental/odp/service-function-path-metadata.yang create mode 100644 experimental/odp/service-function-path.yang create mode 100644 experimental/odp/service-function-proxy.yang create mode 100644 experimental/odp/service-function-scheduler-type.yang create mode 100644 experimental/odp/service-function-type.yang create mode 100644 experimental/odp/service-function.yang create mode 100644 experimental/odp/service-locator.yang create mode 100644 experimental/odp/service-node.yang create mode 100644 experimental/odp/service-path-id.yang create mode 100644 experimental/odp/service-statistics.yang create mode 100644 experimental/odp/service.yang create mode 100644 experimental/odp/sfc-common.yang create mode 100644 experimental/odp/sfc-ioam-nb-pot.yang create mode 100644 experimental/odp/sfc-ioam-sb-pot-hop-params.yang create mode 100644 experimental/odp/sfc-ioam-sb-pot-params.yang create mode 100644 experimental/odp/sfc-ioam-sb-pot.yang create mode 100644 experimental/odp/sfc-of-renderer.yang create mode 100644 experimental/odp/sfc-statistics-operations.yang create mode 100644 experimental/odp/sfc-vnfm-tacker-config.yang delete mode 100644 experimental/odp/shutdown-impl.yang delete mode 100644 experimental/odp/shutdown.yang create mode 100644 experimental/odp/southbound.yang create mode 100644 experimental/odp/srm-ops.yang create mode 100644 experimental/odp/srm-rpcs.yang create mode 100644 experimental/odp/srm-types.yang create mode 100644 experimental/odp/statistics-config.yang create mode 100644 experimental/odp/statistics-manager-control.yang create mode 100644 experimental/odp/statistics.yang create mode 100644 experimental/odp/subscribe-to-notification.yang create mode 100644 experimental/odp/system-notifications.yang delete mode 100644 experimental/odp/table-management.yang create mode 100644 experimental/odp/tailf-cli-extensions.yang create mode 100644 experimental/odp/tailf-common.yang create mode 100644 experimental/odp/tailf-meta-extensions.yang create mode 100644 experimental/odp/ted@2013-10-21.yang create mode 100644 experimental/odp/toaster-app-config.yang delete mode 100644 experimental/odp/toaster-consumer-impl.yang delete mode 100644 experimental/odp/toaster-consumer.yang delete mode 100644 experimental/odp/toaster-provider-impl.yang delete mode 100644 experimental/odp/toaster-provider.yang create mode 100644 experimental/odp/topology-lldp-discovery-config.yang create mode 100644 experimental/odp/topology-tunnel-p2p.yang create mode 100644 experimental/odp/topology-tunnel-pcep-config.yang create mode 100644 experimental/odp/topology-tunnel-pcep-programming.yang create mode 100644 experimental/odp/topology-tunnel-pcep.yang create mode 100644 experimental/odp/topology-tunnel-programming.yang create mode 100644 experimental/odp/topology-tunnel-sr.yang create mode 100644 experimental/odp/topology-tunnel.yang create mode 100644 experimental/odp/upgrade-config.yang create mode 100644 experimental/odp/v3po.yang create mode 100644 experimental/odp/vbridge-topology.yang create mode 100644 experimental/odp/vpn-rpc.yang create mode 100644 experimental/odp/vpnmanager-config.yang create mode 100644 experimental/odp/vpp-classfier-acl.yang create mode 100644 experimental/odp/vpp-classifier.yang create mode 100644 experimental/odp/vpp-nsh.yang create mode 100644 experimental/odp/yanglib.yang diff --git a/experimental/odp/README b/experimental/odp/README deleted file mode 100644 index 6c1eb9be7..000000000 --- a/experimental/odp/README +++ /dev/null @@ -1,2 +0,0 @@ -ODP pre-release experimental model files. - diff --git a/experimental/odp/aaa-app-config.yang b/experimental/odp/aaa-app-config.yang new file mode 100644 index 000000000..dd2116eed --- /dev/null +++ b/experimental/odp/aaa-app-config.yang @@ -0,0 +1,63 @@ +module aaa-app-config { + yang-version 1; + namespace "urn:opendaylight:aaa:app:config"; + prefix "aaa-app-config"; + organization "OpenDaylight"; + + contact "ryandgoulding@gmail.com, m.elserngawy@gmail.com"; + + revision "2017-06-19" { + description "aaa-app-config is used to manipulate aspects of AAA clustered-app-config."; + } + + grouping string-pair { + description "Used to store string key/value pairs."; + leaf pair-key { + type string; + description "The key."; + } + leaf pair-value { + type string; + description "The value."; + } + } + + container shiro-configuration { + description "AAA shiro related configuration."; + list main { + key "pair-key"; + uses string-pair; + ordered-by user; + description "The main section of shiro.ini."; + } + + list urls { + key "pair-key"; + uses string-pair; + ordered-by user; + description "The urls section of shiro.ini."; + } + } + + container datastore-config { + leaf store { + description "Available data store types."; + type enumeration { + enum h2-data-store { + description "H2 DataStore."; + } + } + } + leaf time-to-live { + description "Time to live for tokens in second."; + type uint64; + default 36000; + } + leaf time-to-wait { + description "Time to wait for tokens in second."; + type uint64; + default 3600; + } + } + +} diff --git a/experimental/odp/aaa-cert-mdsal.yang b/experimental/odp/aaa-cert-mdsal.yang new file mode 100644 index 000000000..28753e250 --- /dev/null +++ b/experimental/odp/aaa-cert-mdsal.yang @@ -0,0 +1,117 @@ +/* +Copyright (c) 2016 Inocybe Technology All rights reserved. + +This program and the accompanying materials are made available under the +terms of the Eclipse Public License v1.0 which accompanies this distribution, +and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL +*/ +module aaa-cert-mdsal { + yang-version 1; + namespace "urn:opendaylight:yang:aaa:cert:mdsal"; + prefix "aaa-cert-mdsal"; + + revision 2016-03-21 { + description "Initial revision"; + } + + description + "Yang model definition for aaa certificate using MDSAL"; + + contact + "melserngawy@inocybe.com"; + + grouping node-certificate { + leaf alias { + description "network node certificate alias"; + type string; + } + leaf x500-certificate { + description "network node certificate"; + type string; + } + } + + grouping keystore { + leaf name { + description "keystore name"; + type string; + } + leaf alias { + description "key alias"; + type string; + } + leaf store-password { + description "keystore password"; + type string; + } + leaf dname { + description "X.500 Distinguished Names should be in the following formate + CN=commonName + OU=organizationUnit + O=organizationName + L=localityName + S=stateName + C=country"; + type string; + } + leaf validity { + description "validity"; + type int32; + } + leaf key-alg { + description "supported key geneartion algorithmes are DSA and RSA"; + type string; + } + leaf sign-alg { + description "supported sign algorithmes for DSA the default sign Alg is SHA1withDSA and for RSA the + default sign Alg is MD5withRSA"; + type string; + } + leaf keysize { + description "key size is 1024 or 2048"; + type int32; + } + leaf keystoreFile { + description "keystore file as Binary"; + type binary; + } + } + + grouping cipher-suite { + list cipher-suites { + leaf suiteName { + type string; + } + } + } + + grouping ssl-data { + leaf bundle-name { + description "bundle name"; + type string; + mandatory true; + } + leaf tls-protocols { + description "the TLS supported protocols (SSLv2Hello,TLSv1.1,TLSv1.2) the selected protocol should be seperated by ',' char"; + type string; + } + container odl-keystore { + uses keystore; + } + container trust-keystore { + uses keystore; + } + uses cipher-suite; + } + + container key-stores { + leaf id { + type string; + mandatory true; + } + list ssl-data { + key bundle-name; + uses ssl-data; + } + } +} diff --git a/experimental/odp/aaa-cert-rpc.yang b/experimental/odp/aaa-cert-rpc.yang new file mode 100644 index 000000000..f250188ad --- /dev/null +++ b/experimental/odp/aaa-cert-rpc.yang @@ -0,0 +1,87 @@ +/* +Copyright (c) 2015 Inocybe Technology All rights reserved. + +This program and the accompanying materials are made available under the +terms of the Eclipse Public License v1.0 which accompanies this distribution, +and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL +*/ + +module aaa-cert-rpc { + yang-version 1; + namespace "urn:opendaylight:yang:aaa:cert:rpc"; + prefix "aaa-cert-rpc"; + + description + "defination of node certificate grouping and Rpc calls of certificate manipulation"; + + contact + "melserngawy@inocybe.com"; + + revision "2015-12-15" { + description + "Initial revision."; + } + + rpc getODLCertificate { + description + "Get the ODL keystore certificate"; + output { + leaf odl-cert { + type string; + } + } + } + + rpc getODLCertificateReq { + description + "Generate a certificate request from the ODL keystore to be signed by a CA"; + output { + leaf odl-cert-req { + type string; + } + } + } + + rpc setODLCertifcate { + description + "The certifcate should be generated based on + a certifcate request generated from the ctl.jks + keystore otherwise the certifcated will not be added to ctl keystore"; + input { + leaf odl-cert-alias { + type string; + } + leaf odl-cert { + type string; + } + } + } + + rpc setNodeCertifcate { + description + "Set the certifcate of the network node that will communicate with opendaylight through TLS connection"; + input { + leaf node-alias { + type string; + } + leaf node-cert { + type string; + } + } + } + + rpc getNodeCertifcate { + description + "Get the network node certificate based on node alias"; + input { + leaf node-alias { + type string; + } + } + output { + leaf node-cert { + type string; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/aaa-cert.yang b/experimental/odp/aaa-cert.yang new file mode 100644 index 000000000..93843b2dd --- /dev/null +++ b/experimental/odp/aaa-cert.yang @@ -0,0 +1,100 @@ +/* +Copyright (c) 2015 Inocybe Technology All rights reserved. + +This program and the accompanying materials are made available under the +terms of the Eclipse Public License v1.0 which accompanies this distribution, +and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL +*/ + +module aaa-cert { + yang-version 1; + namespace "urn:opendaylight:yang:aaa:cert"; + prefix aaa-cert; + + description + "Service definition for aaa certificate"; + + contact + "melserngawy@inocybe.com"; + + revision "2015-11-26" { + description + "Initial revision."; + } + + container aaa-cert-service-config { + leaf use-config { + description "Use the configuration data to create the keystores"; + type boolean; + default false; + } + leaf use-mdsal { + description "Use Mdsal as Data store for the keystore and certificates"; + type boolean; + default false; + } + leaf bundle-name { + description "bundle name of the default TLS config in MdsaL"; + type string; + } + container ctlKeystore { + leaf name { + description "keystore name default is ctl"; + type string; + } + leaf alias { + description "key alias"; + type string; + } + leaf store-password { + description "keystore password"; + type string; + } + leaf dname { + description "X.500 Distinguished Names should be in the following formate + CN=commonName + OU=organizationUnit + O=organizationName + L=localityName + S=stateName + C=country"; + type string; + } + leaf validity { + description "validity"; + type int32; + } + leaf key-alg { + description "The supported key generation algorithms i.e: DSA or RSA"; + type string; + } + leaf sign-alg { + description "The supported sign algorithmes i.e: SHA1withDSA or SHA1withRSA"; + type string; + } + leaf keysize { + description "the key size i.e: 1024"; + type int32; + } + leaf tls-protocols { + description "the TLS supported protocols SSLv2Hello,TLSv1.1,TLSv1.2"; + type string; + } + list cipher-suites { + leaf suite-name { + type string; + } + } + } + container trustKeystore { + leaf name { + description "keystore name default is truststore"; + type string; + } + leaf store-password { + description "keystore password"; + type string; + } + } + } +} diff --git a/experimental/odp/aaa-encrypt-service-config.yang b/experimental/odp/aaa-encrypt-service-config.yang new file mode 100644 index 000000000..42e9ef5ce --- /dev/null +++ b/experimental/odp/aaa-encrypt-service-config.yang @@ -0,0 +1,48 @@ +module aaa-encrypt-service-config { + yang-version 1; + namespace "config:aaa:authn:encrypt:service:config"; + prefix "aaa-encrypt-service-config"; + organization "OpenDayLight"; + + contact "melserngawy@inocybe.ca"; + + revision 2016-09-15 { + description + "Initial revision."; + } + + container aaa-encrypt-service-config { + leaf encrypt-key { + description "Encryption key"; + type string; + } + leaf password-length { + description "Encryption key password length"; + type int32; + } + leaf encrypt-salt { + description "Encryption key salt"; + type string; + } + leaf encrypt-method { + description "The encryption method to use"; + type string; + } + leaf encrypt-type { + description "The encryption type"; + type string; + } + leaf encrypt-iteration-count { + description "Number of iterations that will be used by the key"; + type int32; + } + leaf encrypt-key-length { + description "Key length"; + type int32; + } + leaf cipher-transforms { + description "cipher transformation type ex: AES/CBC/PKCS5Padding (128)"; + type string; + } + } +} \ No newline at end of file diff --git a/experimental/odp/aaa-password-service-config.yang b/experimental/odp/aaa-password-service-config.yang new file mode 100644 index 000000000..db4b53ff5 --- /dev/null +++ b/experimental/odp/aaa-password-service-config.yang @@ -0,0 +1,33 @@ +module aaa-password-service-config { + yang-version 1; + namespace "urn:opendaylight:aaa:password:service:config"; + prefix "aaa-password-service-config"; + organization "OpenDaylight"; + + contact "ryandgoulding@gmail.com"; + + revision "2017-06-19" { + description "Initial password service configuration."; + } + + container password-service-config { + + leaf algorithm { + type string; + default "SHA-512"; + description "The algorithm utilized for aaa-password-service hashing."; + } + + leaf iterations { + type int32; + default 20000; + description "The number of times to hash."; + } + + leaf private-salt { + type string; + description "The private salt for password hashing."; + } + + } +} \ No newline at end of file diff --git a/experimental/odp/aaa.yang b/experimental/odp/aaa.yang new file mode 100644 index 000000000..04b74dc76 --- /dev/null +++ b/experimental/odp/aaa.yang @@ -0,0 +1,169 @@ +module aaa { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:aaa"; + prefix "aaa"; + + revision "2016-12-14" { + description "Initial revision of aaa model"; + } + + grouping user { + leaf userid { + type string; + description "An internal wiring detail in the form 'name@domain'."; + } + leaf name { + type string; + description "The name of the user."; + } + leaf description { + type string; + default ""; + description "A description for the user; defaults to the empty string."; + } + leaf enabled { + type boolean; + default true; + description "Whether or not the user is enabled; defaults to true."; + } + leaf email { + type string; + default ""; + description "An email address for the user; defaults to the empty string."; + } + leaf password { + type string; + description "A one-way hashed and salted version of the users password."; + } + leaf salt { + type string; + description "A user-specific salt used for password hashing."; + } + leaf domainid { + type string; + description "The domain to which the user belongs."; + } + } + + grouping domain { + leaf domainid { + type string; + description "An internal wiring detail in the form 'name'."; + } + leaf name { + type string; + description "The name of the domain."; + } + leaf description { + type string; + default ""; + description "A description for the domain; defaults to the empty string."; + } + } + + grouping role { + leaf roleid { + type string; + description "An internal wiring detail in the form 'name'."; + } + leaf name { + type string; + description "The name for the role."; + } + leaf description { + type string; + default ""; + description "A description of the role; defaults to the empty string."; + } + leaf domainid { + type string; + description "The domain associated with the role."; + } + } + + grouping grant { + leaf grantid { + type string; + description "An internal wiring detail in the form 'userid@roleid@domainid'."; + } + leaf domainid { + type string; + description "A reference to the domain."; + } + leaf userid { + type string; + description "A reference to the user."; + } + leaf roleid { + type string; + description "A reference to the role."; + } + } + + container authentication { + + container domains { + list domains { + key domainid; + uses domain; + } + } + + container users { + list users { + key userid; + uses user; + } + } + + container roles { + list roles { + key roleid; + uses role; + } + } + + container grants { + list grants { + key grantid; + uses grant; + } + } + } + + grouping http-permission { + leaf resource { + type string; + default "*"; + } + list permissions { + leaf-list actions { + type enumeration { + enum get; + enum put; + enum post; + enum patch; + enum delete; + } + } + leaf role { + type string; + } + } + leaf description { + type string; + default ""; + } + } + + container http-authorization { + + container policies { + list policies { + key "resource"; + uses http-permission; + ordered-by user; + } + } + } +} diff --git a/experimental/odp/acl-live-statistics.yang b/experimental/odp/acl-live-statistics.yang new file mode 100644 index 000000000..75d792851 --- /dev/null +++ b/experimental/odp/acl-live-statistics.yang @@ -0,0 +1,94 @@ +module acl-live-statistics { + namespace "urn:opendaylight:netvirt:acl:live:statistics"; + prefix "acl-stats"; + + import ietf-interfaces {prefix if;} + import aclservice {prefix aclservice; revision-date "2016-06-08";} + + description "YANG model describes RPC to retrieve ACL live statistics."; + + revision "2016-11-29" { + description "Initial revision of ACL live statistics"; + } + + typedef direction { + type enumeration { + enum ingress; + enum egress; + enum both; + } + } + + grouping acl-drop-counts { + leaf drop-count { + type uint64; + } + leaf invalid-drop-count { + type uint64; + } + leaf anti-spoof-drop-count { + type uint64; + } + leaf total-drop-count { + type uint64; + } + } + + grouping acl-stats-output { + description "Output for ACL port statistics"; + list acl-port-stats { + key "interface-name"; + leaf interface-name { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + list acl-drop-stats { + max-elements "2"; + min-elements "0"; + leaf direction { + type direction; + } + container packets { + uses acl-drop-counts; + } + container bytes { + uses acl-drop-counts; + } + } + container error { + leaf error-message { + type string; + } + } + } + } + + grouping acl-stats-input { + description "Input parameters for ACL port statistics"; + + leaf direction { + type direction; + mandatory "true"; + } + leaf-list interface-names { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + max-elements "unbounded"; + min-elements "1"; + } + } + + rpc get-acl-port-statistics { + description "Get ACL statistics for given list of ports"; + + input { + uses acl-stats-input; + } + output { + uses acl-stats-output; + } + } + +} diff --git a/experimental/odp/aclservice-config.yang b/experimental/odp/aclservice-config.yang new file mode 100644 index 000000000..79ee2ad49 --- /dev/null +++ b/experimental/odp/aclservice-config.yang @@ -0,0 +1,64 @@ +module aclservice-config { + yang-version 1; + namespace "urn:opendaylight:netvirt:aclservice-config"; + prefix "aclservice-config"; + + description + "Configuration for acl-serviceImpl."; + + revision "2016-08-06" { + description + "Initial revision."; + } + + container aclservice-config { + config true; + leaf security-group-mode { + type enumeration { + enum "stateful"; + } + default "stateful"; + } + + leaf default-behavior { + type enumeration { + enum "allow"; + enum "deny"; + } + default "deny"; + } + + leaf security-group-tcp-idle-timeout { + type uint16; + default 18000; + } + leaf security-group-tcp-hard-timeout { + type uint16; + default 0; + } + leaf security-group-tcp-fin-idle-timeout { + type uint16; + default 300; + } + leaf security-group-tcp-fin-hard-timeout { + type uint16; + default 0; + } + leaf security-group-udp-idle-timeout { + type uint16; + default 300; + } + leaf security-group-udp-hard-timeout { + type uint16; + default 0; + } + leaf security-group-default-idle-timeout { + type uint16; + default 300; + } + leaf security-group-default-hard-timeout { + type uint16; + default 0; + } + } +} diff --git a/experimental/odp/aclservice.yang b/experimental/odp/aclservice.yang new file mode 100644 index 000000000..0ab2b6262 --- /dev/null +++ b/experimental/odp/aclservice.yang @@ -0,0 +1,204 @@ +module aclservice { + yang-version 1; + namespace "urn:opendaylight:netvirt:aclservice"; + prefix "aclservice"; + + import ietf-access-control-list { prefix ietf-acl;} + import ietf-yang-types { prefix "yang"; revision-date 2013-07-15; } + import yang-ext { prefix ext; revision-date 2013-07-09;} + import ietf-interfaces { prefix "ietf-if"; revision-date 2014-05-08;} + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + + description + "ACL Service module"; + + revision "2016-06-08" { + description + "Initial revision"; + } + + identity direction-base { + description "Base identity for direction"; + } + + identity direction-ingress { + description "Ingress direction."; + base direction-base; + } + + identity direction-egress { + description "Egress direction."; + base direction-base; + + } + + // IP VERSION + identity ip-version-base { + description "the base identity for ip versions"; + } + + identity ip-version-v4 { + description "IPv4"; + base ip-version-base; + } + + identity ip-version-v6 { + description "IPv6"; + base ip-version-base; + } + + // DHCP + identity dhcpv6-base { + description "the base identity for DHCPv6 information"; + } + + identity dhcpv6-off { + description "DHCPv6 off"; + base dhcpv6-base; + } + + identity dhcpv6-stateful { + description "DHCPv6 stateful"; + base dhcpv6-base; + } + + identity dhcpv6-slaac { + description "SLAAC"; + base dhcpv6-base; + } + + identity dhcpv6-stateless { + description "DHCPv6 stateless"; + base dhcpv6-base; + } + + typedef ip-prefix-or-address { + description "ip prefix or ip address"; + type union { + type inet:ip-prefix; + type inet:ip-address; + } + } + + augment "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ietf-acl:ace" { + description "Security Rule Attributes"; + ext:augment-identifier "security-rule-attr"; + leaf remote-group-id { + description "The remote group ID to be associated with this security group rule."; + type yang:uuid; + } + leaf direction { + type identityref { + base "direction-base"; + } + description "The direction in which metering rule is applied. + For a compute instance, an ingress security group rule is + applied to incoming (ingress) traffic for that instance. + An egress rule is applied to traffic leaving the instance."; + } + leaf deleted { + type boolean; + default false; + description "True when ACE is deleted; false otherwise."; + } + } + + augment "/ietf-if:interfaces/ietf-if:interface" { + description "Apply ACL to interfaces"; + ext:augment-identifier "interface-acl"; + leaf port-security-enabled { + type boolean; + description "The port security status. The status is enabled (true) or disabled (false)."; + } + leaf-list security-groups { + type yang:uuid; + description "The security group ID to associate with this interface."; + } + list allowed-address-pairs { + description "Allowed address pairs for this interface."; + key "mac-address ip-address"; + leaf mac-address { + type yang:mac-address; + } + leaf ip-address { + type ip-prefix-or-address; + } + } + } + + container port-subnets { + config false; + list port-subnet { + key port-id; + leaf port-id { + type string; + description "Port ID"; + } + list subnet-info { + key subnet-id; + leaf subnet-id { + type yang:uuid; + description "Subnet ID"; + } + leaf ip-version { + description "IP version"; + type identityref { + base "ip-version-base"; + } + } + leaf ip-prefix { + type ip-prefix-or-address; + description "Subnet IP prefix."; + } + leaf ipv6-ra-mode { + description "IPv6 RA mode"; + type identityref { + base "dhcpv6-base"; + } + } + leaf gateway-ip { + type inet:ip-address; + description "default gateway used by devices in this subnet"; + } + } + } + } + + container acl-ports-lookup { + config false; + description "Container used to manage list of ports per ACL based on + port's IP address/prefix (including IP address/prefix specified in + allowed-address-pair)"; + + list acl-ports-by-ip { + key "acl-name"; + description "Refers to an ACL which are associated with list of + ports filtered based on IP address/prefix."; + + leaf acl-name { + type string; + description "ACL name."; + } + list acl-ip-prefixes { + key "ip-prefix"; + description "IP Prefixes and Allowed-Address-Pairs owned by + ports where all such ports enforce the same ACL identified + by acl-name"; + + leaf ip-prefix { + type ip-prefix-or-address; + description "IP address/prefix"; + } + list port-ids { + key "port-id"; + description "Contains a list of ports that are enforcing + the same ACL identified by acl-name."; + leaf port-id { + type string; + description "Port UUID string"; + } + } + } + } + } +} diff --git a/experimental/odp/aliveness-monitor.yang b/experimental/odp/aliveness-monitor.yang new file mode 100644 index 000000000..b1d2d32dc --- /dev/null +++ b/experimental/odp/aliveness-monitor.yang @@ -0,0 +1,231 @@ +module aliveness-monitor { + namespace "urn:opendaylight:genius:alivenessmonitor"; + prefix alivenessmon; + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + + import ietf-yang-types { + prefix yang; + revision-date "2013-07-15"; + } + + revision "2016-04-11" { + description "YANG model describes methods for monitoring endpoints."; + } + + typedef monitor-protocol-type { + type enumeration { + enum arp; + enum lldp; + enum bfd; + enum ipv6-nd; + } + } + + typedef monitoring-mode { + type enumeration { + enum one-one; + } + } + + grouping endpoint { + choice endpoint-type { + case ip-address { + leaf ip-address { type inet:ip-address; } + } + case interface { + leaf mac-address { type yang:phys-address; } + leaf interface-ip { type inet:ip-address; } + leaf interface-name { type string; } + } + case host-name { + leaf host-name { type string; } + } + } + } + + grouping monitor-profile-params { + leaf monitor-interval { type uint32; } //Monitoring interval in milli-seconds + leaf monitor-window { type uint32; } //Number M of consecutive intervals to consider for monitoring + leaf failure-threshold { type uint32; } //Number N of missing messages in window to detect failure ("N out of M") + leaf protocol-type { type monitor-protocol-type; } + uses bfd-params; + } + + grouping bfd-params { + leaf min-rx { + description "The shortest interval, in milliseconds, at which this BFD session offers to receive BFD control messages. Defaults to 1000"; + type uint32; + } + leaf min-tx { + description "The shortest interval, in milliseconds, at which this BFD session is willing to transmit BFD control messages. Defaults to 100"; + type uint32; + } + leaf decay_min_rx { + description "An alternate receive interval, in milliseconds, that must be greater than or equal to bfd:min_rx. This + feature may be disabled by setting a value of 0"; + type uint32; + } + leaf forwarding_if_rx { + description "either true or false. True to consider the interface capable of packet I/O as long as it continues to receive any packets (not just BFD packets)"; + type string; + } + leaf cpath_down { + description "Set to true to notify the remote endpoint that traffic should not be forwarded to this system for some reason other than a + connectivity failure on the interface being monitored. Defaults to false"; + type string; + } + leaf check_tnl_key { + description "either true or false. Set to true to make BFD accept only control messages with a tunnel key of zero. + By default, BFD accepts control messages with any tunnel key."; + type string; + } + } + + grouping monitor-params { + leaf mode { type monitoring-mode; } + container source { uses endpoint; } + container destination { uses endpoint; } + leaf profile-id { type uint32; } + } + + // RPC Methods + rpc monitor-profile-create { + input { + container profile { + uses monitor-profile-params; + } + } + output { + leaf profile-id { type uint32; } + } + } + + rpc monitor-profile-get { + input { + container profile { + uses monitor-profile-params; + } + } + output { + leaf profile-id { type uint32; } + } + } + + rpc monitor-start { + input { + container config { + uses monitor-params; + } + } + output { + leaf monitor-id { type uint32; } + } + } + + rpc monitor-pause { + input { + leaf monitor-id { type uint32; } + } + } + + rpc monitor-unpause { + input { + leaf monitor-id { type uint32; } + } + } + + + rpc monitor-stop { + input { + leaf monitor-id { type uint32; } + } + } + + rpc monitor-profile-delete { + input { + leaf profile-id { type uint32; } + } + } + + // YANG Notifications + typedef liveness-state { + type enumeration { + enum up; + enum down; + enum unknown; + } + } + + grouping liveness-event-state { + leaf monitor-id { type uint32; } + leaf monitor-state { type liveness-state; } + } + + notification monitor-event { + container event-data { + uses liveness-event-state; + } + } + + //Operational Model + container monitor-profiles { + config false; + list monitor-profile { + key "id"; + leaf id { type uint32; } + uses monitor-profile-params; + } + } + + container monitor-configs { + config false; + list monitoring-info { + key "id"; + leaf id { type uint32; } + uses monitor-params; + } + } + + typedef monitor-status { + type enumeration { + enum started; + enum paused; + enum stopped; + } + } + + container monitoring-states { + config false; + list monitoring-state { + key "monitor-key"; + leaf monitor-key { type string; } //Key to identify monitor-id from packet-in + leaf monitor-id { type uint32; } + leaf response-pending-count { type uint32; } + leaf request-count { type uint32; } + leaf state { type liveness-state; } + leaf status { type monitor-status; } + } + } + + container monitorid-key-map { + config false; + list monitorid-key-entry { + key "monitor-id"; + leaf monitor-id { type uint32; } + leaf monitor-key { type string; } + } + } + + container interface-monitor-map { + config false; + list interface-monitor-entry { + key "interface-name"; + leaf interface-name { type string; } + leaf-list monitor-ids { type uint32; } + } + } +} diff --git a/experimental/odp/arbitrator-reconcile.yang b/experimental/odp/arbitrator-reconcile.yang new file mode 100644 index 000000000..0f43f9517 --- /dev/null +++ b/experimental/odp/arbitrator-reconcile.yang @@ -0,0 +1,50 @@ +module arbitrator-reconcile { + namespace "urn:opendaylight:params:xml:ns:yang:openflowplugin:app:arbitrator-reconcile:service"; + prefix arbitrator-reconcile; + + import opendaylight-inventory {prefix inv; revision-date "2013-08-19";} + import onf-extensions {prefix onf-ext; revision-date "2017-01-24";} + + description + "RPCs to perform arbitrator based reconciliation"; + + revision "2018-02-27" { + description "Initial proposal"; + } + + rpc get-active-bundle { + description "Fetches the active available bundle in openflowplugin"; + input { + uses "inv:node-context-ref"; + leaf node-id { + description "Node for which the bundle active has to be fetched"; + type uint64; + } + } + + output { + leaf result { + description "The retrieved active bundle for the node"; + type "onf-ext:bundle-id"; + } + } + } + + rpc commit-active-bundle { + description "Commits the active available bundle in openflowplugin"; + input { + uses "inv:node-context-ref"; + leaf node-id { + description "Node for which the commit bundle to be executed"; + type uint64; + } + } + + output { + leaf result { + description "Success/Failure of the commit bundle for the node"; + type boolean; + } + } + } +} diff --git a/experimental/odp/barrier-common.yang b/experimental/odp/barrier-common.yang new file mode 100644 index 000000000..168776e99 --- /dev/null +++ b/experimental/odp/barrier-common.yang @@ -0,0 +1,18 @@ +module barrier-common { + namespace "urn:opendaylight:service:barrier:common"; + prefix barrier-common; + + description "Openflow barrier for services - common groupings."; + + revision "2016-03-15" { + description "Initial revision of batch common groupings."; + } + + grouping barrier-suffix { + description "Flag indicating that barrier will be attached after some service-specific action."; + + leaf barrier-after { + type boolean; + } + } +} diff --git a/experimental/odp/batch-common.yang b/experimental/odp/batch-common.yang new file mode 100644 index 000000000..feb2082c5 --- /dev/null +++ b/experimental/odp/batch-common.yang @@ -0,0 +1,17 @@ +module batch-common { + namespace "urn:opendaylight:service:batch:common"; + prefix batch-common; + + description "Openflow batch services - common groupings."; + + revision "2016-03-22" { + description "Initial revision of batch common groupings."; + } + + grouping batch-order-grouping { + description "provide unified batch order value"; + leaf batch-order { + type uint16; + } + } +} diff --git a/experimental/odp/bgp-epe.yang b/experimental/odp/bgp-epe.yang new file mode 100644 index 000000000..2689c1f6f --- /dev/null +++ b/experimental/odp/bgp-epe.yang @@ -0,0 +1,39 @@ +module bgp-epe { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-epe"; + prefix "bgp-epe"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + + organization "Cisco Systems, Inc."; + contact "Milos Fabian "; + + description + "This module contains the base data concepts contained + in draft-ietf-idr-bgpls-segment-routing-epe-00. + + Copyright (c)2015 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2015-06-22" { + description + "Initial revision."; + } + + grouping epe-node-descriptors { + reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.1"; + leaf bgp-router-id { + description "BGP Router Identifier."; + type inet:ipv4-address; + } + + leaf member-asn { + description "Confederation Member ASN."; + type inet:as-number; + } + } +} \ No newline at end of file diff --git a/experimental/odp/bgp-flowspec.yang b/experimental/odp/bgp-flowspec.yang new file mode 100644 index 000000000..5324aaaa8 --- /dev/null +++ b/experimental/odp/bgp-flowspec.yang @@ -0,0 +1,665 @@ +module bgp-flowspec { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-flowspec"; + prefix "bgp-fs"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + import network-concepts { prefix netc; revision-date 2013-11-25; } + import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; } + + organization "Cisco Systems, Inc."; + contact "Dana Kutenicsova "; + + description + "This module contains the base data model of a BGP flow specification. + It rolls up the definitions contained in RFC5575. + + Copyright (c)2015 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision "2015-08-07" { + description + "IPv6 support"; + reference "https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-06"; + } + + revision "2015-01-14" { + description + "Initial revision."; + reference "http://tools.ietf.org/html/rfc5575"; + } + + identity flowspec-subsequent-address-family { + description "SAFI 133 for dissemination of unicast flow specification rules."; + reference "http://tools.ietf.org/html/rfc5575#section-11"; + + base bgp-t:subsequent-address-family; + } + + identity flowspec-l3vpn-subsequent-address-family { + description "SAFI 134 for dissemination of L3VPN flow specification rules"; + reference "http://tools.ietf.org/html/rfc5575#section-11"; + + base bgp-t:subsequent-address-family; + } + + typedef fragment { + reference "http://tools.ietf.org/html/rfc5575#section-4"; + type bits { + bit last { + position 4; + } + bit first { + position 5; + } + bit is-a { + position 6; + } + bit do-not { + position 7; + } + } + } + + typedef dscp { + reference "https://tools.ietf.org/html/rfc2474#section-3"; + type uint8 { + range "0..63"; + } + } + + typedef numeric-operand { + reference "http://tools.ietf.org/html/rfc5575#section-4"; + type bits { + bit end-of-list { + position 0; + } + bit and-bit { + position 1; + } + bit less-than { + position 5; + } + bit greater-than { + position 6; + } + bit equals { + position 7; + } + } + } + + typedef bitmask-operand { + reference "http://tools.ietf.org/html/rfc5575#section-4"; + type bits { + bit end-of-list { + position 0; + } + bit and-bit { + position 1; + } + bit not { + position 6; + } + bit match { + position 7; + } + } + } + + grouping numeric-two-byte-value { + reference "http://tools.ietf.org/html/rfc5575#section-4"; + leaf op { + type numeric-operand; + } + leaf value { + type uint16; + } + } + + grouping numeric-one-byte-value { + reference "http://tools.ietf.org/html/rfc5575#section-4"; + leaf op { + type numeric-operand; + } + leaf value { + type uint8; + } + } + + grouping bitmask-two-byte-value { + reference "http://tools.ietf.org/html/rfc5575#section-4"; + leaf op { + type bitmask-operand; + } + leaf value { + type uint16; + } + } + + grouping dscp-value { + reference "http://tools.ietf.org/html/rfc5575#section-4"; + leaf op { + type numeric-operand; + } + leaf value { + type dscp; + } + } + + grouping fragment-value { + reference "http://tools.ietf.org/html/rfc5575#section-4"; + leaf op { + type bitmask-operand; + } + leaf value { + type fragment; + } + } + + grouping flowspec-destination { + reference "http://tools.ietf.org/html/rfc5575#section-4"; + list flowspec { + choice flowspec-type { + case port-case { + list ports { + uses numeric-two-byte-value; + } + } + case destination-port-case { + list destination-ports { + uses numeric-two-byte-value; + } + } + case source-port-case { + list source-ports { + uses numeric-two-byte-value; + } + } + case icmp-type-case { + list types { + uses numeric-one-byte-value; + } + } + case icmp-code-case { + list codes { + uses numeric-one-byte-value; + } + } + case tcp-flags-case { + list tcp-flags { + uses bitmask-two-byte-value; + } + } + case packet-length-case { + list packet-lengths { + uses numeric-two-byte-value; + } + } + case dscp-case { + list dscps { + uses dscp-value; + } + } + case fragment-case { + list fragments { + uses fragment-value; + } + } + } + } + } + + grouping flowspec-destination-group-ipv4 { + reference "http://tools.ietf.org/html/rfc5575#section-4"; + uses flowspec-destination { + augment "flowspec/flowspec-type" { + case destination-prefix-case { + leaf destination-prefix { + type inet:ipv4-prefix; + } + } + case source-prefix-case { + leaf source-prefix { + type inet:ipv4-prefix; + } + } + case protocol-ip-case { + list protocol-ips { + uses numeric-one-byte-value; + } + } + } + } + } + + grouping flow-label-value { + reference "https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-06#section-3"; + leaf op { + type numeric-operand; + } + leaf value { + type uint32; + } + } + + grouping flowspec-destination-group-ipv6 { + reference "https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-06#section-3.1"; + uses flowspec-destination { + augment "flowspec/flowspec-type" { + case destination-ipv6-prefix-case { + leaf destination-prefix { + type inet:ipv6-prefix; + } + } + case source-ipv6-prefix-case { + leaf source-prefix { + type inet:ipv6-prefix; + } + } + case next-header-case { + list next-headers { + uses numeric-one-byte-value; + } + } + case flow-label-case { + list flow-label { + uses flow-label-value; + } + } + } + } + } + + grouping flowspec-destination-ipv4 { + container destination-flowspec-ipv4 { + uses flowspec-destination-group-ipv4; + uses bgp-msg:path-id-grouping; + } + } + + grouping flowspec-destination-ipv6 { + container destination-flowspec-ipv6 { + uses flowspec-destination-group-ipv6; + uses bgp-msg:path-id-grouping; + } + } + + grouping flowspec-l3vpn-destination-ipv4 { + container destination-flowspec-l3vpn-ipv4 { + uses bgp-t:route-distinguisher-grouping; + uses flowspec-destination-group-ipv4; + uses bgp-msg:path-id-grouping; + } + } + + grouping flowspec-l3vpn-destination-ipv6 { + container destination-flowspec-l3vpn-ipv6 { + uses bgp-t:route-distinguisher-grouping; + uses flowspec-destination-group-ipv6; + uses bgp-msg:path-id-grouping; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" { + case destination-flowspec-case { + uses flowspec-destination-ipv4; + } + case destination-flowspec-ipv6-case { + uses flowspec-destination-ipv6; + } + case destination-flowspec-l3vpn-ipv4-case { + uses flowspec-l3vpn-destination-ipv4; + } + case destination-flowspec-l3vpn-ipv6-case { + uses flowspec-l3vpn-destination-ipv6; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" { + case destination-flowspec-case { + uses flowspec-destination-ipv4; + } + case destination-flowspec-ipv6-case { + uses flowspec-destination-ipv6; + } + case destination-flowspec-l3vpn-ipv4-case { + uses flowspec-l3vpn-destination-ipv4; + } + case destination-flowspec-l3vpn-ipv6-case { + uses flowspec-l3vpn-destination-ipv6; + } + } + + grouping traffic-rate-extended-community { + container traffic-rate-extended-community { + leaf informative-as { + type bgp-t:short-as-number; + } + leaf local-administrator { + type netc:bandwidth; + } + } + } + + grouping traffic-action-extended-community { + container traffic-action-extended-community { + leaf sample { + type boolean; + default false; + } + leaf terminal-action { + type boolean; + default false; + } + } + } + + grouping redirect-extended-community { + container redirect-extended-community { + leaf global-administrator { + type bgp-t:short-as-number; + } + leaf local-administrator { + type binary { + length "4"; + } + } + } + } + + grouping redirect-ipv4-extended-community { + reference "http://tools.ietf.org/html/rfc7674"; + container redirect-ipv4 { + uses bgp-t:route-ipv4-extended-community; + } + } + + grouping redirect-ipv6-extended-community { + container redirect-ipv6 { + leaf global-administrator { + type inet:ipv6-address; + } + leaf local-administrator { + type uint16; + } + } + } + + grouping redirect-as4-extended-community { + reference "http://tools.ietf.org/html/rfc7674"; + container redirect-as4 { + leaf global-administrator { + type inet:as-number; + } + leaf local-administrator { + type uint16; + } + } + } + + grouping traffic-marking-extended-community { + container traffic-marking-extended-community { + leaf global-administrator { + type dscp; + } + } + } + + grouping redirect-ip-nh-extended-community { + reference "https://tools.ietf.org/html/draft-ietf-idr-flowspec-redirect-ip-02"; + container redirect-ip-nh-extended-community { + leaf next-hop-address { + type inet:ip-address; + } + leaf copy { + type boolean; + } + } + } + + grouping bgp-rib-route { + uses bgp-rib:route { + augment "attributes/extended-communities/extended-community" { + case traffic-rate-extended-community-case { + uses traffic-rate-extended-community; + } + case traffic-action-extended-community-case { + uses traffic-action-extended-community; + } + case redirect-extended-community-case { + uses redirect-extended-community; + } + case traffic-marking-extended-community-case { + uses traffic-marking-extended-community; + } + case redirect-ipv4-extended-community-case { + uses redirect-ipv4-extended-community; + } + case redirect-ipv6-extended-community-case { + uses redirect-ipv6-extended-community; + } + case redirect-as4-extended-community-case { + uses redirect-as4-extended-community; + } + case redirect-ip-nh-extended-community-case { + uses redirect-ip-nh-extended-community; + } + } + } + } + + grouping flowspec-ipv4-route-list { + uses flowspec-destination-group-ipv4; + uses bgp-rib-route; + } + + grouping flowspec-ipv4-route { + list flowspec-route { + key "route-key path-id"; + uses flowspec-ipv4-route-list; + } + } + + grouping flowspec-l3vpn-ipv4-route { + list flowspec-l3vpn-route { + key "route-key path-id"; + uses flowspec-ipv4-route-list; + uses bgp-t:route-distinguisher-grouping; + } + } + + grouping flowspec-ipv6-route-list { + uses flowspec-destination-group-ipv6; + uses bgp-rib-route; + } + + grouping flowspec-ipv6-route { + list flowspec-route { + key "route-key path-id"; + uses flowspec-ipv6-route-list; + } + } + + grouping flowspec-l3vpn-ipv6-route { + list flowspec-l3vpn-route { + key "route-key path-id"; + uses flowspec-ipv6-route-list; + uses bgp-t:route-distinguisher-grouping; + } + } + + grouping flowspec-routes { + container flowspec-routes { + uses flowspec-ipv4-route; + } + } + + grouping flowspec-ipv6-routes { + container flowspec-ipv6-routes { + uses flowspec-ipv6-route; + } + } + + grouping flowspec-l3vpn-ipv4-routes { + container flowspec-l3vpn-ipv4-routes { + uses flowspec-l3vpn-ipv4-route; + } + } + + grouping flowspec-l3vpn-ipv6-routes { + container flowspec-l3vpn-ipv6-routes { + uses flowspec-l3vpn-ipv6-route; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-msg:extended-communities/bgp-msg:extended-community" { + reference "https://tools.ietf.org/html/rfc5575#section-7"; + case traffic-rate-extended-community-case { + uses traffic-rate-extended-community; + } + case traffic-action-extended-community-case { + uses traffic-action-extended-community; + } + case redirect-extended-community-case { + uses redirect-extended-community; + } + case traffic-marking-extended-community-case { + uses traffic-marking-extended-community; + } + case redirect-ipv4-extended-community-case { + uses redirect-ipv4-extended-community; + } + case redirect-ipv6-extended-community-case { + uses redirect-ipv6-extended-community; + } + case redirect-as4-extended-community-case { + uses redirect-as4-extended-community; + } + case redirect-ip-nh-extended-community-case { + uses redirect-ip-nh-extended-community; + } + } + + augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" { + case flowspec-routes-case { + uses flowspec-routes; + } + case flowspec-ipv6-routes-case { + uses flowspec-ipv6-routes; + } + case flowspec-l3vpn-ipv4-routes-case { + uses flowspec-l3vpn-ipv4-routes; + } + case flowspec-l3vpn-ipv6-routes-case { + uses flowspec-l3vpn-ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" { + case flowspec-routes-case { + uses flowspec-routes; + } + case flowspec-ipv6-routes-case { + uses flowspec-ipv6-routes; + } + case flowspec-l3vpn-ipv4-routes-case { + uses flowspec-l3vpn-ipv4-routes; + } + case flowspec-l3vpn-ipv6-routes-case { + uses flowspec-l3vpn-ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" { + case flowspec-routes-case { + uses flowspec-routes; + } + case flowspec-ipv6-routes-case { + uses flowspec-ipv6-routes; + } + case flowspec-l3vpn-ipv4-routes-case { + uses flowspec-l3vpn-ipv4-routes; + } + case flowspec-l3vpn-ipv6-routes-case { + uses flowspec-l3vpn-ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" { + case flowspec-routes-case { + uses flowspec-routes; + } + case flowspec-ipv6-routes-case { + uses flowspec-ipv6-routes; + } + case flowspec-l3vpn-ipv4-routes-case { + uses flowspec-l3vpn-ipv4-routes; + } + case flowspec-l3vpn-ipv6-routes-case { + uses flowspec-l3vpn-ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" { + case flowspec-routes-case { + uses flowspec-routes; + } + case flowspec-ipv6-routes-case { + uses flowspec-ipv6-routes; + } + case flowspec-l3vpn-ipv4-routes-case { + uses flowspec-l3vpn-ipv4-routes; + } + case flowspec-l3vpn-ipv6-routes-case { + uses flowspec-l3vpn-ipv6-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case flowspec-routes-case { + uses flowspec-routes; + } + case flowspec-ipv6-routes-case { + uses flowspec-ipv6-routes; + } + case flowspec-l3vpn-ipv4-routes-case { + uses flowspec-l3vpn-ipv4-routes; + } + case flowspec-l3vpn-ipv6-routes-case { + uses flowspec-l3vpn-ipv6-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case flowspec-routes-case { + uses flowspec-routes; + } + case flowspec-ipv6-routes-case { + uses flowspec-ipv6-routes; + } + case flowspec-l3vpn-ipv4-routes-case { + uses flowspec-l3vpn-ipv4-routes; + } + case flowspec-l3vpn-ipv6-routes-case { + uses flowspec-l3vpn-ipv6-routes; + } + } + +} diff --git a/experimental/odp/bgp-inet.yang b/experimental/odp/bgp-inet.yang new file mode 100644 index 000000000..5c6758f42 --- /dev/null +++ b/experimental/odp/bgp-inet.yang @@ -0,0 +1,198 @@ +module bgp-inet { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-inet"; + prefix "bgp-inet"; + + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; } + + organization "Cisco Systems, Inc."; + contact "Dana Kutenicsova "; + + description + "This module contains the concept of IPv4 and IPv6 routes, + split from bgp-rib and bgp-multiprotocol models. + + Copyright (c)2015 Cisco Systems, Inc. All rights reserved. + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision "2015-03-05" { + description + "Initial revision."; + } + + grouping ipv6-prefix { + leaf prefix { + type inet:ipv6-prefix; + } + } + + grouping ipv4-prefixes { + container destination-ipv4 { + list ipv4-prefixes { + uses bgp-msg:ipv4-prefix-and-path-id; + } + } + } + + grouping ipv6-prefixes { + container destination-ipv6 { + list ipv6-prefixes { + uses ipv6-prefix; + uses bgp-msg:path-id-grouping; + } + } + } + + grouping ipv4-routes { + container ipv4-routes { + list ipv4-route { + key "route-key path-id"; + uses bgp-rib:route; + leaf prefix { + type inet:ipv4-prefix; + } + } + } + } + + grouping ipv6-bgp-prefix-sid-tlv { + reference "https://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-02#section-4.2"; + leaf process-ipv6-head-ability { + description "S flag position 0. If set then it means that the BGP speaker is capable of processing the + IPv6 Segment Routing Header."; + type boolean; + default "true"; + } + } + + grouping ipv6-routes { + container ipv6-routes { + list ipv6-route { + key "route-key path-id"; + uses ipv6-prefix; + + uses bgp-rib:route { + augment "attributes/bgp-prefix-sid/bgp-prefix-sid-tlvs/bgp-prefix-sid-tlv" { + case ipv6-sid-tlv { + uses ipv6-bgp-prefix-sid-tlv; + } + } + } + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" { + case destination-ipv4-case { + when "../../afi = ipv4"; + uses ipv4-prefixes; + } + case destination-ipv6-case { + when "../../afi = ipv6"; + uses ipv6-prefixes; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" { + case destination-ipv4-case { + when "../../afi = ipv4"; + uses ipv4-prefixes; + } + case destination-ipv6-case { + when "../../afi = ipv6"; + uses ipv6-prefixes; + } + } + + augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" { + case ipv4-routes-case { + uses ipv4-routes; + } + + case ipv6-routes-case { + uses ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" { + case ipv4-routes-case { + uses ipv4-routes; + } + + case ipv6-routes-case { + uses ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" { + case ipv4-routes-case { + uses ipv4-routes; + } + + case ipv6-routes-case { + uses ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" { + case ipv4-routes-case { + uses ipv4-routes; + } + + case ipv6-routes-case { + uses ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" { + case ipv4-routes-case { + uses ipv4-routes; + } + + case ipv6-routes-case { + uses ipv6-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case ipv4-routes-case { + uses ipv4-routes; + } + + case ipv6-routes-case { + uses ipv6-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case ipv4-routes-case { + uses ipv4-routes; + } + + case ipv6-routes-case { + uses ipv6-routes; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-msg:bgp-prefix-sid/bgp-msg:bgp-prefix-sid-tlvs/bgp-msg:bgp-prefix-sid-tlv" { + case ipv6-sid-tlv { + uses ipv6-bgp-prefix-sid-tlv; + } + } +} + diff --git a/experimental/odp/bgp-l3vpn-mcast.yang b/experimental/odp/bgp-l3vpn-mcast.yang new file mode 100644 index 000000000..4d68bea35 --- /dev/null +++ b/experimental/odp/bgp-l3vpn-mcast.yang @@ -0,0 +1,172 @@ +module bgp-l3vpn-mcast { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp:l3vpn:mcast"; + prefix "bgp-l3vpn-mcast"; + + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; } + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + + organization "AT&T Services, Inc."; + + contact "Claudio D. Gasparini "; + + description + "This module contains the base data model of a BGP message. + It rolls up the definitions contained in RFC6513, RFC6514. + + Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision 2018-04-17 { + description "Initial version"; + } + + identity mcast-mpls-labeled-vpn-subsequent-address-family { + description "SAFI 129 multicast l3vpn"; + reference "https://www.iana.org/assignments/safi-namespace/safi-namespace.xhtml"; + + base bgp-t:subsequent-address-family; + } + + grouping l3vpn-mcast-route { + leaf prefix { + type inet:ip-prefix; + } + uses bgp-t:route-distinguisher-grouping; + } + + grouping l3vpn-mcast-destination { + list l3vpn-mcast-destination { + uses l3vpn-mcast-route; + uses bgp-msg:path-id-grouping; + } + } + + grouping l3vpn-mcast-routes { + list l3vpn-mcast-route { + key "route-key path-id"; + uses bgp-rib:route; + uses l3vpn-mcast-route; + } + } + + grouping l3vpn-mcast-routes-ipv4 { + container l3vpn-mcast-routes-ipv4 { + uses l3vpn-mcast-routes; + } + } + + grouping l3vpn-mcast-routes-ipv6 { + container l3vpn-mcast-routes-ipv6 { + uses l3vpn-mcast-routes; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" { + case destination-l3vpn-mcast-ipv4-advertized-case { + when "../../afi = ipv4"; + container destination-ipv4-l3vpn-mcast { + uses l3vpn-mcast-destination; + } + } + case destination-l3vpn-mcast-ipv6-advertized-case { + when "../../afi = ipv6"; + container destination-ipv6-l3vpn-mcast { + uses l3vpn-mcast-destination; + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" { + case destination-l3vpn-mcast-ipv4-withdrawn-case { + when "../../afi = ipv4"; + container destination-ipv4-l3vpn-mcast { + uses l3vpn-mcast-destination; + } + } + case destination-l3vpn-mcast-ipv6-withdrawn-case { + when "../../afi = ipv6"; + container destination-ipv6-l3vpn-mcast { + uses l3vpn-mcast-destination; + } + } + } + + augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" { + case l3vpn-mcast-routes-ipv4-case { + uses l3vpn-mcast-routes-ipv4; + } + + case l3vpn-mcast-routes-ipv6-case { + uses l3vpn-mcast-routes-ipv6; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" { + case l3vpn-mcast-routes-ipv4-case { + uses l3vpn-mcast-routes-ipv4; + } + + case l3vpn-mcast-routes-ipv6-case { + uses l3vpn-mcast-routes-ipv6; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" { + case l3vpn-mcast-routes-ipv4-case { + uses l3vpn-mcast-routes-ipv4; + } + + case l3vpn-mcast-routes-ipv6-case { + uses l3vpn-mcast-routes-ipv6; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" { + case l3vpn-mcast-routes-ipv4-case { + uses l3vpn-mcast-routes-ipv4; + } + + case l3vpn-mcast-routes-ipv6-case { + uses l3vpn-mcast-routes-ipv6; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" { + case l3vpn-mcast-routes-ipv4-case { + uses l3vpn-mcast-routes-ipv4; + } + + case l3vpn-mcast-routes-ipv6-case { + uses l3vpn-mcast-routes-ipv6; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case l3vpn-mcast-routes-ipv4-case { + uses l3vpn-mcast-routes-ipv4; + } + + case l3vpn-mcast-routes-ipv6-case { + uses l3vpn-mcast-routes-ipv6; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case l3vpn-mcast-routes-ipv4-case { + uses l3vpn-mcast-routes-ipv4; + } + + case l3vpn-mcast-routes-ipv6-case { + uses l3vpn-mcast-routes-ipv6; + } + } +} \ No newline at end of file diff --git a/experimental/odp/bgp-labeled-unicast.yang b/experimental/odp/bgp-labeled-unicast.yang new file mode 100644 index 000000000..d911c16ed --- /dev/null +++ b/experimental/odp/bgp-labeled-unicast.yang @@ -0,0 +1,237 @@ +module bgp-labeled-unicast { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast"; + prefix "bgp-lu"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; } + import network-concepts { prefix netc; revision-date 2013-11-25; } + import bgp-inet { prefix bgp-inet; revision-date 2018-03-29; } + + organization "Cisco Systems, Inc."; + contact "GE QU " + + " Mingming Chen "; + + description + "This module contains the base data model of a BGP message. + It rolls up the definitions contained in RFC3107. + + Copyright (c)2015 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision "2015-05-25" { + description + "Initial Version."; + } + + identity labeled-unicast-subsequent-address-family { + reference "https://tools.ietf.org/html/rfc3107#section-3"; + base bgp-t:subsequent-address-family; + } + + typedef srgb { + type uint32 { + range "0..16777215"; + } + } + + grouping label { + reference "https://tools.ietf.org/html/rfc3032#section-2.1"; + description + "The lable stack entry."; + leaf label-value { + type netc:mpls-label; + } + } + + grouping labeled-unicast { + reference "https://tools.ietf.org/html/rfc3107#section-3"; + list label-stack { + description + "The Label field carries one or more labels (that corresponds to + the stack of labels). Each label is encoded as 3 + octets, where the high-order 20 bits contain the label value, + and the low order bit contains 'Bottom of Stack'."; + uses label; + ordered-by user; + } + leaf prefix { + type inet:ip-prefix; + } + } + + grouping labeled-unicast-destination { + list c-labeled-unicast-destination { + uses labeled-unicast; + uses bgp-msg:path-id-grouping; + } + } + + grouping labeled-unicast-routes-list { + list labeled-unicast-route { + key "route-key path-id"; + uses labeled-unicast; + uses bgp-rib:route { + augment "attributes/bgp-prefix-sid/bgp-prefix-sid-tlvs/bgp-prefix-sid-tlv" { + case lu-label-index-tlv { + uses label-index-tlv; + } + case lu-originator-srgb-tlv { + uses originator-srgb-tlv; + } + } + } + } + } + + grouping labeled-unicast-routes { + container labeled-unicast-routes { + uses labeled-unicast-routes-list; + } + } + + grouping labeled-unicast-ipv6-routes { + container labeled-unicast-ipv6-routes { + uses labeled-unicast-routes-list; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" { + case destination-labeled-unicast-case { + container destination-labeled-unicast { + uses labeled-unicast-destination; + } + } + case destination-ipv6-labeled-unicast-case { + container destination-ipv6-labeled-unicast { + uses labeled-unicast-destination; + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" { + case destination-labeled-unicast-case { + container destination-labeled-unicast { + uses labeled-unicast-destination; + } + } + case destination-ipv6-labeled-unicast-case { + container destination-ipv6-labeled-unicast { + uses labeled-unicast-destination; + } + } + } + + augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" { + case labeled-unicast-routes-case { + uses labeled-unicast-routes; + } + case labeled-unicast-ipv6-routes-case { + uses labeled-unicast-ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" { + case labeled-unicast-routes-case { + uses labeled-unicast-routes; + } + case labeled-unicast-ipv6-routes-case { + uses labeled-unicast-ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" { + case labeled-unicast-routes-case { + uses labeled-unicast-routes; + } + case labeled-unicast-ipv6-routes-case { + uses labeled-unicast-ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" { + case labeled-unicast-routes-case { + uses labeled-unicast-routes; + } + case labeled-unicast-ipv6-routes-case { + uses labeled-unicast-ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" { + case labeled-unicast-routes-case { + uses labeled-unicast-routes; + } + case labeled-unicast-ipv6-routes-case { + uses labeled-unicast-ipv6-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case labeled-unicast-routes-case { + uses labeled-unicast-routes; + } + case labeled-unicast-ipv6-routes-case { + uses labeled-unicast-ipv6-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case labeled-unicast-routes-case { + uses labeled-unicast-routes; + } + case labeled-unicast-ipv6-routes-case { + uses labeled-unicast-ipv6-routes; + } + } + + grouping label-index-tlv { + reference "https://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-02#section-4.1"; + leaf label-index-tlv { + description "Value representing the index value in the SRGB space."; + type uint32; + mandatory true; + } + } + + grouping originator-srgb-tlv { + reference "https://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-02#section-4.3"; + list srgb-value { + description "Originator SRGB: 3 octets of base followed by 3 octets of range."; + leaf base { + type srgb; + mandatory true; + } + leaf range { + type srgb; + mandatory true; + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-msg:bgp-prefix-sid/bgp-msg:bgp-prefix-sid-tlvs/bgp-msg:bgp-prefix-sid-tlv" { + reference "https://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-02"; + case lu-label-index-tlv { + uses label-index-tlv; + } + case lu-originator-srgb-tlv { + uses originator-srgb-tlv; + } + } +} diff --git a/experimental/odp/bgp-linkstate-app-config.yang b/experimental/odp/bgp-linkstate-app-config.yang new file mode 100644 index 000000000..7472fdb88 --- /dev/null +++ b/experimental/odp/bgp-linkstate-app-config.yang @@ -0,0 +1,29 @@ +module bgp-linkstate-app-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate-app-config"; + prefix "bgp-linkstate-app-config"; + + description + "Configuration for the BGP linkstate application."; + + revision "2016-06-14" { + description + "Initial revision. + + Copyright (c)2016 Brocade Communications Systems, Inc. and others. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + } + + container bgp-linkstate-app-config { + leaf iana-linkstate-attribute-type { + description "If true (default) linkstate attribute type (=29) allocated by IANA is used, + else type (=99) is used for parsing/serialization"; + type boolean; + default true; + } + } +} \ No newline at end of file diff --git a/experimental/odp/bgp-linkstate.yang b/experimental/odp/bgp-linkstate.yang new file mode 100644 index 000000000..6da03f12d --- /dev/null +++ b/experimental/odp/bgp-linkstate.yang @@ -0,0 +1,867 @@ +module bgp-linkstate { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-linkstate"; + prefix "bgp-ls"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + import network-concepts { prefix netc; revision-date 2013-11-25; } + import rsvp { prefix rsvp; revision-date 2015-08-20; } + import bgp-segment-routing { prefix bgp-sr; revision-date 2015-10-14; } + import bgp-epe { prefix bgp-epe; revision-date 2015-06-22; } + import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + + organization "Cisco Systems, Inc."; + contact "Dana Kutenicsova "; + + description + "This module contains the base data model of a BGP message. + It rolls up the definitions contained in RFC4271 + and RFC7752. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi. + and Updated to include Performance Metric Extensions"; + reference "draft-ietf-idr-te-pm-bgp-17"; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision "2015-02-10" { + description + "Updated to include segment routing."; + } + + revision "2013-11-25" { + description + "Updated to cover network-concepts."; + } + + revision "2013-09-18" { + description + "Initial revision."; + reference "draft-ietf-idr-ls-distribution-03"; + } + + identity linkstate-address-family { + reference "https://tools.ietf.org/html/rfc7752#section-3.2"; + + base bgp-t:address-family; + } + + identity linkstate-subsequent-address-family { + reference "https://tools.ietf.org/html/rfc7752#section-3.2"; + + base bgp-t:subsequent-address-family; + } + + typedef nlri-type { + reference "https://tools.ietf.org/html/rfc7752#section-3.2"; + type enumeration { + enum node { + value 1; + } + enum link { + value 2; + } + enum ipv4-prefix { + value 3; + } + enum ipv6-prefix { + value 4; + } + enum ipv4-te-lsp { + status deprecated; + reference "http://tools.ietf.org/html/rfc7752#section-4.1"; + value 5; + } + enum ipv6-te-lsp { + status deprecated; + reference "http://tools.ietf.org/html/rfc7752#section-4.1"; + value 6; + } + } + } + + typedef protocol-id { + reference "https://tools.ietf.org/html/rfc7752#section-3.2"; + type enumeration { + enum isis-level1 { + value 1; + } + enum isis-level2 { + value 2; + } + enum ospf { + value 3; + } + enum direct { + value 4; + } + enum static { + value 5; + } + enum ospf-v3 { + value 6; + } + enum bgp-epe { + reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4"; + value 7; + } + enum rsvp-te { + status deprecated; + reference "http://tools.ietf.org/html/rfc7752#section-2.1"; + value 8; // rsvp-te protocol-id TBD by IANA + } + enum segment-routing { + status deprecated; + reference "http://tools.ietf.org/html/rfc7752#section-2.1"; + value 9; // segment-routing protocol-id TBD by IANA + } + } + } + + typedef ospf-route-type { + reference "https://tools.ietf.org/html/rfc7752#section-3.2.3.1"; + type enumeration { + enum intra-area { + value 1; + } + enum inter-area { + value 2; + } + enum external1 { + value 3; + } + enum external2 { + value 4; + } + enum nssa1 { + value 5; + } + enum nssa2 { + value 6; + } + } + } + + typedef identifier { + type uint64; + } + + typedef domain-identifier { + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; + type uint32; + } + + typedef area-identifier { + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; + type uint32; + } + + typedef ipv4-interface-identifier { + reference "http://tools.ietf.org/html/rfc5305#section-3.2"; + type inet:ipv4-address; + } + + typedef ipv6-interface-identifier { + reference "http://tools.ietf.org/html/rfc6119#section-4.2"; + type inet:ipv6-address; + } + + typedef ospf-interface-identifier { + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; + type uint32; + } + + typedef topology-identifier { + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.5"; + type uint16 { + range "0..4095"; + } + } + + + grouping isis-router-identifier { + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; + leaf iso-system-id { + type netc:iso-system-identifier; + mandatory true; + } + } + + grouping isis-lan-identifier { + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; + container is-is-router-identifier { + uses isis-router-identifier; + } + leaf psn { + type uint8 { + range "1..255"; + } + mandatory true; + } + } + + grouping ospf-router-identifier { + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; + leaf ospf-router-id { + type uint32; + mandatory true; + } + } + + grouping ospf-v2-lan-identifier { + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; + uses ospf-router-identifier; + leaf ipv4-address { + type ipv4-interface-identifier; + mandatory true; + } + } + + grouping ospf-v3-lan-identifier { + reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4"; + uses ospf-router-identifier; + leaf lan-interface { + type ospf-interface-identifier; + mandatory true; + } + } + + grouping node-identifier { + leaf as-number { + type inet:as-number; + } + leaf area-id { + type area-identifier; + } + leaf domain-id { + type domain-identifier; + } + choice c-router-identifier { + case isis-node-case { + container isis-node { + uses isis-router-identifier; + } + } + case isis-pseudonode-case { + container isis-pseudonode { + uses isis-lan-identifier; + } + } + case ospf-node-case { + container ospf-node { + uses ospf-router-identifier; + } + } + case ospf-pseudonode-case { + container ospf-pseudonode { + uses ospf-v3-lan-identifier; + } + } + } + } + + grouping link-lr-identifiers { + reference "http://tools.ietf.org/html/rfc5307"; + leaf link-local-identifier { + type uint32; + } + leaf link-remote-identifier { + type uint32; + } + } + + grouping prefix-identifiers { + leaf multi-topology-id { + type topology-identifier; + } + leaf ospf-route-type { + when "../../protocol-id[ .='ospf' or .='ospf-v3' ]"; + type ospf-route-type; + } + leaf ip-reachability-information { + type inet:ip-prefix; + } + } + + grouping link-identifier { + uses link-lr-identifiers; + leaf ipv4-interface-address { + type ipv4-interface-identifier; + } + leaf ipv6-interface-address { + type ipv6-interface-identifier; + } + leaf ipv4-neighbor-address { + type ipv4-interface-identifier; + } + leaf ipv6-neighbor-address { + type ipv6-interface-identifier; + } + leaf multi-topology-id { + type topology-identifier; + } + } + + grouping linkstate { + uses bgp-t:route-distinguisher-grouping { + refine route-distinguisher { + mandatory false; + } + } + leaf protocol-id { + type protocol-id; + mandatory true; + } + leaf identifier { + type identifier; + mandatory true; + } + choice object-type { + case node-case { + container node-descriptors { + uses node-identifier; + } + } + case link-case { + container local-node-descriptors { + uses node-identifier; + uses bgp-epe:epe-node-descriptors; + } + container remote-node-descriptors { + uses node-identifier; + uses bgp-epe:epe-node-descriptors; + } + container link-descriptors { + uses link-identifier; + } + } + case prefix-case { + container advertising-node-descriptors { + uses node-identifier; + } + container prefix-descriptors { + uses prefix-identifiers; + } + } + case te-lsp-case { + choice address-family { + case ipv4-case { + leaf ipv4-tunnel-sender-address { + type inet:ipv4-address; + mandatory true; + } + leaf ipv4-tunnel-endpoint-address { + type inet:ipv4-address; + mandatory true; + } + } + case ipv6-case { + leaf ipv6-tunnel-sender-address { + type inet:ipv6-address; + mandatory true; + } + leaf ipv6-tunnel-endpoint-address { + type inet:ipv6-address; + mandatory true; + } + } + } + leaf tunnel-id { + type rsvp:tunnel-id; + } + leaf lsp-id { + type rsvp:lsp-id; + } + } + } + } + + grouping linkstate-destination { + list c-linkstate-destination { + uses linkstate; + uses bgp-msg:path-id-grouping; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" { + case destination-linkstate-case { + container destination-linkstate { + uses linkstate-destination; + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" { + case destination-linkstate-case { + container destination-linkstate { + uses linkstate-destination; + } + } + } + + typedef node-flag-bits { + reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.1"; + type bits { + bit overload { + position 0; + } + bit attached { + position 1; + } + bit external { + position 2; + } + bit abr { + position 3; + } + bit router { + position 4; + } + bit v6 { + position 5; + } + } + } + + typedef isis-area-identifier { + reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.2"; + type binary { + length "1..20"; + } + } + + typedef ipv4-router-identifier { + reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.4"; + type inet:ipv4-address; + } + + typedef ipv6-router-identifier { + reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.4"; + type inet:ipv6-address; + } + + grouping node-state { + reference "https://tools.ietf.org/html/rfc7752#section-3.3.1"; + leaf-list topology-identifier { + type topology-identifier; + } + leaf node-flags { + type node-flag-bits; + } + leaf-list isis-area-id { + type isis-area-identifier; + } + leaf dynamic-hostname { + type string; + } + leaf ipv4-router-id { + type ipv4-router-identifier; + } + leaf ipv6-router-id { + type ipv6-router-identifier; + } + container sr-capabilities { + uses bgp-sr:sr-capabilities-tlv; + } + container sr-algorithm { + uses bgp-sr:sr-algorithms-tlv; + } + } + + typedef link-protection-type { + reference "http://tools.ietf.org/html/rfc5307#section-1.2"; + type enumeration { + enum extra-traffic { + value 1; + } + enum unprotected { + value 2; + } + enum shared { + value 4; + } + enum dedicated-1to1 { + value 8; + } + enum dedicated-1plus1 { + value 16; + } + enum enhanced { + value 32; + } + } + } + + // linkstate + typedef mpls-protocol-mask { + reference "http://tools.ietf.org/html/rfc7752#section-3.3.2.2"; + type bits { + bit ldp { + position 0; + } + bit rsvpte { + position 1; + } + } + } + + typedef administrative-group { + type uint32; + } + + grouping unreserved-bandwidth { + leaf priority { + type uint8 { + range "0..7"; + } + } + leaf bandwidth { + type netc:bandwidth; + } + } + + typedef delay { + description "This 24-bit typedef describes delay over a configurable + interval in microseconds, encoded as an integer value. When set to + the maximum value 16,777,215 (16.777215 sec), then the delay is at + least that value, and it may be larger."; + reference "https://tools.ietf.org/html/rfc7471#section-4.1.5"; + type uint32 { + range "0..16777215"; + } + units microseconds; + } + + typedef loss { + description "This 24-bit typedef describes packet loss as a percentage + of the total traffic sent over a configurable interval. The basic + unit is 0.000003%, where (2^24 - 2) is 50.331642%. This value is + the highest packet loss percentage that can be expressed. + Therefore, measured values that are larger than the field maximum + SHOULD be encoded as the maximum value."; + reference "https://tools.ietf.org/html/rfc7471#section-4.4.5"; + type uint32 { + range "0..16777215"; + } + units percent; + } + + grouping linkstate-attribute { + reference "http://tools.ietf.org/html/rfc7752#section-3.3.2"; + leaf local-ipv4-router-id { + type ipv4-router-identifier; + } + leaf local-ipv6-router-id { + type ipv6-router-identifier; + } + leaf remote-ipv4-router-id { + type ipv4-router-identifier; + } + leaf remote-ipv6-router-id { + type ipv6-router-identifier; + } + leaf mpls-protocol { + type mpls-protocol-mask; + } + leaf te-metric { + type netc:te-metric; + } + leaf metric { + type netc:metric; + } + leaf-list shared-risk-link-groups { + type rsvp:srlg-id; + } + leaf link-name { + type string; + } + leaf max-link-bandwidth { + type netc:bandwidth; + } + leaf max-reservable-bandwidth { + type netc:bandwidth; + } + list unreserved-bandwidth { + key "priority"; + uses unreserved-bandwidth; + } + leaf link-protection { + type link-protection-type; + } + leaf admin-group { + type administrative-group; + } + list sr-adj-ids { + uses bgp-sr:adj-sid-tlv; + } + list sr-lan-adj-ids { + uses bgp-sr:lan-adj-sid-tlv; + } + container peer-node-sid { + description "The SID representing the peer of the BGP session."; + reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.3"; + uses bgp-sr:epe-adj-sid-tlv; + } + container peer-adj-sid { + description "The SID representing the peer of the BGP session."; + reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.3"; + uses bgp-sr:epe-adj-sid-tlv; + } + list peer-set-sids { + description "The SID representing the group the peer is part of."; + reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.3"; + uses bgp-sr:epe-adj-sid-tlv; + } + // Performance Metric https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2 + leaf link-delay { + description "Unidirectional Link Delay"; + reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.1"; + type delay; + } + container link-min-max-delay { + description "Min/Max Unidirectional Link Delay"; + reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.2"; + leaf min-delay { + type delay; + } + leaf max-delay { + type delay; + } + } + leaf delay-variation { + description "Unidirectional Delay Variation"; + reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.3"; + type delay; + } + leaf link-loss { + description "Unidirectional Link Loss"; + reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.4"; + type loss; + } + leaf residual-bandwidth { + description "Unidirectional Residual Bandwidth"; + reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.5"; + type netc:bandwidth; + } + leaf available-bandwidth { + description "Unidirectional Available Bandwidth"; + reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.6"; + type netc:bandwidth; + } + leaf utilized-bandwidth { + description "Unidirectional Utilized Bandwidth"; + reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.7"; + type netc:bandwidth; + } + } + + typedef route-tag { + reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.2"; + description "Carries original IGP TAGs of the prefix."; + type binary { + length "4"; + } + } + + typedef extended-route-tag { + reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.3"; + description "Carries IS-IS Extended Route Tags of the prefix."; + type binary { + length "8"; + } + } + + grouping igp-bits { + reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.1"; + leaf up-down { + status deprecated; + type bits { + bit up-down { + position 0; + } + } + } + leaf is-is-up-down { + type boolean; + } + leaf ospf-no-unicast { + type boolean; + } + leaf ospf-local-address { + type boolean; + } + leaf ospf-propagate-nssa { + type boolean; + } + } + + grouping prefix-state { + container igp-bits { + uses igp-bits; + } + leaf-list route-tags { + type route-tag; + } + leaf-list extended-tags { + type extended-route-tag; + } + leaf prefix-metric { + type netc:igp-metric; + } + leaf ospf-forwarding-address { + type inet:ip-address; + } + container sr-prefix { + uses bgp-sr:prefix-sid-tlv; + } + container ipv6-sr-prefix { + uses bgp-sr:ipv6-prefix-sid-tlv; + } + container sr-range { + uses bgp-sr:range-tlv; + } + list sr-binding-sid-labels { + uses bgp-sr:binding-sid-tlv; + } + } + + grouping linkstate-path-attribute { + choice link-state-attribute { + case node-attributes-case { + container node-attributes { + uses node-state; + } + } + case link-attributes-case { + container link-attributes { + uses linkstate-attribute; + } + } + case prefix-attributes-case { + container prefix-attributes { + uses prefix-state; + } + } + case te-lsp-attributes-case { + status deprecated; + description "LSP Object"; + reference "http://tools.ietf.org/html/rfc7752#section-2.2"; + container te-lsp-attributes { + uses rsvp:tspec-object; + uses rsvp:flow-spec-object; + uses rsvp:session-attribute-object; + uses rsvp:explicit-route-object; + uses rsvp:secondary-explicit-route-object; + uses rsvp:record-route-object; + uses rsvp:secondary-record-route-object; + uses rsvp:fast-reroute-object; + uses rsvp:detour-object; + uses rsvp:exclude-route-object; + uses rsvp:lsp-attributes-object; + uses rsvp:lsp-required-attributes-object; + uses rsvp:protection-object; + uses rsvp:association-object; + uses rsvp:primary-path-route-object; + uses rsvp:admin-status-object; + uses rsvp:bandwidth-object; + uses rsvp:metric-object; + } + } + } + } + + grouping linkstate-routes { + container linkstate-routes { + list linkstate-route { + description + "Link-state information entry. Due to + the complexity of link-state information + and YANG limitations this is the top-level + object from contract perspective. It is + keyed by route-key, whose format is + internal to the implementation exposing + this information. As an explicit example + it can rely on information stored in the + entry's subtree, so the subtree MUST NOT + be modified by outside entities. + Augmentations can attach data, but must + be explicitly aware that such data, unlike + the data modeled directly here, does not + have any effects on keys, especially they + must not impact equality tests."; + + key "route-key path-id"; + + uses linkstate; + uses bgp-rib:route { + augment attributes { + uses linkstate-path-attribute; + } + } + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes" { + uses linkstate-path-attribute; + } + + augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" { + case linkstate-routes-case { + uses linkstate-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" { + case linkstate-routes-case { + uses linkstate-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" { + case linkstate-routes-case { + uses linkstate-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" { + case linkstate-routes-case { + uses linkstate-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" { + case linkstate-routes-case { + uses linkstate-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case linkstate-routes-case { + uses linkstate-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case linkstate-routes-case { + uses linkstate-routes; + } + } + +} diff --git a/experimental/odp/bgp-ll-graceful-restart.yang b/experimental/odp/bgp-ll-graceful-restart.yang new file mode 100644 index 000000000..4de99a367 --- /dev/null +++ b/experimental/odp/bgp-ll-graceful-restart.yang @@ -0,0 +1,71 @@ +module bgp-ll-graceful-restart { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp:ll-graceful-restart"; + prefix "odl-bgp-ll-graceful-restart"; + + import openconfig-network-instance { prefix netinst; } + import bgp-openconfig-extensions { prefix bgp-op-ext; } + import openconfig-bgp-types { prefix bgp-types; } + + description + "This module contains the extensions from + draft-uttaro-idr-bgp-persistence-04. + + Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v1.0 which accompanies this distribution, + and is available at http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-11-12" { + description "Initial revision"; + } + + identity LLGR_STALE { + base bgp-types:bgp-well-known-std-community; + description + "LLGR_STALE community can be used to mark stale routes retained for a longer period of time. + Such long-lived stale routes are to be handled according to the procedures specified in RFC"; + reference "https://tools.ietf.org/html/draft-uttaro-idr-bgp-persistence-04"; + } + + identity NO_LLGR { + base bgp-types:bgp-well-known-std-community; + description + "NO_LLGR community can be used to mark routes which a BGP speaker does not want treated according + to long-lived graceful restart procedures, as detailed in RFC"; + reference "https://tools.ietf.org/html/draft-uttaro-idr-bgp-persistence-04"; + } + + grouping afi-safi-ll-graceful-restart { + container ll-graceful-restart { + container config { + leaf long-lived-stale-time { + description + "Value of time in second which we keep routes of given af-safi after + graceful restart timer expired. If zero value afi-safi wil not be advertised + in long-lived graceful restart capability"; + type uint32 { + range 0..16777215; + } + units seconds; + default 0; + } + } + } + } + + augment "/netinst:network-instances/netinst:network-instance/netinst:protocols/netinst:protocol/" + + "bgp-op-ext:bgp/bgp-op-ext:peer-groups/bgp-op-ext:peer-group/bgp-op-ext:afi-safis/" + + "bgp-op-ext:afi-safi/bgp-op-ext:graceful-restart/bgp-op-ext:config" { + description "Add per peer-group afi-safi long-lived graceful restart config"; + uses afi-safi-ll-graceful-restart; + } + + augment "/netinst:network-instances/netinst:network-instance/netinst:protocols/netinst:protocol/" + + "bgp-op-ext:bgp/bgp-op-ext:neighbors/bgp-op-ext:neighbor/bgp-op-ext:afi-safis/" + + "bgp-op-ext:afi-safi/bgp-op-ext:graceful-restart/bgp-op-ext:config" { + description "Add per peer-group afi-safi long-lived graceful restart config"; + uses afi-safi-ll-graceful-restart; + } +} diff --git a/experimental/odp/bgp-message.yang b/experimental/odp/bgp-message.yang new file mode 100644 index 000000000..0b5592be5 --- /dev/null +++ b/experimental/odp/bgp-message.yang @@ -0,0 +1,254 @@ +module bgp-message { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-message"; + prefix "bgp-msg"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + import network-concepts { prefix netc; revision-date 2013-11-25; } + + organization "Cisco Systems, Inc."; + contact "Dana Kutenicsova "; + + description + "This module contains the base data model of a BGP message. + It rolls up the definitions contained in RFC4271 and RFC4893. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add RFC6514 Extended communities under bgp type."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision "2013-09-19" { + description + "Split off basic types"; + } + + revision "2013-09-18" { + description + "Initial revision."; + reference "RFC4271, RFC4893"; + } + + typedef protocol-version { + type uint8 { + range 1..7; + } + } + + typedef path-id { + type uint32; + default 0; + description + "Identifier of a single path. The identifier does not + carry any semantic meaning beyond uniquely identifying + a path. Default 0 value is reserved for non supported add-path key representation."; + } + + grouping path-id-grouping { + leaf path-id { + type path-id; + } + } + + grouping originator-id { + leaf originator { + type inet:ipv4-address; + } + } + + grouping cluster-id { + leaf-list cluster { + type bgp-t:cluster-identifier; + ordered-by user; + } + } + + grouping ipv4-prefix-and-path-id { + leaf prefix { + type inet:ipv4-prefix; + } + uses path-id-grouping; + } + + notification open { + uses open-message; + } + + grouping open-message { + description "Open Message"; + reference "http://tools.ietf.org/html/rfc4271#section-4.2"; + leaf version { + type protocol-version; + default 4; + } + leaf my-as-number { + type uint16; + default 23456; + } + leaf hold-timer { + type uint16; + mandatory true; + } + leaf bgp-identifier { + type inet:ipv4-address; + mandatory true; + } + list bgp-parameters { + list optional-capabilities { + reference "http://tools.ietf.org/html/rfc5492#section-4"; + container c-parameters { + container as4-bytes-capability { + reference "http://tools.ietf.org/html/rfc6793"; + leaf as-number { + type inet:as-number; + } + } + container bgp-extended-message-capability { + reference "https://www.ietf.org/archive/id/draft-ietf-idr-bgp-extended-messages-11.txt"; + presence "Indicates peer is able to send/receive 64K messages"; + } + } + } + } + } + + grouping path-attributes { + reference "http://tools.ietf.org/html/rfc4271#section-5"; + container attributes { + container origin { + reference "http://tools.ietf.org/html/rfc4271#section-5.1.1"; + leaf value { + type bgp-t:bgp-origin; + mandatory true; + } + } + container as-path { + reference "http://tools.ietf.org/html/rfc4271#section-5.1.2"; + list segments { + uses bgp-t:as-path-segment; + } + } + uses bgp-t:next-hop; + container multi-exit-disc { + reference "http://tools.ietf.org/html/rfc4271#section-5.1.4"; + leaf med { + type uint32; + } + } + container local-pref { + reference "http://tools.ietf.org/html/rfc4271#section-5.1.5"; + leaf pref { + type uint32; + } + } + container atomic-aggregate { + reference "http://tools.ietf.org/html/rfc4271#section-5.1.6"; + presence "Atomic Aggregate attribute is present."; + } + container aggregator { + uses bgp-t:bgp-aggregator; + } + list communities { + uses bgp-t:community; + } + list extended-communities { + uses bgp-t:extended-community; + } + container originator-id { + uses originator-id; + } + container cluster-id { + uses cluster-id; + } + container aigp { + container aigp-tlv { + leaf metric { + type netc:accumulated-igp-metric; + } + } + } + list unrecognized-attributes { + key type; + leaf partial { + type boolean; + mandatory true; + } + leaf transitive { + type boolean; + mandatory true; + } + leaf type { + type uint8; + mandatory true; + } + leaf value { + type binary { + length 0..65535; + } + mandatory true; + } + } + container bgp-prefix-sid { + list bgp-prefix-sid-tlvs { + choice bgp-prefix-sid-tlv { + reference "https://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-02"; + // to be augmented + } + } + } + } + } + + notification update { + uses update-message; + } + + grouping update-message { + description "Update Message"; + reference "http://tools.ietf.org/html/rfc4271#section-4.3"; + uses path-attributes; + list withdrawn-routes { + uses ipv4-prefix-and-path-id; + } + list nlri { + uses ipv4-prefix-and-path-id; + } + } + + notification keepalive { + description "Keepalive Message"; + reference "http://tools.ietf.org/html/rfc4271#section-4.4"; + } + + notification notify { + uses notify-message; + } + + grouping notify-message { + description "Notification Message"; + reference "http://tools.ietf.org/html/rfc4271#section-4.5"; + + leaf error-code { + type uint8; + mandatory true; + } + leaf error-subcode { + type uint8; + mandatory true; + } + leaf data { + type binary; + } + } +} diff --git a/experimental/odp/bgp-multiprotocol.yang b/experimental/odp/bgp-multiprotocol.yang new file mode 100644 index 000000000..ae03a5cdd --- /dev/null +++ b/experimental/odp/bgp-multiprotocol.yang @@ -0,0 +1,192 @@ +module bgp-multiprotocol { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-multiprotocol"; + prefix "bgp-mp"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + + organization "Cisco Systems, Inc."; + contact "Dana Kutenicsova "; + + description + "This module contains the base data model of a BGP message. + It rolls up the definitions contained in RFC4271 + and draft-ietf-idr-ls-distribution-03. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add RFC6514 Extended communities under bgp type."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision "2013-09-19" { + description + "Split off basic types"; + } + + revision "2013-09-18" { + description + "Initial revision."; + reference "RFC4760"; + } + + typedef send-receive { + type enumeration { + enum receive { value 1; } + enum send { value 2; } + enum both { value 3; } + } + } + + grouping bgp-table-type { + leaf afi { + type identityref { + base bgp-t:address-family; + } + } + leaf safi { + type identityref { + base bgp-t:subsequent-address-family; + } + } + } + + grouping bgp-add-path-table-type { + uses bgp-table-type; + leaf send-receive { + type send-receive; + } + } + + grouping destination { + choice destination-type { + // to be augmented + } + } + + grouping mp-capabilities { + container multiprotocol-capability { + reference "http://tools.ietf.org/html/rfc4760#section-8"; + uses bgp-table-type; + } + container graceful-restart-capability { + presence "indicates a graceful restart capability"; + + reference "http://tools.ietf.org/html/rfc4724#section-3"; + + leaf restart-flags { + type bits { + bit restart-state { + position 0; + } + } + mandatory true; + } + + leaf restart-time { + type uint16 { + range 0..4095; + } + units seconds; + default 0; + } + + list tables { + uses bgp-table-type; + key "afi safi"; + + leaf afi-flags { + type bits { + bit forwarding-state { + position 0; + } + } + mandatory true; + } + } + } + container ll-graceful-restart-capability { + reference "https://tools.ietf.org/html/draft-uttaro-idr-bgp-persistence-04"; + + list tables { + uses bgp-table-type; + key "afi safi"; + + leaf afi-flags { + type bits { + bit forwarding-state { + position 0; + } + } + mandatory true; + } + leaf long-lived-stale-time { + type uint32 { + range 0..16777215; + } + units seconds; + default 0; + } + } + } + container add-path-capability { + reference "http://tools.ietf.org/html/draft-ietf-idr-add-paths-13#section-4"; + list address-families { + uses bgp-add-path-table-type; + } + } + container route-refresh-capability { + presence "Route refresh capability"; + reference "http://tools.ietf.org/html/rfc2918"; + } + } + + augment "/bgp-msg:open/bgp-msg:bgp-parameters/bgp-msg:optional-capabilities/bgp-msg:c-parameters" { + uses mp-capabilities; + } + + augment "/bgp-msg:update/bgp-msg:attributes" { + ext:augment-identifier attributes-1; + container mp-reach-nlri { + reference "http://tools.ietf.org/html/rfc4760#section-3"; + + uses bgp-table-type; + uses bgp-t:next-hop; + + container advertized-routes { + uses destination; + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes" { + ext:augment-identifier attributes-2; + container mp-unreach-nlri { + reference "http://tools.ietf.org/html/rfc4760#section-4"; + + uses bgp-table-type; + + container withdrawn-routes { + uses destination; + } + } + } + + notification route-refresh { + description "ROUTE-REFRESH message"; + reference "https://tools.ietf.org/html/rfc2918#section-3"; + uses bgp-table-type; + } +} diff --git a/experimental/odp/bgp-mvpn-ipv4.yang b/experimental/odp/bgp-mvpn-ipv4.yang new file mode 100644 index 000000000..eef826e74 --- /dev/null +++ b/experimental/odp/bgp-mvpn-ipv4.yang @@ -0,0 +1,86 @@ +module bgp-mvpn-ipv4 { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp:mvpn:ipv4"; + prefix "bgp-mvpn-ipv4"; + + import bgp-mvpn { prefix mvpn; revision-date 2018-04-17; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; } + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + + revision 2018-04-17 { + description "Initial version"; + } + + grouping mvpn-destination { + list mvpn-destination { + uses mvpn:mvpn; + uses bgp-msg:path-id-grouping; + } + } + + grouping mvpn-routes-ipv4 { + container mvpn-routes-ipv4 { + uses mvpn:mvpn-routes; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" { + case destination-mvpn-ipv4-advertized-case { + container destination-mvpn { + uses mvpn-destination; + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" { + case destination-mvpn-ipv4-withdrawn-case { + container destination-mvpn { + uses mvpn-destination; + } + } + } + + augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" { + case mvpn-routes-ipv4-case { + uses mvpn-routes-ipv4; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" { + case mvpn-routes-ipv4-case { + uses mvpn-routes-ipv4; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" { + case mvpn-routes-ipv4-case { + uses mvpn-routes-ipv4; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" { + case mvpn-routes-ipv4-case { + uses mvpn-routes-ipv4; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" { + case mvpn-routes-ipv4-case { + uses mvpn-routes-ipv4; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case mvpn-routes-ipv4-case { + uses mvpn-routes-ipv4; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case mvpn-routes-ipv4-case { + uses mvpn-routes-ipv4; + } + } +} diff --git a/experimental/odp/bgp-mvpn-ipv6.yang b/experimental/odp/bgp-mvpn-ipv6.yang new file mode 100644 index 000000000..b78c21e6d --- /dev/null +++ b/experimental/odp/bgp-mvpn-ipv6.yang @@ -0,0 +1,86 @@ +module bgp-mvpn-ipv6 { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp:mvpn:ipv6"; + prefix "bgp-mvpn-ipv6"; + + import bgp-mvpn { prefix mvpn; revision-date 2018-04-17; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; } + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + + revision 2018-04-17 { + description "Initial version"; + } + + grouping mvpn-destination { + list mvpn-destination { + uses mvpn:mvpn; + uses bgp-msg:path-id-grouping; + } + } + + grouping mvpn-routes-ipv6 { + container mvpn-routes-ipv6 { + uses mvpn:mvpn-routes; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" { + case destination-mvpn-ipv6-advertized-case { + container destination-mvpn { + uses mvpn-destination; + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" { + case destination-mvpn-ipv6-withdrawn-case { + container destination-mvpn { + uses mvpn-destination; + } + } + } + + augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" { + case mvpn-routes-ipv6-case { + uses mvpn-routes-ipv6; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" { + case mvpn-routes-ipv6-case { + uses mvpn-routes-ipv6; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" { + case mvpn-routes-ipv6-case { + uses mvpn-routes-ipv6; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" { + case mvpn-routes-ipv6-case { + uses mvpn-routes-ipv6; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" { + case mvpn-routes-ipv6-case { + uses mvpn-routes-ipv6; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case mvpn-routes-ipv6-case { + uses mvpn-routes-ipv6; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case mvpn-routes-ipv6-case { + uses mvpn-routes-ipv6; + } + } +} diff --git a/experimental/odp/bgp-mvpn.yang b/experimental/odp/bgp-mvpn.yang new file mode 100644 index 000000000..7784f952c --- /dev/null +++ b/experimental/odp/bgp-mvpn.yang @@ -0,0 +1,237 @@ +module bgp-mvpn { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp:mvpn"; + prefix "bgp-mvpn"; + + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import pmsi-tunnel { prefix pmsi; revision-date 2018-03-29; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import yang-ext { prefix ext; revision-date "2013-07-09"; } + import network-concepts { prefix netc; revision-date 2013-11-25; } + + organization "AT&T Services, Inc."; + + contact "Claudio D. Gasparini "; + + description + "This module contains the base data model of a BGP message. + It rolls up the definitions contained in RFC6513, RFC6514, RFC6515. + + Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision 2018-04-17 { + description "Initial version"; + } + + identity mcast-vpn-subsequent-address-family { + description "SAFI 5 MCAST-VPN"; + reference "https://www.iana.org/assignments/safi-namespace/safi-namespace.xhtml"; + + base bgp-t:subsequent-address-family; + } + + typedef nlri-type { + reference "https://tools.ietf.org/html/rfc6514#section-4"; + type enumeration { + enum intra-as-i-pmsi-a-d { + value 1; + } + enum inter-as-i-pmsi-a-d { + value 2; + } + enum s-pmsi-a-d { + value 3; + } + enum leaf-a-d { + value 4; + } + enum source-active-a-d { + value 5; + } + enum shared-tree-join { + value 6; + } + enum source-tree-join { + value 7; + } + } + } + + grouping source-as-grouping { + leaf source-as { + type inet:as-number; + mandatory true; + } + } + + grouping multicast-source-rd-grouping { + uses bgp-t:route-distinguisher-grouping; + + leaf multicast-source { + type inet:ip-address; + mandatory true; + } + } + + grouping multicast-group-opaque-grouping { + choice multicast-group { + case c-g-address-case { + leaf c-g-address { + type inet:ip-address; + } + } + + case ldp-mp-opaque-value-case { + container ldp-mp-opaque-value { + uses pmsi:opaque; + } + } + } + } + + grouping intra-as-i-pmsi-a-d-grouping { + container intra-as-i-pmsi-a-d { + + description "https://tools.ietf.org/html/rfc6514#section-4.1"; + + uses bgp-t:route-distinguisher-grouping; + uses bgp-t:orig-route-ip-grouping; + } + } + + grouping inter-as-i-pmsi-a-d-grouping { + container inter-as-i-pmsi-a-d { + description "https://tools.ietf.org/html/rfc6514#section-4.2"; + + uses bgp-t:route-distinguisher-grouping; + uses source-as-grouping; + } + } + + grouping s-pmsi-a-d-grouping { + container s-pmsi-a-d { + description "https://tools.ietf.org/html/rfc6514#section-4.3"; + + uses multicast-source-rd-grouping; + uses multicast-group-opaque-grouping; + uses bgp-t:orig-route-ip-grouping; + } + } + + grouping leaf-a-d-grouping { + container leaf-a-d { + description "https://tools.ietf.org/html/rfc6514#section-4.4"; + + choice leaf-a-d-route-key { + case inter-as-i-pmsi-a-d-case { + uses inter-as-i-pmsi-a-d-grouping; + } + case s-pmsi-a-d-case { + uses s-pmsi-a-d-grouping; + } + mandatory true; + } + uses bgp-t:orig-route-ip-grouping; + } + } + + grouping source-active-a-d-grouping { + container source-active-a-d { + description "https://tools.ietf.org/html/rfc6514#section-4.5"; + + uses multicast-source-rd-grouping; + leaf multicast-group { + type inet:ip-address; + mandatory true; + } + } + } + + grouping c-multicast-grouping { + container c-multicast { + description "https://tools.ietf.org/html/rfc6514#section-4.6"; + + uses multicast-source-rd-grouping; + uses source-as-grouping; + uses multicast-group-opaque-grouping; + } + } + + grouping mvpn { + reference "https://tools.ietf.org/html/rfc6514#section-4"; + description "The MCAST-VPN NLRI is carried in BGP [RFC4271] using BGP + Multiprotocol Extensions [RFC4760] with an Address Family Identifier + (AFI) of 1 or 2 and a Subsequent AFI (SAFI) of MCAST-VPN."; + + choice mvpn-choice { + case intra-as-i-pmsi-a-d-case { + uses intra-as-i-pmsi-a-d-grouping; + } + case inter-as-i-pmsi-a-d-case { + uses inter-as-i-pmsi-a-d-grouping; + } + case s-pmsi-a-d-case { + uses s-pmsi-a-d-grouping; + } + case leaf-a-d-case { + uses leaf-a-d-grouping; + } + case source-active-a-d-case { + uses source-active-a-d-grouping; + } + case shared-tree-join-case { + container shared-tree-join { + uses c-multicast-grouping; + } + } + case source-tree-join-case { + container source-tree-join { + uses c-multicast-grouping; + } + } + mandatory true; + } + } + + grouping pe-distinguisher-labels-attribute { + container pe-distinguisher-labels-attribute { + list pe-distinguisher-label-attribute { + leaf pe-address { + type inet:ip-address; + mandatory true; + } + leaf mpls-label { + type netc:mpls-label; + mandatory true; + } + } + } + } + + grouping bgp-rib-route { + uses pmsi:bgp-rib-route { + augment "attributes" { + ext:augment-identifier pe-distinguisher-labels-attribute-augmentation; + uses pe-distinguisher-labels-attribute; + } + } + } + + grouping mvpn-bgp-rib-route { + uses mvpn; + uses bgp-rib-route; + } + + grouping mvpn-routes { + list mvpn-route { + key "route-key path-id"; + uses mvpn-bgp-rib-route; + } + } +} \ No newline at end of file diff --git a/experimental/odp/bgp-openconfig-extensions.yang b/experimental/odp/bgp-openconfig-extensions.yang new file mode 100644 index 000000000..b29dd565b --- /dev/null +++ b/experimental/odp/bgp-openconfig-extensions.yang @@ -0,0 +1,233 @@ +module bgp-openconfig-extensions { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions"; + prefix "odl-oc-ext"; + + import openconfig-bgp-types { prefix bgp-types; } + import openconfig-network-instance { prefix netinst; } + import openconfig-bgp { prefix openconfig-bgp; } + import ietf-inet-types { prefix inet; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import openconfig-bgp-operational { prefix bgp-op; } + + organization "Cisco Systems, Inc."; + contact "Milos Fabian "; + + description + "This module contains the custom extensions to the + draft-ietf-idr-bgp-model-00 Yang data models. + + Copyright (c)2015 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision 2018-03-21 { + description "Augment Peer group with transport config."; + } + + revision 2017-12-07 { + description "Add support for add-path in base BGP NLRI."; + } + + revision 2016-06-14 { + description + "Update to follow naming conventions."; + } + + revision 2015-09-30 { + description "Initial revision"; + } + + identity IPV4-FLOW { + base bgp-types:afi-safi-type; + description + "IPv4 Flow specification (AFI,SAFI = 1,133)"; + reference "https://tools.ietf.org/html/rfc5575"; + } + + identity IPV6-FLOW { + base bgp-types:afi-safi-type; + description + "IPv6 Flow specification (AFI,SAFI = 2,133)"; + reference "https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-06"; + } + + identity IPV6-L3VPN-FLOW { + base bgp-types:afi-safi-type; + description + "IPv6 Flow specification (AFI,SAFI = 2,133)"; + reference "https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-06"; + } + + identity IPV4-L3VPN-FLOW { + base bgp-types:afi-safi-type; + description + "IPv6 Flow specification (AFI,SAFI = 2,133)"; + reference "https://tools.ietf.org/html/rfc5575"; + } + + identity LINKSTATE { + base bgp-types:afi-safi-type; + description + "Link-State (AFI,SAFI = 16388,71)"; + reference "https://tools.ietf.org/html/rfc7752"; + } + + identity IPV4-MCAST-VPN { + base bgp-types:afi-safi-type; + description + "Multicast IPv4 VPN (AFI,SAFI = 1,5)"; + reference "RFC6514"; + } + + identity IPV6-MCAST-VPN { + base bgp-types:afi-safi-type; + description + "Multicast IPv6 VPN (AFI,SAFI = 2,5)"; + reference "RFC6514"; + } + + identity ROUTE-TARGET-CONSTRAIN { + base bgp-types:afi-safi-type; + description + "Route Target constrains (AFI,SAFI = 1,132)"; + reference "RFC4684"; + } + + grouping transport-config { + leaf remote-port { + type inet:port-number; + default 179; + description + "Remote port being used by the peer for the TCP session + supporting the BGP session"; + } + } + + grouping neighbor-afi-safi-ll-graceful-restart-state { + leaf ll-received { + type boolean; + description + "This leaf indicates whether the neighbor advertised the + ability to support long-lived graceful-restart for this AFI-SAFI"; + } + leaf ll-advertised { + type boolean; + description + "This leaf indicates whether the ability to support + long-lived graceful-restart has been advertised to the peer"; + } + leaf ll-stale-timer { + type uint32; + description + "Value of timer used during long-lived graceful restart in nseconds. + If table is both advertised and received use lower value. Zero value + means table is not supported by any side"; + units seconds; + } + } + + augment /netinst:network-instances/netinst:network-instance/netinst:protocols/netinst:protocol { + ext:augment-identifier network-instance-protocol; + uses openconfig-bgp:bgp-top { + augment bgp/neighbors/neighbor/afi-safis/afi-safi { + ext:augment-identifier neighbor-add-paths-config; + uses openconfig-bgp:bgp-neighbor-add-paths_config; + } + augment bgp/global/afi-safis/afi-safi { + ext:augment-identifier global-add-paths-config; + uses openconfig-bgp:bgp-neighbor-add-paths_config; + } + augment bgp/global/afi-safis/afi-safi/state { + ext:augment-identifier global-afi-safi_state-augmentation; + uses bgp-op:bgp-global-afi-safi_state; + } + augment bgp/neighbors/neighbor/transport/config { + ext:augment-identifier neighbor-transport-config; + uses transport-config; + } + augment bgp/neighbors/neighbor/config { + ext:augment-identifier neighbor-peer-group-config; + description + "Augmentation to allow association of a neighbor with a + peer-group"; + uses openconfig-bgp:bgp-neighbor-peer-group_config; + } + augment bgp/global/config { + ext:augment-identifier global-config-augmentation; + leaf route-reflector-cluster-id { + type bgp-types:rr-cluster-id-type; + description + "Route-reflector cluster id to use when local router is + configured as a route reflector."; + } + } + augment bgp/neighbors/neighbor/state { + ext:augment-identifier neighbor_state-augmentation; + uses bgp-op:bgp-neighbor_state; + } + augment bgp/neighbors/neighbor/state { + ext:augment-identifier bgp-neighbor_state-augmentation; + container messages { + container sent { + uses bgp-op:bgp-neighbor-message-counters-sent_state; + } + + container received { + uses bgp-op:bgp-neighbor-message-counters-received_state; + } + } + + container queues { + uses bgp-op:bgp-neighbor-queue-counters_state; + } + } + augment bgp/neighbors/neighbor/timers/state { + ext:augment-identifier neighbor-timers_state-augmentation; + uses bgp-op:bgp-neighbor-timers_state; + } + augment bgp/neighbors/neighbor/transport/state { + ext:augment-identifier neighbor-transport_state-augmentation; + uses bgp-op:bgp-neighbor-transport_state; + } + augment bgp/neighbors/neighbor/error-handling/state { + ext:augment-identifier neighbor-error-handling_state-augmentation; + uses bgp-op:bgp-neighbor-error-handling_state; + } + augment bgp/neighbors/neighbor/afi-safis/afi-safi/state { + ext:augment-identifier neighbor-afi-safi_state-augmentation; + uses bgp-op:bgp-neighbor-afi-safi_state; + } + augment bgp/neighbors/neighbor/graceful-restart/state { + ext:augment-identifier neighbor-graceful-restart_state-augmentation; + uses bgp-op:bgp-afi-safi-graceful-restart_state; + } + augment bgp/neighbors/neighbor/afi-safis/afi-safi/graceful-restart/state { + ext:augment-identifier neighbor-afi-safi-graceful-restart_state-augmentation; + uses bgp-op:bgp-neighbor-afi-safi-graceful-restart_state; + uses neighbor-afi-safi-ll-graceful-restart-state; + } + augment bgp/peer-groups/peer-group/state { + ext:augment-identifier peer-group_state-augmentation; + uses bgp-op:bgp-peer-group_state; + } + augment bgp/peer-groups/peer-group/transport/config { + ext:augment-identifier peer-group-transport-config; + uses transport-config; + } + augment bgp/peer-groups/peer-group/afi-safis/afi-safi { + ext:augment-identifier group-add-paths-config; + uses openconfig-bgp:bgp-neighbor-add-paths_config; + } + } + } + +} diff --git a/experimental/odp/bgp-peer-rpc.yang b/experimental/odp/bgp-peer-rpc.yang new file mode 100644 index 000000000..dbc7a9794 --- /dev/null +++ b/experimental/odp/bgp-peer-rpc.yang @@ -0,0 +1,91 @@ +module bgp-peer-rpc { + namespace "urn:opendaylight:params:xml:ns:yang:bgp-peer-rpc"; + prefix "bgp-rpc"; + + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import bgp-rib { prefix rib; revision-date 2018-03-29; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + + organization "Cisco Systems, Inc."; + contact "Iveta Halanova "; + + description + "Module contains rpc for route refresh request, which is described in rfc2918. + + Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision 2017-12-07 { + description "Add support for add-path in base BGP NLRI."; + } + + revision 2017-10-27 { + description "Add reset session RPC"; + } + + revision 2016-03-22 { + description "Initial revision"; + } + + identity peer-context { + description "Identity used to mark the Peer context for binding RPCs in a particular RIB."; + } + + typedef peer-ref { + type instance-identifier; + ext:context-reference "peer-context"; + } + + grouping peer-reference { + leaf peer-ref { + type peer-ref; + mandatory true; + ext:context-reference "peer-context"; + } + } + + grouping rr-msg-args { + uses peer-reference; + uses bgp-mp:bgp-table-type; + } + + rpc route-refresh-request { + input { + uses rr-msg-args; + } + } + + augment "/rib:bgp-rib/rib:rib/rib:peer" { + ext:context-instance "peer-context"; + } + + rpc reset-session { + description "Resets the peer session"; + input { + uses peer-reference; + } + } + + rpc restart-gracefully { + description "Perform graceful restart with peer"; + input { + uses peer-reference; + leaf selection-deferral-time { + description + "Time to wait with route selection in seconds. Route selection is postponed until + End of Rib marker is received or this timer expires."; + type uint32; + units seconds; + mandatory true; + } + } + } +} diff --git a/experimental/odp/bgp-rib.yang b/experimental/odp/bgp-rib.yang new file mode 100644 index 000000000..a0dba9fd9 --- /dev/null +++ b/experimental/odp/bgp-rib.yang @@ -0,0 +1,146 @@ +module bgp-rib { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-rib"; + prefix "rib"; + + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the concept of a Routing Information Base, + as defined by RFC4271. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision "2013-09-25" { + description + "Initial revision."; + reference "RFC4271"; + } + + typedef rib-id { + type inet:uri; + } + + typedef application-rib-id { + type inet:uri; + } + + typedef peer-id { + description + "An abstract peer identifier. The protocol part identifies + the type of the peer. One well-known protocol is define, which + has the following format: bgp://1.2.3.4, where 1.2.3.4 is the + peer's BGP Identifier in IPv4 dotted-quad format."; + type inet:uri; + } + + typedef peer-role { + type enumeration { + enum ebgp; + enum ibgp; + enum rr-client; + enum internal; + } + } + + grouping route { + uses bgp-msg:path-id-grouping; + leaf route-key { + description + "The sole function of this leaf + to act as the key in the list. + Its format does not form the + API contract of this model."; + type string; + } + uses bgp-msg:path-attributes; + } + + grouping rib { + list tables { + uses bgp-mp:bgp-table-type; + key "afi safi"; + + container attributes { + leaf uptodate { + type boolean; + default false; + } + } + + choice routes { + // to be augmented + } + } + } + + list application-rib { + config true; + + leaf id { + type application-rib-id; + } + key id; + + uses rib; + } + + container bgp-rib { + list rib { + config false; + + leaf id { + type rib-id; + } + key id; + + list peer { + key peer-id; + leaf peer-id { + type peer-id; + } + leaf peer-role { + type peer-role; + mandatory true; + } + list supported-tables { + key "afi safi"; + uses bgp-mp:bgp-add-path-table-type; + } + container adj-rib-in { + description "Routes as we have received them from the peer."; + uses rib; + } + container effective-rib-in { + description "Routes as processed by inbound policy."; + uses rib; + } + container adj-rib-out { + uses rib; + } + } + + container loc-rib { + uses rib; + } + } + } +} diff --git a/experimental/odp/bgp-route-target-constrain.yang b/experimental/odp/bgp-route-target-constrain.yang new file mode 100644 index 000000000..7371adf38 --- /dev/null +++ b/experimental/odp/bgp-route-target-constrain.yang @@ -0,0 +1,152 @@ +module bgp-route-target-constrain { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp:route:target:constrain"; + prefix "bgp-route-target"; + + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; } + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import openconfig-routing-policy { prefix rpol; } + import openconfig-bgp-policy { prefix bgp-pol; } + import yang-ext { prefix ext; revision-date "2013-07-09"; } + + organization "AT&T Services, Inc."; + + contact "Claudio D. Gasparini "; + + description + "This module contains the base data model of a BGP message. + It rolls up the definitions contained in RFC4684. + + Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision 2018-06-18 { + description "Initial version"; + } + + identity route-target-constrain-subsequent-address-family { + description "SAFI 132 Route Target constrains"; + reference "https://www.iana.org/assignments/safi-namespace/safi-namespace.xhtml"; + + base bgp-t:subsequent-address-family; + } + + grouping route-target-constrain { + reference "https://tools.ietf.org/html/rfc4684#page-8"; + description "The Route Target constrains NLRI is carried in BGP [RFC4684] using BGP Multiprotocol + Extensions [RFC4760] with an Address Family Identifier (AFI) of 1 (IPV4) + and a Subsequent Address Family Identifier (SAFI) of 132 (ROUTE-TARGET)"; + + leaf origin-as { + type inet:as-number; + } + + choice route-target-constrain-choice { + case route-target-constrain-default-case { + uses bgp-t:route-target-constrain-default-route-grouping; + } + case route-target-constrain-route-case { + uses bgp-t:route-target-extended-community-grouping; + } + case route-target-constrain-ipv4-route-case { + uses bgp-t:route-target-ipv4-grouping; + } + case route-target-constrain-as-4-extended-community-case { + uses bgp-t:as-4-route-target-extended-community-grouping; + } + mandatory true; + } + } + + grouping route-target-constrain-destination { + list route-target-constrain-destination { + uses route-target-constrain; + uses bgp-msg:path-id-grouping; + } + } + + grouping route-target-constrain-routes { + container route-target-constrain-routes { + list route-target-constrain-route { + key "route-key path-id"; + uses bgp-rib:route; + uses route-target-constrain; + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" { + case destination-route-target-constrain-advertized-case { + container destination-route-target-constrain { + uses route-target-constrain-destination; + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" { + case destination-route-target-constrain-withdrawn-case { + container destination-route-target-constrain{ + uses route-target-constrain-destination; + } + } + } + + augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" { + case route-target-constrain-routes-case { + uses route-target-constrain-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" { + case route-target-constrain-routes-case { + uses route-target-constrain-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" { + case route-target-constrain-routes-case { + uses route-target-constrain-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" { + case route-target-constrain-routes-case { + uses route-target-constrain-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" { + case route-target-constrain-routes-case { + uses route-target-constrain-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case route-target-constrain-routes-case { + uses route-target-constrain-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case route-target-constrain-routes-case { + uses route-target-constrain-routes; + } + } + + augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:actions/bgp-pol:bgp-actions { + ext:augment-identifier client-attribute-prepend; + container client-attribute-prepend { + + presence "node is present in the config data to use the client attributes prepend action"; + description "action to use attribute from advertized from a client(rfc4684)"; + } + } +} diff --git a/experimental/odp/bgp-segment-routing.yang b/experimental/odp/bgp-segment-routing.yang new file mode 100644 index 000000000..cab57070c --- /dev/null +++ b/experimental/odp/bgp-segment-routing.yang @@ -0,0 +1,330 @@ +module bgp-segment-routing { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-segment-routing-ext"; + prefix "bgp-sr"; + + import network-concepts { prefix netc; revision-date 2013-11-25; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + + organization "Cisco Systems, Inc."; + contact "Iveta Halanova "; + + description + "This module contains the base data concepts contained + in draft-gredler-idr-bgp-ls-segment-routing-ext-02. + + Copyright (c)2015 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2015-10-14" { + description + "Initial revision."; + } + + typedef algorithm { + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.1.2"; + type enumeration { + enum shortest-path-first { + value 0; + } + enum strict-shortest-path-first { + value 1; + } + } + } + + typedef weight { + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.2"; + type uint8; + } + + grouping sid-label-index { + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.3.4"; + choice sid-label-index { + case local-label-case { + leaf local-label { + type netc:mpls-label; + } + } + case ipv6-address-case { + leaf ipv6-address { + type inet:ipv6-address; + } + } + case sid-case { + leaf sid { + type uint32; + } + } + } + } + + grouping sr-capabilities-tlv { + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.1.1"; + leaf mpls-ipv4 { + type boolean; + } + leaf mpls-ipv6 { + type boolean; + } + leaf sr-ipv6 { + type boolean; + } + leaf range-size { + type uint32 { + range "0..16777215"; + } + } + uses sid-label-index; + } + + grouping sr-algorithms-tlv { + leaf-list algorithms { + type algorithm; + } + } + + grouping ospf-adj-flags { + reference "https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-08#section-7.1"; + leaf backup { + type boolean; + } + leaf set { + type boolean; + } + } + + grouping adj-flags { + choice flags { + case ospf-adj-flags-case { + uses ospf-adj-flags; + } + case isis-adj-flags-case { + reference "https://tools.ietf.org/html/draft-ietf-isis-segment-routing-extensions-06#section-2.2.1"; + uses ospf-adj-flags; + leaf address-family { + type boolean; + } + } + } + } + + grouping adj-sid-tlv { + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.2.1"; + uses adj-flags; + uses epe-adj-sid-tlv; + } + + grouping epe-adj-sid-tlv { + leaf weight { + type weight; + } + uses sid-label-index; + } + + grouping lan-adj-sid-tlv { + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.2.2"; + uses adj-flags; + leaf weight { + type weight; + } + leaf iso-system-id { + type netc:iso-system-identifier; + } + leaf neighbor-id { + type inet:ipv4-address; + } + uses sid-label-index; + } + + grouping prefix-flags { + leaf no-php { + type boolean; + } + leaf explicit-null { + type boolean; + } + } + + grouping prefix-sid-tlv { + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.3.1"; + choice flags { + case isis-prefix-flags-case { + reference "https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-08#section-5"; + uses prefix-flags; + leaf readvertisement { + type boolean; + } + leaf node-sid { + type boolean; + } + } + case ospf-prefix-flags-case { + reference "https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-05#section-5"; + uses prefix-flags; + leaf mapping-server { + type boolean; + } + } + } + leaf algorithm { + type algorithm; + } + uses sid-label-index; + } + + grouping ipv6-prefix-sid-tlv { + reference "https://tools.ietf.org/html/draft-previdi-isis-ipv6-prefix-sid-02#page-2"; + leaf algorithm { + type algorithm; + } + } + + grouping ero-flags { + leaf loose { + type boolean; + } + } + + grouping ero-ipv4-address { + uses ero-flags; + leaf address { + type inet:ipv4-address; + mandatory true; + } + } + + grouping ero-ipv6-address { + uses ero-flags; + leaf address { + type inet:ipv6-address; + mandatory true; + } + } + + grouping ero-unnumbered { + uses ero-flags; + leaf router-id { + type uint32; + } + leaf interface-id { + type uint32; + } + } + + grouping binding-sub-tlvs { + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.3.4"; + choice binding-sub-tlv { + case prefix-sid-case { + uses prefix-sid-tlv; + } + case ipv6-prefix-sid-case { + uses ipv6-prefix-sid-tlv; + } + case sid-label-case { + uses sid-label-index; + } + case ero-metric-case { + leaf ero-metric { + type netc:te-metric; + } + } + case ipv4-ero-case { + uses ero-ipv4-address; + } + case ipv6-ero-case { + uses ero-ipv6-address; + } + case unnumbered-interface-id-ero-case { + uses ero-unnumbered; + } + case ipv4-ero-backup-case { + uses ero-ipv4-address; + } + case ipv6-ero-backup-case { + uses ero-ipv6-address; + } + case unnumbered-interface-id-backup-ero-case { + uses ero-unnumbered; + } + } + } + + grouping isis-binding-flags { + reference "https://tools.ietf.org/html/draft-ietf-isis-segment-routing-extensions-06#section-2.4"; + leaf address-family { + type boolean; + } + leaf mirror-context { + type boolean; + } + leaf spread-tlv { + type boolean; + } + leaf leaked-from-level-2 { + type boolean; + } + leaf attached-flag { + type boolean; + } + } + + grouping ospf-binding-flags { + reference "https://tools.ietf.org/html/draft-ietf-ospf-segment-routing-extensions-08#section-6"; + leaf mirroring { + type boolean; + } + } + + grouping binding-sid-tlv { + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.3.3"; + leaf weight { + type weight; + } + choice flags { + case isis-binding-flags-case { + uses isis-binding-flags; + } + case ospf-binding-flags-case { + uses ospf-binding-flags; + } + } + list binding-sub-tlvs { + uses binding-sub-tlvs; + } + } + + grouping range-sub-tlvs { + choice range-sub-tlv { + case binding-sid-tlv-case { + uses binding-sid-tlv; + } + case prefix-sid-tlv-case { + uses prefix-sid-tlv; + } + case ipv6-prefix-sid-tlv-case { + uses ipv6-prefix-sid-tlv; + } + case sid-label-tlv-case { + uses sid-label-index; + } + } + } + + grouping range-tlv { + reference "https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-02#section-2.3.2"; + leaf inter-area { + type boolean; + } + leaf range-size { + type uint16; + } + list sub-tlvs { + uses range-sub-tlvs; + } + } +} diff --git a/experimental/odp/bgp-state-config.yang b/experimental/odp/bgp-state-config.yang new file mode 100644 index 000000000..80a71febf --- /dev/null +++ b/experimental/odp/bgp-state-config.yang @@ -0,0 +1,34 @@ +// vi: set smarttab et sw=4 tabstop=4: +module bgp-state-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-state-config"; + prefix bgp-state-config; + + description + "This module contains the base YANG definitions for + BGP State Configuration. + Copyright (c)2016 Cisco Systems, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2016-11-07" { + description + "Initial revision."; + } + + container bgp-state-config { + leaf config-name { + type string; + mandatory true; + } + + leaf timer { + type uint16; + default 5; + units "seconds"; + } + } +} \ No newline at end of file diff --git a/experimental/odp/bgp-types.yang b/experimental/odp/bgp-types.yang new file mode 100644 index 000000000..03e1abce0 --- /dev/null +++ b/experimental/odp/bgp-types.yang @@ -0,0 +1,516 @@ +module bgp-types { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-types"; + prefix "bgp-t"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import network-concepts { prefix netc; revision-date 2013-11-25; } + + organization "Cisco Systems, Inc."; + contact "Dana Kutenicsova "; + + description + "This module contains the base concepts contained in RFC4271 and RFC4760. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "RFC6514 Extended communities"; + reference "https://tools.ietf.org/html/rfc6514"; + } + + revision "2013-09-19" { + description + "Initial revision."; + reference "RFC4271, RFC4760"; + } + + typedef bgp-origin { + reference "http://tools.ietf.org/html/rfc4271#section-5"; + description "Values of BGP Origin Path Attribute."; + type enumeration { + enum igp { + value 0; + } + enum egp { + value 1; + } + enum incomplete { + value 2; + } + } + } + + typedef bgp-id { + description "BGP identifier"; + type inet:ipv4-address; + } + + identity address-family { + reference "http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml#address-family-numbers-2"; + } + + identity ipv4-address-family { + base address-family; + } + + identity ipv6-address-family { + base address-family; + } + + identity subsequent-address-family { + reference "http://tools.ietf.org/html/rfc4760#section-6"; + } + + identity unicast-subsequent-address-family { + reference "http://tools.ietf.org/html/rfc4760#section-6"; + + base subsequent-address-family; + } + + identity mpls-labeled-vpn-subsequent-address-family { + reference "http://tools.ietf.org/html/rfc4760#section-6"; + + base subsequent-address-family; + } + + typedef cluster-identifier { + reference "http://tools.ietf.org/html/rfc4456#section-8"; + type inet:ipv4-address; + } + + typedef short-as-number { + type inet:as-number { + range 0..65535; + } + } + + typedef route-distinguisher { + reference "https://tools.ietf.org/html/rfc4364#section-4.2"; + type union { + type rd-two-octet-as; + type rd-ipv4; + type rd-as; + } + } + + typedef rd-two-octet-as { + type string { + /* 2B AS : 4B number */ + pattern '0:' + + '([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|' + + '[1-5][0-9][0-9][0-9][0-9]|6[0-4][0-9][0-9][0-9]|' + + '65[0-4][0-9][0-9]|655[0-2][0-9]|6553[0-5])' + + ':' + + '([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|' + + '[1-9][0-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9][0-9]|' + + '[1-9][0-9][0-9][0-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]|' + + '[1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]|[1-3][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]|' + + '4[0-1][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]|42[0-8][0-9][0-9][0-9][0-9][0-9][0-9][0-9]|' + + '429[0-3][0-9][0-9][0-9][0-9][0-9][0-9]|4294[0-8][0-9][0-9][0-9][0-9][0-9]|' + + '42949[0-5][0-9][0-9][0-9][0-9]|429496[0-6][0-9][0-9][0-9]|4294967[0-1][0-9][0-9]|' + + '42949672[0-8][0-9]|429496729[0-5])'; + } + } + + typedef rd-ipv4 { + type string { + /* IPv4 : 2B number */ + pattern '((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))' + + ':' + + '([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|' + + '[1-5][0-9][0-9][0-9][0-9]|6[0-4][0-9][0-9][0-9]|' + + '65[0-4][0-9][0-9]|655[0-2][0-9]|6553[0-5])'; + } + } + + typedef rd-as { + type string { + /* 4B AS : 2B number */ + pattern '([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|' + + '[1-9][0-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9][0-9]|' + + '[1-9][0-9][0-9][0-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]|' + + '[1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]|[1-3][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]|' + + '4[0-1][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]|42[0-8][0-9][0-9][0-9][0-9][0-9][0-9][0-9]|' + + '429[0-3][0-9][0-9][0-9][0-9][0-9][0-9]|4294[0-8][0-9][0-9][0-9][0-9][0-9]|' + + '42949[0-5][0-9][0-9][0-9][0-9]|429496[0-6][0-9][0-9][0-9]|4294967[0-1][0-9][0-9]|' + + '42949672[0-8][0-9]|429496729[0-5])' + + ':' + + '([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|' + + '[1-5][0-9][0-9][0-9][0-9]|6[0-4][0-9][0-9][0-9]|' + + '65[0-4][0-9][0-9]|655[0-2][0-9]|6553[0-5])'; + } + } + + typedef encapsulation-tunnel-type { + reference "http://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#tunnel-types"; + type enumeration { + enum l2tpv3-over-ip { + value 1; + } + enum gre { + value 2; + } + enum transmit-tunnel-endpoint { + value 3; + } + enum ipsec-tunnel-mode { + value 4; + } + enum ip-in-ip-ipsec-transport-mode { + value 5; + } + enum mpls-in-ip-tunnel-ipsec-transport-mode { + value 6; + } + enum ip-in-ip { + value 7; + } + enum vxlan { + value 8; + } + enum nvgre { + value 9; + } + enum mpls { + value 10; + } + enum mpls-in-gre { + value 11; + } + enum vxlan-gpe { + value 12; + } + enum mpls-in-udp { + value 13; + } + enum ipv6-tunnel { + value 14; + } + } + } + + grouping bgp-aggregator { + reference "http://tools.ietf.org/html/rfc4271#section-5.1.7"; + description "BGP Path Attribute AGGREGATOR."; + leaf as-number { + // We are acting as a NEW speaker, so only four bytes are allowed + type inet:as-number; + } + leaf network-address { + type inet:ipv4-address; + } + } + + grouping community { + reference "https://tools.ietf.org/html/rfc1997"; + description "Community Path Attribute"; + leaf as-number { + type inet:as-number; + } + leaf semantics { + type uint16; + } + } + + grouping route-ipv4-extended-community { + reference "http://tools.ietf.org/html/rfc4360"; + leaf global-administrator { + type inet:ipv4-address; + } + leaf local-administrator { + type uint16; + } + } + + grouping link-bandwidth-extended-community { + reference "https://tools.ietf.org/html/draft-ietf-idr-link-bandwidth-06#section-2"; + description + "The Link Bandwidth extended community is optional non-transitive"; + + leaf bandwidth { + description "Bandwidth of the link"; + mandatory true; + type netc:bandwidth; + units "bytes per second"; + } + } + + grouping as-4-spec-common { + container as-4-specific-common { + leaf as-number { + description "Carries a 4-octet Autonomous System (AS) number"; + reference "https://tools.ietf.org/html/rfc5668#section-2"; + + mandatory true; + type inet:as-number; + } + + leaf local-administrator { + type uint16; + mandatory true; + } + } + } + + grouping encapsulation-extended-community { + reference "https://tools.ietf.org/html/rfc5512#section-4.5"; + description "BGP Encapsulation extended community"; + + leaf tunnel-type { + description "Tunnel type specifying the encapsulation protocol"; + mandatory true; + type encapsulation-tunnel-type; + } + } + + grouping inet4-specific-extended-community-common { + container inet4-specific-extended-community-common { + leaf global-administrator { + type inet:ipv4-address; + } + leaf local-administrator { + type binary { + length "2"; + } + } + } + } + + grouping source-as-4-extended-community-grouping { + reference "https://tools.ietf.org/html/rfc6514#section-6"; + leaf global-administrator { + description "Carries a 4-octet Autonomous System (AS) number"; + reference "https://tools.ietf.org/html/rfc5668#section-2"; + + mandatory true; + type inet:as-number; + } + } + + grouping source-as-extended-community-grouping { + reference "https://tools.ietf.org/html/rfc6514#section-6"; + leaf global-administrator { + type bgp-t:short-as-number; + } + } + + grouping route-target { + description "Marker grouping for Route Target extended communities."; + } + + grouping route-target-constrain-default-route-grouping { + container route-target-constrain-default-route { + uses route-target; + presence + "The presence of this container indicates that the routes + is a default route target"; + } + } + + grouping route-target-extended-community-grouping { + container route-target-extended-community { + description "Type 0x00 / Subtype 0x02"; + reference "http://tools.ietf.org/html/rfc4360#section-4"; + uses route-target; + + leaf global-administrator { + type short-as-number; + } + leaf local-administrator { + type binary { + length "4"; + } + } + } + } + + grouping route-target-ipv4-grouping { + container route-target-ipv4 { + description "Type 0x01 / Subtype 0x02"; + reference "http://tools.ietf.org/html/rfc4360#section-4"; + uses route-target; + uses route-ipv4-extended-community; + } + } + + grouping as-4-route-target-extended-community-grouping { + container as-4-route-target-extended-community { + description "Type 0x02 / Subtype 0x02"; + reference "https://tools.ietf.org/html/rfc5668"; + uses route-target; + uses as-4-spec-common; + } + } + + grouping extended-community { + leaf transitive { + type boolean; + } + choice extended-community { + case as-specific-extended-community-case { + container as-specific-extended-community { + leaf global-administrator { + type short-as-number; + } + leaf local-administrator { + type binary { + length "4"; + } + } + } + } + case inet4-specific-extended-community-case { + container inet4-specific-extended-community { + uses inet4-specific-extended-community-common; + leaf global-administrator { + status deprecated; + type inet:ipv4-address; + } + leaf local-administrator { + status deprecated; + type binary { + length "2"; + } + } + } + } + case opaque-extended-community-case { + container opaque-extended-community { + leaf value { + type binary { + length "6"; + } + } + } + } + case route-target-extended-community-case { + uses route-target-extended-community-grouping; + } + case route-target-ipv4-case { + uses route-target-ipv4-grouping; + } + case as-4-route-target-extended-community-case { + uses as-4-route-target-extended-community-grouping; + } + case route-origin-extended-community-case { + container route-origin-extended-community { + leaf global-administrator { + type short-as-number; + } + leaf local-administrator { + type binary { + length "4"; + } + } + } + } + case route-origin-ipv4-case { + container route-origin-ipv4 { + reference "http://tools.ietf.org/html/rfc4360#section-5"; + uses route-ipv4-extended-community; + } + } + case link-bandwidth-case { + container link-bandwidth-extended-community { + uses link-bandwidth-extended-community; + } + } + case as-4-generic-spec-extended-community-case { + container as-4-generic-spec-extended-community { + reference "https://www.ietf.org/archive/id/draft-ietf-idr-as4octet-extcomm-generic-subtype-08.txt"; + uses as-4-spec-common; + } + } + case as-4-route-origin-extended-community-case { + container as-4-route-origin-extended-community { + reference "https://tools.ietf.org/html/rfc5668"; + uses as-4-spec-common; + } + } + case encapsulation-case { + container encapsulation-extended-community { + uses encapsulation-extended-community; + } + } + case vrf-route-import-extended-community-case { + reference "https://tools.ietf.org/html/rfc6514#section-7"; + container vrf-route-import-extended-community { + uses inet4-specific-extended-community-common; + } + } + case source-as-4-extended-community-case { + container source-as-4-extended-community { + uses source-as-4-extended-community-grouping; + } + } + case source-as-extended-community-case { + container source-as-extended-community { + uses source-as-extended-community-grouping; + } + } + } + } + + grouping next-hop { + choice c-next-hop { + default empty-next-hop-case; + case ipv4-next-hop-case { + container ipv4-next-hop { + reference "http://tools.ietf.org/html/rfc4271#section-5.1.3"; + leaf global { + type inet:ipv4-address; + } + } + } + case ipv6-next-hop-case { + container ipv6-next-hop { + reference "http://tools.ietf.org/html/rfc4760#section-3"; + leaf global { + type inet:ipv6-address; + } + leaf link-local { + type inet:ipv6-address; + } + } + } + case empty-next-hop-case { + leaf empty-next-hop { + type empty; + } + } + } + } + + grouping as-path-segment { + reference "http://tools.ietf.org/html/rfc4271#section-5.1.2"; + leaf-list as-sequence { + type inet:as-number; + ordered-by user; + max-elements "255"; + } + leaf-list as-set { + type inet:as-number; + } + } + + grouping route-distinguisher-grouping { + leaf route-distinguisher { + type route-distinguisher; + mandatory true; + } + } + + grouping orig-route-ip-grouping { + leaf orig-route-ip { + type inet:ip-address; + mandatory true; + } + } +} diff --git a/experimental/odp/bgp-vpn-ipv4.yang b/experimental/odp/bgp-vpn-ipv4.yang new file mode 100644 index 000000000..417100b7b --- /dev/null +++ b/experimental/odp/bgp-vpn-ipv4.yang @@ -0,0 +1,103 @@ +module bgp-vpn-ipv4 { + namespace "urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4"; + prefix "bgp-vpn-ipv4"; + + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import bgp-vpn { prefix bgp-vpn; revision-date 2018-03-29; } + + organization "Cisco Systems, Inc."; + contact "Iveta Halanova "; + + description + "This module contains the base data model of a BGP message. + It rolls up the definitions contained in RFC4364. + + Copyright (c)2016 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision 2016-02-10 { + reference "https://tools.ietf.org/html/rfc4364"; + description "Initial revision"; + } + + grouping l3vpn-ipv4-routes { + container vpn-ipv4-routes { + uses bgp-vpn:l3vpn-ip-route; + } + } + + grouping l3vpn-ipv4-destination { + container vpn-ipv4-destination { + uses bgp-vpn:l3vpn-ip-destination-type; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" { + case destination-vpn-ipv4-case { + uses l3vpn-ipv4-destination; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" { + case destination-vpn-ipv4-case { + uses l3vpn-ipv4-destination; + } + } + + augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" { + case vpn-ipv4-routes-case { + uses l3vpn-ipv4-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" { + case vpn-ipv4-routes-case { + uses l3vpn-ipv4-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" { + case vpn-ipv4-routes-case { + uses l3vpn-ipv4-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" { + case vpn-ipv4-routes-case { + uses l3vpn-ipv4-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" { + case vpn-ipv4-routes-case { + uses l3vpn-ipv4-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case vpn-ipv4-routes-case { + uses l3vpn-ipv4-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case vpn-ipv4-routes-case { + uses l3vpn-ipv4-routes; + } + } +} diff --git a/experimental/odp/bgp-vpn-ipv6.yang b/experimental/odp/bgp-vpn-ipv6.yang new file mode 100644 index 000000000..5ed3ab17e --- /dev/null +++ b/experimental/odp/bgp-vpn-ipv6.yang @@ -0,0 +1,103 @@ +module bgp-vpn-ipv6 { + namespace "urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv6"; + prefix "bgp-vpn-ipv6"; + + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import bgp-vpn { prefix bgp-vpn; revision-date 2018-03-29; } + + organization "Brocade Communications Systems, Inc."; + contact "Kevin Wang "; + + description + "This module contains the base data model of a BGP message. + It rolls up the definitions contained in RFC4659. + + Copyright (c) 2016 Brocade Communications Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision 2016-03-31 { + reference "https://tools.ietf.org/html/rfc4659"; + description "Initial revision"; + } + + grouping l3vpn-ipv6-routes { + container vpn-ipv6-routes { + uses bgp-vpn:l3vpn-ip-route; + } + } + + grouping l3vpn-ipv6-destination { + container vpn-ipv6-destination { + uses bgp-vpn:l3vpn-ip-destination-type; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" { + case destination-vpn-ipv6-case { + uses l3vpn-ipv6-destination; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" { + case destination-vpn-ipv6-case { + uses l3vpn-ipv6-destination; + } + } + + augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" { + case routes-vpn-ipv6-case { + uses l3vpn-ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" { + case vpn-ipv6-routes-case { + uses l3vpn-ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" { + case vpn-ipv6-routes-case { + uses l3vpn-ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" { + case vpn-ipv6-routes-case { + uses l3vpn-ipv6-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" { + case vpn-ipv6-routes-case { + uses l3vpn-ipv6-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case vpn-ipv6-routes-case { + uses l3vpn-ipv6-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case vpn-ipv6-routes-case { + uses l3vpn-ipv6-routes; + } + } +} diff --git a/experimental/odp/bgp-vpn.yang b/experimental/odp/bgp-vpn.yang new file mode 100644 index 000000000..bbccea596 --- /dev/null +++ b/experimental/odp/bgp-vpn.yang @@ -0,0 +1,56 @@ +module bgp-vpn { + namespace "urn:opendaylight:params:xml:ns:yang:bgp-vpn"; + prefix "bgp-vpn"; + + import bgp-labeled-unicast { prefix bgp-lu; revision-date 2018-03-29; } + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + + organization "Brocade Communications Systems, Inc."; + contact "Kevin Wang "; + + description + "This module contains the base data model of a BGP message. + It defines the common part of both L3VPN-IPv4 and L3VPN-IPv6 model. + + Copyright (c) 2016 Brocade Communications Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision 2016-04-13 { + description "Initial version"; + } + + grouping l3vpn { + uses bgp-lu:labeled-unicast; + uses bgp-t:route-distinguisher-grouping; + } + + grouping l3vpn-ip-destination-type { + list vpn-destination { + uses l3vpn; + uses bgp-msg:path-id-grouping; + } + } + + grouping l3vpn-ip-route { + list vpn-route { + key "route-key path-id"; + uses l3vpn; + uses bgp-rib:route; + } + } +} diff --git a/experimental/odp/bgp.yang b/experimental/odp/bgp.yang new file mode 100644 index 000000000..7010f6c01 --- /dev/null +++ b/experimental/odp/bgp.yang @@ -0,0 +1,1282 @@ +module bgp { + namespace "urn:cisco:params:xml:ns:yang:bgp"; + // replace with IANA namespace when assigned + prefix bgp; + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + import ietf-yang-types { + prefix yang; + } + + organization + "Cisco Systems + 170 West Tasman Drive + San Jose, CA 95134-1706 + USA"; + contact + "Aleksandr Zhdankin azhdanki@cisco.com + Keyur Patel keyupate@cisco.com + Alexander Clemm alex@cisco.com"; + description + "This YANG module defines the generic configuration + data for BGP, which is common across all of the vendor + implementations of the protocol. It is intended that the module + will be extended by vendors to define vendor-specific + BGP configuration parameters and policies, + for example route maps or route policies. + + + Terms and Acronyms + + BGP (bgp): Border Gateway Protocol + + IP (ip): Internet Protocol + + IPv4 (ipv4):Internet Protocol Version 4 + + IPv6 (ipv6): Internet Protocol Version 6 + + MED(med): Multi Exit Discriminator + + IGP (igp): Interior Gateway Protocol + + MTU (mtu) Maximum Transmission Unit + "; + + revision 2013-07-15 { + description + "Initial revision."; + } + + typedef prefix-list-ref { + description + "A reference to the prefix list which a bgp-neighbor can use."; + type leafref { + path "/prefix-lists/prefix-list/prefix-list-name"; + } + } + + typedef neigbour-ref { + description + "A reference to the bgp-neighbor."; + type leafref { + path "/bgp-neighbors/bgp-neighbor/as-number"; + } + } + + typedef bgp-peer-admin-status { + description + "Administartive status of a BGP peer."; + type enumeration { + enum "unknown"; + enum "up"; + enum "down"; + } + } + + typedef actions-enum { + description + "Permit/deny action."; + type enumeration { + enum "permit"; + enum "deny"; + } + } + + grouping ACTIONS { + description + "Permit/deny action."; + leaf action { + type actions-enum; + mandatory true; + } + } + + grouping slow-peer-config { + description + "Configure a slow-peer."; + container detection { + leaf enable { + type boolean; + default "true"; + } + leaf threshold { + type uint16 { + range "120..3600"; + } + } + } + leaf split-update-group { + type enumeration { + enum "dynamic"; + enum "static"; + } + } + } + grouping update-group-management { + description + "Manage peers in BGP update group."; + leaf split-as-override { + description + "Keeps peers with as-override in different update groups."; + type boolean; + } + } + + grouping neighbour-base-af-config { + description + "A set of configuration parameters that is applicable to all neighbour address families."; + leaf active { + description + "Enable the address family for this neighbor."; + type boolean; + default "false"; + } + leaf advertisement-interval { + description + "Minimum interval between sending BGP routing updates."; + type uint32; + } + leaf allowas-in { + description + "Accept as-path with my AS present in it."; + type boolean; + default "false"; + } + leaf maximum-prefix { + description + "Maximum number of prefixes accepted from this peer."; + type uint32; + } + leaf next-hop-self { + description + "Enable the next hop calculation for this neighbor."; + type boolean; + default "true"; + } + leaf next-hop-unchanged { + description + "Propagate next hop unchanged for iBGP paths to this neighbour."; + type boolean; + default "true"; + } + container remove-private-as { + leaf remove-private-as-number { + description + "Remove private AS number from outbound updates."; + type boolean; + } + leaf replace-with-local-as { + description + "Replace private AS number with local AS."; + type boolean; + } + } + leaf route-reflector-client { + description + "Configure a neighbor as Route Reflector client."; + type boolean; + default "false"; + } + leaf send-community { + description + "Send Community attribute to this neighbor."; + type enumeration { + enum "both"; + enum "extended"; + enum "standard"; + } + default "standard"; + } + uses slow-peer-config; + leaf soo { + description + "Site-of-Origin extended community. Format is ASN:nn or IP-address:nn"; + type string; + } + leaf weight { + description + "Set default weight for routes from this neighbor."; + type uint16; + } + } + + grouping neighbour-common-af-config { + description + "A set of configuration parameters that is applicable to all neighbour address families, + except of nsap and rtfilter."; + uses neighbour-base-af-config; + leaf prefix-list { + description + "Reference to the prefix list of this neighbour."; + type prefix-list-ref; + } + leaf soft-reconfiguration { + description + "Allow inbound soft reconfiguration."; + type boolean; + } + } + + grouping neighbour-cast-af-config { + description + "A set of configuration parameters that is applicable to both unicast and multicast sub-address families."; + uses neighbour-common-af-config; + leaf propagate-dmzlink-bw { + description + "Propagate the DMZ link bandwidth."; + type boolean; + } + container default-originate { + description + "Originate default route to this neighbor."; + leaf enable { + type boolean; + default "false"; + } + } + } + + grouping neighbour-ip-multicast-af-config { + description + "A set of configuration parameters that is applicable to ip multicast."; + uses neighbour-cast-af-config; + leaf route-server-client-context { + description + "Specifies Route Server client context name."; + type string; + } + } + + grouping neighbour-ip-unicast-af-config { + description + "A set of configuration parameters that is applicable to ip unicast. + This grouping is intended to be extended by vendors as necessary to describe the vendor-specific configuration parameters."; + uses neighbour-ip-multicast-af-config; + } + + grouping bgp-af-config { + description + "A set of configuration parameters that is applicable to all address families of the BFP router."; + leaf additional-paths { + description + "Additional paths in the BGP table."; + type enumeration { + enum "all"; + enum "best-n"; + enum "group-best"; + } + } + leaf advertise-best-external { + description + "Advertise best external path to internal peers."; + type boolean; + } + container aggregate-timer { + description + "Configure aggregation timer."; + leaf enable { + type boolean; + default "true"; + } + leaf threshold { + type uint16 { + range "6..60"; + } + } + } + container bestpath { + description + "Change the default bestpath selection."; + choice bestpath-selection { + case as-path { + description + "Configures a BGP routrer to not consider the autonomous system (AS) path during best path route selection."; + leaf ignore-as-path { + type boolean; + default "false"; + } + } + case compare-routerid { + description + "Configures a BGP routrer to compare identical routes received from different external peers + during the best path selection process and to select the route with the lowest router ID as the best path."; + leaf ignore-routerid { + type boolean; + default "false"; + } + } + case cost-community { + description + "Configures a BGP router to not evaluate the cost community attribute + during the best path selection process."; + leaf ignore-cost-community { + type boolean; + default "false"; + } + } + case igp-metric { + description + "Configures the system to ignore the IGP metric during BGP best path selection."; + leaf ignore-igp-metric { + type boolean; + default "false"; + } + } + case mad-confed { + description + "Configure a BGP routing process to compare the Multi Exit Discriminator (MED) + between paths learned from confederation peers."; + leaf enable { + type boolean; + default "false"; + } + leaf missing-as-worst { + description + "Assigns a value of infinity to routes that are missing + the Multi Exit Discriminator (MED) attribute, + making the path without a MED value the least desirable path"; + type boolean; + default "false"; + } + } + } + } + leaf dampening { + description + "Enable route-flap dampening."; + type boolean; + default "false"; + } + leaf propagate-dmzlink-bw { + description + "Use DMZ Link Bandwidth as weight for BGP multipaths."; + type boolean; + } + leaf redistribute-internal { + description + "Allow redistribution of iBGP into IGPs (dangerous)"; + type boolean; + } + leaf scan-time { + description + "Configure background scanner interval in seconds."; + type uint8 { + range "5..60"; + } + } + uses slow-peer-config; + leaf soft-reconfig-backup { + description + "Use soft-reconfiguration inbound only when route-refresh is not negotiated."; + type boolean; + } + } + + grouping bgp-af-vpn-config { + description + "A set of configuration parameters that is applicable to vpn sub-address family on the BGP router."; + uses bgp-af-config; + uses update-group-management; + } + + grouping bgp-af-mvpn-config { + description + "A set of configuration parameters that is applicable to mvpn sub-address family on the BGP router."; + leaf scan-time { + description + "Configure background scanner interval in seconds."; + type uint8 { + range "5..60"; + } + } + uses slow-peer-config; + leaf soft-reconfig-backup { + description + "Use soft-reconfiguration inbound only when route-refresh is not negotiated."; + type boolean; + } + leaf propagate-dmzlink-bw { + description + "Use DMZ Link Bandwidth as weight for BGP multipaths."; + type boolean; + } + leaf rr-group { + description + "Extended community list name."; + type string; + } + uses update-group-management; + } + + grouping redistribute { + description + "Redistribute information from another routing protocol. + This grouping is intended to be augmented by vendors to implement vendor-specific protocol redistribution configuration options."; + choice protocol { + case bgp { + leaf enable-bgp { + type boolean; + } + } + case ospf { + leaf enable-ospf { + type boolean; + } + } + case isis { + leaf enable-isis { + type boolean; + } + } + case connected { + leaf enable-connected { + type boolean; + } + } + case eigrp { + leaf enable-eigrp { + type boolean; + } + } + case mobile { + leaf enable-mobile { + type boolean; + } + } + case static { + leaf enable-static { + type boolean; + } + } + case rip { + leaf enable-rip { + type boolean; + } + } + } + } + + grouping router-af-config { + description + "A set of configuration parameters that is applicable to all address families on the BGP router."; + leaf aggregate-address { + description + "Configure BGP aggregate address."; + type inet:ip-address; + } + leaf distance { + description + "Define an administrative distance."; + type uint8 { + range "1..255"; + } + } + leaf network { + description + "Specify a network to announce via BGP."; + type inet:ip-address; + } + uses redistribute; + } + + grouping maximum-paths { + description + "Configures packet forwarding over multiple paths."; + leaf number-of-path { + type uint8 { + range "1..32"; + } + } + leaf ibgp-number-of-path { + type uint8 { + range "1..32"; + } + } + } + + container bgp-router { + description + "This is a top-level container for the BGP router."; + leaf local-as-number { + type uint32; + } + leaf local-as-identifier { + type inet:ip-address; + } + container rpki-config { + description + "RPKI configuration parameters."; + container cache-server-config { + description + "Configure the RPKI cache-server parameters in rpki-server configuration mode."; + choice server { + case ip-address { + leaf ip-address { + type inet:ip-address; + mandatory true; + } + } + case host-name { + leaf ip-host-address { + type inet:host; + mandatory true; + } + } + } + choice transport { + description + "Specifies a transport method for the RPKI cache."; + case tcp { + leaf tcp-port { + type uint32; + } + } + case ssh { + leaf ssh-port { + type uint32; + } + } + } + leaf user-name { + type string; + } + leaf password { + type string; + } + leaf preference-value { + description + "Specifies a preference value for the RPKI cache. + Setting a lower preference value is better."; + type uint8 { + range "1..10"; + } + } + leaf purge-time { + description + "Configures the time BGP waits to keep routes from a cache after the cache session drops. Set purge time in seconds."; + type uint16 { + range "30..360"; + } + } + choice refresh-time { + description + "Configures the time BGP waits in between sending periodic serial queries to the cache. Set refresh-time in seconds."; + case disable { + leaf refresh-time-disable { + type boolean; + } + } + case set-time { + leaf refresh-interval { + type uint16 { + range "15..3600"; + } + } + } + } + choice responce-time { + description + "Configures the time BGP waits for a response after sending a serial or reset query. Set response-time in seconds."; + case disable { + leaf responce-time-disable { + type boolean; + } + } + case set-time { + leaf responce-interval { + type uint16 { + range "15..3600"; + } + } + } + } + } + container validation-config { + description + "Controls the behavior of RPKI prefix validation processing."; + leaf enable { + description + "Enables RPKI origin-AS validation."; + type boolean; + default "true"; + } + leaf enable-ibgp { + description + "Enables the iBGP signaling of validity state through an extended-community."; + type boolean; + } + choice validation-time { + description + "Sets prefix validation time (in seconds) or to set off the automatic prefix validation after an RPKI update."; + case validation-off { + leaf disable { + type boolean; + } + } + case set-time { + leaf prefix-validation-time { + description + "Range in seconds."; + type uint16 { + range "5..60"; + } + } + } + } + } + container bestpath-computation { + description + "Configures RPKI bestpath computation options."; + leaf enable { + description + "Enables the validity states of BGP paths to affect the path's preference in the BGP bestpath process."; + type boolean; + } + leaf allow-invalid { + description + "Allows all 'invalid' paths to be considered for BGP bestpath computation."; + type boolean; + } + } + } + container af-configuration { + description + "Top level container for address families specific configuration of the BGP router."; + container ipv4 { + container mdt { + container bgp { + description + "BGP specific commands for ipv4-mdt address family/sub-addess family combination."; + leaf dampening { + description + "Enable route-flap dampening."; + type boolean; + default "false"; + } + leaf scan-time { + description + "Configure background scanner interval in seconds."; + type uint8 { + range "5..60"; + } + } + uses slow-peer-config; + leaf soft-reconfig-backup { + description + "Use soft-reconfiguration inbound only when route-refresh is not negotiated."; + type boolean; + } + leaf propagate-dmzlink-bw { + description + "Use DMZ Link Bandwidth as weight for BGP multipaths."; + type boolean; + } + } + } + container multicast { + container bgp { + description + "BGP specific commands for ipv4-multicast address family/sub-addess family combination."; + uses bgp-af-config; + } + leaf auto-summary { + description + "Enable automatic network number summarization"; + type boolean; + } + uses router-af-config; + leaf default-metric { + description + "Set metric of redistributed routes."; + type uint32; + } + } + container unicast { + container bgp { + description + "BGP specific commands for ipv4-unicast address family/sub-addess family combination."; + uses bgp-af-config; + leaf always-compare-med { + description + "Allow comparing MED from different neighbors."; + type boolean; + default "false"; + } + leaf enforce-first-as { + description + "Enforce the first AS for EBGP routes(default)."; + type boolean; + default "true"; + } + leaf fast-external-fallover { + description + "Immediately reset session if a link to a directly connected external peer goes down."; + type boolean; + default "true"; + } + leaf suppress-inactive { + description + "Suppress routes that are not in the routing table."; + type boolean; + } + leaf asnotation { + description + "Sets the default asplain notation."; + type enumeration { + enum "asplain"; + enum "dot"; + } + } + leaf enable-client-to-client-reflection { + description + "Manages client to client route reflection."; + type boolean; + default "true"; + } + leaf cluster-id { + description + "Configure Route-Reflector Cluster-id."; + type string; + } + container confederation { + description + "AS confederation parameters."; + leaf identifier { + description + "Confederation identifier."; + type string; + } + list peers { + description + "Confederation peers."; + key "as-name"; + leaf as-name { + type string; + } + } + } + container consistency-checker { + description + "Consistency-checker configuration."; + leaf enable { + type boolean; + } + leaf interval { + description + "Check interval in minutes."; + type uint16 { + range "5..1440"; + } + } + choice inconsistency-action { + case error-message { + description + "Specifies that when an inconsistency is found, the system will only generate a syslog message."; + leaf generate-error-message-only { + type boolean; + } + } + case autorepair { + description + "Specifies that when an inconsistency is found, + the system will generate a syslog message and take action + based on the type of inconsistency found."; + leaf perform-autorepair { + type boolean; + } + } + } + } + leaf deterministic-med { + description + "If enabled it enforce the deterministic comparison of the MED value between + all paths received from within the same autonomous system."; + type boolean; + } + container graceful-restart { + description + "Controls the BGP graceful restart capability."; + leaf enable { + type boolean; + } + leaf restart-time { + description + "Sets the maximum time period (in seconds) that the local router will wait + for a graceful-restart-capable neighbor to return to normal operation after a restart event occurs."; + type uint16 { + range "1..3600"; + } + default "120"; + } + leaf stalepath-time { + description + "Sets the maximum time period that the local router will hold stale paths for a restarting peer."; + type uint16 { + range "5..3600"; + } + default "360"; + } + } + container listener-congfig { + description + "Associates a subnet range with a BGP peer group and activate the BGP dynamic neighbors feature."; + leaf enable { + type boolean; + } + leaf limit { + description + "Sets a maximum limit number of BGP dynamic subnet range neighbors."; + type uint16 { + range "1..5000"; + } + default "100"; + } + leaf range { + description + "Specifies a subnet range that is to be associated with a specified peer group."; + type uint16 { + range "0..32"; + } + } + leaf peer-group { + description + "Specifies a BGP peer group that is to be associated with the specified subnet range."; + type string; + } + } + leaf log-neighbor-changes { + description + "Log neighbor up/down and reset reason."; + type boolean; + } + leaf max-as-limit { + description + "Configures BGP to discard routes that have a number of autonomous system numbers in AS-path that exceed the specified value."; + type uint16 { + range "1..254"; + } + } + container router-id { + description + "Configures a fixed router ID for the local BGP routing process."; + leaf enable { + type boolean; + } + choice config-type { + case static { + leaf ip-address { + type boolean; + } + } + case auto-config { + leaf enable-auto-config { + type boolean; + } + } + } + } + container transport { + description + "Manages transport session parameters."; + leaf enable-path-mtu-discovery { + description + "Enables transport path MTU discovery."; + type boolean; + default "true"; + } + } + } + leaf auto-summary { + description + "Enable automatic network number summarization"; + type boolean; + } + uses router-af-config; + uses maximum-paths; + leaf synchronization { + description + "Perform IGP synchronization."; + type boolean; + } + } + container mvpn { + container bgp { + description + "BGP specific commands for ipv4-mvpn address family/sub-addess family combination."; + uses bgp-af-mvpn-config; + } + leaf auto-summary { + description + "Enable automatic network number summarization."; + type boolean; + } + } + } + container ipv6 { + container multicast { + container bgp { + description + "BGP specific commands for ipv6-multicast address family/sub-addess family combination."; + uses bgp-af-config; + } + uses router-af-config; + } + container unicast { + container bgp { + description + "BGP specific commands for ipv6-unicast address family/sub-addess family combination."; + uses bgp-af-config; + } + uses router-af-config; + leaf default-metric { + description + "Set metric of redistributed routes."; + type uint32; + } + uses maximum-paths; + leaf synchronization { + description + "Perform IGP synchronization."; + type boolean; + } + } + container mvpn { + container bgp { + description + "BGP specific commands for ipv6-mvpn address family/sub-addess family combination."; + uses bgp-af-mvpn-config; + } + } + } + container l2vpn { + container vpls { + container bgp { + description + "BGP specific commands for l2vpn-vpls address family/sub-addess family combination."; + leaf scan-time { + description + "Configure background scanner interval in seconds."; + type uint8 { + range "5..60"; + } + } + uses slow-peer-config; + } + } + } + container nsap { + container unicast { + container bgp { + description + "BGP specific commands for nsap-unicast address family/sub-addess family combination."; + container aggregate-timer { + description + "Configure Aggregation Timer."; + leaf enable { + type boolean; + default "true"; + } + leaf threshold { + type uint16 { + range "6..60"; + } + } + } + leaf dampening { + description + "Enable route-flap dampening."; + type boolean; + default "false"; + } + leaf propagate-dmzlink-bw { + description + "Use DMZ Link Bandwidth as weight for BGP multipaths."; + type boolean; + } + leaf redistribute-internal { + description + "Allow redistribution of iBGP into IGPs (dangerous)"; + type boolean; + } + leaf scan-time { + description + "Configure background scanner interval in seconds."; + type uint8 { + range "5..60"; + } + } + uses slow-peer-config; + leaf soft-reconfig-backup { + description + "Use soft-reconfiguration inbound only when route-refresh is not negotiated."; + type boolean; + } + } + leaf default-metric { + description + "Set metric of redistributed routes."; + type uint32; + } + uses maximum-paths; + leaf network { + description + "Specify a network to announce via BGP."; + type inet:ip-address; + } + uses redistribute; + leaf synchronization { + description + "Perform IGP synchronization."; + type boolean; + } + } + } + } + container rtfilter { + container unicast { + container bgp { + description + "BGP specific commands for rtfilter-unicast address family/sub-addess family combination."; + uses slow-peer-config; + } + uses maximum-paths; + } + } + container vpnv4 { + container unicast { + container bgp { + description + "BGP specific commands for vpnv4-unicast address family/sub-addess family combination."; + uses bgp-af-vpn-config; + } + uses maximum-paths; + } + container multicast { + container bgp { + description + "BGP specific commands for vpnv4-multicast address family/sub-addess family combination."; + uses bgp-af-vpn-config; + } + uses maximum-paths; + } + } + container vpnv6 { + container unicast { + container bgp { + description + "BGP specific commands for vpnv6-unicast address family/sub-addess family combination."; + uses bgp-af-vpn-config; + } + } + } + } + container bgp-neighbors { + description + "The top level container for the list of neighbours of the BGP router."; + list bgp-neighbor { + key "as-number"; + leaf as-number { + type uint32; + } + choice peer-address-type { + case ip-address { + leaf ip-address { + type inet:ip-address; + mandatory true; + } + } + case prefix { + leaf prefix { + type inet:ip-prefix; + mandatory true; + } + } + case host { + leaf ip-host-address { + type inet:host; + mandatory true; + } + } + } + leaf prefix-list { + type prefix-list-ref; + } + leaf default-action { + type actions-enum; + } + container af-specific-config { + description + "Address family specific configuration parameters for the neighbours."; + container ipv4 { + container mdt { + uses neighbour-common-af-config; + } + container unicast { + uses neighbour-ip-unicast-af-config; + } + container multicast { + uses neighbour-ip-multicast-af-config; + } + container mvpn { + uses neighbour-cast-af-config; + } + } + container ipv6 { + container unicast { + uses neighbour-ip-unicast-af-config; + } + container multicast { + uses neighbour-ip-multicast-af-config; + } + container mvpn { + uses neighbour-common-af-config; + } + } + container l2vpn { + container evpn { + uses neighbour-common-af-config; + } + container vpls { + uses neighbour-common-af-config; + } + } + container nsap { + container unicast { + uses neighbour-base-af-config; + leaf prefix-list { + type prefix-list-ref; + } + } + } + container rtfilter { + container unicast { + uses neighbour-base-af-config; + leaf soft-reconfiguration { + description + "Allow inbound soft reconfiguration."; + type boolean; + } + } + } + container vpnv4 { + container unicast { + uses neighbour-cast-af-config; + } + container multicast { + uses neighbour-cast-af-config; + } + } + container vpnv6 { + container unicast { + uses neighbour-cast-af-config; + } + container multicast { + uses neighbour-cast-af-config; + } + } + } + container bgp-neighbor-state { + description + "The operational parameters describing the neighbour state. + It is intended that this container may be augmented by vendors to reflect the vendor-specific operational state parameters."; + leaf adminStatus { + type bgp-peer-admin-status; + } + leaf in-lastupdatetime { + type yang:timestamp; + } + } + container bgp-neighbor-statistics { + description + "The operational parameters describing the neighbour statistics. + It is intended that this container may be augmented by vendors to reflect the vendor-specific staistical parameters."; + leaf nr-in-updates { + type uint32; + } + leaf nr-out-updates { + type uint32; + } + } + } + } + container prefix-lists { + description + "Contains all prefix lists defined + on a router."; + list prefix-list { + key "prefix-list-name"; + description + "A prefix list."; + leaf prefix-list-name { + type string; + } + container prefixes { + list prefix { + key "seq-nr"; + description + "A prefix is a rule with a BGP filter. + The left hand side of the rule is the prefix filter. + It specifies a set of IP addresses. + If a BGP announcement contains an address that matches, the + rule is applied. The right hand side of the rule specifies + the action that is to be applied."; + leaf seq-nr { + type uint16; + description + "Sequence number of the rule. + The sequence number is included for compatibility purposes + with CLI; from a machine-to-machine interface perspective, + it would strictly speaking not be required as list elements + can be arranged in a particular order."; + } + container prefix-filter { + choice ip-address-group { + case ip-address { + leaf ip-address { + type inet:ip-address; + mandatory true; + } + } + case prefix { + leaf prefix { + type inet:ip-prefix; + mandatory true; + } + } + case host { + leaf ip-host-address { + type inet:host; + mandatory true; + } + } + case ip-range { + leaf lower { + type inet:ip-address; + } + leaf upper { + type inet:ip-address; + } + } + } + leaf action { + type actions-enum; + mandatory true; + description + "permit/deny action"; + } + container statistics { + leaf prefix-hit-count { + type uint32; + config false; + } + } + } + } + } + } + } +} diff --git a/experimental/odp/bmp-message.yang b/experimental/odp/bmp-message.yang new file mode 100644 index 000000000..3462c45f5 --- /dev/null +++ b/experimental/odp/bmp-message.yang @@ -0,0 +1,608 @@ +module bmp-message { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bmp-message"; + prefix "bmp-msg"; + + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import ietf-yang-types { prefix yang; revision-date 2013-07-15; } + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + + organization "Cisco Systems, Inc."; + contact "Milos Fabian "; + + description + "This module contains the base data model of a BMP messages. + It rolls up the definitions contained in RFC7854. + + Copyright (c)2015 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + reference + "https://tools.ietf.org/html/rfc7854"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision "2015-05-12" { + description + "Initial revision."; + } + + typedef reason { + type enumeration { + enum administratively-closed { + value 0; + description + "Session administratively closed."; + } + enum unspecified { + value 1; + description + "Unspecified reason."; + } + enum out-of-resources { + value 2; + description + "Out of resources. The router has exhausted + resources available for the BMP session."; + } + enum redundant-connection { + value 3; + description + "Redundant connection. The router has determined + that this connection is redundant with another one."; + } + enum permanently-closed { + value 4; + description + "Session permanently administratively closed, + will not be re-initiated. Monitoring station should reduce + (potentially to 0) the rate at which it attempts + reconnection to the monitored router."; + } + } + } + + typedef adj-rib-in-type { + type enumeration { + enum pre-policy { + value 0; + } + enum post-policy { + value 1; + } + } + description + "If set to 1, indicates that the message reflects + the post-policy Adj-RIB-In (i.e., it reflects the application + of inbound policy). It is set to 0 if the message reflects the + pre-policy Adj-RIB-In."; + } + + typedef peer-type { + type enumeration { + enum global { + value 0; + description "Global Instance Peer."; + } + enum l3vpn { + value 1; + description "RD Instance Peer."; + } + enum local { + value 2; + description "Local Instance Peer"; + } + } + } + + typedef mirror-information-code { + type enumeration { + enum errored-pdu { + value 0; + } + enum message-lost { + value 1; + } + } + } + + grouping tlv { + description + "Common marker for all BMP TLVs."; + } + + grouping string-tlv { + container string-tlv { + uses tlv; + leaf string-info { + type string; + } + description + "Type = 0: String. The Information field contains a free-form + UTF-8 string whose length is given by the Information Length + field. Inclusion of this TLV is optional. + Multiple String TLVs MAY be included in the message."; + } + } + + grouping description-tlv { + container description-tlv { + uses tlv; + leaf description { + type string; + mandatory true; + } + description + "Type = 1: sysDescr. The Information field contains an ASCII + string whose value MUST be set to be equal to the value of the + sysDescr MIB-II [RFC1213] object. Inclusion of this TLV is + mandatory."; + } + } + + grouping name-tlv { + container name-tlv { + uses tlv; + leaf name { + type string; + mandatory true; + } + description + "Type = 2: sysName. The Information field contains a ASCII + string whose value MUST be set to be equal to the value of the + sysName MIB-II [RFC1213] object. Inclusion of this TLV is + mandatory."; + } + } + + grouping string-informations { + list string-information { + uses string-tlv; + } + } + + grouping initiation-tlvs { + uses string-informations; + uses description-tlv; + uses name-tlv; + description + "TLVs containing information about the monitored router"; + } + + grouping reason-tlv { + container reason-tlv { + uses tlv; + leaf reason { + type reason; + mandatory true; + } + description + "Type = 1: Reason. The Information field contains a two-byte + code indicating the reason the connection was terminated. Some + reasons may have further TLVs associated with them. Inclusion + of this TLV is not optional."; + } + } + + grouping termination-tlvs { + uses string-informations; + uses reason-tlv; + description + "TLVs containing information about the reason for the + termination."; + } + + grouping mirror-information-tlv { + container mirror-information-tlv { + uses tlv; + leaf code { + type mirror-information-code; + } + description + "Type = 1: Information. A two-byte code that provides information + about the mirrored message or message stream."; + } + } + + grouping mirror-pdu-tlvs { + container pdu-update-tlv { + uses tlv; + uses bgp-msg:update-message; + } + container pdu-open-tlv { + uses tlv; + uses bgp-msg:open-message; + } + description + "BGP Message. A BGP PDU. This PDU may or may not be an + Update message. If the BGP Message TLV occurs in the Route + Mirroring message, it MUST occur last in the list of TLVs."; + } + + grouping mirror-tlvs { + uses mirror-information-tlv; + uses mirror-pdu-tlvs; + } + + grouping mirror { + container tlvs { + uses mirror-tlvs; + } + } + + grouping count-tlv { + uses tlv; + leaf count { + type yang:counter32; + } + } + + grouping gauge-tlv { + uses tlv; + leaf count { + type yang:gauge64; + } + } + + grouping afi-safi-gauge-tlv { + uses tlv; + uses bgp-mp:bgp-table-type; + leaf count { + type yang:gauge64; + } + } + + grouping stat-tlvs { + container rejected-prefixes-tlv { + uses count-tlv; + description + "Stat Type = 0: (32-bit Counter) Number of prefixes rejected by + inbound policy."; + } + container duplicate-prefix-advertisements-tlv { + uses count-tlv; + description + "Stat Type = 1: (32-bit Counter) Number of (known) duplicate prefix + advertisements."; + } + container duplicate-withdraws-tlv { + uses count-tlv; + description + "Stat Type = 2: (32-bit Counter) Number of (known) duplicate + withdraws."; + } + container invalidated-cluster-list-loop-tlv { + uses count-tlv; + description + "Stat Type = 3: (32-bit Counter) Number of updates invalidated due + to CLUSTER_LIST loop."; + } + container invalidated-as-path-loop-tlv { + uses count-tlv; + description + "Stat Type = 4: (32-bit Counter) Number of updates invalidated due + to AS_PATH loop."; + } + container invalidated-originator-id-tlv { + uses count-tlv; + description + "Stat Type = 5: (32-bit Counter) Number of updates invalidated due + to ORIGINATOR_ID."; + } + container invalidated-as-confed-loop-tlv { + uses count-tlv; + description + "Stat Type = 6: (32-bit Counter) Number of updates invalidated due + to AS_CONFED loop."; + } + container adj-ribs-in-routes-tlv { + uses gauge-tlv; + description + "Stat Type = 7: (64-bit Gauge) Number of routes in Adj-RIBs-In."; + } + container loc-rib-routes-tlv { + uses gauge-tlv; + description + "Stat Type = 8: (64-bit Gauge) Number of routes in Loc-RIB."; + } + description + "Each counter is encoded as a TLV."; + container per-afi-safi-adj-rib-in-tlv { + uses afi-safi-gauge-tlv; + description + "Stat Type = 9: Number of routes in per-AFI/SAFI Adj-RIB-In. The + value is structured as: AFI (2 bytes), SAFI (1 byte), followed by + a 64-bit Gauge."; + } + container per-afi-safi-loc-rib-tlv { + uses afi-safi-gauge-tlv; + description + "Stat Type = 10: Number of routes in per-AFI/SAFI Loc-RIB. The + value is structured as: AFI (2 bytes), SAFI (1 byte), followed by + a 64-bit Gauge."; + } + container updates-treated-as-withdraw-tlv { + uses count-tlv; + description + "Stat Type = 11: (32-bit Counter) Number of updates subjected to + treat-as-withdraw treatment. "; + } + container prefixes-treated-as-withdraw-tlv { + uses count-tlv; + description + "Stat Type = 12: (32-bit Counter) Number of prefixes subjected to + treat-as-withdraw treatment. "; + } + container duplicate-updates-tlv { + uses count-tlv; + description + "Stat Type = 13: (32-bit Counter) Number of duplicate update + messages received. "; + } + } + + grouping timestamp { + leaf timestamp-sec { + type yang:timestamp; + default 0; + description + "Timestamp with seconds precision."; + } + leaf timestamp-micro { + type yang:timestamp; + default 0; + description + "Timestamp with microseconds precision."; + } + description + "The time when the encapsulated routes were received + (one may also think of this as the time when they were installed + in the Adj-RIB-In), expressed in seconds and microseconds since + midnight (zero hour), January 1, 1970 (UTC). If zero, the time is + unavailable. Precision of the timestamp is implementation- + dependent."; + } + + grouping peer { + leaf type { + type peer-type; + mandatory true; + } + leaf peer-distinguisher { + type union { + type bgp-t:route-distinguisher; + type binary { + length 8; + } + } + description + "This field is present to distinguish peers that + belong to one address domain from the other."; + } + leaf address { + type inet:ip-address; + mandatory true; + description + "The remote IP address associated with the TCP + session over which the encapsulated PDU was received. It is 4 + bytes long if an IPv4 address is carried in this field (with most + significant bytes zero filled) and 16 bytes long if an IPv6 + address is carried in this field."; + } + leaf as { + type inet:as-number; + mandatory true; + description + "The Autonomous System number of the peer from which the + encapsulated PDU was received. If a 16 bit AS number is stored in + this field [RFC4893], it should be padded with zeroes in the most + significant bits."; + } + leaf bgp-id { + type inet:ipv4-address; + mandatory true; + description + "The BGP Identifier of the peer from which the + encapsulated PDU was received."; + } + } + + grouping peer-header { + container peer-header { + uses peer; + uses timestamp; + leaf adj-rib-in-type { + type adj-rib-in-type; + mandatory true; + } + leaf ipv4 { + type boolean; + mandatory true; + description + "Indicates if peer's address is IPv4. If set to false address is IPv6."; + } + } + description + "The per-peer header follows the common header for most BMP messages. + The rest of the data in a BMP message is dependent on the Message + Type field in the common header."; + reference + "https://tools.ietf.org/html/rfc7854#section-4.2"; + } + + grouping stat { + container tlvs { + uses stat-tlvs; + } + } + + grouping open-msg { + uses bgp-msg:open-message { + augment "bgp-parameters/optional-capabilities/c-parameters" { + uses bgp-mp:mp-capabilities; + } + } + } + + grouping peer-up { + leaf local-address { + type inet:ip-address; + mandatory true; + description + "The local IP address associated with the peering + TCP session."; + } + leaf local-port { + type inet:port-number; + mandatory true; + description + "The local port number associated with the peering TCP + session."; + } + leaf remote-port { + type inet:port-number; + mandatory true; + description + "The remote port number associated with the peering + TCP session."; + } + container sent-open { + uses open-msg; + description + "The full OPEN message transmitted by the + monitored router to its peer."; + } + container received-open { + uses open-msg; + description + "The full OPEN message received by the + monitored router from its peer."; + } + container information { + uses string-informations; + } + } + + grouping peer-down { + leaf local-system-closed { + type boolean; + mandatory true; + description + "If set true, the local system closed the session. + Otherwise the remote system closed the session."; + } + choice data { + container notification { + uses bgp-msg:notify-message; + description + "BGP PDU containing the BGP + NOTIFICATION message as received from the peer."; + } + leaf fsm-event-code { + type uint16; + default 0; + description + "Containing the code corresponding to the FSM Event which caused + the system to close the session. + Two bytes both set to zero are used to indicate that no relevant + Event code is defined."; + } + } + } + + grouping initiation { + container tlvs { + uses initiation-tlvs; + } + } + + grouping termination { + container tlvs { + uses termination-tlvs; + } + } + + notification initiation-message { + uses initiation; + description + "The initiation message provides a means for the monitored router to + inform the monitoring station of its vendor, software version, and so on."; + reference + "https://tools.ietf.org/html/rfc7854#section-4.3"; + } + + notification termination-message { + uses termination; + description + "The termination message provides a way for a monitored router to + indicate why it is terminating a session."; + reference + "https://tools.ietf.org/html/rfc7854#section-4.5"; + } + + notification route-monitoring-message { + uses peer-header; + container update { + uses bgp-msg:update-message; + } + description + "Route Monitoring messages are used for initial synchronization of + ADJ-RIBs-In. They are also used for ongoing monitoring of received + advertisements and withdraws."; + reference + "https://tools.ietf.org/html/rfc7854#section-4.6"; + } + + notification route-mirroring-message { + uses peer-header; + uses mirror; + description + "Route Mirroring messages are used for verbatim duplication of + messages as received."; + reference + "https://tools.ietf.org/html/rfc7854#section-4.7"; + } + + notification stats-reports-message { + uses peer-header; + uses stat; + description + "These messages contain information that could be used by the + monitoring station to observe interesting events that occur on the + router."; + reference + "https://tools.ietf.org/html/rfc7854#section-4.8"; + } + + notification peer-down-notification { + uses peer-header; + uses peer-down; + description + "This message is used to indicate that a peering session was + terminated."; + reference + "https://tools.ietf.org/html/rfc7854#section-4.9"; + } + + notification peer-up-notification { + uses peer-header; + uses peer-up; + description + "The Peer Up message is used to indicate that a peering session has + come up (i.e., has transitioned into ESTABLISHED state)."; + reference + "https://tools.ietf.org/html/rfc7854#section-4.10"; + } +} diff --git a/experimental/odp/bmp-monitor.yang b/experimental/odp/bmp-monitor.yang new file mode 100644 index 000000000..258489f45 --- /dev/null +++ b/experimental/odp/bmp-monitor.yang @@ -0,0 +1,174 @@ +module bmp-monitor { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bmp-monitor"; + prefix "bmp-mon"; + + import bgp-rib { prefix rib; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import bmp-message { prefix bmp-msg; revision-date 2018-03-29; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import ietf-yang-types { prefix yang; revision-date 2013-07-15; } + + organization "Cisco Systems, Inc."; + contact "Milos Fabian "; + + description + "This module contains the base data model of a BMP monitor. + + Copyright (c)2015 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision "2015-05-12" { + description + "Initial revision."; + } + + typedef router-id { + description "Monitored router identified by IP address."; + type inet:ip-address; + } + + typedef monitor-id { + description "The name of BMP monitoring station instance."; + type string; + } + + typedef status { + type enumeration { + enum up; + enum down; + } + } + + grouping afi-safi-route-counter { + list afi-safi { + uses bgp-mp:bgp-table-type; + key "afi safi"; + leaf count { + type yang:gauge64; + } + } + } + + grouping peers { + list peer { + key "peer-id"; + leaf peer-id { + type rib:peer-id; + } + uses bmp-msg:peer; + leaf router-distinguisher { + type string; + } + container peer-session { + uses bmp-msg:peer-up; + leaf status { + type status; + } + uses bmp-msg:timestamp; + } + container stats { + leaf rejected-prefixes { + type yang:counter32; + } + leaf duplicate-prefix-advertisements { + type yang:counter32; + } + leaf duplicate-withdraws { + type yang:counter32; + } + leaf invalidated-cluster-list-loop { + type yang:counter32; + } + leaf invalidated-as-path-loop { + type yang:counter32; + } + leaf invalidated-originator-id { + type yang:counter32; + } + leaf invalidated-as-confed-loop { + type yang:counter32; + } + leaf adj-ribs-in-routes { + type yang:gauge64; + } + leaf loc-rib-routes { + type yang:gauge64; + } + container per-afi-safi-adj-rib-in-routes { + uses afi-safi-route-counter; + } + container per-afi-safi-loc-rib-routes { + uses afi-safi-route-counter; + } + leaf updates-treated-as-withdraw { + type yang:counter32; + } + leaf prefixes-treated-as-withdraw { + type yang:counter32; + } + leaf duplicate-updates { + type yang:counter32; + } + uses bmp-msg:timestamp; + } + container pre-policy-rib { + uses rib:rib; + } + container post-policy-rib { + uses rib:rib; + } + container mirrors { + leaf information { + type bmp-msg:mirror-information-code; + } + uses bmp-msg:timestamp; + } + } + } + + grouping routers { + list router { + key "router-id"; + leaf name { + type string; + } + leaf description { + type string; + } + leaf info { + type string; + } + leaf router-id { + type router-id; + } + leaf status { + type status; + } + uses peers; + } + } + + container bmp-monitor { + list monitor { + config false; + key "monitor-id"; + leaf monitor-id { + type monitor-id; + } + uses routers; + } + } +} diff --git a/experimental/odp/callhome-status.yang b/experimental/odp/callhome-status.yang new file mode 100644 index 000000000..da8f79ba4 --- /dev/null +++ b/experimental/odp/callhome-status.yang @@ -0,0 +1,24 @@ +module callhome-status{ + namespace "urn:opendaylight:callhome:device-status"; + prefix "callhome-status"; + + import odl-netconf-callhome-server { prefix callhome; revision-date "2016-11-09"; } + + revision 2017-01-12 { + description "Initial revision"; + } + + augment "/callhome:netconf-callhome-server/callhome:allowed-devices/callhome:device"{ + leaf device-status { + config false; + type enumeration { + enum CONNECTED; + enum FAILED_AUTH_FAILURE; + enum FAILED_NOT_ALLOWED; + enum FAILED; + enum DISCONNECTED; + } + default DISCONNECTED; + } + } +} diff --git a/experimental/odp/cloud-servicechain-state.yang b/experimental/odp/cloud-servicechain-state.yang new file mode 100755 index 000000000..873b5af99 --- /dev/null +++ b/experimental/odp/cloud-servicechain-state.yang @@ -0,0 +1,66 @@ +module cloud-service-chain-state { + namespace "urn:opendaylight:netvirt:cloud-servicechain:state"; + prefix "cloud-service-chain-state"; + + import yang-ext {prefix ext; revision-date "2013-07-09";} + import elan {prefix elan; revision-date "2015-06-02";} + + description + "Holds all cloud-servicechain state data"; + + revision "2016-07-11" { + description + "Initial revision"; + } + + container vpn-to-pseudo-port-list { + description "Makes a correspondence between VPNs and stateful information regarding + their corresponding VpnPseudoPort"; + list vpn-to-pseudo-port-data { + key vrf-id; + leaf vrf-id { + description "VPN's route distinguisher"; + type string; + } + leaf vpn-lport-tag { + description "Vpn Pseudo Logical Port Tag. There is only one VpnPseudoPort per VPN"; + type uint32; + } + leaf scf-tag { + description "SCF tag associated to Vlan Pseudo Logical Port Tag"; + type uint16; + } + leaf scf-table-id { + description "OF-Table Id in the SCF Pipeline to send packets to, depending on wether + the VpnPseudoPort has been used in Uplink or Downlink direction. + There is a restriction that states that a VpnPseudoPort can only + act as ingress port either in Uplink or in Downlink, but not both"; + type uint8; + } + } + } + + grouping elan-to-pseudo-port-data-list { + list elan-to-pseudo-port-data { + key "elan-lport-tag scf-tag"; + description "Relates elan-logical-port and scfTag"; + max-elements "unbounded"; + min-elements "0"; + + leaf elan-lport-tag { + description "Elan Pseudo Logical Port Tag"; + type uint32; + } + + leaf scf-tag { + description "SCF tag associated to Elan Pseudo Logical Port Tag"; + type uint32; + } + } + } + + augment "/elan:elan-instances/elan:elan-instance" { + ext:augment-identifier "elan-service-chain-state"; + uses elan-to-pseudo-port-data-list; + } +} diff --git a/experimental/odp/cluster-admin.yang b/experimental/odp/cluster-admin.yang new file mode 100644 index 000000000..a6ee3dd80 --- /dev/null +++ b/experimental/odp/cluster-admin.yang @@ -0,0 +1,312 @@ +module cluster-admin { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:cluster:admin"; + prefix "cluster-admin"; + + description + "This module contains YANG RPC definitions for administering a cluster."; + + revision "2015-10-13" { + description "Initial revision."; + } + + typedef data-store-type { + type enumeration { + enum config { + value 1; + } + enum operational { + value 2; + } + } + } + + grouping shard-operation-result { + leaf shard-name { + type string; + } + + leaf data-store-type { + type data-store-type; + } + + leaf succeeded { + type boolean; + } + + leaf error-message { + type string; + } + } + + grouping shard-result-output { + list shard-result { + key "shard-name data-store-type"; + uses shard-operation-result; + + description "The list of results, one per shard"; + } + } + + grouping member-voting-states-input { + list member-voting-state { + leaf member-name { + type string; + } + + leaf voting { + type boolean; + } + + description "The list of member voting states"; + } + } + + rpc add-shard-replica { + input { + leaf shard-name { + mandatory true; + type string; + description "The name of the shard for which to create a replica."; + } + + leaf data-store-type { + mandatory true; + type data-store-type; + description "The type of the data store to which the replica belongs"; + } + } + + description "Adds a replica of a shard to this node and joins it to an existing cluster. The shard must + already have a module configuration defined for it and there must already be a shard existing on + another node with a leader. This RPC first contacts peer member seed nodes searching for a shard. + When found, an AddServer message is sent to the shard leader and applied as described in the Raft + paper."; + } + + rpc remove-shard-replica { + input { + leaf shard-name { + mandatory true; + type string; + description "The name of the shard for which to remove the replica."; + } + + leaf member-name { + mandatory true; + type string; + description "The cluster member from which the shard replica should be removed"; + } + + leaf data-store-type { + mandatory true; + type data-store-type; + description "The type of the data store to which the replica belongs"; + } + } + + description "Removes an existing replica of a shard from this node via the RemoveServer mechanism as + described in the Raft paper."; + } + + rpc make-leader-local { + input { + leaf shard-name { + mandatory true; + type string; + description "The name of the shard for which to move the leader to the local node"; + } + + leaf data-store-type { + mandatory true; + type data-store-type; + description "The type of the data store to which the shard belongs"; + } + } + + description "Attempts to move the shard leader of the given module based shard to the local node. + The rpc returns a response after handling of the underlying MakeLeaderLocal message completes. + This operation fails if there is no current shard leader due to lack of network connectivity or + a cluster majority. In addition, if the local node is not up to date with the current leader, + an attempt is made to first sync the local node with the leader. If this cannot be achieved + within two election timeout periods the operation fails."; + } + + rpc add-prefix-shard-replica { + input { + leaf shard-prefix { + mandatory true; + type instance-identifier; + } + + leaf data-store-type { + mandatory true; + type data-store-type; + description "The type of the data store to which the replica belongs"; + } + } + + description "Adds a replica of a shard to this node and joins it to an existing cluster. There must already be + a shard existing on another node with a leader. This RPC first contacts peer member seed nodes + searching for a shard. When found, an AddServer message is sent to the shard leader and applied as + described in the Raft paper."; + } + + rpc remove-prefix-shard-replica { + input { + leaf shard-prefix { + mandatory true; + type instance-identifier; + } + leaf member-name { + mandatory true; + type string; + description "The cluster member from which the shard replica should be removed"; + } + + leaf data-store-type { + mandatory true; + type data-store-type; + description "The type of the data store to which the replica belongs"; + } + } + + description "Removes an existing replica of a prefix shard from this node via the RemoveServer mechanism as + described in the Raft paper."; + } + + rpc add-replicas-for-all-shards { + output { + uses shard-result-output; + } + + description "Adds replicas on this node for all currently defined shards. This is equivalent to issuing + an add-shard-replica RPC for all shards."; + } + + rpc remove-all-shard-replicas { + input { + leaf member-name { + mandatory true; + type string; + description "The cluster member from which the shard replicas should be removed"; + } + } + + output { + uses shard-result-output; + } + + description "Removes replicas for all shards on this node. This is equivalent to issuing + a remove-shard-replica for all shards and essentially removes this node from a cluster."; + } + + rpc change-member-voting-states-for-shard { + input { + leaf shard-name { + mandatory true; + type string; + description "The name of the shard for which to change voting state."; + } + + leaf data-store-type { + mandatory true; + type data-store-type; + description "The type of the data store to which the shard belongs"; + } + + uses member-voting-states-input; + } + + description "Changes the voting states, either voting or non-voting, of cluster members for a shard. + Non-voting members will no longer participate in leader elections and consensus but will be + replicated. This is useful for having a set of members serve as a backup cluster in case the + primary voting cluster suffers catastrophic failure. This RPC can be issued to any cluster member + and will be forwarded to the leader."; + } + + rpc change-member-voting-states-for-all-shards { + input { + uses member-voting-states-input; + } + + output { + uses shard-result-output; + } + + description "Changes the voting states, either voting or non-voting, of cluster members for all shards. + Non-voting members will no longer participate in leader elections and consensus but will be + replicated. This is useful for having a set of members serve as a backup cluster in case the + primary voting cluster suffers catastrophic failure. This RPC can be issued to any cluster member + and will be forwarded to the leader."; + } + + rpc flip-member-voting-states-for-all-shards { + output { + uses shard-result-output; + } + + description "Flips the voting states of all cluster members for all shards, such that if a member + was voting it becomes non-voting and vice versa."; + } + + rpc backup-datastore { + input { + leaf file-path { + type string; + description "The path and name of the file in which to store the backup."; + } + } + + description "Creates a backup file of the datastore state"; + } + + rpc get-shard-role { + input { + leaf shard-name { + mandatory true; + type string; + description "The name of the shard for which to create a replica."; + } + + leaf data-store-type { + mandatory true; + type data-store-type; + description "The type of the data store to which the replica belongs"; + } + } + + output { + leaf role { + type string; + description "Current role for the given shard, if not present the shard currently doesn't have a role"; + } + } + + description "Returns the current role for the requested module shard."; + } + + rpc get-prefix-shard-role { + input { + leaf shard-prefix { + mandatory true; + type instance-identifier; + } + + leaf data-store-type { + mandatory true; + type data-store-type; + description "The type of the data store to which the replica belongs"; + } + } + + output { + leaf role { + type string; + description "Current role for the given shard, if not present the shard currently doesn't have a role"; + } + } + + description "Returns the current role for the requested module shard."; + } +} \ No newline at end of file diff --git a/experimental/odp/coe-config.yang b/experimental/odp/coe-config.yang new file mode 100644 index 000000000..15c9e87ee --- /dev/null +++ b/experimental/odp/coe-config.yang @@ -0,0 +1,24 @@ +module coe-config { + yang-version 1; + namespace "urn:opendaylight:netvirt:coe:config"; + prefix "coe-config"; + + description + "Configuration for coe."; + + revision "2018-07-03" { + description + "Initial revision."; + } + + container coe-config { + config true; + leaf service-implementation-mode { + type enumeration { + enum "kube-proxy"; + enum "odl-kube-proxy"; + } + default "kube-proxy"; + } + } +} diff --git a/experimental/odp/config-bgp-listener-impl.yang b/experimental/odp/config-bgp-listener-impl.yang deleted file mode 100644 index fca83fd6b..000000000 --- a/experimental/odp/config-bgp-listener-impl.yang +++ /dev/null @@ -1,43 +0,0 @@ -module config-bgp-listener-impl { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:config:bgp:listener:impl"; - prefix "bgpl-impl"; - - import ietf-inet-types { prefix inet; } - import config { prefix config; revision-date 2013-04-05; } - - description - "This module contains the base YANG definitions for NS-OS - BGP listener implementation."; - - revision "2013-04-09" { - description - "Initial revision"; - reference "NS-OS System Design, version 1.2."; - } - - identity bgp-listener-impl { - base config:module-type; - } - - augment "/config:modules/config:module/config:state" { - case bgp-listener-impl { - when "/config:modules/config:module/config:type = 'bgp-listener-impl'"; - list peers { - config:inner-state-bean; - leaf port { - type inet:port-number; - default 179; - } - leaf core-size { - type uint32; - } - } - - leaf as-number { - mandatory true; - type inet:as-number; - } - } - } -} diff --git a/experimental/odp/core.yang b/experimental/odp/core.yang new file mode 100644 index 000000000..1e2ea2bf7 --- /dev/null +++ b/experimental/odp/core.yang @@ -0,0 +1,27 @@ +module core { + yang-version 1; + namespace "urn:opendaylight:k8s:core"; + prefix "core"; + + description + "This YANG module defines the kubernetes api core API."; + + revision "2018-12-05" { + description "Initial revision."; + } + + organization "OpenDaylight COE Group"; + + contact "COE Developers "; + + typedef protocol { + description + "The protocol (TCP, UDP, or SCTP) which traffic must match. + If not specified, this field defaults to TCP."; + type enumeration { + enum "TCP"; + enum "UDP"; + enum "SCTP"; + } + } +} diff --git a/experimental/odp/data-change-counter.yang b/experimental/odp/data-change-counter.yang new file mode 100644 index 000000000..28d0e25e2 --- /dev/null +++ b/experimental/odp/data-change-counter.yang @@ -0,0 +1,45 @@ +module data-change-counter { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-data-change-counter"; + prefix "bgp-dcc"; + + organization "Cisco Systems, Inc."; + contact "Milos Fabian "; + + description + "This module contains the base data model of a topology + data-change counter. The module servers for testing purposes. + + Copyright (c)2014 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2016-03-15" { + description + "Updated to support multiple instances."; + } + revision "2014-08-15" { + description + "Initial revision."; + } + + container data-change-counter { + config false; + + list counter { + leaf id { + type string; + } + key id; + + leaf count { + type uint32; + description + "The number of data changes."; + } + } + } + } diff --git a/experimental/odp/data-export-import-internal.yang b/experimental/odp/data-export-import-internal.yang new file mode 100644 index 000000000..bdff6a8cc --- /dev/null +++ b/experimental/odp/data-export-import-internal.yang @@ -0,0 +1,156 @@ +module data-export-import-internal { + yang-version 1; + namespace "urn:opendaylight:daexim-internal"; + prefix "internal"; + + import data-export-import { + prefix daexim; + revision-date 2016-09-21; + } + + organization + "Brocade BSC Team"; + + contact + "Anton Ivanov + David Spence + Shaleen Saxena + Richard Kosegi "; + + description + "This module contains YANG definitions for internal implementation of + the data export and import public API. + + Copyright (c) 2016 Brocade Communications Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2016-09-21" { + description "Initial revision."; + } + + typedef ipc-type { + description "A message type for internal (IPC) control messages."; + type enumeration { + enum schedule { + description "A control message to schedule export."; + value 0; + } + enum cancel { + description "A control message to cancel export."; + value 1; + } + } + } + + container import-operation-result { + config false; + description + "The result of the last attempted import operation, with associated + failure reason."; + uses daexim:arg-result; + uses daexim:arg-reason; + } + + container daexim { + config false; + container daexim-control { + description + "Export control, used to dispatch IPC to all node instances. + + When `task-type` is `schedule` then `run-at` must be specified + and `inclusions` and/or `exclusions` may be specified. If + both `inclusions` and `exclusions` are specified, then a module + is only exported if it is included and not also excluded. + + When `task-type` is `cancel` then `run-at`, `inclusions` and `exclusions` + are ignored. If there is an export running or scheduled then + `cancel` cancels it and resets status to its initial state."; + leaf task-type { + type ipc-type; + } + leaf run-at { + description + "The time, in absolute UTC time, at which to run the export, + as determined by the node handling the `schedule-export` + request."; + type daexim:absolute-time; + } + leaf run-on-node { + description + "Name of node where the export should be executed."; + type string; + } + leaf strict-data-consistency { + description + "Indicates if strict data consistency needs to be + maintained while exporting data. This value determines + how data is read from the datastore during export - + in one shot (true) or in smaller chunks (false)."; + type boolean; + default true; + } + uses daexim:split-by-module-options; + uses daexim:inclusions; + uses daexim:exclusions; + } + + grouping node-status { + leaf import-status { + description + "The import task status of the corresponding node."; + type daexim:status; + mandatory true; + } + leaf export-status { + description + "The export task status of the corresponding node."; + type daexim:status; + mandatory true; + } + leaf export-result { + description + "A human-readable string describing the cause, if this + export task failed."; + type string; + } + leaf import-result { + description + "A human-readable string describing the cause, if this + import task failed."; + type string; + } + leaf imported-at { + description "The restore time in absolute UTC time."; + type daexim:absolute-time; + } + leaf last-import-change { + description "Timestamp in absolute UTC time when import status was last changed."; + type daexim:absolute-time; + } + leaf last-export-change { + description "Timestamp in absolute UTC time when export status was last changed."; + type daexim:absolute-time; + } + uses daexim:files; + } + + container daexim-status { + description + "Data export/import, used to communicate task status."; + list node-status { + key "node-name"; + description "The nodes where the export is to be executed."; + leaf node-name { + description "Node name as used in cluster configuration"; + type string; + mandatory true; + } + uses node-status; + } + } + } +} diff --git a/experimental/odp/data-export-import.yang b/experimental/odp/data-export-import.yang new file mode 100644 index 000000000..c029b4b69 --- /dev/null +++ b/experimental/odp/data-export-import.yang @@ -0,0 +1,561 @@ +module data-export-import { + yang-version 1; + namespace "urn:opendaylight:daexim"; + prefix "daexim"; + + import ietf-yang-types { + prefix yang; + revision-date 2013-07-15; + } + + organization + "Brocade BSC Team"; + + contact + "Anton Ivanov + David Spence + Shaleen Saxena + Richard Kosegi "; + + description + "This module defines the data store export and import public API. + + Copyright (c) 2016 Brocade Communications Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + This feature is used to export the system data tree state, or part of, + to the system's file system. It may also be used to import the system + data tree state, or part of, from the system's file system. + + Connected devices whose data trees are accessed via a mount point of + this system are not considered part of the system for the purposes of + export. This mechanism does not export the data trees of such devices. + + Where a logical system comprises more than one physical node, export + files may be produced on one or more of the physical nodes. When + importing to a logical system, files may be required to be present on + one or more of the physical nodes. + + The `schedule-export` RPC is used to export at a specified time in the + future. The server clock (the clock of the host which handles this + module's RPC requests) is the authoritative time source for this module. + All times are specified as either absolute UTC or a relative offset from + the server clock; all time comparisons are performed against the server + clock. + + By default the whole system data state will be exported. Whole data + subtrees for a data store can be excluded from an export, with each + data subtree specified by module name. (This is the smallest unit of + exclusion: it is not possible to specify that only part of a module be + excluded for a data store.) A whole data store can be excluded from an + export by specifying a wildcard value for the module name. + + Excluding part of the system from an export may result in a partial + loss of integrity for the data in the exported files. For example, if + we have two modules, m1 and m2, where m2 has a leafref whose value + points to a data node in m1, and m1 is excluded, then the exported data + will contain a leafref which points to a node absent from the exported + files. + + An export outputs a models declaration file and one or more data files. + An implementation may export all data for a data store into one file + representing the whole data store, may split the data by module into + several files, or some combination of both. If data for a module is + exported into both a base file and a module-specific file, then the + module-specific data overrides the base data. + + The filename format for the models declaration file is: + + '_models.json' + + The filename formats for data files are: + + '_data_?_?.json' + '_data_?_?.json' + + Within these formats: + + '' is a fixed string which has the same value for a related + set of models declaration and data files; + + '' is the name of the data store to which the data relates; + + '' is the name of the module to which the data relates; + + '' is the name and revision of the module to which + the data relates. + + A models declaration file contains a JSON-encoded list of models, with + each model specified as an object with string values for 'module', + 'revision-date' and 'namespace' (module name, revision and namespace + respectively.) + + A data file contains a JSON-encoded object representing the data for a + store, optionally scoped to a module. The format of the object is as + per draft-ietf-netmod-yang-json. + + An import takes input from the set of locally available files, which + are named and structured as per export. + + When importing, a models declaration file declares the models that are + required in order to load the data files. This file is used by the + `immediate-import` RPC in order to check that the required models are + already loaded before any data modifications are made. If desired, this + test may be skipped. + + When importing data to a data store, the `immediate-import` RPC may be + instructed to first clear all existing data from that store. Data is + then imported to the data store from file. All data modifications for a + data store are performed in a transaction, with one transaction per + data store. The transaction ensures that inter-module data dependencies + within a data store are respected. Data is imported such that data from + files with a part or a part overrides any + data from a base file (one which does not specify a part or a + part.)"; + + revision "2016-09-21" { + description "Initial revision."; + } + + typedef absolute-time { + description "A type for absolute time values."; + type yang:date-and-time { + pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z'; + } + } + typedef relative-time { + description "A type for relative time values."; + type yang:timeticks; + } + + typedef data-store { + description + "A data store is specified as a string whose value is either a + formally declared enum label, or another string value which may be + supported by the implementation (but not formally declared in this + module.)"; + reference + "RFC 6020: YANG - A Data Modeling Language + Section 4.2.3. State Data"; + type union { + type enumeration { + enum config { + value 0; + description "The config data store."; + } + enum operational { + value 1; + description "The operational data store."; + } + } + type string; + } + } + + typedef data-store-scope { + description + "A type for communicating the scope of an operation that applies to + a set of data stores."; + type enumeration { + enum none { + value 0; + description + "No data stores are in scope for this operation."; + } + enum all { + value 1; + description + "All data stores are in scope for this operation."; + } + enum data { + value 2; + description + "Only data stores for which data is supplied are in scope + for this operation."; + } + } + } + + typedef status { + description + "A type for communicating the status of the export or export task."; + type enumeration { + enum initial { + value 0; + description + "An export has not been scheduled yet or a task has not yet + started."; + } + enum scheduled { + value 1; + description "An export or import task is scheduled to run."; + } + enum in-progress { + value 2; + description "An export or import task is in progress."; + } + enum complete { + value 3; + description "An export or import task completed successfully."; + } + enum boot-import-scheduled { + value 4; + description "An automatic-on-boot import will start as soon as the system is fully ready."; + } + enum boot-import-in-progress { + value 5; + description "An automatic-on-boot import is in progress."; + } + enum skipped { + value 6; + description "An export or task was skipped."; + } + enum inconsistent { + value -1; + description + "An export completed successfully, however a transaction was + executed while the export was in progress."; + } + enum failed { + value -2; + description "An export or import task did not complete successfully."; + } + enum boot-import-failed { + value -3; + description "An automatic-on-boot import failed."; + } + } + } + + typedef wildcard-star { + description + "A wildcard expression used to match everything in scope."; + type string { + pattern '\*'; + } + } + + grouping arg-result { + leaf result { + description + "A return value of true indicates that the request completed or + was actioned successfully: otherwise, the request failed."; + mandatory true; + type boolean; + } + } + + grouping arg-reason { + leaf reason { + description + "A human-readable string indicating why a request could not be + completed or actioned successfully."; + type string; + } + } + + grouping operation-status { + leaf status { + description "A human-readable string describing the cause, if this + task failed."; + type status; + } + uses arg-reason; + } + + grouping inclusions { + list included-modules { + description + "A list of module name, data store pairs to be included in an + export."; + key "module-name data-store"; + leaf module-name { + description + "The name of the module to be included."; + mandatory true; + type yang:yang-identifier; + } + leaf data-store { + description + "The data store to include for the corresponding module name."; + mandatory true; + type data-store; + } + } + } + + grouping exclusions { + list excluded-modules { + description + "A list of module name, data store pairs to be excluded from an + export. + + If any module name is specified using the wildcard string value, + then all modules are excluded for that data store. + + To exclude all data stores for a specific module, specify a + separate list item for each data store, with each item using the + same module name."; + key "module-name data-store"; + leaf module-name { + description + "The name of the module to exclude, or the wildcard string + value when excluding all modules."; + mandatory true; + type union { + type yang:yang-identifier; + type wildcard-star; + } + } + leaf data-store { + description + "The data store to exclude for the corresponding module name."; + mandatory true; + type data-store; + } + } + } + + grouping files { + leaf model-file { + description "The filename of the models declaration file."; + type string; + } + leaf-list data-files { + description "The filenames of the output data files."; + type string; + } + } + + grouping split-by-module-options { + leaf split-by-module { + description + "In context of data export, this flag indicate if exported data + should be split by module into separate files."; + type boolean; + default false; + } + } + + rpc schedule-export { + description + "A request to export the system at a specific time in the future. + The `run-at` time may be specified as either an absolute UTC + time or a relative offset from the server clock. Attempts to + schedule an export in the past will be rejected. + + Both `inclusions` and/or `exclusions` may be specified. + If only `inclusions` are specified, then only those explicitly + 'whitelisted' module/store pairs are exported, and no other ones. + If only only `exclusions` are specified, then all modules are exported + except the 'blacklisted' module/store pairs. + If both `inclusions` and `exclusions` are specified, then a module + is only exported if it is included (whilelisted) but not also excluded (blacklisted). + + Each file that is written will contain a JSON-encoded object that + contains module data from the corresponding data store: module data + is not included in the object for any module identified in the + exclusion list. (Each file that is written will contain at least an + empty JSON object.)"; + input { + leaf run-at { + description + "The time, as either an absolute UTC time or a relative + offset from the server clock, at which to run the export."; + mandatory true; + type union { + type absolute-time; + type relative-time; + } + } + leaf local-node-only { + description + "Indicates if export should be performed only on + the node receiving this request."; + type boolean; + } + leaf strict-data-consistency { + description + "Indicates if strict data consistency needs to be + maintained while exporting data. This value determines + how data is read from the datastore during export - + in one shot (true) or in smaller chunks (false)."; + type boolean; + default true; + } + uses split-by-module-options; + uses inclusions; + uses exclusions; + } + output { + uses arg-result; + uses arg-reason; + } + } + + rpc status-export { + description + "A request to check export status. + + If `status` has the value 'initial' then an export has not been + scheduled. + + If `status` has the value 'scheduled' then `run-at` indicates + the time at which the next export will run. + + If `status` has the value `in-progress` then: `run-at` indicates + the time at which the running export was scheduled to start; and, + `tasks` indicates activities that have been undertaken, that are + currently being executed and that will be performed. As such, + `tasks` serves as an indicator of activity progress and success. + + If `status` has any other value then: `run-at` indicates the + time at which the last export was scheduled to start; and, `tasks` + indicates the activities that were undertaken. + + If the `status` for any node in `nodes` is 'failed', then the + corresponding `reason` may be used to communicate any identified + cause."; + output { + uses operation-status; + leaf run-at { + description "The export time in absolute UTC time."; + type absolute-time; + } + list nodes { + description "A list of nodes and their status."; + key "node-name"; + leaf node-name { + description "The name of the node."; + mandatory true; + type string; + } + leaf last-change { + description "Timestamp in absolute UTC time when export status was last changed."; + type absolute-time; + } + uses operation-status; + uses files; + } + } + } + + rpc cancel-export { + description + "A request to cancel export. + + To cancel the export the server stops any running tasks (where + possible, immediately), clears any scheduled export time value and + releases associated resources. + + This RPC may be called at any time, whether there is an export in + progress, scheduled or not yet scheduled. The returned result is + true when the server has successfully cleared tasks, state and + resources: false on failure to do so. (Note that if there is no + export scheduled or running, then there is nothing for the server + to clear. Therefore the return result is true as the server cannot + fail.)"; + output { + uses arg-result; + uses arg-reason; + } + } + + rpc immediate-import { + description + "A request to import data from files already present in the file + system."; + input { + leaf check-models { + description + "If this flag is true then the server must read the models + declaration file and check that all declared models are + loaded before performing any data modifications. If the + application cannot read the models declaration file, the + file has bad content, or any declared model is not loaded, + then no data modifications are performed and a result of + false is returned. + + If this flag is false then this check is skipped. (If a + models declaration file is present it is ignored.)"; + type boolean; + default true; + } + leaf clear-stores { + description + "This flag allows for the existing data in data stores to be + deleted before restoring data from data files. When this + flag's value is 'all', all data in all stores is deleted. + When this flag's value is 'data', all data in the stores + for which data files are supplied is deleted. When this + flag's value is 'none', then no data is deleted."; + type data-store-scope; + default all; + } + leaf strict-data-consistency { + description + "Indicates if strict data consistency needs to be + maintained while importing data. This value determines + how data is written to the datastore during import - + in one shot (true) or in smaller chunks (false)."; + type boolean; + default true; + } + leaf file-name-filter { + description + "This pattern can be used to filter import data files. + Value must be valid regular expression. + When this pattern is not specified or it is empty string + then all files matching daexim naming format are accepted + for import. Otherwise files are accepted for import only + if they match this regular expression (path is not taken + into account, only file name)."; + type string; + } + } + output { + uses arg-result; + uses arg-reason; + } + } + + rpc status-import { + description + "A request to check last import status. + + If `status` has the value 'initial' then a import has not taken + place. + + For all other values of status `imported-at` indicates + the time at which the restore has taken place. + + List `nodes` holds status about restore operation on per-node basis. + "; + output { + uses operation-status; + list nodes { + description "A list of nodes and their status."; + key "node-name"; + leaf node-name { + description "The name of the node."; + mandatory true; + type string; + } + leaf imported-at { + description "The restore time in absolute UTC time."; + type absolute-time; + } + leaf last-change { + description "Timestamp in absolute UTC time when import status was last changed."; + type absolute-time; + } + uses operation-status; + uses files; + } + } + } +} diff --git a/experimental/odp/dhcp.yang b/experimental/odp/dhcp.yang new file mode 100644 index 000000000..b214b3946 --- /dev/null +++ b/experimental/odp/dhcp.yang @@ -0,0 +1,34 @@ +module vpnservice-dhcp { + namespace "urn:opendaylight:netvirt:dhcp"; + prefix "dhcp"; + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + + revision "2016-04-28" { + description "It provides required datastore containers to handle DHCP requests + coming from access or external tunnel ports"; + } + + container designated-switches-for-external-tunnels { + config true; + description "contains designated dataplane-node-identifier which handles DHCP requests for each external tunnel"; + list designated-switch-for-tunnel { + key "tunnel-remote-ip-address elan-instance-name"; + leaf tunnel-remote-ip-address { + description "remote end point ip address of external tunnel"; + type inet:ip-address; + } + leaf elan-instance-name { + description "elan name indicates l2 network domain"; + type string; + } + leaf dpId { + description "contains dataplane-node-identifier"; + type int64; + } + } + } +} diff --git a/experimental/odp/dhcp_allocation_pool.yang b/experimental/odp/dhcp_allocation_pool.yang new file mode 100644 index 000000000..4c30f804e --- /dev/null +++ b/experimental/odp/dhcp_allocation_pool.yang @@ -0,0 +1,74 @@ +module dhcp_allocation_pool { + namespace "urn:opendaylight:netvirt:dhcp_allocation_pool"; + prefix "dhcp_allocation_pool"; + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + + import ietf-yang-types { + prefix yang; + } + + revision "2016-12-14" { + description "It provides required datastore containers to handle DHCP requests + coming from access or external tunnel ports"; + } + + container dhcp_allocation_pool { + config true; + description "contains non-neutron DHCP allocation"; + list network { + key "network-id"; + leaf network-id { + description "network (elan-instance) id"; + type string; + } + + list allocations { + key "subnet"; + leaf subnet { + description "subnet for the dhcp to allocate ip addresses"; + type inet:ip-prefix; + } + + list allocation-instance { + key "mac"; + leaf mac { + description "requesting mac"; + type yang:phys-address; + } + leaf allocated-ip { + description "allocated ip address"; + type inet:ip-address; + } + } + } + + list allocation-pool { + key "subnet"; + leaf subnet { + description "subnet for the dhcp to allocate ip addresses"; + type inet:ip-prefix; + } + leaf allocate-from { + description "low allocation limit"; + type inet:ip-address; + } + leaf allocate-to { + description "high allocation limit"; + type inet:ip-address; + } + leaf gateway { + description "default gateway for dhcp allocation"; + type inet:ip-address; + } + leaf-list dns-servers { + description "dns server list"; + type inet:ip-address; + } + } + } + } +} diff --git a/experimental/odp/dhcpservice-api.yang b/experimental/odp/dhcpservice-api.yang new file mode 100644 index 000000000..711c3ef76 --- /dev/null +++ b/experimental/odp/dhcpservice-api.yang @@ -0,0 +1,50 @@ +module dhcpservice-api { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:dhcpservice:api"; + prefix "dhcpservice-api"; + + revision "2015-07-10" { + description + "Initial revision for DHCP Service module"; + } + + container interface-name-mac-addresses { + config false; + description + "Container to hold list of interface names and MAC address"; + + list interface-name-mac-address { + max-elements "unbounded"; + min-elements "0"; + key "interface-name"; + description + "Specifies the name of the interface"; + + leaf interface-name { + type string; + description + "The name of the interface."; + } + + leaf mac-address { + type string; + description + "The VM mac address for the interface."; + } + } + } + + container subnet-dhcp-port-data { + config true; + description + "Container to hold DHCP Neutron Port information allocated for the Subnet"; + list subnet-to-dhcp-port { + key "subnet-id"; + leaf subnet-id { type string;} + leaf port-name { type string;} + leaf port-fixedip { type string;} + leaf port-macaddress { type string;} + } + } + +} \ No newline at end of file diff --git a/experimental/odp/dhcpservice-config.yang b/experimental/odp/dhcpservice-config.yang new file mode 100644 index 000000000..c0b276849 --- /dev/null +++ b/experimental/odp/dhcpservice-config.yang @@ -0,0 +1,27 @@ +module dhcpservice-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:dhcpservice:config"; + prefix "dhcpservice-config"; + + description + "Service definition for dhcpservice project"; + + revision "2015-07-10" { + description + "Initial revision"; + } + + container dhcpservice-config { + leaf controller-dhcp-enabled { + description "Enable the dhcpservice on the controller"; + type boolean; + default false; + } + + leaf dhcp-dynamic-allocation-pool-enabled { + description "Enable dynamic allocation pool on controller dhcpservice"; + type boolean; + default false; + } + } +} diff --git a/experimental/odp/distributed-datastore-provider.yang b/experimental/odp/distributed-datastore-provider.yang new file mode 100644 index 000000000..af37589f9 --- /dev/null +++ b/experimental/odp/distributed-datastore-provider.yang @@ -0,0 +1,275 @@ +// vi: set smarttab et sw=4 tabstop=4: +module distributed-datastore-provider { + + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:config:distributed-datastore-provider"; + prefix "distributed-datastore-provider"; + + description + "This module contains the base YANG definitions for + the distributed datastore provider implementation"; + + revision "2014-06-12" { + description + "Initial revision."; + } + + typedef non-zero-uint32-type { + type uint32 { + range "1..max"; + } + } + + typedef operation-timeout-type { + type uint16 { + range "5..max"; + } + } + + typedef heartbeat-interval-type { + type uint16 { + range "100..max"; + } + } + + typedef percentage { + type uint8 { + range "0..100"; + } + } + + grouping data-store-properties { + leaf max-shard-data-change-executor-queue-size { + default 1000; + type non-zero-uint32-type; + description "The maximum queue size for each shard's data store data change notification executor."; + } + + leaf max-shard-data-change-executor-pool-size { + default 20; + type non-zero-uint32-type; + description "The maximum thread pool size for each shard's data store data change notification executor."; + } + + leaf max-shard-data-change-listener-queue-size { + default 1000; + type non-zero-uint32-type; + description "The maximum queue size for each shard's data store data change listener."; + } + + leaf max-shard-data-store-executor-queue-size { + default 5000; + type non-zero-uint32-type; + description "The maximum queue size for each shard's data store executor."; + } + + leaf shard-transaction-idle-timeout-in-minutes { + default 10; + type non-zero-uint32-type; + description "The maximum amount of time a shard transaction can be idle without receiving any messages before it self-destructs."; + } + + leaf shard-snapshot-batch-count { + default 20000; + type non-zero-uint32-type; + description "The minimum number of entries to be present in the in-memory journal log before a snapshot is to be taken."; + } + + leaf shard-snapshot-data-threshold-percentage { + default 12; + type percentage; + description "The percentage of Runtime.maxMemory() used by the in-memory journal log before a snapshot is to be taken"; + } + + + leaf shard-heartbeat-interval-in-millis { + default 500; + type heartbeat-interval-type; + description "The interval at which a shard will send a heart beat message to its remote shard."; + } + + leaf shard-election-timeout-factor { + default 20; + type non-zero-uint32-type; + description "The multiplication factor to be used to determine shard election timeout. The shard election timeout + is determined by multiplying shard-heartbeat-interval-in-millis with the shard-election-timeout-factor"; + } + + leaf operation-timeout-in-seconds { + default 5; + type operation-timeout-type; + description "The maximum amount of time for akka operations (remote or local) to complete before failing."; + } + + leaf shard-journal-recovery-log-batch-size { + default 1; + type non-zero-uint32-type; + description "The maximum number of journal log entries to batch on recovery for a shard before committing to the data store."; + } + + leaf shard-transaction-commit-timeout-in-seconds { + default 30; + type non-zero-uint32-type; + description "The maximum amount of time a shard transaction three-phase commit can be idle without receiving the next messages before it aborts the transaction"; + } + + leaf shard-transaction-commit-queue-capacity { + default 50000; + type non-zero-uint32-type; + description "The maximum allowed capacity for each shard's transaction commit queue."; + } + + leaf shard-commit-queue-expiry-timeout-in-seconds { + default 120; // 2 minutes + type non-zero-uint32-type; + description "The maximum amount of time a transaction can remain in a shard's commit queue waiting + to begin the CanCommit phase as coordinated by the broker front-end. Normally this should be + quick but latencies can occur in between transaction ready and CanCommit or a remote broker + could lose connection and CanCommit might never occur. Expiring transactions from the queue + allows subsequent pending transaction to be processed."; + } + + leaf shard-initialization-timeout-in-seconds { + default 300; // 5 minutes + type non-zero-uint32-type; + description "The maximum amount of time to wait for a shard to initialize from persistence + on startup before failing an operation (eg transaction create and change + listener registration)."; + } + + leaf shard-leader-election-timeout-in-seconds { + default 30; + type non-zero-uint32-type; + description "The maximum amount of time to wait for a shard to elect a leader before failing + an operation (eg transaction create)."; + } + + leaf shard-batched-modification-count { + default 1000; + type non-zero-uint32-type; + description "The number of transaction modification operations (put, merge, delete) to + batch before sending to the shard transaction actor. Batching improves + performance as less modifications messages are sent to the actor and thus + lessens the chance that the transaction actor's mailbox queue could get full."; + } + + leaf enable-metric-capture { + default false; + type boolean; + description "Enable or disable metric capture."; + } + + leaf bounded-mailbox-capacity { + default 1000; + type non-zero-uint32-type; + description "Max queue size that an actor's mailbox can reach"; + } + + leaf persistent { + default true; + type boolean; + description "Enable or disable data persistence"; + } + + leaf shard-isolated-leader-check-interval-in-millis { + default 5000; + type heartbeat-interval-type; + description "The interval at which the leader of the shard will check if its majority + followers are active and term itself as isolated"; + } + + leaf transaction-creation-initial-rate-limit { + default 100; + type non-zero-uint32-type; + description "The initial number of transactions per second that are allowed before the data store + should begin applying back pressure. This number is only used as an initial guidance, + subsequently the datastore measures the latency for a commit and auto-adjusts the rate limit"; + } + + leaf transaction-debug-context-enabled { + default false; + type boolean; + description "Enable or disable transaction context debug. This will log the call site trace for + transactions that fail"; + } + + leaf custom-raft-policy-implementation { + default ""; + type string; + description "A fully qualified java class name. The class should implement + org.opendaylight.controller.cluster.raft.policy.RaftPolicy. This java class should be + accessible to the distributed data store OSGi module so that it can be dynamically loaded via + reflection. For now let's assume that these classes to customize raft behaviors should be + present in the distributed data store module itself. If this property is set to a class which + cannot be found then the default raft behavior will be applied"; + } + + leaf shard-snapshot-chunk-size { + status deprecated; + default 2048000; + type non-zero-uint32-type; + description "When sending a snapshot to a follower, this is the maximum size in bytes for + a chunk of data."; + } + + leaf maximum-message-slice-size { + default 2048000; + type non-zero-uint32-type; + description "When fragmenting messages thru the akka remoting framework, this is the + maximum size in bytes for a message slice."; + } + + leaf use-tell-based-protocol { + default false; + type boolean; + description "Use a newer protocol between the frontend and backend. This feature is considered + exprerimental at this point."; + } + + leaf file-backed-streaming-threshold-in-megabytes { + default 128; + type non-zero-uint32-type; + description "When streaming large amounts of data, eg when sending a snapshot to a follower, this + is the threshold in terms of number of megabytes before it should switch from storing in memory to + buffering to a file."; + } + + leaf sync-index-threshold { + default 10; + type non-zero-uint32-type; + description "Permitted synchronization lag, expressed in terms of RAFT entry count. It a follower's + commitIndex trails the leader's journal by more than this amount of entries the follower + is considered to be out-of-sync."; + } + + leaf backend-aliveness-timer-interval-in-seconds { + default 30; + type non-zero-uint32-type; + description "The timer interval whereby, on expiration after response inactivity from the back-end, + the connection to the back-end is torn down and reconnection is attempted."; + } + + leaf frontend-request-timeout-in-seconds { + default 120; // 2 minutes + type non-zero-uint32-type; + description "The timeout interval whereby client frontend transaction requests are failed."; + } + + leaf frontend-no-progress-timeout-in-seconds { + default 900; // 15 minutes + type non-zero-uint32-type; + description "The timeout interval whereby the client front-end hasn't made progress with the + back-end on any request and terminates."; + } + + leaf initial-payload-serialized-buffer-capacity { + default 512; + type non-zero-uint32-type; + description "The initial buffer capacity, in bytes, to use when serializing message payloads."; + } + } + + container data-store-properties-container { + uses data-store-properties; + } +} diff --git a/experimental/odp/dot1q-types.yang b/experimental/odp/dot1q-types.yang new file mode 100644 index 000000000..594b9d6ce --- /dev/null +++ b/experimental/odp/dot1q-types.yang @@ -0,0 +1,237 @@ +module dot1q-types { + namespace "urn:ieee:params:xml:ns:yang:dot1q-types"; + prefix dot1q; + + organization + "Cisco Systems, Inc. + Customer Service + + Postal: 170 W Tasman Drive + San Jose, CA 95134 + + Tel: +1 1800 553-NETS + + E-mail: cs-yang@cisco.com"; + + contact + "Robert Wilton - rwilton@cisco.com"; + + description + "This module contains a collection of generally useful YANG types + that are specific to 802.1Q VLANs that can be usefully shared + between multiple models. + + Terms and Acronyms + + 802.1Q: IEEE 802.1Q VLANs + + VLAN (vlan): Virtual Local Area Network + "; + + revision 2015-06-26 { + description "Latest revision, changed namespace"; + + reference "Intended to be standardized IEEE 802.1"; + } + + typedef PCP { + type uint8 { + range "0..7"; + } + description + "Priority Code Point. PCP is a 3-bit field that refers to the + class of service applied to an 802.1Q VLAN tagged frame. The + field specifies a priority value between 0 and 7, these values + can be used by quality of service (QoS) to prioritize + different classes of traffic."; + reference "IEEE 802.1Q (2014)"; + } + + /* + * Defines what it means to be an 802.1Q VLAN Id, where values 0 + * and 4095 are reserved. + */ + typedef dot1q-vlan-id { + type uint16 { + range "1..4094"; + } + description "An 802.1Q VLAN Identifier"; + reference "IEEE 802.1Q (2014)"; + } + + /* + * Defines the supported IEEE 802.1Q types that can be used for + * VLAN tag matching. + */ + identity dot1q-tag-vlan-type { + description "Base identity from which all 802.1Q VLAN tag types + are derived from"; + } + + identity c-vlan { + base dot1q-tag-vlan-type; + description + "An 802.1Q Customer-VLAN tag, normally using the 0x8100 + Ethertype"; + } + + identity s-vlan { + base dot1q-tag-vlan-type; + description + "An 802.1Q Service-VLAN tag, using the 0x88a8 Ethertype + originally introduced in 802.1ad, and incorporated into + 802.1Q (2011)"; + } + + typedef dot1q-tag-type { + type identityref { + base "dot1q-tag-vlan-type"; + } + description "Identifies a specific 802.1Q tag type"; + reference "IEEE 802.1Q (2014)"; + } + + /* + * Defines the type used to represent ranges of VLAN Ids. + * + * Ideally we would model that as a list of VLAN Ids in YANG, but + * the model is easier to use if this is just represented as a + * string. + * + * This type is used to match an ordered list of VLAN Ids, or + * contiguous ranges of VLAN Ids. Valid VLAN Ids must be in the + * range 1 to 4094, and included in the list in non overlapping + * ascending order. + * + * E.g. "1, 10-100, 50, 500-1000" + */ + typedef dot1q-vlan-id-ranges { + type string { + pattern "([0-9]{1,4}(-[0-9]{1,4})?(,[0-9]{1,4}" + + "(-[0-9]{1,4})?)*)"; + } + description "A list of VLAN Ids, or non overlapping VLAN ranges, + in ascending order, between 1 and 4094"; + } + + /* + * A grouping which represents an 802.1Q VLAN tag, matching both + * the tag Ethertype and a single VLAN Id. The PCP and DEI fields + * in the 802.1Q tag are ignored for tag matching purposes. + */ + grouping dot1q-tag { + description "Grouping to allow configuration to identify a single + 802.1Q VLAN tag"; + container dot1q-tag { + description "Identifies an 802.1Q VLAN tag with an explicit + tag-type and a single VLAN Id"; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description "VLAN tag type"; + } + leaf vlan-id { + type dot1q-vlan-id; + mandatory true; + description "VLAN Id"; + } + } + } + + /* + * A grouping which represents an 802.1Q VLAN tag, matching both + * the tag Ethertype and a single VLAN Id or "any" to match on any + * VLAN Id. The PCP and DEI fields in the 802.1Q tag are ignored + * for tag matching purposes. + */ + grouping dot1q-tag-or-any { + description "Grouping to allow configuration to identify a single + 802.1Q VLAN tag or the 'any' value to match any VLAN + Id not matched by a more specific VLAN Id match"; + container dot1q-tag { + description "Identifies an 802.1Q VLAN tag with an explicit + tag-type and a single VLAN Id, or 'any' VLAN Id"; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description "VLAN tag type"; + } + leaf vlan-id { + type union { + type dot1q-vlan-id; + type enumeration { + enum "any" { + value 4096; + description + "Matches 'any' VLAN tag in the range 1 to 4094 that + is not matched by a more specific VLAN Id match"; + } + } + } + mandatory true; + description "VLAN Id or any"; + } + } + } + + /* + * A grouping which represents an 802.1Q tag that matches a range + * of VLAN Ids. The PCP and DEI fields in the 802.1Q tag are + * ignored for tag matching purposes. + */ + grouping dot1q-tag-ranges { + description "Grouping to allow configuration to identify an + 802.1Q VLAN tag that matches any VLAN Id within a + set of non overlapping VLAN Id ranges"; + container dot1q-tag { + description "Identifies an 802.1Q VLAN tag with an explicit + tag-type and and a range of VLAN Ids"; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description "VLAN tag type"; + } + leaf vlan-ids { + type dot1q-vlan-id-ranges; + mandatory true; + description "VLAN Ids"; + } + } + } + + /* + * A grouping which represents an 802.1Q VLAN tag, matching both + * the tag Ethertype and a single VLAN Id, ordered list of ranges, + * or "any" to match on any VLAN Id. The PCP and DEI fields in the + * 802.1Q tag are ignored for tag matching purposes. + */ + grouping dot1q-tag-ranges-or-any { + description "Grouping to allow configuration to identify an + 802.1Q VLAN tag that matches any specific VLAN Id + within a set of non overlapping VLAN Id ranges, or + the 'any' value to match any VLAN Id"; + container dot1q-tag { + description "Identifies an 802.1Q VLAN tag with an explicit + tag-type, an ordered list of VLAN Id ranges, or + 'any' VLAN Id"; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description "VLAN tag type"; + } + leaf vlan-id { + type union { + type dot1q-vlan-id-ranges; + type enumeration { + enum "any" { + description "Matches 'any' VLAN tag in the range 1 to + 4094"; + } + } + } + mandatory true; + description "VLAN Ids or any"; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/dsbenchmark.yang b/experimental/odp/dsbenchmark.yang new file mode 100644 index 000000000..f8394e8ae --- /dev/null +++ b/experimental/odp/dsbenchmark.yang @@ -0,0 +1,227 @@ +module dsbenchmark { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:dsbenchmark"; + prefix "dsbenchmark"; + + revision "2015-01-05" { + description "Initial revision of dsbenchmark model"; + } + container test-exec { + config true; + + list outer-list { + key id; + leaf id { + type int32; + } + choice outer-choice { + case one { + leaf one { + type string; + } + } + case two-three { + leaf two { + type string; + } + leaf three { + type string; + } + } + } + list inner-list { + key name; + leaf name { + type int32; + } + leaf value { + type string; + } + } + } + } + + container test-status { + leaf execStatus { + type enumeration { + enum "idle" { + value 1; + } + enum "executing" { + value 2; + } + } + config false; + mandatory true; + description + "Indicates whether a test run is in progress; only one test can run at a time"; + } + leaf testsCompleted { + type uint32; + default 1; + description + "Number of completed test runs"; + } + } + + rpc start-test { + description + "Start a new data store write test run"; + + input { + leaf operation { + mandatory true; + type enumeration { + enum "PUT" { + value 1; + description + "The put operation"; + } + enum "MERGE" { + value 2; + description + "The merge operation"; + } + enum "DELETE" { + value 3; + description + "Delete items from a list sorted in the data store"; + } + enum "READ" { + value 4; + description + "The read operation"; + } + } + description + "Type of the transaction operation to benchmark"; + } + + leaf data-format { + mandatory true; + type enumeration { + enum "BINDING-AWARE" { + value 1; + } + enum "BINDING-INDEPENDENT" { + value 2; + } + } + description + "Data format:-binding-aware or binding-independent"; + } + + leaf transaction-type { + mandatory true; + type enumeration { + enum "SIMPLE-TX" { + value 1; + } + enum "TX-CHAINING" { + value 2; + } + } + description + "Data format:-binding-aware or binding-independent"; + } + + leaf data-store { + mandatory true; + type enumeration { + enum "CONFIG" { + value 1; + } + enum "OPERATIONAL" { + value 2; + } + enum "BOTH" { + value 3; + } + } + } + leaf outerElements { + type uint32; + default 100000; + description + "Number of elements in the OuterList"; + } + leaf innerElements { + type uint32; + default 1; + description + "Number of elements in the InnerList"; + } + leaf putsPerTx { + type uint32; + default 1; + description + "Number of write operations (PUT, MERGE, or DELETE) + per transaction submit"; + } + leaf listeners { + type uint32; + default 0; + description + "Number of data tree change listeners listening for + changes on the test exec tree."; + } + } + output { + leaf status { + mandatory true; + type enumeration { + enum "OK" { + value 1; + } + enum "FAILED" { + value 2; + } + enum "TEST-IN-PROGRESS" { + value 3; + } + } + description + "Indicates whether the test finished successfuly"; + } + leaf listBuildTime { + type int64; + units microseconds; + description + "The time it took to build the list of lists"; + } + leaf execTime { + type int64; + units microseconds; + description + "The time it took to execute all transactions"; + } + leaf txOk { + type uint32; + description + "The number of successful transactions"; + } + leaf txError { + type uint32; + description + "The number of failed transactions"; + } + leaf ntfOk { + type uint32; + description + "The number of successfully received data tree change + notifications"; + } + leaf dataChangeEventsOk { + type uint32; + description + "The number of data change events received in data tree + change notifications"; + } + } + } + + rpc cleanup-store { + description + "Delete data in the test-exec container that may have been left behind from a previous test run"; + } +} diff --git a/experimental/odp/ebgp-bfd.yang b/experimental/odp/ebgp-bfd.yang new file mode 100644 index 000000000..e391900ef --- /dev/null +++ b/experimental/odp/ebgp-bfd.yang @@ -0,0 +1,56 @@ +module bfd { + + yang-version "1"; + namespace "urn:ericsson:params:xml:ns:yang:ebfd"; + prefix "ericsson-bfd"; + organization + "Ericsson Bangalore"; + contact + "Ericsson Bangalore"; + description + "BFD configuration model for monitoring DC-Gwy control path, + Ericsson's implementation of Opendaylight inter-DC communication"; + revision "2019-02-19" { + } + + container bfd-config { + config "true"; + + leaf bfd-enabled { + description "is BFD enabled"; + type boolean; + default false; + } + leaf detect-mult { + type uint32; + default 3; + description "The number of packets that have to be missed + in a row to declare the session to be down."; + } + leaf min-rx { + type uint32 { + range "50..50000"; + } + default 500; + description "The shortest interval, in milli-seconds, at + which this BFD session offers to receive + BFD control messages. Defaults to 500"; + } + leaf min-tx { + type uint32 { + range "1000 .. 60000"; + } + default 6000; + description "The shortest interval, in milli-seconds, + at which this BFD session is willing to + transmit BFD control messages. Defaults + to 6000"; + } + leaf multihop { + type boolean; + default true; + description "Value of True indicates suppport for BFD multihop"; + } + } +} + diff --git a/experimental/odp/ebgp.yang b/experimental/odp/ebgp.yang new file mode 100644 index 000000000..26cfeff45 --- /dev/null +++ b/experimental/odp/ebgp.yang @@ -0,0 +1,422 @@ +module ebgp { + + yang-version "1"; + + // namespace + namespace "urn:ericsson:params:xml:ns:yang:ebgp"; + + prefix "ericsson-bgp"; + + // import some basic inet types + import ietf-inet-types { prefix inet; revision-date "2013-07-15"; } + + // meta + organization + "Ericsson Bangalore"; + + contact + "Ericsson Bangalore"; + + description + "BGP configuration model for Ericsson's implementation of + Opendaylight L3VPN"; + + revision "2015-09-01" { + } + + + typedef tcp-md5-signature-password-type { + type string { + length 1..80; + } // subtype string + description + "The shared secret used by TCP MD5 Signature Option. The length is + limited to 80 chars because A) it is identified by the RFC as current + practice and B) it is the maximum length accepted by Quagga + implementation."; + reference "RFC 2385"; + } // typedef tcp-md5-signature-password-type + + + grouping tcp-security-option-grouping { + description "TCP security options."; + choice tcp-security-option { + description "The tcp security option in use, if any."; + + case tcp-md5-signature-option { + description "The connection uses TCP MD5 Signature Option."; + reference "RFC 2385"; + leaf tcp-md5-signature-password { + type tcp-md5-signature-password-type; + description "The shared secret used to sign the packets."; + } // leaf tcp-md5-signature-password + } // case tcp-md5-signature-option + + } // choice tcp-security-option + } // grouping tcp-security-option-grouping + + + container bgp { + config "true"; + container config-server { + leaf host { + type inet:ipv4-address; + mandatory "true"; + } + leaf port { + type uint32; + mandatory "true"; + } + } + + container as-id { + leaf local-as { + type uint32; + mandatory "true"; + } + leaf router-id { + type inet:ip-address; + } + leaf stalepath-time { + type uint32; + default 360; + } + leaf announce-fbit { + type boolean; + } + leaf keepalive { + type uint32; + description "BGP keepalive timer value"; + default 60; + } + leaf holdtime { + type uint32; + description "BGP hold time value"; + default 180; + } + } + + container graceful-restart { + leaf stalepath-time { + type uint32; + mandatory "true"; + } + } + + container logging { + leaf file { + type string; + } + leaf level { + type string; + } + } + + list neighbors { + key "address"; + leaf address { + type inet:ipv4-address; + mandatory "true"; + } + leaf remote-as { + type uint32; + mandatory "true"; + } + uses tcp-security-option-grouping; + container ebgp-multihop { + leaf nhops { + type uint32; + } + leaf peer-ip { + type leafref { + path "/ericsson-bgp:bgp/neighbors/address"; + } + } + } + container update-source { + leaf source-ip { + type inet:ipv4-address; + } + leaf peer-ip { + type leafref { + path "/ericsson-bgp:bgp/neighbors/address"; + } + } + } + list address-families { + key "afi safi"; + leaf afi { + type uint32; + mandatory "true"; + } + leaf safi { + type uint32; + mandatory "true"; + } + leaf peer-ip { + type leafref { + path "/ericsson-bgp:bgp/neighbors/address"; + } + } + } //addr-families + } // neighbhors + + list networks { + key "rd prefix-len"; + leaf rd { + type string; + } + leaf prefix-len { + type string; + } + leaf afi { + type uint32; + } + leaf macaddress { + description "Mac address of the advertised host."; + type string; + } + leaf bgp_control_plane_type{ + description "Specifies the route type"; + type bgp_control_plane_type; + mandatory "true"; + } + leaf nexthop { + type inet:ipv4-address; + } + leaf label { + type uint32; + } + leaf ethtag { + description "Ethernet Tag Id to Identify a broadcast domain in an EVPN Instance"; + type uint32; + } + leaf esi { + description "Ethernet Segment Identifier."; + type string; + } + leaf encap-type { + description "Encapsulation types supported as per RFC 5512."; + type encap_type; + } + leaf routermac { + description "Gateway Mac Address for the advertised host."; + type string; + } + leaf l3vni { + description "VxLAN Identifier."; + type uint32; + } + + leaf l2vni { + type uint32; + description "l2vni for EVPN RT2 route advertisement"; + } + + } // networks + + list vrfs { + key "rd"; + leaf rd { + type string; + } + list address-families-vrf { + key "afi safi"; + leaf afi { + type uint32; + mandatory "true"; + } + leaf safi { + type uint32; + mandatory "true"; + } + } + leaf-list import-rts { + type string; + } + leaf-list export-rts { + type string; + } + } + + typedef layer_type + { + description + "This value represents the layer to which + a VRF entry belongs to in IP protocol."; + type enumeration + { + enum LAYER_2 + { + value "1"; + description "VRF represents a MAC-VRF."; + } + enum LAYER_3 + { + value "2"; + description "VRF represents an IP-VRF."; + } + } + } + + typedef address_family + { + description + "This value represents the address family + a VRF entry supports"; + type enumeration + { + enum IPV_4 + { + value "1"; + description "VRF represents IPv4 VRF."; + } + enum IPV_6 + { + value "2"; + description "VRF represents an IPv6-VRF."; + } + enum L2VPN + { + value "3"; + description "VRF represents a MAC-VRF."; + } + } + } + + typedef encap_type + { + description + "Encapsulation types supported as per + RFC 5512 - The BGP Encapsulation Subsequent + Address Family Identifier (SAFI) and the + BGP Tunnel Encapsulation Attribute"; + type enumeration + { + enum L2TPV3_OVER_IP + { + value "1"; + description "L2TPV3_OVER_IP"; + } + enum GRE + { + value "2"; + description "GRE"; + } + enum IP_IN_IP + { + value "7"; + description "IP_IN_IP"; + } + enum VXLAN + { + value "8"; + description "VXLAN"; + } + enum MPLS + { + value "10"; + description "MPLS"; + } + } + } + + typedef bgp_control_plane_type + { + description + "protocol type - used to know which route type is referred to"; + type enumeration + { + enum PROTOCOL_LU + { + value "1"; + description "PROTOCOL_LU"; + } + enum PROTOCOL_L3VPN + { + value "2"; + description "PROTOCOL_L3VPN"; + } + enum PROTOCOL_EVPN + { + value "3"; + description "PROTOCOL_EVPN"; + } + enum PROTOCOL_ANY + { + value "4"; + description "PROTOCOL_ANY"; + } + } + } + + leaf vpn-type + { + description + "The type of the VPN Instance. + L3 indicates it is an L3VPN. + L2 indicates it is EVPN"; + type enumeration + { + enum l3 + { + value "0"; + description "L3VPN"; + } + enum l2 + { + value "1"; + description "EVPN"; + } + } + default "l3"; + } + + list multipath { + + key "afi safi"; + + leaf afi { + type uint32; + mandatory "true"; + } + + leaf safi { + type uint32; + mandatory "true"; + } + + leaf multipath-enabled { + type boolean; + mandatory "true"; + } + } //multipath + + list vrfMaxpath { + key "rd"; + + leaf rd { + type string; + } + + leaf maxpaths { + type uint16; + } + } //vrfMaxpaths + + container dcgw-tep-list { + list dcgw-tep { + key "dc-gw-ip"; + description "mapping: DC-Gwy ip <> TEP ip"; + + leaf dc-gw-ip { + type string; + } + leaf-list tep-ips { + type string; + } + } + } + + } // bgp +} diff --git a/experimental/odp/elan-statistics.yang b/experimental/odp/elan-statistics.yang new file mode 100644 index 000000000..ab47b9a1e --- /dev/null +++ b/experimental/odp/elan-statistics.yang @@ -0,0 +1,32 @@ +module elan-statistics { + namespace "urn:opendaylight:netvirt:elan:statistics"; + prefix elan-stats; + + import ietf-interfaces { + prefix if; + } + + import interface-statistics { + prefix if-stats; + } + + revision "2015-08-24" { + description "YANG model describes rpc to retrieve the different + ELAN interface statistics ie. packet/byte counts"; + } + + rpc get-elan-interface-statistics { + input { + leaf interface-name { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + } + output { + container stat-result { + uses if-stats:stat-reply; + } + } + } +} diff --git a/experimental/odp/elan.yang b/experimental/odp/elan.yang new file mode 100644 index 000000000..e2adc593b --- /dev/null +++ b/experimental/odp/elan.yang @@ -0,0 +1,351 @@ +module elan { + + namespace "urn:opendaylight:netvirt:elan"; + prefix elan; + + import yang-ext {prefix ext; revision-date "2013-07-09";} + + import ietf-interfaces { + prefix if; + } + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + import ietf-yang-types { + prefix yang; + } + + + revision "2015-06-02" { + description "elan module"; + } + + /* + * elan instance view. + */ + container elan-instances { + description + "elan instances configuration parameters. Elan instances support both the VLAN and VNI based elans."; + + list elan-instance { + max-elements "unbounded"; + min-elements "0"; + key "elan-instance-name"; + description + "Specifies the name of the elan instance. It is a string of 1 to 31 + case-sensitive characters."; + leaf elan-instance-name { + type string; + description "The name of the elan-instance."; + } + leaf elan-tag { + type uint32; + description "ELAN unique identifier which is unique across all the tenants. + This will be created internally and if provided, the value will be discarded."; + } + leaf segment-type { + description "Optional. Network segment type. It's mandatory when there are external + devices participating in the ELAN"; + type identityref { + base segment-type-base; + } + } + leaf segmentation-id { + type uint32; + description "Optional. Isolated segment on the physical network. For example, + if segment-type is vlan, this ID is a vlan identifier. If segment-type + is vxlan, this ID is a vni"; + } + leaf physical-network-name { + type string; + description "Optional. The name of the physical network attached to the ELAN."; + } + leaf external { + description "indicates whether this is an external network"; + type boolean; + default false; + } + leaf mac-timeout { + type uint32 { + range "0..65535"; + } + description "MAC Table entry ageing time in seconds. + A value of 0 will indicate that the MAC will never expire."; + } + leaf description { + description + "A textual description of elan instance, the elan instance description + helps users memorize the elan instance."; + + type string { + length "1..254"; + } + } + list elan-segments { + description "List of provider network(s) associated with this ELAN."; + key segmentation-index; + leaf segmentation-index { + description "A hidden counter to act as a key, because segmentation id + is not required."; + type uint32; + } + leaf physical-network-name { + description "Optional. The name of the physical network attached to the ELAN."; + type string; + } + leaf segment-type { + description "Optional. Network segment type. It's mandatory when there are external + devices participating in the ELAN"; + type identityref { + base segment-type-base; + } + } + leaf segmentation-id { + description "Optional. Isolated segment on the physical network. For example, + if segment-type is vlan, this ID is a vlan identifier. If segment-type + is vxlan, this ID is a vni"; + type uint32; + } + } + list external-teps { + description "Optional. The external tep ips of the nodes where this elan is present"; + key tep-ip; + leaf tep-ip { + type inet:ip-address; + } + leaf nodeid { + type string; + } + } + } + } + + /* + * Binding Interfaces to a elan Instance. + */ + container elan-interfaces { + description + "elan is enabled on interfaces."; + + list elan-interface { + key "name"; + max-elements "unbounded"; + min-elements "0"; + leaf name { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + leaf elan-instance-name { + mandatory true; + type string; + } + + list static-mac-entries { + key "mac-address"; + leaf mac-address { + type yang:phys-address; + } + leaf ip-prefix { + type inet:ip-address; + } + } + + leaf description { + description + "A textual description of elan port, the elan port description + helps users memorize the elan port."; + + type string { + length "1..254"; + } + } + } + } + + /* operational data stores */ + container elan-state { + config false; + description + "operational state of elans."; + + list elan { + key "name"; + description "The list of interfaces on the device."; + max-elements "unbounded"; + min-elements "0"; + leaf name { + type string; + description + "The name of the elan-instance."; + } + leaf-list elan-interfaces{ + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + description "Interfaces connected to this elan instance."; + } + } + } + + grouping forwarding-entries { + description "Details of the MAC entries"; + + list mac-entry { + key "mac-address"; + description "Details of a MAC address"; + max-elements "unbounded"; + min-elements "0"; + + leaf mac-address { + type yang:phys-address; + } + + leaf interface { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + + leaf controllerLearnedForwardingEntryTimestamp { + type uint64; + } + + leaf isStaticAddress { + type boolean; + } + + leaf ip-prefix { + type inet:ip-address; + } + } + } + + container elan-forwarding-tables { + config false; + description + "MAC tables for each elan instance"; + + list mac-table { + max-elements "unbounded"; + min-elements "0"; + key "elan-instance-name"; + description + "Specifies the name of the elan instance. It is a string of 1 to 31 + case-sensitive characters."; + + leaf elan-instance-name { + type string; + description + "The name of the elan-instance."; + } + + uses forwarding-entries; + } + } + + container elan-interface-forwarding-entries { + config false; + + list elan-interface-mac { + key "elan-interface"; + description "All the MAC addresses learned on a particular elan interface"; + max-elements "unbounded"; + min-elements "0"; + leaf elan-interface { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + + uses forwarding-entries; + } + } + + container elan-dpn-interfaces { + config false; + + list elan-dpn-interfaces-list { + key "elan-instance-name"; + description "All the dpns of this elan and all the ports of the corresponding dpns"; + max-elements "unbounded"; + min-elements "0"; + + leaf elan-instance-name { + type string; + description "The name of the elan-instance."; + } + + list dpn-interfaces { + key "dp-id"; + description "A DPN in which the elan spans across"; + max-elements "unbounded"; + min-elements "0"; + + leaf dp-id { + type uint64; + } + + leaf-list interfaces { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + } + } + } + + container elan-tag-name-map { + config false; + + list elan-tag-name { + key elan-tag; + leaf elan-tag { + type uint32; + } + + leaf name { + type string; + description + "The name of the elan-instance."; + } + } + } + + augment "/elan:elan-instances/elan:elan-instance" { + ext:augment-identifier "evpn-augmentation"; + leaf evpn-name { + type string; + } + + leaf l3vpn-name { + type string; + } + } + + identity segment-type-base { + description "Base entity for all network segment types"; + } + + identity segment-type-flat { + description "Flat network segment type"; + base segment-type-base; + } + + identity segment-type-vlan { + description "VLAN network segment type"; + base segment-type-base; + } + + identity segment-type-vxlan { + description "VxLAN network segment type"; + base segment-type-base; + } + + identity segment-type-gre { + description "GRE network segment type"; + base segment-type-base; + } + +} diff --git a/experimental/odp/elanmanager-config.yang b/experimental/odp/elanmanager-config.yang new file mode 100644 index 000000000..9ba91afa9 --- /dev/null +++ b/experimental/odp/elanmanager-config.yang @@ -0,0 +1,80 @@ +module elan-config { + yang-version 1; + namespace "urn:opendaylight:netvirt:elan:config"; + prefix "elan-config"; + + description + "Configuration for elanmanager"; + + revision "2015-07-10" { + description + "Initial revision"; + } + + container elan-config { + config true; + leaf auto-create-bridge { + description "If true, auto-create default bridge"; + type boolean; + default true; + } + leaf int-bridge-gen-mac { + description "If true, generate a mac, else use the bridge generated mac"; + type boolean; + default true; + } + leaf controller-max-backoff { + description "max_backoff in milliseconds for controller configured + on OVS Bridge. A null value means use switch default"; + type uint32 { + range "1000..max"; + } + } + leaf controller-inactivity-probe { + description "inactivity_probe timeout in milliseconds for + controller configured on OVS Bridge. + null - Use switch default + 0 - Disable inactivity probes"; + type uint32; + } + leaf temp-smac-learn-timeout { + description "Temporary source MAC learning timeout"; + type uint16; + default 10; + } + leaf arp-punt-timeout { + description "hard timeout value for learnt flows for arp punts (unit - seconds). + To turn off the rate limiting and installation of learnt flows, it should be set to 0"; + type uint32; + default 5; + } + leaf punt-lldp-to-controller { + description "Determines whether LLDP are punt to controller or dropped"; + type boolean; + default false; + } + leaf auto-config-transport-zones { + description "Determines whether transport zones should be automatically created/updated"; + type boolean; + default false; + } + leaf use-of-tunnels { + type boolean; + default false; + } + leaf openstack-vni-semantics-enforced { + type boolean; + default true; + } + leaf l2gw-stale-vlan-cleanup-delay-secs { + description "Stale vlan bindings cleanup delay after the southbound node is disconnected"; + type uint16; + default 900; + } + leaf l2gw-logical-switch-delay-secs { + description "The delay after which logical switch is deleted after the l2gw connection is deleted"; + type uint16; + default 20; + } + } +} diff --git a/experimental/odp/entity-owners.yang b/experimental/odp/entity-owners.yang new file mode 100644 index 000000000..0f37e135a --- /dev/null +++ b/experimental/odp/entity-owners.yang @@ -0,0 +1,47 @@ +module entity-owners { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:clustering:entity-owners"; + prefix "entity-owners"; + + description + "This module contains the base YANG definitions for + an implementation of the EntityOwnershipService which stores + entity ownership information in the data store"; + + revision "2015-08-04" { + description "Initial revision."; + } + + container entity-owners { + + // A list of all entities grouped by type + list entity-type { + key type; + leaf type { + type string; + } + + list entity { + key id; + + leaf id { + type instance-identifier; + } + + leaf owner { + type string; + } + + // A list of all the candidates that would like to own the entity + list candidate { + key name; + ordered-by user; + + leaf name { + type string; + } + } + } + } + } +} diff --git a/experimental/odp/etree.yang b/experimental/odp/etree.yang new file mode 100644 index 000000000..9693b0186 --- /dev/null +++ b/experimental/odp/etree.yang @@ -0,0 +1,68 @@ +module etree { + namespace "urn:opendaylight:netvirt:elan:etree"; + prefix elan-etree; + + import elan {prefix elan;} + + import yang-ext {prefix ext; revision-date "2013-07-09";} + + import hwvtep {prefix hwvtep;} + + import network-topology {prefix "topo"; revision-date "2013-10-21"; } + + revision "2016-06-14" { + description "etree module"; + } + + typedef etree-leaf-tag { + type uint32; + description "Unique identifier across all the tenants for the ETREE's leafs. + Each ETree instance has 2 unique tags: elan-tag for roots and etree-leaf-tag for leafs."; + } + + augment "/elan:elan-interfaces/elan:elan-interface" { + ext:augment-identifier "etree-interface"; + leaf etree-interface-type { + type enumeration { + enum leaf; + enum root; + } + description "Etree's type of the interface - Leaf or Root."; + } + } + + augment "/elan:elan-instances/elan:elan-instance" { + ext:augment-identifier "etree-instance"; + leaf etree-leaf-tag-val { + type etree-leaf-tag; + } + } + + augment "/elan:elan-tag-name-map/elan:elan-tag-name" { + ext:augment-identifier "etree-leaf-tag-name"; + leaf etree-leaf-tag { + type etree-leaf-tag; + } + } + + container etree-logical-switches { + description "logical switch entity in a L2GW device which belongs to the etree network"; + list etree-logical-switch { + key "name"; + max-elements "unbounded"; + min-elements "0"; + leaf name { + type leafref { + path "/hwvtep:hwvtep-global-attributes/hwvtep:logical-switches/hwvtep:hwvtep-node-name"; + } + } + leaf switch-interfaces-type { + type enumeration { + enum leaf; + enum root; + } + description "The type of the etree interfaces behind the logical switch. Leaves or Roots."; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/event-aggregator.yang b/experimental/odp/event-aggregator.yang new file mode 100644 index 000000000..ad7b57339 --- /dev/null +++ b/experimental/odp/event-aggregator.yang @@ -0,0 +1,131 @@ +module event-aggregator { + // FIXME: this module needs to be split up to concepts and API + // as the concepts are shared with the other model in this + // package. + yang-version 1; + namespace "urn:cisco:params:xml:ns:yang:messagebus:eventaggregator"; + prefix "eventaggregator"; + + organization "Cisco Systems, Inc."; + contact "Robert Gallas"; + + description + "Module implementing message but RPC. + + Copyright (c)2014 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2014-12-02" { + description "Initial revision"; + } + + typedef pattern { + type string { + length 1..max; + } + + // FIXME: make this a regular expression + description "A match pattern. Specifically this is a wildcard pattern."; + } + + typedef notification-pattern { + type pattern; + description + "Pattern for matching candidate notification types. This pattern is to be + applied against the concatenation of the namespace of the module which + defines that particular notification, followed by a single colon, and + then followed by notification identifier, as supplied in the argument to + the notification statement."; + } + + typedef topic-id { + type string { + length 1..max; + } + description + "A topic identifier. It uniquely defines a topic as seen by the the user + of this model's RPCs"; + } + + // FIXME: we would really like to share instances here, but that requires some sort + // of sane reference counting. The reason for sharing is the data path part + // of notification delivery -- multiple creators of topics can still share + // a single data path. + rpc create-topic { + description + "Create a new topic. A topic is an aggregation of several notification + types from a set of nodes. Each successful invocation results in a unique + topic being created. The caller is responsible for removing the topic + once it is no longer needed."; + + input { + leaf notification-pattern { + type notification-pattern; + mandatory true; + description + "Pattern matching notification which should be forwarded into this + topic."; + } + + leaf node-id-pattern { + type pattern; + mandatory true; + description + "Pattern for matching candidate event source nodes when looking + for contributors to the topic. The pattern will be applied against + /network-topology/topology/node/node-id"; + } + } + + output { + leaf topic-id { + type topic-id; + mandatory true; + } + } + } + + rpc destroy-topic { + description + "Destroy a topic. No further messages will be delivered to it."; + + input { + leaf topic-id { + type topic-id; + mandatory true; + } + } + } + + notification topic-notification { + description + "Notification of an event occuring on a particular node. This notification + acts as an encapsulation for the event being delivered."; + + leaf topic-id { + type topic-id; + mandatory true; + description + "Topic to which this event is being delivered."; + } + + leaf node-id { + // FIXME: should be topology node ID + type string; + mandatory true; + description + "Node ID of the node which generated the event."; + } + + anyxml payload { + mandatory true; + description + "Encapsulated notification. The format is the XML representation of + a notification according to RFC6020 section 7.14.2."; + } + } +} diff --git a/experimental/odp/event-source.yang b/experimental/odp/event-source.yang new file mode 100644 index 000000000..c90b26696 --- /dev/null +++ b/experimental/odp/event-source.yang @@ -0,0 +1,127 @@ +module event-source { + yang-version 1; + namespace "urn:cisco:params:xml:ns:yang:messagebus:eventsource"; + prefix "eventsource"; + + import event-aggregator { prefix aggr; } + import network-topology { prefix nt; revision-date "2013-10-21"; } + import opendaylight-inventory {prefix inv; revision-date "2013-08-19"; } + import yang-ext {prefix ext; revision-date "2013-07-09"; } + + organization "Cisco Systems, Inc."; + contact "Robert Gallas"; + + description + "Base model for a topology where individual nodes can produce events. + + Module implementing event source topology and encapped notification. + + Copyright (c)2014 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2014-12-02" { + description "first revision + + add rpc dis-join-topic + + add notification event-source-status-notification"; + } + + // FIXME: expand this + typedef join-topic-status { + type enumeration { + enum up; + enum down; + } + description "Object status"; + } + + // FIXME: migrate to topology + typedef node-ref { + type leafref { + path "/inv:nodes/inv:node/inv:id"; + } + } + + typedef event-source-status { + type enumeration { + enum active; + enum inactive; + enum deactive; + } + description "Status of event source + - active: event source is publishing notification, + - inactive: event source stopped publishing of notifications temporarily + - deactive: event source stopped publishing of notifications permanently" ; + } + + grouping topology-event-source-type { + container topology-event-source { + presence "indicates an event source-aware topology"; + } + } + + rpc join-topic { + input { + leaf node { + ext:context-reference "inv:node-context"; + type "instance-identifier"; + } + leaf topic-id { + type aggr:topic-id; + description "in current implementation notification-pattern is defined by topic-id. + By persisting topic definition we could omit notification-pattern"; + } + leaf notification-pattern { + type aggr:notification-pattern; + } + } + + output { + leaf status { + type join-topic-status; + } + } + } + + rpc dis-join-topic { + input { + leaf node { + ext:context-reference "inv:node-context"; + type "instance-identifier"; + } + leaf topic-id { + type aggr:topic-id; + mandatory true; + description "identifier of topic to be disjoin"; + } + } + + } + + notification event-source-status-notification { + + description + "Notification of change event source status."; + + leaf status { + type event-source-status; + mandatory true; + description "Current status of event source."; + } + + } + + augment "/nt:network-topology/nt:topology/nt:topology-types" { + uses topology-event-source-type; + } + + augment "/nt:network-topology/nt:topology/nt:node" { + when "../../nt:topology-types/topology-event-source"; + leaf event-source-node { + type node-ref; + } + } +} diff --git a/experimental/odp/ex-vlan.yang b/experimental/odp/ex-vlan.yang deleted file mode 100644 index 9edb85f15..000000000 --- a/experimental/odp/ex-vlan.yang +++ /dev/null @@ -1,47 +0,0 @@ -module ex-vlan { - namespace "http://example.com/vlan"; - prefix "vlan"; - - import ietf-interfaces { - prefix if; - } - - revision 2013-10-22 { - description - "Initial revision."; - reference - "RFC A YANG Data Model for Interface Management draft-ietf-netmod-interfaces-cfg-12 - Appendix C"; - } - - augment "/if:interfaces/if:interface" { - when "if:type = 'ethernetCsmacd' or - if:type = 'ieee8023adLag'"; - leaf vlan-tagging { - type boolean; - default false; - } - } - - augment "/if:interfaces/if:interface" { - when "if:type = 'l2vlan'"; - - leaf base-interface { - type if:interface-ref; - must "/if:interfaces/if:interface[if:name = current()]" - + "/vlan:vlan-tagging = 'true'" { - description - "The base interface must have vlan tagging enabled."; - } - } - leaf vlan-id { - type uint16 { - range "1..4094"; - } - must "../base-interface" { - description - "If a vlan-id is defined, a base-interface must - be specified."; - } - } - } -} diff --git a/experimental/odp/fib-rpc.yang b/experimental/odp/fib-rpc.yang new file mode 100644 index 000000000..ac02a0d60 --- /dev/null +++ b/experimental/odp/fib-rpc.yang @@ -0,0 +1,89 @@ +module fib-rpc { + namespace "urn:opendaylight:netvirt:fib:rpc"; + prefix "fib-rpc"; + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + + import opendaylight-flow-types { + prefix offlow; + revision-date "2013-10-26"; + } + + revision "2016-01-21" { + description "FIB Servicer RPC Module"; + } + + /* RPCs */ + grouping fib-entry-inputs { + leaf source-dpid { + type uint64; + } + leaf vpn-name { + type string; + } + leaf service-id { + type uint32; + } + leaf ip-address { + type string; + } + leaf ip-address-source { + description + "This field indicates whether the IP address here is an External-Fixed-Ip(Owned by Router), + or Floating-Ip(Used by Ports)."; + type enumeration { + enum "ExternalFixedIP"; + enum "FloatingIP"; + } + } + } + + rpc create-fib-entry { + description "to install FIB/LFIB/TST routes on specified dpn with given instructions"; + input { + uses fib-entry-inputs; + uses offlow:instruction-list; + } + } + + rpc remove-fib-entry { + description "to remove FIB/LFIB/TST routes from specified dpn"; + input { + uses fib-entry-inputs; + } + } + + rpc populate-fib-on-dpn { + description "Populates FIB table in specified DPN"; + input { + leaf dpid { + type uint64; + } + leaf vpn-id { + type uint32; + } + leaf rd { + type string; + } + } + } + + rpc cleanup-dpn-for-vpn { + description "Removes the VPN Fib entries in a given DPN"; + input { + leaf dpid { + type uint64; + } + leaf vpn-id { + type uint32; + } + leaf rd { + type string; + } + + } + } +} diff --git a/experimental/odp/flow-capable-transaction.yang b/experimental/odp/flow-capable-transaction.yang index 160291cf2..2c2cb0467 100644 --- a/experimental/odp/flow-capable-transaction.yang +++ b/experimental/odp/flow-capable-transaction.yang @@ -3,30 +3,36 @@ module flow-capable-transaction { prefix type; import opendaylight-inventory {prefix inv; revision-date "2013-08-19";} - import ietf-inet-types {prefix inet; revision-date "2010-09-24";} + import ietf-inet-types {prefix inet; revision-date "2013-07-15";} import yang-ext {prefix ext; revision-date "2013-07-09";} - revision "2013-11-03" { - description "Initial revision"; + revision "2015-03-04" { + description "Transaction support for openflow, contains: + - barrier rpc + - tentative transaction support structures"; } typedef transaction-id { type uint64; } - // This refers to MD-SAL transaction reference. grouping transaction-metadata { + description "Refers to MD-SAL transaction reference."; leaf transaction-uri { type inet:uri; } } grouping transaction-aware { + status deprecated; + leaf transaction-id { type transaction-id; } } grouping multipart-transaction-aware { + status deprecated; + uses transaction-aware; leaf moreReplies { @@ -35,28 +41,13 @@ module flow-capable-transaction { } } - rpc get-next-transaction-id { - input { - leaf node { - ext:context-reference "inv:node-context"; - type inv:node-ref; - } - } - output { - uses transaction-aware; - } - } - - // Barier request? - rpc finish-transaction { + rpc send-barrier { + description "barrier request"; input { leaf node { ext:context-reference "inv:node-context"; type inv:node-ref; } - leaf transaction-id { - type transaction-id; - } } } } diff --git a/experimental/odp/flow-errors.yang b/experimental/odp/flow-errors.yang index 442ed2672..fab892ccd 100644 --- a/experimental/odp/flow-errors.yang +++ b/experimental/odp/flow-errors.yang @@ -1,12 +1,15 @@ module flow-errors { namespace "urn:opendaylight:flow:errors"; prefix error; + + description "Openflow error messages."; revision "2013-11-16" { description "Initial revision of error"; } typedef error-type { + description "Openflow error types."; type enumeration { enum hello-failed; enum bad-request; @@ -29,6 +32,7 @@ module flow-errors { } grouping error-message { + description "Error message structure."; leaf type { type error-type; } @@ -43,6 +47,7 @@ module flow-errors { } grouping experimenter-error-message { + description "Experimenter error message structure."; leaf type { type error-type; } @@ -59,4 +64,4 @@ module flow-errors { type string; } } -} +} \ No newline at end of file diff --git a/experimental/odp/flow-management.yang b/experimental/odp/flow-management.yang deleted file mode 100644 index b8579bcf9..000000000 --- a/experimental/odp/flow-management.yang +++ /dev/null @@ -1,30 +0,0 @@ -module flow-management { - namespace "urn:opendaylight:flow:config"; - prefix flow-cfg; - - import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} - import opendaylight-flow-types {prefix flow;} - - revision "2013-08-19" { - description "Initial revision of flow service"; - } - - - grouping flow-entry { - leaf node { - type inv:node-ref; - } - uses flow:flow; - } - - container flows { - list flow { - key "node id"; - - leaf id { - type uint32; - } - uses flow-entry; - } - } -} diff --git a/experimental/odp/flow-node-inventory.yang b/experimental/odp/flow-node-inventory.yang index 65362a179..d23aa28e0 100644 --- a/experimental/odp/flow-node-inventory.yang +++ b/experimental/odp/flow-node-inventory.yang @@ -3,82 +3,87 @@ module flow-node-inventory { prefix flownode; import yang-ext {prefix ext; revision-date "2013-07-09";} - import ietf-inet-types {prefix inet; revision-date "2010-09-24";} + import ietf-inet-types {prefix inet; revision-date "2013-07-15";} + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} import opendaylight-port-types {prefix port;revision-date "2013-09-25";} import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} import opendaylight-table-types {prefix table;revision-date "2013-10-26";} import opendaylight-flow-types {prefix flow;revision-date "2013-10-26";} import opendaylight-group-types {prefix group;revision-date "2013-10-18";} import opendaylight-meter-types {prefix meter;revision-date "2013-09-18";} - + import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; } + + description "Flow Capable Node extensions to the Inventory model"; + revision "2013-08-19" { - description "Flow Capable Node extensions to the Inventory model"; + description "added descriptions"; } - + identity feature-capability { } - + identity flow-feature-capability-flow-stats { - description "Flow statistics"; - base feature-capability; + description "Flow statistics"; + base feature-capability; } - + identity flow-feature-capability-table-stats { description "Table statistics"; - base feature-capability; + base feature-capability; } - + identity flow-feature-capability-port-stats { description "Port statistics"; - base feature-capability; + base feature-capability; } - + identity flow-feature-capability-stp { description "802.1d spanning tree"; - base feature-capability; + base feature-capability; } - + identity flow-feature-capability-reserved { description "Reserved, must be zero"; - base feature-capability; + base feature-capability; } - + identity flow-feature-capability-ip-reasm { description "Can reassemble IP fragments"; - base feature-capability; + base feature-capability; } - + identity flow-feature-capability-queue-stats { description "Queue statistics"; - base feature-capability; + base feature-capability; } - + identity flow-feature-capability-arp-match-ip { description "Match IP addresses in ARP pkts"; - base feature-capability; + base feature-capability; } - + identity flow-feature-capability-group-stats { description "Group statistics"; - base feature-capability; + base feature-capability; } - + identity flow-feature-capability-port-blocked { description "Switch will block looping ports"; - base feature-capability; + base feature-capability; } - + grouping feature { + description "Features supported by openflow device."; leaf support-state { type inv:support-type; } } grouping queue { - leaf queue-id { + leaf queue-id { type uint32; description "id for the specific queue"; - mandatory true; + mandatory true; } container properties { leaf minimum-rate { @@ -91,41 +96,70 @@ module flow-node-inventory { } typedef flow-id { + description "MD-SAL identifier of openflow flow. "; type inet:uri; } grouping tables { + description "Openflow table structure. Here flows are contained."; list table { - key "id"; - + key "id"; + leaf id { type uint8; - } - - uses table:table-features; - + } + list flow { - key "id"; - + key "id"; + leaf id { type flow-id; - } - + } + + uses flow:flow; + } + // BE-RECON: Modification for including stale-flow for Reconciliation + list stale-flow { + key "id"; + + leaf id { + type flow-id; + } + uses flow:flow; } } } - + grouping meters { + description "Openflow meter list."; list meter { key "meter-id"; uses meter:meter; } + // BE-RECON: Modification for including stale-flow for Reconciliation + list stale-meter { + key "meter-id"; + uses meter:meter; + } + } + + grouping ip-address-grouping { + description "Additional ip address info referring to device interface which connects to controller"; + leaf ip-address { + description "IP address of a flow capable node."; + type inet:ip-address; + } + } + + grouping port-number-grouping { + leaf port-number { + description "Port number of a flow capable node."; + type inet:port-number; + } } - - - grouping flow-node { + grouping desc { leaf manufacturer { type string; } @@ -141,12 +175,18 @@ module flow-node-inventory { leaf description { type string; } + } + grouping flow-node { + description "Openflow node structure = device"; + uses desc; uses tables; + uses table:table-features; uses group:groups; uses meters; - // TODO: ports - + uses ip-address-grouping; + uses port-number-grouping; + container supported-match-types { list match-type { key "match"; @@ -154,10 +194,10 @@ module flow-node-inventory { leaf match { type string; // FIXME: Add identity } - + } } - + container supported-instructions { list instruction-type { key "instruction"; @@ -178,55 +218,119 @@ module flow-node-inventory { } } } - + container switch-features { - + leaf max_buffers { type uint32; } - + leaf max_tables { type uint8; } - + leaf-list capabilities { type identityref { base feature-capability; } } - + } } - - grouping flow-node-connector { + grouping flow-node-connector { + description "Wrapper of openflow port. TODO::simplify/rename"; + leaf reason { + type port:port-reason; + } uses port:flow-capable-port; } + grouping snapshot-gathering-status-grouping { + description "Basic info about snapshot gathering - timestamps of begin, end."; + + container snapshot-gathering-status-start { + description "gathering start mark"; + leaf begin { + type yang:date-and-time; + } + } + + container snapshot-gathering-status-end { + description "gathering end mark + result"; + leaf end { + type yang:date-and-time; + } + leaf succeeded { + type boolean; + } + } + } + augment "/inv:nodes/inv:node" { ext:augment-identifier "flow-capable-node"; + description "Top attach point of openflow node into node inventory tree."; uses flow-node; } augment "/inv:nodes/inv:node/inv:node-connector" { ext:augment-identifier "flow-capable-node-connector"; + description "Openflow port into inventory tree."; uses flow-node-connector; } augment "/inv:node-updated" { ext:augment-identifier "flow-capable-node-updated"; + description "Openflow node into node notification."; uses flow-node; } augment "/inv:node-updated/inv:node-connector" { //ext:identical-augment "flow-capable-node-connector"; ext:augment-identifier "flow-capable-node-connector-update-fields"; + description "Openflow port into node notification."; uses flow-node-connector; } - + augment "/inv:node-connector-updated" { ext:augment-identifier "flow-capable-node-connector-updated"; + description "Openflow port into node-connector notification."; uses flow-node-connector; } + augment "/inv:nodes/inv:node/table" { + ext:augment-identifier "flow-hash-id-mapping"; + description "Flow is identified by match and priority on device. So Operational/DS + has to simulate that behavior and contract between FlowId and match+priority + identification should represent Flow hashCode. Flow has to contain only + match priority and flowCookie for create a hashCode"; + list flow-hash-id-map { + key "hash"; + leaf hash { + type string; + } + leaf flow-id { + type flow-id; + } + } + } + + augment "/inv:nodes/inv:node" { + ext:augment-identifier "flow-capable-statistics-gathering-status"; + description "Placeholder for timestamp of device status snapshot. + This is contructed by asynchronous process."; + uses snapshot-gathering-status-grouping; + } + + augment "/multipart:multipart-reply/multipart:multipart-reply-body" { + case multipart-reply-desc { + uses desc; + } + } + + augment "/multipart:multipart-request/multipart:multipart-request-body" { + case multipart-request-desc { + // Empty request case + } + } } diff --git a/experimental/odp/flow-topology-discovery.yang b/experimental/odp/flow-topology-discovery.yang index 05c413d7b..0d40efbaf 100644 --- a/experimental/odp/flow-topology-discovery.yang +++ b/experimental/odp/flow-topology-discovery.yang @@ -3,6 +3,8 @@ module flow-topology-discovery { prefix flow-node-topo; import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + + description "Legacy topology API."; revision "2013-08-19" { description "Flow Capable Node extensions to the Inventory model"; @@ -18,25 +20,28 @@ module flow-topology-discovery { } } - notification link-discovered { + status deprecated; uses link; } notification link-overutilized { + status deprecated; uses link; } notification link-removed { + status deprecated; uses link; } notification link-utilization-normal { + status deprecated; uses link; } rpc solicit-refresh { - + status deprecated; } } diff --git a/experimental/odp/forwardingrules-manager-config.yang b/experimental/odp/forwardingrules-manager-config.yang new file mode 100644 index 000000000..53fdcfb99 --- /dev/null +++ b/experimental/odp/forwardingrules-manager-config.yang @@ -0,0 +1,35 @@ +module forwarding-rules-manager-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:openflowplugin:app:forwardingrules-manager:config"; + prefix "frm"; + + description + "Configuration for Forwarding Rules Manager application.."; + + revision "2016-05-11" { + description + "Initial revision."; + } + + container forwarding-rules-manager-config { + leaf disable-reconciliation { + type boolean; + default false; + } + + leaf stale-marking-enabled { + type boolean; + default false; + } + + leaf reconciliation-retry-count { + type uint16; + default 5; + } + + leaf bundle-based-reconciliation-enabled { + type boolean; + default false; + } + } +} diff --git a/experimental/odp/frm-reconciliation.yang b/experimental/odp/frm-reconciliation.yang new file mode 100644 index 000000000..43da95c1f --- /dev/null +++ b/experimental/odp/frm-reconciliation.yang @@ -0,0 +1,29 @@ +module frm-reconciliation { + + namespace "urn:opendaylight:params:xml:ns:yang:openflowplugin:app:frm-reconciliation:service"; + prefix frm-reconciliation; + + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} + import opendaylight-inventory {prefix inv; revision-date "2013-08-19";} + + revision "2018-02-27" { + description "Initial revision of trigger based frm reconciliation"; + } + + rpc reconcile-node { + description "Executes reconciliation between the controller and node"; + input { + uses "inv:node-context-ref"; + leaf nodeId { + type uint64; + } + } + + output { + leaf result { + description "The result of reconciliation, for follow-up"; + type boolean; + } + } + } +} diff --git a/experimental/odp/hwvtep.yang b/experimental/odp/hwvtep.yang new file mode 100644 index 000000000..b1f3e97fd --- /dev/null +++ b/experimental/odp/hwvtep.yang @@ -0,0 +1,604 @@ +module hwvtep { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:ovsdb:hwvtep"; + prefix "hwvtepsb"; + + import network-topology {prefix "topo"; revision-date "2013-10-21"; } + import yang-ext { prefix "ext"; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import ietf-yang-types { prefix yang; revision-date "2013-07-15";} + import opendaylight-l2-types { prefix ethertype; revision-date "2013-08-27";} + + revision "2015-09-01" { + description "1st revision of southbound model for hwvtep"; + } + + typedef hwvtep-physical-switch-ref { + description "A reference to a hwvtep based physical switch"; + type instance-identifier; + } + + typedef hwvtep-logical-switch-ref { + description "A reference to a logical switch in hwvtep based switches"; + type instance-identifier; + } + + typedef hwvtep-physical-locator-ref { + description "A reference to an endpoint to which logical switch traffic may be encapsulated and forwarded"; + type instance-identifier; + } + + typedef hwvtep-global-ref { + description "A reference to an hwvtep global node"; + type instance-identifier; + } + + typedef hwvtep-node-name { + type string; + } + + typedef ietf-acl-entry-ref { + description "A reference to an ietf-acl-entry"; + type instance-identifier; + } + + typedef hwvtep-acl-ref { + description "A reference to an acl"; + type instance-identifier; + } + + typedef hwvtep-logical-binding-stats-ref { + description "A reference to a logical-binding-stats"; + type instance-identifier; + } + + grouping hwvtep-node-identification { + leaf hwvtep-node-name { + description "The name of the node"; + type hwvtep-node-name; + } + leaf hwvtep-node-description { + description "The description of the node"; + type string; + } + } + + grouping hwvtep-mac-table-generic-attributes { + leaf mac-entry-key { + description "MAC address entry"; + type yang:mac-address; + } + leaf mac-entry-uuid { + description "The unique identifier of the mac-entry"; + type yang:uuid; + } + leaf logical-switch-ref { + description "The logical switch to which this mapping applies"; + type hwvtep-logical-switch-ref; + } + } + + grouping hwvtep-ucast-mac-table-attributes { + description "Unicast mac table attributes"; + leaf ipaddr { + description "Optional IP address associated with the mac"; + type inet:ip-address; + } + leaf locator-ref { + description "Reference to the physical locator to reach this entry"; + type hwvtep-physical-locator-ref; + } + } + + grouping hwvtep-mcast-mac-table-attributes { + description "Multicast mac table attributes"; + leaf ipaddr { + description "Optional IP address associated with the mac"; + type inet:ip-address; + } + uses hwvtep-physical-locator-set-attributes; + } + + grouping hwvtep-tunnel-attributes { + leaf tunnel-uuid { + description "The unique identifier of the tunnel"; + type yang:uuid; + } + leaf local-locator-ref { + description "Reference to the physical locator to reach this entry"; + type hwvtep-physical-locator-ref; + } + leaf remote-locator-ref { + description "Reference to the physical locator to reach this entry"; + type hwvtep-physical-locator-ref; + } + list bfd-local-configs { + description "Local configuation attributes for BFD"; + + key "bfd-local-config-key"; + leaf bfd-local-config-key { + description "bfd-local-config name/key"; + type string; + } + leaf bfd-local-config-value { + description "bfd-local-config value"; + type string; + } + } + list bfd-remote-configs { + description "Remote configuration attributes for BFD"; + + key "bfd-remote-config-key"; + leaf bfd-remote-config-key { + description "bfd-remote-config name/key"; + type string; + } + leaf bfd-remote-config-value { + description "bfd-remote-config value"; + type string; + } + } + list bfd-params { + description "Parameters to configure and enable BFD"; + + key "bfd-param-key"; + leaf bfd-param-key { + description "bfd-param name/key"; + type string; + } + leaf bfd-param-value { + description "bfd-param value"; + type string; + } + } + list bfd-status { + description "runtime status of BFD on this tunnel"; + + config false; + key "bfd-status-key"; + leaf bfd-status-key { + description "bfd-status name/key"; + type string; + } + leaf bfd-status-value { + description "bfd-status value"; + type string; + } + } + } + + grouping hwvtep-physical-switch-attributes { + uses hwvtep-node-identification; + leaf physical-switch-uuid { + description "The unique identifier of the physical-switch"; + type yang:uuid; + } + list management-ips { + key "management-ips-key"; + leaf management-ips-key { + description "Management IP address of the switch"; + type inet:ip-address; + } + } + leaf managed-by { + description "The hwvtep global node to which this physical switch belongs to"; + type hwvtep-global-ref; + } + list tunnel-ips { + key "tunnel-ips-key"; + leaf tunnel-ips-key { + description "Management IP address of the switch"; + type inet:ip-address; + } + } + list tunnels { + key "local-locator-ref remote-locator-ref"; + uses hwvtep-tunnel-attributes ; + } + list switch-fault-status { + config false; + key "switch-fault-status-key"; + leaf switch-fault-status-key { + description "switch-fault-status name/key"; + type string; + } + leaf switch-fault-status-value { + description "switch-fault-status value"; + type string; + } + } + } + + grouping hwvtep-connection-info-attributes { + leaf remote-ip { + type inet:ip-address; + description "Hwvtep Connection Remote IP"; + } + leaf remote-port { + type inet:port-number; + description "Hwvtep Connection Remote Port Number"; + } + leaf local-ip { + type inet:ip-address; + description "Hwvtep Connection Local IP"; + } + leaf local-port { + type inet:port-number; + description "Hwvtep Connection Local Port Number IP"; + } + } + + grouping hwvtep-global-attributes { + description "global node for the hwvtep"; + container connection-info { + uses hwvtep-connection-info-attributes; + } + leaf db-version { + description "The database schema version"; + type string; + } + list managers { + description ""; + key "target"; + leaf target { + description "Uri indicating connection method to the Manager"; + type inet:uri; + } + leaf manager-uuid { + description "The unique identifier of the manager"; + type yang:uuid; + } + leaf is-connected { + type boolean; + } + list manager-other-configs { + description "Key-value pairs for configuring rarely used features. + other_config : dscp : optional string + contains an integer, in the range 0 - 63. DSCP value to be used when establishing a connection to the switch. Default value of 48 if none specified."; + key "other-config-key"; + leaf other-config-key { + description "other-config name/key"; + type string; + } + leaf other-config-value { + description "other-config value"; + type string; + } + } + } + list switches { + description "List of physical switches managed by this node"; + key "switch-ref"; + leaf switch-ref { + type hwvtep-physical-switch-ref; + } + } + list logical-switches { + key "hwvtep-node-name"; + uses hwvtep-logical-switch-attributes; + } + list local-ucast-macs { + key "mac-entry-key logical-switch-ref"; + uses hwvtep-mac-table-generic-attributes; + uses hwvtep-ucast-mac-table-attributes; + } + list remote-ucast-macs { + key "mac-entry-key logical-switch-ref"; + uses hwvtep-mac-table-generic-attributes; + uses hwvtep-ucast-mac-table-attributes; + } + list local-mcast-macs { + key "mac-entry-key logical-switch-ref"; + uses hwvtep-mac-table-generic-attributes; + uses hwvtep-mcast-mac-table-attributes; + } + list remote-mcast-macs{ + key "mac-entry-key logical-switch-ref"; + uses hwvtep-mac-table-generic-attributes; + uses hwvtep-mcast-mac-table-attributes; + } + list logical-routers { + key "hwvtep-node-name"; + uses hwvtep-logical-router-attributes; + } + list local-arp-sources { + key "src-mac"; + uses hwvtep-arp-sources-attributes; + } + list remote-arp-sources { + key "src-mac"; + uses hwvtep-arp-sources-attributes; + } + list acls { + key "acl-name"; + uses hwvtep-acl-attributes; + } + list logical-binding-stats { + config false; + key "logical-binding-stats-uuid"; + uses hwvtep-logical-binding-stats-attributes; + } + } + + identity encapsulation-type-base { + description "Base Encapsulation type"; + } + + identity encapsulation-type-vxlan-over-ipv4 { + base encapsulation-type-base; + description "Encapsulation type vxlan-over-ipv4"; + } + + typedef encapsulation-type { + type identityref { + base encapsulation-type-base; + } + description "This type is used to refer to an Encapsulation Type."; + } + + grouping hwvtep-physical-locator-attributes { + leaf physical-locator-uuid { + description "The unique identifier of the physical-locator"; + type yang:uuid; + } + leaf encapsulation-type { + type encapsulation-type; + description "Encapsulation type used by this locator"; + } + leaf dst-ip { + type inet:ip-address; + description "IP address of the locator"; + } + } + + grouping hwvtep-physical-locator-set-attributes { + list locator-set { + leaf locator-ref { + type hwvtep-physical-locator-ref; + } + } + } + + grouping hwvtep-logical-switch-attributes { + uses hwvtep-node-identification; + leaf logical-switch-uuid { + description "A unique identifier of the logical switch"; + type yang:uuid; + } + leaf tunnel-key { + description "Per Logical Switch tunnel key"; + type string; + } + leaf replication-mode { + description "Per Logical Switch replication mode"; + type string; + } + } + + grouping hwvtep-physical-port-attributes { + uses hwvtep-node-identification; + leaf physical-port-uuid { + description "The unique identifier of the physical-port"; + type yang:uuid; + } + list vlan-bindings { + description "A map of vlan ID to logical switch pairs"; + key "vlan-id-key"; + leaf vlan-id-key { + description "vlan ids in the range 0 - 4095"; + type ethertype:vlan-id; + } + leaf logical-switch-ref { + description "Reference to logical switch for the vlan"; + type hwvtep-logical-switch-ref; + } + } + list acl-bindings { + key "acl-binding-vlan-id"; + leaf acl-binding-vlan-id { + description "vlan ids in the range 0 - 4095"; + type ethertype:vlan-id; + } + leaf acl-ref { + description "reference to ACL to be applied to this port"; + type hwvtep-acl-ref; + } + } + list vlan-stats { + key "vlan-stats-key"; + leaf vlan-stats-key { + description "vlan ids in the range 0 - 4095"; + type ethertype:vlan-id; + } + leaf vlan-stats-ref { + description "reference to logical binding stats for this port"; + type hwvtep-logical-binding-stats-ref; + } + } + list port-fault-status { + config false; + key "port-fault-status-key"; + leaf port-fault-status-key { + description "port-fault-status name/key"; + type string; + } + leaf port-fault-status-value { + description "port-fault-status value"; + type string; + } + } + } + + grouping hwvtep-logical-router-attributes { + uses hwvtep-node-identification; + leaf logical-router-uuid { + description "A unique identifier of the logical router"; + type yang:uuid; + } + list switch-bindings { + description "A map of IPv4 or IPv6 address prefix in CIDR + notation to logical switch. Multiple prefixes + may map to the same switch. By writing a 32-bit + (or 128-bit for v6) address with a /N prefix + length, both the router's interface address and the + subnet prefix can be configured. For example, + 192.68.1.1/24 creates a /24 subnet for the logical + switch attached to the interface and assigns the + address 192.68.1.1 to the router interface."; + leaf destination-address { + description "IPv4 or IPv6 address prefix in CIDR notation"; + type inet:ip-prefix; + } + leaf logical-switch-ref { + description "reference to logical switch"; + type hwvtep-logical-switch-ref; + } + } + list static-routes { + description "map of string-string pairs. One or more static routes, + mapping IP prefixes to next hop IP addresses."; + leaf destination-address { + description "IPv4 or IPv6 address prefix in CIDR notation"; + type inet:ip-prefix; + } + leaf nexthop-address { + description "IP address of next hop"; + type inet:ip-address; + } + } + list acl-bindings { + description "map of string-ACL pairs. Maps ACLs to logical router + interfaces. The router interfaces are indicated + using IP address notation, and must be the same + interfaces created in the switch_binding column. + For example, an ACL could be associated with the + logical router interface with an address of + 192.68.1.1 as defined in the example above."; + key "router-interface"; + leaf router-interface { + description "IPv4 or IPv6 address prefix in CIDR notation"; + type inet:ip-prefix; + } + leaf acl-ref { + description "reference to ACL to be applied to this router"; + type hwvtep-acl-ref; + } + } + } + + grouping hwvtep-arp-sources-attributes { + description "AP Sources table attributes"; + leaf arp-sources-uuid { + description "The unique identifier of the arp-source"; + type yang:uuid; + } + leaf src-mac { + description "Source mac to be used by given tep"; + type yang:mac-address; + } + uses hwvtep-physical-locator-attributes; + } + + grouping hwvtep-acl-entry-attributes { + description "ACL Entry attributes"; + leaf sequence { + description "integer. Sequence number for ACL entry"; + type uint32 { + range "0..max"; + } + } + leaf acl-entry-uuid { + description "The unique identifier of the acl-entry"; + type yang:uuid; + } + leaf acl-entry-ref { + type ietf-acl-entry-ref; + } + list acle-fault-status { + config false; + key "acle-fault-status-key"; + leaf acle-fault-status-key { + description "acle-fault-status name/key"; + type string; + } + leaf acle-fault-status-value { + description "acle-fault-status value: can be empty/None"; + type string; + } + } + } + + grouping hwvtep-acl-attributes { + description "ACL attributes"; + leaf acl-name { + description "Name of the ACL"; + type string; + } + leaf acl-uuid { + description "The unique identifier of the acl"; + type yang:uuid; + } + list acl-entries { + uses hwvtep-acl-entry-attributes; + } + list acl-fault-status { + config false; + key "acl-fault-status-key"; + leaf acl-fault-status-key { + description "acl-fault-status name/key"; + type string; + } + leaf acl-fault-status-value { + description "acl-fault-status value: can be empty/None"; + type hwvtep-acl-ref; + } + } + } + + grouping hwvtep-logical-binding-stats-attributes { + leaf logical-binding-stats-uuid { + description "A unique identifier of the logical binding stats"; + type yang:uuid; + } + leaf packets-from-local { + description "integer"; + type uint32; + } + leaf bytes-from-local { + description "integer"; + type uint32; + } + leaf packets-to-local { + description "integer"; + type uint32; + } + leaf bytes-to-local { + description "integer"; + type uint32; + } + } + + augment "/topo:network-topology/topo:topology/topo:node" { + description "Augmentation for physical switch nodes managed by hwvtep"; + ext:augment-identifier "physical-switch-augmentation"; + uses hwvtep-physical-switch-attributes; + } + + augment "/topo:network-topology/topo:topology/topo:node" { + description "Augment topology node for a hwvtep node"; + ext:augment-identifier "hwvtep-global-augmentation"; + uses hwvtep-global-attributes; + } + + augment "/topo:network-topology/topo:topology/topo:node/topo:termination-point" { + description "Augment topology node termination-point for a hwvtep physical-locator"; + ext:augment-identifier "hwvtep-physical-locator-augmentation"; + uses hwvtep-physical-locator-attributes; + } + + augment "/topo:network-topology/topo:topology/topo:node/topo:termination-point" { + description "Augment topology node termination-point for a hwvtep physical-port"; + ext:augment-identifier "hwvtep-physical-port-augmentation"; + uses hwvtep-physical-port-attributes; + } +} diff --git a/experimental/odp/iana-afn-safi@2013-07-04.yang b/experimental/odp/iana-afn-safi@2013-07-04.yang new file mode 100644 index 000000000..c07626065 --- /dev/null +++ b/experimental/odp/iana-afn-safi@2013-07-04.yang @@ -0,0 +1,526 @@ +module iana-afn-safi { + namespace "urn:ietf:params:xml:ns:yang:iana-afn-safi"; + prefix "ianaaf"; + + organization + "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 4676 Admiralty Way, Suite 330 + Marina del Rey, CA 90292 + + Tel: +1 310 823 9358 + E-Mail: iana&iana.org"; + description + "This YANG module provides two typedefs containing YANG + definitions for the following IANA-registered enumerations: + + - Address Family Numbers (AFN) + + - Subsequent Address Family Identifiers (SAFI) + + The latest revision of this YANG module can be obtained from the + IANA web site. + + Copyright (c) 2012 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see the + RFC itself for full legal notices."; + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC publication + // and remove this note. + revision 2013-07-04 { + description + "Initial revision."; + reference + "RFC XXXX: IANA Address Family Numbers and + Subsequent Address Family Identifiers YANG Module"; + } + + typedef address-family { + type enumeration { + // value 0 is reserved by IANA + enum ipV4 { + value "1"; + description + "IP version 4"; + } + enum ipV6 { + value "2"; + description + "IP version 6"; + } + enum nsap { + value "3"; + description + "NSAP"; + } + enum hdlc { + value "4"; + description + "HDLC (8-bit multidrop)"; + } + enum bbn1822 { + value "5"; + description + "BBN 1822"; + } + enum all802 { + value "6"; + description + "802 (includes all 802 media plus Ethernet 'canonical + format')"; + } + enum e163 { + value "7"; + description + "E.163"; + } + enum e164 { + value "8"; + description + "E.164 (SMDS, FrameRelay, ATM)"; + } + enum f69 { + value "9"; + description + "F.69 (Telex)"; + } + enum x121 { + value "10"; + description + "X.121 (X.25, Frame Relay)"; + } + enum ipx { + value "11"; + description + "IPX (Internetwork Packet Exchange)"; + } + enum appletalk { + value "12"; + description + "Appletalk"; + } + enum decnetIV { + value "13"; + description + "DECnet IV"; + } + enum banyanVines { + value "14"; + description + "Banyan Vines"; + } + enum e164withNsap { + value "15"; + description + "E.164 with NSAP format subaddress"; + reference + "ATM Forum UNI 3.1"; + } + enum dns { + value "16"; + description + "DNS (Domain Name System)"; + } + enum distinguishedName { + value "17"; + description + "Distinguished Name (per X.500)"; + } + enum asNumber { + value "18"; + description + "Autonomous System Number"; + } + enum xtpOverIpv4 { + value "19"; + description + "XTP over IP version 4"; + } + enum xtpOverIpv6 { + value "20"; + description + "XTP over IP version 6"; + } + enum xtpNativeModeXTP { + value "21"; + description + "XTP native mode XTP"; + } + enum fibreChannelWWPN { + value "22"; + description + "Fibre Channel World-Wide Port Name"; + } + enum fibreChannelWWNN { + value "23"; + description + "Fibre Channel World-Wide Node Name"; + } + enum gwid { + value "24"; + description + "Gateway Identifier"; + } + // FIXME: This one is actually called "afi" in the MIB, but + // that must be a mistake. + enum l2vpn { + value "25"; + description + "AFI for L2VPN information"; + reference + "RFC 4761: Virtual Private LAN Service (VPLS): Using BGP + for Auto-Discovery and Signaling + + RFC 6074: Provisioning, Auto-Discovery, and Signaling in + Layer 2 Virtual Private Networks (L2VPNs)"; + } + enum mplsTpSectionEndpointIdentifier { + value "26"; + description + "MPLS-TP Section Endpoint Identifier"; + reference + "draft-ietf-mpls-gach-adv"; + } + enum mplsTpLspEndpointIdentifier { + value "27"; + description + "MPLS-TP LSP Endpoint Identifier"; + reference + "draft-ietf-mpls-gach-adv"; + } + enum mplsTpPseudowireEndpointIdentifier { + value "28"; + description + "MPLS-TP Pseudowire Endpoint Identifier"; + reference + "draft-ietf-mpls-gach-adv"; + } + enum eigrpCommonServiceFamily { + value "16384"; + description + "EIGRP Common Service Family"; + } + enum eigrpIpv4ServiceFamily { + value "16385"; + description + "EIGRP IPv4 Service Family"; + } + enum eigrpIpv6ServiceFamily { + value "16386"; + description + "EIGRP IPv6 Service Family"; + } + enum lispCanonicalAddressFormat { + value "16387"; + description + "LISP Canonical Address Format (LCAF)"; + } + enum bgpLs { + value "16388"; + description + "BGP-LS"; + reference + "draft-ietf-idr-ls-distribution"; + } + enum 48BitMac { + value "16389"; + description + "48-bit MAC"; + reference + "draft-eastlake-rfc5342bis"; + } + enum 64BitMac { + value "16390"; + description + "64-bit MAC"; + reference + "draft-eastlake-rfc5342bis"; + } + // value 65535 is reserved by IANA + } + description + "This typedef is a YANG enumeration of IANA-registered address + family numbers (AFN)."; + reference + "IANA Address Family Numbers registry. + "; + } + + typedef subsequent-address-family { + type enumeration { + // value 0 is reserved by IANA + enum nlriUnicast { + value "1"; + description + "Network Layer Reachability Information used for unicast + forwarding"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum nlriMulticast { + value "2"; + description + "Network Layer Reachability Information used for multicast + forwarding"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + // value 3 is reserved by IANA + enum nlriMpls { + value "4"; + description + "Network Layer Reachability Information (NLRI) with MPLS + Labels"; + reference + "RFC 3107: Carrying Label Information in BGP-4"; + } + enum mcastVpn { + value "5"; + description + "MCAST-VPN"; + reference + "RFC 6514: BGP Encodings and Procedures for Multicast in + MPLS/BGP IP VPNs"; + } + enum nlriDynamicMsPw { + value "6"; + status "obsolete"; + description + "Network Layer Reachability Information used for Dynamic + Placement of Multi-Segment Pseudowires (TEMPORARY - + Expires 2008-08-23)"; + reference + "draft-ietf-pwe3-dynamic-ms-pw: Dynamic Placement of Multi + Segment Pseudowires"; + } + enum encapsulation { + value "7"; + description + "Encapsulation SAFI"; + reference + "RFC 5512: The BGP Encapsulation Subsequent Address Family + Identifier (SAFI) and the BGP Tunnel Encapsulation + Attribute"; + } + enum tunnel { + value "64"; + status "obsolete"; + description + "Tunnel SAFI"; + reference + "draft-nalawade-kapoor-tunnel-safi: BGP Tunnel SAFI"; + } + enum vpls { + value "65"; + description + "Virtual Private LAN Service (VPLS)"; + reference + "RFC 4761: Virtual Private LAN Service (VPLS): Using BGP + for Auto-Discovery and Signaling + + RFC 6074: Provisioning, Auto-Discovery, and Signaling in + Layer 2 Virtual Private Networks (L2VPNs)"; + } + enum bgpMdt { + value "66"; + description + "BGP MDT SAFI"; + reference + "RFC 6037: Cisco Systems' Solution for Multicast in + BGP/MPLS IP VPNs"; + } + enum bgp4over6 { + value "67"; + description + "BGP 4over6 SAFI"; + reference + "RFC 5747: 4over6 Transit Solution Using IP Encapsulation + and MP-BGP Extensions"; + } + enum bgp6over4 { + value "68"; + description + "BGP 6over4 SAFI"; + } + enum l1VpnAutoDiscovery { + value "69"; + description + "Layer-1 VPN auto-discovery information"; + reference + "RFC 5195: BGP-Based Auto-Discovery for Layer-1 VPNs"; + } + enum mplsVpn { + value "128"; + description + "MPLS-labeled VPN address"; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)"; + } + enum multicastBgpMplsVpn { + value "129"; + description + "Multicast for BGP/MPLS IP Virtual Private Networks + (VPNs)"; + reference + "RFC 6513: Multicast in MPLS/BGP IP VPNs + + RFC 6514: BGP Encodings and Procedures for Multicast in + MPLS/BGP IP VPNs"; + } + // values 130-131 are reserved by IANA + enum routeTargetConstraints { + value "132"; + description + "Route Target constraints"; + reference + "RFC 4684: Constrained Route Distribution for Border + Gateway Protocol/MultiProtocol Label Switching (BGP/MPLS) + Internet Protocol (IP) Virtual Private Networks (VPNs)"; + } + enum ipv4DissFlow { + value "133"; + description + "IPv4 dissemination of flow specification rules"; + reference + "RFC 5575: Dissemination of Flow Specification Rules"; + } + enum vpnv4DissFlow { + value "134"; + description + "VPNv4 dissemination of flow specification rules"; + reference + "RFC 5575: Dissemination of Flow Specification Rules"; + } + // values 135-139 are reserved by IANA + enum vpnAutoDiscovery { + value "140"; + status "obsolete"; + description + "VPN auto-discovery"; + reference + "draft-ietf-l3vpn-bgpvpn-auto: Using BGP as an + Auto-Discovery Mechanism for VR-based Layer-3 VPNs"; + } + // values 141-240 are reserved by IANA + enum private241 { + value "241"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private242 { + value "242"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private243 { + value "243"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private244 { + value "244"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private245 { + value "245"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private246 { + value "246"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private247 { + value "247"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private248 { + value "248"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private249 { + value "249"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private250 { + value "250"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private251 { + value "251"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private252 { + value "252"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private253 { + value "253"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + enum private254 { + value "254"; + description + "Reserved for Private Use"; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4"; + } + // value 255 is reserved by IANA + } + description + "This typedef is a YANG enumeration of IANA-registered + subsequent address family identifiers (SAFI)."; + reference + "IANA SAFI Values registry. + "; + } +} diff --git a/experimental/odp/iana-hardware@2018-03-13.yang b/experimental/odp/iana-hardware@2018-03-13.yang new file mode 100644 index 000000000..5cd52648f --- /dev/null +++ b/experimental/odp/iana-hardware@2018-03-13.yang @@ -0,0 +1,189 @@ +module iana-hardware { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:iana-hardware"; + prefix ianahw; + + organization "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + + Tel: +1 310 301 5800 + E-Mail: iana@iana.org>"; + + description + "IANA-defined identities for hardware class. + + The latest revision of this YANG module can be obtained from + the IANA website. + + Requests for new values should be made to IANA via + email (iana@iana.org). + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + The initial version of this YANG module is part of RFC 8348; + see the RFC itself for full legal notices."; + reference + "https://www.iana.org/assignments/yang-parameters"; + + revision 2018-03-13 { + description + "Initial revision."; + reference + "RFC 8348: A YANG Data Model for Hardware Management"; + } + + /* + * Identities + */ + + identity hardware-class { + description + "This identity is the base for all hardware class + identifiers."; + } + + identity unknown { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is unknown + to the server."; + } + + identity chassis { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is an + overall container for networking equipment. Any class of + physical component, except a stack, may be contained within a + chassis; a chassis may only be contained within a stack."; + } + + identity backplane { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of device for aggregating and forwarding networking traffic, + such as a shared backplane in a modular ethernet switch. Note + that an implementation may model a backplane as a single + physical component, which is actually implemented as multiple + discrete physical components (within a chassis or stack)."; + } + + identity container { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is capable + of containing one or more removable physical entities, + possibly of different types. For example, each (empty or + full) slot in a chassis will be modeled as a container. Note + that all removable physical components should be modeled + within a container component, such as field-replaceable + modules, fans, or power supplies. Note that all known + containers should be modeled by the agent, including empty + containers."; + } + + identity power-supply { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is a + power-supplying component."; + } + + identity fan { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is a fan or + other heat-reduction component."; + } + + identity sensor { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of sensor, such as a temperature sensor within a router + chassis."; + } + + identity module { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of self-contained sub-system. If a module component is + removable, then it should be modeled within a container + + component; otherwise, it should be modeled directly within + another physical component (e.g., a chassis or another + module)."; + } + + identity port { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of networking port capable of receiving and/or transmitting + networking traffic."; + } + + identity stack { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of super-container (possibly virtual) intended to group + together multiple chassis entities. A stack may be realized + by a virtual cable, a real interconnect cable attached to + multiple chassis, or multiple interconnect cables. A stack + should not be modeled within any other physical components, + but a stack may be contained within another stack. Only + chassis components should be contained within a stack."; + } + + identity cpu { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of central processing unit."; + } + + identity energy-object { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of energy object, i.e., it is a piece of equipment that is + part of or attached to a communications network that is + monitored, it is controlled, or it aids in the management of + another device for Energy Management."; + } + + identity battery { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of battery."; + } + + identity storage-drive { + base ianahw:hardware-class; + description + "This identity is applicable if the hardware class is some sort + of component with data storage capability as its main + functionality, e.g., hard disk drive (HDD), solid-state device + (SSD), solid-state hybrid drive (SSHD), object storage device + (OSD), or other."; + } +} diff --git a/experimental/odp/iana-if-type.yang b/experimental/odp/iana-if-type.yang deleted file mode 100644 index c75974d00..000000000 --- a/experimental/odp/iana-if-type.yang +++ /dev/null @@ -1,1517 +0,0 @@ -module iana-if-type { - namespace "urn:ietf:params:xml:ns:yang:iana-if-type"; - prefix ianaift; - - organization "IANA"; - contact - " Internet Assigned Numbers Authority - - Postal: ICANN - 4676 Admiralty Way, Suite 330 - Marina del Rey, CA 90292 - - Tel: +1 310 823 9358 - E-Mail: iana&iana.org"; - description - "This YANG module defines the iana-if-type typedef, which - contains YANG definitions for IANA-registered interface types. - - This YANG module is maintained by IANA, and reflects the - 'ifType definitions' registry. - - The latest revision of this YANG module can be obtained from - the IANA web site. - - Copyright (c) 2011 IETF Trust and the persons identified as - authors of the code. All rights reserved. - - Redistribution and use in source and binary forms, with or - without modification, is permitted pursuant to, and subject - to the license terms contained in, the Simplified BSD License - set forth in Section 4.c of the IETF Trust's Legal Provisions - Relating to IETF Documents - (http://trustee.ietf.org/license-info). - - This version of this YANG module is part of RFC XXXX; see - the RFC itself for full legal notices."; - // RFC Ed.: replace XXXX with actual RFC number and remove this - // note. - - // RFC Ed.: update the date below with the date of RFC publication - // and remove this note. - revision 2013-07-04 { - description - "Initial revision."; - reference - "RFC XXXX: IANA Interface Type YANG Module"; - } - - typedef iana-if-type { - type enumeration { - enum "other" { - value 1; - description - "None of the following"; - } - enum "regular1822" { - value 2; - } - enum "hdh1822" { - value 3; - } - enum "ddnX25" { - value 4; - } - enum "rfc877x25" { - value 5; - reference - "RFC 1382 - SNMP MIB Extension for the X.25 Packet Layer"; - } - enum "ethernetCsmacd" { - value 6; - description - "For all ethernet-like interfaces, regardless of speed, - as per RFC3635."; - reference - "RFC 3635 - Definitions of Managed Objects for the - Ethernet-like Interface Types."; - } - enum "iso88023Csmacd" { - value 7; - status deprecated; - description - "Deprecated via RFC3635. - Use ethernetCsmacd(6) instead."; - reference - "RFC 3635 - Definitions of Managed Objects for the - Ethernet-like Interface Types."; - } - enum "iso88024TokenBus" { - value 8; - } - enum "iso88025TokenRing" { - value 9; - } - enum "iso88026Man" { - value 10; - } - enum "starLan" { - value 11; - status deprecated; - description - "Deprecated via RFC3635. - Use ethernetCsmacd(6) instead."; - reference - "RFC 3635 - Definitions of Managed Objects for the - Ethernet-like Interface Types."; - } - enum "proteon10Mbit" { - value 12; - } - enum "proteon80Mbit" { - value 13; - } - enum "hyperchannel" { - value 14; - } - enum "fddi" { - value 15; - reference - "RFC 1512 - FDDI Management Information Base"; - } - enum "lapb" { - value 16; - reference - "RFC 1381 - SNMP MIB Extension for X.25 LAPB"; - } - enum "sdlc" { - value 17; - } - enum "ds1" { - value 18; - description - "DS1-MIB"; - reference - "RFC 4805 - Definitions of Managed Objects for the - DS1, J1, E1, DS2, and E2 Interface Types"; - } - enum "e1" { - value 19; - status obsolete; - description - "Obsolete see DS1-MIB"; - reference - "RFC 4805 - Definitions of Managed Objects for the - DS1, J1, E1, DS2, and E2 Interface Types"; - } - enum "basicISDN" { - value 20; - description - "see also RFC2127"; - } - enum "primaryISDN" { - value 21; - } - enum "propPointToPointSerial" { - value 22; - description - "proprietary serial"; - } - enum "ppp" { - value 23; - } - enum "softwareLoopback" { - value 24; - } - enum "eon" { - value 25; - description - "CLNP over IP"; - } - enum "ethernet3Mbit" { - value 26; - } - enum "nsip" { - value 27; - description - "XNS over IP"; - } - enum "slip" { - value 28; - description - "generic SLIP"; - } - enum "ultra" { - value 29; - description - "ULTRA technologies"; - } - enum "ds3" { - value 30; - description - "DS3-MIB"; - reference - "RFC 3896 - Definitions of Managed Objects for the - DS3/E3 Interface Type"; - } - enum "sip" { - value 31; - description - "SMDS, coffee"; - reference - "RFC 1694 - Definitions of Managed Objects for SMDS - Interfaces using SMIv2"; - } - enum "frameRelay" { - value 32; - description - "DTE only."; - reference - "RFC 2115 - Management Information Base for Frame Relay - DTEs Using SMIv2"; - } - enum "rs232" { - value 33; - reference - "RFC 1659 - Definitions of Managed Objects for RS-232-like - Hardware Devices using SMIv2"; - } - enum "para" { - value 34; - description - "parallel-port"; - reference - "RFC 1660 - Definitions of Managed Objects for - Parallel-printer-like Hardware Devices using - SMIv2"; - } - enum "arcnet" { - value 35; - description - "arcnet"; - } - enum "arcnetPlus" { - value 36; - description - "arcnet plus"; - } - enum "atm" { - value 37; - description - "ATM cells"; - } - enum "miox25" { - value 38; - reference - "RFC 1461 - SNMP MIB extension for Multiprotocol - Interconnect over X.25"; - } - enum "sonet" { - value 39; - description - "SONET or SDH"; - } - enum "x25ple" { - value 40; - reference - "RFC 2127 - ISDN Management Information Base using SMIv2"; - } - enum "iso88022llc" { - value 41; - } - enum "localTalk" { - value 42; - } - enum "smdsDxi" { - value 43; - } - enum "frameRelayService" { - value 44; - description - "FRNETSERV-MIB"; - reference - "RFC 2954 - Definitions of Managed Objects for Frame - Relay Service"; - } - enum "v35" { - value 45; - } - enum "hssi" { - value 46; - } - enum "hippi" { - value 47; - } - enum "modem" { - value 48; - description - "Generic modem"; - } - enum "aal5" { - value 49; - description - "AAL5 over ATM"; - } - enum "sonetPath" { - value 50; - } - enum "sonetVT" { - value 51; - } - enum "smdsIcip" { - value 52; - description - "SMDS InterCarrier Interface"; - } - enum "propVirtual" { - value 53; - description - "proprietary virtual/internal"; - reference - "RFC 2863 - The Interfaces Group MIB"; - } - enum "propMultiplexor" { - value 54; - description - "proprietary multiplexing"; - reference - "RFC 2863 - The Interfaces Group MIB"; - } - enum "ieee80212" { - value 55; - description - "100BaseVG"; - } - enum "fibreChannel" { - value 56; - description - "Fibre Channel"; - } - enum "hippiInterface" { - value 57; - description - "HIPPI interfaces"; - } - enum "frameRelayInterconnect" { - value 58; - status obsolete; - description - "Obsolete use either - frameRelay(32) or frameRelayService(44)."; - } - enum "aflane8023" { - value 59; - description - "ATM Emulated LAN for 802.3"; - } - enum "aflane8025" { - value 60; - description - "ATM Emulated LAN for 802.5"; - } - enum "cctEmul" { - value 61; - description - "ATM Emulated circuit"; - } - enum "fastEther" { - value 62; - status deprecated; - description - "Obsoleted via RFC3635. - ethernetCsmacd(6) should be used instead"; - reference - "RFC 3635 - Definitions of Managed Objects for the - Ethernet-like Interface Types."; - } - enum "isdn" { - value 63; - description - "ISDN and X.25"; - reference - "RFC 1356 - Multiprotocol Interconnect on X.25 and ISDN - in the Packet Mode"; - } - enum "v11" { - value 64; - description - "CCITT V.11/X.21"; - } - enum "v36" { - value 65; - description - "CCITT V.36"; - } - enum "g703at64k" { - value 66; - description - "CCITT G703 at 64Kbps"; - } - enum "g703at2mb" { - value 67; - status obsolete; - description - "Obsolete see DS1-MIB"; - } - enum "qllc" { - value 68; - description - "SNA QLLC"; - } - enum "fastEtherFX" { - value 69; - status deprecated; - description - "Obsoleted via RFC3635 - ethernetCsmacd(6) should be used instead"; - reference - "RFC 3635 - Definitions of Managed Objects for the - Ethernet-like Interface Types."; - } - enum "channel" { - value 70; - description - "channel"; - } - enum "ieee80211" { - value 71; - description - "radio spread spectrum"; - } - enum "ibm370parChan" { - value 72; - description - "IBM System 360/370 OEMI Channel"; - } - enum "escon" { - value 73; - description - "IBM Enterprise Systems Connection"; - } - enum "dlsw" { - value 74; - description - "Data Link Switching"; - } - enum "isdns" { - value 75; - description - "ISDN S/T interface"; - } - enum "isdnu" { - value 76; - description - "ISDN U interface"; - } - enum "lapd" { - value 77; - description - "Link Access Protocol D"; - } - enum "ipSwitch" { - value 78; - description - "IP Switching Objects"; - } - enum "rsrb" { - value 79; - description - "Remote Source Route Bridging"; - } - enum "atmLogical" { - value 80; - description - "ATM Logical Port"; - reference - "RFC 3606 - Definitions of Supplemental Managed Objects - for ATM Interface"; - } - enum "ds0" { - value 81; - description - "Digital Signal Level 0"; - reference - "RFC 2494 - Definitions of Managed Objects for the DS0 - and DS0 Bundle Interface Type"; - } - enum "ds0Bundle" { - value 82; - description - "group of ds0s on the same ds1"; - reference - "RFC 2494 - Definitions of Managed Objects for the DS0 - and DS0 Bundle Interface Type"; - } - enum "bsc" { - value 83; - description - "Bisynchronous Protocol"; - } - enum "async" { - value 84; - description - "Asynchronous Protocol"; - } - enum "cnr" { - value 85; - description - "Combat Net Radio"; - } - enum "iso88025Dtr" { - value 86; - description - "ISO 802.5r DTR"; - } - enum "eplrs" { - value 87; - description - "Ext Pos Loc Report Sys"; - } - enum "arap" { - value 88; - description - "Appletalk Remote Access Protocol"; - } - enum "propCnls" { - value 89; - description - "Proprietary Connectionless Protocol"; - } - enum "hostPad" { - value 90; - description - "CCITT-ITU X.29 PAD Protocol"; - } - enum "termPad" { - value 91; - description - "CCITT-ITU X.3 PAD Facility"; - } - enum "frameRelayMPI" { - value 92; - description - "Multiproto Interconnect over FR"; - } - enum "x213" { - value 93; - description - "CCITT-ITU X213"; - } - enum "adsl" { - value 94; - description - "Asymmetric Digital Subscriber Loop"; - } - enum "radsl" { - value 95; - description - "Rate-Adapt. Digital Subscriber Loop"; - } - enum "sdsl" { - value 96; - description - "Symmetric Digital Subscriber Loop"; - } - enum "vdsl" { - value 97; - description - "Very H-Speed Digital Subscrib. Loop"; - } - enum "iso88025CRFPInt" { - value 98; - description - "ISO 802.5 CRFP"; - } - enum "myrinet" { - value 99; - description - "Myricom Myrinet"; - } - enum "voiceEM" { - value 100; - description - "voice recEive and transMit"; - } - enum "voiceFXO" { - value 101; - description - "voice Foreign Exchange Office"; - } - enum "voiceFXS" { - value 102; - description - "voice Foreign Exchange Station"; - } - enum "voiceEncap" { - value 103; - description - "voice encapsulation"; - } - enum "voiceOverIp" { - value 104; - description - "voice over IP encapsulation"; - } - enum "atmDxi" { - value 105; - description - "ATM DXI"; - } - enum "atmFuni" { - value 106; - description - "ATM FUNI"; - } - enum "atmIma" { - value 107; - description - "ATM IMA"; - } - enum "pppMultilinkBundle" { - value 108; - description - "PPP Multilink Bundle"; - } - enum "ipOverCdlc" { - value 109; - description - "IBM ipOverCdlc"; - } - enum "ipOverClaw" { - value 110; - description - "IBM Common Link Access to Workstn"; - } - enum "stackToStack" { - value 111; - description - "IBM stackToStack"; - } - enum "virtualIpAddress" { - value 112; - description - "IBM VIPA"; - } - enum "mpc" { - value 113; - description - "IBM multi-protocol channel support"; - } - enum "ipOverAtm" { - value 114; - description - "IBM ipOverAtm"; - reference - "RFC 2320 - Definitions of Managed Objects for Classical IP - and ARP Over ATM Using SMIv2 (IPOA-MIB)"; - } - enum "iso88025Fiber" { - value 115; - description - "ISO 802.5j Fiber Token Ring"; - } - enum "tdlc" { - value 116; - description - "IBM twinaxial data link control"; - } - enum "gigabitEthernet" { - value 117; - status deprecated; - description - "Obsoleted via RFC3635 - ethernetCsmacd(6) should be used instead"; - reference - "RFC 3635 - Definitions of Managed Objects for the - Ethernet-like Interface Types."; - } - enum "hdlc" { - value 118; - description - "HDLC"; - } - enum "lapf" { - value 119; - description - "LAP F"; - } - enum "v37" { - value 120; - description - "V.37"; - } - enum "x25mlp" { - value 121; - description - "Multi-Link Protocol"; - } - enum "x25huntGroup" { - value 122; - description - "X25 Hunt Group"; - } - enum "transpHdlc" { - value 123; - description - "Transp HDLC"; - } - enum "interleave" { - value 124; - description - "Interleave channel"; - } - enum "fast" { - value 125; - description - "Fast channel"; - } - enum "ip" { - value 126; - description - "IP (for APPN HPR in IP networks)"; - } - enum "docsCableMaclayer" { - value 127; - description - "CATV Mac Layer"; - } - enum "docsCableDownstream" { - value 128; - description - "CATV Downstream interface"; - } - enum "docsCableUpstream" { - value 129; - description - "CATV Upstream interface"; - } - enum "a12MppSwitch" { - value 130; - description - "Avalon Parallel Processor"; - } - enum "tunnel" { - value 131; - description - "Encapsulation interface"; - } - enum "coffee" { - value 132; - description - "coffee pot"; - reference - "RFC 2325 - Coffee MIB"; - } - enum "ces" { - value 133; - description - "Circuit Emulation Service"; - } - enum "atmSubInterface" { - value 134; - description - "ATM Sub Interface"; - } - enum "l2vlan" { - value 135; - description - "Layer 2 Virtual LAN using 802.1Q"; - } - enum "l3ipvlan" { - value 136; - description - "Layer 3 Virtual LAN using IP"; - } - enum "l3ipxvlan" { - value 137; - description - "Layer 3 Virtual LAN using IPX"; - } - enum "digitalPowerline" { - value 138; - description - "IP over Power Lines"; - } - enum "mediaMailOverIp" { - value 139; - description - "Multimedia Mail over IP"; - } - enum "dtm" { - value 140; - description - "Dynamic syncronous Transfer Mode"; - } - enum "dcn" { - value 141; - description - "Data Communications Network"; - } - enum "ipForward" { - value 142; - description - "IP Forwarding Interface"; - } - enum "msdsl" { - value 143; - description - "Multi-rate Symmetric DSL"; - } - enum "ieee1394" { - value 144; - description - "IEEE1394 High Performance Serial Bus"; - } - enum "if-gsn" { - value 145; - description - "HIPPI-6400"; - } - enum "dvbRccMacLayer" { - value 146; - description - "DVB-RCC MAC Layer"; - } - enum "dvbRccDownstream" { - value 147; - description - "DVB-RCC Downstream Channel"; - } - enum "dvbRccUpstream" { - value 148; - description - "DVB-RCC Upstream Channel"; - } - enum "atmVirtual" { - value 149; - description - "ATM Virtual Interface"; - } - enum "mplsTunnel" { - value 150; - description - "MPLS Tunnel Virtual Interface"; - } - enum "srp" { - value 151; - description - "Spatial Reuse Protocol"; - } - enum "voiceOverAtm" { - value 152; - description - "Voice Over ATM"; - } - enum "voiceOverFrameRelay" { - value 153; - description - "Voice Over Frame Relay"; - } - enum "idsl" { - value 154; - description - "Digital Subscriber Loop over ISDN"; - } - enum "compositeLink" { - value 155; - description - "Avici Composite Link Interface"; - } - enum "ss7SigLink" { - value 156; - description - "SS7 Signaling Link"; - } - enum "propWirelessP2P" { - value 157; - description - "Prop. P2P wireless interface"; - } - enum "frForward" { - value 158; - description - "Frame Forward Interface"; - } - enum "rfc1483" { - value 159; - description - "Multiprotocol over ATM AAL5"; - reference - "RFC 1483 - Multiprotocol Encapsulation over ATM - Adaptation Layer 5"; - } - enum "usb" { - value 160; - description - "USB Interface"; - } - enum "ieee8023adLag" { - value 161; - description - "IEEE 802.3ad Link Aggregate"; - } - enum "bgppolicyaccounting" { - value 162; - description - "BGP Policy Accounting"; - } - enum "frf16MfrBundle" { - value 163; - description - "FRF .16 Multilink Frame Relay"; - } - enum "h323Gatekeeper" { - value 164; - description - "H323 Gatekeeper"; - } - enum "h323Proxy" { - value 165; - description - "H323 Voice and Video Proxy"; - } - enum "mpls" { - value 166; - description - "MPLS"; - } - enum "mfSigLink" { - value 167; - description - "Multi-frequency signaling link"; - } - enum "hdsl2" { - value 168; - description - "High Bit-Rate DSL - 2nd generation"; - } - enum "shdsl" { - value 169; - description - "Multirate HDSL2"; - } - enum "ds1FDL" { - value 170; - description - "Facility Data Link 4Kbps on a DS1"; - } - enum "pos" { - value 171; - description - "Packet over SONET/SDH Interface"; - } - enum "dvbAsiIn" { - value 172; - description - "DVB-ASI Input"; - } - enum "dvbAsiOut" { - value 173; - description - "DVB-ASI Output"; - } - enum "plc" { - value 174; - description - "Power Line Communtications"; - } - enum "nfas" { - value 175; - description - "Non Facility Associated Signaling"; - } - enum "tr008" { - value 176; - description - "TR008"; - } - enum "gr303RDT" { - value 177; - description - "Remote Digital Terminal"; - } - enum "gr303IDT" { - value 178; - description - "Integrated Digital Terminal"; - } - enum "isup" { - value 179; - description - "ISUP"; - } - enum "propDocsWirelessMaclayer" { - value 180; - description - "Cisco proprietary Maclayer"; - } - enum "propDocsWirelessDownstream" { - value 181; - description - "Cisco proprietary Downstream"; - } - enum "propDocsWirelessUpstream" { - value 182; - description - "Cisco proprietary Upstream"; - } - enum "hiperlan2" { - value 183; - description - "HIPERLAN Type 2 Radio Interface"; - } - enum "propBWAp2Mp" { - value 184; - description - "PropBroadbandWirelessAccesspt2multipt use of this value - for IEEE 802.16 WMAN interfaces as per IEEE Std 802.16f - is deprecated and ieee80216WMAN(237) should be used - instead."; - } - enum "sonetOverheadChannel" { - value 185; - description - "SONET Overhead Channel"; - } - enum "digitalWrapperOverheadChannel" { - value 186; - description - "Digital Wrapper"; - } - enum "aal2" { - value 187; - description - "ATM adaptation layer 2"; - } - enum "radioMAC" { - value 188; - description - "MAC layer over radio links"; - } - enum "atmRadio" { - value 189; - description - "ATM over radio links"; - } - enum "imt" { - value 190; - description - "Inter Machine Trunks"; - } - enum "mvl" { - value 191; - description - "Multiple Virtual Lines DSL"; - } - enum "reachDSL" { - value 192; - description - "Long Reach DSL"; - } - enum "frDlciEndPt" { - value 193; - description - "Frame Relay DLCI End Point"; - } - enum "atmVciEndPt" { - value 194; - description - "ATM VCI End Point"; - } - enum "opticalChannel" { - value 195; - description - "Optical Channel"; - } - enum "opticalTransport" { - value 196; - description - "Optical Transport"; - } - enum "propAtm" { - value 197; - description - "Proprietary ATM"; - } - enum "voiceOverCable" { - value 198; - description - "Voice Over Cable Interface"; - } - enum "infiniband" { - value 199; - description - "Infiniband"; - } - enum "teLink" { - value 200; - description - "TE Link"; - } - enum "q2931" { - value 201; - description - "Q.2931"; - } - enum "virtualTg" { - value 202; - description - "Virtual Trunk Group"; - } - enum "sipTg" { - value 203; - description - "SIP Trunk Group"; - } - enum "sipSig" { - value 204; - description - "SIP Signaling"; - } - enum "docsCableUpstreamChannel" { - value 205; - description - "CATV Upstream Channel"; - } - enum "econet" { - value 206; - description - "Acorn Econet"; - } - enum "pon155" { - value 207; - description - "FSAN 155Mb Symetrical PON interface"; - } - enum "pon622" { - value 208; - description - "FSAN622Mb Symetrical PON interface"; - } - enum "bridge" { - value 209; - description - "Transparent bridge interface"; - } - enum "linegroup" { - value 210; - description - "Interface common to multiple lines"; - } - enum "voiceEMFGD" { - value 211; - description - "voice E&M Feature Group D"; - } - enum "voiceFGDEANA" { - value 212; - description - "voice FGD Exchange Access North American"; - } - enum "voiceDID" { - value 213; - description - "voice Direct Inward Dialing"; - } - enum "mpegTransport" { - value 214; - description - "MPEG transport interface"; - } - enum "sixToFour" { - value 215; - status deprecated; - description - "6to4 interface (DEPRECATED)"; - reference - "RFC 4087 - IP Tunnel MIB"; - } - enum "gtp" { - value 216; - description - "GTP (GPRS Tunneling Protocol)"; - } - enum "pdnEtherLoop1" { - value 217; - description - "Paradyne EtherLoop 1"; - } - enum "pdnEtherLoop2" { - value 218; - description - "Paradyne EtherLoop 2"; - } - enum "opticalChannelGroup" { - value 219; - description - "Optical Channel Group"; - } - enum "homepna" { - value 220; - description - "HomePNA ITU-T G.989"; - } - enum "gfp" { - value 221; - description - "Generic Framing Procedure (GFP)"; - } - enum "ciscoISLvlan" { - value 222; - description - "Layer 2 Virtual LAN using Cisco ISL"; - } - enum "actelisMetaLOOP" { - value 223; - description - "Acteleis proprietary MetaLOOP High Speed Link"; - } - enum "fcipLink" { - value 224; - description - "FCIP Link"; - } - enum "rpr" { - value 225; - description - "Resilient Packet Ring Interface Type"; - } - enum "qam" { - value 226; - description - "RF Qam Interface"; - } - enum "lmp" { - value 227; - description - "Link Management Protocol"; - reference - "RFC 4327 - Link Management Protocol (LMP) Management - Information Base (MIB)"; - } - enum "cblVectaStar" { - value 228; - description - "Cambridge Broadband Networks Limited VectaStar"; - } - enum "docsCableMCmtsDownstream" { - value 229; - description - "CATV Modular CMTS Downstream Interface"; - } - enum "adsl2" { - value 230; - status deprecated; - description - "Asymmetric Digital Subscriber Loop Version 2 - (DEPRECATED/OBSOLETED - please use adsl2plus(238) - instead)"; - reference - "RFC 4706 - Definitions of Managed Objects for Asymmetric - Digital Subscriber Line 2 (ADSL2)"; - } - enum "macSecControlledIF" { - value 231; - description - "MACSecControlled"; - } - enum "macSecUncontrolledIF" { - value 232; - description - "MACSecUncontrolled"; - } - enum "aviciOpticalEther" { - value 233; - description - "Avici Optical Ethernet Aggregate"; - } - enum "atmbond" { - value 234; - description - "atmbond"; - } - enum "voiceFGDOS" { - value 235; - description - "voice FGD Operator Services"; - } - enum "mocaVersion1" { - value 236; - description - "MultiMedia over Coax Alliance (MoCA) Interface - as documented in information provided privately to IANA"; - } - enum "ieee80216WMAN" { - value 237; - description - "IEEE 802.16 WMAN interface"; - } - enum "adsl2plus" { - value 238; - description - "Asymmetric Digital Subscriber Loop Version 2, - Version 2 Plus and all variants"; - } - enum "dvbRcsMacLayer" { - value 239; - description - "DVB-RCS MAC Layer"; - reference - "RFC 5728 - The SatLabs Group DVB-RCS MIB"; - } - enum "dvbTdm" { - value 240; - description - "DVB Satellite TDM"; - reference - "RFC 5728 - The SatLabs Group DVB-RCS MIB"; - } - enum "dvbRcsTdma" { - value 241; - description - "DVB-RCS TDMA"; - reference - "RFC 5728 - The SatLabs Group DVB-RCS MIB"; - } - enum "x86Laps" { - value 242; - description - "LAPS based on ITU-T X.86/Y.1323"; - } - enum "wwanPP" { - value 243; - description - "3GPP WWAN"; - } - enum "wwanPP2" { - value 244; - description - "3GPP2 WWAN"; - } - enum "voiceEBS" { - value 245; - description - "voice P-phone EBS physical interface"; - } - enum "ifPwType" { - value 246; - description - "Pseudowire interface type"; - reference - "RFC 5601 - Pseudowire (PW) Management Information Base"; - } - enum "ilan" { - value 247; - description - "Internal LAN on a bridge per IEEE 802.1ap"; - } - enum "pip" { - value 248; - description - "Provider Instance Port on a bridge per IEEE 802.1ah PBB"; - } - enum "aluELP" { - value 249; - description - "Alcatel-Lucent Ethernet Link Protection"; - } - enum "gpon" { - value 250; - description - "Gigabit-capable passive optical networks (G-PON) as per - ITU-T G.948"; - } - enum "vdsl2" { - value 251; - description - "Very high speed digital subscriber line Version 2 - (as per ITU-T Recommendation G.993.2)"; - reference - "RFC 5650 - Definitions of Managed Objects for Very High - Speed Digital Subscriber Line 2 (VDSL2)"; - } - enum "capwapDot11Profile" { - value 252; - description - "WLAN Profile Interface"; - reference - "RFC 5834 - Control and Provisioning of Wireless Access - Points (CAPWAP) Protocol Binding MIB for - IEEE 802.11"; - } - enum "capwapDot11Bss" { - value 253; - description - "WLAN BSS Interface"; - reference - "RFC 5834 - Control and Provisioning of Wireless Access - Points (CAPWAP) Protocol Binding MIB for - IEEE 802.11"; - } - enum "capwapWtpVirtualRadio" { - value 254; - description - "WTP Virtual Radio Interface"; - reference - "RFC 5833 - Control and Provisioning of Wireless Access - Points (CAPWAP) Protocol Base MIB"; - } - enum "bits" { - value 255; - description - "bitsport"; - } - enum "docsCableUpstreamRfPort" { - value 256; - description - "DOCSIS CATV Upstream RF Port"; - } - enum "cableDownstreamRfPort" { - value 257; - description - "CATV downstream RF port"; - } - enum "vmwareVirtualNic" { - value 258; - description - "VMware Virtual Network Interface"; - } - enum "ieee802154" { - value 259; - description - "IEEE 802.15.4 WPAN interface"; - reference - "IEEE 802.15.4-2006"; - } - enum "otnOdu" { - value 260; - description - "OTN Optical Data Unit"; - } - enum "otnOtu" { - value 261; - description - "OTN Optical channel Transport Unit"; - } - enum "ifVfiType" { - value 262; - description - "VPLS Forwarding Instance Interface Type"; - } - enum "g9981" { - value 263; - description - "G.998.1 bonded interface"; - } - enum "g9982" { - value 264; - description - "G.998.2 bonded interface"; - } - enum "g9983" { - value 265; - description - "G.998.3 bonded interface"; - } - enum "aluEpon" { - value 266; - description - "Ethernet Passive Optical Networks (E-PON)"; - } - enum "aluEponOnu" { - value 267; - description - "EPON Optical Network Unit"; - } - enum "aluEponPhysicalUni" { - value 268; - description - "EPON physical User to Network interface"; - } - enum "aluEponLogicalLink" { - value 269; - description - "The emulation of a point-to-point link over the EPON - layer"; - } - enum "aluGponOnu" { - value 270; - description - "GPON Optical Network Unit"; - reference - "ITU-T G.984.2"; - } - enum "aluGponPhysicalUni" { - value 271; - description - "GPON physical User to Network interface"; - reference - "ITU-T G.984.2"; - } - enum "vmwareNicTeam" { - value 272; - description - "VMware NIC Team"; - } - // value 273 reserved by IANA - } - description - "This data type is used as the syntax of the 'type' - leaf in the 'interface' list in the YANG module - ietf-interface. - - The definition of this typedef with the - addition of newly assigned values is published - periodically by the IANA, in either the Assigned - Numbers RFC, or some derivative of it specific to - Internet Network Management number assignments. (The - latest arrangements can be obtained by contacting the - IANA.) - - Requests for new values should be made to IANA via - email (iana&iana.org)."; - reference - "IANA ifType definitions registry. - "; - } -} diff --git a/experimental/odp/iana-if-type@2017-01-19.yang b/experimental/odp/iana-if-type@2017-01-19.yang new file mode 100644 index 000000000..7bfee3647 --- /dev/null +++ b/experimental/odp/iana-if-type@2017-01-19.yang @@ -0,0 +1,1619 @@ +module iana-if-type { + namespace "urn:ietf:params:xml:ns:yang:iana-if-type"; + prefix ianaift; + + import ietf-interfaces { + prefix if; + } + + organization "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States + + Tel: +1 310 301 5800 + "; + description + "This YANG module defines YANG identities for IANA-registered + interface types. + + This YANG module is maintained by IANA and reflects the + 'ifType definitions' registry. + + The latest revision of this YANG module can be obtained from + the IANA web site. + + Requests for new values should be made to IANA via + email (iana&iana.org). + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + The initial version of this YANG module is part of RFC 7224; + see the RFC itself for full legal notices."; + reference + "IANA 'ifType definitions' registry. + "; + + revision 2017-01-19 { + description + "Registered ifType 289."; + } + + revision 2016-11-23 { + description + "Registered ifTypes 283-288."; + } + + revision 2016-06-09 { + description + "Registered ifType 282."; + } + revision 2016-05-03 { + description + "Registered ifType 281."; + } + revision 2015-06-12 { + description + "Corrected formatting issue."; + } + revision 2014-09-24 { + description + "Registered ifType 280."; + } + revision 2014-09-19 { + description + "Registered ifType 279."; + } + revision 2014-07-03 { + description + "Registered ifTypes 277-278."; + } + revision 2014-05-19 { + description + "Updated the contact address."; + } + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + + identity iana-interface-type { + base if:interface-type; + description + "This identity is used as a base for all interface types + defined in the 'ifType definitions' registry."; + } + + identity other { + base iana-interface-type; + } + identity regular1822 { + base iana-interface-type; + } + identity hdh1822 { + base iana-interface-type; + } + identity ddnX25 { + base iana-interface-type; + } + identity rfc877x25 { + base iana-interface-type; + reference + "RFC 1382 - SNMP MIB Extension for the X.25 Packet Layer"; + } + identity ethernetCsmacd { + base iana-interface-type; + description + "For all Ethernet-like interfaces, regardless of speed, + as per RFC 3635."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity iso88023Csmacd { + base iana-interface-type; + status deprecated; + description + "Deprecated via RFC 3635. + Use ethernetCsmacd(6) instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity iso88024TokenBus { + base iana-interface-type; + } + identity iso88025TokenRing { + base iana-interface-type; + } + identity iso88026Man { + base iana-interface-type; + } + identity starLan { + base iana-interface-type; + status deprecated; + description + "Deprecated via RFC 3635. + Use ethernetCsmacd(6) instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity proteon10Mbit { + base iana-interface-type; + } + identity proteon80Mbit { + base iana-interface-type; + } + identity hyperchannel { + base iana-interface-type; + } + identity fddi { + base iana-interface-type; + reference + "RFC 1512 - FDDI Management Information Base"; + } + identity lapb { + base iana-interface-type; + reference + "RFC 1381 - SNMP MIB Extension for X.25 LAPB"; + } + identity sdlc { + base iana-interface-type; + } + identity ds1 { + base iana-interface-type; + description + "DS1-MIB."; + reference + "RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types"; + } + identity e1 { + base iana-interface-type; + status obsolete; + description + "Obsolete; see DS1-MIB."; + reference + "RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types"; + } + identity basicISDN { + base iana-interface-type; + description + "No longer used. See also RFC 2127."; + } + identity primaryISDN { + base iana-interface-type; + description + "No longer used. See also RFC 2127."; + } + identity propPointToPointSerial { + base iana-interface-type; + description + "Proprietary serial."; + } + identity ppp { + base iana-interface-type; + } + identity softwareLoopback { + base iana-interface-type; + } + identity eon { + base iana-interface-type; + description + "CLNP over IP."; + } + identity ethernet3Mbit { + base iana-interface-type; + } + identity nsip { + base iana-interface-type; + description + "XNS over IP."; + } + identity slip { + base iana-interface-type; + description + "Generic SLIP."; + } + identity ultra { + base iana-interface-type; + description + "Ultra Technologies."; + } + identity ds3 { + base iana-interface-type; + description + "DS3-MIB."; + reference + "RFC 3896 - Definitions of Managed Objects for the + DS3/E3 Interface Type"; + } + identity sip { + base iana-interface-type; + description + "SMDS, coffee."; + reference + "RFC 1694 - Definitions of Managed Objects for SMDS + Interfaces using SMIv2"; + } + identity frameRelay { + base iana-interface-type; + description + "DTE only."; + reference + "RFC 2115 - Management Information Base for Frame Relay + DTEs Using SMIv2"; + } + identity rs232 { + base iana-interface-type; + reference + "RFC 1659 - Definitions of Managed Objects for RS-232-like + Hardware Devices using SMIv2"; + } + identity para { + base iana-interface-type; + description + "Parallel-port."; + reference + "RFC 1660 - Definitions of Managed Objects for + Parallel-printer-like Hardware Devices using + SMIv2"; + } + identity arcnet { + base iana-interface-type; + description + "ARCnet."; + } + identity arcnetPlus { + base iana-interface-type; + description + "ARCnet Plus."; + } + identity atm { + base iana-interface-type; + description + "ATM cells."; + } + identity miox25 { + base iana-interface-type; + reference + "RFC 1461 - SNMP MIB extension for Multiprotocol + Interconnect over X.25"; + } + identity sonet { + base iana-interface-type; + description + "SONET or SDH."; + } + identity x25ple { + base iana-interface-type; + reference + "RFC 2127 - ISDN Management Information Base using SMIv2"; + } + identity iso88022llc { + base iana-interface-type; + } + identity localTalk { + base iana-interface-type; + } + identity smdsDxi { + base iana-interface-type; + } + identity frameRelayService { + base iana-interface-type; + description + "FRNETSERV-MIB."; + reference + "RFC 2954 - Definitions of Managed Objects for Frame + Relay Service"; + } + identity v35 { + base iana-interface-type; + } + identity hssi { + base iana-interface-type; + } + identity hippi { + base iana-interface-type; + } + identity modem { + base iana-interface-type; + description + "Generic modem."; + } + identity aal5 { + base iana-interface-type; + description + "AAL5 over ATM."; + } + identity sonetPath { + base iana-interface-type; + } + identity sonetVT { + base iana-interface-type; + } + identity smdsIcip { + base iana-interface-type; + description + "SMDS InterCarrier Interface."; + } + identity propVirtual { + base iana-interface-type; + description + "Proprietary virtual/internal."; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + identity propMultiplexor { + base iana-interface-type; + description + "Proprietary multiplexing."; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + identity ieee80212 { + base iana-interface-type; + description + "100BaseVG."; + } + identity fibreChannel { + base iana-interface-type; + description + "Fibre Channel."; + } + identity hippiInterface { + base iana-interface-type; + description + "HIPPI interfaces."; + } + identity frameRelayInterconnect { + base iana-interface-type; + status obsolete; + description + "Obsolete; use either + frameRelay(32) or frameRelayService(44)."; + } + identity aflane8023 { + base iana-interface-type; + description + "ATM Emulated LAN for 802.3."; + } + identity aflane8025 { + base iana-interface-type; + description + "ATM Emulated LAN for 802.5."; + } + identity cctEmul { + base iana-interface-type; + description + "ATM Emulated circuit."; + } + identity fastEther { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity isdn { + base iana-interface-type; + description + "ISDN and X.25."; + reference + "RFC 1356 - Multiprotocol Interconnect on X.25 and ISDN + in the Packet Mode"; + } + identity v11 { + base iana-interface-type; + description + "CCITT V.11/X.21."; + } + identity v36 { + base iana-interface-type; + description + "CCITT V.36."; + } + identity g703at64k { + base iana-interface-type; + description + "CCITT G703 at 64Kbps."; + } + identity g703at2mb { + base iana-interface-type; + status obsolete; + description + "Obsolete; see DS1-MIB."; + } + identity qllc { + base iana-interface-type; + description + "SNA QLLC."; + } + identity fastEtherFX { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity channel { + base iana-interface-type; + description + "Channel."; + } + identity ieee80211 { + base iana-interface-type; + description + "Radio spread spectrum."; + } + identity ibm370parChan { + base iana-interface-type; + description + "IBM System 360/370 OEMI Channel."; + } + identity escon { + base iana-interface-type; + description + "IBM Enterprise Systems Connection."; + } + identity dlsw { + base iana-interface-type; + description + "Data Link Switching."; + } + identity isdns { + base iana-interface-type; + description + "ISDN S/T interface."; + } + identity isdnu { + base iana-interface-type; + description + "ISDN U interface."; + } + identity lapd { + base iana-interface-type; + description + "Link Access Protocol D."; + } + identity ipSwitch { + base iana-interface-type; + description + "IP Switching Objects."; + } + identity rsrb { + base iana-interface-type; + description + "Remote Source Route Bridging."; + } + identity atmLogical { + base iana-interface-type; + description + "ATM Logical Port."; + reference + "RFC 3606 - Definitions of Supplemental Managed Objects + for ATM Interface"; + } + identity ds0 { + base iana-interface-type; + description + "Digital Signal Level 0."; + reference + "RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type"; + } + identity ds0Bundle { + base iana-interface-type; + description + "Group of ds0s on the same ds1."; + reference + "RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type"; + } + identity bsc { + base iana-interface-type; + description + "Bisynchronous Protocol."; + } + identity async { + base iana-interface-type; + description + "Asynchronous Protocol."; + } + identity cnr { + base iana-interface-type; + description + "Combat Net Radio."; + } + identity iso88025Dtr { + base iana-interface-type; + description + "ISO 802.5r DTR."; + } + identity eplrs { + base iana-interface-type; + description + "Ext Pos Loc Report Sys."; + } + identity arap { + base iana-interface-type; + description + "Appletalk Remote Access Protocol."; + } + identity propCnls { + base iana-interface-type; + description + "Proprietary Connectionless Protocol."; + } + identity hostPad { + base iana-interface-type; + description + "CCITT-ITU X.29 PAD Protocol."; + } + identity termPad { + base iana-interface-type; + description + "CCITT-ITU X.3 PAD Facility."; + } + identity frameRelayMPI { + base iana-interface-type; + description + "Multiproto Interconnect over FR."; + } + identity x213 { + base iana-interface-type; + description + "CCITT-ITU X213."; + } + identity adsl { + base iana-interface-type; + description + "Asymmetric Digital Subscriber Loop."; + } + identity radsl { + base iana-interface-type; + description + "Rate-Adapt. Digital Subscriber Loop."; + } + identity sdsl { + base iana-interface-type; + description + "Symmetric Digital Subscriber Loop."; + } + identity vdsl { + base iana-interface-type; + description + "Very H-Speed Digital Subscrib. Loop."; + } + identity iso88025CRFPInt { + base iana-interface-type; + description + "ISO 802.5 CRFP."; + } + identity myrinet { + base iana-interface-type; + description + "Myricom Myrinet."; + } + identity voiceEM { + base iana-interface-type; + description + "Voice recEive and transMit."; + } + identity voiceFXO { + base iana-interface-type; + description + "Voice Foreign Exchange Office."; + } + identity voiceFXS { + base iana-interface-type; + description + "Voice Foreign Exchange Station."; + } + identity voiceEncap { + base iana-interface-type; + description + "Voice encapsulation."; + } + identity voiceOverIp { + base iana-interface-type; + description + "Voice over IP encapsulation."; + } + identity atmDxi { + base iana-interface-type; + description + "ATM DXI."; + } + identity atmFuni { + base iana-interface-type; + description + "ATM FUNI."; + } + identity atmIma { + base iana-interface-type; + description + "ATM IMA."; + } + identity pppMultilinkBundle { + base iana-interface-type; + description + "PPP Multilink Bundle."; + } + identity ipOverCdlc { + base iana-interface-type; + description + "IBM ipOverCdlc."; + } + identity ipOverClaw { + base iana-interface-type; + description + "IBM Common Link Access to Workstn."; + } + identity stackToStack { + base iana-interface-type; + description + "IBM stackToStack."; + } + identity virtualIpAddress { + base iana-interface-type; + description + "IBM VIPA."; + } + identity mpc { + base iana-interface-type; + description + "IBM multi-protocol channel support."; + } + identity ipOverAtm { + base iana-interface-type; + description + "IBM ipOverAtm."; + reference + "RFC 2320 - Definitions of Managed Objects for Classical IP + and ARP Over ATM Using SMIv2 (IPOA-MIB)"; + } + identity iso88025Fiber { + base iana-interface-type; + description + "ISO 802.5j Fiber Token Ring."; + } + identity tdlc { + base iana-interface-type; + description + "IBM twinaxial data link control."; + } + identity gigabitEthernet { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity hdlc { + base iana-interface-type; + description + "HDLC."; + } + identity lapf { + base iana-interface-type; + description + "LAP F."; + } + identity v37 { + base iana-interface-type; + description + "V.37."; + } + identity x25mlp { + base iana-interface-type; + description + "Multi-Link Protocol."; + } + identity x25huntGroup { + base iana-interface-type; + description + "X25 Hunt Group."; + } + identity transpHdlc { + base iana-interface-type; + description + "Transp HDLC."; + } + identity interleave { + base iana-interface-type; + description + "Interleave channel."; + } + identity fast { + base iana-interface-type; + description + "Fast channel."; + } + identity ip { + base iana-interface-type; + description + "IP (for APPN HPR in IP networks)."; + } + identity docsCableMaclayer { + base iana-interface-type; + description + "CATV Mac Layer."; + } + identity docsCableDownstream { + base iana-interface-type; + description + "CATV Downstream interface."; + } + identity docsCableUpstream { + base iana-interface-type; + description + "CATV Upstream interface."; + } + identity a12MppSwitch { + base iana-interface-type; + description + "Avalon Parallel Processor."; + } + identity tunnel { + base iana-interface-type; + description + "Encapsulation interface."; + } + identity coffee { + base iana-interface-type; + description + "Coffee pot."; + reference + "RFC 2325 - Coffee MIB"; + } + identity ces { + base iana-interface-type; + description + "Circuit Emulation Service."; + } + identity atmSubInterface { + base iana-interface-type; + description + "ATM Sub Interface."; + } + identity l2vlan { + base iana-interface-type; + description + "Layer 2 Virtual LAN using 802.1Q."; + } + identity l3ipvlan { + base iana-interface-type; + description + "Layer 3 Virtual LAN using IP."; + } + identity l3ipxvlan { + base iana-interface-type; + description + "Layer 3 Virtual LAN using IPX."; + } + identity digitalPowerline { + base iana-interface-type; + description + "IP over Power Lines."; + } + identity mediaMailOverIp { + base iana-interface-type; + description + "Multimedia Mail over IP."; + } + identity dtm { + base iana-interface-type; + description + "Dynamic synchronous Transfer Mode."; + } + identity dcn { + base iana-interface-type; + description + "Data Communications Network."; + } + identity ipForward { + base iana-interface-type; + description + "IP Forwarding Interface."; + } + identity msdsl { + base iana-interface-type; + description + "Multi-rate Symmetric DSL."; + } + identity ieee1394 { + base iana-interface-type; + + description + "IEEE1394 High Performance Serial Bus."; + } + identity if-gsn { + base iana-interface-type; + description + "HIPPI-6400."; + } + identity dvbRccMacLayer { + base iana-interface-type; + description + "DVB-RCC MAC Layer."; + } + identity dvbRccDownstream { + base iana-interface-type; + description + "DVB-RCC Downstream Channel."; + } + identity dvbRccUpstream { + base iana-interface-type; + description + "DVB-RCC Upstream Channel."; + } + identity atmVirtual { + base iana-interface-type; + description + "ATM Virtual Interface."; + } + identity mplsTunnel { + base iana-interface-type; + description + "MPLS Tunnel Virtual Interface."; + } + identity srp { + base iana-interface-type; + description + "Spatial Reuse Protocol."; + } + identity voiceOverAtm { + base iana-interface-type; + description + "Voice over ATM."; + } + identity voiceOverFrameRelay { + base iana-interface-type; + description + "Voice Over Frame Relay."; + } + identity idsl { + base iana-interface-type; + description + "Digital Subscriber Loop over ISDN."; + } + identity compositeLink { + base iana-interface-type; + description + "Avici Composite Link Interface."; + } + identity ss7SigLink { + base iana-interface-type; + description + "SS7 Signaling Link."; + } + identity propWirelessP2P { + base iana-interface-type; + description + "Prop. P2P wireless interface."; + } + identity frForward { + base iana-interface-type; + description + "Frame Forward Interface."; + } + identity rfc1483 { + base iana-interface-type; + description + "Multiprotocol over ATM AAL5."; + reference + "RFC 1483 - Multiprotocol Encapsulation over ATM + Adaptation Layer 5"; + } + identity usb { + base iana-interface-type; + description + "USB Interface."; + } + identity ieee8023adLag { + base iana-interface-type; + description + "IEEE 802.3ad Link Aggregate."; + } + identity bgppolicyaccounting { + base iana-interface-type; + description + "BGP Policy Accounting."; + } + identity frf16MfrBundle { + base iana-interface-type; + description + "FRF.16 Multilink Frame Relay."; + } + identity h323Gatekeeper { + base iana-interface-type; + description + "H323 Gatekeeper."; + } + identity h323Proxy { + base iana-interface-type; + description + "H323 Voice and Video Proxy."; + } + identity mpls { + base iana-interface-type; + description + "MPLS."; + } + identity mfSigLink { + base iana-interface-type; + description + "Multi-frequency signaling link."; + } + identity hdsl2 { + base iana-interface-type; + description + "High Bit-Rate DSL - 2nd generation."; + } + identity shdsl { + base iana-interface-type; + description + "Multirate HDSL2."; + } + identity ds1FDL { + base iana-interface-type; + description + "Facility Data Link (4Kbps) on a DS1."; + } + identity pos { + base iana-interface-type; + description + "Packet over SONET/SDH Interface."; + } + identity dvbAsiIn { + base iana-interface-type; + description + "DVB-ASI Input."; + } + identity dvbAsiOut { + base iana-interface-type; + description + "DVB-ASI Output."; + } + identity plc { + base iana-interface-type; + description + "Power Line Communications."; + } + identity nfas { + base iana-interface-type; + description + "Non-Facility Associated Signaling."; + } + identity tr008 { + base iana-interface-type; + description + "TR008."; + } + identity gr303RDT { + base iana-interface-type; + description + "Remote Digital Terminal."; + } + identity gr303IDT { + base iana-interface-type; + description + "Integrated Digital Terminal."; + } + identity isup { + base iana-interface-type; + description + "ISUP."; + } + identity propDocsWirelessMaclayer { + base iana-interface-type; + description + "Cisco proprietary Maclayer."; + } + identity propDocsWirelessDownstream { + base iana-interface-type; + description + "Cisco proprietary Downstream."; + } + identity propDocsWirelessUpstream { + base iana-interface-type; + description + "Cisco proprietary Upstream."; + } + identity hiperlan2 { + base iana-interface-type; + description + "HIPERLAN Type 2 Radio Interface."; + } + identity propBWAp2Mp { + base iana-interface-type; + description + "PropBroadbandWirelessAccesspt2Multipt (use of this value + for IEEE 802.16 WMAN interfaces as per IEEE Std 802.16f + is deprecated, and ieee80216WMAN(237) should be used + instead)."; + } + identity sonetOverheadChannel { + base iana-interface-type; + description + "SONET Overhead Channel."; + } + identity digitalWrapperOverheadChannel { + base iana-interface-type; + description + "Digital Wrapper."; + } + identity aal2 { + base iana-interface-type; + description + "ATM adaptation layer 2."; + } + identity radioMAC { + base iana-interface-type; + description + "MAC layer over radio links."; + } + identity atmRadio { + base iana-interface-type; + description + "ATM over radio links."; + } + identity imt { + base iana-interface-type; + description + "Inter-Machine Trunks."; + } + identity mvl { + base iana-interface-type; + description + "Multiple Virtual Lines DSL."; + } + identity reachDSL { + base iana-interface-type; + description + "Long Reach DSL."; + } + identity frDlciEndPt { + base iana-interface-type; + description + "Frame Relay DLCI End Point."; + } + identity atmVciEndPt { + base iana-interface-type; + description + "ATM VCI End Point."; + } + identity opticalChannel { + base iana-interface-type; + description + "Optical Channel."; + } + identity opticalTransport { + base iana-interface-type; + description + "Optical Transport."; + } + identity propAtm { + base iana-interface-type; + description + "Proprietary ATM."; + } + identity voiceOverCable { + base iana-interface-type; + description + "Voice Over Cable Interface."; + } + identity infiniband { + base iana-interface-type; + description + "Infiniband."; + } + identity teLink { + base iana-interface-type; + description + "TE Link."; + } + identity q2931 { + base iana-interface-type; + description + "Q.2931."; + } + identity virtualTg { + base iana-interface-type; + description + "Virtual Trunk Group."; + } + identity sipTg { + base iana-interface-type; + description + "SIP Trunk Group."; + } + identity sipSig { + base iana-interface-type; + description + "SIP Signaling."; + } + identity docsCableUpstreamChannel { + base iana-interface-type; + description + "CATV Upstream Channel."; + } + identity econet { + base iana-interface-type; + description + "Acorn Econet."; + } + identity pon155 { + base iana-interface-type; + description + "FSAN 155Mb Symetrical PON interface."; + } + identity pon622 { + base iana-interface-type; + description + "FSAN 622Mb Symetrical PON interface."; + } + identity bridge { + base iana-interface-type; + description + "Transparent bridge interface."; + } + identity linegroup { + base iana-interface-type; + description + "Interface common to multiple lines."; + } + identity voiceEMFGD { + base iana-interface-type; + description + "Voice E&M Feature Group D."; + } + identity voiceFGDEANA { + base iana-interface-type; + description + "Voice FGD Exchange Access North American."; + } + identity voiceDID { + base iana-interface-type; + description + "Voice Direct Inward Dialing."; + } + identity mpegTransport { + base iana-interface-type; + description + "MPEG transport interface."; + } + identity sixToFour { + base iana-interface-type; + status deprecated; + description + "6to4 interface (DEPRECATED)."; + reference + "RFC 4087 - IP Tunnel MIB"; + } + identity gtp { + base iana-interface-type; + description + "GTP (GPRS Tunneling Protocol)."; + } + identity pdnEtherLoop1 { + base iana-interface-type; + description + "Paradyne EtherLoop 1."; + } + identity pdnEtherLoop2 { + base iana-interface-type; + description + "Paradyne EtherLoop 2."; + } + identity opticalChannelGroup { + base iana-interface-type; + description + "Optical Channel Group."; + } + identity homepna { + base iana-interface-type; + description + "HomePNA ITU-T G.989."; + } + identity gfp { + base iana-interface-type; + description + "Generic Framing Procedure (GFP)."; + } + identity ciscoISLvlan { + base iana-interface-type; + description + "Layer 2 Virtual LAN using Cisco ISL."; + } + identity actelisMetaLOOP { + base iana-interface-type; + description + "Acteleis proprietary MetaLOOP High Speed Link."; + } + identity fcipLink { + base iana-interface-type; + description + "FCIP Link."; + } + identity rpr { + base iana-interface-type; + description + "Resilient Packet Ring Interface Type."; + } + identity qam { + base iana-interface-type; + description + "RF Qam Interface."; + } + identity lmp { + base iana-interface-type; + description + "Link Management Protocol."; + reference + "RFC 4327 - Link Management Protocol (LMP) Management + Information Base (MIB)"; + } + identity cblVectaStar { + base iana-interface-type; + description + "Cambridge Broadband Networks Limited VectaStar."; + } + identity docsCableMCmtsDownstream { + base iana-interface-type; + description + "CATV Modular CMTS Downstream Interface."; + } + identity adsl2 { + base iana-interface-type; + status deprecated; + description + "Asymmetric Digital Subscriber Loop Version 2 + (DEPRECATED/OBSOLETED - please use adsl2plus(238) + instead)."; + reference + "RFC 4706 - Definitions of Managed Objects for Asymmetric + Digital Subscriber Line 2 (ADSL2)"; + } + identity macSecControlledIF { + base iana-interface-type; + description + "MACSecControlled."; + } + identity macSecUncontrolledIF { + base iana-interface-type; + description + "MACSecUncontrolled."; + } + identity aviciOpticalEther { + base iana-interface-type; + description + "Avici Optical Ethernet Aggregate."; + } + identity atmbond { + base iana-interface-type; + description + "atmbond."; + } + identity voiceFGDOS { + base iana-interface-type; + description + "Voice FGD Operator Services."; + } + identity mocaVersion1 { + base iana-interface-type; + description + "MultiMedia over Coax Alliance (MoCA) Interface + as documented in information provided privately to IANA."; + } + identity ieee80216WMAN { + base iana-interface-type; + description + "IEEE 802.16 WMAN interface."; + } + identity adsl2plus { + base iana-interface-type; + description + "Asymmetric Digital Subscriber Loop Version 2 - + Version 2 Plus and all variants."; + } + identity dvbRcsMacLayer { + base iana-interface-type; + description + "DVB-RCS MAC Layer."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity dvbTdm { + base iana-interface-type; + description + "DVB Satellite TDM."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity dvbRcsTdma { + base iana-interface-type; + description + "DVB-RCS TDMA."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity x86Laps { + base iana-interface-type; + description + "LAPS based on ITU-T X.86/Y.1323."; + } + identity wwanPP { + base iana-interface-type; + description + "3GPP WWAN."; + } + identity wwanPP2 { + base iana-interface-type; + description + "3GPP2 WWAN."; + } + identity voiceEBS { + base iana-interface-type; + description + "Voice P-phone EBS physical interface."; + } + identity ifPwType { + base iana-interface-type; + description + "Pseudowire interface type."; + reference + "RFC 5601 - Pseudowire (PW) Management Information Base (MIB)"; + } + identity ilan { + base iana-interface-type; + description + "Internal LAN on a bridge per IEEE 802.1ap."; + } + identity pip { + base iana-interface-type; + description + "Provider Instance Port on a bridge per IEEE 802.1ah PBB."; + } + identity aluELP { + base iana-interface-type; + description + "Alcatel-Lucent Ethernet Link Protection."; + } + identity gpon { + base iana-interface-type; + description + "Gigabit-capable passive optical networks (G-PON) as per + ITU-T G.948."; + } + identity vdsl2 { + base iana-interface-type; + description + "Very high speed digital subscriber line Version 2 + (as per ITU-T Recommendation G.993.2)."; + reference + "RFC 5650 - Definitions of Managed Objects for Very High + Speed Digital Subscriber Line 2 (VDSL2)"; + } + identity capwapDot11Profile { + base iana-interface-type; + description + "WLAN Profile Interface."; + reference + "RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11"; + } + identity capwapDot11Bss { + base iana-interface-type; + description + "WLAN BSS Interface."; + reference + "RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11"; + } + identity capwapWtpVirtualRadio { + base iana-interface-type; + description + "WTP Virtual Radio Interface."; + reference + "RFC 5833 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Base MIB"; + } + identity bits { + base iana-interface-type; + description + "bitsport."; + } + identity docsCableUpstreamRfPort { + base iana-interface-type; + description + "DOCSIS CATV Upstream RF Port."; + } + identity cableDownstreamRfPort { + base iana-interface-type; + description + "CATV downstream RF Port."; + } + identity vmwareVirtualNic { + base iana-interface-type; + description + "VMware Virtual Network Interface."; + } + identity ieee802154 { + base iana-interface-type; + description + "IEEE 802.15.4 WPAN interface."; + reference + "IEEE 802.15.4-2006"; + } + identity otnOdu { + base iana-interface-type; + description + "OTN Optical Data Unit."; + } + identity otnOtu { + base iana-interface-type; + description + "OTN Optical channel Transport Unit."; + } + identity ifVfiType { + base iana-interface-type; + description + "VPLS Forwarding Instance Interface Type."; + } + identity g9981 { + base iana-interface-type; + description + "G.998.1 bonded interface."; + } + identity g9982 { + base iana-interface-type; + description + "G.998.2 bonded interface."; + } + identity g9983 { + base iana-interface-type; + description + "G.998.3 bonded interface."; + } + + identity aluEpon { + base iana-interface-type; + description + "Ethernet Passive Optical Networks (E-PON)."; + } + identity aluEponOnu { + base iana-interface-type; + description + "EPON Optical Network Unit."; + } + identity aluEponPhysicalUni { + base iana-interface-type; + description + "EPON physical User to Network interface."; + } + identity aluEponLogicalLink { + base iana-interface-type; + description + "The emulation of a point-to-point link over the EPON + layer."; + } + identity aluGponOnu { + base iana-interface-type; + description + "GPON Optical Network Unit."; + reference + "ITU-T G.984.2"; + } + identity aluGponPhysicalUni { + base iana-interface-type; + description + "GPON physical User to Network interface."; + reference + "ITU-T G.984.2"; + } + identity vmwareNicTeam { + base iana-interface-type; + description + "VMware NIC Team."; + } + identity docsOfdmDownstream { + base iana-interface-type; + description + "CATV Downstream OFDM interface."; + } + identity docsOfdmaUpstream { + base iana-interface-type; + description + "CATV Upstream OFDMA interface."; + } + identity gfast { + base iana-interface-type; + description + "G.fast port."; + reference + "ITU-T G.9701"; + } + identity sdci { + base iana-interface-type; + description + "SDCI (IO-Link)."; + reference + "IEC 61131-9 Edition 1.0 2013-09"; + } + identity xboxWireless { + base iana-interface-type; + description + "Xbox wireless."; + } + identity fastdsl { + base iana-interface-type; + description + "FastDSL."; + reference + "BBF TR-355"; + } + identity docsCableScte55d1FwdOob { + base iana-interface-type; + description + "Cable SCTE 55-1 OOB Forward Channel."; + } + identity docsCableScte55d1RetOob { + base iana-interface-type; + description + "Cable SCTE 55-1 OOB Return Channel."; + } + identity docsCableScte55d2DsOob { + base iana-interface-type; + description + "Cable SCTE 55-2 OOB Downstream Channel."; + } + identity docsCableScte55d2UsOob { + base iana-interface-type; + description + "Cable SCTE 55-2 OOB Upstream Channel."; + } + identity docsCableNdf { + base iana-interface-type; + description + "Cable Narrowband Digital Forward."; + } + identity docsCableNdr { + base iana-interface-type; + description + "Cable Narrowband Digital Return."; + } + identity ptm { + base iana-interface-type; + description + "Packet Transfer Mode."; + } +} diff --git a/experimental/odp/iana-routing-types@2017-12-04.yang b/experimental/odp/iana-routing-types@2017-12-04.yang new file mode 100644 index 000000000..a538179c9 --- /dev/null +++ b/experimental/odp/iana-routing-types@2017-12-04.yang @@ -0,0 +1,471 @@ +module iana-routing-types { + namespace "urn:ietf:params:xml:ns:yang:iana-routing-types"; + prefix iana-rt-types; + + organization + "IANA"; + contact + "Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + Tel: +1 310 301 5800 + "; + + description + "This module contains a collection of YANG data types + considered defined by IANA and used for routing + protocols. + + Copyright (c) 2017 IETF Trust and the persons + identified as authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8294; see + the RFC itself for full legal notices."; + + revision 2017-12-04 { + description "Initial revision."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area. + Section 4."; + } + + /*** Collection of IANA types related to routing ***/ + /*** IANA Address Family enumeration ***/ + + typedef address-family { + type enumeration { + enum ipv4 { + value 1; + description + "IPv4 Address Family."; + } + + enum ipv6 { + value 2; + description + "IPv6 Address Family."; + } + + enum nsap { + value 3; + description + "OSI Network Service Access Point (NSAP) Address Family."; + } + + enum hdlc { + value 4; + description + "High-Level Data Link Control (HDLC) Address Family."; + } + + enum bbn1822 { + value 5; + description + "Bolt, Beranek, and Newman Report 1822 (BBN 1822) + Address Family."; + } + + enum ieee802 { + value 6; + description + "IEEE 802 Committee Address Family + (aka Media Access Control (MAC) address)."; + } + + enum e163 { + value 7; + description + "ITU-T E.163 Address Family."; + } + enum e164 { + value 8; + description + "ITU-T E.164 (Switched Multimegabit Data Service (SMDS), + Frame Relay, ATM) Address Family."; + } + + enum f69 { + value 9; + description + "ITU-T F.69 (Telex) Address Family."; + } + + enum x121 { + value 10; + description + "ITU-T X.121 (X.25, Frame Relay) Address Family."; + } + + enum ipx { + value 11; + description + "Novell Internetwork Packet Exchange (IPX) + Address Family."; + } + + enum appletalk { + value 12; + description + "Apple AppleTalk Address Family."; + } + + enum decnet-iv { + value 13; + description + "Digital Equipment DECnet Phase IV Address Family."; + } + + enum vines { + value 14; + description + "Banyan Vines Address Family."; + } + + enum e164-nsap { + value 15; + description + "ITU-T E.164 with NSAP sub-address Address Family."; + } + + enum dns { + value 16; + description + "Domain Name System (DNS) Address Family."; + } + + enum distinguished-name { + value 17; + description + "Distinguished Name Address Family."; + } + + enum as-num { + value 18; + description + "Autonomous System (AS) Number Address Family."; + } + + enum xtp-v4 { + value 19; + description + "Xpress Transport Protocol (XTP) over IPv4 + Address Family."; + } + + enum xtp-v6 { + value 20; + description + "XTP over IPv6 Address Family."; + } + + enum xtp-native { + value 21; + description + "XTP native mode Address Family."; + } + + enum fc-port { + value 22; + description + "Fibre Channel (FC) World-Wide Port Name Address Family."; + } + enum fc-node { + value 23; + description + "FC World-Wide Node Name Address Family."; + } + + enum gwid { + value 24; + description + "ATM Gateway Identifier (GWID) Number Address Family."; + } + + enum l2vpn { + value 25; + description + "Layer 2 VPN (L2VPN) Address Family."; + } + + enum mpls-tp-section-eid { + value 26; + description + "MPLS Transport Profile (MPLS-TP) Section Endpoint + Identifier Address Family."; + } + + enum mpls-tp-lsp-eid { + value 27; + description + "MPLS-TP Label Switched Path (LSP) Endpoint Identifier + Address Family."; + } + + enum mpls-tp-pwe-eid { + value 28; + description + "MPLS-TP Pseudowire Endpoint Identifier Address Family."; + } + + enum mt-v4 { + value 29; + description + "Multi-Topology IPv4 Address Family."; + } + + enum mt-v6 { + value 30; + description + "Multi-Topology IPv6 Address Family."; + } + + enum eigrp-common-sf { + value 16384; + description + "Enhanced Interior Gateway Routing Protocol (EIGRP) + Common Service Family Address Family."; + } + + enum eigrp-v4-sf { + value 16385; + description + "EIGRP IPv4 Service Family Address Family."; + } + + enum eigrp-v6-sf { + value 16386; + description + "EIGRP IPv6 Service Family Address Family."; + } + + enum lcaf { + value 16387; + description + "Locator/ID Separation Protocol (LISP) + Canonical Address Format (LCAF) Address Family."; + } + + enum bgp-ls { + value 16388; + description + "Border Gateway Protocol - Link State (BGP-LS) + Address Family."; + } + + enum mac-48 { + value 16389; + description + "IEEE 48-bit MAC Address Family."; + } + + enum mac-64 { + value 16390; + description + "IEEE 64-bit MAC Address Family."; + } + + enum trill-oui { + value 16391; + description + "Transparent Interconnection of Lots of Links (TRILL) + IEEE Organizationally Unique Identifier (OUI) + Address Family."; + } + + enum trill-mac-24 { + value 16392; + description + "TRILL final 3 octets of 48-bit MAC Address Family."; + } + + enum trill-mac-40 { + value 16393; + description + "TRILL final 5 octets of 64-bit MAC Address Family."; + } + + enum ipv6-64 { + value 16394; + description + "First 8 octets (64 bits) of IPv6 address + Address Family."; + } + + enum trill-rbridge-port-id { + value 16395; + description + "TRILL Routing Bridge (RBridge) Port ID Address Family."; + } + + enum trill-nickname { + value 16396; + description + "TRILL Nickname Address Family."; + } + } + + description + "Enumeration containing all the IANA-defined + Address Families."; + + } + + /*** Subsequent Address Family Identifiers (SAFIs) ***/ + /*** for multiprotocol BGP enumeration ***/ + + typedef bgp-safi { + type enumeration { + enum unicast-safi { + value 1; + description + "Unicast SAFI."; + } + + enum multicast-safi { + value 2; + description + "Multicast SAFI."; + } + + enum labeled-unicast-safi { + value 4; + description + "Labeled Unicast SAFI."; + } + + enum multicast-vpn-safi { + value 5; + description + "Multicast VPN SAFI."; + } + + enum pseudowire-safi { + value 6; + description + "Multi-segment Pseudowire VPN SAFI."; + } + + enum tunnel-encap-safi { + value 7; + description + "Tunnel Encap SAFI."; + } + + enum mcast-vpls-safi { + value 8; + description + "Multicast Virtual Private LAN Service (VPLS) SAFI."; + } + + enum tunnel-safi { + value 64; + description + "Tunnel SAFI."; + } + + enum vpls-safi { + value 65; + description + "VPLS SAFI."; + } + + enum mdt-safi { + value 66; + description + "Multicast Distribution Tree (MDT) SAFI."; + } + + enum v4-over-v6-safi { + value 67; + description + "IPv4 over IPv6 SAFI."; + } + + enum v6-over-v4-safi { + value 68; + description + "IPv6 over IPv4 SAFI."; + } + + enum l1-vpn-auto-discovery-safi { + value 69; + description + "Layer 1 VPN Auto-Discovery SAFI."; + } + + enum evpn-safi { + value 70; + description + "Ethernet VPN (EVPN) SAFI."; + } + + enum bgp-ls-safi { + value 71; + description + "BGP-LS SAFI."; + } + + enum bgp-ls-vpn-safi { + value 72; + description + "BGP-LS VPN SAFI."; + } + + enum sr-te-safi { + value 73; + description + "Segment Routing - Traffic Engineering (SR-TE) SAFI."; + } + + enum labeled-vpn-safi { + value 128; + description + "MPLS Labeled VPN SAFI."; + } + + enum multicast-mpls-vpn-safi { + value 129; + description + "Multicast for BGP/MPLS IP VPN SAFI."; + } + + enum route-target-safi { + value 132; + description + "Route Target SAFI."; + } + + enum ipv4-flow-spec-safi { + value 133; + description + "IPv4 Flow Specification SAFI."; + } + + enum vpnv4-flow-spec-safi { + value 134; + description + "IPv4 VPN Flow Specification SAFI."; + } + + enum vpn-auto-discovery-safi { + value 140; + description + "VPN Auto-Discovery SAFI."; + } + } + description + "Enumeration for BGP SAFI."; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4."; + } +} diff --git a/experimental/odp/iana.yang b/experimental/odp/iana.yang new file mode 100644 index 000000000..fd7423c6b --- /dev/null +++ b/experimental/odp/iana.yang @@ -0,0 +1,31 @@ +module iana { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:iana"; + prefix "iana"; + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the definition of types related to + Internet Assigned Numbers Authority. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2013-08-16" { + description + "Initial revision."; + reference "https://www.iana.org/"; + } + + typedef enterprise-number { + description "Private enterprise number."; + reference "https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers"; + type uint32; + } +} diff --git a/experimental/odp/id-manager.yang b/experimental/odp/id-manager.yang new file mode 100644 index 000000000..f2546e274 --- /dev/null +++ b/experimental/odp/id-manager.yang @@ -0,0 +1,158 @@ +module id-manager { + namespace "urn:opendaylight:genius:idmanager"; + prefix idmgr; + + revision "2016-04-06" { + description "YANG model describes methods for allocating or releasing Ids as well as to create/delete Id Pools. The child pools + are created inside the IdManager. This helps to improve ID Pool scalability/performance"; + } + + container id-pools { + description "Parent Id Pool is responsible allocating block (or) set of Ids to child Id Pools. The number of child pools are determined using some algorthimic approach inside IdManager. For example, spawning child pools based on Id allocation request rate for the given Pool, one child pool per blade in the cluster etc"; + config true; + list id-pool { + key "pool-name"; + leaf pool-name { + type string; + mandatory true; + } + leaf block-size { + type uint16; + mandatory true; + } + leaf parent-pool-name { + type string; + } + list child-pools { + key "child-pool-name"; + leaf child-pool-name { + type string; + mandatory true; + } + leaf last-access-time { + type uint32; + } + } + list id-entries { + description "Id entry for the given Id Pool, where id-key is used to identify the id entry"; + key "id-key"; + leaf id-key { type string;} + leaf-list id-value { + type uint32; + } + } + container available-ids-holder { + uses available-ids; + } + container released-ids-holder { + uses released-ids; + } + } + } + + grouping available-ids { + leaf start { + type uint32; + } + leaf end { + type uint32; + } + leaf cursor { + type int64; + } + } + + grouping released-ids { + leaf available-id-count { + type uint32; + } + leaf delayed-time-sec { + type uint32; + mandatory true; + } + list delayed-id-entries { + uses delayed-id-entry; + } + } + + grouping delayed-id-entry { + leaf id { + type uint32; + mandatory true; + } + leaf ready-time-sec { + type uint32; + mandatory true; + } + } + + rpc createIdPool { + input { + leaf pool-name { + type string; + } + leaf low { + type uint32; + } + leaf high { + type uint32; + } + } + } + + rpc deleteIdPool { + input { + leaf pool-name { + type string; + } + } + } + + rpc allocateId { + input { + leaf pool-name { + type string; + } + leaf id-key { + type string; + } + } + output { + leaf id-value { + type uint32; + } + } + } + + rpc releaseId { + input { + leaf pool-name { + type string; + } + leaf id-key { + type string; + } + } + } + + rpc allocateIdRange { + input { + leaf pool-name { + type string; + } + leaf id-key { + type string; + } + leaf size { + type uint32; + } + } + output { + leaf-list id-values{ + type uint32; + ordered-by user; + + } + } + } +} diff --git a/experimental/odp/ieee754.yang b/experimental/odp/ieee754.yang new file mode 100644 index 000000000..c64c84a1e --- /dev/null +++ b/experimental/odp/ieee754.yang @@ -0,0 +1,42 @@ +module ieee754 { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:ieee754"; + prefix "ieee754"; + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the definition of basic float types. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2013-08-19" { + description + "Initial revision."; + reference "IEEE 754-2008"; + } + + typedef float32 { + type binary { + length 4; + } + } + + typedef float64 { + type binary { + length 8; + } + } + + typedef float128 { + type binary { + length 16; + } + } +} diff --git a/experimental/odp/ietf-access-control-list.yang b/experimental/odp/ietf-access-control-list.yang new file mode 100644 index 000000000..90681653a --- /dev/null +++ b/experimental/odp/ietf-access-control-list.yang @@ -0,0 +1,209 @@ +module ietf-access-control-list { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-access-control-list"; + prefix acl; + import ietf-yang-types { + prefix yang; revision-date 2013-07-15; + } + import ietf-packet-fields { + prefix packet-fields; revision-date 2016-02-18; + } + organization "IETF NETMOD (NETCONF Data Modeling Language) + Working Group"; + contact + "WG Web: http://tools.ietf.org/wg/netmod/ + WG List: netmod@ietf.org + WG Chair: Juergen Schoenwaelder + j.schoenwaelder@jacobs-university.de + WG Chair: Tom Nadeau + tnadeau@lucidvision.com + Editor: Dean Bogdanovic + ivandean@gmail.com + Editor: Kiran Agrahara Sreenivasa + kkoushik@cisco.com + Editor: Lisa Huang + lyihuang@juniper.net + Editor: Dana Blair + dblair@cisco.com"; + description + "This YANG module defines a component that describing the + configuration of Access Control Lists (ACLs). + Copyright (c) 2016 IETF Trust and the persons identified as + the document authors. All rights reserved. + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's Legal + Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + revision 2016-02-18 { + description + "Base model for Network Access Control List (ACL)."; + reference + "RFC XXXX: Network Access Control List (ACL) + YANG Data Model"; + } + identity acl-base { + description + "Base Access Control List type for all Access Control List type + identifiers."; + } + identity ipv4-acl { + base acl:acl-base; + description + "ACL that primarily matches on fields from the IPv4 header + (e.g. IPv4 destination address) and layer 4 headers (e.g. TCP + destination port). An acl of type ipv4-acl does not contain + matches on fields in the ethernet header or the IPv6 header."; + } + identity ipv6-acl { + base acl:acl-base; + description + "ACL that primarily matches on fields from the IPv6 header + (e.g. IPv6 destination address) and layer 4 headers (e.g. TCP + destination port). An acl of type ipv6-acl does not contain + matches on fields in the ethernet header or the IPv4 header."; + } + identity eth-acl { + base acl:acl-base; + description + "ACL that primarily matches on fields in the ethernet header, + like 10/100/1000baseT or WiFi Access Control List. An acl of + type eth-acl does not contain matches on fields in the IPv4 + header, IPv6 header or layer 4 headers."; + } + typedef acl-type { + type identityref { + base acl:acl-base; + } + description + "This type is used to refer to an Access Control List + (ACL) type"; + } + typedef access-control-list-ref { + type leafref { + path "/access-lists/acl/acl-name"; + } + description + "This type is used by data models that need to reference an + Access Control List"; + } + container access-lists { + description + "This is a top level container for Access Control Lists. + It can have one or more Access Control Lists."; + list acl { + key "acl-type acl-name"; + description + "An Access Control List(ACL) is an ordered list of + Access List Entries (ACE). Each Access Control Entry has a + list of match criteria and a list of actions. + Since there are several kinds of Access Control Lists + implemented with different attributes for + different vendors, this + model accommodates customizing Access Control Lists for + each kind and for each vendor."; + leaf acl-name { + type string; + description + "The name of access-list. A device MAY restrict the length + and value of this name, possibly space and special + characters are not allowed."; + } + leaf acl-type { + type acl-type; + description + "Type of access control list. Indicates the primary intended + type of match criteria (e.g. ethernet, IPv4, IPv6, mixed, etc) + used in the list instance."; + } + container acl-oper-data { + config false; + description + "Overall Access Control List operational data"; + } + container access-list-entries { + description + "The access-list-entries container contains + a list of access-list-entries(ACE)."; + list ace { + key "rule-name"; + ordered-by user; + description + "List of access list entries(ACE)"; + leaf rule-name { + type string; + description + "A unique name identifying this Access List + Entry(ACE)."; + } + container matches { + description + "Definitions for match criteria for this Access List + Entry."; + choice ace-type { + description + "Type of access list entry."; + case ace-ip { + description "IP Access List Entry."; + choice ace-ip-version { + description + "IP version used in this Access List Entry."; + case ace-ipv4 { + uses packet-fields:acl-ipv4-header-fields; + } + case ace-ipv6 { + uses packet-fields:acl-ipv6-header-fields; + } + } + uses packet-fields:acl-ip-header-fields; + } + case ace-eth { + description + "Ethernet Access List entry."; + uses packet-fields:acl-eth-header-fields; + } + } + uses packet-fields:metadata; + } + container actions { + description + "Definitions of action criteria for this Access List + Entry."; + choice packet-handling { + default "deny"; + description + "Packet handling action."; + case deny { + leaf deny { + type empty; + description + "Deny action."; + } + } + case permit { + leaf permit { + type empty; + description + "Permit action."; + } + } + } + } + container ace-oper-data { + config false; + description + "Operational data for this Access List Entry."; + leaf match-counter { + type yang:counter64; + description + "Number of matches for this Access List Entry"; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/ietf-datastores@2018-02-14.yang b/experimental/odp/ietf-datastores@2018-02-14.yang new file mode 100644 index 000000000..9e875ab6a --- /dev/null +++ b/experimental/odp/ietf-datastores@2018-02-14.yang @@ -0,0 +1,117 @@ +module ietf-datastores { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-datastores"; + prefix ds; + + organization + "IETF Network Modeling (NETMOD) Working Group"; + + contact + "WG Web: + + WG List: + + Author: Martin Bjorklund + + + Author: Juergen Schoenwaelder + + + Author: Phil Shafer + + + Author: Kent Watsen + + + Author: Rob Wilton + "; + + description + "This YANG module defines a set of identities for identifying + datastores. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8342 + (https://www.rfc-editor.org/info/rfc8342); see the RFC itself + for full legal notices."; + + revision 2018-02-14 { + description + "Initial revision."; + reference + "RFC 8342: Network Management Datastore Architecture (NMDA)"; + } + + /* + * Identities + */ + + identity datastore { + description + "Abstract base identity for datastore identities."; + } + + identity conventional { + base datastore; + description + "Abstract base identity for conventional configuration + datastores."; + } + + identity running { + base conventional; + description + "The running configuration datastore."; + } + + identity candidate { + base conventional; + description + "The candidate configuration datastore."; + } + + identity startup { + base conventional; + description + "The startup configuration datastore."; + } + + identity intended { + base conventional; + description + "The intended configuration datastore."; + } + + identity dynamic { + base datastore; + description + "Abstract base identity for dynamic configuration datastores."; + } + + identity operational { + base datastore; + description + "The operational state datastore."; + } + + /* + * Type definitions + */ + + typedef datastore-ref { + type identityref { + base datastore; + } + description + "A datastore identity reference."; + } +} diff --git a/experimental/odp/ietf-hardware-state@2018-03-13.yang b/experimental/odp/ietf-hardware-state@2018-03-13.yang new file mode 100644 index 000000000..ec6742e55 --- /dev/null +++ b/experimental/odp/ietf-hardware-state@2018-03-13.yang @@ -0,0 +1,766 @@ +module ietf-hardware-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-hardware-state"; + prefix hw-state; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import iana-hardware { + prefix ianahw; + } + import ietf-hardware { + prefix hw; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Andy Bierman + + + Editor: Martin Bjorklund + + + Editor: Jie Dong + + Editor: Dan Romascanu + "; + + description + "This module contains a collection of YANG definitions for + monitoring hardware. + + This data model is designed as a temporary solution for + implementations that do not yet support the Network Management + Datastore Architecture (NMDA) defined in RFC 8342. Such an + implementation cannot implement the module 'ietf-hardware' + properly, since without NMDA support, it is not possible to + distinguish between instances of nodes in the running + configuration and operational states. + + The data model in this module is the same as the data model in + 'ietf-hardware', except all nodes are marked as 'config false'. + + If a server that implements this module but doesn't support NMDA + also supports configuration of hardware components, it SHOULD + also implement the module 'ietf-hardware' in the configuration + datastores. The corresponding state data is found in the + '/hw-state:hardware' subtree. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8348; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Initial revision."; + reference + "RFC 8348: A YANG Data Model for Hardware Management"; + } + + /* + * Features + */ + + feature entity-mib { + status deprecated; + description + "This feature indicates that the device implements + the ENTITY-MIB."; + reference + "RFC 6933: Entity MIB (Version 4)"; + } + + feature hardware-state { + status deprecated; + description + "Indicates that ENTITY-STATE-MIB objects are supported"; + reference + "RFC 4268: Entity State MIB"; + } + + feature hardware-sensor { + status deprecated; + description + "Indicates that ENTITY-SENSOR-MIB objects are supported"; + reference + "RFC 3433: Entity Sensor Management Information Base"; + } + + /* + * Data nodes + */ + + container hardware { + config false; + status deprecated; + description + "Data nodes representing components."; + + leaf last-change { + type yang:date-and-time; + status deprecated; + description + "The time the '/hardware/component' list changed in the + operational state."; + } + + list component { + key name; + status deprecated; + description + "List of components. + When the server detects a new hardware component, it + initializes a list entry in the operational state. + + If the server does not support configuration of hardware + components, list entries in the operational state are + initialized with values for all nodes as detected by the + implementation. + + Otherwise, this procedure is followed: + + 1. If there is an entry in the '/hardware/component' list + in the intended configuration with values for the nodes + 'class', 'parent', and 'parent-rel-pos' that are equal + to the detected values, then: + + 1a. If the configured entry has a value for 'mfg-name' + that is equal to the detected value or if the + 'mfg-name' value cannot be detected, then the list + entry in the operational state is initialized with the + configured values for all configured nodes, including + the 'name'. + + Otherwise, the list entry in the operational state is + initialized with values for all nodes as detected by + the implementation. The implementation may raise an + alarm that informs about the 'mfg-name' mismatch + condition. How this is done is outside the scope of + this document. + + 1b. Otherwise (i.e., there is no matching configuration + entry), the list entry in the operational state is + initialized with values for all nodes as detected by + the implementation. + + If the '/hardware/component' list in the intended + configuration is modified, then the system MUST behave as if + it re-initializes itself and follow the procedure in (1)."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalEntry"; + + leaf name { + type string; + status deprecated; + description + "The name assigned to this component. + + This name is not required to be the same as + entPhysicalName."; + } + + leaf class { + type identityref { + base ianahw:hardware-class; + } + mandatory true; + status deprecated; + description + "An indication of the general hardware type of the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalClass"; + } + + leaf physical-index { + if-feature entity-mib; + type int32 { + range "1..2147483647"; + } + status deprecated; + description + "The entPhysicalIndex for the entPhysicalEntry represented + by this list entry."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; + } + + leaf description { + type string; + status deprecated; + description + "A textual description of the component. This node should + contain a string that identifies the manufacturer's name + for the component and should be set to a distinct value + for each version or model of the component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalDescr"; + } + + leaf parent { + type leafref { + path "../../component/name"; + require-instance false; + } + status deprecated; + + description + "The name of the component that physically contains this + component. + + If this leaf is not instantiated, it indicates that this + component is not contained in any other component. + + In the event that a physical component is contained by + more than one physical component (e.g., double-wide + modules), this node contains the name of one of these + components. An implementation MUST use the same name + every time this node is instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalContainedIn"; + } + + leaf parent-rel-pos { + type int32 { + range "0 .. 2147483647"; + } + status deprecated; + description + "An indication of the relative position of this child + component among all its sibling components. Sibling + components are defined as components that: + + o share the same value of the 'parent' node and + + o share a common base identity for the 'class' node. + + Note that the last rule gives implementations flexibility + in how components are numbered. For example, some + implementations might have a single number series for all + components derived from 'ianahw:port', while some others + might have different number series for different + components with identities derived from 'ianahw:port' (for + example, one for RJ45 and one for SFP)."; + + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalParentRelPos"; + } + + leaf-list contains-child { + type leafref { + path "../../component/name"; + } + status deprecated; + description + "The name of the contained component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalChildIndex"; + } + + leaf hardware-rev { + type string; + status deprecated; + description + "The vendor-specific hardware revision string for the + component. The preferred value is the hardware revision + identifier actually printed on the component itself (if + present)."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalHardwareRev"; + } + + leaf firmware-rev { + type string; + status deprecated; + description + "The vendor-specific firmware revision string for the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalFirmwareRev"; + } + + leaf software-rev { + type string; + status deprecated; + description + "The vendor-specific software revision string for the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalSoftwareRev"; + } + + leaf serial-num { + type string; + status deprecated; + + description + "The vendor-specific serial number string for the + component. The preferred value is the serial number + string actually printed on the component itself (if + present)."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalSerialNum"; + } + + leaf mfg-name { + type string; + status deprecated; + description + "The name of the manufacturer of this physical component. + The preferred value is the manufacturer name string + actually printed on the component itself (if present). + + Note that comparisons between instances of the + 'model-name', 'firmware-rev', 'software-rev', and + 'serial-num' nodes are only meaningful amongst components + with the same value of 'mfg-name'. + + If the manufacturer name string associated with the + physical component is unknown to the server, then this + node is not instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgName"; + } + + leaf model-name { + type string; + status deprecated; + description + "The vendor-specific model name identifier string + associated with this physical component. The preferred + value is the customer-visible part number, which may be + printed on the component itself. + + If the model name string associated with the physical + component is unknown to the server, then this node is not + instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalModelName"; + } + + leaf alias { + type string; + status deprecated; + description + "An 'alias' name for the component, as specified by a + network manager, that provides a non-volatile 'handle' for + the component. + + If no configured value exists, the server MAY set the + value of this node to a locally unique value in the + operational state. + + A server implementation MAY map this leaf to the + entPhysicalAlias MIB object. Such an implementation needs + to use some mechanism to handle the differences in size + and characters allowed between this leaf and + entPhysicalAlias. The definition of such a mechanism is + outside the scope of this document."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalAlias"; + } + + leaf asset-id { + type string; + status deprecated; + description + "This node is a user-assigned asset tracking identifier for + the component. + + A server implementation MAY map this leaf to the + entPhysicalAssetID MIB object. Such an implementation + needs to use some mechanism to handle the differences in + size and characters allowed between this leaf and + entPhysicalAssetID. The definition of such a mechanism is + outside the scope of this document."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalAssetID"; + } + + leaf is-fru { + type boolean; + status deprecated; + description + "This node indicates whether or not this component is + considered a 'field-replaceable unit' by the vendor. If + this node contains the value 'true', then this component + identifies a field-replaceable unit. For all components + that are permanently contained within a field-replaceable + unit, the value 'false' should be returned for this + node."; + + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalIsFRU"; + } + + leaf mfg-date { + type yang:date-and-time; + status deprecated; + description + "The date of manufacturing of the managed component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgDate"; + } + + leaf-list uri { + type inet:uri; + status deprecated; + description + "This node contains identification information about the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalUris"; + } + + leaf uuid { + type yang:uuid; + status deprecated; + description + "A Universally Unique Identifier of the component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalUUID"; + } + + container state { + if-feature hardware-state; + status deprecated; + description + "State-related nodes"; + reference + "RFC 4268: Entity State MIB"; + + leaf state-last-changed { + type yang:date-and-time; + status deprecated; + description + "The date and time when the value of any of the + admin-state, oper-state, usage-state, alarm-state, or + standby-state changed for this component. + + If there has been no change since the last + re-initialization of the local system, this node + contains the date and time of local system + initialization. If there has been no change since the + component was added to the local system, this node + contains the date and time of the insertion."; + reference + "RFC 4268: Entity State MIB - entStateLastChanged"; + } + + leaf admin-state { + type hw:admin-state; + status deprecated; + description + "The administrative state for this component. + + This node refers to a component's administrative + permission to service both other components within its + containment hierarchy as well as other users of its + services defined by means outside the scope of this + module. + + Some components exhibit only a subset of the remaining + administrative state values. Some components cannot be + locked; hence, this node exhibits only the 'unlocked' + state. Other components cannot be shut down gracefully; + hence, this node does not exhibit the 'shutting-down' + state."; + reference + "RFC 4268: Entity State MIB - entStateAdmin"; + } + + leaf oper-state { + type hw:oper-state; + status deprecated; + description + "The operational state for this component. + + Note that this node does not follow the administrative + state. An administrative state of 'down' does not + predict an operational state of 'disabled'. + + Note that some implementations may not be able to + accurately report oper-state while the admin-state node + has a value other than 'unlocked'. In these cases, this + node MUST have a value of 'unknown'."; + reference + "RFC 4268: Entity State MIB - entStateOper"; + } + + leaf usage-state { + type hw:usage-state; + status deprecated; + description + "The usage state for this component. + + This node refers to a component's ability to service + more components in a containment hierarchy. + + Some components will exhibit only a subset of the usage + state values. Components that are unable to ever + service any components within a containment hierarchy + will always have a usage state of 'busy'. In some + cases, a component will be able to support only one + other component within its containment hierarchy and + will therefore only exhibit values of 'idle' and + 'busy'."; + reference + "RFC 4268: Entity State MIB - entStateUsage"; + } + + leaf alarm-state { + type hw:alarm-state; + status deprecated; + description + "The alarm state for this component. It does not + include the alarms raised on child components within its + containment hierarchy."; + reference + "RFC 4268: Entity State MIB - entStateAlarm"; + } + + leaf standby-state { + type hw:standby-state; + status deprecated; + description + "The standby state for this component. + + Some components will exhibit only a subset of the + remaining standby state values. If this component + cannot operate in a standby role, the value of this node + will always be 'providing-service'."; + reference + "RFC 4268: Entity State MIB - entStateStandby"; + } + } + container sensor-data { + when 'derived-from-or-self(../class, + "ianahw:sensor")' { + description + "Sensor data nodes present for any component of type + 'sensor'"; + } + if-feature hardware-sensor; + status deprecated; + + description + "Sensor-related nodes."; + reference + "RFC 3433: Entity Sensor Management Information Base"; + + leaf value { + type hw:sensor-value; + status deprecated; + description + "The most recent measurement obtained by the server + for this sensor. + + A client that periodically fetches this node should also + fetch the nodes 'value-type', 'value-scale', and + 'value-precision', since they may change when the value + is changed."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValue"; + } + + leaf value-type { + type hw:sensor-value-type; + status deprecated; + description + "The type of data units associated with the + sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorType"; + } + + leaf value-scale { + type hw:sensor-value-scale; + status deprecated; + description + "The (power of 10) scaling factor associated + with the sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorScale"; + } + + leaf value-precision { + type hw:sensor-value-precision; + status deprecated; + description + "The number of decimal places of precision + associated with the sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorPrecision"; + } + + leaf oper-status { + type hw:sensor-status; + status deprecated; + description + "The operational status of the sensor."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorOperStatus"; + } + + leaf units-display { + type string; + status deprecated; + description + "A textual description of the data units that should be + used in the display of the sensor value."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorUnitsDisplay"; + } + + leaf value-timestamp { + type yang:date-and-time; + status deprecated; + description + "The time the status and/or value of this sensor was last + obtained by the server."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValueTimeStamp"; + } + + leaf value-update-rate { + type uint32; + units "milliseconds"; + status deprecated; + description + "An indication of the frequency that the server updates + the associated 'value' node, represented in + milliseconds. The value zero indicates: + + - the sensor value is updated on demand (e.g., + when polled by the server for a get-request), + + - the sensor value is updated when the sensor + value changes (event-driven), or + + - the server does not know the update rate."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValueUpdateRate"; + } + } + } + } + + /* + * Notifications + */ + + notification hardware-state-change { + status deprecated; + description + "A hardware-state-change notification is generated when the + value of /hardware/last-change changes in the operational + state."; + reference + "RFC 6933: Entity MIB (Version 4) - entConfigChange"; + } + + notification hardware-state-oper-enabled { + if-feature hardware-state; + status deprecated; + description + "A hardware-state-oper-enabled notification signifies that a + component has transitioned into the 'enabled' state."; + + leaf name { + type leafref { + path "/hardware/component/name"; + } + status deprecated; + description + "The name of the component that has transitioned into the + 'enabled' state."; + } + leaf admin-state { + type leafref { + path "/hardware/component/state/admin-state"; + } + status deprecated; + description + "The administrative state for the component."; + } + leaf alarm-state { + type leafref { + path "/hardware/component/state/alarm-state"; + } + status deprecated; + description + "The alarm state for the component."; + } + reference + "RFC 4268: Entity State MIB - entStateOperEnabled"; + } + + notification hardware-state-oper-disabled { + if-feature hardware-state; + status deprecated; + description + "A hardware-state-oper-disabled notification signifies that a + component has transitioned into the 'disabled' state."; + + leaf name { + type leafref { + path "/hardware/component/name"; + } + status deprecated; + description + "The name of the component that has transitioned into the + 'disabled' state."; + } + leaf admin-state { + type leafref { + path "/hardware/component/state/admin-state"; + } + status deprecated; + + description + "The administrative state for the component."; + } + leaf alarm-state { + type leafref { + path "/hardware/component/state/alarm-state"; + } + status deprecated; + description + "The alarm state for the component."; + } + reference + "RFC 4268: Entity State MIB - entStateOperDisabled"; + } + +} diff --git a/experimental/odp/ietf-hardware@2018-03-13.yang b/experimental/odp/ietf-hardware@2018-03-13.yang new file mode 100644 index 000000000..4f984b616 --- /dev/null +++ b/experimental/odp/ietf-hardware@2018-03-13.yang @@ -0,0 +1,1194 @@ +module ietf-hardware { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-hardware"; + prefix hw; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import iana-hardware { + prefix ianahw; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Andy Bierman + + + Editor: Martin Bjorklund + + + Editor: Jie Dong + + + Editor: Dan Romascanu + "; + + description + "This module contains a collection of YANG definitions for + managing hardware. + + This data model is designed for the Network Management Datastore + Architecture (NMDA) defined in RFC 8342. + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8348; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Initial revision."; + reference + "RFC 8348: A YANG Data Model for Hardware Management"; + } + + /* + * Features + */ + + feature entity-mib { + description + "This feature indicates that the device implements + the ENTITY-MIB."; + reference + "RFC 6933: Entity MIB (Version 4)"; + } + + feature hardware-state { + description + "Indicates that ENTITY-STATE-MIB objects are supported"; + reference + "RFC 4268: Entity State MIB"; + } + + feature hardware-sensor { + description + "Indicates that ENTITY-SENSOR-MIB objects are supported"; + reference + "RFC 3433: Entity Sensor Management Information Base"; + } + + /* + * Typedefs + */ + + typedef admin-state { + type enumeration { + enum unknown { + value 1; + description + "The resource is unable to report administrative state."; + } + enum locked { + value 2; + description + "The resource is administratively prohibited from use."; + } + enum shutting-down { + value 3; + description + "The resource usage is administratively limited to current + instances of use."; + } + enum unlocked { + value 4; + description + "The resource is not administratively prohibited from + use."; + } + } + description + "Represents the various possible administrative states."; + reference + "RFC 4268: Entity State MIB - EntityAdminState"; + } + + typedef oper-state { + type enumeration { + enum unknown { + value 1; + description + "The resource is unable to report its operational state."; + } + enum disabled { + value 2; + description + "The resource is totally inoperable."; + } + enum enabled { + value 3; + + description + "The resource is partially or fully operable."; + } + enum testing { + value 4; + description + "The resource is currently being tested and cannot + therefore report whether or not it is operational."; + } + } + description + "Represents the possible values of operational states."; + reference + "RFC 4268: Entity State MIB - EntityOperState"; + } + + typedef usage-state { + type enumeration { + enum unknown { + value 1; + description + "The resource is unable to report usage state."; + } + enum idle { + value 2; + description + "The resource is servicing no users."; + } + enum active { + value 3; + description + "The resource is currently in use, and it has sufficient + spare capacity to provide for additional users."; + } + enum busy { + value 4; + description + "The resource is currently in use, but it currently has no + spare capacity to provide for additional users."; + } + } + description + "Represents the possible values of usage states."; + reference + "RFC 4268: Entity State MIB - EntityUsageState"; + } + + typedef alarm-state { + type bits { + bit unknown { + position 0; + description + "The resource is unable to report alarm state."; + } + bit under-repair { + position 1; + description + "The resource is currently being repaired, which, depending + on the implementation, may make the other values in this + bit string not meaningful."; + } + bit critical { + position 2; + description + "One or more critical alarms are active against the + resource."; + } + bit major { + position 3; + description + "One or more major alarms are active against the + resource."; + } + bit minor { + position 4; + description + "One or more minor alarms are active against the + resource."; + } + bit warning { + position 5; + description + "One or more warning alarms are active against the + resource."; + } + bit indeterminate { + position 6; + description + "One or more alarms of whose perceived severity cannot be + determined are active against this resource."; + } + } + description + "Represents the possible values of alarm states. An alarm is a + persistent indication of an error or warning condition. + + When no bits of this attribute are set, then no active alarms + are known against this component and it is not under repair."; + reference + "RFC 4268: Entity State MIB - EntityAlarmStatus"; + } + + typedef standby-state { + type enumeration { + enum unknown { + value 1; + description + "The resource is unable to report standby state."; + } + enum hot-standby { + value 2; + description + "The resource is not providing service, but it will be + immediately able to take over the role of the resource to + be backed up, without the need for initialization + activity, and will contain the same information as the + resource to be backed up."; + } + enum cold-standby { + value 3; + description + "The resource is to back up another resource, but it will + not be immediately able to take over the role of a + resource to be backed up and will require some + initialization activity."; + } + enum providing-service { + value 4; + description + "The resource is providing service."; + } + } + description + "Represents the possible values of standby states."; + reference + "RFC 4268: Entity State MIB - EntityStandbyStatus"; + } + + typedef sensor-value-type { + type enumeration { + enum other { + value 1; + description + "A measure other than those listed below."; + } + enum unknown { + value 2; + description + "An unknown measurement or arbitrary, relative numbers"; + } + enum volts-AC { + value 3; + description + "A measure of electric potential (alternating current)."; + } + enum volts-DC { + value 4; + description + "A measure of electric potential (direct current)."; + } + enum amperes { + value 5; + description + "A measure of electric current."; + } + enum watts { + value 6; + description + "A measure of power."; + } + enum hertz { + value 7; + description + "A measure of frequency."; + } + enum celsius { + value 8; + description + "A measure of temperature."; + } + enum percent-RH { + value 9; + description + "A measure of percent relative humidity."; + } + enum rpm { + value 10; + description + "A measure of shaft revolutions per minute."; + } + enum cmm { + value 11; + description + "A measure of cubic meters per minute (airflow)."; + } + enum truth-value { + value 12; + description + "Value is one of 1 (true) or 2 (false)"; + } + } + description + "A node using this data type represents the sensor measurement + data type associated with a physical sensor value. The actual + data units are determined by examining a node of this type + together with the associated sensor-value-scale node. + + A node of this type SHOULD be defined together with nodes of + type sensor-value-scale and type sensor-value-precision. + These three types are used to identify the semantics of a node + of type sensor-value."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorDataType"; + } + + typedef sensor-value-scale { + type enumeration { + enum yocto { + value 1; + description + "Data scaling factor of 10^-24."; + } + enum zepto { + value 2; + description + "Data scaling factor of 10^-21."; + } + enum atto { + value 3; + description + "Data scaling factor of 10^-18."; + } + enum femto { + value 4; + description + "Data scaling factor of 10^-15."; + } + enum pico { + value 5; + description + "Data scaling factor of 10^-12."; + } + enum nano { + value 6; + description + "Data scaling factor of 10^-9."; + } + enum micro { + value 7; + description + "Data scaling factor of 10^-6."; + } + enum milli { + value 8; + description + "Data scaling factor of 10^-3."; + } + enum units { + value 9; + description + "Data scaling factor of 10^0."; + } + enum kilo { + value 10; + description + "Data scaling factor of 10^3."; + } + enum mega { + value 11; + description + "Data scaling factor of 10^6."; + } + enum giga { + value 12; + description + "Data scaling factor of 10^9."; + } + enum tera { + value 13; + description + "Data scaling factor of 10^12."; + } + enum peta { + value 14; + description + "Data scaling factor of 10^15."; + } + enum exa { + value 15; + description + "Data scaling factor of 10^18."; + } + enum zetta { + value 16; + description + "Data scaling factor of 10^21."; + } + enum yotta { + value 17; + description + "Data scaling factor of 10^24."; + } + } + description + "A node using this data type represents a data scaling factor, + represented with an International System of Units (SI) prefix. + The actual data units are determined by examining a node of + this type together with the associated sensor-value-type. + + A node of this type SHOULD be defined together with nodes of + type sensor-value-type and type sensor-value-precision. + Together, associated nodes of these three types are used to + identify the semantics of a node of type sensor-value."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorDataScale"; + } + + typedef sensor-value-precision { + type int8 { + range "-8 .. 9"; + } + description + "A node using this data type represents a sensor value + precision range. + + A node of this type SHOULD be defined together with nodes of + type sensor-value-type and type sensor-value-scale. Together, + associated nodes of these three types are used to identify the + semantics of a node of type sensor-value. + + If a node of this type contains a value in the range 1 to 9, + it represents the number of decimal places in the fractional + part of an associated sensor-value fixed-point number. + + If a node of this type contains a value in the range -8 to -1, + it represents the number of accurate digits in the associated + sensor-value fixed-point number. + + The value zero indicates the associated sensor-value node is + not a fixed-point number. + + Server implementers must choose a value for the associated + sensor-value-precision node so that the precision and accuracy + of the associated sensor-value node is correctly indicated. + + For example, a component representing a temperature sensor + that can measure 0 to 100 degrees C in 0.1 degree + increments, +/- 0.05 degrees, would have a + sensor-value-precision value of '1', a sensor-value-scale + value of 'units', and a sensor-value ranging from '0' to + '1000'. The sensor-value would be interpreted as + 'degrees C * 10'."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorPrecision"; + } + + typedef sensor-value { + type int32 { + range "-1000000000 .. 1000000000"; + } + description + "A node using this data type represents a sensor value. + + A node of this type SHOULD be defined together with nodes of + type sensor-value-type, type sensor-value-scale, and + type sensor-value-precision. Together, associated nodes of + those three types are used to identify the semantics of a node + of this data type. + + The semantics of a node using this data type are determined by + the value of the associated sensor-value-type node. + + If the associated sensor-value-type node is equal to 'voltsAC', + 'voltsDC', 'amperes', 'watts', 'hertz', 'celsius', or 'cmm', + then a node of this type MUST contain a fixed-point number + ranging from -999,999,999 to +999,999,999. The value + -1000000000 indicates an underflow error. The value + +1000000000 indicates an overflow error. The + sensor-value-precision indicates how many fractional digits + are represented in the associated sensor-value node. + + If the associated sensor-value-type node is equal to + 'percentRH', then a node of this type MUST contain a number + ranging from 0 to 100. + + If the associated sensor-value-type node is equal to 'rpm', + then a node of this type MUST contain a number ranging from + -999,999,999 to +999,999,999. + + If the associated sensor-value-type node is equal to + 'truth-value', then a node of this type MUST contain either the + value 1 (true) or the value 2 (false). + + If the associated sensor-value-type node is equal to 'other' or + 'unknown', then a node of this type MUST contain a number + ranging from -1000000000 to 1000000000."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorValue"; + } + + typedef sensor-status { + type enumeration { + enum ok { + value 1; + description + "Indicates that the server can obtain the sensor value."; + } + enum unavailable { + value 2; + description + "Indicates that the server presently cannot obtain the + sensor value."; + } + enum nonoperational { + value 3; + description + "Indicates that the server believes the sensor is broken. + The sensor could have a hard failure (disconnected wire) + or a soft failure such as out-of-range, jittery, or wildly + fluctuating readings."; + } + } + description + "A node using this data type represents the operational status + of a physical sensor."; + reference + "RFC 3433: Entity Sensor Management Information Base - + EntitySensorStatus"; + } + + /* + * Data nodes + */ + + container hardware { + description + "Data nodes representing components. + + If the server supports configuration of hardware components, + then this data model is instantiated in the configuration + datastores supported by the server. The leaf-list 'datastore' + for the module 'ietf-hardware' in the YANG library provides + this information."; + + leaf last-change { + type yang:date-and-time; + config false; + description + "The time the '/hardware/component' list changed in the + operational state."; + } + + list component { + key name; + description + "List of components. + + When the server detects a new hardware component, it + initializes a list entry in the operational state. + + If the server does not support configuration of hardware + components, list entries in the operational state are + initialized with values for all nodes as detected by the + implementation. + + Otherwise, this procedure is followed: + + 1. If there is an entry in the '/hardware/component' list + in the intended configuration with values for the nodes + 'class', 'parent', and 'parent-rel-pos' that are equal + to the detected values, then the list entry in the + operational state is initialized with the configured + values, including the 'name'. + + 2. Otherwise (i.e., there is no matching configuration + entry), the list entry in the operational state is + initialized with values for all nodes as detected by + the implementation. + + If the '/hardware/component' list in the intended + configuration is modified, then the system MUST behave as if + it re-initializes itself and follow the procedure in (1)."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalEntry"; + + leaf name { + type string; + description + "The name assigned to this component. + + This name is not required to be the same as + entPhysicalName."; + } + + leaf class { + type identityref { + base ianahw:hardware-class; + } + mandatory true; + description + "An indication of the general hardware type of the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalClass"; + } + + leaf physical-index { + if-feature entity-mib; + type int32 { + range "1..2147483647"; + } + config false; + description + "The entPhysicalIndex for the entPhysicalEntry represented + by this list entry."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalIndex"; + } + + leaf description { + type string; + config false; + description + "A textual description of the component. This node should + contain a string that identifies the manufacturer's name + for the component and should be set to a distinct value + for each version or model of the component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalDescr"; + } + + leaf parent { + type leafref { + path "../../component/name"; + require-instance false; + } + description + "The name of the component that physically contains this + component. + + If this leaf is not instantiated, it indicates that this + component is not contained in any other component. + + In the event that a physical component is contained by + more than one physical component (e.g., double-wide + modules), this node contains the name of one of these + components. An implementation MUST use the same name + every time this node is instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalContainedIn"; + } + + leaf parent-rel-pos { + type int32 { + range "0 .. 2147483647"; + } + description + "An indication of the relative position of this child + component among all its sibling components. Sibling + components are defined as components that: + + o share the same value of the 'parent' node and + + o share a common base identity for the 'class' node. + + Note that the last rule gives implementations flexibility + in how components are numbered. For example, some + implementations might have a single number series for all + components derived from 'ianahw:port', while some others + might have different number series for different + components with identities derived from 'ianahw:port' (for + example, one for registered jack 45 (RJ45) and one for + small form-factor pluggable (SFP))."; + + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalParentRelPos"; + } + + leaf-list contains-child { + type leafref { + path "../../component/name"; + } + config false; + description + "The name of the contained component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalChildIndex"; + } + + leaf hardware-rev { + type string; + config false; + description + "The vendor-specific hardware revision string for the + component. The preferred value is the hardware revision + identifier actually printed on the component itself (if + present)."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalHardwareRev"; + } + + leaf firmware-rev { + type string; + config false; + description + "The vendor-specific firmware revision string for the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalFirmwareRev"; + } + + leaf software-rev { + type string; + config false; + + description + "The vendor-specific software revision string for the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - + entPhysicalSoftwareRev"; + } + + leaf serial-num { + type string; + config false; + description + "The vendor-specific serial number string for the + component. The preferred value is the serial number + string actually printed on the component itself (if + present)."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalSerialNum"; + } + + leaf mfg-name { + type string; + config false; + description + "The name of the manufacturer of this physical component. + The preferred value is the manufacturer name string + actually printed on the component itself (if present). + + Note that comparisons between instances of the + 'model-name', 'firmware-rev', 'software-rev', and + 'serial-num' nodes are only meaningful amongst components + with the same value of 'mfg-name'. + + If the manufacturer name string associated with the + physical component is unknown to the server, then this + node is not instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgName"; + } + + leaf model-name { + type string; + config false; + description + "The vendor-specific model name identifier string + associated with this physical component. The preferred + value is the customer-visible part number, which may be + printed on the component itself. + If the model name string associated with the physical + component is unknown to the server, then this node is not + instantiated."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalModelName"; + } + + leaf alias { + type string; + description + "An 'alias' name for the component, as specified by a + network manager, that provides a non-volatile 'handle' for + the component. + + If no configured value exists, the server MAY set the + value of this node to a locally unique value in the + operational state. + + A server implementation MAY map this leaf to the + entPhysicalAlias MIB object. Such an implementation needs + to use some mechanism to handle the differences in size + and characters allowed between this leaf and + entPhysicalAlias. The definition of such a mechanism is + outside the scope of this document."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalAlias"; + } + + leaf asset-id { + type string; + description + "This node is a user-assigned asset tracking identifier for + the component. + + A server implementation MAY map this leaf to the + entPhysicalAssetID MIB object. Such an implementation + needs to use some mechanism to handle the differences in + size and characters allowed between this leaf and + entPhysicalAssetID. The definition of such a mechanism is + outside the scope of this document."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalAssetID"; + } + + leaf is-fru { + type boolean; + config false; + + description + "This node indicates whether or not this component is + considered a 'field-replaceable unit' by the vendor. If + this node contains the value 'true', then this component + identifies a field-replaceable unit. For all components + that are permanently contained within a field-replaceable + unit, the value 'false' should be returned for this + node."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalIsFRU"; + } + + leaf mfg-date { + type yang:date-and-time; + config false; + description + "The date of manufacturing of the managed component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalMfgDate"; + } + + leaf-list uri { + type inet:uri; + description + "This node contains identification information about the + component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalUris"; + } + + leaf uuid { + type yang:uuid; + config false; + description + "A Universally Unique Identifier of the component."; + reference + "RFC 6933: Entity MIB (Version 4) - entPhysicalUUID"; + } + + container state { + if-feature hardware-state; + description + "State-related nodes"; + reference + "RFC 4268: Entity State MIB"; + + leaf state-last-changed { + type yang:date-and-time; + config false; + description + "The date and time when the value of any of the + admin-state, oper-state, usage-state, alarm-state, or + standby-state changed for this component. + + If there has been no change since the last + re-initialization of the local system, this node + contains the date and time of local system + initialization. If there has been no change since the + component was added to the local system, this node + contains the date and time of the insertion."; + reference + "RFC 4268: Entity State MIB - entStateLastChanged"; + } + + leaf admin-state { + type admin-state; + description + "The administrative state for this component. + + This node refers to a component's administrative + permission to service both other components within its + containment hierarchy as well other users of its + services defined by means outside the scope of this + module. + + Some components exhibit only a subset of the remaining + administrative state values. Some components cannot be + locked; hence, this node exhibits only the 'unlocked' + state. Other components cannot be shut down gracefully; + hence, this node does not exhibit the 'shutting-down' + state."; + reference + "RFC 4268: Entity State MIB - entStateAdmin"; + } + + leaf oper-state { + type oper-state; + config false; + description + "The operational state for this component. + + Note that this node does not follow the administrative + state. An administrative state of 'down' does not + predict an operational state of 'disabled'. + + Note that some implementations may not be able to + accurately report oper-state while the admin-state node + has a value other than 'unlocked'. In these cases, this + node MUST have a value of 'unknown'."; + reference + "RFC 4268: Entity State MIB - entStateOper"; + } + + leaf usage-state { + type usage-state; + config false; + description + "The usage state for this component. + + This node refers to a component's ability to service + more components in a containment hierarchy. + + Some components will exhibit only a subset of the usage + state values. Components that are unable to ever + service any components within a containment hierarchy + will always have a usage state of 'busy'. In some + cases, a component will be able to support only one + other component within its containment hierarchy and + will therefore only exhibit values of 'idle' and + 'busy'."; + reference + "RFC 4268: Entity State MIB - entStateUsage"; + } + + leaf alarm-state { + type alarm-state; + config false; + description + "The alarm state for this component. It does not + include the alarms raised on child components within its + containment hierarchy."; + reference + "RFC 4268: Entity State MIB - entStateAlarm"; + } + + leaf standby-state { + type standby-state; + config false; + description + "The standby state for this component. + + Some components will exhibit only a subset of the + remaining standby state values. If this component + cannot operate in a standby role, the value of this node + will always be 'providing-service'."; + reference + "RFC 4268: Entity State MIB - entStateStandby"; + } + } + + container sensor-data { + when 'derived-from-or-self(../class, + "ianahw:sensor")' { + description + "Sensor data nodes present for any component of type + 'sensor'"; + } + if-feature hardware-sensor; + config false; + + description + "Sensor-related nodes."; + reference + "RFC 3433: Entity Sensor Management Information Base"; + + leaf value { + type sensor-value; + description + "The most recent measurement obtained by the server + for this sensor. + + A client that periodically fetches this node should also + fetch the nodes 'value-type', 'value-scale', and + 'value-precision', since they may change when the value + is changed."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValue"; + } + + leaf value-type { + type sensor-value-type; + description + "The type of data units associated with the + sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorType"; + } + leaf value-scale { + type sensor-value-scale; + description + "The (power of 10) scaling factor associated + with the sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorScale"; + } + + leaf value-precision { + type sensor-value-precision; + description + "The number of decimal places of precision + associated with the sensor value"; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorPrecision"; + } + + leaf oper-status { + type sensor-status; + description + "The operational status of the sensor."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorOperStatus"; + } + + leaf units-display { + type string; + description + "A textual description of the data units that should be + used in the display of the sensor value."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorUnitsDisplay"; + } + + leaf value-timestamp { + type yang:date-and-time; + description + "The time the status and/or value of this sensor was last + obtained by the server."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValueTimeStamp"; + } + leaf value-update-rate { + type uint32; + units "milliseconds"; + description + "An indication of the frequency that the server updates + the associated 'value' node, represented in + milliseconds. The value zero indicates: + + - the sensor value is updated on demand (e.g., + when polled by the server for a get-request), + + - the sensor value is updated when the sensor + value changes (event-driven), or + + - the server does not know the update rate."; + reference + "RFC 3433: Entity Sensor Management Information Base - + entPhySensorValueUpdateRate"; + } + } + } + } + + /* + * Notifications + */ + + notification hardware-state-change { + description + "A hardware-state-change notification is generated when the + value of /hardware/last-change changes in the operational + state."; + reference + "RFC 6933: Entity MIB (Version 4) - entConfigChange"; + } + + notification hardware-state-oper-enabled { + if-feature hardware-state; + description + "A hardware-state-oper-enabled notification signifies that a + component has transitioned into the 'enabled' state."; + + leaf name { + type leafref { + path "/hardware/component/name"; + } + + description + "The name of the component that has transitioned into the + 'enabled' state."; + } + leaf admin-state { + type leafref { + path "/hardware/component/state/admin-state"; + } + description + "The administrative state for the component."; + } + leaf alarm-state { + type leafref { + path "/hardware/component/state/alarm-state"; + } + description + "The alarm state for the component."; + } + reference + "RFC 4268: Entity State MIB - entStateOperEnabled"; + } + + notification hardware-state-oper-disabled { + if-feature hardware-state; + description + "A hardware-state-oper-disabled notification signifies that a + component has transitioned into the 'disabled' state."; + + leaf name { + type leafref { + path "/hardware/component/name"; + } + description + "The name of the component that has transitioned into the + 'disabled' state."; + } + leaf admin-state { + type leafref { + path "/hardware/component/state/admin-state"; + } + description + "The administrative state for the component."; + } + leaf alarm-state { + type leafref { + path "/hardware/component/state/alarm-state"; + } + + description + "The alarm state for the component."; + } + reference + "RFC 4268: Entity State MIB - entStateOperDisabled"; + } + +} diff --git a/experimental/odp/ietf-inet-types@2013-07-15.yang b/experimental/odp/ietf-inet-types@2013-07-15.yang new file mode 100644 index 000000000..eacefb636 --- /dev/null +++ b/experimental/odp/ietf-inet-types@2013-07-15.yang @@ -0,0 +1,458 @@ +module ietf-inet-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types"; + prefix "inet"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: David Kessens + + + WG Chair: Juergen Schoenwaelder + + + Editor: Juergen Schoenwaelder + "; + + description + "This module contains a collection of generally useful derived + YANG data types for Internet addresses and related things. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - ip-address-no-zone + - ipv4-address-no-zone + - ipv6-address-no-zone"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of types related to protocol fields ***/ + + typedef ip-version { + type enumeration { + enum unknown { + value "0"; + description + "An unknown or unspecified version of the Internet + protocol."; + } + enum ipv4 { + value "1"; + description + "The IPv4 protocol as defined in RFC 791."; + } + enum ipv6 { + value "2"; + description + "The IPv6 protocol as defined in RFC 2460."; + } + } + description + "This value represents the version of the IP protocol. + + In the value set and its semantics, this type is equivalent + to the InetVersion textual convention of the SMIv2."; + reference + "RFC 791: Internet Protocol + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef dscp { + type uint8 { + range "0..63"; + } + description + "The dscp type represents a Differentiated Services Code Point + that may be used for marking packets in a traffic stream. + In the value set and its semantics, this type is equivalent + to the Dscp textual convention of the SMIv2."; + reference + "RFC 3289: Management Information Base for the Differentiated + Services Architecture + RFC 2474: Definition of the Differentiated Services Field + (DS Field) in the IPv4 and IPv6 Headers + RFC 2780: IANA Allocation Guidelines For Values In + the Internet Protocol and Related Headers"; + } + + typedef ipv6-flow-label { + type uint32 { + range "0..1048575"; + } + description + "The ipv6-flow-label type represents the flow identifier or Flow + Label in an IPv6 packet header that may be used to + discriminate traffic flows. + + In the value set and its semantics, this type is equivalent + to the IPv6FlowLabel textual convention of the SMIv2."; + reference + "RFC 3595: Textual Conventions for IPv6 Flow Label + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification"; + } + + typedef port-number { + type uint16 { + range "0..65535"; + } + description + "The port-number type represents a 16-bit port number of an + Internet transport-layer protocol such as UDP, TCP, DCCP, or + SCTP. Port numbers are assigned by IANA. A current list of + all assignments is available from . + + Note that the port number value zero is reserved by IANA. In + situations where the value zero does not make sense, it can + be excluded by subtyping the port-number type. + In the value set and its semantics, this type is equivalent + to the InetPortNumber textual convention of the SMIv2."; + reference + "RFC 768: User Datagram Protocol + RFC 793: Transmission Control Protocol + RFC 4960: Stream Control Transmission Protocol + RFC 4340: Datagram Congestion Control Protocol (DCCP) + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + /*** collection of types related to autonomous systems ***/ + + typedef as-number { + type uint32; + description + "The as-number type represents autonomous system numbers + which identify an Autonomous System (AS). An AS is a set + of routers under a single technical administration, using + an interior gateway protocol and common metrics to route + packets within the AS, and using an exterior gateway + protocol to route packets to other ASes. IANA maintains + the AS number space and has delegated large parts to the + regional registries. + + Autonomous system numbers were originally limited to 16 + bits. BGP extensions have enlarged the autonomous system + number space to 32 bits. This type therefore uses an uint32 + base type without a range restriction in order to support + a larger autonomous system number space. + + In the value set and its semantics, this type is equivalent + to the InetAutonomousSystemNumber textual convention of + the SMIv2."; + reference + "RFC 1930: Guidelines for creation, selection, and registration + of an Autonomous System (AS) + RFC 4271: A Border Gateway Protocol 4 (BGP-4) + RFC 4001: Textual Conventions for Internet Network Addresses + RFC 6793: BGP Support for Four-Octet Autonomous System (AS) + Number Space"; + } + + /*** collection of types related to IP addresses and hostnames ***/ + + typedef ip-address { + type union { + type inet:ipv4-address; + type inet:ipv6-address; + } + description + "The ip-address type represents an IP address and is IP + version neutral. The format of the textual representation + implies the IP version. This type supports scoped addresses + by allowing zone identifiers in the address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '(%[\p{N}\p{L}]+)?'; + } + description + "The ipv4-address type represents an IPv4 address in + dotted-quad notation. The IPv4 address may include a zone + index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format for the zone index is the numerical + format"; + } + + typedef ipv6-address { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(%[\p{N}\p{L}]+)?'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(%.+)?'; + } + description + "The ipv6-address type represents an IPv6 address in full, + mixed, shortened, and shortened-mixed notation. The IPv6 + address may include a zone index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format of IPv6 addresses uses the textual + representation defined in Section 4 of RFC 5952. The + canonical format for the zone index is the numerical + format as described in Section 11.2 of RFC 4007."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-address-no-zone { + type union { + type inet:ipv4-address-no-zone; + type inet:ipv6-address-no-zone; + } + description + "The ip-address-no-zone type represents an IP address and is + IP version neutral. The format of the textual representation + implies the IP version. This type does not support scoped + addresses since it does not allow zone identifiers in the + address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address-no-zone { + type inet:ipv4-address { + pattern '[0-9\.]*'; + } + description + "An IPv4 address without a zone index. This type, derived from + ipv4-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + } + + typedef ipv6-address-no-zone { + type inet:ipv6-address { + pattern '[0-9a-fA-F:\.]*'; + } + description + "An IPv6 address without a zone index. This type, derived from + ipv6-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-prefix { + type union { + type inet:ipv4-prefix; + type inet:ipv6-prefix; + } + description + "The ip-prefix type represents an IP prefix and is IP + version neutral. The format of the textual representations + implies the IP version."; + } + + typedef ipv4-prefix { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '/(([0-9])|([1-2][0-9])|(3[0-2]))'; + } + description + "The ipv4-prefix type represents an IPv4 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 32. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format of an IPv4 prefix has all bits of + the IPv4 address set to zero that are not part of the + IPv4 prefix."; + } + + typedef ipv6-prefix { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(/.+)'; + } + + description + "The ipv6-prefix type represents an IPv6 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 128. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The IPv6 address should have all bits that do not belong + to the prefix set to zero. + + The canonical format of an IPv6 prefix has all bits of + the IPv6 address set to zero that are not part of the + IPv6 prefix. Furthermore, the IPv6 address is represented + as defined in Section 4 of RFC 5952."; + reference + "RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + /*** collection of domain name and URI types ***/ + + typedef domain-name { + type string { + pattern + '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + + '|\.'; + length "1..253"; + } + description + "The domain-name type represents a DNS domain name. The + name SHOULD be fully qualified whenever possible. + + Internet domain names are only loosely specified. Section + 3.5 of RFC 1034 recommends a syntax (modified in Section + 2.1 of RFC 1123). The pattern above is intended to allow + for current practice in domain name use, and some possible + future expansion. It is designed to hold various types of + domain names, including names used for A or AAAA records + (host names) and other records, such as SRV records. Note + that Internet host names have a stricter syntax (described + in RFC 952) than the DNS recommendations in RFCs 1034 and + 1123, and that systems that want to store host names in + schema nodes using the domain-name type are recommended to + adhere to this stricter standard to ensure interoperability. + + The encoding of DNS names in the DNS protocol is limited + to 255 characters. Since the encoding consists of labels + prefixed by a length bytes and there is a trailing NULL + byte, only 253 characters can appear in the textual dotted + notation. + + The description clause of schema nodes using the domain-name + type MUST describe when and how these names are resolved to + IP addresses. Note that the resolution of a domain-name value + may require to query multiple DNS records (e.g., A for IPv4 + and AAAA for IPv6). The order of the resolution process and + which DNS record takes precedence can either be defined + explicitly or may depend on the configuration of the + resolver. + + Domain-name values use the US-ASCII encoding. Their canonical + format uses lowercase US-ASCII characters. Internationalized + domain names MUST be A-labels as per RFC 5890."; + reference + "RFC 952: DoD Internet Host Table Specification + RFC 1034: Domain Names - Concepts and Facilities + RFC 1123: Requirements for Internet Hosts -- Application + and Support + RFC 2782: A DNS RR for specifying the location of services + (DNS SRV) + RFC 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework"; + } + + typedef host { + type union { + type inet:ip-address; + type inet:domain-name; + } + description + "The host type represents either an IP address or a DNS + domain name."; + } + + typedef uri { + type string; + description + "The uri type represents a Uniform Resource Identifier + (URI) as defined by STD 66. + + Objects using the uri type MUST be in US-ASCII encoding, + and MUST be normalized as described by RFC 3986 Sections + 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary + percent-encoding is removed, and all case-insensitive + characters are set to lowercase except for hexadecimal + digits, which are normalized to uppercase as described in + Section 6.2.2.1. + + The purpose of this normalization is to help provide + unique URIs. Note that this normalization is not + sufficient to provide uniqueness. Two URIs that are + textually distinct after this normalization may still be + equivalent. + + Objects using the uri type may restrict the schemes that + they permit. For example, 'data:' and 'urn:' schemes + might not be appropriate. + + A zero-length URI is not a valid URI. This can be used to + express 'URI absent' where required. + + In the value set and its semantics, this type is equivalent + to the Uri SMIv2 textual convention defined in RFC 5017."; + reference + "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax + RFC 3305: Report from the Joint W3C/IETF URI Planning Interest + Group: Uniform Resource Identifiers (URIs), URLs, + and Uniform Resource Names (URNs): Clarifications + and Recommendations + RFC 5017: MIB Textual Conventions for Uniform Resource + Identifiers (URIs)"; + } + +} diff --git a/experimental/odp/ietf-interfaces@2014-05-08.yang b/experimental/odp/ietf-interfaces@2014-05-08.yang new file mode 100644 index 000000000..710e7e62b --- /dev/null +++ b/experimental/odp/ietf-interfaces@2014-05-08.yang @@ -0,0 +1,696 @@ +module ietf-interfaces { + + namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces"; + prefix if; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: Thomas Nadeau + + + WG Chair: Juergen Schoenwaelder + + + Editor: Martin Bjorklund + "; + + description + "This module contains a collection of YANG definitions for + managing network interfaces. + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7223; see + the RFC itself for full legal notices."; + + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7223: A YANG Data Model for Interface Management"; + } + + /* + * Typedefs + */ + + typedef interface-ref { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + description + "This type is used by data models that need to reference + configured interfaces."; + } + + typedef interface-state-ref { + type leafref { + path "/if:interfaces-state/if:interface/if:name"; + } + description + "This type is used by data models that need to reference + the operationally present interfaces."; + } + + /* + * Identities + */ + + identity interface-type { + description + "Base identity from which specific interface types are + derived."; + } + + /* + * Features + */ + + feature arbitrary-names { + description + "This feature indicates that the device allows user-controlled + interfaces to be named arbitrarily."; + } + feature pre-provisioning { + description + "This feature indicates that the device supports + pre-provisioning of interface configuration, i.e., it is + possible to configure an interface whose physical interface + hardware is not present on the device."; + } + + feature if-mib { + description + "This feature indicates that the device implements + the IF-MIB."; + reference + "RFC 2863: The Interfaces Group MIB"; + } + + /* + * Configuration data nodes + */ + + container interfaces { + description + "Interface configuration parameters."; + + list interface { + key "name"; + + description + "The list of configured interfaces on the device. + + The operational state of an interface is available in the + /interfaces-state/interface list. If the configuration of a + system-controlled interface cannot be used by the system + (e.g., the interface hardware present does not match the + interface type), then the configuration is not applied to + the system-controlled interface shown in the + /interfaces-state/interface list. If the configuration + of a user-controlled interface cannot be used by the system, + the configured interface is not instantiated in the + /interfaces-state/interface list."; + + leaf name { + type string; + description + "The name of the interface. + + A device MAY restrict the allowed values for this leaf, + possibly depending on the type of the interface. + For system-controlled interfaces, this leaf is the + device-specific name of the interface. The 'config false' + list /interfaces-state/interface contains the currently + existing interfaces on the device. + + If a client tries to create configuration for a + system-controlled interface that is not present in the + /interfaces-state/interface list, the server MAY reject + the request if the implementation does not support + pre-provisioning of interfaces or if the name refers to + an interface that can never exist in the system. A + NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case. + + If the device supports pre-provisioning of interface + configuration, the 'pre-provisioning' feature is + advertised. + + If the device allows arbitrarily named user-controlled + interfaces, the 'arbitrary-names' feature is advertised. + + When a configured user-controlled interface is created by + the system, it is instantiated with the same name in the + /interface-state/interface list."; + } + + leaf description { + type string; + description + "A textual description of the interface. + + A server implementation MAY map this leaf to the ifAlias + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifAlias. The definition of + such a mechanism is outside the scope of this document. + + Since ifAlias is defined to be stored in non-volatile + storage, the MIB implementation MUST map ifAlias to the + value of 'description' in the persistently stored + datastore. + + Specifically, if the device supports ':startup', when + ifAlias is read the device MUST return the value of + 'description' in the 'startup' datastore, and when it is + written, it MUST be written to the 'running' and 'startup' + datastores. Note that it is up to the implementation to + + decide whether to modify this single leaf in 'startup' or + perform an implicit copy-config from 'running' to + 'startup'. + + If the device does not support ':startup', ifAlias MUST + be mapped to the 'description' leaf in the 'running' + datastore."; + reference + "RFC 2863: The Interfaces Group MIB - ifAlias"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + description + "The type of the interface. + + When an interface entry is created, a server MAY + initialize the type leaf with a valid value, e.g., if it + is possible to derive the type from the name of the + interface. + + If a client tries to set the type of an interface to a + value that can never be used by the system, e.g., if the + type is not supported or if the type does not match the + name of the interface, the server MUST reject the request. + A NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf enabled { + type boolean; + default "true"; + description + "This leaf contains the configured, desired state of the + interface. + + Systems that implement the IF-MIB use the value of this + leaf in the 'running' datastore to set + IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry + has been initialized, as described in RFC 2863. + + Changes in this leaf in the 'running' datastore are + reflected in ifAdminStatus, but if ifAdminStatus is + changed over SNMP, this leaf is not affected."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf link-up-down-trap-enable { + if-feature if-mib; + type enumeration { + enum enabled { + value 1; + } + enum disabled { + value 2; + } + } + description + "Controls whether linkUp/linkDown SNMP notifications + should be generated for this interface. + + If this node is not configured, the value 'enabled' is + operationally used by the server for interfaces that do + not operate on top of any other interface (i.e., there are + no 'lower-layer-if' entries), and 'disabled' otherwise."; + reference + "RFC 2863: The Interfaces Group MIB - + ifLinkUpDownTrapEnable"; + } + } + } + + /* + * Operational state data nodes + */ + + container interfaces-state { + config false; + description + "Data nodes for the operational state of interfaces."; + + list interface { + key "name"; + + description + "The list of interfaces on the device. + + System-controlled interfaces created by the system are + always present in this list, whether they are configured or + not."; + + leaf name { + type string; + description + "The name of the interface. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + description + "The type of the interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf admin-status { + if-feature if-mib; + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + + enum testing { + value 3; + description + "In some test mode."; + } + } + mandatory true; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "The interface does not pass any packets."; + } + enum testing { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum unknown { + value 4; + description + "Status cannot be determined for some reason."; + } + enum dormant { + value 5; + description + "Waiting for some external event."; + } + enum not-present { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum lower-layer-down { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + mandatory true; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature if-mib; + type int32 { + range "1..2147483647"; + } + mandatory true; + description + "The ifIndex value for the ifEntry represented by this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-state-ref; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-state-ref; + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + description + "A collection of interface-related statistics objects."; + + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + } + } +} diff --git a/experimental/odp/ietf-interfaces@2018-02-20.yang b/experimental/odp/ietf-interfaces@2018-02-20.yang new file mode 100644 index 000000000..f66c205ce --- /dev/null +++ b/experimental/odp/ietf-interfaces@2018-02-20.yang @@ -0,0 +1,1123 @@ +module ietf-interfaces { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces"; + prefix if; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Martin Bjorklund + "; + + description + "This module contains a collection of YANG definitions for + managing network interfaces. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8343; see + the RFC itself for full legal notices."; + + revision 2018-02-20 { + description + "Updated to support NMDA."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7223: A YANG Data Model for Interface Management"; + } + + /* + * Typedefs + */ + + typedef interface-ref { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + description + "This type is used by data models that need to reference + interfaces."; + } + + /* + * Identities + */ + + identity interface-type { + description + "Base identity from which specific interface types are + derived."; + } + + /* + * Features + */ + + feature arbitrary-names { + description + "This feature indicates that the device allows user-controlled + interfaces to be named arbitrarily."; + } + feature pre-provisioning { + description + "This feature indicates that the device supports + pre-provisioning of interface configuration, i.e., it is + possible to configure an interface whose physical interface + hardware is not present on the device."; + } + feature if-mib { + description + "This feature indicates that the device implements + the IF-MIB."; + reference + "RFC 2863: The Interfaces Group MIB"; + } + + /* + * Data nodes + */ + + container interfaces { + description + "Interface parameters."; + + list interface { + key "name"; + + description + "The list of interfaces on the device. + + The status of an interface is available in this list in the + operational state. If the configuration of a + system-controlled interface cannot be used by the system + (e.g., the interface hardware present does not match the + interface type), then the configuration is not applied to + the system-controlled interface shown in the operational + state. If the configuration of a user-controlled interface + cannot be used by the system, the configured interface is + not instantiated in the operational state. + + System-controlled interfaces created by the system are + always present in this list in the operational state, + whether or not they are configured."; + + leaf name { + type string; + description + "The name of the interface. + + A device MAY restrict the allowed values for this leaf, + possibly depending on the type of the interface. + For system-controlled interfaces, this leaf is the + device-specific name of the interface. + + If a client tries to create configuration for a + system-controlled interface that is not present in the + operational state, the server MAY reject the request if + the implementation does not support pre-provisioning of + interfaces or if the name refers to an interface that can + never exist in the system. A Network Configuration + Protocol (NETCONF) server MUST reply with an rpc-error + with the error-tag 'invalid-value' in this case. + + If the device supports pre-provisioning of interface + configuration, the 'pre-provisioning' feature is + advertised. + + If the device allows arbitrarily named user-controlled + interfaces, the 'arbitrary-names' feature is advertised. + + When a configured user-controlled interface is created by + the system, it is instantiated with the same name in the + operational state. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf description { + type string; + description + "A textual description of the interface. + + A server implementation MAY map this leaf to the ifAlias + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifAlias. The definition of + such a mechanism is outside the scope of this document. + + Since ifAlias is defined to be stored in non-volatile + storage, the MIB implementation MUST map ifAlias to the + value of 'description' in the persistently stored + configuration."; + reference + "RFC 2863: The Interfaces Group MIB - ifAlias"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + description + "The type of the interface. + + When an interface entry is created, a server MAY + initialize the type leaf with a valid value, e.g., if it + is possible to derive the type from the name of the + interface. + + If a client tries to set the type of an interface to a + value that can never be used by the system, e.g., if the + type is not supported or if the type does not match the + name of the interface, the server MUST reject the request. + A NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf enabled { + type boolean; + default "true"; + description + "This leaf contains the configured, desired state of the + interface. + + Systems that implement the IF-MIB use the value of this + leaf in the intended configuration to set + IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry + has been initialized, as described in RFC 2863. + + Changes in this leaf in the intended configuration are + reflected in ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf link-up-down-trap-enable { + if-feature if-mib; + type enumeration { + enum enabled { + value 1; + description + "The device will generate linkUp/linkDown SNMP + notifications for this interface."; + } + enum disabled { + value 2; + description + "The device will not generate linkUp/linkDown SNMP + notifications for this interface."; + } + } + description + "Controls whether linkUp/linkDown SNMP notifications + should be generated for this interface. + + If this node is not configured, the value 'enabled' is + operationally used by the server for interfaces that do + not operate on top of any other interface (i.e., there are + no 'lower-layer-if' entries), and 'disabled' otherwise."; + reference + "RFC 2863: The Interfaces Group MIB - + ifLinkUpDownTrapEnable"; + } + + leaf admin-status { + if-feature if-mib; + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + enum testing { + value 3; + description + "In some test mode."; + } + } + config false; + mandatory true; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + + description + "The interface does not pass any packets."; + } + enum testing { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum unknown { + value 4; + description + "Status cannot be determined for some reason."; + } + enum dormant { + value 5; + description + "Waiting for some external event."; + } + enum not-present { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum lower-layer-down { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + config false; + mandatory true; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + config false; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature if-mib; + type int32 { + range "1..2147483647"; + } + config false; + mandatory true; + description + "The ifIndex value for the ifEntry represented by this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + config false; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-ref; + config false; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-ref; + config false; + + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + config false; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + config false; + description + "A collection of interface-related statistics objects."; + + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + + } + } + + /* + * Legacy typedefs + */ + + typedef interface-state-ref { + type leafref { + path "/if:interfaces-state/if:interface/if:name"; + } + status deprecated; + description + "This type is used by data models that need to reference + the operationally present interfaces."; + } + + /* + * Legacy operational state data nodes + */ + + container interfaces-state { + config false; + status deprecated; + description + "Data nodes for the operational state of interfaces."; + + list interface { + key "name"; + status deprecated; + + description + "The list of interfaces on the device. + + System-controlled interfaces created by the system are + always present in this list, whether or not they are + configured."; + + leaf name { + type string; + status deprecated; + description + "The name of the interface. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + status deprecated; + description + "The type of the interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf admin-status { + if-feature if-mib; + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + enum testing { + value 3; + description + "In some test mode."; + } + } + mandatory true; + status deprecated; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "The interface does not pass any packets."; + } + enum testing { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum unknown { + value 4; + description + "Status cannot be determined for some reason."; + } + enum dormant { + value 5; + description + "Waiting for some external event."; + } + enum not-present { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum lower-layer-down { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + mandatory true; + status deprecated; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + status deprecated; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature if-mib; + type int32 { + range "1..2147483647"; + } + mandatory true; + status deprecated; + description + "The ifIndex value for the ifEntry represented by this + interface."; + + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + status deprecated; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-state-ref; + status deprecated; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-state-ref; + status deprecated; + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + status deprecated; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + status deprecated; + description + "A collection of interface-related statistics objects."; + + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + status deprecated; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + status deprecated; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + status deprecated; + + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + status deprecated; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + status deprecated; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + status deprecated; + + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + status deprecated; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + status deprecated; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + } + } +} diff --git a/experimental/odp/ietf-ip@2014-06-16.yang b/experimental/odp/ietf-ip@2014-06-16.yang new file mode 100644 index 000000000..51276a5cd --- /dev/null +++ b/experimental/odp/ietf-ip@2014-06-16.yang @@ -0,0 +1,701 @@ +module ietf-ip { + + namespace "urn:ietf:params:xml:ns:yang:ietf-ip"; + prefix ip; + + import ietf-interfaces { + prefix if; + } + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: Thomas Nadeau + + + WG Chair: Juergen Schoenwaelder + + + Editor: Martin Bjorklund + "; + + description + "This module contains a collection of YANG definitions for + configuring IP implementations. + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7277; see + the RFC itself for full legal notices."; + + revision 2014-06-16 { + description + "Initial revision."; + reference + "RFC 7277: A YANG Data Model for IP Management"; + } + + /* + + * Features + */ + + feature ipv4-non-contiguous-netmasks { + description + "Indicates support for configuring non-contiguous + subnet masks."; + } + + feature ipv6-privacy-autoconf { + description + "Indicates support for Privacy Extensions for Stateless Address + Autoconfiguration in IPv6."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + /* + * Typedefs + */ + + typedef ip-address-origin { + type enumeration { + enum other { + description + "None of the following."; + } + enum static { + description + "Indicates that the address has been statically + configured - for example, using NETCONF or a Command Line + Interface."; + } + enum dhcp { + description + "Indicates an address that has been assigned to this + system by a DHCP server."; + } + enum link-layer { + description + "Indicates an address created by IPv6 stateless + autoconfiguration that embeds a link-layer address in its + interface identifier."; + } + enum random { + description + "Indicates an address chosen by the system at + + random, e.g., an IPv4 address within 169.254/16, an + RFC 4941 temporary address, or an RFC 7217 semantically + opaque address."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + RFC 7217: A Method for Generating Semantically Opaque + Interface Identifiers with IPv6 Stateless + Address Autoconfiguration (SLAAC)"; + } + } + description + "The origin of an address."; + } + + typedef neighbor-origin { + type enumeration { + enum other { + description + "None of the following."; + } + enum static { + description + "Indicates that the mapping has been statically + configured - for example, using NETCONF or a Command Line + Interface."; + } + enum dynamic { + description + "Indicates that the mapping has been dynamically resolved + using, e.g., IPv4 ARP or the IPv6 Neighbor Discovery + protocol."; + } + } + description + "The origin of a neighbor entry."; + } + + /* + * Configuration data nodes + */ + + augment "/if:interfaces/if:interface" { + description + "Parameters for configuring IP on interfaces. + + If an interface is not capable of running IP, the server + must not allow the client to configure these parameters."; + + container ipv4 { + presence + "Enables IPv4 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv4 address family."; + + leaf enabled { + type boolean; + default true; + description + "Controls whether IPv4 is enabled or disabled on this + interface. When IPv4 is enabled, this interface is + connected to an IPv4 stack, and the interface can send + and receive IPv4 packets."; + } + leaf forwarding { + type boolean; + default false; + description + "Controls IPv4 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv4 routers + forward datagrams. IPv4 hosts do not (except those + source-routed via the host)."; + } + leaf mtu { + type uint16 { + range "68..max"; + } + units octets; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 791: Internet Protocol"; + } + list address { + key "ip"; + description + "The list of configured IPv4 addresses on the interface."; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address on the interface."; + } + + choice subnet { + mandatory true; + description + "The subnet can be specified as a prefix-length, or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature ipv4-non-contiguous-netmasks; + type yang:dotted-quad; + description + "The subnet specified as a netmask."; + } + } + } + list neighbor { + key "ip"; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + Entries in this list are used as static entries in the + ARP Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node."; + } + } + + } + + container ipv6 { + presence + "Enables IPv6 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv6 address family."; + + leaf enabled { + type boolean; + default true; + description + "Controls whether IPv6 is enabled or disabled on this + interface. When IPv6 is enabled, this interface is + connected to an IPv6 stack, and the interface can send + and receive IPv6 packets."; + } + leaf forwarding { + type boolean; + default false; + description + "Controls IPv6 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv6 routers + forward datagrams. IPv6 hosts do not (except those + source-routed via the host)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + leaf mtu { + type uint32 { + range "1280..max"; + } + units octets; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + Section 5"; + } + + list address { + key "ip"; + description + "The list of configured IPv6 addresses on the interface."; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address on the interface."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + description + "The length of the subnet prefix."; + } + } + list neighbor { + key "ip"; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + Entries in this list are used as static entries in the + Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node."; + } + } + + leaf dup-addr-detect-transmits { + type uint32; + default 1; + description + "The number of consecutive Neighbor Solicitation messages + sent while performing Duplicate Address Detection on a + tentative address. A value of zero indicates that + Duplicate Address Detection is not performed on + tentative addresses. A value of one indicates a single + transmission with no follow-up retransmissions."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + container autoconf { + description + "Parameters to control the autoconfiguration of IPv6 + addresses, as described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + + leaf create-global-addresses { + type boolean; + default true; + description + "If enabled, the host creates global addresses as + described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration + Section 5.5"; + } + leaf create-temporary-addresses { + if-feature ipv6-privacy-autoconf; + type boolean; + default false; + description + "If enabled, the host creates temporary addresses as + described in RFC 4941."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + leaf temporary-valid-lifetime { + if-feature ipv6-privacy-autoconf; + type uint32; + units "seconds"; + default 604800; + description + "The time period during which the temporary address + is valid."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_VALID_LIFETIME"; + } + leaf temporary-preferred-lifetime { + if-feature ipv6-privacy-autoconf; + type uint32; + units "seconds"; + default 86400; + description + "The time period during which the temporary address is + preferred."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_PREFERRED_LIFETIME"; + } + } + } + } + + /* + * Operational state data nodes + */ + + augment "/if:interfaces-state/if:interface" { + description + "Data nodes for the operational state of IP on interfaces."; + + container ipv4 { + presence "Present if IPv4 is enabled on this interface"; + config false; + description + "Interface-specific parameters for the IPv4 address family."; + + leaf forwarding { + type boolean; + description + "Indicates whether IPv4 packet forwarding is enabled or + disabled on this interface."; + } + leaf mtu { + type uint16 { + range "68..max"; + } + units octets; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive."; + reference + "RFC 791: Internet Protocol"; + } + list address { + key "ip"; + description + "The list of IPv4 addresses on the interface."; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address on the interface."; + } + choice subnet { + description + "The subnet can be specified as a prefix-length, or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature ipv4-non-contiguous-netmasks; + type yang:dotted-quad; + description + "The subnet specified as a netmask."; + } + } + + leaf origin { + type ip-address-origin; + description + "The origin of this address."; + } + } + list neighbor { + key "ip"; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + This list represents the ARP Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + description + "The origin of this neighbor entry."; + } + } + + } + + container ipv6 { + presence "Present if IPv6 is enabled on this interface"; + config false; + description + "Parameters for the IPv6 address family."; + + leaf forwarding { + type boolean; + default false; + description + "Indicates whether IPv6 packet forwarding is enabled or + disabled on this interface."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + leaf mtu { + type uint32 { + range "1280..max"; + } + units octets; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive."; + reference + "RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + Section 5"; + } + list address { + key "ip"; + description + "The list of IPv6 addresses on the interface."; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address on the interface."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + description + "The length of the subnet prefix."; + } + leaf origin { + type ip-address-origin; + description + "The origin of this address."; + } + + leaf status { + type enumeration { + enum preferred { + description + "This is a valid address that can appear as the + destination or source address of a packet."; + } + enum deprecated { + description + "This is a valid but deprecated address that should + no longer be used as a source address in new + communications, but packets addressed to such an + address are processed as expected."; + } + enum invalid { + description + "This isn't a valid address, and it shouldn't appear + as the destination or source address of a packet."; + } + enum inaccessible { + description + "The address is not accessible because the interface + to which this address is assigned is not + operational."; + } + enum unknown { + description + "The status cannot be determined for some reason."; + } + enum tentative { + description + "The uniqueness of the address on the link is being + verified. Addresses in this state should not be + used for general communication and should only be + used to determine the uniqueness of the address."; + } + enum duplicate { + description + "The address has been determined to be non-unique on + the link and so must not be used."; + } + + enum optimistic { + description + "The address is available for use, subject to + restrictions, while its uniqueness on a link is + being verified."; + } + } + description + "The status of an address. Most of the states correspond + to states from the IPv6 Stateless Address + Autoconfiguration protocol."; + reference + "RFC 4293: Management Information Base for the + Internet Protocol (IP) + - IpAddressStatusTC + RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + } + list neighbor { + key "ip"; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + This list represents the Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + description + "The origin of this neighbor entry."; + } + leaf is-router { + type empty; + description + "Indicates that the neighbor node acts as a router."; + } + leaf state { + type enumeration { + enum incomplete { + description + "Address resolution is in progress, and the link-layer + address of the neighbor has not yet been + determined."; + } + enum reachable { + description + "Roughly speaking, the neighbor is known to have been + reachable recently (within tens of seconds ago)."; + } + enum stale { + description + "The neighbor is no longer known to be reachable, but + until traffic is sent to the neighbor no attempt + should be made to verify its reachability."; + } + enum delay { + description + "The neighbor is no longer known to be reachable, and + traffic has recently been sent to the neighbor. + Rather than probe the neighbor immediately, however, + delay sending probes for a short while in order to + give upper-layer protocols a chance to provide + reachability confirmation."; + } + enum probe { + description + "The neighbor is no longer known to be reachable, and + unicast Neighbor Solicitation probes are being sent + to verify reachability."; + } + } + description + "The Neighbor Unreachability Detection state of this + entry."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 7.3.2"; + } + } + } + } +} diff --git a/experimental/odp/ietf-ip@2018-02-22.yang b/experimental/odp/ietf-ip@2018-02-22.yang new file mode 100644 index 000000000..a270f67b6 --- /dev/null +++ b/experimental/odp/ietf-ip@2018-02-22.yang @@ -0,0 +1,876 @@ +module ietf-ip { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-ip"; + prefix ip; + + import ietf-interfaces { + prefix if; + } + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Martin Bjorklund + "; + description + "This module contains a collection of YANG definitions for + managing IP implementations. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8344; see + the RFC itself for full legal notices."; + + revision 2018-02-22 { + description + "Updated to support NMDA."; + reference + "RFC 8344: A YANG Data Model for IP Management"; + } + + revision 2014-06-16 { + description + "Initial revision."; + reference + "RFC 7277: A YANG Data Model for IP Management"; + } + + /* + * Features + */ + + feature ipv4-non-contiguous-netmasks { + description + "Indicates support for configuring non-contiguous + subnet masks."; + } + + feature ipv6-privacy-autoconf { + description + "Indicates support for privacy extensions for stateless address + autoconfiguration in IPv6."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + /* + * Typedefs + */ + + typedef ip-address-origin { + type enumeration { + enum other { + description + "None of the following."; + } + + enum static { + description + "Indicates that the address has been statically + configured -- for example, using the Network Configuration + Protocol (NETCONF) or a command line interface."; + } + enum dhcp { + description + "Indicates an address that has been assigned to this + system by a DHCP server."; + } + enum link-layer { + description + "Indicates an address created by IPv6 stateless + autoconfiguration that embeds a link-layer address in its + interface identifier."; + } + enum random { + description + "Indicates an address chosen by the system at + random, e.g., an IPv4 address within 169.254/16, a + temporary address as described in RFC 4941, or a + semantically opaque address as described in RFC 7217."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + RFC 7217: A Method for Generating Semantically Opaque + Interface Identifiers with IPv6 Stateless + Address Autoconfiguration (SLAAC)"; + } + } + description + "The origin of an address."; + } + + typedef neighbor-origin { + type enumeration { + enum other { + description + "None of the following."; + } + enum static { + description + "Indicates that the mapping has been statically + configured -- for example, using NETCONF or a command line + interface."; + } + + enum dynamic { + description + "Indicates that the mapping has been dynamically resolved + using, for example, IPv4 ARP or the IPv6 Neighbor + Discovery protocol."; + } + } + description + "The origin of a neighbor entry."; + } + + /* + * Data nodes + */ + + augment "/if:interfaces/if:interface" { + description + "IP parameters on interfaces. + + If an interface is not capable of running IP, the server + must not allow the client to configure these parameters."; + + container ipv4 { + presence + "Enables IPv4 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv4 address family."; + + leaf enabled { + type boolean; + default true; + description + "Controls whether IPv4 is enabled or disabled on this + interface. When IPv4 is enabled, this interface is + connected to an IPv4 stack, and the interface can send + and receive IPv4 packets."; + } + leaf forwarding { + type boolean; + default false; + description + "Controls IPv4 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv4 routers + forward datagrams. IPv4 hosts do not (except those + source-routed via the host)."; + } + + leaf mtu { + type uint16 { + range "68..max"; + } + units "octets"; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 791: Internet Protocol"; + } + list address { + key "ip"; + description + "The list of IPv4 addresses on the interface."; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address on the interface."; + } + choice subnet { + mandatory true; + description + "The subnet can be specified as a prefix length or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature ipv4-non-contiguous-netmasks; + type yang:dotted-quad; + description + "The subnet specified as a netmask."; + } + } + + leaf origin { + type ip-address-origin; + config false; + description + "The origin of this address."; + } + } + list neighbor { + key "ip"; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + Entries in this list in the intended configuration are + used as static entries in the ARP Cache. + + In the operational state, this list represents the ARP + Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + config false; + description + "The origin of this neighbor entry."; + } + } + } + + container ipv6 { + presence + "Enables IPv6 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv6 address family."; + + leaf enabled { + type boolean; + default true; + description + "Controls whether IPv6 is enabled or disabled on this + interface. When IPv6 is enabled, this interface is + connected to an IPv6 stack, and the interface can send + and receive IPv6 packets."; + } + leaf forwarding { + type boolean; + default false; + description + "Controls IPv6 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv6 routers + forward datagrams. IPv6 hosts do not (except those + source-routed via the host)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + leaf mtu { + type uint32 { + range "1280..max"; + } + units "octets"; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 8200: Internet Protocol, Version 6 (IPv6) + Specification + Section 5"; + } + + list address { + key "ip"; + description + "The list of IPv6 addresses on the interface."; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address on the interface."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + description + "The length of the subnet prefix."; + } + leaf origin { + type ip-address-origin; + config false; + description + "The origin of this address."; + } + leaf status { + type enumeration { + enum preferred { + description + "This is a valid address that can appear as the + destination or source address of a packet."; + } + enum deprecated { + description + "This is a valid but deprecated address that should + no longer be used as a source address in new + communications, but packets addressed to such an + address are processed as expected."; + } + enum invalid { + description + "This isn't a valid address, and it shouldn't appear + as the destination or source address of a packet."; + } + + enum inaccessible { + description + "The address is not accessible because the interface + to which this address is assigned is not + operational."; + } + enum unknown { + description + "The status cannot be determined for some reason."; + } + enum tentative { + description + "The uniqueness of the address on the link is being + verified. Addresses in this state should not be + used for general communication and should only be + used to determine the uniqueness of the address."; + } + enum duplicate { + description + "The address has been determined to be non-unique on + the link and so must not be used."; + } + enum optimistic { + description + "The address is available for use, subject to + restrictions, while its uniqueness on a link is + being verified."; + } + } + config false; + description + "The status of an address. Most of the states correspond + to states from the IPv6 Stateless Address + Autoconfiguration protocol."; + reference + "RFC 4293: Management Information Base for the + Internet Protocol (IP) + - IpAddressStatusTC + RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + } + + list neighbor { + key "ip"; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + Entries in this list in the intended configuration are + used as static entries in the Neighbor Cache. + + In the operational state, this list represents the + Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node. + + In the operational state, if the neighbor's 'state' leaf + is 'incomplete', this leaf is not instantiated."; + } + leaf origin { + type neighbor-origin; + config false; + description + "The origin of this neighbor entry."; + } + leaf is-router { + type empty; + config false; + description + "Indicates that the neighbor node acts as a router."; + } + + leaf state { + type enumeration { + enum incomplete { + description + "Address resolution is in progress, and the + link-layer address of the neighbor has not yet been + determined."; + } + enum reachable { + description + "Roughly speaking, the neighbor is known to have been + reachable recently (within tens of seconds ago)."; + } + enum stale { + description + "The neighbor is no longer known to be reachable, but + until traffic is sent to the neighbor no attempt + should be made to verify its reachability."; + } + enum delay { + description + "The neighbor is no longer known to be reachable, and + traffic has recently been sent to the neighbor. + Rather than probe the neighbor immediately, however, + delay sending probes for a short while in order to + give upper-layer protocols a chance to provide + reachability confirmation."; + } + enum probe { + description + "The neighbor is no longer known to be reachable, and + unicast Neighbor Solicitation probes are being sent + to verify reachability."; + } + } + config false; + description + "The Neighbor Unreachability Detection state of this + entry."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 7.3.2"; + } + } + + leaf dup-addr-detect-transmits { + type uint32; + default 1; + description + "The number of consecutive Neighbor Solicitation messages + sent while performing Duplicate Address Detection on a + tentative address. A value of zero indicates that + Duplicate Address Detection is not performed on + tentative addresses. A value of one indicates a single + transmission with no follow-up retransmissions."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + container autoconf { + description + "Parameters to control the autoconfiguration of IPv6 + addresses, as described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + + leaf create-global-addresses { + type boolean; + default true; + description + "If enabled, the host creates global addresses as + described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration + Section 5.5"; + } + leaf create-temporary-addresses { + if-feature ipv6-privacy-autoconf; + type boolean; + default false; + description + "If enabled, the host creates temporary addresses as + described in RFC 4941."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + leaf temporary-valid-lifetime { + if-feature ipv6-privacy-autoconf; + type uint32; + units "seconds"; + default 604800; + description + "The time period during which the temporary address + is valid."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_VALID_LIFETIME"; + } + leaf temporary-preferred-lifetime { + if-feature ipv6-privacy-autoconf; + type uint32; + units "seconds"; + default 86400; + description + "The time period during which the temporary address is + preferred."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_PREFERRED_LIFETIME"; + } + } + } + } + + /* + * Legacy operational state data nodes + */ + + augment "/if:interfaces-state/if:interface" { + status deprecated; + description + "Data nodes for the operational state of IP on interfaces."; + + container ipv4 { + presence + "Present if IPv4 is enabled on this interface"; + config false; + status deprecated; + description + "Interface-specific parameters for the IPv4 address family."; + + leaf forwarding { + type boolean; + status deprecated; + description + "Indicates whether IPv4 packet forwarding is enabled or + disabled on this interface."; + } + leaf mtu { + type uint16 { + range "68..max"; + } + units "octets"; + status deprecated; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive."; + reference + "RFC 791: Internet Protocol"; + } + list address { + key "ip"; + status deprecated; + description + "The list of IPv4 addresses on the interface."; + + leaf ip { + type inet:ipv4-address-no-zone; + status deprecated; + description + "The IPv4 address on the interface."; + } + choice subnet { + status deprecated; + description + "The subnet can be specified as a prefix length or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + status deprecated; + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature ipv4-non-contiguous-netmasks; + type yang:dotted-quad; + status deprecated; + description + "The subnet specified as a netmask."; + } + } + leaf origin { + type ip-address-origin; + status deprecated; + description + "The origin of this address."; + } + } + list neighbor { + key "ip"; + status deprecated; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + This list represents the ARP Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + + leaf ip { + type inet:ipv4-address-no-zone; + status deprecated; + description + "The IPv4 address of the neighbor node."; + } + + leaf link-layer-address { + type yang:phys-address; + status deprecated; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + status deprecated; + description + "The origin of this neighbor entry."; + } + } + } + + container ipv6 { + presence + "Present if IPv6 is enabled on this interface"; + config false; + status deprecated; + description + "Parameters for the IPv6 address family."; + + leaf forwarding { + type boolean; + default false; + status deprecated; + description + "Indicates whether IPv6 packet forwarding is enabled or + disabled on this interface."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + leaf mtu { + type uint32 { + range "1280..max"; + } + units "octets"; + status deprecated; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive."; + reference + "RFC 8200: Internet Protocol, Version 6 (IPv6) + Specification + Section 5"; + } + list address { + key "ip"; + status deprecated; + description + "The list of IPv6 addresses on the interface."; + + leaf ip { + type inet:ipv6-address-no-zone; + status deprecated; + description + "The IPv6 address on the interface."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + status deprecated; + description + "The length of the subnet prefix."; + } + leaf origin { + type ip-address-origin; + status deprecated; + description + "The origin of this address."; + } + leaf status { + type enumeration { + enum preferred { + description + "This is a valid address that can appear as the + destination or source address of a packet."; + } + enum deprecated { + description + "This is a valid but deprecated address that should + no longer be used as a source address in new + communications, but packets addressed to such an + address are processed as expected."; + } + enum invalid { + description + "This isn't a valid address, and it shouldn't appear + as the destination or source address of a packet."; + } + + enum inaccessible { + description + "The address is not accessible because the interface + to which this address is assigned is not + operational."; + } + enum unknown { + description + "The status cannot be determined for some reason."; + } + enum tentative { + description + "The uniqueness of the address on the link is being + verified. Addresses in this state should not be + used for general communication and should only be + used to determine the uniqueness of the address."; + } + enum duplicate { + description + "The address has been determined to be non-unique on + the link and so must not be used."; + } + enum optimistic { + description + "The address is available for use, subject to + restrictions, while its uniqueness on a link is + being verified."; + } + } + status deprecated; + description + "The status of an address. Most of the states correspond + to states from the IPv6 Stateless Address + Autoconfiguration protocol."; + reference + "RFC 4293: Management Information Base for the + Internet Protocol (IP) + - IpAddressStatusTC + RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + } + + list neighbor { + key "ip"; + status deprecated; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + This list represents the Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + leaf ip { + type inet:ipv6-address-no-zone; + status deprecated; + description + "The IPv6 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + status deprecated; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + status deprecated; + description + "The origin of this neighbor entry."; + } + leaf is-router { + type empty; + status deprecated; + description + "Indicates that the neighbor node acts as a router."; + } + leaf state { + type enumeration { + enum incomplete { + description + "Address resolution is in progress, and the + link-layer address of the neighbor has not yet been + determined."; + } + enum reachable { + description + "Roughly speaking, the neighbor is known to have been + reachable recently (within tens of seconds ago)."; + } + enum stale { + description + "The neighbor is no longer known to be reachable, but + until traffic is sent to the neighbor no attempt + should be made to verify its reachability."; + } + enum delay { + description + "The neighbor is no longer known to be reachable, and + traffic has recently been sent to the neighbor. + Rather than probe the neighbor immediately, however, + delay sending probes for a short while in order to + give upper-layer protocols a chance to provide + reachability confirmation."; + } + enum probe { + description + "The neighbor is no longer known to be reachable, and + unicast Neighbor Solicitation probes are being sent + to verify reachability."; + } + } + status deprecated; + description + "The Neighbor Unreachability Detection state of this + entry."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 7.3.2"; + } + } + } + } +} diff --git a/experimental/odp/ietf-ipv4-unicast-routing@2018-03-13.yang b/experimental/odp/ietf-ipv4-unicast-routing@2018-03-13.yang new file mode 100644 index 000000000..7db3fc9ce --- /dev/null +++ b/experimental/odp/ietf-ipv4-unicast-routing@2018-03-13.yang @@ -0,0 +1,377 @@ +module ietf-ipv4-unicast-routing { + yang-version "1.1"; + namespace + "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing"; + prefix "v4ur"; + + import ietf-routing { + prefix "rt"; + description + "An 'ietf-routing' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + import ietf-inet-types { + prefix "inet"; + } + organization + "IETF NETMOD (Network Modeling) Working Group"; + contact + "WG Web: + WG List: + + Editor: Ladislav Lhotka + + Acee Lindem + + Yingzhen Qu + "; + + description + "This YANG module augments the 'ietf-routing' module with basic + parameters for IPv4 unicast routing. The model fully conforms + to the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2018 IETF Trust and the persons + identified as authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8349; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Network Management Datastore Architecture (NMDA) revision."; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + /* Identities */ + + identity ipv4-unicast { + base rt:ipv4; + description + "This identity represents the IPv4 unicast address family."; + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "This leaf augments an IPv4 unicast route."; + leaf destination-prefix { + type inet:ipv4-prefix; + description + "IPv4 destination prefix."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "Augments the 'simple-next-hop' case in IPv4 unicast routes."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "This leaf augments the 'next-hop-list' case of IPv4 unicast + routes."; + leaf address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment + "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { + when "derived-from-or-self(../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast RIBs."; + } + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv4-address; + description + "IPv4 destination address."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv4-prefix; + description + "IPv4 destination prefix."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "Augments the 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + description + "Augments the 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:static-routes" { + description + "This augment defines the 'static' pseudo-protocol + with data specific to IPv4 unicast."; + container ipv4 { + description + "Support for a 'static' pseudo-protocol instance + consists of a list of routes."; + list route { + key "destination-prefix"; + description + "A list of static routes."; + leaf destination-prefix { + type inet:ipv4-prefix; + mandatory true; + description + "IPv4 destination prefix."; + } + leaf description { + type string; + description + "Textual description of the route."; + } + container next-hop { + description + "Support for next-hop."; + uses rt:next-hop-content { + augment "next-hop-options/simple-next-hop" { + description + "Augments the 'simple-next-hop' case in IPv4 static + routes."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + augment "next-hop-options/next-hop-list/next-hop-list/" + + "next-hop" { + description + "Augments the 'next-hop-list' case in IPv4 static + routes."; + leaf next-hop-address { + type inet:ipv4-address; + description + "IPv4 address of the next hop."; + } + } + } + } + } + } + } + + /* + * The subsequent data nodes are obviated and obsoleted + * by the Network Management Datastore Architecture + * as described in RFC 8342. + */ + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "This leaf augments an IPv4 unicast route."; + leaf destination-prefix { + type inet:ipv4-prefix; + status obsolete; + description + "IPv4 destination prefix."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self( + ../../../rt:address-family, 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "Augments the 'simple-next-hop' case in IPv4 unicast routes."; + leaf next-hop-address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "This leaf augments the 'next-hop-list' case of IPv4 unicast + routes."; + leaf address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:input" { + when "derived-from-or-self(../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast RIBs."; + } + status obsolete; + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 destination address."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv4-prefix; + status obsolete; + description + "IPv4 destination prefix."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "Augments the 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, + 'v4ur:ipv4-unicast')" { + description + "This augment is valid only for IPv4 unicast."; + } + status obsolete; + description + "Augments the 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv4-address; + status obsolete; + description + "IPv4 address of the next hop."; + } + } +} diff --git a/experimental/odp/ietf-ipv6-router-advertisements@2018-03-13.yang b/experimental/odp/ietf-ipv6-router-advertisements@2018-03-13.yang new file mode 100644 index 000000000..294e231d7 --- /dev/null +++ b/experimental/odp/ietf-ipv6-router-advertisements@2018-03-13.yang @@ -0,0 +1,501 @@ +submodule ietf-ipv6-router-advertisements { + yang-version "1.1"; + + belongs-to ietf-ipv6-unicast-routing { + prefix "v6ur"; + } + + import ietf-inet-types { + prefix "inet"; + } + + import ietf-interfaces { + prefix "if"; + description + "An 'ietf-interfaces' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + import ietf-ip { + prefix "ip"; + description + "An 'ietf-ip' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + contact + "WG Web: + WG List: + + Editor: Ladislav Lhotka + + Acee Lindem + + Yingzhen Qu + "; + + description + "This YANG module augments the 'ietf-ip' module with + parameters for IPv6 Router Advertisements. The model fully + conforms to the Network Management Datastore + Architecture (NMDA). + + Copyright (c) 2018 IETF Trust and the persons + identified as authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8349; see + the RFC itself for full legal notices."; + + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + revision 2018-03-13 { + description + "Network Management Datastore Architecture (NMDA) revision."; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + augment "/if:interfaces/if:interface/ip:ipv6" { + description + "Augments interface configuration with parameters of IPv6 + Router Advertisements."; + container ipv6-router-advertisements { + description + "Support for IPv6 Router Advertisements."; + leaf send-advertisements { + type boolean; + default "false"; + description + "A flag indicating whether or not the router sends + periodic Router Advertisements and responds to + Router Solicitations."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvSendAdvertisements"; + } + leaf max-rtr-adv-interval { + type uint16 { + range "4..65535"; + } + units "seconds"; + default "600"; + description + "The maximum time allowed between sending unsolicited + multicast Router Advertisements from the interface."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - MaxRtrAdvInterval"; + } + leaf min-rtr-adv-interval { + type uint16 { + range "3..1350"; + } + units "seconds"; + must ". <= 0.75 * ../max-rtr-adv-interval" { + description + "The value MUST NOT be greater than 75% of + 'max-rtr-adv-interval'."; + } + description + "The minimum time allowed between sending unsolicited + multicast Router Advertisements from the interface. + + The default value to be used operationally if this + leaf is not configured is determined as follows: + + - if max-rtr-adv-interval >= 9 seconds, the default + value is 0.33 * max-rtr-adv-interval; + + - otherwise, it is 0.75 * max-rtr-adv-interval."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - MinRtrAdvInterval"; + } + leaf managed-flag { + type boolean; + default "false"; + description + "The value to be placed in the 'Managed address + configuration' flag field in the Router + Advertisement."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvManagedFlag"; + } + leaf other-config-flag { + type boolean; + default "false"; + description + "The value to be placed in the 'Other configuration' + flag field in the Router Advertisement."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvOtherConfigFlag"; + } + leaf link-mtu { + type uint32; + default "0"; + description + "The value to be placed in MTU options sent by the + router. A value of zero indicates that no MTU options + are sent."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvLinkMTU"; + } + leaf reachable-time { + type uint32 { + range "0..3600000"; + } + units "milliseconds"; + default "0"; + description + "The value to be placed in the Reachable Time field in + the Router Advertisement messages sent by the router. + A value of zero means unspecified (by this router)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvReachableTime"; + } + leaf retrans-timer { + type uint32; + units "milliseconds"; + default "0"; + description + "The value to be placed in the Retrans Timer field in + the Router Advertisement messages sent by the router. + A value of zero means unspecified (by this router)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvRetransTimer"; + } + leaf cur-hop-limit { + type uint8; + description + "The value to be placed in the Cur Hop Limit field in + the Router Advertisement messages sent by the router. + A value of zero means unspecified (by this router). + + If this parameter is not configured, the device SHOULD + use the IANA-specified value for the default IPv4 + Time to Live (TTL) parameter that was in effect at the + time of implementation."; + reference + "RFC 3232: Assigned Numbers: RFC 1700 is Replaced by + an On-line Database + RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvCurHopLimit + IANA: IP Parameters + (https://www.iana.org/assignments/ip-parameters)"; + } + leaf default-lifetime { + type uint16 { + range "0..65535"; + } + units "seconds"; + description + "The value to be placed in the Router Lifetime field of + Router Advertisements sent from the interface, in + seconds. It MUST be either zero or between + max-rtr-adv-interval and 9000 seconds. A value of zero + indicates that the router is not to be used as a + default router. These limits may be overridden by + specific documents that describe how IPv6 operates over + different link layers. + + If this parameter is not configured, the device SHOULD + use a value of 3 * max-rtr-adv-interval."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvDefaultLifetime"; + } + container prefix-list { + description + "Support for prefixes to be placed in Prefix + Information options in Router Advertisement messages + sent from the interface. + + Prefixes that are advertised by default but do not + have their entries in the child 'prefix' list are + advertised with the default values of all parameters. + + The link-local prefix SHOULD NOT be included in the + list of advertised prefixes."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + - AdvPrefixList"; + list prefix { + key "prefix-spec"; + description + "Support for an advertised prefix entry."; + leaf prefix-spec { + type inet:ipv6-prefix; + description + "IPv6 address prefix."; + } + choice control-adv-prefixes { + default "advertise"; + description + "Either (1) the prefix is explicitly removed from the + set of advertised prefixes or (2) the parameters with + which the prefix is advertised are specified (default + case)."; + leaf no-advertise { + type empty; + description + "The prefix will not be advertised. + + This can be used for removing the prefix from + the default set of advertised prefixes."; + } + case advertise { + leaf valid-lifetime { + type uint32; + units "seconds"; + default "2592000"; + description + "The value to be placed in the Valid Lifetime + in the Prefix Information option. The + designated value of all 1's (0xffffffff) + represents infinity."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvValidLifetime"; + } + leaf on-link-flag { + type boolean; + default "true"; + description + "The value to be placed in the on-link flag + ('L-bit') field in the Prefix Information + option."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvOnLinkFlag"; + } + leaf preferred-lifetime { + type uint32; + units "seconds"; + must ". <= ../valid-lifetime" { + description + "This value MUST NOT be greater than + valid-lifetime."; + } + default "604800"; + description + "The value to be placed in the Preferred + Lifetime in the Prefix Information option. + The designated value of all 1's (0xffffffff) + represents infinity."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvPreferredLifetime"; + } + leaf autonomous-flag { + type boolean; + default "true"; + description + "The value to be placed in the Autonomous Flag + field in the Prefix Information option."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 + (IPv6) - AdvAutonomousFlag"; + } + } + } + } + } + } + } + + /* + * The subsequent data nodes are obviated and obsoleted + * by the Network Management Datastore Architecture + * as described in RFC 8342. + */ + augment "/if:interfaces-state/if:interface/ip:ipv6" { + status obsolete; + description + "Augments interface state data with parameters of IPv6 + Router Advertisements."; + container ipv6-router-advertisements { + status obsolete; + description + "Parameters of IPv6 Router Advertisements."; + leaf send-advertisements { + type boolean; + status obsolete; + description + "A flag indicating whether or not the router sends + periodic Router Advertisements and responds to + Router Solicitations."; + } + leaf max-rtr-adv-interval { + type uint16 { + range "4..1800"; + } + units "seconds"; + status obsolete; + description + "The maximum time allowed between sending unsolicited + multicast Router Advertisements from the interface."; + } + leaf min-rtr-adv-interval { + type uint16 { + range "3..1350"; + } + units "seconds"; + status obsolete; + description + "The minimum time allowed between sending unsolicited + multicast Router Advertisements from the interface."; + } + leaf managed-flag { + type boolean; + status obsolete; + description + "The value that is placed in the 'Managed address + configuration' flag field in the Router Advertisement."; + } + leaf other-config-flag { + type boolean; + status obsolete; + description + "The value that is placed in the 'Other configuration' flag + field in the Router Advertisement."; + } + leaf link-mtu { + type uint32; + status obsolete; + description + "The value that is placed in MTU options sent by the + router. A value of zero indicates that no MTU options + are sent."; + } + leaf reachable-time { + type uint32 { + range "0..3600000"; + } + units "milliseconds"; + status obsolete; + description + "The value that is placed in the Reachable Time field in + the Router Advertisement messages sent by the router. A + value of zero means unspecified (by this router)."; + } + leaf retrans-timer { + type uint32; + units "milliseconds"; + status obsolete; + description + "The value that is placed in the Retrans Timer field in the + Router Advertisement messages sent by the router. A value + of zero means unspecified (by this router)."; + } + leaf cur-hop-limit { + type uint8; + status obsolete; + description + "The value that is placed in the Cur Hop Limit field in the + Router Advertisement messages sent by the router. A value + of zero means unspecified (by this router)."; + } + leaf default-lifetime { + type uint16 { + range "0..9000"; + } + units "seconds"; + status obsolete; + description + "The value that is placed in the Router Lifetime field of + Router Advertisements sent from the interface, in seconds. + A value of zero indicates that the router is not to be + used as a default router."; + } + container prefix-list { + status obsolete; + description + "A list of prefixes that are placed in Prefix Information + options in Router Advertisement messages sent from the + interface. + + By default, these are all prefixes that the router + advertises via routing protocols as being on-link for the + interface from which the advertisement is sent."; + list prefix { + key "prefix-spec"; + status obsolete; + description + "Advertised prefix entry and its parameters."; + leaf prefix-spec { + type inet:ipv6-prefix; + status obsolete; + description + "IPv6 address prefix."; + } + leaf valid-lifetime { + type uint32; + units "seconds"; + status obsolete; + description + "The value that is placed in the Valid Lifetime in the + Prefix Information option. The designated value of + all 1's (0xffffffff) represents infinity. + + An implementation SHOULD keep this value constant in + consecutive advertisements, except when it is + explicitly changed in configuration."; + } + leaf on-link-flag { + type boolean; + status obsolete; + description + "The value that is placed in the on-link flag ('L-bit') + field in the Prefix Information option."; + } + leaf preferred-lifetime { + type uint32; + units "seconds"; + status obsolete; + description + "The value that is placed in the Preferred Lifetime in + the Prefix Information option, in seconds. The + designated value of all 1's (0xffffffff) represents + infinity. + + An implementation SHOULD keep this value constant in + consecutive advertisements, except when it is + explicitly changed in configuration."; + } + leaf autonomous-flag { + type boolean; + status obsolete; + description + "The value that is placed in the Autonomous Flag field + in the Prefix Information option."; + } + } + } + } + } +} diff --git a/experimental/odp/ietf-ipv6-unicast-routing@2018-03-13.yang b/experimental/odp/ietf-ipv6-unicast-routing@2018-03-13.yang new file mode 100644 index 000000000..6a8e7e384 --- /dev/null +++ b/experimental/odp/ietf-ipv6-unicast-routing@2018-03-13.yang @@ -0,0 +1,387 @@ +module ietf-ipv6-unicast-routing { + yang-version "1.1"; + namespace + "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing"; + prefix "v6ur"; + + import ietf-routing { + prefix "rt"; + description + "An 'ietf-routing' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + import ietf-inet-types { + prefix "inet"; + description + "An 'ietf-interfaces' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + include ietf-ipv6-router-advertisements { + revision-date 2018-03-13; + } + organization + "IETF NETMOD (Network Modeling) Working Group"; + contact + "WG Web: + WG List: + + Editor: Ladislav Lhotka + + Acee Lindem + + Yingzhen Qu + "; + + description + "This YANG module augments the 'ietf-routing' module with basic + parameters for IPv6 unicast routing. The model fully conforms + to the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2018 IETF Trust and the persons + identified as authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8349; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Network Management Datastore Architecture (NMDA) revision."; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + /* Identities */ + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + identity ipv6-unicast { + base rt:ipv6; + description + "This identity represents the IPv6 unicast address family."; + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "This leaf augments an IPv6 unicast route."; + leaf destination-prefix { + type inet:ipv6-prefix; + description + "IPv6 destination prefix."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "Augments the 'simple-next-hop' case in IPv6 unicast routes."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "This leaf augments the 'next-hop-list' case of IPv6 unicast + routes."; + leaf address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + augment + "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { + when "derived-from-or-self(../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast RIBs."; + } + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv6-address; + description + "IPv6 destination address."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv6-prefix; + description + "IPv6 destination prefix."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "Augments the 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, " + + "'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + description + "Augments the 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + + /* Data node augmentations */ + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:static-routes" { + description + "This augment defines the 'static' pseudo-protocol + with data specific to IPv6 unicast."; + container ipv6 { + description + "Support for a 'static' pseudo-protocol instance + consists of a list of routes."; + list route { + key "destination-prefix"; + description + "A list of static routes."; + leaf destination-prefix { + type inet:ipv6-prefix; + mandatory true; + description + "IPv6 destination prefix."; + } + leaf description { + type string; + description + "Textual description of the route."; + } + container next-hop { + description + "Next hop for the route."; + uses rt:next-hop-content { + augment "next-hop-options/simple-next-hop" { + description + "Augments the 'simple-next-hop' case in IPv6 static + routes."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + augment "next-hop-options/next-hop-list/next-hop-list/" + + "next-hop" { + description + "Augments the 'next-hop-list' case in IPv6 static + routes."; + leaf next-hop-address { + type inet:ipv6-address; + description + "IPv6 address of the next hop."; + } + } + } + } + } + } + } + + /* + * The subsequent data nodes are obviated and obsoleted + * by the Network Management Datastore Architecture + * as described in RFC 8342. + */ + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { + when "derived-from-or-self(../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "This leaf augments an IPv6 unicast route."; + leaf destination-prefix { + type inet:ipv6-prefix; + status obsolete; + description + "IPv6 destination prefix."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "Augments the 'simple-next-hop' case in IPv6 unicast routes."; + leaf next-hop-address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" + + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + + "rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "This leaf augments the 'next-hop-list' case of IPv6 unicast + routes."; + leaf address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/" + + "rt:active-route/rt:input" { + when "derived-from-or-self(../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast RIBs."; + } + status obsolete; + description + "This augment adds the input parameter of the 'active-route' + action."; + leaf destination-address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 destination address."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route" { + when "derived-from-or-self(../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "This augment adds the destination prefix to the reply of the + 'active-route' action."; + leaf destination-prefix { + type inet:ipv6-prefix; + status obsolete; + description + "IPv6 destination prefix."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:simple-next-hop" { + when "derived-from-or-self(../../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "Augments the 'simple-next-hop' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 address of the next hop."; + } + } + augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" + + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" + + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { + when "derived-from-or-self(../../../../../rt:address-family, + 'v6ur:ipv6-unicast')" { + description + "This augment is valid only for IPv6 unicast."; + } + status obsolete; + description + "Augments the 'next-hop-list' case in the reply to the + 'active-route' action."; + leaf next-hop-address { + type inet:ipv6-address; + status obsolete; + description + "IPv6 address of the next hop."; + } + } +} diff --git a/experimental/odp/ietf-lisp-address-types.yang b/experimental/odp/ietf-lisp-address-types.yang new file mode 100644 index 000000000..22dddbf10 --- /dev/null +++ b/experimental/odp/ietf-lisp-address-types.yang @@ -0,0 +1,675 @@ +module ietf-lisp-address-types { + namespace "urn:ietf:params:xml:ns:yang:ietf-lisp-address-types"; + prefix laddr; + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + import ietf-yang-types { + prefix yang; + revision-date 2013-07-15; + } + organization + "IETF LISP (Locator/ID Separation Protocol) Working Group"; + contact + "lisp@ietf.org"; + description + "This YANG module defines the LISP Canonical Address Formats + (LCAF) for LISP. The module can be extended by vendors to + define vendor-specific parameters. + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6338; see + the RFC itself for full legal notices. + + "; + revision 2015-11-05 { + description + "Initial revision."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10"; + } + identity lisp-address-family { + description + "Base identity from which identities describing LISP address + families are derived."; + } + identity no-address-afi { + base lisp-address-family; + description + "IANA Reserved."; + } + identity ipv4-afi { + base lisp-address-family; + description + "IANA IPv4 address family."; + } + identity ipv4-prefix-afi { + base lisp-address-family; + description + "IANA IPv4 address family prefix."; + } + identity ipv6-afi { + base lisp-address-family; + description + "IANA IPv6 address family."; + } + identity ipv6-prefix-afi { + base lisp-address-family; + description + "IANA IPv6 address family prefix."; + } + identity mac-afi { + base lisp-address-family; + description + "IANA MAC address family."; + } + identity distinguished-name-afi { + base lisp-address-family; + description + "IANA Distinguished Name address family."; + } + identity as-number-afi { + base lisp-address-family; + description + "IANA AS Number address family."; + } + identity lcaf { + base lisp-address-family; + description + "IANA LISP Canonical Address Format address family."; + } + identity null-address-lcaf { + base lcaf; + description + "Null body LCAF type."; + } + identity afi-list-lcaf { + base lcaf; + description + "AFI-List LCAF type."; + } + identity instance-id-lcaf { + base lcaf; + description + "Instance-ID LCAF type."; + } + identity as-number-lcaf { + base lcaf; + description + "AS Number LCAF type."; + } + identity application-data-lcaf { + base lcaf; + description + "Application Data LCAF type."; + } + identity geo-coordinates-lcaf { + base lcaf; + description + "Geo-coordinates LCAF type."; + } + identity opaque-key-lcaf { + base lcaf; + description + "Opaque Key LCAF type."; + } + identity nat-traversal-lcaf { + base lcaf; + description + "NAT-Traversal LCAF type."; + } + identity nonce-locator-lcaf { + base lcaf; + description + "Nonce-Locator LCAF type."; + } + identity multicast-info-lcaf { + base lcaf; + description + "Multicast Info LCAF type."; + } + identity explicit-locator-path-lcaf { + base lcaf; + description + "Explicit Locator Path LCAF type."; + } + identity security-key-lcaf { + base lcaf; + description + "Security Key LCAF type."; + } + identity source-dest-key-lcaf { + base lcaf; + description + "Source/Dest LCAF type."; + } + identity replication-list-lcaf { + base lcaf; + description + "Replication-List LCAF type."; + } + identity json-data-model-lcaf { + base lcaf; + description + "JSON Data Model LCAF type."; + } + identity key-value-address-lcaf { + base lcaf; + description + "Key/Value Address LCAF type."; + } + identity encapsulation-format-lcaf { + base lcaf; + description + "Encapsulation Format LCAF type."; + } + identity service-path-lcaf { + base lcaf; + description + "Service Path LCAF type."; + } + typedef instance-id-type { + type uint32 { + range "0..16777215"; + } + description + "Defines the range of values for an Instance ID."; + } + typedef service-path-id-type { + type uint32 { + range "0..16777215"; + } + description + "Defines the range of values for a Service Path ID."; + } + typedef distinguished-name-type { + type string; + description + "Distinguished Name address."; + reference + "http://www.iana.org/assignments/address-family-numbers/ + address-family-numbers.xhtml"; + } + typedef simple-address { + type union { + type inet:ip-address; + type inet:ip-prefix; + type yang:mac-address; + type distinguished-name-type; + type inet:as-number; + } + description + "Union of address types that can be part of LCAFs."; + } + + typedef lisp-address-family-ref { + type identityref { + base lisp-address-family; + } + description + "LISP address family reference."; + } + typedef lcaf-ref { + type identityref { + base lcaf; + } + description + "LCAF types reference."; + } + + grouping lisp-address { + description + "Generic LISP address."; + leaf address-type { + type lisp-address-family-ref; + mandatory true; + description + "Type of the LISP address."; + } + leaf virtual-network-id { + type instance-id-type; + description + "Virtual Network Identifier (instance-id) of the address."; + } + choice address { + description + "Various LISP address types, including IP, MAC, and LCAF."; + + leaf no-address { + when "../address-type = 'laddr:no-addr-afi'" { + description + "When AFI is 0."; + } + type empty; + description + "No address."; + } + leaf ipv4 { + when "../address-type = 'laddr:ipv4-afi'" { + description + "When AFI is IPv4."; + } + type inet:ipv4-address; + description + "IPv4 address."; + } + leaf ipv4-prefix { + when "../address-type = 'laddr:ipv4-prefix-afi'" { + description + "When AFI is IPv4."; + } + type inet:ipv4-prefix; + description + "IPv4 prefix."; + } + leaf ipv6 { + when "../address-type = 'laddr:ipv6-afi'" { + description + "When AFI is IPv6."; + } + type inet:ipv6-address; + description + "IPv6 address."; + } + leaf ipv6-prefix { + when "../address-type = 'laddr:ipv6-prefix-afi'" { + description + "When AFI is IPv6."; + } + type inet:ipv6-prefix; + description + "IPv6 address."; + } + leaf mac { + when "../address-type = 'laddr:mac-afi'" { + description + "When AFI is MAC."; + } + type yang:mac-address; + description + "MAC address."; + } + leaf distinguished-name { + when "../address-type = 'laddr:distinguished-name-afi'" { + description + "When AFI is distinguished-name."; + } + type distinguished-name-type; + description + "Distinguished Name address."; + } + leaf as-number { + when "../address-type = 'laddr:as-number-afi'" { + description + "When AFI is as-number."; + } + type inet:as-number; + description + "AS Number."; + } + container null-address { + when "../address-type = 'laddr:null-address-lcaf'" { + description + "When LCAF type is null."; + } + description + "Null body LCAF type"; + leaf address { + type empty; + description + "AFI address."; + } + } + container afi-list { + when "../address-type = 'laddr:afi-list-lcaf'" { + description + "When LCAF type is AFI-List."; + } + description + "AFI-List LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.16.1"; + leaf-list address-list { + type simple-address; + description + "List of AFI addresses."; + } + } + container instance-id { + when "../address-type = 'laddr:instance-id-lcaf'" { + description + "When LCAF type is Instance-ID"; + } + description + "Instance ID LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.2"; + leaf iid { + type instance-id-type; + description + "Instance ID value."; + } + leaf mask-length { + type uint8; + description + "Mask length."; + } + leaf address { + type simple-address; + description + "AFI address."; + } + } + container as-number-lcaf { + when "../address-type = 'laddr:as-number-lcaf'" { + description + "When LCAF type is AS-Number."; + } + description + "AS Number LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.3"; + leaf as { + type inet:as-number; + description + "AS number."; + } + leaf address { + type simple-address; + description + "AFI address."; + } + } + container application-data { + when "../address-type = 'laddr:application-data-lcaf'" { + description + "When LCAF type is Application Data."; + } + description + "Application Data LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.4"; + leaf address { + type simple-address; + description + "AFI address."; + } + leaf protocol { + type uint8; + description + "Protocol number."; + } + leaf ip-tos { + type int32; + description + "Type of service field."; + } + leaf local-port-low { + type inet:port-number; + description + "Low end of local port range."; + } + leaf local-port-high { + type inet:port-number; + description + "High end of local port range."; + } + leaf remote-port-low { + type inet:port-number; + description + "Low end of remote port range."; + } + leaf remote-port-high { + type inet:port-number; + description + "High end of remote port range."; + } + } + container geo-coordinates { + when "../address-type = 'laddr:geo-coordinates-lcaf'" { + description + "When LCAF type is Geo-coordinates."; + } + description + "Geo-coordinates LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.5"; + leaf latitude { + type bits { + bit N { + description + "Latitude bit."; + } + } + description + "Bit that selects between North and South latitude."; + } + leaf latitude-degrees { + type uint8 { + range "0 .. 90"; + } + description + "Degrees of latitude."; + } + leaf latitude-minutes { + type uint8 { + range "0..59"; + } + description + "Minutes of latitude."; + } + leaf latitude-seconds { + type uint8 { + range "0..59"; + } + description + "Seconds of latitude."; + } + leaf longitude { + type bits { + bit E { + description + "Longitude bit."; + } + } + description + "Bit that selects between East and West longitude."; + } + leaf longitude-degrees { + type uint16 { + range "0 .. 180"; + } + description + "Degrees of longitude."; + } + leaf longitude-minutes { + type uint8 { + range "0..59"; + } + description + "Minutes of longitude."; + } + leaf longitude-seconds { + type uint8 { + range "0..59"; + } + description + "Seconds of longitude."; + } + leaf altitude { + type int32; + description + "Height relative to sea level in meters."; + } + leaf address { + type simple-address; + description + "AFI address."; + } + } + container nat-traversal { + when "../address-type = 'laddr:nat-traversal-lcaf'" { + description + "When LCAF type is NAT-Traversal."; + } + description + "NAT-Traversal LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.6"; + leaf ms-udp-port { + type uint16; + description + "Map-Server UDP port (set to 4342)."; + } + leaf etr-udp-port { + type uint16; + description + "ETR UDP port."; + } + leaf global-etr-rloc { + type simple-address; + description + "Global ETR RLOC address."; + } + leaf ms-rloc { + type simple-address; + description + "Map-Server RLOC address."; + } + leaf private-etr-rloc { + type simple-address; + description + "Private ETR RLOC address."; + } + leaf-list rtr-rlocs { + type simple-address; + description + "List of RTR RLOC addresses."; + } + } + container explicit-locator-path { + when "../address-type = 'laddr:explicit-locator-path-lcaf'" { + description + "When LCAF type type is Explicit Locator Path."; + } + description + "Explicit Locator Path LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.9"; + list hop { + key "hop-id"; + ordered-by user; + description + "List of locator hops forming the explicit path."; + leaf hop-id { + type string; + description + "Unique identifier for the hop."; + } + leaf address { + type simple-address; + description + "AFI address."; + } + leaf lrs-bits { + type bits{ + bit lookup { + description + "Lookup bit."; + } + bit rloc-probe { + description + "RLOC-probe bit."; + } + bit strict { + description + "Strict bit."; + } + } + description + "Flag bits per hop."; + } + } + } + container source-dest-key { + when "../address-type = 'laddr:source-dest-key-lcaf'" { + description + "When LCAF type type is Source/Dest."; + } + description + "Source/Dest LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.11"; + leaf source { + type simple-address; + description + "Source address."; + } + leaf dest { + type simple-address; + description + "Destination address."; + } + } + container key-value-address { + when "../address-type = 'laddr:key-value-address-lcaf'" { + description + "When LCAF type type is Key/Value Address."; + } + description + "Key/Value Address LCAF type."; + reference + "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10 + #section-4.11"; + leaf key { + type simple-address; + description + "Address as Key."; + } + leaf value { + type simple-address; + description + "Address as Value."; + } + } + container service-path { + when "../address-type = 'laddr:service-path-lcaf'" { + description + "When LCAF type service path identifier."; + } + description + "Service Path LCAF type."; + reference + "http://tools.ietf.org/html/draft-ermagan-lisp-nsh-00"; + leaf service-path-id { + type service-path-id-type; + description + "Service path identifier for the path for NSH header"; + } + leaf service-index { + type uint8; + description + "Service path index for NSH header"; + } + } + } + } +} diff --git a/experimental/odp/ietf-netconf-monitoring-extension.yang b/experimental/odp/ietf-netconf-monitoring-extension.yang new file mode 100644 index 000000000..e8f2ec324 --- /dev/null +++ b/experimental/odp/ietf-netconf-monitoring-extension.yang @@ -0,0 +1,31 @@ +module ietf-netconf-monitoring-extension { + + yang-version 1; + + namespace + "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring-extension"; + + prefix ncme; + + import ietf-netconf-monitoring { + prefix ncm; + } + + revision "2013-12-10" { + description "Initial revision."; + + } + + identity netconf-tcp { + base ncm:transport; + description + "NETCONF over TCP."; + } + + augment "/ncm:netconf-state/ncm:sessions/ncm:session" { + leaf session-identifier { + type string; + } + } + +} \ No newline at end of file diff --git a/experimental/odp/ietf-netconf-monitoring.yang b/experimental/odp/ietf-netconf-monitoring.yang new file mode 100644 index 000000000..730a4167c --- /dev/null +++ b/experimental/odp/ietf-netconf-monitoring.yang @@ -0,0 +1,596 @@ +module ietf-netconf-monitoring { + + yang-version 1; + + namespace + "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"; + + prefix ncm; + + import ietf-yang-types { + prefix yang; + revision-date "2013-07-15"; + } + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: Mehmet Ersue + + + WG Chair: Bert Wijnen + + + Editor: Mark Scott + + + Editor: Martin Bjorklund + "; + + description + "NETCONF Monitoring Module. + All elements in this module are read-only. + + Copyright (c) 2010 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's + Legal Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6022; see + the RFC itself for full legal notices."; + + revision "2010-10-04" { + description "Initial revision."; + reference + "RFC 6022: YANG Module for NETCONF Monitoring"; + + } + + + typedef netconf-datastore-type { + type enumeration { + enum "running" { + value 0; + } + enum "candidate" { + value 1; + } + enum "startup" { + value 2; + } + } + description + "Enumeration of possible NETCONF datastore types."; + reference + "RFC 4741: NETCONF Configuration Protocol"; + + } + + identity transport { + description + "Base identity for NETCONF transport types."; + } + + identity netconf-ssh { + base transport; + description + "NETCONF over Secure Shell (SSH)."; + reference + "RFC 4742: Using the NETCONF Configuration Protocol + over Secure SHell (SSH)"; + + } + + identity netconf-soap-over-beep { + base transport; + description + "NETCONF over Simple Object Access Protocol (SOAP) over + Blocks Extensible Exchange Protocol (BEEP)."; + reference + "RFC 4743: Using NETCONF over the Simple Object + Access Protocol (SOAP)"; + + } + + identity netconf-soap-over-https { + base transport; + description + "NETCONF over Simple Object Access Protocol (SOAP) + over Hypertext Transfer Protocol Secure (HTTPS)."; + reference + "RFC 4743: Using NETCONF over the Simple Object + Access Protocol (SOAP)"; + + } + + identity netconf-beep { + base transport; + description + "NETCONF over Blocks Extensible Exchange Protocol (BEEP)."; + reference + "RFC 4744: Using the NETCONF Protocol over the + Blocks Extensible Exchange Protocol (BEEP)"; + + } + + identity netconf-tls { + base transport; + description + "NETCONF over Transport Layer Security (TLS)."; + reference + "RFC 5539: NETCONF over Transport Layer Security (TLS)"; + + } + + identity schema-format { + description + "Base identity for data model schema languages."; + } + + identity xsd { + base schema-format; + description + "W3C XML Schema Definition."; + reference + "W3C REC REC-xmlschema-1-20041028: + XML Schema Part 1: Structures"; + + } + + identity yang { + base schema-format; + description + "The YANG data modeling language for NETCONF."; + reference + "RFC 6020: YANG - A Data Modeling Language for the + Network Configuration Protocol (NETCONF)"; + + } + + identity yin { + base schema-format; + description "The YIN syntax for YANG."; + reference + "RFC 6020: YANG - A Data Modeling Language for the + Network Configuration Protocol (NETCONF)"; + + } + + identity rng { + base schema-format; + description + "Regular Language for XML Next Generation (RELAX NG)."; + reference + "ISO/IEC 19757-2:2008: RELAX NG"; + + } + + identity rnc { + base schema-format; + description "Relax NG Compact Syntax"; + reference + "ISO/IEC 19757-2:2008: RELAX NG"; + + } + + grouping common-counters { + description + "Counters that exist both per session, and also globally, + accumulated from all sessions."; + leaf in-rpcs { + type yang:zero-based-counter32; + description + "Number of correct messages received."; + } + + leaf in-bad-rpcs { + type yang:zero-based-counter32; + description + "Number of messages received when an message was expected, + that were not correct messages. This includes XML parse + errors and errors on the rpc layer."; + } + + leaf out-rpc-errors { + type yang:zero-based-counter32; + description + "Number of messages sent that contained an + element."; + } + + leaf out-notifications { + type yang:zero-based-counter32; + description + "Number of messages sent."; + } + } // grouping common-counters + + container netconf-state { + config false; + description + "The netconf-state container is the root of the monitoring + data model."; + container capabilities { + description + "Contains the list of NETCONF capabilities supported by the + server."; + leaf-list capability { + type inet:uri; + description + "List of NETCONF capabilities supported by the server."; + } + } // container capabilities + + container datastores { + description + "Contains the list of NETCONF configuration datastores."; + list datastore { + key "name"; + description + "List of NETCONF configuration datastores supported by + the NETCONF server and related information."; + leaf name { + type netconf-datastore-type; + description + "Name of the datastore associated with this list entry."; + } + + container locks { + presence + "This container is present only if the datastore + is locked."; + description + "The NETCONF and operations allow + a client to lock specific resources in a datastore. The + NETCONF server will prevent changes to the locked + resources by all sessions except the one that acquired + the lock(s). + + Monitoring information is provided for each datastore + entry including details such as the session that acquired + the lock, the type of lock (global or partial) and the + list of locked resources. Multiple locks per datastore + are supported."; + grouping lock-info { + description + "Lock related parameters, common to both global and + partial locks."; + leaf locked-by-session { + type uint32; + mandatory true; + description + "The session ID of the session that has locked + this resource. Both a global lock and a partial + lock MUST contain the NETCONF session-id. + + If the lock is held by a session that is not managed + by the NETCONF server (e.g., a CLI session), a session + id of 0 (zero) is reported."; + reference + "RFC 4741: NETCONF Configuration Protocol"; + + } + + leaf locked-time { + type yang:date-and-time; + mandatory true; + description + "The date and time of when the resource was + locked."; + } + } // grouping lock-info + choice lock-type { + description + "Indicates if a global lock or a set of partial locks + are set."; + container global-lock { + description + "Present if the global lock is set."; + uses lock-info; + } // container global-lock + list partial-lock { + key "lock-id"; + description + "List of partial locks."; + reference + "RFC 5717: Partial Lock Remote Procedure Call (RPC) for + NETCONF"; + + leaf lock-id { + type uint32; + description + "This is the lock id returned in the + response."; + } + + uses lock-info; + + leaf-list select { + type yang:xpath1.0; + min-elements 1; + description + "The xpath expression that was used to request + the lock. The select expression indicates the + original intended scope of the lock."; + } + + leaf-list locked-node { + type instance-identifier; + description + "The list of instance-identifiers (i.e., the + locked nodes). + + The scope of the partial lock is defined by the list + of locked nodes."; + } + } // list partial-lock + } // choice lock-type + } // container locks + } // list datastore + } // container datastores + + container schemas { + description + "Contains the list of data model schemas supported by the + server."; + list schema { + key "identifier version format"; + description + "List of data model schemas supported by the server."; + leaf identifier { + type string; + description + "Identifier to uniquely reference the schema. The + identifier is used in the operation and may + be used for other purposes such as file retrieval. + + For modeling languages that support or require a data + model name (e.g., YANG module name) the identifier MUST + match that name. For YANG data models, the identifier is + the name of the module or submodule. In other cases, an + identifier such as a filename MAY be used instead."; + } + + leaf version { + type string; + description + "Version of the schema supported. Multiple versions MAY be + supported simultaneously by a NETCONF server. Each + version MUST be reported individually in the schema list, + i.e., with same identifier, possibly different location, + but different version. + + For YANG data models, version is the value of the most + recent YANG 'revision' statement in the module or + submodule, or the empty string if no 'revision' statement + is present."; + } + + leaf format { + type identityref { + base schema-format; + } + description + "The data modeling language the schema is written + in (currently xsd, yang, yin, rng, or rnc). + For YANG data models, 'yang' format MUST be supported and + 'yin' format MAY also be provided."; + } + + leaf namespace { + type inet:uri; + mandatory true; + description + "The XML namespace defined by the data model. + + For YANG data models, this is the module's namespace. + If the list entry describes a submodule, this field + contains the namespace of the module to which the + submodule belongs."; + } + + leaf-list location { + type union { + type enumeration { + enum "NETCONF" { + value 0; + } + } + type inet:uri; + } + description + "One or more locations from which the schema can be + retrieved. This list SHOULD contain at least one + entry per schema. + + A schema entry may be located on a remote file system + (e.g., reference to file system for ftp retrieval) or + retrieved directly from a server supporting the + operation (denoted by the value 'NETCONF')."; + } + } // list schema + } // container schemas + + container sessions { + description + "The sessions container includes session-specific data for + NETCONF management sessions. The session list MUST include + all currently active NETCONF sessions."; + list session { + key "session-id"; + description + "All NETCONF sessions managed by the NETCONF server + MUST be reported in this list."; + leaf session-id { + type uint32 { + range "1..max"; + } + description + "Unique identifier for the session. This value is the + NETCONF session identifier, as defined in RFC 4741."; + reference + "RFC 4741: NETCONF Configuration Protocol"; + + } + + leaf transport { + type identityref { + base transport; + } + mandatory true; + description + "Identifies the transport for each session, e.g., + 'netconf-ssh', 'netconf-soap', etc."; + } + + leaf username { + type string; + mandatory true; + description + "The username is the client identity that was authenticated + by the NETCONF transport protocol. The algorithm used to + derive the username is NETCONF transport protocol specific + and in addition specific to the authentication mechanism + used by the NETCONF transport protocol."; + } + + leaf source-host { + type inet:host; + description + "Host identifier of the NETCONF client. The value + returned is implementation specific (e.g., hostname, + IPv4 address, IPv6 address)"; + } + + leaf login-time { + type yang:date-and-time; + mandatory true; + description + "Time at the server at which the session was established."; + } + + uses common-counters { + description + "Per-session counters. Zero based with following reset + behaviour: + - at start of a session + - when max value is reached"; + } + } // list session + } // container sessions + + container statistics { + description + "Statistical data pertaining to the NETCONF server."; + leaf netconf-start-time { + type yang:date-and-time; + description + "Date and time at which the management subsystem was + started."; + } + + leaf in-bad-hellos { + type yang:zero-based-counter32; + description + "Number of sessions silently dropped because an + invalid message was received. This includes + messages with a 'session-id' attribute, bad namespace, and + bad capability declarations."; + } + + leaf in-sessions { + type yang:zero-based-counter32; + description + "Number of sessions started. This counter is incremented + when a message with a is sent. + + 'in-sessions' - 'in-bad-hellos' = + 'number of correctly started netconf sessions'"; + } + + leaf dropped-sessions { + type yang:zero-based-counter32; + description + "Number of sessions that were abnormally terminated, e.g., + due to idle timeout or transport close. This counter is not + incremented when a session is properly closed by a + operation, or killed by a + operation."; + } + + uses common-counters { + description + "Global counters, accumulated from all sessions. + Zero based with following reset behaviour: + - re-initialization of NETCONF server + - when max value is reached"; + } + } // container statistics + } // container netconf-state + + rpc get-schema { + description + "This operation is used to retrieve a schema from the + NETCONF server. + + Positive Response: + The NETCONF server returns the requested schema. + + Negative Response: + If requested schema does not exist, the is + 'invalid-value'. + + If more than one schema matches the requested parameters, the + is 'operation-failed', and is + 'data-not-unique'."; + input { + leaf identifier { + type string; + mandatory true; + description + "Identifier for the schema list entry."; + } + + leaf version { + type string; + description + "Version of the schema requested. If this parameter is not + present, and more than one version of the schema exists on + the server, a 'data-not-unique' error is returned, as + described above."; + } + + leaf format { + type identityref { + base schema-format; + } + description + "The data modeling language of the schema. If this + parameter is not present, and more than one formats of + the schema exists on the server, a 'data-not-unique' error + is returned, as described above."; + } + } + + output { + anyxml data { + description + "Contains the schema content."; + } + } + } // rpc get-schema +} // module diff --git a/experimental/odp/ietf-netconf-notifications@2012-02-06.yang b/experimental/odp/ietf-netconf-notifications@2012-02-06.yang new file mode 100644 index 000000000..31352a1e8 --- /dev/null +++ b/experimental/odp/ietf-netconf-notifications@2012-02-06.yang @@ -0,0 +1,363 @@ +module ietf-netconf-notifications { + + namespace + "urn:ietf:params:xml:ns:yang:ietf-netconf-notifications"; + + prefix ncn; + + import ietf-inet-types { prefix inet; revision-date "2013-07-15";} + import ietf-netconf { prefix nc; revision-date "2011-06-01";} + + organization + "IETF NETCONF (Network Configuration Protocol) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: Bert Wijnen + + + WG Chair: Mehmet Ersue + + + Editor: Andy Bierman + "; + + description + "This module defines a YANG data model for use with the + NETCONF protocol that allows the NETCONF client to + receive common NETCONF base event notifications. + + Copyright (c) 2012 IETF Trust and the persons identified as + the document authors. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + + + + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6470; see + the RFC itself for full legal notices."; + + revision "2012-02-06" { + description + "Initial version. Errata 3957 added."; + reference + "RFC 6470: NETCONF Base Notifications"; + } + + grouping common-session-parms { + description + "Common session parameters to identify a + management session."; + + leaf username { + type string; + mandatory true; + description + "Name of the user for the session."; + } + + leaf session-id { + type nc:session-id-or-zero-type; + mandatory true; + description + "Identifier of the session. + A NETCONF session MUST be identified by a non-zero value. + A non-NETCONF session MAY be identified by the value zero."; + } + + leaf source-host { + type inet:ip-address; + description + "Address of the remote host for the session."; + } + } + + + + + + + + + grouping changed-by-parms { + description + "Common parameters to identify the source + of a change event, such as a configuration + or capability change."; + + container changed-by { + description + "Indicates the source of the change. + If caused by internal action, then the + empty leaf 'server' will be present. + If caused by a management session, then + the name, remote host address, and session ID + of the session that made the change will be reported."; + choice server-or-user { + mandatory true; + leaf server { + type empty; + description + "If present, the change was caused + by the server."; + } + + case by-user { + uses common-session-parms; + } + } // choice server-or-user + } // container changed-by-parms + } + + + notification netconf-config-change { + description + "Generated when the NETCONF server detects that the + or configuration datastore + has been changed by a management session. + The notification summarizes the edits that + have been detected. + + The server MAY choose to also generate this + notification while loading a datastore during the + boot process for the device."; + + uses changed-by-parms; + + + + + + leaf datastore { + type enumeration { + enum running { + description "The datastore has changed."; + } + enum startup { + description "The datastore has changed"; + } + } + default "running"; + description + "Indicates which configuration datastore has changed."; + } + + list edit { + description + "An edit record SHOULD be present for each distinct + edit operation that the server has detected on + the target datastore. This list MAY be omitted + if the detailed edit operations are not known. + The server MAY report entries in this list for + changes not made by a NETCONF session (e.g., CLI)."; + + leaf target { + type instance-identifier; + description + "Topmost node associated with the configuration change. + A server SHOULD set this object to the node within + the datastore that is being altered. A server MAY + set this object to one of the ancestors of the actual + node that was changed, or omit this object, if the + exact node is not known."; + } + + leaf operation { + type nc:edit-operation-type; + description + "Type of edit operation performed. + A server MUST set this object to the NETCONF edit + operation performed on the target datastore."; + } + } // list edit + } // notification netconf-config-change + + + + + + + notification netconf-capability-change { + description + "Generated when the NETCONF server detects that + the server capabilities have changed. + Indicates which capabilities have been added, deleted, + and/or modified. The manner in which a server + capability is changed is outside the scope of this + document."; + + uses changed-by-parms; + + leaf-list added-capability { + type inet:uri; + description + "List of capabilities that have just been added."; + } + + leaf-list deleted-capability { + type inet:uri; + description + "List of capabilities that have just been deleted."; + } + + leaf-list modified-capability { + type inet:uri; + description + "List of capabilities that have just been modified. + A capability is considered to be modified if the + base URI for the capability has not changed, but + one or more of the parameters encoded at the end of + the capability URI have changed. + The new modified value of the complete URI is returned."; + } + } // notification netconf-capability-change + + + notification netconf-session-start { + description + "Generated when a NETCONF server detects that a + NETCONF session has started. A server MAY generate + this event for non-NETCONF management sessions. + Indicates the identity of the user that started + the session."; + uses common-session-parms; + } // notification netconf-session-start + + + + + notification netconf-session-end { + description + "Generated when a NETCONF server detects that a + NETCONF session has terminated. + A server MAY optionally generate this event for + non-NETCONF management sessions. Indicates the + identity of the user that owned the session, + and why the session was terminated."; + + uses common-session-parms; + + leaf killed-by { + when "../termination-reason = 'killed'"; + type nc:session-id-type; + description + "The ID of the session that directly caused this session + to be abnormally terminated. If this session was abnormally + terminated by a non-NETCONF session unknown to the server, + then this leaf will not be present."; + } + + leaf termination-reason { + type enumeration { + enum "closed" { + description + "The session was terminated by the client in normal + fashion, e.g., by the NETCONF + protocol operation."; + } + enum "killed" { + description + "The session was terminated in abnormal + fashion, e.g., by the NETCONF + protocol operation."; + } + enum "dropped" { + description + "The session was terminated because the transport layer + connection was unexpectedly closed."; + } + enum "timeout" { + description + "The session was terminated because of inactivity, + e.g., waiting for the message or + messages."; + } + + + + enum "bad-hello" { + description + "The client's message was invalid."; + } + enum "other" { + description + "The session was terminated for some other reason."; + } + } + mandatory true; + description + "Reason the session was terminated."; + } + } // notification netconf-session-end + + + notification netconf-confirmed-commit { + description + "Generated when a NETCONF server detects that a + confirmed-commit event has occurred. Indicates the event + and the current state of the confirmed-commit procedure + in progress."; + reference + "RFC 6241, Section 8.4"; + + uses common-session-parms { + when "confirm-event != 'timeout'"; + } + + leaf confirm-event { + type enumeration { + enum "start" { + description + "The confirmed-commit procedure has started."; + } + enum "cancel" { + description + "The confirmed-commit procedure has been canceled, + e.g., due to the session being terminated, or an + explicit operation."; + } + enum "timeout" { + description + "The confirmed-commit procedure has been canceled + due to the confirm-timeout interval expiring. + The common session parameters will not be present + in this sub-mode."; + } + + enum "extend" { + description + "The confirmed-commit timeout has been extended, + e.g., by a new operation."; + } + enum "complete" { + description + "The confirmed-commit procedure has been completed."; + } + } + mandatory true; + description + "Indicates the event that caused the notification."; + } + + leaf timeout { + when + "../confirm-event = 'start' or ../confirm-event = 'extend'"; + type uint32; + units "seconds"; + description + "The configured timeout value if the event type + is 'start' or 'extend'. This value represents + the approximate number of seconds from the event + time when the 'timeout' event might occur."; + } + } // notification netconf-confirmed-commit + +} diff --git a/experimental/odp/ietf-netconf@2011-06-01.yang b/experimental/odp/ietf-netconf@2011-06-01.yang new file mode 100644 index 000000000..4bbb1c279 --- /dev/null +++ b/experimental/odp/ietf-netconf@2011-06-01.yang @@ -0,0 +1,928 @@ +module ietf-netconf { + + // the namespace for NETCONF XML definitions is unchanged + // from RFC 4741, which this document replaces + namespace "urn:ietf:params:xml:ns:netconf:base:1.0"; + + prefix nc; + + import ietf-inet-types { + prefix inet; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: Bert Wijnen + + + WG Chair: Mehmet Ersue + + + Editor: Martin Bjorklund + + + Editor: Juergen Schoenwaelder + + + Editor: Andy Bierman + "; + description + "NETCONF Protocol Data Types and Protocol Operations. + + Copyright (c) 2011 IETF Trust and the persons identified as + the document authors. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6241; see + the RFC itself for full legal notices."; + + revision 2011-06-01 { + description + "Initial revision;"; + reference + "RFC 6241: Network Configuration Protocol"; + } + + extension get-filter-element-attributes { + description + "If this extension is present within an 'anyxml' + statement named 'filter', which must be conceptually + defined within the RPC input section for the + and protocol operations, then the + following unqualified XML attribute is supported + within the element, within a or + protocol operation: + + type : optional attribute with allowed + value strings 'subtree' and 'xpath'. + If missing, the default value is 'subtree'. + + If the 'xpath' feature is supported, then the + following unqualified XML attribute is + also supported: + + select: optional attribute containing a + string representing an XPath expression. + The 'type' attribute must be equal to 'xpath' + if this attribute is present."; + } + + // NETCONF capabilities defined as features + feature writable-running { + description + "NETCONF :writable-running capability; + If the server advertises the :writable-running + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.2"; + } + + feature candidate { + description + "NETCONF :candidate capability; + If the server advertises the :candidate + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.3"; + } + + feature confirmed-commit { + if-feature candidate; + description + "NETCONF :confirmed-commit:1.1 capability; + If the server advertises the :confirmed-commit:1.1 + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + + reference "RFC 6241, Section 8.4"; + } + + feature rollback-on-error { + description + "NETCONF :rollback-on-error capability; + If the server advertises the :rollback-on-error + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.5"; + } + + feature validate { + description + "NETCONF :validate:1.1 capability; + If the server advertises the :validate:1.1 + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.6"; + } + + feature startup { + description + "NETCONF :startup capability; + If the server advertises the :startup + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.7"; + } + + feature url { + description + "NETCONF :url capability; + If the server advertises the :url + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.8"; + } + + feature xpath { + description + "NETCONF :xpath capability; + If the server advertises the :xpath + capability for a session, then this feature must + also be enabled for that session. Otherwise, + this feature must not be enabled."; + reference "RFC 6241, Section 8.9"; + } + + // NETCONF Simple Types + + typedef session-id-type { + type uint32 { + range "1..max"; + } + description + "NETCONF Session Id"; + } + + typedef session-id-or-zero-type { + type uint32; + description + "NETCONF Session Id or Zero to indicate none"; + } + typedef error-tag-type { + type enumeration { + enum in-use { + description + "The request requires a resource that + already is in use."; + } + enum invalid-value { + description + "The request specifies an unacceptable value for one + or more parameters."; + } + enum too-big { + description + "The request or response (that would be generated) is + too large for the implementation to handle."; + } + enum missing-attribute { + description + "An expected attribute is missing."; + } + enum bad-attribute { + description + "An attribute value is not correct; e.g., wrong type, + out of range, pattern mismatch."; + } + enum unknown-attribute { + description + "An unexpected attribute is present."; + } + enum missing-element { + description + "An expected element is missing."; + } + enum bad-element { + description + "An element value is not correct; e.g., wrong type, + out of range, pattern mismatch."; + } + enum unknown-element { + description + "An unexpected element is present."; + } + enum unknown-namespace { + description + "An unexpected namespace is present."; + } + enum access-denied { + description + "Access to the requested protocol operation or + data model is denied because authorization failed."; + } + enum lock-denied { + description + "Access to the requested lock is denied because the + lock is currently held by another entity."; + } + enum resource-denied { + description + "Request could not be completed because of + insufficient resources."; + } + enum rollback-failed { + description + "Request to roll back some configuration change (via + rollback-on-error or operations) + was not completed for some reason."; + + } + enum data-exists { + description + "Request could not be completed because the relevant + data model content already exists. For example, + a 'create' operation was attempted on data that + already exists."; + } + enum data-missing { + description + "Request could not be completed because the relevant + data model content does not exist. For example, + a 'delete' operation was attempted on + data that does not exist."; + } + enum operation-not-supported { + description + "Request could not be completed because the requested + operation is not supported by this implementation."; + } + enum operation-failed { + description + "Request could not be completed because the requested + operation failed for some reason not covered by + any other error condition."; + } + enum partial-operation { + description + "This error-tag is obsolete, and SHOULD NOT be sent + by servers conforming to this document."; + } + enum malformed-message { + description + "A message could not be handled because it failed to + be parsed correctly. For example, the message is not + well-formed XML or it uses an invalid character set."; + } + } + description "NETCONF Error Tag"; + reference "RFC 6241, Appendix A"; + } + + typedef error-severity-type { + type enumeration { + enum error { + description "Error severity"; + } + enum warning { + description "Warning severity"; + } + } + description "NETCONF Error Severity"; + reference "RFC 6241, Section 4.3"; + } + + typedef edit-operation-type { + type enumeration { + enum merge { + description + "The configuration data identified by the + element containing this attribute is merged + with the configuration at the corresponding + level in the configuration datastore identified + by the target parameter."; + } + enum replace { + description + "The configuration data identified by the element + containing this attribute replaces any related + configuration in the configuration datastore + identified by the target parameter. If no such + configuration data exists in the configuration + datastore, it is created. Unlike a + operation, which replaces the + entire target configuration, only the configuration + actually present in the config parameter is affected."; + } + enum create { + description + "The configuration data identified by the element + containing this attribute is added to the + configuration if and only if the configuration + data does not already exist in the configuration + datastore. If the configuration data exists, an + element is returned with an + value of 'data-exists'."; + } + enum delete { + description + "The configuration data identified by the element + containing this attribute is deleted from the + configuration if and only if the configuration + data currently exists in the configuration + datastore. If the configuration data does not + exist, an element is returned with + an value of 'data-missing'."; + } + enum remove { + description + "The configuration data identified by the element + containing this attribute is deleted from the + configuration if the configuration + data currently exists in the configuration + datastore. If the configuration data does not + exist, the 'remove' operation is silently ignored + by the server."; + } + } + default "merge"; + description "NETCONF 'operation' attribute values"; + reference "RFC 6241, Section 7.2"; + } + + // NETCONF Standard Protocol Operations + + rpc get-config { + description + "Retrieve all or part of a specified configuration."; + + reference "RFC 6241, Section 7.1"; + + input { + container source { + description + "Particular configuration to retrieve."; + + choice config-source { + mandatory true; + description + "The configuration to retrieve."; + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config source."; + } + leaf running { + type empty; + description + "The running configuration is the config source."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config source. + This is optional-to-implement on the server because + not all servers will support filtering for this + datastore."; + } + } + } + + anyxml filter { + description + "Subtree or XPath filter to use."; + nc:get-filter-element-attributes; + } + } + + output { + anyxml data { + description + "Copy of the source datastore subset that matched + the filter criteria (if any). An empty data container + indicates that the request did not produce any results."; + } + } + } + + rpc edit-config { + description + "The operation loads all or part of a specified + configuration to the specified target configuration."; + + reference "RFC 6241, Section 7.2"; + + input { + container target { + description + "Particular configuration to edit."; + + choice config-target { + mandatory true; + description + "The configuration target."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config target."; + } + leaf running { + if-feature writable-running; + type empty; + description + "The running configuration is the config source."; + } + } + } + + leaf default-operation { + type enumeration { + enum merge { + description + "The default operation is merge."; + } + enum replace { + description + "The default operation is replace."; + } + enum none { + description + "There is no default operation."; + } + } + default "merge"; + description + "The default operation to use."; + } + + leaf test-option { + if-feature validate; + type enumeration { + enum test-then-set { + description + "The server will test and then set if no errors."; + } + enum set { + description + "The server will set without a test first."; + } + + enum test-only { + description + "The server will only test and not set, even + if there are no errors."; + } + } + default "test-then-set"; + description + "The test option to use."; + } + + leaf error-option { + type enumeration { + enum stop-on-error { + description + "The server will stop on errors."; + } + enum continue-on-error { + description + "The server may continue on errors."; + } + enum rollback-on-error { + description + "The server will roll back on errors. + This value can only be used if the 'rollback-on-error' + feature is supported."; + } + } + default "stop-on-error"; + description + "The error option to use."; + } + + choice edit-content { + mandatory true; + description + "The content for the edit operation."; + + anyxml config { + description + "Inline Config content."; + } + leaf url { + if-feature url; + type inet:uri; + description + "URL-based config content."; + } + } + } + } + + rpc copy-config { + description + "Create or replace an entire configuration datastore with the + contents of another complete configuration datastore."; + + reference "RFC 6241, Section 7.3"; + + input { + container target { + description + "Particular configuration to copy to."; + + choice config-target { + mandatory true; + description + "The configuration target of the copy operation."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config target."; + } + leaf running { + if-feature writable-running; + type empty; + description + "The running configuration is the config target. + This is optional-to-implement on the server."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config target."; + } + leaf url { + if-feature url; + type inet:uri; + description + "The URL-based configuration is the config target."; + } + } + } + + container source { + description + "Particular configuration to copy from."; + + choice config-source { + mandatory true; + description + "The configuration source for the copy operation."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config source."; + } + leaf running { + type empty; + description + "The running configuration is the config source."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config source."; + } + leaf url { + if-feature url; + type inet:uri; + description + "The URL-based configuration is the config source."; + } + anyxml config { + description + "Inline Config content: element. Represents + an entire configuration datastore, not + a subset of the running datastore."; + } + } + } + } + } + + rpc delete-config { + description + "Delete a configuration datastore."; + + reference "RFC 6241, Section 7.4"; + + input { + container target { + description + "Particular configuration to delete."; + + choice config-target { + mandatory true; + description + "The configuration target to delete."; + + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config target."; + } + leaf url { + if-feature url; + type inet:uri; + description + "The URL-based configuration is the config target."; + } + } + } + } + } + + rpc lock { + description + "The lock operation allows the client to lock the configuration + system of a device."; + + reference "RFC 6241, Section 7.5"; + + input { + container target { + description + "Particular configuration to lock."; + + choice config-target { + mandatory true; + description + "The configuration target to lock."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config target."; + } + leaf running { + type empty; + description + "The running configuration is the config target."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config target."; + } + } + } + } + } + + rpc unlock { + description + "The unlock operation is used to release a configuration lock, + previously obtained with the 'lock' operation."; + + reference "RFC 6241, Section 7.6"; + + input { + container target { + description + "Particular configuration to unlock."; + + choice config-target { + mandatory true; + description + "The configuration target to unlock."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config target."; + } + leaf running { + type empty; + description + "The running configuration is the config target."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config target."; + } + } + } + } + } + + rpc get { + description + "Retrieve running configuration and device state information."; + + reference "RFC 6241, Section 7.7"; + + input { + anyxml filter { + description + "This parameter specifies the portion of the system + configuration and state data to retrieve."; + nc:get-filter-element-attributes; + } + } + + output { + anyxml data { + description + "Copy of the running datastore subset and/or state + data that matched the filter criteria (if any). + An empty data container indicates that the request did not + produce any results."; + } + } + } + + rpc close-session { + description + "Request graceful termination of a NETCONF session."; + + reference "RFC 6241, Section 7.8"; + } + + rpc kill-session { + description + "Force the termination of a NETCONF session."; + + reference "RFC 6241, Section 7.9"; + + input { + leaf session-id { + type session-id-type; + mandatory true; + description + "Particular session to kill."; + } + } + } + + rpc commit { + if-feature candidate; + + description + "Commit the candidate configuration as the device's new + current configuration."; + + reference "RFC 6241, Section 8.3.4.1"; + + input { + leaf confirmed { + if-feature confirmed-commit; + type empty; + description + "Requests a confirmed commit."; + reference "RFC 6241, Section 8.3.4.1"; + } + + leaf confirm-timeout { + if-feature confirmed-commit; + type uint32 { + range "1..max"; + } + units "seconds"; + default "600"; // 10 minutes + description + "The timeout interval for a confirmed commit."; + reference "RFC 6241, Section 8.3.4.1"; + } + + leaf persist { + if-feature confirmed-commit; + type string; + description + "This parameter is used to make a confirmed commit + persistent. A persistent confirmed commit is not aborted + if the NETCONF session terminates. The only way to abort + a persistent confirmed commit is to let the timer expire, + or to use the operation. + + The value of this parameter is a token that must be given + in the 'persist-id' parameter of or + operations in order to confirm or cancel + the persistent confirmed commit. + + The token should be a random string."; + reference "RFC 6241, Section 8.3.4.1"; + } + + leaf persist-id { + if-feature confirmed-commit; + type string; + description + "This parameter is given in order to commit a persistent + confirmed commit. The value must be equal to the value + given in the 'persist' parameter to the operation. + If it does not match, the operation fails with an + 'invalid-value' error."; + reference "RFC 6241, Section 8.3.4.1"; + } + + } + } + + rpc discard-changes { + if-feature candidate; + + description + "Revert the candidate configuration to the current + running configuration."; + reference "RFC 6241, Section 8.3.4.2"; + } + + rpc cancel-commit { + if-feature confirmed-commit; + description + "This operation is used to cancel an ongoing confirmed commit. + If the confirmed commit is persistent, the parameter + 'persist-id' must be given, and it must match the value of the + 'persist' parameter."; + reference "RFC 6241, Section 8.4.4.1"; + + input { + leaf persist-id { + type string; + description + "This parameter is given in order to cancel a persistent + confirmed commit. The value must be equal to the value + given in the 'persist' parameter to the operation. + If it does not match, the operation fails with an + 'invalid-value' error."; + } + } + } + + rpc validate { + if-feature validate; + + description + "Validates the contents of the specified configuration."; + + reference "RFC 6241, Section 8.6.4.1"; + + input { + container source { + description + "Particular configuration to validate."; + + choice config-source { + mandatory true; + description + "The configuration source to validate."; + + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config source."; + } + leaf running { + type empty; + description + "The running configuration is the config source."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config source."; + } + leaf url { + if-feature url; + type inet:uri; + description + "The URL-based configuration is the config source."; + } + anyxml config { + description + "Inline Config content: element. Represents + an entire configuration datastore, not + a subset of the running datastore."; + } + } + } + } + } + +} diff --git a/experimental/odp/ietf-network-state@2018-02-26.yang b/experimental/odp/ietf-network-state@2018-02-26.yang new file mode 100644 index 000000000..9a6893da2 --- /dev/null +++ b/experimental/odp/ietf-network-state@2018-02-26.yang @@ -0,0 +1,176 @@ +module ietf-network-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-state"; + prefix nw-s; + + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Alexander Clemm + + + Editor: Jan Medved + + + Editor: Robert Varga + + + Editor: Nitin Bahadur + + Editor: Hariharan Ananthakrishnan + + + Editor: Xufeng Liu + "; + + description + "This module defines a common base data model for a collection + of nodes in a network. Node definitions are further used + in network topologies and inventories. It represents + information that either (1) is learned and automatically + populated or (2) results from applying network information + that has been configured per the 'ietf-network' data model, + mirroring the corresponding data nodes in this data model. + + The data model mirrors 'ietf-network' but contains only + read-only state data. The data model is not needed when the + underlying implementation infrastructure supports the Network + Management Datastore Architecture (NMDA). + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + grouping network-ref { + description + "Contains the information necessary to reference a network -- + for example, an underlay network."; + leaf network-ref { + type leafref { + path "/nw-s:networks/nw-s:network/nw-s:network-id"; + require-instance false; + } + description + "Used to reference a network -- for example, an underlay + network."; + } + } + + grouping node-ref { + description + "Contains the information necessary to reference a node."; + leaf node-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+ + "/../network-ref]/nw-s:node/nw-s:node-id"; + require-instance false; + } + description + "Used to reference a node. + Nodes are identified relative to the network that + contains them."; + } + uses network-ref; + } + + container networks { + config false; + description + "Serves as a top-level container for a list of networks."; + list network { + key "network-id"; + description + "Describes a network. + A network typically contains an inventory of nodes, + topological information (augmented through the + network-topology data model), and layering information."; + container network-types { + description + "Serves as an augmentation target. + The network type is indicated through corresponding + presence containers augmented into this container."; + } + leaf network-id { + type nw:network-id; + description + "Identifies a network."; + } + list supporting-network { + key "network-ref"; + description + "An underlay network, used to represent layered network + topologies."; + leaf network-ref { + type leafref { + path "/nw-s:networks/nw-s:network/nw-s:network-id"; + require-instance false; + } + description + "References the underlay network."; + } + } + + list node { + key "node-id"; + description + "The inventory of nodes of this network."; + leaf node-id { + type nw:node-id; + description + "Uniquely identifies a node within the containing + network."; + } + list supporting-node { + key "network-ref node-ref"; + description + "Represents another node that is in an underlay network + and that supports this node. Used to represent layering + structure."; + leaf network-ref { + type leafref { + path "../../../nw-s:supporting-network/nw-s:network-ref"; + require-instance false; + } + description + "References the underlay network of which the + underlay node is a part."; + } + leaf node-ref { + type leafref { + path "/nw-s:networks/nw-s:network/nw-s:node/nw-s:node-id"; + require-instance false; + } + description + "References the underlay node itself."; + } + } + } + } + } +} diff --git a/experimental/odp/ietf-network-topology-state@2018-02-26.yang b/experimental/odp/ietf-network-topology-state@2018-02-26.yang new file mode 100644 index 000000000..1c1ba1b2e --- /dev/null +++ b/experimental/odp/ietf-network-topology-state@2018-02-26.yang @@ -0,0 +1,273 @@ +module ietf-network-topology-state { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology-state"; + prefix nt-s; + + import ietf-network-state { + prefix nw-s; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Alexander Clemm + + + Editor: Jan Medved + + + Editor: Robert Varga + + + Editor: Nitin Bahadur + + + Editor: Hariharan Ananthakrishnan + + + Editor: Xufeng Liu + "; + + description + "This module defines a common base data model for network + topology state, representing topology that either (1) is learned + or (2) results from applying topology that has been configured + per the 'ietf-network-topology' data model, mirroring the + corresponding data nodes in this data model. It augments the + base network state data model with links to connect nodes, as + well as termination points to terminate links on nodes. + + The data model mirrors 'ietf-network-topology' but contains only + read-only state data. The data model is not needed when the + underlying implementation infrastructure supports the Network + Management Datastore Architecture (NMDA). + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + grouping link-ref { + description + "References a link in a specific network. Although this + grouping is not used in this module, it is defined here for + the convenience of augmenting modules."; + leaf link-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+ + "/../network-ref]/nt-s:link/nt-s:link-id"; + require-instance false; + } + description + "A type for an absolute reference to a link instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw-s:network-ref; + } + + grouping tp-ref { + description + "References a termination point in a specific node. Although + this grouping is not used in this module, it is defined here + for the convenience of augmenting modules."; + leaf tp-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+ + "/../network-ref]/nw-s:node[nw-s:node-id=current()/../"+ + "node-ref]/nt-s:termination-point/nt-s:tp-id"; + require-instance false; + } + description + "A type for an absolute reference to a termination point. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw-s:node-ref; + } + + augment "/nw-s:networks/nw-s:network" { + description + "Add links to the network data model."; + list link { + key "link-id"; + description + "A network link connects a local (source) node and + a remote (destination) node via a set of the respective + node's termination points. It is possible to have several + links between the same source and destination nodes. + Likewise, a link could potentially be re-homed between + termination points. Therefore, in order to ensure that we + would always know to distinguish between links, every link + is identified by a dedicated link identifier. Note that a + link models a point-to-point link, not a multipoint link."; + container source { + description + "This container holds the logical source of a particular + link."; + leaf source-node { + type leafref { + path "../../../nw-s:node/nw-s:node-id"; + require-instance false; + } + description + "Source node identifier. Must be in the same topology."; + } + leaf source-tp { + type leafref { + path "../../../nw-s:node[nw-s:node-id=current()/../"+ + "source-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the source node + and terminates the link."; + } + } + container destination { + description + "This container holds the logical destination of a + particular link."; + leaf dest-node { + type leafref { + path "../../../nw-s:node/nw-s:node-id"; + require-instance false; + } + description + "Destination node identifier. Must be in the same + network."; + } + + leaf dest-tp { + type leafref { + path "../../../nw-s:node[nw-s:node-id=current()/../"+ + "dest-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the + destination node and terminates the link."; + } + } + leaf link-id { + type nt:link-id; + description + "The identifier of a link in the topology. + A link is specific to a topology to which it belongs."; + } + list supporting-link { + key "network-ref link-ref"; + description + "Identifies the link or links on which this link depends."; + leaf network-ref { + type leafref { + path "../../../nw-s:supporting-network/nw-s:network-ref"; + require-instance false; + } + description + "This leaf identifies in which underlay topology + the supporting link is present."; + } + leaf link-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id="+ + "current()/../network-ref]/link/link-id"; + require-instance false; + } + description + "This leaf identifies a link that is a part + of this link's underlay. Reference loops in which + a link identifies itself as its underlay, either + directly or transitively, are not allowed."; + } + } + } + } + + augment "/nw-s:networks/nw-s:network/nw-s:node" { + description + "Augments termination points that terminate links. + Termination points can ultimately be mapped to interfaces."; + list termination-point { + key "tp-id"; + description + "A termination point can terminate a link. + Depending on the type of topology, a termination point + could, for example, refer to a port or an interface."; + leaf tp-id { + type nt:tp-id; + description + "Termination point identifier."; + } + list supporting-termination-point { + key "network-ref node-ref tp-ref"; + description + "This list identifies any termination points on which a + given termination point depends or onto which it maps. + Those termination points will themselves be contained + in a supporting node. This dependency information can be + inferred from the dependencies between links. Therefore, + this item is not separately configurable. Hence, no + corresponding constraint needs to be articulated. + The corresponding information is simply provided by the + implementing system."; + leaf network-ref { + type leafref { + path "../../../nw-s:supporting-node/nw-s:network-ref"; + require-instance false; + } + description + "This leaf identifies in which topology the + supporting termination point is present."; + } + leaf node-ref { + type leafref { + path "../../../nw-s:supporting-node/nw-s:node-ref"; + require-instance false; + } + description + "This leaf identifies in which node the supporting + termination point is present."; + } + + leaf tp-ref { + type leafref { + path "/nw-s:networks/nw-s:network[nw-s:network-id="+ + "current()/../network-ref]/nw-s:node[nw-s:node-id="+ + "current()/../node-ref]/termination-point/tp-id"; + require-instance false; + } + description + "Reference to the underlay node (the underlay node must + be in a different topology)."; + } + } + } + } +} diff --git a/experimental/odp/ietf-network-topology@2018-02-26.yang b/experimental/odp/ietf-network-topology@2018-02-26.yang new file mode 100644 index 000000000..1ec944d79 --- /dev/null +++ b/experimental/odp/ietf-network-topology@2018-02-26.yang @@ -0,0 +1,294 @@ +module ietf-network-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology"; + prefix nt; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Alexander Clemm + + + Editor: Jan Medved + + + Editor: Robert Varga + + + Editor: Nitin Bahadur + + + Editor: Hariharan Ananthakrishnan + + + Editor: Xufeng Liu + "; + + description + "This module defines a common base model for a network topology, + augmenting the base network data model with links to connect + nodes, as well as termination points to terminate links + on nodes. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef link-id { + type inet:uri; + description + "An identifier for a link in a topology. The precise + structure of the link-id will be up to the implementation. + The identifier SHOULD be chosen such that the same link in a + real network topology will always be identified through the + same identifier, even if the data model is instantiated in + separate datastores. An implementation MAY choose to capture + semantics in the identifier -- for example, to indicate the + type of link and/or the type of topology of which the link is + a part."; + } + + typedef tp-id { + type inet:uri; + description + "An identifier for termination points on a node. The precise + structure of the tp-id will be up to the implementation. + The identifier SHOULD be chosen such that the same termination + point in a real network topology will always be identified + through the same identifier, even if the data model is + instantiated in separate datastores. An implementation MAY + choose to capture semantics in the identifier -- for example, + to indicate the type of termination point and/or the type of + node that contains the termination point."; + } + + grouping link-ref { + description + "This grouping can be used to reference a link in a specific + network. Although it is not used in this module, it is + defined here for the convenience of augmenting modules."; + leaf link-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nt:link/nt:link-id"; + require-instance false; + } + description + "A type for an absolute reference to a link instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw:network-ref; + } + + grouping tp-ref { + description + "This grouping can be used to reference a termination point + in a specific node. Although it is not used in this module, + it is defined here for the convenience of augmenting + modules."; + leaf tp-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nw:node[nw:node-id=current()/../"+ + "node-ref]/nt:termination-point/nt:tp-id"; + require-instance false; + } + description + "A type for an absolute reference to a termination point. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw:node-ref; + } + + augment "/nw:networks/nw:network" { + description + "Add links to the network data model."; + list link { + key "link-id"; + description + "A network link connects a local (source) node and + a remote (destination) node via a set of the respective + node's termination points. It is possible to have several + links between the same source and destination nodes. + Likewise, a link could potentially be re-homed between + termination points. Therefore, in order to ensure that we + would always know to distinguish between links, every link + is identified by a dedicated link identifier. Note that a + link models a point-to-point link, not a multipoint link."; + leaf link-id { + type link-id; + description + "The identifier of a link in the topology. + A link is specific to a topology to which it belongs."; + } + container source { + description + "This container holds the logical source of a particular + link."; + leaf source-node { + type leafref { + path "../../../nw:node/nw:node-id"; + require-instance false; + } + description + "Source node identifier. Must be in the same topology."; + } + leaf source-tp { + type leafref { + path "../../../nw:node[nw:node-id=current()/../"+ + "source-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the source node + and terminates the link."; + } + } + + container destination { + description + "This container holds the logical destination of a + particular link."; + leaf dest-node { + type leafref { + path "../../../nw:node/nw:node-id"; + require-instance false; + } + description + "Destination node identifier. Must be in the same + network."; + } + leaf dest-tp { + type leafref { + path "../../../nw:node[nw:node-id=current()/../"+ + "dest-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the + destination node and terminates the link."; + } + } + list supporting-link { + key "network-ref link-ref"; + description + "Identifies the link or links on which this link depends."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-network/nw:network-ref"; + require-instance false; + } + description + "This leaf identifies in which underlay topology + the supporting link is present."; + } + + leaf link-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/"+ + "../network-ref]/link/link-id"; + require-instance false; + } + description + "This leaf identifies a link that is a part + of this link's underlay. Reference loops in which + a link identifies itself as its underlay, either + directly or transitively, are not allowed."; + } + } + } + } + augment "/nw:networks/nw:network/nw:node" { + description + "Augments termination points that terminate links. + Termination points can ultimately be mapped to interfaces."; + list termination-point { + key "tp-id"; + description + "A termination point can terminate a link. + Depending on the type of topology, a termination point + could, for example, refer to a port or an interface."; + leaf tp-id { + type tp-id; + description + "Termination point identifier."; + } + list supporting-termination-point { + key "network-ref node-ref tp-ref"; + description + "This list identifies any termination points on which a + given termination point depends or onto which it maps. + Those termination points will themselves be contained + in a supporting node. This dependency information can be + inferred from the dependencies between links. Therefore, + this item is not separately configurable. Hence, no + corresponding constraint needs to be articulated. + The corresponding information is simply provided by the + implementing system."; + + leaf network-ref { + type leafref { + path "../../../nw:supporting-node/nw:network-ref"; + require-instance false; + } + description + "This leaf identifies in which topology the + supporting termination point is present."; + } + leaf node-ref { + type leafref { + path "../../../nw:supporting-node/nw:node-ref"; + require-instance false; + } + description + "This leaf identifies in which node the supporting + termination point is present."; + } + leaf tp-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/"+ + "../network-ref]/nw:node[nw:node-id=current()/../"+ + "node-ref]/termination-point/tp-id"; + require-instance false; + } + description + "Reference to the underlay node (the underlay node must + be in a different topology)."; + } + } + } + } +} diff --git a/experimental/odp/ietf-network@2018-02-26.yang b/experimental/odp/ietf-network@2018-02-26.yang new file mode 100644 index 000000000..6a03d7e41 --- /dev/null +++ b/experimental/odp/ietf-network@2018-02-26.yang @@ -0,0 +1,192 @@ +module ietf-network { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network"; + prefix nw; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Alexander Clemm + + + Editor: Jan Medved + + + Editor: Robert Varga + + + Editor: Nitin Bahadur + + + Editor: Hariharan Ananthakrishnan + + + Editor: Xufeng Liu + "; + description + "This module defines a common base data model for a collection + of nodes in a network. Node definitions are further used + in network topologies and inventories. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef node-id { + type inet:uri; + description + "Identifier for a node. The precise structure of the node-id + will be up to the implementation. For example, some + implementations MAY pick a URI that includes the network-id + as part of the path. The identifier SHOULD be chosen + such that the same node in a real network topology will + always be identified through the same identifier, even if + the data model is instantiated in separate datastores. An + implementation MAY choose to capture semantics in the + identifier -- for example, to indicate the type of node."; + } + + typedef network-id { + type inet:uri; + description + "Identifier for a network. The precise structure of the + network-id will be up to the implementation. The identifier + SHOULD be chosen such that the same network will always be + identified through the same identifier, even if the data model + is instantiated in separate datastores. An implementation MAY + choose to capture semantics in the identifier -- for example, + to indicate the type of network."; + } + + grouping network-ref { + description + "Contains the information necessary to reference a network -- + for example, an underlay network."; + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + require-instance false; + } + description + "Used to reference a network -- for example, an underlay + network."; + } + } + + grouping node-ref { + description + "Contains the information necessary to reference a node."; + leaf node-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nw:node/nw:node-id"; + require-instance false; + } + description + "Used to reference a node. + Nodes are identified relative to the network that + contains them."; + } + uses network-ref; + } + + container networks { + description + "Serves as a top-level container for a list of networks."; + list network { + key "network-id"; + description + "Describes a network. + A network typically contains an inventory of nodes, + topological information (augmented through the + network-topology data model), and layering information."; + leaf network-id { + type network-id; + description + "Identifies a network."; + } + container network-types { + description + "Serves as an augmentation target. + The network type is indicated through corresponding + presence containers augmented into this container."; + } + list supporting-network { + key "network-ref"; + description + "An underlay network, used to represent layered network + topologies."; + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + require-instance false; + } + description + "References the underlay network."; + } + } + + list node { + key "node-id"; + description + "The inventory of nodes of this network."; + leaf node-id { + type node-id; + description + "Uniquely identifies a node within the containing + network."; + } + list supporting-node { + key "network-ref node-ref"; + description + "Represents another node that is in an underlay network + and that supports this node. Used to represent layering + structure."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-network/nw:network-ref"; + require-instance false; + } + description + "References the underlay network of which the + underlay node is a part."; + } + leaf node-ref { + type leafref { + path "/nw:networks/nw:network/nw:node/nw:node-id"; + require-instance false; + } + description + "References the underlay node itself."; + } + } + } + } + } +} diff --git a/experimental/odp/ietf-origin@2018-02-14.yang b/experimental/odp/ietf-origin@2018-02-14.yang new file mode 100644 index 000000000..3080c9114 --- /dev/null +++ b/experimental/odp/ietf-origin@2018-02-14.yang @@ -0,0 +1,147 @@ +module ietf-origin { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-origin"; + prefix or; + + import ietf-yang-metadata { + prefix md; + } + + organization + "IETF Network Modeling (NETMOD) Working Group"; + + contact + "WG Web: + + WG List: + + Author: Martin Bjorklund + + + Author: Juergen Schoenwaelder + + + Author: Phil Shafer + + + Author: Kent Watsen + + + Author: Rob Wilton + "; + + description + "This YANG module defines an 'origin' metadata annotation and a + set of identities for the origin value. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8342 + (https://www.rfc-editor.org/info/rfc8342); see the RFC itself + for full legal notices."; + + revision 2018-02-14 { + description + "Initial revision."; + reference + "RFC 8342: Network Management Datastore Architecture (NMDA)"; + } + + /* + * Identities + */ + + identity origin { + description + "Abstract base identity for the origin annotation."; + } + + identity intended { + base origin; + description + "Denotes configuration from the intended configuration + datastore."; + } + + identity dynamic { + base origin; + description + "Denotes configuration from a dynamic configuration + datastore."; + } + + identity system { + base origin; + description + "Denotes configuration originated by the system itself. + + Examples of system configuration include applied configuration + for an always-existing loopback interface, or interface + configuration that is auto-created due to the hardware + currently present in the device."; + } + + identity learned { + base origin; + description + "Denotes configuration learned from protocol interactions with + other devices, instead of via either the intended + configuration datastore or any dynamic configuration + datastore. + + Examples of protocols that provide learned configuration + include link-layer negotiations, routing protocols, and + DHCP."; + } + + identity default { + base origin; + description + "Denotes configuration that does not have a configured or + learned value but has a default value in use. Covers both + values defined in a 'default' statement and values defined + via an explanation in a 'description' statement."; + } + + identity unknown { + base origin; + description + "Denotes configuration for which the system cannot identify the + origin."; + } + + /* + * Type definitions + */ + + typedef origin-ref { + type identityref { + base origin; + } + description + "An origin identity reference."; + } + + /* + * Metadata annotations + */ + + md:annotation origin { + type origin-ref; + description + "The 'origin' annotation can be present on any configuration + data node in the operational state datastore. It specifies + from where the node originated. If not specified for a given + configuration data node, then the origin is the same as the + origin of its parent node in the data tree. The origin for + any top-level configuration data nodes must be specified."; + } +} diff --git a/experimental/odp/ietf-packet-fields.yang b/experimental/odp/ietf-packet-fields.yang new file mode 100644 index 000000000..0ca86a890 --- /dev/null +++ b/experimental/odp/ietf-packet-fields.yang @@ -0,0 +1,195 @@ +module ietf-packet-fields { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-packet-fields"; + prefix packet-fields; + import ietf-inet-types { + prefix inet; revision-date 2013-07-15; + } + import ietf-yang-types { + prefix yang; revision-date 2013-07-15; + } + import ietf-interfaces { + prefix if; revision-date 2014-05-08; + } + organization "IETF NETMOD (NETCONF Data Modeling Language) Working + Group"; + contact + "WG Web: http://tools.ietf.org/wg/netmod/ + WG List: netmod@ietf.org + WG Chair: Juergen Schoenwaelder + j.schoenwaelder@jacobs-university.de + WG Chair: Tom Nadeau + tnadeau@lucidvision.com + Editor: Dean Bogdanovic + deanb@juniper.net + Editor: Kiran Agrahara Sreenivasa + kkoushik@cisco.com + Editor: Lisa Huang + lyihuang@juniper.net + Editor: Dana Blair + dblair@cisco.com"; + description + "This YANG module defines groupings that are used by + ietf-access-control-list YANG module. Their usage is not + limited to ietf-access-control-list and can be + used anywhere as applicable. + Copyright (c) 2016 IETF Trust and the persons identified as + the document authors. All rights reserved. + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD + License set forth in Section 4.c of the IETF Trust's Legal + Provisions Relating to IETF Documents + (http://trustee.ietf.org/license-info). + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + revision 2016-02-18 { + description + "Initial version of packet fields used by + ietf-access-control-list"; + reference + "RFC XXXX: Network Access Control List (ACL) + YANG Data Model"; + } + grouping acl-transport-header-fields { + description + "Transport header fields"; + container source-port-range { + presence "Enables setting source port range"; + description + "Inclusive range representing source ports to be used. + When only lower-port is present, it represents a single port."; + leaf lower-port { + type inet:port-number; + mandatory true; + description + "Lower boundary for port."; + } + leaf upper-port { + type inet:port-number; + must ". >= ../lower-port" { + error-message + "The upper-port must be greater than or equal to lower-port"; + } + description + "Upper boundary for port . If existing, the upper port + must be greater or equal to lower-port."; + } + } + container destination-port-range { + presence "Enables setting destination port range"; + description + "Inclusive range representing destination ports to be used. When + only lower-port is present, it represents a single port."; + leaf lower-port { + type inet:port-number; + mandatory true; + description + "Lower boundary for port."; + } + leaf upper-port { + type inet:port-number; + must ". >= ../lower-port" { + error-message + "The upper-port must be greater than or equal to lower-port"; + } + + description + "Upper boundary for port. If existing, the upper port must + be greater or equal to lower-port"; + } + } + } + grouping acl-ip-header-fields { + description + "IP header fields common to ipv4 and ipv6"; + leaf dscp { + type inet:dscp; + description + "Value of dscp."; + } + leaf protocol { + type uint8; + description + "Internet Protocol number."; + } + uses acl-transport-header-fields; + } + grouping acl-ipv4-header-fields { + description + "Fields in IPv4 header."; + leaf destination-ipv4-network { + type inet:ipv4-prefix; + description + "Destination IPv4 address prefix."; + } + leaf source-ipv4-network { + type inet:ipv4-prefix; + description + "Source IPv4 address prefix."; + } + } + grouping acl-ipv6-header-fields { + description + "Fields in IPv6 header"; + leaf destination-ipv6-network { + type inet:ipv6-prefix; + description + "Destination IPv6 address prefix."; + } + leaf source-ipv6-network { + type inet:ipv6-prefix; + description + "Source IPv6 address prefix."; + } + leaf flow-label { + type inet:ipv6-flow-label; + description + "IPv6 Flow label."; + } + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text Representation"; + } + grouping acl-eth-header-fields { + description + "Fields in Ethernet header."; + leaf destination-mac-address { + type yang:mac-address; + description + "Destination IEEE 802 MAC address."; + } + leaf destination-mac-address-mask { + type yang:mac-address; + description + "Destination IEEE 802 MAC address mask."; + } + leaf source-mac-address { + type yang:mac-address; + description + "Source IEEE 802 MAC address."; + } + leaf source-mac-address-mask { + type yang:mac-address; + description + "Source IEEE 802 MAC address mask."; + } + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture."; + } + + grouping metadata { + description + "Fields associated with a packet whick are not in + the header."; + leaf input-interface { + type if:interface-ref { + require-instance false; + } + description + "Packet was received on this interface."; + } + } +} \ No newline at end of file diff --git a/experimental/odp/ietf-restconf-monitoring@2017-01-26.yang b/experimental/odp/ietf-restconf-monitoring@2017-01-26.yang new file mode 100644 index 000000000..55c3cb1f6 --- /dev/null +++ b/experimental/odp/ietf-restconf-monitoring@2017-01-26.yang @@ -0,0 +1,149 @@ +module ietf-restconf-monitoring { + namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring"; + prefix "rcmon"; + + import ietf-yang-types { prefix yang; } + import ietf-inet-types { prefix inet; } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: + WG List: + + Author: Andy Bierman + + + Author: Martin Bjorklund + + + Author: Kent Watsen + "; + + description + "This module contains monitoring information for the + RESTCONF protocol. + + Copyright (c) 2017 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8040; see + the RFC itself for full legal notices."; + + revision 2017-01-26 { + description + "Initial revision."; + reference + "RFC 8040: RESTCONF Protocol."; + } + + container restconf-state { + config false; + description + "Contains RESTCONF protocol monitoring information."; + + container capabilities { + description + "Contains a list of protocol capability URIs."; + + leaf-list capability { + type inet:uri; + description + "A RESTCONF protocol capability URI."; + } + } + + container streams { + description + "Container representing the notification event streams + supported by the server."; + reference + "RFC 5277, Section 3.4, element."; + + list stream { + key name; + description + "Each entry describes an event stream supported by + the server."; + + leaf name { + type string; + description + "The stream name."; + reference + "RFC 5277, Section 3.4, element."; + } + + leaf description { + type string; + description + "Description of stream content."; + reference + "RFC 5277, Section 3.4, element."; + } + + leaf replay-support { + type boolean; + default false; + description + "Indicates if replay buffer is supported for this stream. + If 'true', then the server MUST support the 'start-time' + and 'stop-time' query parameters for this stream."; + reference + "RFC 5277, Section 3.4, element."; + } + + leaf replay-log-creation-time { + when "../replay-support" { + description + "Only present if notification replay is supported."; + } + type yang:date-and-time; + description + "Indicates the time the replay log for this stream + was created."; + reference + "RFC 5277, Section 3.4, + element."; + } + + list access { + key encoding; + min-elements 1; + description + "The server will create an entry in this list for each + encoding format that is supported for this stream. + The media type 'text/event-stream' is expected + for all event streams. This list identifies the + subtypes supported for this stream."; + + leaf encoding { + type string; + description + "This is the secondary encoding format within the + 'text/event-stream' encoding used by all streams. + The type 'xml' is supported for XML encoding. + The type 'json' is supported for JSON encoding."; + } + + leaf location { + type inet:uri; + mandatory true; + description + "Contains a URL that represents the entry point + for establishing notification delivery via + server-sent events."; + } + } + } + } + } +} diff --git a/experimental/odp/ietf-restconf@2013-10-19.yang b/experimental/odp/ietf-restconf@2013-10-19.yang new file mode 100644 index 000000000..83bb37835 --- /dev/null +++ b/experimental/odp/ietf-restconf@2013-10-19.yang @@ -0,0 +1,689 @@ +module ietf-restconf { + namespace "urn:ietf:params:xml:ns:yang:ietf-restconf"; + prefix "restconf"; + + import ietf-yang-types { prefix yang; revision-date 2013-07-15; } + import ietf-inet-types { prefix inet; } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "Editor: Andy Bierman + + + Editor: Martin Bjorklund + + + Editor: Kent Watsen + + + Editor: Rex Fernando + "; + + description + "This module contains conceptual YANG specifications + for the YANG Patch and error content that is used in + RESTCONF protocol messages. A conceptual container + representing the RESTCONF API nodes (media type + application/yang.api). + + Note that the YANG definitions within this module do not + represent configuration data of any kind. + The YANG grouping statements provide a normative syntax + for XML and JSON message encoding purposes. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: remove this note + // Note: extracted from draft-bierman-netconf-restconf-02.txt + + // RFC Ed.: update the date below with the date of RFC publication + // and remove this note. + revision 2013-10-19 { + description + "Initial revision."; + reference + "RFC XXXX: RESTCONF Protocol."; + } + + typedef data-resource-identifier { + type string { + length "1 .. max"; + } + description + "Contains a Data Resource Identifier formatted string + to identify a specific data node. The data node that + uses this data type SHOULD define the document root + for data resource identifiers. The default document + root is the target datastore conceptual root node. + Data resource identifiers are defined relative to + this document root."; + reference + "RFC XXXX: [sec. 5.3.1.1 ABNF For Data Resource Identifiers]"; + } + + // this typedef is TBD; not currently used + typedef datastore-identifier { + type union { + type enumeration { + enum candidate { + description + "Identifies the NETCONF shared candidate datastore."; + reference + "RFC 6241, section 8.3"; + } + enum running { + description + "Identifies the NETCONF running datastore."; + reference + "RFC 6241, section 5.1"; + } + enum startup { + description + "Identifies the NETCONF startup datastore."; + reference + "RFC 6241, section 8.7"; + } + } + type string; + } + description + "Contains a string to identify a specific datastore. + The enumerated datastore identifier values are + reserved for standard datastore names."; + } + + typedef revision-identifier { + type string { + pattern '\d{4}-\d{2}-\d{2}'; + } + description + "Represents a specific date in YYYY-MM-DD format. + TBD: make pattern more precise to exclude leading zeros."; + } + + grouping yang-patch { + + description + "A grouping that contains a YANG container + representing the syntax and semantics of a + YANG Patch edit request message."; + + container yang-patch { + description + "Represents a conceptual sequence of datastore edits, + called a patch. Each patch is given a client-assigned + patch identifier. Each edit MUST be applied + in ascending order, and all edits MUST be applied. + If any errors occur, then the target datastore MUST NOT + be changed by the patch operation. + + A patch MUST be validated by the server to be a + well-formed message before any of the patch edits + are validated or attempted. + + YANG datastore validation (defined in RFC 6020, section + 8.3.3) is performed after all edits have been + individually validated. + + It is possible for a datastore constraint violation to occur + due to any node in the datastore, including nodes not + included in the edit list. Any validation errors MUST + be reported in the reply message."; + + reference + "RFC 6020, section 8.3."; + + leaf patch-id { + type string; + description + "An arbitrary string provided by the client to identify + the entire patch. This value SHOULD be present in any + audit logging records generated by the server for the + patch. Error messages returned by the server pertaining + to this patch will be identified by this patch-id value."; + } + + leaf comment { + type string { + length "0 .. 1024"; + } + description + "An arbitrary string provided by the client to describe + the entire patch. This value SHOULD be present in any + audit logging records generated by the server for the + patch."; + } + + list edit { + key edit-id; + ordered-by user; + + description + "Represents one edit within the YANG Patch + request message."; + + leaf edit-id { + type string; + description + "Arbitrary string index for the edit. + Error messages returned by the server pertaining + to a specific edit will be identified by this + value."; + } + + leaf operation { + type enumeration { + enum create { + description + "The target data node is created using the + supplied value, only if it does not already + exist."; + } + enum delete { + description + "Delete the target node, only if the data resource + currently exists, otherwise return an error."; + } + enum insert { + description + "Insert the supplied value into a user-ordered + list or leaf-list entry. The target node must + represent a new data resource."; + } + enum merge { + description + "The supplied value is merged with the target data + node."; + } + enum move { + description + "Move the target node. Reorder a user-ordered + list or leaf-list. The target node must represent + an existing data resource."; + } + enum replace { + description + "The supplied value is used to replace the target + data node."; + } + enum remove { + description + "Delete the target node if it currently exists."; + } + } + mandatory true; + description + "The datastore operation requested for the associated + edit entry"; + } + + leaf target { + type data-resource-identifier; + mandatory true; + description + "Identifies the target data resource for the edit + operation."; + } + + leaf point { + when "(../operation = 'insert' or " + + "../operation = 'move') and " + + "(../where = 'before' or ../where = 'after')" { + description + "Point leaf only applies for insert or move + operations, before or after an existing entry."; + } + type data-resource-identifier; + description + "The absolute URL path for the data node that is being + used as the insertion point or move point for the + target of this edit entry."; + } + + leaf where { + when "../operation = 'insert' or ../operation = 'move'" { + description + "Where leaf only applies for insert or move + operations."; + } + type enumeration { + enum before { + description + "Insert or move a data node before the data resource + identified by the 'point' parameter."; + } + enum after { + description + "Insert or move a data node after the data resource + identified by the 'point' parameter."; + } + enum first { + description + "Insert or move a data node so it becomes ordered + as the first entry."; + } + enum last { + description + "Insert or move a data node so it becomes ordered + as the last entry."; + } + + } + default last; + description + "Identifies where a data resource will be inserted or + moved. YANG only allows these operations for + list and leaf-list data nodes that are ordered-by + user."; + } + + anyxml value { + when "(../operation = 'create' or " + + "../operation = 'merge' " + + "or ../operation = 'replace' or " + + "../operation = 'insert')" { + description + "Value node only used for create, merge, + replace, and insert operations"; + } + description + "Value used for this edit operation."; + } + } + } + + } // grouping yang-patch + + + grouping yang-patch-status { + + description + "A grouping that contains a YANG container + representing the syntax and semantics of + YANG Patch status response message."; + + container yang-patch-status { + description + "A container representing the response message + sent by the server after a YANG Patch edit + request message has been processed."; + + leaf patch-id { + type string; + description + "The patch-id value used in the request"; + } + + choice global-status { + description + "Report global errors or complete success. + If there is no case selected then errors + are reported in the edit-status container."; + + case global-errors { + uses errors; + description + "This container will be present if global + errors unrelated to a specific edit occurred."; + } + leaf ok { + type empty; + description + "This leaf will be present if the request succeeded + and there are no errors reported in the edit-status + container."; + } + } + + container edit-status { + description + "This container will be present if there are + edit-specific status responses to report."; + + list edit { + key edit-id; + + description + "Represents a list of status responses, + corresponding to edits in the YANG Patch + request message. If an edit entry was + skipped or not reached by the server, + then this list will not contain a corresponding + entry for that edit."; + + leaf edit-id { + type string; + description + "Response status is for the edit list entry + with this edit-id value."; + } + choice edit-status-choice { + description + "A choice between different types of status + responses for each edit entry."; + leaf ok { + type empty; + description + "This edit entry was invoked without any + errors detected by the server associated + with this edit."; + } + leaf location { + type inet:uri; + description + "Contains the Location header value that would be + returned if this edit causes a new resource to be + created. If the edit identified by the same edit-id + value was successfully invoked and a new resource + was created, then this field will be returned + instead of 'ok'."; + } + case errors { + uses errors; + description + "The server detected errors associated with the + edit identified by the same edit-id value."; + } + } + } + } + } + } // grouping yang-patch-status + + + grouping errors { + + description + "A grouping that contains a YANG container + representing the syntax and semantics of a + YANG Patch errors report within a response message."; + + container errors { + config false; // needed so list error does not need a key + description + "Represents an error report returned by the server if + a request results in an error."; + + list error { + description + "An entry containing information about one + specific error that occurred while processing + a RESTCONF request."; + reference "RFC 6241, Section 4.3"; + + leaf error-type { + type enumeration { + enum transport { + description "The transport layer"; + } + enum rpc { + description "The rpc or notification layer"; + } + enum protocol { + description "The protocol operation layer"; + } + enum application { + description "The server application layer"; + } + } + mandatory true; + description + "The protocol layer where the error occurred."; + } + + leaf error-tag { + type string; + mandatory true; + description + "The enumerated error tag."; + } + + leaf error-app-tag { + type string; + description + "The application-specific error tag."; + } + + leaf error-path { + type data-resource-identifier; + description + "The target data resource identifier associated + with the error, if any."; + } + + leaf error-message { + type string; + description + "A message describing the error."; + } + + container error-info { + description + "A container allowing additional information + to be included in the error report."; + // arbitrary anyxml content here + } + } + } + } // grouping errors + + + grouping restconf { + + description + "A grouping that contains a YANG container + representing the syntax and semantics of + the RESTCONF API resource."; + + container restconf { + description + "Conceptual container representing the + application/yang.api resource type."; + + container config { + description + "Container representing the application/yang.datastore + resource type. Represents the conceptual root of the + unified configuration datastore containing YANG data + nodes. The child nodes of this container are + configuration data resources (application/yang.data) + defined as top-level YANG data nodes from the modules + advertised by the server in /restconf/modules."; + } + + container operational { + description + "Container representing the application/yang.datastore + resource type. Represents the conceptual root of the + operational data supported by the server. The child + nodes of this container are operational data resources + (application/yang.data) defined as top-level + YANG data nodes from the modules advertised by + the server in /restconf/modules."; + } + + container modules { + description + "Contains a list of module description entries. + These modules are currently loaded into the server."; + + list module { + key "name revision"; + description + "Each entry represents one module currently + supported by the server."; + + leaf name { + type yang:yang-identifier; + description "The YANG module name."; + } + leaf revision { + type union { + type revision-identifier; + type string { length 0; } + } + description + "The YANG module revision date. An empty string is + used if no revision statement is present in the + YANG module."; + } + leaf namespace { + type inet:uri; + mandatory true; + description + "The XML namespace identifier for this module."; + } + leaf-list feature { + type yang:yang-identifier; + description + "List of YANG feature names from this module that are + supported by the server."; + } + leaf-list deviation { + type yang:yang-identifier; + description + "List of YANG deviation module names used by this + server to modify the conformance of the module + associated with this entry."; + } + } + } + + container operations { + description + "Container for all operation resources + (application/yang.operation), + + Each resource is represented as an empty leaf with the + name of the RPC operation from the YANG rpc statement. + + E.g.; + + POST /restconf/operations/show-log-errors + + leaf show-log-errors { + type empty; + } + "; + } + + container streams { + description + "Container representing the notification event streams + supported by the server."; + reference + "RFC 5277, Section 3.4, element."; + + list stream { + key name; + description + "Each entry describes an event stream supported by + the server."; + + leaf name { + type string; + description "The stream name"; + reference "RFC 5277, Section 3.4, element."; + } + + leaf description { + type string; + description "Description of stream content"; + reference + "RFC 5277, Section 3.4, element."; + } + + leaf replay-support { + type boolean; + description + "Indicates if replay buffer supported for this stream"; + reference + "RFC 5277, Section 3.4, element."; + } + + leaf replay-log-creation-time { + type yang:date-and-time; + description + "Indicates the time the replay log for this stream + was created."; + reference + "RFC 5277, Section 3.4, + element."; + } + + leaf events { + type empty; + description + "Represents the entry point for establishing + notification delivery via server sent events."; + } + } + } + + leaf version { + type enumeration { + enum "1.0" { + description + "Version 1.0 of the RESTCONF protocol."; + } + } + config false; + description + "Contains the RESTCONF protocol version."; + } + } + } // grouping restconf + + + grouping notification { + description + "Contains the notification message wrapper definition."; + + container notification { + description + "RESTCONF notification message wrapper."; + + leaf event-time { + type yang:date-and-time; + mandatory true; + description + "The time the event was generated by the + event source."; + reference + "RFC 5277, section 4, element."; + } + + /* The YANG-specific notification container is encoded + * after the 'event-time' element. The format + * corresponds to the notificationContent element + * in RFC 5277, section 4. For example: + * + * module example-one { + * ... + * notification event1 { ... } + * + * } + * + * Encoded as element 'event1' in the namespace + * for module 'example-one'. + */ + } + } // grouping notification + +} \ No newline at end of file diff --git a/experimental/odp/ietf-restconf@2017-01-26.yang b/experimental/odp/ietf-restconf@2017-01-26.yang new file mode 100644 index 000000000..dc54388b1 --- /dev/null +++ b/experimental/odp/ietf-restconf@2017-01-26.yang @@ -0,0 +1,279 @@ +module ietf-restconf { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-restconf"; + prefix "rc"; + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: + WG List: + + Author: Andy Bierman + + + Author: Martin Bjorklund + + + Author: Kent Watsen + "; + + description + "This module contains conceptual YANG specifications + for basic RESTCONF media type definitions used in + RESTCONF protocol messages. + + Note that the YANG definitions within this module do not + represent configuration data of any kind. + The 'restconf-media-type' YANG extension statement + provides a normative syntax for XML and JSON + message-encoding purposes. + + Copyright (c) 2017 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8040; see + the RFC itself for full legal notices."; + + revision 2017-01-26 { + description + "Initial revision."; + reference + "RFC 8040: RESTCONF Protocol."; + } + + extension yang-data { + argument name { + yin-element true; + } + description + "This extension is used to specify a YANG data template that + represents conceptual data defined in YANG. It is + intended to describe hierarchical data independent of + protocol context or specific message-encoding format. + Data definition statements within a yang-data extension + specify the generic syntax for the specific YANG data + template, whose name is the argument of the 'yang-data' + extension statement. + + Note that this extension does not define a media type. + A specification using this extension MUST specify the + message-encoding rules, including the content media type. + + The mandatory 'name' parameter value identifies the YANG + data template that is being defined. It contains the + template name. + + This extension is ignored unless it appears as a top-level + statement. It MUST contain data definition statements + that result in exactly one container data node definition. + An instance of a YANG data template can thus be translated + into an XML instance document, whose top-level element + corresponds to the top-level container. + + The module name and namespace values for the YANG module using + the extension statement are assigned to instance document data + conforming to the data definition statements within + this extension. + + The substatements of this extension MUST follow the + 'data-def-stmt' rule in the YANG ABNF. + + The XPath document root is the extension statement itself, + such that the child nodes of the document root are + represented by the data-def-stmt substatements within + this extension. This conceptual document is the context + for the following YANG statements: + + - must-stmt + - when-stmt + - path-stmt + - min-elements-stmt + - max-elements-stmt + - mandatory-stmt + - unique-stmt + - ordered-by + - instance-identifier data type + + The following data-def-stmt substatements are constrained + when used within a 'yang-data' extension statement. + + - The list-stmt is not required to have a key-stmt defined. + - The if-feature-stmt is ignored if present. + - The config-stmt is ignored if present. + - The available identity values for any 'identityref' + leaf or leaf-list nodes are limited to the module + containing this extension statement and the modules + imported into that module. + "; + } + + rc:yang-data yang-errors { + uses errors; + } + + rc:yang-data yang-api { + uses restconf; + } + + grouping errors { + description + "A grouping that contains a YANG container + representing the syntax and semantics of a + YANG Patch error report within a response message."; + + container errors { + description + "Represents an error report returned by the server if + a request results in an error."; + + list error { + description + "An entry containing information about one + specific error that occurred while processing + a RESTCONF request."; + reference + "RFC 6241, Section 4.3."; + + leaf error-type { + type enumeration { + enum transport { + description + "The transport layer."; + } + enum rpc { + description + "The rpc or notification layer."; + } + enum protocol { + description + "The protocol operation layer."; + } + enum application { + description + "The server application layer."; + } + } + mandatory true; + description + "The protocol layer where the error occurred."; + } + + leaf error-tag { + type string; + mandatory true; + description + "The enumerated error-tag."; + } + + leaf error-app-tag { + type string; + description + "The application-specific error-tag."; + } + + leaf error-path { + type instance-identifier; + description + "The YANG instance identifier associated + with the error node."; + } + + leaf error-message { + type string; + description + "A message describing the error."; + } + + anydata error-info { + description + "This anydata value MUST represent a container with + zero or more data nodes representing additional + error information."; + } + } + } + } + + grouping restconf { + description + "Conceptual grouping representing the RESTCONF + root resource."; + + container restconf { + description + "Conceptual container representing the RESTCONF + root resource."; + + container data { + description + "Container representing the datastore resource. + Represents the conceptual root of all state data + and configuration data supported by the server. + The child nodes of this container can be any data + resources that are defined as top-level data nodes + from the YANG modules advertised by the server in + the 'ietf-yang-library' module."; + } + + container operations { + description + "Container for all operation resources. + + Each resource is represented as an empty leaf with the + name of the RPC operation from the YANG 'rpc' statement. + + For example, the 'system-restart' RPC operation defined + in the 'ietf-system' module would be represented as + an empty leaf in the 'ietf-system' namespace. This is + a conceptual leaf and will not actually be found in + the module: + + module ietf-system { + leaf system-reset { + type empty; + } + } + + To invoke the 'system-restart' RPC operation: + + POST /restconf/operations/ietf-system:system-restart + + To discover the RPC operations supported by the server: + + GET /restconf/operations + + In XML, the YANG module namespace identifies the module: + + + + In JSON, the YANG module name identifies the module: + + { 'ietf-system:system-restart' : [null] } + "; + } + + leaf yang-library-version { + type string { + pattern '\d{4}-\d{2}-\d{2}'; + } + config false; + mandatory true; + description + "Identifies the revision date of the 'ietf-yang-library' + module that is implemented by this RESTCONF server. + Indicates the year, month, and day in YYYY-MM-DD + numeric format."; + } + } + } +} diff --git a/experimental/odp/ietf-routing-types@2017-12-04.yang b/experimental/odp/ietf-routing-types@2017-12-04.yang new file mode 100644 index 000000000..24319c155 --- /dev/null +++ b/experimental/odp/ietf-routing-types@2017-12-04.yang @@ -0,0 +1,771 @@ +module ietf-routing-types { + namespace "urn:ietf:params:xml:ns:yang:ietf-routing-types"; + prefix rt-types; + + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF RTGWG - Routing Area Working Group"; + contact + "WG Web: + WG List: + + Editors: Xufeng Liu + + Yingzhen Qu + + Acee Lindem + + Christian Hopps + + Lou Berger + "; + + description + "This module contains a collection of YANG data types + considered generally useful for routing protocols. + + Copyright (c) 2017 IETF Trust and the persons + identified as authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8294; see + the RFC itself for full legal notices."; + revision 2017-12-04 { + description "Initial revision."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area. + Section 3."; + } + + /*** Identities related to MPLS/GMPLS ***/ + + identity mpls-label-special-purpose-value { + description + "Base identity for deriving identities describing + special-purpose Multiprotocol Label Switching (MPLS) label + values."; + reference + "RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + identity ipv4-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv4 Explicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity router-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Router Alert Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity ipv6-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv6 Explicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity implicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Implicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity entropy-label-indicator { + base mpls-label-special-purpose-value; + description + "This identity represents the Entropy Label Indicator."; + reference + "RFC 6790: The Use of Entropy Labels in MPLS Forwarding. + Sections 3 and 10.1."; + } + + identity gal-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Generic Associated Channel + (G-ACh) Label (GAL)."; + reference + "RFC 5586: MPLS Generic Associated Channel. + Sections 4 and 10."; + } + + identity oam-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the OAM Alert Label."; + reference + "RFC 3429: Assignment of the 'OAM Alert Label' for + Multiprotocol Label Switching Architecture (MPLS) + Operation and Maintenance (OAM) Functions. + Sections 3 and 6."; + } + + identity extension-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Extension Label."; + reference + "RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels. Sections 3.1 and 5."; + } + + /*** Collection of types related to routing ***/ + + typedef router-id { + type yang:dotted-quad; + description + "A 32-bit number in the dotted-quad format assigned to each + router. This number uniquely identifies the router within + an Autonomous System."; + } + + /*** Collection of types related to VPNs ***/ + + typedef route-target { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + + description + "A Route Target is an 8-octet BGP extended community + initially identifying a set of sites in a BGP VPN + (RFC 4364). However, it has since taken on a more general + role in BGP route filtering. A Route Target consists of two + or three fields: a 2-octet Type field, an administrator + field, and, optionally, an assigned number field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + Route Target types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef ipv6-route-target { + type string { + pattern + '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 Route Target is a 20-octet BGP IPv6 Address + Specific Extended Community serving the same function + as a standard 8-octet Route Target, except that it only + allows an IPv6 address as the global administrator. + The format is . + + Two valid examples are 2001:db8::1:6544 and + 2001:db8::5eb1:791:6b37:17958."; + reference + "RFC 5701: IPv6 Address Specific BGP Extended Community + Attribute."; + } + + typedef route-target-type { + type enumeration { + enum import { + value 0; + description + "The Route Target applies to route import."; + } + enum export { + value 1; + description + "The Route Target applies to route export."; + } + + enum both { + value 2; + description + "The Route Target applies to both route import and + route export."; + } + } + description + "Indicates the role a Route Target takes in route filtering."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)."; + } + + typedef route-distinguisher { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + + description + "A Route Distinguisher is an 8-octet value used to + distinguish routes from different BGP VPNs (RFC 4364). + A Route Distinguisher will have the same format as a + Route Target as per RFC 4360 and will consist of + two or three fields: a 2-octet Type field, an administrator + field, and, optionally, an assigned number field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + route discriminator types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef route-origin { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + description + "A Route Origin is an 8-octet BGP extended community + identifying the set of sites where the BGP route + originated (RFC 4364). A Route Origin will have the same + format as a Route Target as per RFC 4360 and will consist + of two or three fields: a 2-octet Type field, an + administrator field, and, optionally, an assigned number + field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + Additionally, a generic pattern is defined for future + Route Origin types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef ipv6-route-origin { + type string { + pattern + '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 Route Origin is a 20-octet BGP IPv6 Address + Specific Extended Community serving the same function + as a standard 8-octet route, except that it only allows + an IPv6 address as the global administrator. The format + is . + + Two valid examples are 2001:db8::1:6544 and + 2001:db8::5eb1:791:6b37:17958."; + reference + "RFC 5701: IPv6 Address Specific BGP Extended Community + Attribute."; + } + + /*** Collection of types common to multicast ***/ + + typedef ipv4-multicast-group-address { + type inet:ipv4-address { + pattern '(2((2[4-9])|(3[0-9]))\.).*'; + } + description + "This type represents an IPv4 multicast group address, + which is in the range of 224.0.0.0 to 239.255.255.255."; + reference + "RFC 1112: Host Extensions for IP Multicasting."; + } + + typedef ipv6-multicast-group-address { + type inet:ipv6-address { + pattern '(([fF]{2}[0-9a-fA-F]{2}):).*'; + } + description + "This type represents an IPv6 multicast group address, + which is in the range of ff00::/8."; + reference + "RFC 4291: IP Version 6 Addressing Architecture. Section 2.7. + RFC 7346: IPv6 Multicast Address Scopes."; + } + + typedef ip-multicast-group-address { + type union { + type ipv4-multicast-group-address; + type ipv6-multicast-group-address; + } + description + "This type represents a version-neutral IP multicast group + address. The format of the textual representation implies + the IP version."; + } + + typedef ipv4-multicast-source-address { + type union { + type enumeration { + enum * { + description + "Any source address."; + } + } + type inet:ipv4-address; + } + description + "Multicast source IPv4 address type."; + } + + typedef ipv6-multicast-source-address { + type union { + type enumeration { + enum * { + description + "Any source address."; + } + } + type inet:ipv6-address; + } + description + "Multicast source IPv6 address type."; + } + + /*** Collection of types common to protocols ***/ + + typedef bandwidth-ieee-float32 { + type string { + pattern + '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([0-9a-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|' + + '1[01][0-9]|0?[0-9]?[0-9])?)'; + } + description + "Bandwidth in IEEE 754 floating-point 32-bit binary format: + (-1)**(S) * 2**(Exponent-127) * (1 + Fraction), + where Exponent uses 8 bits and Fraction uses 23 bits. + The units are octets per second. + The encoding format is the external hexadecimal-significant + character sequences specified in IEEE 754 and ISO/IEC C99. + The format is restricted to be normalized, non-negative, and + non-fraction: 0x1.hhhhhhp{+}d, 0X1.HHHHHHP{+}D, or 0x0p0, + where 'h' and 'H' are hexadecimal digits and 'd' and 'D' are + integers in the range of [0..127]. + When six hexadecimal digits are used for 'hhhhhh' or + 'HHHHHH', the least significant digit must be an even + number. 'x' and 'X' indicate hexadecimal; 'p' and 'P' + indicate a power of two. Some examples are 0x0p0, 0x1p10, + and 0x1.abcde2p+20."; + reference + "IEEE Std 754-2008: IEEE Standard for Floating-Point + Arithmetic. + ISO/IEC C99: Information technology - Programming + Languages - C."; + } + + typedef link-access-type { + type enumeration { + enum broadcast { + description + "Specify broadcast multi-access network."; + } + enum non-broadcast-multiaccess { + description + "Specify Non-Broadcast Multi-Access (NBMA) network."; + } + enum point-to-multipoint { + description + "Specify point-to-multipoint network."; + } + enum point-to-point { + description + "Specify point-to-point network."; + } + } + description + "Link access type."; + } + + typedef timer-multiplier { + type uint8; + description + "The number of timer value intervals that should be + interpreted as a failure."; + } + + typedef timer-value-seconds16 { + type union { + type uint16 { + range "1..65535"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (16-bit range)."; + } + + typedef timer-value-seconds32 { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (32-bit range)."; + } + + typedef timer-value-milliseconds { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "milliseconds"; + description + "Timer value type, in milliseconds."; + } + + typedef percentage { + type uint8 { + range "0..100"; + } + description + "Integer indicating a percentage value."; + } + + typedef timeticks64 { + type uint64; + description + "This type is based on the timeticks type defined in + RFC 6991, but with 64-bit width. It represents the time, + modulo 2^64, in hundredths of a second between two epochs."; + reference + "RFC 6991: Common YANG Data Types."; + } + + typedef uint24 { + type uint32 { + range "0..16777215"; + } + description + "24-bit unsigned integer."; + } + + /*** Collection of types related to MPLS/GMPLS ***/ + + typedef generalized-label { + type binary; + description + "Generalized Label. Nodes sending and receiving the + Generalized Label are aware of the link-specific + label context and type."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description. Section 3.2."; + } + + typedef mpls-label-special-purpose { + type identityref { + base mpls-label-special-purpose-value; + } + description + "This type represents the special-purpose MPLS label values."; + reference + "RFC 3032: MPLS Label Stack Encoding. + RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + typedef mpls-label-general-use { + type uint32 { + range "16..1048575"; + } + description + "The 20-bit label value in an MPLS label stack as specified + in RFC 3032. This label value does not include the + encodings of Traffic Class and TTL (Time to Live). + The label range specified by this type is for general use, + with special-purpose MPLS label values excluded."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + + typedef mpls-label { + type union { + type mpls-label-special-purpose; + type mpls-label-general-use; + } + description + "The 20-bit label value in an MPLS label stack as specified + in RFC 3032. This label value does not include the + encodings of Traffic Class and TTL."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + + /*** Groupings **/ + + grouping mpls-label-stack { + description + "This grouping specifies an MPLS label stack. The label + stack is encoded as a list of label stack entries. The + list key is an identifier that indicates the relative + ordering of each entry, with the lowest-value identifier + corresponding to the top of the label stack."; + container mpls-label-stack { + description + "Container for a list of MPLS label stack entries."; + list entry { + key "id"; + description + "List of MPLS label stack entries."; + leaf id { + type uint8; + description + "Identifies the entry in a sequence of MPLS label + stack entries. An entry with a smaller identifier + value precedes an entry with a larger identifier + value in the label stack. The value of this ID has + no semantic meaning other than relative ordering + and referencing the entry."; + } + leaf label { + type rt-types:mpls-label; + description + "Label value."; + } + + leaf ttl { + type uint8; + description + "Time to Live (TTL)."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + leaf traffic-class { + type uint8 { + range "0..7"; + } + description + "Traffic Class (TC)."; + reference + "RFC 5462: Multiprotocol Label Switching (MPLS) Label + Stack Entry: 'EXP' Field Renamed to 'Traffic Class' + Field."; + } + } + } + } + + grouping vpn-route-targets { + description + "A grouping that specifies Route Target import-export rules + used in BGP-enabled VPNs."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 4664: Framework for Layer 2 Virtual Private Networks + (L2VPNs)."; + list vpn-target { + key "route-target"; + description + "List of Route Targets."; + leaf route-target { + type rt-types:route-target; + description + "Route Target value."; + } + leaf route-target-type { + type rt-types:route-target-type; + mandatory true; + description + "Import/export type of the Route Target."; + } + } + } +} diff --git a/experimental/odp/ietf-routing@2018-03-13.yang b/experimental/odp/ietf-routing@2018-03-13.yang new file mode 100644 index 000000000..9e259f0e6 --- /dev/null +++ b/experimental/odp/ietf-routing@2018-03-13.yang @@ -0,0 +1,684 @@ +module ietf-routing { + yang-version "1.1"; + namespace "urn:ietf:params:xml:ns:yang:ietf-routing"; + prefix "rt"; + + import ietf-yang-types { + prefix "yang"; + } + + import ietf-interfaces { + prefix "if"; + description + "An 'ietf-interfaces' module version that is compatible with + the Network Management Datastore Architecture (NMDA) + is required."; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + contact + "WG Web: + WG List: + + Editor: Ladislav Lhotka + + Acee Lindem + + Yingzhen Qu + "; + + description + "This YANG module defines essential components for the management + of a routing subsystem. The model fully conforms to the Network + Management Datastore Architecture (NMDA). + + Copyright (c) 2018 IETF Trust and the persons + identified as authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + This version of this YANG module is part of RFC 8349; see + the RFC itself for full legal notices."; + + revision 2018-03-13 { + description + "Network Management Datastore Architecture (NMDA) revision."; + reference + "RFC 8349: A YANG Data Model for Routing Management + (NMDA Version)"; + } + + revision 2016-11-04 { + description + "Initial revision."; + reference + "RFC 8022: A YANG Data Model for Routing Management"; + } + + /* Features */ + feature multiple-ribs { + description + "This feature indicates that the server supports + user-defined RIBs. + + Servers that do not advertise this feature SHOULD provide + exactly one system-controlled RIB per supported address family + and also make it the default RIB. This RIB then appears as an + entry in the list '/routing/ribs/rib'."; + } + + feature router-id { + description + "This feature indicates that the server supports an explicit + 32-bit router ID that is used by some routing protocols. + + Servers that do not advertise this feature set a router ID + algorithmically, usually to one of the configured IPv4 + addresses. However, this algorithm is implementation + specific."; + } + + /* Identities */ + + identity address-family { + description + "Base identity from which identities describing address + families are derived."; + } + identity ipv4 { + base address-family; + description + "This identity represents an IPv4 address family."; + } + + identity ipv6 { + base address-family; + description + "This identity represents an IPv6 address family."; + } + + identity control-plane-protocol { + description + "Base identity from which control-plane protocol identities are + derived."; + } + + identity routing-protocol { + base control-plane-protocol; + description + "Identity from which Layer 3 routing protocol identities are + derived."; + } + + identity direct { + base routing-protocol; + description + "Routing pseudo-protocol that provides routes to directly + connected networks."; + } + + identity static { + base routing-protocol; + description + "'Static' routing pseudo-protocol."; + } + + /* Type Definitions */ + + typedef route-preference { + type uint32; + description + "This type is used for route preferences."; + } + + /* Groupings */ + + grouping address-family { + description + "This grouping provides a leaf identifying an address + family."; + leaf address-family { + type identityref { + base address-family; + } + mandatory true; + description + "Address family."; + } + } + + grouping router-id { + description + "This grouping provides a router ID."; + leaf router-id { + type yang:dotted-quad; + description + "A 32-bit number in the form of a dotted quad that is used by + some routing protocols identifying a router."; + reference + "RFC 2328: OSPF Version 2"; + } + } + + grouping special-next-hop { + description + "This grouping provides a leaf with an enumeration of special + next hops."; + leaf special-next-hop { + type enumeration { + enum blackhole { + description + "Silently discard the packet."; + } + enum unreachable { + description + "Discard the packet and notify the sender with an error + message indicating that the destination host is + unreachable."; + } + enum prohibit { + description + "Discard the packet and notify the sender with an error + message indicating that the communication is + administratively prohibited."; + } + enum receive { + description + "The packet will be received by the local system."; + } + } + description + "Options for special next hops."; + } + } + + grouping next-hop-content { + description + "Generic parameters of next hops in static routes."; + choice next-hop-options { + mandatory true; + description + "Options for next hops in static routes. + + It is expected that further cases will be added through + augments from other modules."; + case simple-next-hop { + description + "This case represents a simple next hop consisting of the + next-hop address and/or outgoing interface. + + Modules for address families MUST augment this case with a + leaf containing a next-hop address of that address + family."; + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + case special-next-hop { + uses special-next-hop; + } + case next-hop-list { + container next-hop-list { + description + "Container for multiple next hops."; + list next-hop { + key "index"; + description + "An entry in a next-hop list. + + Modules for address families MUST augment this list + with a leaf containing a next-hop address of that + address family."; + leaf index { + type string; + description + "A user-specified identifier utilized to uniquely + reference the next-hop entry in the next-hop list. + The value of this index has no semantic meaning + other than for referencing the entry."; + } + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + } + } + } + } + + grouping next-hop-state-content { + description + "Generic state parameters of next hops."; + choice next-hop-options { + mandatory true; + description + "Options for next hops. + + It is expected that further cases will be added through + augments from other modules, e.g., for recursive + next hops."; + case simple-next-hop { + description + "This case represents a simple next hop consisting of the + next-hop address and/or outgoing interface. + + Modules for address families MUST augment this case with a + leaf containing a next-hop address of that address + family."; + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + case special-next-hop { + uses special-next-hop; + } + case next-hop-list { + container next-hop-list { + description + "Container for multiple next hops."; + list next-hop { + description + "An entry in a next-hop list. + + Modules for address families MUST augment this list + with a leaf containing a next-hop address of that + address family."; + leaf outgoing-interface { + type if:interface-ref; + description + "Name of the outgoing interface."; + } + } + } + } + } + } + + grouping route-metadata { + description + "Common route metadata."; + leaf source-protocol { + type identityref { + base routing-protocol; + } + mandatory true; + description + "Type of the routing protocol from which the route + originated."; + } + leaf active { + type empty; + description + "The presence of this leaf indicates that the route is + preferred among all routes in the same RIB that have the + same destination prefix."; + } + leaf last-updated { + type yang:date-and-time; + description + "Timestamp of the last modification of the route. If the + route was never modified, it is the time when the route was + inserted into the RIB."; + } + } + + /* Data nodes */ + + container routing { + description + "Configuration parameters for the routing subsystem."; + uses router-id { + if-feature "router-id"; + description + "Support for the global router ID. Routing protocols + that use a router ID can use this parameter or override it + with another value."; + } + container interfaces { + config false; + description + "Network-layer interfaces used for routing."; + leaf-list interface { + type if:interface-ref; + description + "Each entry is a reference to the name of a configured + network-layer interface."; + } + } + container control-plane-protocols { + description + "Support for control-plane protocol instances."; + list control-plane-protocol { + key "type name"; + description + "Each entry contains a control-plane protocol instance."; + leaf type { + type identityref { + base control-plane-protocol; + } + description + "Type of the control-plane protocol -- an identity + derived from the 'control-plane-protocol' + base identity."; + } + leaf name { + type string; + description + "An arbitrary name of the control-plane protocol + instance."; + } + leaf description { + type string; + description + "Textual description of the control-plane protocol + instance."; + } + container static-routes { + when "derived-from-or-self(../type, 'rt:static')" { + description + "This container is only valid for the 'static' routing + protocol."; + } + description + "Support for the 'static' pseudo-protocol. + + Address-family-specific modules augment this node with + their lists of routes."; + } + } + } + container ribs { + description + "Support for RIBs."; + list rib { + key "name"; + description + "Each entry contains a configuration for a RIB identified + by the 'name' key. + + Entries having the same key as a system-controlled entry + in the list '/routing/ribs/rib' are used for + configuring parameters of that entry. Other entries + define additional user-controlled RIBs."; + leaf name { + type string; + description + "The name of the RIB. + + For system-controlled entries, the value of this leaf + must be the same as the name of the corresponding entry + in the operational state. + + For user-controlled entries, an arbitrary name can be + used."; + } + uses address-family { + description + "The address family of the system-controlled RIB."; + } + + leaf default-rib { + if-feature "multiple-ribs"; + type boolean; + default "true"; + config false; + description + "This flag has the value of 'true' if and only if the RIB + is the default RIB for the given address family. + + By default, control-plane protocols place their routes + in the default RIBs."; + } + container routes { + config false; + description + "Current contents of the RIB."; + list route { + description + "A RIB route entry. This data node MUST be augmented + with information specific to routes of each address + family."; + leaf route-preference { + type route-preference; + description + "This route attribute, also known as 'administrative + distance', allows for selecting the preferred route + among routes with the same destination prefix. A + smaller value indicates a route that is + more preferred."; + } + container next-hop { + description + "Route's next-hop attribute."; + uses next-hop-state-content; + } + uses route-metadata; + } + } + action active-route { + description + "Return the active RIB route that is used for the + destination address. + + Address-family-specific modules MUST augment input + parameters with a leaf named 'destination-address'."; + output { + container route { + description + "The active RIB route for the specified destination. + + If no route exists in the RIB for the destination + address, no output is returned. + + Address-family-specific modules MUST augment this + container with appropriate route contents."; + container next-hop { + description + "Route's next-hop attribute."; + uses next-hop-state-content; + } + uses route-metadata; + } + } + } + leaf description { + type string; + description + "Textual description of the RIB."; + } + } + } + } + + /* + * The subsequent data nodes are obviated and obsoleted + * by the Network Management Datastore Architecture + * as described in RFC 8342. + */ + container routing-state { + config false; + status obsolete; + description + "State data of the routing subsystem."; + uses router-id { + status obsolete; + description + "Global router ID. + + It may be either configured or assigned algorithmically by + the implementation."; + } + container interfaces { + status obsolete; + description + "Network-layer interfaces used for routing."; + leaf-list interface { + type if:interface-state-ref; + status obsolete; + description + "Each entry is a reference to the name of a configured + network-layer interface."; + } + } + container control-plane-protocols { + status obsolete; + description + "Container for the list of routing protocol instances."; + list control-plane-protocol { + key "type name"; + status obsolete; + description + "State data of a control-plane protocol instance. + + An implementation MUST provide exactly one + system-controlled instance of the 'direct' + pseudo-protocol. Instances of other control-plane + protocols MAY be created by configuration."; + leaf type { + type identityref { + base control-plane-protocol; + } + status obsolete; + description + "Type of the control-plane protocol."; + } + leaf name { + type string; + status obsolete; + description + "The name of the control-plane protocol instance. + + For system-controlled instances, this name is + persistent, i.e., it SHOULD NOT change across + reboots."; + } + } + } + container ribs { + status obsolete; + description + "Container for RIBs."; + list rib { + key "name"; + min-elements 1; + status obsolete; + description + "Each entry represents a RIB identified by the 'name' + key. All routes in a RIB MUST belong to the same address + family. + + An implementation SHOULD provide one system-controlled + default RIB for each supported address family."; + leaf name { + type string; + status obsolete; + description + "The name of the RIB."; + } + uses address-family { + status obsolete; + description + "The address family of the RIB."; + } + leaf default-rib { + if-feature "multiple-ribs"; + type boolean; + default "true"; + status obsolete; + description + "This flag has the value of 'true' if and only if the + RIB is the default RIB for the given address family. + + By default, control-plane protocols place their routes + in the default RIBs."; + } + container routes { + status obsolete; + description + "Current contents of the RIB."; + list route { + status obsolete; + description + "A RIB route entry. This data node MUST be augmented + with information specific to routes of each address + family."; + leaf route-preference { + type route-preference; + status obsolete; + description + "This route attribute, also known as 'administrative + distance', allows for selecting the preferred route + among routes with the same destination prefix. A + smaller value indicates a route that is + more preferred."; + } + container next-hop { + status obsolete; + description + "Route's next-hop attribute."; + uses next-hop-state-content { + status obsolete; + description + "Route's next-hop attribute operational state."; + } + } + uses route-metadata { + status obsolete; + description + "Route metadata."; + } + } + } + action active-route { + status obsolete; + description + "Return the active RIB route that is used for the + destination address. + + Address-family-specific modules MUST augment input + parameters with a leaf named 'destination-address'."; + output { + container route { + status obsolete; + description + "The active RIB route for the specified + destination. + + If no route exists in the RIB for the destination + address, no output is returned. + + Address-family-specific modules MUST augment this + container with appropriate route contents."; + container next-hop { + status obsolete; + description + "Route's next-hop attribute."; + uses next-hop-state-content { + status obsolete; + description + "Active route state data."; + } + } + uses route-metadata { + status obsolete; + description + "Active route metadata."; + } + } + } + } + } + } + } +} diff --git a/experimental/odp/ietf-yang-library@2016-06-21.yang b/experimental/odp/ietf-yang-library@2016-06-21.yang new file mode 100644 index 000000000..e6221a60a --- /dev/null +++ b/experimental/odp/ietf-yang-library@2016-06-21.yang @@ -0,0 +1,244 @@ +module ietf-yang-library { + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library"; + prefix "yanglib"; + + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: Mehmet Ersue + + + WG Chair: Mahesh Jethanandani + + + Editor: Andy Bierman + + + Editor: Martin Bjorklund + + + Editor: Kent Watsen + "; + + description + "This module contains monitoring information about the YANG + modules and submodules that are used within a YANG-based + server. + + Copyright (c) 2016 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7895; see + the RFC itself for full legal notices."; + + revision 2016-06-21 { + description + "Initial revision."; + reference + "RFC 7895: YANG Module Library."; + } + + /* + * Typedefs + */ + + typedef revision-identifier { + type string { + pattern '\d{4}-\d{2}-\d{2}'; + } + description + "Represents a specific date in YYYY-MM-DD format."; + } + + /* + * Groupings + */ + + grouping module-list { + description + "The module data structure is represented as a grouping + so it can be reused in configuration or another monitoring + data structure."; + + grouping common-leafs { + description + "Common parameters for YANG modules and submodules."; + + leaf name { + type yang:yang-identifier; + description + "The YANG module or submodule name."; + } + leaf revision { + type union { + type revision-identifier; + type string { length 0; } + } + description + "The YANG module or submodule revision date. + A zero-length string is used if no revision statement + is present in the YANG module or submodule."; + } + } + + grouping schema-leaf { + description + "Common schema leaf parameter for modules and submodules."; + + leaf schema { + type inet:uri; + description + "Contains a URL that represents the YANG schema + resource for this module or submodule. + + This leaf will only be present if there is a URL + available for retrieval of the schema for this entry."; + } + } + + list module { + key "name revision"; + description + "Each entry represents one revision of one module + currently supported by the server."; + + uses common-leafs; + uses schema-leaf; + + leaf namespace { + type inet:uri; + mandatory true; + description + "The XML namespace identifier for this module."; + } + leaf-list feature { + type yang:yang-identifier; + description + "List of YANG feature names from this module that are + supported by the server, regardless of whether they are + defined in the module or any included submodule."; + } + list deviation { + key "name revision"; + description + "List of YANG deviation module names and revisions + used by this server to modify the conformance of + the module associated with this entry. Note that + the same module can be used for deviations for + multiple modules, so the same entry MAY appear + within multiple 'module' entries. + + The deviation module MUST be present in the 'module' + list, with the same name and revision values. + The 'conformance-type' value will be 'implement' for + the deviation module."; + uses common-leafs; + } + leaf conformance-type { + type enumeration { + enum implement { + description + "Indicates that the server implements one or more + protocol-accessible objects defined in the YANG module + identified in this entry. This includes deviation + statements defined in the module. + + For YANG version 1.1 modules, there is at most one + module entry with conformance type 'implement' for a + particular module name, since YANG 1.1 requires that, + at most, one revision of a module is implemented. + + For YANG version 1 modules, there SHOULD NOT be more + than one module entry for a particular module name."; + } + enum import { + description + "Indicates that the server imports reusable definitions + from the specified revision of the module but does + not implement any protocol-accessible objects from + this revision. + + Multiple module entries for the same module name MAY + exist. This can occur if multiple modules import the + same module but specify different revision dates in + the import statements."; + } + } + mandatory true; + description + "Indicates the type of conformance the server is claiming + for the YANG module identified by this entry."; + } + list submodule { + key "name revision"; + description + "Each entry represents one submodule within the + parent module."; + uses common-leafs; + uses schema-leaf; + } + } + } + + /* + * Operational state data nodes + */ + + container modules-state { + config false; + description + "Contains YANG module monitoring information."; + + leaf module-set-id { + type string; + mandatory true; + description + "Contains a server-specific identifier representing + the current set of modules and submodules. The + server MUST change the value of this leaf if the + information represented by the 'module' list instances + has changed."; + } + + uses module-list; + } + + /* + * Notifications + */ + + notification yang-library-change { + description + "Generated when the set of modules and submodules supported + by the server has changed."; + leaf module-set-id { + type leafref { + path "/yanglib:modules-state/yanglib:module-set-id"; + } + mandatory true; + description + "Contains the module-set-id value representing the + set of modules and submodules supported at the server at + the time the notification is generated."; + } + } + +} diff --git a/experimental/odp/ietf-yang-metadata@2016-08-05.yang b/experimental/odp/ietf-yang-metadata@2016-08-05.yang new file mode 100644 index 000000000..5939eebee --- /dev/null +++ b/experimental/odp/ietf-yang-metadata@2016-08-05.yang @@ -0,0 +1,84 @@ +module ietf-yang-metadata { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-metadata"; + + prefix "md"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: + + WG List: + + WG Chair: Lou Berger + + + WG Chair: Kent Watsen + + + Editor: Ladislav Lhotka + "; + + description + "This YANG module defines an 'extension' statement that allows + for defining metadata annotations. + + Copyright (c) 2016 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 7952 + (http://www.rfc-editor.org/info/rfc7952); see the RFC itself + for full legal notices."; + + revision 2016-08-05 { + description + "Initial revision."; + reference + "RFC 7952: Defining and Using Metadata with YANG"; + } + + extension annotation { + argument name; + description + "This extension allows for defining metadata annotations in + YANG modules. The 'md:annotation' statement can appear only + at the top level of a YANG module or submodule, i.e., it + becomes a new alternative in the ABNF production rule for + 'body-stmts' (Section 14 in RFC 7950). + + The argument of the 'md:annotation' statement defines the name + of the annotation. Syntactically, it is a YANG identifier as + defined in Section 6.2 of RFC 7950. + + An annotation defined with this 'extension' statement inherits + the namespace and other context from the YANG module in which + it is defined. + + The data type of the annotation value is specified in the same + way as for a leaf data node using the 'type' statement. + + The semantics of the annotation and other documentation can be + specified using the following standard YANG substatements (all + are optional): 'description', 'if-feature', 'reference', + 'status', and 'units'. + + A server announces support for a particular annotation by + including the module in which the annotation is defined among + the advertised YANG modules, e.g., in a NETCONF + message or in the YANG library (RFC 7950). The annotation can + then be attached to any instance of a data node defined in any + YANG module that is advertised by the server. + + XML encoding and JSON encoding of annotations are defined in + RFC 7952."; + } +} diff --git a/experimental/odp/ietf-yang-types@2013-07-15.yang b/experimental/odp/ietf-yang-types@2013-07-15.yang new file mode 100644 index 000000000..ee58fa3ab --- /dev/null +++ b/experimental/odp/ietf-yang-types@2013-07-15.yang @@ -0,0 +1,474 @@ +module ietf-yang-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types"; + prefix "yang"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: David Kessens + + + WG Chair: Juergen Schoenwaelder + + + Editor: Juergen Schoenwaelder + "; + + description + "This module contains a collection of generally useful derived + YANG data types. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - yang-identifier + - hex-string + - uuid + - dotted-quad"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of counter and gauge types ***/ + + typedef counter32 { + type uint32; + description + "The counter32 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter32 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter32 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter32. + + In the value set and its semantics, this type is equivalent + to the Counter32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter32 { + type yang:counter32; + default "0"; + description + "The zero-based-counter32 type represents a counter32 + that has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter32 textual convention of the SMIv2."; + reference + "RFC 4502: Remote Network Monitoring Management Information + Base Version 2"; + } + + typedef counter64 { + type uint64; + description + "The counter64 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter64 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter64 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter64. + + In the value set and its semantics, this type is equivalent + to the Counter64 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter64 { + type yang:counter64; + default "0"; + description + "The zero-based-counter64 type represents a counter64 that + has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter64 textual convention of the SMIv2."; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef gauge32 { + type uint32; + description + "The gauge32 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^32-1 (4294967295 decimal), and + the minimum value cannot be smaller than 0. The value of + a gauge32 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge32 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the Gauge32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef gauge64 { + type uint64; + description + "The gauge64 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^64-1 (18446744073709551615), and + the minimum value cannot be smaller than 0. The value of + a gauge64 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge64 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the CounterBasedGauge64 SMIv2 textual convention defined + in RFC 2856"; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + /*** collection of identifier-related types ***/ + + typedef object-identifier { + type string { + pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))' + + '(\.(0|([1-9]\d*)))*'; + } + description + "The object-identifier type represents administratively + assigned names in a registration-hierarchical-name tree. + + Values of this type are denoted as a sequence of numerical + non-negative sub-identifier values. Each sub-identifier + value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers + are separated by single dots and without any intermediate + whitespace. + + The ASN.1 standard restricts the value space of the first + sub-identifier to 0, 1, or 2. Furthermore, the value space + of the second sub-identifier is restricted to the range + 0 to 39 if the first sub-identifier is 0 or 1. Finally, + the ASN.1 standard requires that an object identifier + has always at least two sub-identifiers. The pattern + captures these restrictions. + + Although the number of sub-identifiers is not limited, + module designers should realize that there may be + implementations that stick with the SMIv2 limit of 128 + sub-identifiers. + + This type is a superset of the SMIv2 OBJECT IDENTIFIER type + since it is not restricted to 128 sub-identifiers. Hence, + this type SHOULD NOT be used to represent the SMIv2 OBJECT + IDENTIFIER type; the object-identifier-128 type SHOULD be + used instead."; + reference + "ISO9834-1: Information technology -- Open Systems + Interconnection -- Procedures for the operation of OSI + Registration Authorities: General procedures and top + arcs of the ASN.1 Object Identifier tree"; + } + + typedef object-identifier-128 { + type object-identifier { + pattern '\d*(\.\d*){1,127}'; + } + description + "This type represents object-identifiers restricted to 128 + sub-identifiers. + + In the value set and its semantics, this type is equivalent + to the OBJECT IDENTIFIER type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef yang-identifier { + type string { + length "1..max"; + pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*'; + pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*'; + } + description + "A YANG identifier string as defined by the 'identifier' + rule in Section 12 of RFC 6020. An identifier must + start with an alphabetic character or an underscore + followed by an arbitrary sequence of alphabetic or + numeric characters, underscores, hyphens, or dots. + + A YANG identifier MUST NOT start with any possible + combination of the lowercase or uppercase character + sequence 'xml'."; + reference + "RFC 6020: YANG - A Data Modeling Language for the Network + Configuration Protocol (NETCONF)"; + } + + /*** collection of types related to date and time***/ + + typedef date-and-time { + type string { + pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?' + + '(Z|[\+\-]\d{2}:\d{2})'; + } + description + "The date-and-time type is a profile of the ISO 8601 + standard for representation of dates and times using the + Gregorian calendar. The profile is defined by the + date-time production in Section 5.6 of RFC 3339. + + The date-and-time type is compatible with the dateTime XML + schema type with the following notable exceptions: + + (a) The date-and-time type does not allow negative years. + + (b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z + all represent the same time zone in dateTime. + + (c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using + the time-offset 'Z'. + + This type is not equivalent to the DateAndTime textual + convention of the SMIv2 since RFC 3339 uses a different + separator between full-date and full-time and provides + higher resolution of time-secfrac. + + The canonical format for date-and-time values with a known time + zone uses a numeric time zone offset that is calculated using + the device's configured known offset to UTC time. A change of + the device's offset to UTC time will cause date-and-time values + to change accordingly. Such changes might happen periodically + in case a server follows automatically daylight saving time + (DST) time zone offset changes. The canonical format for + date-and-time values with an unknown time zone (usually + referring to the notion of local time) uses the time-offset + -00:00."; + reference + "RFC 3339: Date and Time on the Internet: Timestamps + RFC 2579: Textual Conventions for SMIv2 + XSD-TYPES: XML Schema Part 2: Datatypes Second Edition"; + } + + typedef timeticks { + type uint32; + description + "The timeticks type represents a non-negative integer that + represents the time, modulo 2^32 (4294967296 decimal), in + hundredths of a second between two epochs. When a schema + node is defined that uses this type, the description of + the schema node identifies both of the reference epochs. + + In the value set and its semantics, this type is equivalent + to the TimeTicks type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef timestamp { + type yang:timeticks; + description + "The timestamp type represents the value of an associated + timeticks schema node at which a specific occurrence + happened. The specific occurrence must be defined in the + description of any schema node defined using this type. When + the specific occurrence occurred prior to the last time the + associated timeticks attribute was zero, then the timestamp + value is zero. Note that this requires all timestamp values + to be reset to zero when the value of the associated timeticks + attribute reaches 497+ days and wraps around to zero. + + The associated timeticks schema node must be specified + in the description of any schema node using this type. + + In the value set and its semantics, this type is equivalent + to the TimeStamp textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of generic address types ***/ + + typedef phys-address { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + + description + "Represents media- or physical-level addresses represented + as a sequence octets, each octet represented by two hexadecimal + numbers. Octets are separated by colons. The canonical + representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the PhysAddress textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef mac-address { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; + } + description + "The mac-address type represents an IEEE 802 MAC address. + The canonical representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the MacAddress textual convention of the SMIv2."; + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of XML-specific types ***/ + + typedef xpath1.0 { + type string; + description + "This type represents an XPATH 1.0 expression. + + When a schema node is defined that uses this type, the + description of the schema node MUST specify the XPath + context in which the XPath expression is evaluated."; + reference + "XPATH: XML Path Language (XPath) Version 1.0"; + } + + /*** collection of string types ***/ + + typedef hex-string { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + description + "A hexadecimal string with octets represented as hex digits + separated by colons. The canonical representation uses + lowercase characters."; + } + + typedef uuid { + type string { + pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'; + } + description + "A Universally Unique IDentifier in the string representation + defined in RFC 4122. The canonical representation uses + lowercase characters. + + The following is an example of a UUID in string representation: + f81d4fae-7dec-11d0-a765-00a0c91e6bf6 + "; + reference + "RFC 4122: A Universally Unique IDentifier (UUID) URN + Namespace"; + } + + typedef dotted-quad { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; + } + description + "An unsigned 32-bit number expressed in the dotted-quad + notation, i.e., four octets written as decimal numbers + and separated with the '.' (full stop) character."; + } +} diff --git a/experimental/odp/ifm-config.yang b/experimental/odp/ifm-config.yang new file mode 100644 index 000000000..c70ac285a --- /dev/null +++ b/experimental/odp/ifm-config.yang @@ -0,0 +1,38 @@ +module ifm-config { + + namespace "urn:opendaylight:genius:interfacemanager:config"; + + prefix ifm-config; + + import ietf-yang-types { + prefix yang; + } + + description "This YANG module defines interfacemanager configuration."; + revision "2016-04-06"; + + /* conf parameters for interfacemanager */ + container ifm-config { + config true; + leaf ifm-stats-poll-enabled { + type boolean; + default false; + description "IFM statistics poll flag"; + } + leaf ifm-stats-def-poll-interval { + type uint16; + default 15; + description "IFM statistics polling interval (in minutes)"; + } + leaf itm-direct-tunnels { + description "Enable the ITM to handle tunnels directly by-passing interface manager."; + type boolean; + default false; + } + leaf use-of-tunnels { + description "Enable the ITM to handle OF tunnels directly by-passing interface manager."; + type boolean; + default false; + } + } +} diff --git a/experimental/odp/instance-identifier-patch-module.yang b/experimental/odp/instance-identifier-patch-module.yang new file mode 100644 index 000000000..1eb39fe7c --- /dev/null +++ b/experimental/odp/instance-identifier-patch-module.yang @@ -0,0 +1,50 @@ +module instance-identifier-patch-module { + namespace "instance:identifier:patch:module"; + + prefix "iipmodule"; + revision 2015-11-21 { + } + + container patch-cont { + container patch-cont2 { + leaf cont-leaf { + type string; + } + } + + list my-list1 { + + description "PATCH /restconf/config/instance-identifier-patch-module:patch-cont/my-list1/leaf1"; + + key name; + + leaf name { + type string; + } + + leaf my-leaf11 { + type string; + } + + leaf my-leaf12 { + type string; + } + + list my-list2 { + key name; + + leaf name { + type string; + } + + leaf my-leaf21 { + type string; + } + + leaf my-leaf22 { + type string; + } + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/inter-vpn-link.yang b/experimental/odp/inter-vpn-link.yang new file mode 100755 index 000000000..3ea13c5fa --- /dev/null +++ b/experimental/odp/inter-vpn-link.yang @@ -0,0 +1,135 @@ +module inter-vpn-link { + + namespace "urn:opendaylight:params:xml:ns:yang:netvirt:inter-vpn-link"; + prefix "inter-vpn-link"; + + import ietf-inet-types { prefix inet; revision-date "2013-07-15"; } + + import ietf-yang-types { prefix yang; revision-date "2013-07-15"; } + + description + "Service definition for inter-vpn-link project"; + + revision "2016-03-11" { + description + "Initial revision"; + } + + grouping vpn-endpoint-attribs { + leaf vpn-uuid { + mandatory true; + type yang:uuid; + description "UUID of the VPN to which this endpoint belongs to"; + } + + leaf ip-address { + mandatory true; + type inet:ipv4-address; + description "IP address of the endpoint"; + } + } + + + grouping vpn-endpoint-state-attribs { + leaf vpn-uuid { + type yang:uuid; + description "UUID of the VPN to which this endpoint belongs to"; + } + + leaf-list dp-id { + type uint64; + + description "list of DPNs where this endpoint of the Link has been instantiated"; + } + + leaf lport-tag { + type uint32; + + } + } + + container inter-vpn-links { + list inter-vpn-link { + key "name"; + max-elements "unbounded"; + min-elements "0"; + + leaf name { + mandatory true; + type string; + description "Inter VPN link name"; + } + + + container first-endpoint { + uses vpn-endpoint-attribs; + } + + container second-endpoint { + uses vpn-endpoint-attribs; + } + + leaf bgp-routes-leaking { + mandatory false; + type boolean; + default false; + description "Flag to enable the leaking of BGP routes learnt from one VPN to another VPN"; + } + + leaf connected-routes-leaking { + mandatory false; + type boolean; + default false; + description "Flag to enable the leaking of directly connected routes learnt from one VPN to another VPN"; + } + + leaf static-routes-leaking { + mandatory false; + type boolean; + default false; + description "Flag to enable the leaking of static routes learnt from one VPN to another VPN"; + } + + must "first-endpoint and second-endpoint"; // To ensure both endpoints are present + } + } + + container inter-vpn-link-states { + list inter-vpn-link-state { + key "inter-vpn-link-name"; + + leaf inter-vpn-link-name { + type string; + } + + leaf state { + type enumeration { + enum active; + enum error; + } + description "Holds the current state of the InterVPN Link"; + } + + container first-endpoint-state { + uses vpn-endpoint-state-attribs; + } + + container second-endpoint-state { + uses vpn-endpoint-state-attribs; + } + + leaf error-description { + type string; + } + } + } + + notification inter-vpn-link-creation-error { + container inter-vpn-link-creation-error-message { + leaf error-message { + type "string"; + } + } + } + +} diff --git a/experimental/odp/interface-statistics.yang b/experimental/odp/interface-statistics.yang new file mode 100644 index 000000000..4095406b1 --- /dev/null +++ b/experimental/odp/interface-statistics.yang @@ -0,0 +1,58 @@ +module interface-statistics { + namespace "urn:opendaylight:genius:interface:statistics"; + prefix if-stats; + + import ietf-interfaces { + prefix if; + } + + revision "2015-08-24" { + description "YANG model describes rpc to retrieve the different ingress/egress statistics ie. packet/byte counts"; + } + + typedef result-code { + type enumeration { + enum not-found; + enum success; + enum incomplete; + } + } + + grouping service-enitity-statistics { + leaf packet-tx-count { + type uint32; + } + leaf packet-rx-count { + type uint32; + } + leaf byte-tx-count { + type uint32; + } + leaf byte-rx-count { + type uint32; + } + } + + grouping stat-reply { + leaf stat-result-code { + type result-code; + } + uses service-enitity-statistics; + } + + rpc get-interface-statistics { + input { + leaf interface-name { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + } + output { + container stat-result { + uses stat-reply; + } + } + } + +} diff --git a/experimental/odp/ipfix-application-information.yang b/experimental/odp/ipfix-application-information.yang new file mode 100644 index 000000000..98744aec4 --- /dev/null +++ b/experimental/odp/ipfix-application-information.yang @@ -0,0 +1,214 @@ +module ipfix-application-information { + yang-version 1; + + namespace "urn:ietf:params:xml:ns:yang:ipfix-application-information"; + + prefix ipfix-app-info; + + organization "Qosmos"; + contact "Christophe Fontaine "; + + description + "This module contains a collection of YANG definitions to + manage IPfix Application Identification Information. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC + + + revision 2015-04-10 { + description + "Initial version of IPFIX fields used by access-lists"; + reference "https://tools.ietf.org/html/" + + "draft-penno-sfc-appid"; + } + + typedef application-id-ref { + type leafref { + path "/ipfix-app-info:application-id-dictionary/" + + "ipfix-app-info:application-id/" + + "ipfix-app-info:applicationName"; + } + description + "This type is used by data models that need to reference + an application-id"; + } + + typedef class-id-name { + type enumeration { + enum "IANA-L3" { + value 1; + description + "IANA-L3"; + } + enum "PANA-L3" { + value 2; + description + "PANA-L3"; + } + enum "IANA-L4" { + value 3; + description + "IANA-L4"; + } + enum "PANA-L4" { + value 4; + description + "PANA-L4"; + } + enum "USER-Defined" { + value 6; + description + "USER-Defined"; + } + enum "PANA-L2" { + value 12; + description + "PANA-L2"; + } + enum "PANA-L7" { + value 13; + description + "PANA-L7"; + } + enum "ETHERTYPE" { + value 18; + description + "ETHERTYPE"; + } + enum "LLC" { + value 19; + description + "LLC"; + } + enum "PANA-L7-PEN" { + value 20; + description + "PANA-L7-PEN"; + } + } + description + "The definitions for Classification engine ID names."; + } + + container class-id-dictionary { + description "Dictionary for classification ids"; + list class-id { + key "name"; + unique "id"; + leaf id { + type uint8; + description "Classification identifier"; + } + leaf name { + type string; + description "classification Engine name"; + } + leaf description { + type string; + description "Description of the class-id"; + } + description "A list of all classification ids"; + } + } + + container application-id-dictionary { + description "Dictionary for application ids"; + list application-id { + key "applicationName"; + unique "class-id pen selector-id"; + leaf class-id { + type leafref { + path "/ipfix-app-info:class-id-dictionary/" + + "ipfix-app-info:class-id/ipfix-app-info:id"; + } + mandatory true; + description + "A unique identifier for the engine that + determined the Selector ID. Thus, the + Classification Engine ID defines the context for + the Selector ID."; + } + leaf pen { + type uint32; + mandatory true; + description + "Private Entreprise Number, only relevant when + used with appropriate class-id. + Set to 0 when not used."; + } + leaf selector-id { + type uint32 { + range "0..16777216"; + } + mandatory true; + description "Selector identifier"; + } + leaf applicationName { + type string; + mandatory true; + description "The name of the application"; + } + leaf applicationDescription { + type string; + description "The description of the application"; + } + leaf applicationCategoryName { + type string; + description + "An attribute that provides a first- + level categorization for each + Application ID. Examples include + browsing, email, file-sharing, + gaming, instant messaging, voice- + and-video, etc. + The category attribute is encoded by + the applicationCategoryName + Information Element"; + } + leaf applicationSubCategoryName { + type string; + description + "An attribute that provides a second- + level categorization for each + Application ID. Examples include + backup-systems, client-server, + database, routing-protocol, etc. + The sub-category attribute is + encoded by the applicationSubCategoryName + Information Element"; + } + leaf applicationGroupName { + type string; + description + "An attribute that groups multiple + Application IDs that belong to the + same networking application. For + example, the ftp-group contains + ftp-data (port 20), ftp (port 20), + ni-ftp (port 47), sftp (port 115), + bftp (port 152), ftp-agent(port + 574), ftps-data (port 989). The + application-group attribute is + encoded by the applicationGroupName + Information Element"; + } + description "A list of all applications"; + } + } +} diff --git a/experimental/odp/ipv6-nd-util.yang b/experimental/odp/ipv6-nd-util.yang new file mode 100644 index 000000000..94ac91e45 --- /dev/null +++ b/experimental/odp/ipv6-nd-util.yang @@ -0,0 +1,102 @@ +module ipv6-nd-util { + yang-version 1; + namespace "urn:opendaylight:genius:ipv6:nd:util"; + prefix "ipv6-nd-util"; + + import ietf-interfaces { + prefix if; + } + + import ietf-inet-types { + prefix inet; revision-date 2013-07-15; + } + + import ietf-yang-types { + prefix yang; + } + + import yang-ext { + prefix ext; + revision-date "2013-07-09"; + } + + import ipv6-neighbor-discovery { + prefix nd; + revision-date "2016-06-20"; + } + + revision "2017-02-10" { + description "IPv6 Neighbor Discovery Util module"; + } + + grouping interfaces { + list interface-address { + key interface; + leaf interface { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + leaf src-ip-address { + type inet:ipv6-address; + } + leaf src-mac-address { + type yang:phys-address; + } + } + } + + grouping packet-metadata-info { + leaf of-table-id { + type uint32; + } + leaf metadata { + type uint64; + } + leaf interface { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + } + + augment "/nd:neighbor-advertise-packet" { + ext:augment-identifier "packet-metadata"; + uses packet-metadata-info; + } + + rpc send-neighbor-solicitation { + input { + leaf target-ip-address { + type inet:ipv6-address; + } + uses interfaces; + } + } + + rpc send-neighbor-solicitation-to-of-group { + input { + leaf source-ipv6 { + type inet:ipv6-address; + mandatory "true"; + } + leaf target-ip-address { + type inet:ipv6-address; + mandatory "true"; + } + leaf source-ll-address { + type yang:mac-address; + mandatory "true"; + } + leaf dp-id { + type uint64; + mandatory "true"; + } + leaf of-group-id { + type uint32; + mandatory "true"; + description "NS will be sent to the specified OpenFlow group ID."; + } + } + } +} diff --git a/experimental/odp/ipv6-neighbor-discovery.yang b/experimental/odp/ipv6-neighbor-discovery.yang new file mode 100644 index 000000000..84997098b --- /dev/null +++ b/experimental/odp/ipv6-neighbor-discovery.yang @@ -0,0 +1,194 @@ +/* +Copyright (c) 2016 Dell Inc. and others. All rights reserved. + +This program and the accompanying materials are made available under the +terms of the Eclipse Public License v1.0 which accompanies this distribution, +and is available at http://www.eclipse.org/legal/epl-v10.html +*/ + +module ipv6-neighbor-discovery { + yang-version 1; + namespace "urn:opendaylight:genius:ipv6:nd:packet"; + prefix nd; + + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + + revision 2016-06-20 { description "ND informational message packets"; } + + grouping ethernet-header { + leaf source-mac { + type yang:mac-address; + } + leaf destination-mac { + type yang:mac-address; + } + leaf ethertype { + type uint16; + } + } + + grouping ipv6-header { + leaf version { + type uint8; + } + leaf flow-label { + type uint32; + } + leaf ipv6-length { + type uint16; + } + leaf next-header { + type uint8; + } + leaf hop-limit { + type uint8; + } + leaf source-ipv6 { + type inet:ipv6-address; + } + leaf destination-ipv6 { + type inet:ipv6-address; + } + } + + grouping icmp6-header { + leaf icmp6-type { + type uint8; + } + leaf icmp6-code { + type uint8; + } + leaf icmp6-chksum { + type uint16; + } + } + + container neighbor-solicitation-packet { + uses ethernet-header; + uses ipv6-header; + uses icmp6-header; + leaf reserved { + type uint32; + } + leaf target-ip-address { + type inet:ipv6-address; + } + leaf option-type { + type uint8; + } + leaf source-addr-length { + type uint8; + } + leaf source-ll-address { + type yang:mac-address; + } + } + + container neighbor-advertise-packet { + uses ethernet-header; + uses ipv6-header; + uses icmp6-header; + leaf flags { + type uint32; + } + leaf target-address { + type inet:ipv6-address; + } + leaf option-type { + type uint8; + } + leaf target-addr-length { + type uint8; + } + leaf target-ll-address { + type yang:mac-address; + } + } + + container router-solicitation-packet { + uses ethernet-header; + uses ipv6-header; + uses icmp6-header; + leaf reserved { + type uint32; + } + leaf option-type { + type uint8; + } + leaf source-addr-length { + type uint8; + } + leaf source-ll-address { + type yang:mac-address; + } + } + + container router-advertisement-packet { + uses ethernet-header; + uses ipv6-header; + uses icmp6-header; + leaf cur-hop-limit { + type uint8; + } + leaf flags { + type uint8; + } + leaf router-lifetime { + type uint16; + } + leaf reachable-time { + type uint32; + } + leaf retrans-time { + type uint32; + } + + leaf option-source-addr { + type uint8; + } + leaf source-addr-length { + type uint8; + } + leaf source-ll-address { + type yang:mac-address; + } + + leaf option-mtu { + type uint8; + } + leaf option-mtu-length { + type uint8; + } + leaf mtu { + type uint32; + } + list prefix-list { + key "prefix"; + leaf option-type { + type uint8; + } + leaf option-length { + type uint8; + } + leaf prefix-length { + type uint8; + } + leaf flags { + type uint8; + } + leaf valid-lifetime { + type uint32; + } + leaf preferred-lifetime { + type uint32; + } + leaf reserved { + type uint32; + } + leaf prefix { + type inet:ipv6-prefix; + } + } + } +} diff --git a/experimental/odp/ipv6service-config.yang b/experimental/odp/ipv6service-config.yang new file mode 100644 index 000000000..8abe60b04 --- /dev/null +++ b/experimental/odp/ipv6service-config.yang @@ -0,0 +1,31 @@ +module ipv6service-config { + yang-version 1; + namespace "urn:opendaylight:netvirt:ipv6service-config"; + prefix "ipv6service-config"; + + description + "Configuration for IPv6 service."; + + revision "2018-10-10" { + description + "Initial revision."; + } + + container ipv6service-config { + config true; + + leaf router-discovery-punt-timeout { + description "Hard timeout value for learnt flows for router discovery punts (unit - seconds). + To turn off the rate limiting and installation of learnt flows, it should be set to 0"; + type uint16; + default 10; + } + + leaf neighbor-discovery-punt-timeout { + description "Hard timeout value for learnt flows for neighbor discovery punts (unit - seconds). + To turn off the rate limiting and installation of learnt flows, it should be set to 0"; + type uint16; + default 10; + } + } +} diff --git a/experimental/odp/isis-topology@2013-10-21.yang b/experimental/odp/isis-topology@2013-10-21.yang new file mode 100644 index 000000000..f58120213 --- /dev/null +++ b/experimental/odp/isis-topology@2013-10-21.yang @@ -0,0 +1,143 @@ +module isis-topology { + yang-version 1; + namespace "urn:TBD:params:xml:ns:yang:network:isis-topology"; + // replace with IANA namespace when assigned + prefix "isis"; + import network-topology { + prefix nt; + revision-date 2013-10-21; + } + import l3-unicast-igp-topology { + prefix igp; + revision-date 2013-10-21; + } + import ted { + prefix ted; + revision-date 2013-10-21; + } + + organization "TBD"; + contact "TBD"; + description "ISIS Topology model"; + + revision "2013-10-21" { + description "Initial version"; + } + typedef iso-system-id { + description "ISO System ID. RFC 1237"; + type string { + pattern '[0-9a-fA-F]{4}(\.[0-9a-fA-F]{4}){2}'; + } + } + + typedef iso-pseudonode-id { + description "ISO pseudonode id for broadcast network"; + type string { + pattern '[0-9a-fA-F]{2}'; + } + } + typedef iso-net-id { + description "ISO NET ID. RFC 1237"; + type string { + pattern '[0-9a-fA-F]{2}((\.[0-9a-fA-F]{4}){6})'; + } + } + + grouping isis-topology-type { + container isis { + presence "Indicates ISIS Topology"; + } + } + + augment "/nt:network-topology/nt:topology/nt:topology-types/igp:l3-unicast-igp-topology" { + uses isis-topology-type; + } + + augment "/nt:network-topology/nt:topology/igp:igp-topology-attributes" { + when "../nt:topology-types/igp:l3-unicast-igp-topology/isis"; + container isis-topology-attributes { + leaf net { + type iso-net-id; + } + } + } + + augment "/nt:network-topology/nt:topology/nt:node/igp:igp-node-attributes" { + when "../../nt:topology-types/igp:l3-unicast-igp-topology/isis"; + uses isis-node-attributes; + } + + augment "/nt:network-topology/nt:topology/nt:link/igp:igp-link-attributes" { + + when "../../nt:topology-types/igp:l3-unicast-igp-topology/isis"; + uses isis-link-attributes; + } + + grouping isis-node-attributes { + container isis-node-attributes { + container iso { + leaf iso-system-id { + type iso-system-id; + } + leaf iso-pseudonode-id { + default "00"; + type iso-pseudonode-id; + } + } + leaf-list net { + max-elements 3; + type iso-net-id; + } + leaf-list multi-topology-id { + description "List of Multi Topology Identifier upto 128 (0-127). RFC 4915"; + max-elements "128"; + type uint8 { + range "0..127"; + } + } + choice router-type { + case level-2 { + leaf level-2 { + type empty; + } + } + case level-1 { + leaf level-1 { + type empty; + } + } + case level-1-2 { + leaf level-1-2 { + type empty; + } + } + } + container ted { + uses ted:ted-node-attributes; + } + } + } + + grouping isis-link-attributes { + container isis-link-attributes { + leaf multi-topology-id { + type uint8 { + range "0..127"; + } + } + container ted { + uses ted:ted-link-attributes; + } + } + } + + augment "/igp:igp-node-event" { + uses isis-topology-type; + uses isis-node-attributes; + } + + augment "/igp:igp-link-event" { + uses isis-topology-type; + uses isis-link-attributes; + } +} // Module isis-topology diff --git a/experimental/odp/itm-config.yang b/experimental/odp/itm-config.yang new file mode 100644 index 000000000..9b53114e2 --- /dev/null +++ b/experimental/odp/itm-config.yang @@ -0,0 +1,170 @@ +module itm-config { + + namespace "urn:opendaylight:genius:itm:config"; + + prefix itm-config; + + import ietf-interfaces { + prefix if; + } + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + import odl-interface { + prefix odlif; + } + + description "This YANG module defines automatic tunnel configuration."; + revision "2016-04-06"; + + /* Tunnel Monitoring Knob */ + + container tunnel-monitor-params { + leaf enabled { + type boolean; + default true; + } + + leaf monitor-protocol { + type identityref { + base odlif:tunnel-monitoring-type-base; + } + default odlif:tunnel-monitoring-type-bfd; + } + } + container tunnel-monitor-interval { + leaf interval { + type uint16 { + range "1000..30000"; + } + } + } + + /* Configuration data */ + + container vtep-config-schemas { + list vtep-config-schema { + key schema-name; + + leaf schema-name { + type string; + mandatory true; + description "Schema name"; + } + + leaf transport-zone-name { + type string; + mandatory true; + description "Transport zone"; + } + + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + } + + leaf port-name { + type string; + mandatory true; + description "Port name"; + } + + leaf vlan-id { + type uint16 { + range "0..4094"; + } + mandatory true; + description "VLAN ID"; + } + + leaf gateway-ip { + type inet:ip-address; + description "Gateway IP address"; + } + + leaf subnet { + type inet:ip-prefix; + mandatory true; + description "Subnet Mask in CIDR-notation string, e.g. 10.0.0.0/24"; + } + + leaf exclude-ip-filter { + type string; + description "IP Addresses which needs to be excluded from the specified subnet. IP address range or comma separated IP addresses can to be specified. e.g: 10.0.0.1-10.0.0.20,10.0.0.30,10.0.0.35"; + } + + list dpn-ids { + key "DPN"; + + leaf DPN { + type uint64; + description "DPN ID"; + } + } + } + } + + /* Ip Address book keeping */ + container vtep-ip-pools { + config true; + list vtep-ip-pool { + key subnet-cidr; + leaf subnet-cidr{ + type string; + } + leaf-list available-ipaddress { + type inet:ip-address; + } + leaf-list allocated-ipaddress { + type inet:ip-address; + } + } + } + + /* conf parameters for default-transport-zone */ + container itm-config { + config true; + leaf def-tz-enabled { + type boolean; + default false; + } + leaf def-tz-tunnel-type { + type string; + default "vxlan"; + } + list tunnel-aggregation { + key "tunnel-type"; + leaf tunnel-type { + type string; + } + + leaf enabled { + type boolean; + default false; + } + } + leaf default-tunnel-tos { + description "Default value of ToS bits to be set on the encapsulating + packet. The value of 'inherit' will copy the DSCP value + from inner IPv4 or IPv6 packets. When ToS is given as + a numberic value, the least significant two bits will + be ignored."; + + type string { + length "1..8"; + } + default 0; + } + leaf gpe-extension-enabled { + description "Enable the GPE extension for VXLAN tunnel interfaces + configured through ITM."; + type boolean; + default false; + } + } +} diff --git a/experimental/odp/itm-rpc.yang b/experimental/odp/itm-rpc.yang new file mode 100644 index 000000000..22e6b853c --- /dev/null +++ b/experimental/odp/itm-rpc.yang @@ -0,0 +1,416 @@ +module itm-rpc { + namespace "urn:opendaylight:genius:itm:rpcs"; + prefix "itmrpcs"; + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + + import ietf-yang-types { + prefix yang; + } + + import ietf-interfaces { + prefix if; revision-date 2014-05-08; + } + + import odl-interface { + prefix odlif; + revision-date "2016-04-06"; + } + + import opendaylight-action-types {prefix action;revision-date "2013-11-12";} + import opendaylight-flow-types {prefix offlow;revision-date "2013-10-26";} + + + revision "2016-04-06" { + description "ODL Specific Itm Manager Rpcs Module"; + } + + /* RPCs */ + + rpc get-tunnel-interface-name { + description "used to retrieve tunnel interface id between Dpns"; + input { + leaf source-dpid { + type uint64; + } + leaf destination-dpid { + type uint64; + } + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + } + } + output { + leaf interface-name { + type string; + } + } + } + + rpc get-internal-or-external-interface-name { + description "used to retrieve tunnel interface id with src Dpn and destination ip/dpn"; + input { + leaf source-dpid { + type uint64; + } + leaf destination-ip { + type inet:ip-address; + } + leaf destination-dpid { + type uint64; + description "Optional. if destination-dpid is abesnt," + + "the destination-ip will be used to get the tunnel name"; + } + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + } + } + output { + leaf interface-name { + type string; + } + } + } + + rpc get-external-tunnel-interface-name { + description "used to retrieve external tunnel interface id between Dpns/TORs"; + input { + leaf source-node { + type string; + } + leaf destination-node { + type string; + } + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + } + } + + output { + leaf interface-name { + type string; + } + } + } + + rpc build-external-tunnel-from-dpns { + description "used for building tunnels between a Dpn and external node"; + input { + leaf-list dpn-id { + type uint64; + } + leaf destination-ip { + type inet:ip-address; + } + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + } + } + } + + rpc add-external-tunnel-endpoint { + description "used for building tunnels between teps on all Dpns and external node"; + input { + leaf destination-ip { + type inet:ip-address; + } + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + } + } + } + + rpc remove-external-tunnel-from-dpns { + description "used for building tunnels between a Dpn and external node"; + input { + leaf-list dpn-id { + type uint64; + } + leaf destination-ip { + type inet:ip-address; + } + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + } + } + } + + rpc remove-external-tunnel-endpoint { + description "used for building tunnels between teps on all Dpns and external node"; + input { + leaf destination-ip { + type inet:ip-address; + } + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + } + } + } + + rpc create-terminating-service-actions { + description "used for programming the terminating service actions"; + input { + leaf dpn-id { + type uint64; + } + leaf service-id { + type uint16; + } + uses offlow:instruction-list; + } + } + + rpc remove-terminating-service-actions { + description "used for removing the terminating service actions"; + input { + leaf dpn-id { + type uint64; + } + leaf service-id { + type uint16; + } + } + } + + rpc add-l2-gw-device { + description "used for building tunnels between teps on all Dpns and hwVtep"; + input { + leaf topology-id { + type string; + } + leaf node-id { + type string; + } + leaf ip-address { + type inet:ip-address; + } + } + } + + rpc add-l2-gw-mlag-device { + description "used for building tunnels between teps on all Dpns and hwVtep"; + input { + leaf topology-id { + type string; + } + leaf-list node-id { + type string; + } + leaf ip-address { + type inet:ip-address; + } + } + } + + rpc delete-l2-gw-device { + description "used for deleting tunnels between teps on all Dpns and hwVtep"; + input { + leaf topology-id { + type string; + } + leaf node-id { + type string; + } + leaf ip-address { + type inet:ip-address; + } + } + } + + rpc delete-l2-gw-mlag-device { + description "used for deleting tunnels between teps on all Dpns and hwVtep"; + input { + leaf topology-id { + type string; + } + leaf-list node-id { + type string; + } + leaf ip-address { + type inet:ip-address; + } + } + } + + rpc is-tunnel-internal-or-external { + description "Used for determining whether tunnel is an internal or an external tunnel"; + input { + leaf tunnel-interface-name { + type string; + } + } + output { + leaf tunnel-type { + type uint32; + } + } + } + + rpc is-dcgw-present { + description "Used for determining whether tunnel is an internal or an external tunnel"; + input { + leaf dcgw-ip { + type string; + } + } + output { + leaf retVal { + type uint32; + } + } + } + + rpc get-dpn-endpoint-ips { + description "used to retrieve tunnel end point IPs of a Dpn"; + input { + leaf source-dpid { + type uint64; + } + } + output { + leaf-list nexthopip-list { + type inet:ip-address; + } + } + } + + rpc get-egress-actions-for-tunnel { + description "used to retrieve group actions to use from interface name"; + input { + leaf intf-name { + type string; + mandatory true; + } + + leaf tunnel-key { + description "It can be VNI for VxLAN tunnel ifaces, Gre Key for GRE tunnels, etc."; + type uint32; + mandatory false; + } + + leaf action-key { + description "By default action keys are incremented from zero, for custom initial value set action-key"; + type int32; + mandatory false; + } + } + output { + uses action:action-list; + } + } + + rpc get-tunnel-type { + description "to get the type of the tunnel interface(vxlan, vxlan-gpe, gre, etc.)"; + input { + leaf intf-name { + type string; + mandatory true; + } + } + output { + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + } + } + } + + rpc set-bfd-param-on-tunnel { + description "used for turning ON/OFF to monitor individual tunnels"; + input { + leaf source-node { + type string; + mandatory true; + } + leaf destination-node { + type string; + mandatory true; + } + leaf monitoring-enabled { + type boolean; + mandatory true; + } + leaf monitoring-interval { + type uint16 { + range "1000..30000"; + } + } + } + } + + + rpc get-dpn-info { + description "Gets the dpn id and tep ip information of compute nodes"; + input { + leaf-list compute-names { + type string; + } + } + output { + list computes { + key "compute-name"; + leaf compute-name { + type string; + } + leaf zone-name { + type string; + } + leaf prefix { + type inet:ip-prefix; + } + leaf dpn-id { + type uint64; + } + leaf-list tep-ip { + type inet:ip-address; + } + leaf port-name { + type string; + } + leaf node-id { + type string; + } + } + } + } + + rpc get-watch-port-for-tunnel { + description "retrieve the watch port for the BFD enabled point to point tunnel"; + input { + leaf source-node { + type string; + } + + leaf destination-node { + type string; + } + + } + output { + leaf port-no { + type uint32; + } + leaf portname { + type string; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/itm-state.yang b/experimental/odp/itm-state.yang new file mode 100644 index 000000000..4ed3bbd24 --- /dev/null +++ b/experimental/odp/itm-state.yang @@ -0,0 +1,318 @@ +module itm-state { + + namespace "urn:opendaylight:genius:itm:op"; + + prefix itm-state; + + import ietf-interfaces { + prefix if; + } + + import ietf-yang-types { + prefix yang; + } + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + import odl-interface { + prefix odlif; revision-date "2016-04-06"; + } + + + description "This YANG module defines operation part of the model."; + + revision "2016-04-06"; + + /* Operational state */ + + identity tep-type-base { + description "Base TEP device type"; + } + + identity tep-type-internal { + base tep-type-base; + description "TEP type internal e.g. Compute OVS"; + } + + identity tep-type-external { + base tep-type-base; + description "TEP type external e.g. DC Gateway"; + } + + identity tep-type-hwvtep { + base tep-type-base; + description "TEP type Hwvtep e.g. TOR devices"; + } + + typedef tep-type { + type identityref { + base tep-type-base; + } + description "This type is used to refer to an TEP Device Type."; + } + + grouping tep-info-attributes { + leaf tep-device-type { + type identityref { + base tep-type-base; + } + } + leaf tep-device-id { + type string; //dpnid or node-id + } + leaf tep-ip { + type inet:ip-address; //dpnid or node-id + } + } + + typedef tunnel-oper-status { + type enumeration { + enum up; + enum down; + enum unknown; + enum ignore; + } + } + + container dpn-endpoints { + list DPN-TEPs-info { + key "DPN-ID"; + + leaf DPN-ID { + type uint64; + } + leaf up { + type boolean; + config false; + } + + /* Minimum 1 port. We may for now support only two ports */ + list tunnel-end-points { + ordered-by user; + key "portname VLAN-ID ip-address tunnel-type"; /* Multiple tunnels on the same physical port but on different VLAN can be supported */ + + leaf portname { + type string; + } + leaf VLAN-ID { + type uint16; + } + leaf ip-address { + type inet:ip-address; + } + leaf subnet-mask { + type inet:ip-prefix; + } + leaf gw-ip-address { + type inet:ip-address; + } + list tz-membership { + key "zone-name"; + leaf zone-name { + type string; + } + } + leaf interface-name { + type string; + } + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + } + leaf option-of-tunnel { + description "Use flow based tunnels for remote-ip"; + type boolean; + default false; + } + leaf option-tunnel-tos { + description "Value of ToS bits to be set on the encapsulating + packet. The value of 'inherit' will copy the DSCP value + from inner IPv4 or IPv6 packets. When ToS is given as + a numberic value, the least significant two bits will + be ignored."; + type string { + length "1..8"; + } + } + } + } + } + + + container tunnel-list { + list internal-tunnel { + + key "source-DPN destination-DPN transport-type"; + + leaf source-DPN { + type uint64; + } + + leaf destination-DPN { + type uint64; + } + + leaf transport-type { + type identityref { + base odlif:tunnel-type-base; + } + } + + /* logical-group interface id */ + + leaf-list tunnel-interface-names { + type string; + } + } + } + + container external-tunnel-list { + list external-tunnel { + key "source-device destination-device transport-type"; + + leaf source-device { + type string; //dpnid or node-id + } + + leaf destination-device { + type string; //dpn-id or node-id or ip + } + + leaf transport-type { + type identityref { + base odlif:tunnel-type-base; + } + } + + /* logical-group interface id */ + + leaf tunnel-interface-name { + type string; + } + + } + } + + container tunnels_state { + config false; + list state-tunnel-list { + key "tunnel-interface-name"; + + leaf tunnel-interface-name { + type string; + } + + leaf tunnel-state { + type boolean; + config false; + status deprecated; + } + + leaf oper-state { type tunnel-oper-status; } + + container src-info { + uses tep-info-attributes; + } + + container dst-info { + uses tep-info-attributes; + } + + leaf transport-type { + type identityref { + base odlif:tunnel-type-base; + } + } + + leaf port-number { + type string; + } + + leaf if-index { + type uint16; + } + } + } + + container dpn-teps-state { + list dpns-teps { + key "source-dpn-id"; + leaf source-dpn-id { + type uint64; + mandatory true; + } + + leaf ip-address { + type inet:ip-address; + } + + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + mandatory true; + } + + /* Remote DPNs to which this DPN-Tep has a tunnel */ + list remote-dpns { + key "destination-dpn-id"; + leaf destination-dpn-id { + type uint64; + mandatory true; + } + + leaf option-of-tunnel { + description "Use flow based tunnels for remote-ip"; + type boolean; + default false; + } + + leaf tunnel-name { + type string; + mandatory true; + } + + /* This will later be changed to monitor profile id */ + /* The monitor profile will contain monitoring related params */ + leaf monitoring-enabled { + type boolean; + mandatory true; + } + + leaf monitoring-interval { + type uint16 { + range "1000..30000"; + } + mandatory true; + } + + leaf internal { + type boolean; + mandatory true; + description "represents whether this is an internal or external tunnel."; + } + } + } + } + + container monitoring-ref-count { + config false; + description "The container for maintaing the reference count for monitoring requests + between a src and dst DPN pair."; + list monitored-tunnels { + key "source-dpn destination-dpn"; + leaf source-dpn { + type uint64; + } + leaf destination-dpn { + type uint64; + } + leaf reference-count { + type uint16; + } + } + } +} diff --git a/experimental/odp/itm.yang b/experimental/odp/itm.yang new file mode 100644 index 000000000..633f36989 --- /dev/null +++ b/experimental/odp/itm.yang @@ -0,0 +1,152 @@ +module itm { + namespace "urn:opendaylight:genius:itm"; + + prefix "itm"; + + import ietf-interfaces { + prefix if; + } + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + + import odl-interface { + prefix odlif; + } + + + revision "2016-04-06" { + description "ODL Internal Transport Module"; + } + + /* Configuration data */ + + container transport-zones { + list transport-zone { + ordered-by user; + key zone-name; + leaf zone-name { + type string; + mandatory true; + } + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + mandatory true; + } + + list subnets { + key "prefix"; + leaf prefix { + type inet:ip-prefix; + } + leaf gateway-ip { + type inet:ip-address; + } + leaf vlan-id { + type uint16 { + range "0..4094"; + } + } + list vteps { + key "dpn-id portname"; + leaf dpn-id { + type uint64; + } + leaf portname { + type string; + } + leaf ip-address { + type inet:ip-address; + } + leaf option-of-tunnel { + description "Use flow based tunnels for remote-ip"; + type boolean; + default false; + } + leaf weight { + type uint16; + default 1; + description "Bucket weight if tunnel belongs to OF select group"; + } + leaf option-tunnel-tos { + description "Value of ToS bits to be set on the encapsulating + packet. The value of 'inherit' will copy the DSCP value + from inner IPv4 or IPv6 packets. When ToS is given as + a numberic value, the least significant two bits will + be ignored."; + type string { + length "1..8"; + } + } + } + list device-vteps { + key "node-id ip-address"; + + leaf topology-id { + type string; + } + leaf node-id { + type string; + } + leaf ip-address { + type inet:ip-address; + } + } + } + } + } + + container not-hosted-transport-zones { + config false; + list tepsInNotHostedTransportZone { + key zone-name; + leaf zone-name { + type string; + } + list unknown-vteps{ + key "dpn-id"; + leaf dpn-id { + type uint64; + } + leaf ip-address { + type inet:ip-address; + } + leaf of-tunnel { + description "Use flow based tunnels for remote-ip"; + type boolean; + default false; + } + leaf option-tunnel-tos { + description "Value of ToS bits to be set on the encapsulating + packet. The value of 'inherit' will copy the DSCP value + from inner IPv4 or IPv6 packets. When ToS is given as + a numberic value, the least significant two bits will + be ignored."; + type string { + length "1..8"; + } + } + } + } + } + + container dc-gateway-ip-list{ + list dc-gateway-ip{ + key "ip-address"; + leaf ip-address{ + type inet:ip-address; + } + leaf tunnnel-type{ + type identityref { + base odlif:tunnel-type-base; + } + } + } + } +} diff --git a/experimental/odp/k8s-cluster.yang b/experimental/odp/k8s-cluster.yang new file mode 100644 index 000000000..236c76fd1 --- /dev/null +++ b/experimental/odp/k8s-cluster.yang @@ -0,0 +1,33 @@ +module k8s-cluster { + namespace "urn:opendaylight:coe:northbound:k8s-cluster"; + prefix "coe"; + + revision 2018-11-27 { + description "Initial revision"; + } + + import ietf-yang-types { + prefix yang; + revision-date "2013-07-15"; + } + + organization "OpenDaylight COE Group"; + + contact "COE Developers "; + + container k8s-clusters-info { + description + "Kubernetes Cluster information"; + + list k8s-clusters { + description "List of Kubernetes cluster."; + + key "cluster-id"; + + leaf cluster-id { + type yang:uuid; + description "UUID representing the K8s cluster."; + } + } + } +} diff --git a/experimental/odp/k8s-node.yang b/experimental/odp/k8s-node.yang new file mode 100644 index 000000000..c5437cdc8 --- /dev/null +++ b/experimental/odp/k8s-node.yang @@ -0,0 +1,63 @@ +module k8s-node { + namespace "urn:opendaylight:coe:northbound:k8s-node"; + prefix "coe"; + + revision 2017-08-29 { + description "Initial revision"; + } + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + + import ietf-yang-types { + prefix yang; + revision-date "2013-07-15"; + } + + organization "OpenDaylight COE Group"; + + contact "COE Developers "; + + container k8s-nodes-info { + description + "Kubernetes Nodes information"; + + leaf id { + description "Kubernetes node's data tree ID"; + type string; + } + list k8s-nodes { + description "List of Kubernetes nodes."; + + key "uid"; + leaf uid { + type yang:uuid; + description "UUID representing the K8s node."; + } + leaf cluster-id { + type yang:uuid; + description "UUID representing the K8s cluster."; + } + leaf host-name { + type string; + description "The hostname as reported by the node’s kernel."; + } + leaf external-ip-address { + type inet:ip-address; + description "The IP address of the node that is externally routable."; + } + leaf internal-ip-address { + type inet:ip-address; + description "The IP address of the node that is routable only within the k8s cluster. + We assume that this IP address is reachable by OpenDaylight and it will be used to + set the default configurations."; + } + leaf pod-cidr { + type string; + description "PodCIDR represents the pod IP range assigned to the node."; + } + } + } +} diff --git a/experimental/odp/k8s.yang b/experimental/odp/k8s.yang new file mode 100644 index 000000000..c95fd6004 --- /dev/null +++ b/experimental/odp/k8s.yang @@ -0,0 +1,22 @@ +module k8s { + yang-version 1; + namespace "urn:opendaylight:k8s"; + prefix "k8s"; + + description + "This YANG module defines a top level for the kubernetes models in opendaylight."; + + revision "2018-12-05" { + description "Initial revision."; + } + + import network-policy { prefix network-policy; revision-date "2018-12-05"; } + + organization "OpenDaylight COE Group"; + + contact "COE Developers "; + + container k8s { + uses network-policy:network-policy; + } +} \ No newline at end of file diff --git a/experimental/odp/l3-unicast-igp-topology@2013-10-21.yang b/experimental/odp/l3-unicast-igp-topology@2013-10-21.yang new file mode 100644 index 000000000..73ae1cec8 --- /dev/null +++ b/experimental/odp/l3-unicast-igp-topology@2013-10-21.yang @@ -0,0 +1,233 @@ +module l3-unicast-igp-topology { + yang-version 1; + namespace "urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology"; + // replace with IANA namespace when assigned + prefix "l3t"; + import network-topology { + prefix "nt"; + revision-date 2013-10-21; + } + + import ietf-inet-types { + prefix "inet"; + revision-date 2013-07-15; + } + + organization "TBD"; + contact "TBD"; + + revision "2013-10-21" { + description "Initial revision"; + reference "TBD"; + } + + typedef igp-event-type { + description "IGP Event type for notifications"; + type enumeration { + enum "add" { + value 0; + description "An IGP node or link or prefix or termination-point has been added"; + } + enum "remove" { + value 1; + description "An IGP node or link or prefix or termination-point has been removed"; + } + enum "update" { + value 2; + description "An IGP node or link or prefix or termination-point has been updated"; + } + } + } // igp-event-type + + identity flag-identity { + description "Base type for flags"; + } + identity undefined-flag { + base "flag-identity"; + } + + typedef flag-type { + + type identityref { + base "flag-identity"; + } + } + + grouping igp-prefix-attributes { + leaf prefix { + type inet:ip-prefix; + } + leaf metric { + type uint32; + } + leaf-list flag { + type flag-type; + } + } + + grouping l3-unicast-igp-topology-type { + container l3-unicast-igp-topology { + presence "indicates L3 Unicast IGP Topology"; + } + } + + grouping igp-topology-attributes { + container igp-topology-attributes { + leaf name { + description "Name of the topology"; + type string; + } + leaf-list flag { + description "Topology flags"; + type flag-type; + } + } + } + + grouping igp-node-attributes { + container igp-node-attributes { + leaf name { + description "Node name"; + type inet:domain-name; + } + leaf-list flag { + description "Node operational flags"; + type flag-type; + } + leaf-list router-id { + description "Router-id for the node"; + + type inet:ip-address; + } + list prefix { + key "prefix"; + uses igp-prefix-attributes; + } + } + } + + grouping igp-link-attributes { + container igp-link-attributes { + leaf name { + description "Link Name"; + type string; + } + leaf-list flag { + description "Link flags"; + type flag-type; + } + leaf metric { + description "Link Metric"; + type uint32 { + range "0..16777215" { + description " + "; + // OSPF/ISIS supports max 3 byte metric. + // Ideally we would like this restriction to be + // defined in the derived models, however, + // we are not allowed to augment a "must" statement. + } + } + } + } + } // grouping igp-link-attributes + + grouping igp-termination-point-attributes { + container igp-termination-point-attributes { + choice termination-point-type { + case ip { + leaf-list ip-address { + description "IPv4 or IPv6 address"; + type inet:ip-address; + } + } + case unnumbered { + leaf unnumbered-id { + description "Unnumbered interface identifier"; + type uint32; + + } + } + } + } + } // grouping igp-termination-point-attributes + + + augment "/nt:network-topology/nt:topology/nt:topology-types" { + uses l3-unicast-igp-topology-type; + } + + augment "/nt:network-topology/nt:topology" { + when "nt:topology-types/l3-unicast-igp-topology"; + uses igp-topology-attributes; + } + + augment "/nt:network-topology/nt:topology/nt:node" { + when "../nt:topology-types/l3-unicast-igp-topology"; + uses igp-node-attributes; + } + augment "/nt:network-topology/nt:topology/nt:link" { + when "../nt:topology-types/l3-unicast-igp-topology"; + uses igp-link-attributes; + } + augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point" { + when "../../nt:topology-types/l3-unicast-igp-topology"; + uses igp-termination-point-attributes; + } + + notification igp-node-event { + leaf igp-event-type { + type igp-event-type; + } + leaf topology-ref { + type nt:topology-ref; + } + uses l3-unicast-igp-topology-type; + uses nt:node-attributes; + uses igp-node-attributes; + } + + notification igp-link-event { + leaf igp-event-type { + type igp-event-type; + } + leaf topology-ref { + type nt:topology-ref; + } + + uses l3-unicast-igp-topology-type; + uses nt:link-attributes; + uses igp-link-attributes; + } + + notification igp-prefix-event { + leaf igp-event-type { + type igp-event-type; + } + leaf topology-ref { + type nt:topology-ref; + } + leaf node-ref { + type nt:node-ref; + } + uses l3-unicast-igp-topology-type; + container prefix { + uses igp-prefix-attributes; + } + } + + notification termination-point-event { + leaf igp-event-type { + type igp-event-type; + } + leaf topology-ref { + type nt:topology-ref; + } + leaf node-ref { + type nt:node-ref; + } + uses l3-unicast-igp-topology-type; + uses nt:tp-attributes; + uses igp-termination-point-attributes; + } +} diff --git a/experimental/odp/l3nexthop.yang b/experimental/odp/l3nexthop.yang new file mode 100644 index 000000000..d4ebf631b --- /dev/null +++ b/experimental/odp/l3nexthop.yang @@ -0,0 +1,35 @@ +module l3nexthop { + namespace "urn:opendaylight:netvirt:l3nexthop"; + prefix l3nexthop; + + revision "2015-04-09" { + description "L3 NextHop module"; + } + + container l3nexthop { + config false; + list vpnNexthops{ + key "vpnId"; + leaf vpnId {type uint32;} + list vpnNexthop{ + key "IpAddress"; + leaf IpAddress {type string;} + leaf egressPointer {type uint32;} + leaf dpnId {type uint64;} + list ip-adjacencies { + key "ip-adjacency"; + leaf ip-adjacency {type string;} + } + } + } + list tunnelNexthops{ + key "dpnId"; + leaf dpnId {type uint64;} + list tunnelNexthop{ + key "IpAddress"; + leaf IpAddress {type string;} + leaf egressPointer {type uint32;} + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/l3vpn.yang b/experimental/odp/l3vpn.yang new file mode 100644 index 000000000..1ca4c7d94 --- /dev/null +++ b/experimental/odp/l3vpn.yang @@ -0,0 +1,944 @@ +module l3vpn { + namespace "urn:huawei:params:xml:ns:yang:l3vpn"; +// replace with IANA namespace when assigned + prefix "l3vpn"; + + import bgp { + prefix bgp; + //draft-zhdankin-netmod-bgp-cfg + } + import ietf-interfaces { + prefix if; + //rfc7223-YANG Interface Management + } + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + //RFC6991 + } + + import ietf-yang-types { + prefix yang; + //RFC6991 + } + + import neutronvpn { + prefix nvpn; + revision-date "2015-06-02"; + } + + description + "This YANG module defines the generic configuration data for L3VPN service. + + Terms and Acronyms + + BGP (bgp): Border Gateway Protocol + IPv4 (ipv4):Internet Protocol Version 4 + IPv6 (ipv6): Internet Protocol Version 6 + + "; + + revision 2014-08-15 { + description + "Initial revision."; + reference "RFC4271, RFC4364, RFC4760"; + } + + grouping augment-bgp-af-vpn-config { + description + "A set of configuration parameters that is applicable to both BGP-VPNv4 + and BGP-VPNv6 address family."; + + leaf apply-label-per-nexthop { + description + "The apply-label per-nexthop command enables the ASBR to allocate + labels for IPv4 VPN routes or IPv6 VPN routes based on the next hop."; + + + + config "true"; + type boolean; + default "false"; + } + + leaf upeEnable { + description + "Specify peer as UPE."; + + config "true"; + type boolean; + default "false"; + } + + } + + + grouping bgp-af-vpn-instance-config { + + container router-id { + description + "The router-id command configures router ID for BGP VPN instance IPv4 + or IPv6 address family. + By default, no router ID is configured for BGP VPN instance IPv4 or + IPv6 address family, and the BGP router ID is used as the router ID."; + + leaf enable { + type boolean; + } + + choice config-type { + case static { + leaf ip-address { + description + "Specifies the router ID of a BGP VPN instance IPv4 address + family. The router ID is expressed in the IPv4 address format. + "; + + config "true"; + type inet:ip-address; + } + } + case auto-select { + leaf enable-auto-select { + description + "Configures automatic route ID selection for the current BGP VPN + instance address family."; + + + config "true"; + type boolean; + } + } + } + } + + leaf auto-frr { + description + "The auto-frr command enables BGP Auto FRR."; + + config "true"; + type boolean; + default "false"; + } + + container bgpPeers { + list bgpPeer { + key "peerAddr"; + max-elements "unbounded"; + min-elements "0"; + description + "BGP Peer configure class"; + + leaf peerAddr { + description + "The nerighbor address"; + config "true"; + type inet:ip-address; + mandatory true; + } + + leaf groupName { + description "peerGroupName"; + config "true"; + type string { + length "1..47"; + } + } + leaf remoteAs { + description "Specifies the AS number of the peer."; + config "true"; + type string { + length "1..11"; + } + } + + leaf description { + + description + "specifies the description. The description is a string of letters + or figures. The value ranges from 1 to 80 characters without + spaces."; + config "true"; + type string { + length "1..80"; + pattern "([^?]*)"; + } + } + + leaf soo { + description + "The peer soo command configures the Site of Origin (SoO) + attribute for an EBGP peer in a BGP VPN instance. Format is ASN:nn + or IP-address:nn."; + + config "true"; + type string { + length "3..21"; + } + } + + leaf substituteAsEnable { + description + "Using the peer substitute-as command, you can substitute the AS + number of the specified peer in the as-path with the local AS + number."; + + config "true"; + type boolean; + default "false"; + } + + } + } + + } + + grouping vpn-af-config { + description + "A set of configuration parameters that is applicable to both IPv4 and + IPv6 address family for a VPN instance ."; + + leaf-list route-distinguisher { + description + "The route-distinguisher command configures a route distinguisher (RD) + for the IPv4 or IPv6 address family of a VPN instance. + + Format is ASN:nn or IP-address:nn."; + + config "true"; + type string { + length "3..21"; + } + } + + container vpnTargets { + description + "The vpn-target command configures the export or import VPN target + extended community attribute for the VPN instance IPv4/IPv6 address + family. + Format is ASN:nn or IP-address:nn."; + + list vpnTarget { + key "vrfRTValue"; + max-elements "unbounded"; + min-elements "0"; + description + "L3vpn vpntarget configure class"; + + leaf vrfRTValue { + + description + "Vpn-target: adds VPN target extended community attribute to the + export or import VPN target extended community list. The + vpn-target can be expressed in either of the following formats: + (1)16-bit AS number:32-bit user-defined number + For example, 1:3. The AS number ranges from 0 to 65535. The + user-defined number ranges from 0 to 4294967295. The AS number + and the user-defined number cannot be 0s at the same time. + That is, a VPN target cannot be 0:0. + (2)32-bit IP address:16-bit user-defined number + For example, 192.168.122.15:1. The IP address ranges from + 0.0.0.0 to 255.255.255.255. The user-defined number ranges from + 0 to 65535. + (3)32-bit IP address:16-bit user-defined number + For example, 192.168.122.15:1. An IP address ranges from + 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 + to 65535."; + + config "true"; + mandatory "true"; + type string { + length "3..21"; + } + } + + leaf vrfRTType { + description + "Specifies the vpn target type, export-extcommunity: + specifies the extended community attributes carried in routing + information to be sent. import-extcommunity: receives routing + information carrying specified extended community attributes."; + + mandatory "true"; + type enumeration { + enum export_extcommunity { + value "0"; + description "export-extcommunity:"; + } + enum import_extcommunity { + value "1"; + description "import-extcommunity:"; + } + enum both { + value "2"; + description "export-extcommunity & import-extcommunity:"; + } + } + } + } + } + + container apply-label { + description + "Apply one label mode for the VPN instance route."; + + choice apply-label-mode { + case per-route { + description + "The apply-label per-route command enables the one-label-per-route + mode. The VPN instance IPv4/IPv6 address family assigns a unique + label to each route to be sent to the peer PE."; + + leaf apply-label-per-route { + type boolean; + default "true"; + } + } + case per-instance { + description + "The apply-label per-instance command applies one label to all VPN + instance IPv4 address family or IPv6 address family routes to a + peer PE."; + + leaf apply-label-per-instance { + type boolean; + default "false"; + } + } + } + }//End of "container apply-label" + + leaf import-route-policy { + description + "The import route-policy command associates a VPN instance enabled + with the IPv4 or IPv6 address family with an import routing policy. + Only one import routing policy can be associated with a VPN instance + enabled with the IPv4 or IPv6 address family. If the import + route-policy command is run more than once, the latest configuration + overrides the previous ones."; + + config "true"; + type string { + length "1..40"; + } + } + + leaf export-route-policy { + description + "The export route-policy command associates a VPN instance enabled + with the IPv4 or IPv6 address family with an export routing policy. + Only one export routing policy can be associated with a VPN instance + enabled with the IPv4 or IPv6 address family. If the export + route-policy command is run more than once, the latest configuration + overrides the previous ones."; + + config "true"; + type string { + length "1..40"; + } + } + + + container prefix-limit { + description + "The prefix limit command sets a limit on the maximum number of + prefixes supported in the existing VPN instance, preventing the + PE from importing excessive VPN route prefixes."; + + leaf prefix-limit-number { + description + "Specifies the maximum number of prefixes supported in the VPN + + + instance IPv4 or IPv6 address family."; + + type uint32 { + range "1..4294967295"; + } + } + + choice prefix-limit-action { + case enable-alert-percent { + leaf alert-percent-value { + description + "Specifies the proportion of the alarm threshold to the maximum + number of prefixes."; + type uint8 { + range "1..100"; + } + } + leaf route-unchanged { + description + "Indicates that the routing table remains unchanged. By default, + route-unchanged is not configured. When the number of prefixes + in the routing table is greater than the value of the parameter + number, routes are processed as follows: + (1)If route-unchanged is configured, routes in the routing table + remain unchanged. + (2)If route-unchanged is not configured, all routes in the + routing table are deleted and then re-added."; + + config "true"; + type boolean; + default "false"; + } + } + case enable-simple-alert { + leaf simple-alert { + description + "Indicates that when the number of VPN route prefixes exceeds + number, prefixes can still join the VPN routing table and + alarms are displayed."; + + config "true"; + type boolean; + default "false"; + } + } + } + } + + + + container routing-table-limit { + description + "The routing-table limit command sets a limit on the maximum number of + routes that the IPv4 or IPv6 address family of a VPN instance can + support. + By default, there is no limit on the maximum number of routes that the + IPv4 or IPv6 address family of a VPN instance can support, but the + total number of private network and public network routes on a device + cannot exceed the allowed maximum number of unicast routes."; + + leaf routing-table-limit-number { + description + "Specifies the maximum number of routes supported by a VPN instance. + "; + + config "true"; + type uint32 { + range "1..4294967295"; + } + } + choice routing-table-limit-action { + case enable-alert-percent { + leaf alert-percent-value { + description + "Specifies the percentage of the maximum number of routes. When + the maximum number of routes that join the VPN instance is up + to the value (number*alert-percent)/100, the system prompts + alarms. The VPN routes can be still added to the routing table, + but after the number of routes reaches number, the subsequent + routes are dropped."; + + config "true"; + type uint8 { + range "1..100"; + } + } + } + case enable-simple-alert { + leaf simple-alert { + description + "Indicates that when VPN routes exceed number, routes can still + be added into the routing table, but the system prompts alarms. + However, after the total number of VPN routes and network public + routes reaches the unicast route limit specified in the License, + the subsequent VPN routes are dropped."; + + config "true"; + type boolean; + + } + } + } + } + + leaf vpn-frr { + description + "Enable VPN FRR in the VPN instance address family view. + If a PE is connected to two other PEs, running the vpn frr command in + the VPN instance address family view of the PE enables VPN FRR and + improves network reliability. After VPN FRR is configured, traffic can + switch to the secondary LSP immediately after the primary LSP becomes + faulty."; + + type boolean; + default "false"; + } + + + /* + * VPN QoS. + */ + container l3vpnVrfPipe { + description + "The diffserv-mode command configures the mode of the MPLS + differentiated service (Diff-Serv) for ensuring end-to-end QoS."; + + leaf pipeMode { + description + "Pipe mode"; + + type enumeration { + enum pipe { + value "0"; + description + "pipe: Indicates that the Pipe MPLS Diff-Serv mode is adopted."; + } + enum shortPipe { + value "1"; + description + "shortPipe: Indicates that the Short-pipe MPLS Diff-Serv mode + is adopted."; + } + enum uniform { + value "2"; + description + "uniform: Indicates that the Uniform MPLS Diff-Serv mode is + adopted."; + } + } + default "uniform"; + + } + + leaf serviceClass { + description + "Service Class, Specifies the service type when the packet enters the + public network from the private network. The values are cs7, cs6, ef, + af4, af3, af2, af1, be."; + + type enumeration { + enum be { + value "0"; + description "be:"; + } + enum af1 { + value "1"; + description "af1:"; + } + enum af2 { + value "2"; + description "af2:"; + } + enum af3 { + value "3"; + description "af3:"; + } + enum af4 { + value "4"; + description "af4:"; + } + enum ef { + value "5"; + description "ef:"; + } + enum cs6 { + value "6"; + description "cs6:"; + } + enum cs7 { + value "7"; + description "cs7:"; + } + } + default "be"; + } + + + leaf color { + description + "Specifies a color for marking the discard priority of a packet + transferred from a private network to a public network. The values + are green, yellow, and red."; + + type enumeration { + enum green { + value "0"; + description "green:"; + } + enum yellow { + value "1"; + description "yellow:"; + } + enum red { + value "2"; + description "red:"; + } + } + default "green"; + } + + leaf dsName { + description + "Specifies the DS domain name of the specified Per-Hop Behavior (PHB) + applied to the egress in Short pipe mode. It is a string of 1 to 31 + characters."; + + type string; + default "default"; + } + } + + container l3vpnTtlMode { + description + "The ttl-mode command enables MPLS to process the TTL in a specified + mode. By default, MPLS processes the TTL in pipe mode."; + + leaf ttlMode { + description "TTL mode"; + default "pipe"; + type enumeration { + enum pipe { + value "0"; + description + "pipe: Enables MPLS to process the TTL in pipe mode."; + } + + + enum uniform { + value "1"; + description + "uniform: Enables MPLS to process the TTL in uniform mode."; + } + } + } + } + + leaf tunnel-policy { + description + "The tnl-policy command associates the IPv4 or IPv6 address family of + a VPN instance with a tunnel policy."; + + type string { + length "1..39"; + } + } + + container importRibs { + description + "Import route class"; + + leaf protocol { + description + "Specifies the protocol from which routes are imported. + At present, In the IPv4 unicast address family view, the protocol + can be IS-IS,static, direct and BGP."; + + type enumeration { + enum ALL { + value "0"; + description "ALL:"; + } + enum Direct { + value "1"; + description "Direct:"; + } + enum OSPF { + value "2"; + description "OSPF:"; + } + enum ISIS { + value "3"; + description "ISIS:"; + } + enum Static { + value "4"; + + + description "Static:"; + } + enum RIP { + value "5"; + description "RIP:"; + } + enum BGP { + value "6"; + description "BGP:"; + } + enum OSPFV3 { + value "7"; + description "OSPFV3:"; + } + enum RIPNG { + value "8"; + description "RIPNG:"; + } + enum INVALID { + value "9"; + description "INVALID:"; + } + } + } + + leaf processId { + description + "Specifies the process ID if the protocol from routes are imported is + IS-IS."; + + default "0"; + type uint32 { + range "0..4294967295"; + } + } + + leaf bgp-valid-route { + type boolean; + } + + leaf policyName { + description + "Policy Id for import routes"; + type string { + } + } + + } + + + leaf traffic-statistics { + description + "The traffic-statistics enable command enables traffic statistics + for a VPN instance."; + + type boolean; + default "false"; + } + + } + + + /* + * VPN instance view. + */ + container vpn-instances { + description + "VPN instances configuration parameters. + VPN instances support both the IPv4 and IPv6 address families."; + + list vpn-instance { + max-elements "unbounded"; + min-elements "0"; + key "vpn-instance-name"; + description + "Specifies the name of the VPN instance. It is a string of 1 to 31 + case-sensitive characters."; + + leaf vpn-instance-name { + mandatory "true"; + type string; + description + "The name of the vpn-instance."; + } + leaf type { + description + "The type of the VPN Instance. + L3 indicates it is an L3VPN. + L2 indicates it is an EVPN"; + + type enumeration { + enum l3 { + value "0"; + description "L3VPN"; + } + enum l2 { + value "1"; + description "EVPN"; + } + } + default "l3"; + } + + leaf l3vni { + type uint32; + } + + + leaf description { + description + "A textual description of VPN instance, the VPN instance description + helps users memorize the VPN instance."; + + type string { + length "1..242"; + pattern "([^?]*)"; + } + } + + + + + container ipv4-family { + description + "The IPv4 address family is enabled for the VPN instance."; + + uses vpn-af-config; + } + + container ipv6-family { + description + "The IPv6 address family is enabled for the VPN instance."; + + uses vpn-af-config; + } + + + } + } + + + + /* + * Binding Interfaces to a VPN Instance. + */ + + container vpn-interfaces { + description + "VPN is enabled on interfaces."; + + list vpn-interface { + key "name"; + max-elements "unbounded"; + min-elements "0"; + leaf name { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + list vpn-instance-names { + key "vpn-name"; + leaf vpn-name { + type string { + length "1..40"; + } + } + leaf associated-subnet-type { + type enumeration { + enum V4Subnet { + value "0"; + description "V4 Router Internal VPN"; + } + enum V6Subnet { + value "1"; + description "V6 Router Internal VPN"; + } + enum V6InternetVPN { + value "2"; + description "BGPVPN Internet"; + } + enum V4AndV6Subnets { + value "3"; + description "BGPVPN dual stack or V6/V4 Router or undefined"; + } + } + } + } + leaf dpn-id { + type uint64; + } + leaf router-interface { + type boolean; + } + uses nvpn:network-attributes; + } + } + + container vrfInfo { + description + "Display the information of the vrf. + + + It is intended that this container may be augmented by vendors to + reflect the vendor-specific operational state parameters."; + + leaf vrfCreateTime { + description + "CreateTime of the vrf."; + config "false"; + type yang:timestamp; + } + + leaf vrfUpTime { + description + "UpTime period of the vrf."; + config "false"; + type yang:timeticks; + } + + leaf label { + description + "Label of the vrf."; + config "false"; + type uint32 { + range "16..1048574"; + } + } + + leaf vrfStatus { + description + "vrf status."; + config "false"; + type enumeration { + enum up { + value "0"; + description "vrf up."; + } + enum down { + value "1"; + description "vrf down."; + } + } + } + } + + + /* + * augment some bgp vpn functions in bgp module. + */ + augment "/bgp:bgp-router/bgp:vpnv4/bgp:unicast" { + + uses augment-bgp-af-vpn-config; + + } + + augment "/bgp:bgp-router/bgp:vpnv6/bgp:unicast" { + uses augment-bgp-af-vpn-config; + + } + + augment "/bgp:bgp-router" { + + container bgp-af-ipv4-vpn-instances { + description + "vpn-instances ipv4 address family."; + list bgp-af-ipv4-vpn-instance { + key "vpn-instance-name"; + max-elements "unbounded"; + min-elements "0"; + leaf vpn-instance-name { + type string; + } + uses bgp-af-vpn-instance-config; + } + } + + container bgp-af-ipv6-vpn-instances { + description + "vpn-instances ipv6 address family."; + list bgp-af-ipv6-vpn-instance { + key "vpn-instance-name"; + max-elements "unbounded"; + min-elements "0"; + leaf vpn-instance-name { + type string; + } + uses bgp-af-vpn-instance-config; + } + } + + } + + +} diff --git a/experimental/odp/lldp-speaker-config.yang b/experimental/odp/lldp-speaker-config.yang new file mode 100644 index 000000000..0cd30f2d4 --- /dev/null +++ b/experimental/odp/lldp-speaker-config.yang @@ -0,0 +1,22 @@ +module lldp-speaker-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:openflow:applications:lldp-speaker:config"; + prefix "lldp-speaker-config"; + + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} + + description + "Configuration for LLDP speaker application."; + + revision "2016-05-12" { + description + "Initial revision."; + } + + container lldp-speaker-config { + leaf address-destination { + type yang:mac-address; + mandatory true; + } + } +} diff --git a/experimental/odp/lldp-speaker.yang b/experimental/odp/lldp-speaker.yang new file mode 100644 index 000000000..f468b5b45 --- /dev/null +++ b/experimental/odp/lldp-speaker.yang @@ -0,0 +1,57 @@ +module lldp-speaker { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:openflow:applications:lldp-speaker"; + prefix "lldp-speaker"; + + description + "Application that send LLDPDU frames to all Openflow switch ports."; + + revision "2014-10-23" { + description + "Initial revision"; + } + + typedef oper-status { + type enumeration { + enum STANDBY { + description "go to stand by mode"; + } + enum RUN { + description "go to fully operational mode"; + } + } + } + + rpc change-operational-status { + input { + leaf operational-status { + type oper-status; + description "Change operational status of LLDP speaker."; + } + } + } + rpc get-operational-status { + output { + leaf operational-status { + type oper-status; + description "Change operational status of LLDP speaker."; + } + } + } + rpc set-lldp-flood-interval { + input { + leaf interval { + type int64; + description "Set LLDP_FLOOD_PERIOD"; + } + } + } + rpc get-lldp-flood-interval { + output { + leaf interval { + type int64; + description "Get LLDP_FLOOD_PERIOD"; + } + } + } +} diff --git a/experimental/odp/lock-manager.yang b/experimental/odp/lock-manager.yang new file mode 100644 index 000000000..00d6f3a45 --- /dev/null +++ b/experimental/odp/lock-manager.yang @@ -0,0 +1,71 @@ +module lock-manager { + namespace "urn:opendaylight:genius:lockmanager"; + prefix lockmgr; + + revision "2016-04-13" { + description "YANG model describes methods that ensure locking while accessing the datastore"; + } + + typedef time-units { + type enumeration { + enum days; + enum hours; + enum microseconds; + enum milliseconds; + enum minutes; + enum nanoseconds; + enum seconds; + } + } + + container locks { + description "Holds the list of lock name and lock owner"; + list lock { + key "lock-name"; + leaf lock-name { + type string; + mandatory true; + } + leaf lock-owner { + type string; + mandatory true; + } + } + } + + rpc lock { + description "Method that checks if its locked already. If not adds the lock to the list of locks. Else tries until it acquires the lock"; + input { + leaf lock-name { + type string; + mandatory true; + } + } + } + + rpc try-lock { + description "Method that checks if its locked already. If not adds the lock to the list of locks. Else tries for the specified time"; + input { + leaf lock-name { + type string; + mandatory true; + } + leaf time { + type uint32; + } + leaf time-unit { + type time-units; + } + } + } + + rpc unlock { + description "Method that removes the lock from the list of locks"; + input { + leaf lock-name { + type string; + mandatory true; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/mdsaltrace.yang b/experimental/odp/mdsaltrace.yang new file mode 100644 index 000000000..60e0d914a --- /dev/null +++ b/experimental/odp/mdsaltrace.yang @@ -0,0 +1,38 @@ +module mdsaltrace { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:mdsaltrace"; + prefix "mdsaltrace"; + + organization + "Red Hat, Inc."; + + description + "Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v1.0 which accompanies this distribution, + and is available at http://www.eclipse.org/legal/epl-v10.html"; + + revision "2016-09-08" { + description "Initial revision of mdsaltrace model"; + } + + container config { + leaf-list registration-watches { + type string; + } + leaf-list write-watches { + type string; + } + leaf transaction-debug-context-enabled { + default false; + type boolean; + description "Enable or disable transaction context debug. This will preserve the call site trace for + transactions, so that the original caller of un-close'd() transaction can be identified. + NB: This is a different property from the equally named one in etc/org.opendaylight.controller.cluster.datastore.cfg; + that one does something somewhat similar, but serves to include the stack trace on failed transaction submit, + whereas this one is specific to odl-mdsal-trace's trace:transaction leak troubleshooting command."; + // This ^^^ description is also copy/pasted in mdsaltrace_config.xml, and should be kept in line.] + } + } +} diff --git a/experimental/odp/mdsalutil.yang b/experimental/odp/mdsalutil.yang new file mode 100644 index 000000000..e367a3756 --- /dev/null +++ b/experimental/odp/mdsalutil.yang @@ -0,0 +1,24 @@ +/* +Copyright (c) 2017 Red Hat Inc. and others. All rights reserved. + +This program and the accompanying materials are made available under the +terms of the Eclipse Public License v1.0 which accompanies this distribution, +and is available at http://www.eclipse.org/legal/epl-v10.html +*/ + +module genius-mdsalutil { + yang-version 1.1; + namespace "urn:opendaylight:params:xml:ns:yang:mdsalutil"; + prefix "genius-mdsalutil"; + + revision "2017-08-30" { + description "genius mdsalutil models"; + } + + container config { + leaf upgradeInProgress { + type boolean; + default false; + } + } +} diff --git a/experimental/odp/meta-v1.yang b/experimental/odp/meta-v1.yang new file mode 100644 index 000000000..d8ab55dd7 --- /dev/null +++ b/experimental/odp/meta-v1.yang @@ -0,0 +1,27 @@ +module meta-v1 { + yang-version 1; + namespace "urn:opendaylight:k8s:meta-v1"; + prefix "meta-v1"; + + description + "This YANG module defines the kubernetes meta-v1 API."; + + revision "2018-12-05" { + description "Initial revision."; + } + + organization "OpenDaylight COE Group"; + + contact "COE Developers "; + + grouping label-selector { + list match-labels { + leaf key { + type string; + } + leaf value { + type string; + } + } + } +} diff --git a/experimental/odp/meter-management.yang b/experimental/odp/meter-management.yang deleted file mode 100644 index 6d86c5031..000000000 --- a/experimental/odp/meter-management.yang +++ /dev/null @@ -1,30 +0,0 @@ -module meter-management { - namespace "urn:opendaylight:meter:config"; - prefix meter-cfg; - - import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} - import opendaylight-meter-types {prefix meter;} - - revision "2013-10-24" { - description "Initial revision of meter service"; - } - - grouping meter-entry { - leaf node { - type inv:node-ref; - } - uses meter:meter; - } - - container meters { - list meter { - key "id node"; - - leaf id { - type uint32; - } - - uses meter-entry; - } - } -} diff --git a/experimental/odp/natservice-config.yang b/experimental/odp/natservice-config.yang new file mode 100644 index 000000000..b02247c7c --- /dev/null +++ b/experimental/odp/natservice-config.yang @@ -0,0 +1,30 @@ +module natservice-config { + yang-version 1; + namespace "urn:opendaylight:netvirt:natservice:config"; + prefix "natservice-config"; + + description + "Configuration for nat-serviceImpl."; + + revision "2017-02-06" { + description + "Initial revision."; + } + + container natservice-config { + config true; + leaf nat-mode { + type enumeration { + enum "controller"; + enum "conntrack"; + } + default "controller"; + } + leaf snat-punt-timeout { + description "hard timeout value for learnt flows for snat punts in seconds. + To turn off the rate limiting and installation of learnt flows, it should be set to 0,"; + type uint32; + default 5; + } + } +} diff --git a/experimental/odp/nc-notifications@2008-07-14.yang b/experimental/odp/nc-notifications@2008-07-14.yang new file mode 100644 index 000000000..1812d4e46 --- /dev/null +++ b/experimental/odp/nc-notifications@2008-07-14.yang @@ -0,0 +1,95 @@ +module nc-notifications { + + namespace "urn:ietf:params:xml:ns:netmod:notification"; + prefix "manageEvent"; + + import ietf-yang-types { prefix yang; revision-date "2013-07-15";} + import notifications { prefix ncEvent; revision-date "2008-07-14";} + + organization + "IETF NETCONF WG"; + + contact + "netconf@ietf.org"; + + description + "Conversion of the 'manageEvent' XSD in the NETCONF + Notifications RFC."; + + reference + "RFC 5277"; + + revision 2008-07-14 { + description "RFC 5277 version."; + } + + container netconf { + description "Top-level element in the notification namespace"; + + config false; + + container streams { + description + "The list of event streams supported by the system. When + a query is issued, the returned set of streams is + determined based on user privileges."; + + list stream { + description + "Stream name, description and other information."; + key name; + min-elements 1; + + leaf name { + description + "The name of the event stream. If this is the default + NETCONF stream, this must have the value 'NETCONF'."; + type ncEvent:streamNameType; + } + + leaf description { + description + "A description of the event stream, including such + information as the type of events that are sent over + this stream."; + type string; + mandatory true; + } + + leaf replaySupport { + description + "A description of the event stream, including such + information as the type of events that are sent over + this stream."; + type boolean; + mandatory true; + } + + leaf replayLogCreationTime { + description + "The timestamp of the creation of the log used to support + the replay function on this stream. Note that this might + be earlier then the earliest available notification in + the log. This object is updated if the log resets for + some reason. This object MUST be present if replay is + supported."; + type yang:date-and-time; // xsd:dateTime is wrong! + } + } + } + } + + notification replayComplete { + description + "This notification is sent to signal the end of a replay + portion of a subscription."; + } + + notification notificationComplete { + description + "This notification is sent to signal the end of a notification + subscription. It is sent in the case that stopTime was + specified during the creation of the subscription.."; + } + +} diff --git a/experimental/odp/ned.yang b/experimental/odp/ned.yang new file mode 100644 index 000000000..6f68f3339 --- /dev/null +++ b/experimental/odp/ned.yang @@ -0,0 +1,6777 @@ +module ned { + + prefix ios; + namespace + "urn:ios"; + + import tailf-common { + prefix tailf; + } + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + + import ietf-yang-types { + prefix yang; + } + + description + "This file was adapted to be parsed by yangtools for service function chaining/groupbasedpolicy + project purpose"; + + revision + 2016-03-08; + +/// ======================================================================== +/// typedefs +/// ======================================================================== + + typedef class-name-type { + type union { + type string { + // Note: leafref can't be used here due to part of union. + //path "/ios:native/class-map/name"; + tailf:info "WORD;;class-map name"; + } + type enumeration { + enum class-default { + tailf:info "System default class matching otherwise "+ + "unclassified packet"; + } + } + } + } + + typedef cos_value-type { + type union { + type uint8 { + tailf:info "<0-7>;;new cos value"; + range "0..7"; + } + type enumeration { + enum cos { + tailf:info "Set packet cos from cos"; + } + enum dscp { + tailf:info "Set packet cos from dscp"; + } + enum exp { + tailf:info "Set packet cos from exp"; + } + enum precedence { + tailf:info "Set packet cos from precedence"; + } + } + } + } + + typedef dscp-type { + type union { + type uint8 { + tailf:info "<0-63>;;Differentiated services codepoint value"; + range "0..63"; + } + type enumeration { + enum af11 { + tailf:info "Match packets with AF11 dscp (001010)"; + value 10; + } + enum af12 { + tailf:info "Match packets with AF12 dscp (001100)"; + value 12; + } + enum af13 { + tailf:info "Match packets with AF13 dscp (001110)"; + value 14; + } + enum af21 { + tailf:info "Match packets with AF21 dscp (010010)"; + value 18; + } + enum af22 { + tailf:info "Match packets with AF22 dscp (010100)"; + value 20; + } + enum af23 { + tailf:info "Match packets with AF23 dscp (010110)"; + value 22; + } + enum af31 { + tailf:info "Match packets with AF31 dscp (011010)"; + value 26; + } + enum af32 { + tailf:info "Match packets with AF32 dscp (011100)"; + value 28; + } + enum af33 { + tailf:info "Match packets with AF33 dscp (011110)"; + value 30; + } + enum af41 { + tailf:info "Match packets with AF41 dscp (100010)"; + value 34; + } + enum af42 { + tailf:info "Match packets with AF42 dscp (100100)"; + value 36; + } + enum af43 { + tailf:info "Match packets with AF43 dscp (100110)"; + value 38; + } + enum cs1 { + tailf:info "Match packets with CS1(precedence 1) dscp" + + " (001000)"; + value 8; + } + enum cs2 { + tailf:info "Match packets with CS2(precedence 2) dscp" + + " (010000)"; + value 16; + } + enum cs3 { + tailf:info "Match packets with CS3(precedence 3) dscp" + + " (011000)"; + value 24; + } + enum cs4 { + tailf:info "Match packets with CS4(precedence 4) dscp" + + " (100000)"; + value 32; + } + enum cs5 { + tailf:info "Match packets with CS5(precedence 5) dscp" + + " (101000)"; + value 40; + } + enum cs6 { + tailf:info "Match packets with CS6(precedence 6) dscp" + + " (110000)"; + value 48; + } + enum cs7 { + tailf:info "Match packets with CS7(precedence 7) dscp" + + " (111000)"; + value 56; + } + enum "default" { + tailf:code-name "dscp_default"; + tailf:info "Match packets with default dscp (000000)"; + value 0; + } + enum dscp { + tailf:info "Set packet dscp from dscp"; + } + enum ef { + tailf:info "Match packets with EF dscp (101110)"; + value 46; + } + enum precedence { + tailf:info "Set packet dscp from precedence"; + } + } + } + } + + typedef exp_value-type { + type union { + type uint8 { + tailf:info "<0-7>;;new exp"; + range "0..7"; + } + type enumeration { + enum cos { + tailf:info "Set packet exp from cos"; + } + enum dscp { + tailf:info "Set packet exp from dscp"; + } + enum exp { + tailf:info "Set packet exp from exp"; + } + enum precedence { + tailf:info "Set packet exp from precedence"; + } + } + } + } + + typedef percentage-type { + type uint8 { + tailf:info "<1-100>;;Percentage"; + range "1..100"; + } + } + + typedef police-bps-type { + type uint64 { + tailf:info "<8000-64000000000>;;Bits per second"; + range "8000..64000000000"; + } + } + + typedef police-burst-type { + type uint32 { + tailf:info "<1000-512000000>;;Burst bytes"; + range "1000..512000000"; + } + } + + typedef police-packets-bytes-type { + type enumeration { + enum packets { + tailf:info "Treat 'burst' value as packets"; + } + enum bytes { + tailf:info "Treat 'burst' value as bytes"; + } + } + } + + typedef police-pps-bps-type { + type enumeration { + enum pps { + tailf:info "pps Treat 'rate' value in "+ + "packets-per-second"; + } + enum bps { + tailf:info "pps Treat 'rate' value in "+ + "bytes-per-second"; + } + } + } + + typedef policy-action-type { + type enumeration { + enum bandwidth { + tailf:code-name policy_bandwidth; + tailf:info "Bandwidth"; + } + enum compression { + tailf:info "Activate Compression"; + } + enum dbl { + tailf:info "Dynamic buffer limiting"; + } + enum drop { + tailf:info "Drop all packets"; + } + enum estimate { + tailf:info "Estimate resources required for this class"; + } + enum fair-queue { + tailf:info "Enable Flow-based Fair Queuing in this Class"; + } + enum forward { + tailf:info "Forward service-path action"; + } + enum netflow-sampler { + tailf:info "NetFlow action"; + } + enum police { + tailf:info "Police"; + } + enum priority { + tailf:code-name policy_priority; + tailf:info "Strict Scheduling Priority for this Class"; + } + enum queue-limit { + tailf:info "Queue Max Threshold for Tail Drop"; + } + enum random-detect { + tailf:info "Enable Random Early Detection as drop policy"; + } + enum service-policy { + tailf:info "Configure Flow Next"; + } + enum set { + tailf:info "Set QoS values"; + } + enum shape { + tailf:code-name policy_shape; + tailf:info "Traffic Shaping"; + } + enum trust { + tailf:info "Set trust value for the class"; + } + enum queue-buffers { + tailf:info "queue buffer"; + } + } + } + + typedef prec_value-type { + type union { + type uint8 { + tailf:info "<0-7>;;new precedence"; + range "0..7"; + } + type enumeration { + enum cos { + tailf:info "Set packet precedence from cos"; + } + enum dscp { + tailf:info "Set packet precedence from dscp"; + } + enum exp { + tailf:info "Set packet precedence from exp"; + } + enum precedence { + tailf:info "Set packet precedence from precedence"; + } + } + } + } + + typedef precedence-type { + type union { + type uint8 { + tailf:info "<0-7>;;Precedence value"; + range "0..7"; + } + type enumeration { + enum critical { + tailf:info "Set packets with critical precedence (5)"; + } + enum flash { + tailf:info "Set packets with flash precedence (3)"; + } + enum flash-override { + tailf:info "Set packets with flash override precedence (4)"; + } + enum immediate { + tailf:info "Set packets with immediate precedence (2)"; + } + enum internet { + tailf:code-name "prec_internet"; + tailf:info "Set packets with internetwork control"+ + " precedence (6)"; + } + enum network { + tailf:info "Set packets with network control precedence"+ + " (7)"; + } + enum priority { + tailf:code-name "prec_priority"; + tailf:info "Set packets with priority precedence (1)"; + } + enum routine { + tailf:info "Set packets with routine precedence (0)"; + } + } + } + } + + typedef precedence-type2 { + type union { + type uint8 { + tailf:info "<0-7>;;IP precedence"; + range "0..7"; + } + type enumeration { + enum rsvp { + tailf:code-name "prec_rsvp"; + tailf:info "rsvp traffic"; + } + } + } + } + + typedef qos_value-type { + type union { + type uint8 { + tailf:info "<0-99>;;new qos-group"; + range "0..99"; + } + type enumeration { + enum cos { + tailf:info "Set packet qos from cos"; + } + enum dscp { + tailf:info "Set packet qos from dscp"; + } + enum exp { + tailf:info "Set packet qos from exp"; + } + enum precedence { + tailf:info "Set packet qos from precedence"; + } + } + } + } + +/// ======================================================================== +/// groupings +/// ======================================================================== + + grouping class-map-appnav-not-match-grouping { + // class-map * / peer + leaf peer { + when "../../../type = 'appnav'"; + tailf:info "APPNAV Peer Filter"; + description "APPNAV Peer Filter"; + type string { + tailf:info "H.H.H;;Device ID"; + } + } + } + + grouping class-map-appnav-match-grouping { + // class-map * / peer + leaf peer { + when "../../type = 'appnav'"; + tailf:info "APPNAV Peer Filter"; + description "APPNAV Peer Filter"; + type string { + tailf:info "H.H.H;;Device ID"; + } + } + } + + grouping class-map-match-grouping { + // class-map * / match application + container application { + tailf:info "Application to match"; + description "Application to match"; + container application-group { + tailf:info "Application Group to match"; + description "Application Group to match"; + leaf telepresence-group { + tailf:info "Telepresence Group"; + description "Telepresence Group"; + tailf:cli-full-command; + type empty; + } + leaf vmware-group { + tailf:info "VMWARE Group"; + description "VMWARE Group"; + tailf:cli-full-command; + type empty; + } + leaf webex-group { + tailf:info "WebEx Group"; + description "WebEx Group"; + tailf:cli-full-command; + type empty; + } + } + container attribute { + tailf:info "Application attribute to match"; + description "Application attribute to match"; + leaf media-type { + tailf:info "Media type attribute to match"; + description "Media type attribute to match"; + type enumeration { + enum audio { + tailf:info "Audio"; + } + enum audio-video { + tailf:info "Audio Video"; + } + enum control { + tailf:info "Control"; + } + enum data { + tailf:info "Data"; + } + enum video { + tailf:info "Video"; + } + } + } + } + } + // class-map * / match access-group + container access-group { + tailf:info "Access group"; + description "Access group"; + leaf index { + tailf:cli-drop-node-name; + type uint32 { + range "1..2699" { + tailf:info "<1-2699>;;Access list index"; + } + } + } + leaf-list name { + tailf:info "Named Access List"; + description "Named Access List"; + tailf:cli-list-syntax; + type string { + tailf:info "WORD;;Access List name"; + } + } + } + // class-map * / match any + leaf any { + tailf:info "Any packets"; + description "Any packets"; + type empty; + } + // class-map * / match class-map + leaf-list class-map { + tailf:info "Class map"; + description "Class map"; + tailf:cli-list-syntax; + type leafref { + path "/ios:native/class-map/name"; + // tailf:info "WORD;;Match class-map name"; + } + } + // class-map * / match cos + leaf-list cos { + tailf:info "IEEE 802.1Q/ISL class of service/user priority values"; + description "IEEE 802.1Q/ISL class of service/user priority values"; + tailf:cli-flat-list-syntax; + type uint8 { + range "0..7"; + tailf:info "<0-7>;;Enter up to 4 class-of-service values"+ + " separated by white-spaces"; + } + } + // class-map * / match destination-address + container destination-address { + tailf:info "Destination address"; + description "Destination address"; + leaf-list mac { + tailf:info "MAC address"; + description "MAC address"; + tailf:cli-list-syntax; + type yang:mac-address { + tailf:info "H.H.H;;MAC address"; + } + } + } + // class-map * / discard-class + leaf-list discard-class { + tailf:info "Discard behavior identifier"; + description "Discard behavior identifier"; + tailf:cli-list-syntax; + type uint8 { + range "0..7"; + tailf:info "<0-7>;;Discard Class value"; + } + } + // class-map * / dscp + leaf-list dscp { + tailf:info "Match DSCP in IP(v4) and IPv6 packets"; + description "Match DSCP in IP(v4) and IPv6 packets"; + tailf:cli-flat-list-syntax; + tailf:cli-list-syntax; + type dscp-type; + } + // class-map * / fr-de + leaf fr-de { + tailf:info "Match on Frame-relay DE bit"; + description "Match on Frame-relay DE bit"; + type empty; + } + // class-map * / fr-dlci + leaf-list fr-dlci { + tailf:info "Match on fr-dlci"; + description "Match on fr-dlci"; + tailf:cli-list-syntax; + type uint16 { + range "16..1007"; + tailf:info "<16-1007>;;frame-relay dlci number"; + } + } + // class-map * / input-interface + leaf-list input-interface { + tailf:info "Select an input interface to match"; + description "Select an input interface to match"; + tailf:cli-list-syntax; + //FIXME: interface dependency + type string; + } + // class-map * / ip + container ip { + tailf:info "IP specific values"; + description "IP specific values"; + // class-map * / ip dscp + leaf-list dscp { + tailf:info "Match IP DSCP (DiffServ CodePoints)"; + description "Match IP DSCP (DiffServ CodePoints)"; + tailf:cli-flat-list-syntax; + tailf:cli-list-syntax; + type dscp-type; + } + // class-map * / ip precedence + leaf-list precedence { + tailf:info "Match IP precedence"; + description "Match IP precedence"; + tailf:cli-flat-list-syntax; + type precedence-type; + } + // class-map * / ip rtp + list rtp { + tailf:info "Match RTP port nos"; + description "Match RTP port nos"; + key "port1 port2"; + leaf port1 { + type uint16 { + range "2000..65535"; + tailf:info "<2000-65535>;;Lower bound of UDP"+ + " destination port"; + } + } + leaf port2 { + type uint16 { + range "0..16383"; + tailf:info "<0-16383>;;Range of UDP ports"; + } + } + } + } + // class-map * / non-client-nrt + leaf non-client-nrt { + tailf:cli-full-command; + type empty; + } + // class-map * / mpls + container mpls { + tailf:info "Multi Protocol Label Switching specific values"; + description "Multi Protocol Label Switching specific values"; + container experimental { + tailf:info "Match MPLS experimental"; + description "Match MPLS experimental"; + leaf-list topmost { + tailf:info "Match MPLS experimental value on topmost label"; + description "Match MPLS experimental value on topmost label"; + tailf:cli-flat-list-syntax; + type uint8 { + range "0..7"; + tailf:info "<0-7>;;Enter up to 8 experimental values "+ + "separated by white-spaces"; + } + } + } + } + // class-map * / packet + container packet { + tailf:info "Layer 3 Packet length"; + description "Layer 3 Packet length"; + container "length" { + tailf:info "Layer 3 Packet length"; + description "Layer 3 Packet length"; + leaf max { + tailf:info "Maximum length of packet"; + description "Maximum length of packet"; + type uint16 { + range "1..2000"; + tailf:info "<1-2000>;;Packet length in bytes"; + } + } + leaf min { + tailf:info "Minimum length of packet"; + description "Minimum length of packet"; + type uint16 { + range "1..2000"; + tailf:info "<1-2000>;;Packet length in bytes"; + } + } + } + } + // class-map * / precedence + leaf-list precedence { + tailf:info "Match Precedence in IP(v4) and IPv6 packets"; + description "Match Precedence in IP(v4) and IPv6 packets"; + tailf:cli-flat-list-syntax; + type precedence-type; + } + // class-map * / protocol + container protocol { + tailf:info "Protocol"; + description "Protocol"; + leaf protocols { + tailf:cli-drop-node-name; + type enumeration { + enum x802-11-iapp { + tailf:info "IEEE 802.11 WLANs WG IAPP"; + } + enum ace-svr { + tailf:info "ACE Server/Propagation"; + } + enum aol { + tailf:info "America-Online Instant Messenger"; + } + enum appleqtc { + tailf:info "Apple QuickTime"; + } + enum biff { + tailf:info "Bliff mail notification"; + } + enum bittorrent { + tailf:info "bittorrent"; + } + enum bootpc { + tailf:info "Bootstrap Protocol Client"; + } + enum bootps { + tailf:info "Bootstrap Protocol Server"; + } + enum cddbp { + tailf:info "CD Database Protocol"; + } + enum cifs { + tailf:info "CIFS"; + } + enum cisco-fna { + tailf:info "Cisco FNATIVE"; + } + enum cisco-net-mgmt { + tailf:info "cisco-net-mgmt"; + } + enum cisco-svcs { + tailf:info "cisco license/perf/GDP/X.25/ident svcs"; + } + enum cisco-sys { + tailf:info "Cisco SYSMAINT"; + } + enum cisco-tdp { + tailf:info "Cisco TDP"; + } + enum cisco-tna { + tailf:info "Cisco TNATIVE"; + } + enum citriximaclient { + tailf:info "Citrix IMA Client"; + } + enum clp { + tailf:info "Cisco Line Protocol"; + } + enum creativepartnr { + tailf:info "Creative Partnr"; + } + enum creativeserver { + tailf:info "Creative Server"; + } + enum daytime { + tailf:info "Daytime (RFC 867)"; + } + enum dbase { + tailf:info "dBASE Unix"; + } + enum dbcontrol_agent { + tailf:info "Oracle dbControl Agent po"; + } + enum ddns-v3 { + tailf:info "Dynamic DNS Version 3"; + } + enum dhcp-failover { + tailf:info "DHCP Failover"; + } + enum directconnect { + tailf:info "Direct Connect Version 2.0"; + } + enum discard { + tailf:info "Discard port"; + } + enum dnsix { + tailf:info "DNSIX Securit Attribute Token Map"; + } + enum echo { + tailf:info "Echo port"; + } + enum entrust-svc-hdlr { + tailf:info "Entrust KM/Admin Service Handler"; + } + enum entrust-svcs { + tailf:info "Entrust sps/aaas/aams"; + } + enum exec { + tailf:info "Remote Process Execution"; + } + enum fcip-port { + tailf:info "FCIP"; + } + enum ftps { + tailf:info "FTP over TLS/SSL"; + } + enum gdoi { + tailf:info "GDOI"; + } + enum giop { + tailf:info "Oracle GIOP/SSL"; + } + enum gtpv0 { + tailf:info "GPRS Tunneling Protocol Version 0"; + } + enum gtpv1 { + tailf:info "GPRS Tunneling Protocol Version 1"; + } + enum h225ras { + tailf:info "H225 RAS over Unicast"; + } + enum h323callsigalt { + tailf:info "h323 Call Signal Alternate"; + } + enum hp-alarm-mgr { + tailf:info "HP Performance data alarm manager"; + } + enum hp-collector { + tailf:info "HP Performance data collector"; + } + enum hp-managed-node { + tailf:info "HP Performance data managed node"; + } + enum hsrp { + tailf:info "Hot Standby Router Protocol"; + } + enum https { + tailf:info "Secure Hypertext Transfer Protocol"; + } + enum ica { + tailf:info "ica (Citrix)"; + } + enum icabrowser { + tailf:info "icabrowser (Citrix)"; + } + enum ident { + tailf:info "Authentication Service"; + } + enum igmpv3lite { + tailf:info "IGMP over UDP for SSM"; + } + enum imap3 { + tailf:info "Interactive Mail Access Protocol 3"; + } + enum imaps { + tailf:info "IMAP over TLS/SSL"; + } + enum ipass { + tailf:info "IPASS"; + } + enum ipsec-msft { + tailf:info "Microsoft IPsec NAT-T"; + } + enum irc-serv { + tailf:info "IRC-SERV"; + } + enum ircs { + tailf:info "IRC over TLS/SSL"; + } + enum ircu { + tailf:info "IRCU"; + } + enum isakmp { + tailf:info "ISAKMP"; + } + enum iscsi { + tailf:info "iSCSI"; + } + enum iscsi-target { + tailf:info "iSCSI port"; + } + enum kermit { + tailf:info "kermit"; + } + enum ldap-admin { + tailf:info "LDAP admin server port"; + } + enum ldaps { + tailf:info "LDAP over TLS/SSL"; + } + enum login { + tailf:info "Remote login"; + } + enum lotusmtap { + tailf:info "Lotus Mail Tracking Agent Protocol"; + } + enum lotusnote { + tailf:info "Lotus Note"; + } + // AppNav match protocol + enum mapi { + tailf:info "MAPI"; + } + enum ms-ad-rep { + tailf:info "MS-AD-REP"; + } + enum ms-exch-nspi { + tailf:info "MS-EXCH-NSPI"; + } + enum ms-frs { + tailf:info "MS-FRS"; + } + enum ms-frsapi { + tailf:info "MS-FRSAPI"; + } + enum ms-rfr { + tailf:info "MS-RFR"; + } + //ms-sql MS-SQL + enum msn-messenger { + tailf:info "MSN-MESSENGER"; + } + enum netlogon { + tailf:info "NETLOGON"; + } + enum microsoft-ds { + tailf:info "Microsoft-DS"; + } + enum ms-cluster-net { + tailf:info "MS Cluster Net"; + } + enum ms-dotnetster { + tailf:info "Microsoft .NETster Port"; + } + enum ms-sna { + tailf:info "Microsoft SNA Server/Base"; + } + enum ms-sql { + tailf:info "Microsoft SQL"; + } + enum ms-sql-m { + tailf:info "Microsoft SQL Monitor"; + } + enum msexch-routing { + tailf:info "Microsoft Exchange Routing"; + } + enum msnmsgr { + tailf:info "MSN Instant Messenger"; + } + enum msrpc { + tailf:info "Microsoft Remote Procedure Call"; + } + enum mysql { + tailf:info "MySQL"; + } + enum n2h2server { + tailf:info "N2H2 Filter Service Port"; + } + enum ncp { + tailf:info "NCP (Novell)"; + } + enum net8-cman { + tailf:info "Oracle Net8 Cman/Admin"; + } + enum netbios-dgm { + tailf:info "NETBIOS Datagram Service"; + } + enum netbios-ns { + tailf:info "NETBIOS Name Service"; + } + enum netbios-ssn { + tailf:info "NETBIOS Session Service"; + } + enum netstat { + tailf:info "Variant of systat"; + } + enum oem-agent { + tailf:info "OEM Agent (Oracle)"; + } + enum oracle { + tailf:info "Oracle"; + } + enum oracle-em-vp { + tailf:info "Oracle EM/VP"; + } + enum oraclenames { + tailf:info "Oracle Names"; + } + enum orasrv { + tailf:info "Oracle SQL*Net v1/v2"; + } + enum pcanywheredata { + tailf:info "pcANYWHEREdata"; + } + enum pcanywherestat { + tailf:info "pcANYWHEREstat"; + } + enum pop3s { + tailf:info "POP3 over TLS/SSL"; + } + enum pwdgen { + tailf:info "Password Generator Protocol"; + } + enum qmtp { + tailf:info "Quick Mail Transfer Protocol"; + } + enum r-winsock { + tailf:info "remote-winsock"; + } + enum radius { + tailf:info "RADIUS & Accounting"; + } + enum rdb-dbs-disp { + tailf:info "Oracle RDB"; + } + enum realmedia { + tailf:info "RealNetwork's Realmedia Protocol"; + } + enum realsecure { + tailf:info "ISS Real Secure Console Service Port"; + } + enum router { + tailf:info "Local Routing Process"; + } + enum rsvp-encap { + tailf:info "RSVP ENCAPSULATION-1/2"; + } + enum rsvp_tunnel { + tailf:info "RSVP Tunnel"; + } + enum rtc-pm-port { + tailf:info "Oracle RTC-PM port"; + } + enum rtelnet { + tailf:info "Remote Telnet Service"; + } + enum send { + tailf:info "SEND"; + } + enum shell { + tailf:info "Remote command"; + } + enum sip-tls { + tailf:info "SIP-TLS"; + } + enum sms { + tailf:info "SMS RCINFO/XFER/CHAT"; + } + enum snmptrap { + tailf:info "SNMP Trap"; + } + enum sql-net { + tailf:info "SQL-NET"; + } + enum sqlserv { + tailf:info "SQL Services"; + } + enum sqlsrv { + tailf:info "SQL Service"; + } + enum sshell { + tailf:info "SSLshell"; + } + enum ssp { + tailf:info "State Sync Protocol"; + } + enum syslog-conn { + tailf:info "Reliable Syslog Service"; + } + enum tacacs { + tailf:info "Login Host Protocol (TACACS)"; + } + enum tacacs-ds { + tailf:info "TACACS-Database Service"; + } + enum tarantella { + tailf:info "Tarantella"; + } + enum tcp { + tailf:info "TCP"; + } + enum telnets { + tailf:info "Telnet over TLS/SSL"; + } + enum time { + tailf:info "Time"; + } + enum timed { + tailf:info "Time server"; + } + enum tr-rsrb { + tailf:info "cisco RSRB"; + } + enum ttc { + tailf:info "Oracle TTC/SSL"; + } + enum udp { + tailf:info "UDP"; + } + enum uucp { + tailf:info "UUCPD/UUCP-RLOGIN"; + } + enum vqp { + tailf:info "VQP"; + } + enum webster { + tailf:info "Network Disctionary"; + } + enum who { + tailf:info "Who's service"; + } + enum wins { + tailf:info "Microsoft WINS"; + } + enum x11 { + tailf:info "X Window System"; + } + enum xdmcp { + tailf:info "XDM Control Protocol"; + } + enum ymsgr { + tailf:info "Yahoo! Instant Messenger"; + } + enum aarp { + tailf:info "AppleTalk ARP"; + } + enum appletalk { + tailf:info "AppleTalk"; + } + enum arp { + tailf:info "IP ARP"; + } + enum bgp { + tailf:info "Border Gateway Protocol"; + } + enum bridge { + tailf:info "Bridging"; + } + enum bstun { + tailf:info "Block Serial Tunnel"; + } + enum cdp { + tailf:info "Cisco Discovery Protocol"; + } + } + } + container citrix { + tailf:info "Citrix Systems ICA protocol"; + description "Citrix Systems ICA protocol"; + presence "enable citrix system protocol matching"; + leaf ica-tag { + tailf:info "Citrix ICA tag 0-high 1-medium 2-low "+ + "3-background"; + description "Citrix ICA tag 0-high 1-medium 2-low "+ + "3-background"; + type string { + tailf:info "WORD;;Enter a string as the sub-protocol "+ + "parameter"; + } + } + } + leaf clns { + tailf:info "ISO CLNS"; + description "ISO CLNS"; + type empty; + } + leaf clns_es { + tailf:info "ISO CLNS End System"; + description "ISO CLNS End System"; + type empty; + } + leaf clns_is { + tailf:info "ISO CLNS Intermediate System"; + description "ISO CLNS Intermediate System"; + type empty; + } + leaf cmns { + tailf:info "ISO CMNS"; + description "ISO CMNS"; + type empty; + } + leaf compressedtcp { + tailf:info "Compressed TCP (VJ"; + description "Compressed TCP (VJ"; + type empty; + } + leaf cuseeme { + tailf:info "CU-SeeMe desktop video conference"; + description "CU-SeeMe desktop video conference"; + type empty; + } + leaf decnet { + tailf:info "DECnet"; + description "DECnet"; + type empty; + } + leaf decnet_node { + tailf:info "DECnet Node"; + description "DECnet Node"; + type empty; + } + leaf decnet_router-l1 { + tailf:info "DECnet Router L1"; + description "DECnet Router L1"; + type empty; + } + leaf decnet_router-l2 { + tailf:info "DECnet Router L2"; + description "DECnet Router L2"; + type empty; + } + leaf dhcp { + tailf:info "Dynamic Host Configuration"; + description "Dynamic Host Configuration"; + type empty; + } + leaf dlsw { + type empty; + tailf:info "Data Link Switching (Direct encapsulation only"; + } + leaf dns { + type empty; + tailf:info "Domain Name Server lookup"; + } + leaf edonkey { + type empty; + tailf:info "eDonkey"; + } + leaf egp { + type empty; + tailf:info "Exterior Gateway Protocol"; + } + leaf eigrp { + type empty; + tailf:info "Enhanced Interior Gateway Routing Protocol"; + } + leaf exchange { + type empty; + tailf:info "MS-RPC for Exchange"; + } + container fasttrack { + tailf:info "FastTrack Traffic - KaZaA, Morpheus, Grokster"; + description "FastTrack Traffic - KaZaA, Morpheus, Grokster"; + presence "enable fasttrack matching"; + leaf file-transfer { + tailf:info "File transfer stream"; + description "File transfer stream"; + type string { + tailf:info "WORD;;Enter a string as the sub-protocol "+ + "parameter"; + } + } + } + leaf finger { + type empty; + tailf:info "Finger"; + } + leaf ftp { + type empty; + tailf:info "File Transfer Protocol"; + } + container gnutella { + tailf:info "Gnutella Version2 Traffic - BearShare, Shareeza, "+ + "Morpheus"; + description "Gnutella Version2 Traffic - BearShare, Shareeza, "+ + "Morpheus"; + presence "enable gnutella matching"; + leaf file-transfer { + tailf:info "File transfer stream"; + description "File transfer stream"; + type string { + tailf:info "WORD;;Enter a string as the sub-protocol "+ + "parameter"; + } + } + } + leaf gopher { + type empty; + tailf:info "Gopher"; + } + leaf gre { + type empty; + tailf:info "Generic Routing Encapsulation"; + } + leaf h323 { + type empty; + tailf:info "H323 Protocol"; + } + container http { + tailf:info "World Wide Web traffic"; + description "World Wide Web traffic"; + presence "enable http traffic matching"; + leaf c-header-field { + tailf:info "Client general Header Field"; + description "Client general Header Field"; + type string { + tailf:info "WORD;;Enter a string as the sub-protocol "+ + "parameter"; + } + } + leaf host { + tailf:info "Server Host Name"; + description "Server Host Name"; + type string { + tailf:info "WORD;;Enter a string as the sub-protocol "+ + "parameter"; + } + } + leaf mime { + tailf:info "Match MIME Type"; + description "Match MIME Type"; + type string { + tailf:info "WORD;;Enter a string as the sub-protocol "+ + "parameter"; + } + } + leaf s-header-field { + tailf:info "Server general Header Field"; + description "Server general Header Field"; + type string { + tailf:info "WORD;;Enter a string as the sub-protocol "+ + "parameter"; + } + } + leaf url { + tailf:info "Match URL String"; + description "Match URL String"; + type string { + tailf:info "WORD;;Enter a string as the sub-protocol "+ + "parameter"; + } + } + } + leaf icmp { + tailf:info "Internet Control Message"; + description "Internet Control Message"; + type empty; + } + leaf imap { + tailf:info "Internet Message Access Protocol"; + description "Internet Message Access Protocol"; + type empty; + } + leaf ip { + tailf:info "IP"; + description "IP"; + type empty; + } + leaf ipinip { + tailf:info "IP in IP (encapsulation"; + description "IP in IP (encapsulation"; + type empty; + } + leaf ipsec { + tailf:info "IP Security Protocol (ESP/AH"; + description "IP Security Protocol (ESP/AH"; + type empty; + } + leaf ipv6 { + tailf:info "IPV6"; + description "IPV6"; + type empty; + } + leaf ipx { + tailf:info "Novell IPX"; + description "Novell IPX"; + type empty; + } + leaf irc { + type empty; + tailf:info "Internet Relay Chat"; + description "Internet Relay Chat"; + } + container kazaa2 { + tailf:info "Kazaa Version 2"; + description "Kazaa Version 2"; + presence "enable kazaa version 2 matching"; + leaf file-transfer { + tailf:info "File transfer stream"; + description "File transfer stream"; + type string { + tailf:info "WORD;;Enter a string as the sub-protocol "+ + "parameter"; + } + } + } + leaf kerberos { + tailf:info "Kerberos"; + description "Kerberos"; + type empty; + } + leaf l2tp { + tailf:info "L2F/L2TP tunnel"; + description "L2F/L2TP tunnel"; + type empty; + } + leaf ldap { + tailf:info "Lightweight Directory Access Protocol"; + description "Lightweight Directory Access Protocol"; + type empty; + } + leaf llc2 { + tailf:info "llc2"; + description "llc2"; + type empty; + } + leaf mgcp { + tailf:info "Media Gateway Control Protocol"; + description "Media Gateway Control Protocol"; + type empty; + } + container napster { + tailf:info "Napster Traffic"; + description "Napster Traffic"; + presence "enable napster matching"; + leaf non-std { + tailf:info "Non-standard port advertizements"; + description "Non-standard port advertizements"; + type empty; + } + } + leaf netbios { + tailf:info "NetBIOS"; + description "NetBIOS"; + type empty; + } + leaf netshow { + tailf:info "Microsoft Netshow"; + description "Microsoft Netshow"; + type empty; + } + leaf nfs { + tailf:info "Network File System"; + description "Network File System"; + type empty; + } + leaf nntp { + tailf:info "Network News Transfer Protocol"; + description "Network News Transfer Protocol"; + type empty; + } + leaf notes { + tailf:info "Lotus Notes(R"; + description "Lotus Notes(R"; + type empty; + } + leaf novadigm { + tailf:info "Novadigm EDM"; + description "Novadigm EDM"; + type empty; + } + leaf ntp { + tailf:info "Network Time Protocol"; + description "Network Time Protocol"; + type empty; + } + leaf ospf { + tailf:info "Open Shortest Path First"; + description "Open Shortest Path First"; + type empty; + } + leaf pad { + tailf:info "PAD links"; + description "PAD links"; + type empty; + } + leaf pcanywhere { + tailf:info "Symantec pcANYWHERE"; + description "Symantec pcANYWHERE"; + type empty; + } + leaf pop3 { + tailf:info "Post Office Protocol"; + description "Post Office Protocol"; + type empty; + } + leaf pppoe { + tailf:info "PPP over Ethernet"; + description "PPP over Ethernet"; + type empty; + } + leaf pptp { + tailf:info "Point-to-Point Tunneling Protocol"; + description "Point-to-Point Tunneling Protocol"; + type empty; + } + leaf printer { + tailf:info "print spooler/lpd"; + description "print spooler/lpd"; + type empty; + } + leaf qllc { + tailf:info "qllc protocol"; + description "qllc protocol"; + type empty; + } + leaf rcmd { + tailf:info "BSD r-commands (rsh, rlogin, rexec"; + description "BSD r-commands (rsh, rlogin, rexec"; + type empty; + } + leaf rip { + tailf:info "Routing Information Protocol"; + description "Routing Information Protocol"; + type empty; + } + leaf rsrb { + tailf:info "Remote Source-Route Bridging"; + description "Remote Source-Route Bridging"; + type empty; + } + leaf rsvp { + tailf:info "Resource Reservation Protocol"; + description "Resource Reservation Protocol"; + type empty; + } + leaf rtcp { + tailf:info "Real Time Control Protocol"; + description "Real Time Control Protocol"; + type empty; + } + container rtp { + tailf:info "Real Time Protocol"; + description "Real Time Protocol"; + presence "enable rtp matching"; + leaf audio { + tailf:info "Match voice packets"; + description "Match voice packets"; + type empty; + } + leaf payload-type { + tailf:info "Match an explicit PT"; + description "Match an explicit PT"; + type string { + tailf:info "WORD;;Enter a string as the sub-protocol "+ + "parameter"; + } + } + leaf video { + tailf:info "Match video packets"; + description "Match video packets"; + type empty; + } + } + leaf rtsp { + tailf:info "Real Time Streaming Protocol"; + description "Real Time Streaming Protocol"; + type empty; + } + leaf secure-ftp { + tailf:info "FTP over TLS/SSL"; + description "FTP over TLS/SSL"; + type empty; + } + leaf secure-http { + tailf:info "Secured HTTP"; + description "Secured HTTP"; + type empty; + } + leaf secure-imap { + tailf:info "Internet Message Access Protocol over TLS/SSL"; + description "Internet Message Access Protocol over TLS/SSL"; + type empty; + } + leaf secure-irc { + tailf:info "Internet Relay Chat over TLS/SSL"; + description "Internet Relay Chat over TLS/SSL"; + type empty; + } + leaf secure-ldap { + tailf:info "Lightweight Directory Access Protocol over TLS/SSL"; + description "Lightweight Directory Access Protocol over TLS/SSL"; + type empty; + } + leaf secure-nntp { + tailf:info "Network News Transfer Protocol over TLS/SSL"; + description "Network News Transfer Protocol over TLS/SSL"; + type empty; + } + leaf secure-pop3 { + tailf:info "Post Office Protocol over TLS/SSL"; + description "Post Office Protocol over TLS/SSL"; + type empty; + } + leaf secure-telnet { + tailf:info "Telnet over TLS/SSL"; + description "Telnet over TLS/SSL"; + type empty; + } + leaf sip { + tailf:info "Session Initiation Protocol"; + description "Session Initiation Protocol"; + type empty; + } + leaf skinny { + tailf:info "Skinny Protocol"; + description "Skinny Protocol"; + type empty; + } + container smtp { + tailf:info "Simple Mail Transfer Protocol"; + description "Simple Mail Transfer Protocol"; + leaf extended { + type empty; + } + } + leaf snapshot { + tailf:info "Snapshot routing support"; + description "Snapshot routing support"; + type empty; + } + leaf snmp { + tailf:info "Simple Network Management Protocol"; + description "Simple Network Management Protocol"; + type empty; + } + leaf socks { + tailf:info "SOCKS"; + description "SOCKS"; + type empty; + } + leaf sqlnet { + tailf:info "SQL*NET for Oracle"; + description "SQL*NET for Oracle"; + type empty; + } + leaf sqlserver { + tailf:info "MS SQL Server"; + description "MS SQL Server"; + type empty; + } + leaf ssh { + tailf:info "Secured Shell"; + description "Secured Shell"; + type empty; + } + leaf streamwork { + tailf:info "Xing Technology StreamWorks player"; + description "Xing Technology StreamWorks player"; + type empty; + } + leaf stun { + tailf:info "Serial Tunnel"; + description "Serial Tunnel"; + type empty; + } + leaf sunrpc { + tailf:info "Sun RPC"; + description "Sun RPC"; + type empty; + } + leaf syslog { + tailf:info "WORD;;Enter a string as the sub-protocol "+ + "parameter"; tailf:info "System Logging Utility"; + description "System Logging Utility"; + type empty; + } + leaf telnet { + tailf:info "Telnet"; + description "Telnet"; + type empty; + } + leaf tftp { + tailf:info "Trivial File Transfer Protocol"; + description "Trivial File Transfer Protocol"; + type empty; + } + leaf vdolive { + tailf:info "VDOLive streaming video"; + description "VDOLive streaming video"; + type empty; + } + leaf vofr { + tailf:info "voice over Frame Relay packets"; + description "voice over Frame Relay packets"; + type empty; + } + leaf winmx { + tailf:info "WinMx file-sharing application"; + description "WinMx file-sharing application"; + type empty; + } + leaf xwindows { + tailf:info "X-Windows remote access"; + description "X-Windows remote access"; + type empty; + } + } + // class-map * / qos-group + leaf-list qos-group { + tailf:info "Qos-group"; + description "Qos-group"; + tailf:cli-list-syntax; + type uint16 { + tailf:info "<0-99>;;Qos Group value"; + range "0..99"; + } + } + // class-map * / match security-group + container security-group { + tailf:info "Security group"; + description "Security group"; + container destination { + tailf:info "Destination security group"; + description "Destination security group"; + leaf tag { + tailf:info "Security group tag"; + description "Security group tag"; + type uint16 { + tailf:info "<1-65533>;;Security group tag id"; + } + } + } + container source { + tailf:info "Source security group"; + description "Source security group"; + leaf tag { + tailf:info "Security group tag"; + description "Security group tag"; + type uint16 { + tailf:info "<1-65533>;;Security group tag id"; + } + } + } + } + // class-map * / source-address + container source-address { + tailf:info "Source address"; + description "Source address"; + leaf-list mac { + tailf:info "MAC address"; + description "MAC address"; + tailf:cli-list-syntax; + type yang:mac-address { + tailf:info "H.H.H;;MAC address"; + } + } + } + // class-map * / match vlan + leaf-list vlan { + tailf:info "VLANs to match"; + description "VLANs to match"; + tailf:cli-range-list-syntax; + tailf:cli-list-syntax; + type uint16 { + tailf:info "<1-4094>;;VLAN id"; + range "1..4094"; + } + } + } + + grouping interface-atm-grouping { + // Removed body + } + + grouping interface-cellular-grouping { + //interface * / dialer + container dialer { + leaf in-band { + type empty; + } + leaf idle-timeout { + type uint32; + } + leaf string { + type string; + } + leaf watch-group { + type uint32; + } + } + //interface * / async + container async { + leaf mode { + type enumeration { + enum interactive; + } + } + } + } + + grouping interface-common-grouping { + // interface * / service-policy + container service-policy { + tailf:info "Configure QoS Service Policy"; + description "Configure QoS Service Policy"; + leaf history { + tailf:cli-full-command; + tailf:info "Keep history of QoS metrics"; + description "Keep history of QoS metrics"; + type empty; + } + leaf "input" { + tailf:cli-full-command; + tailf:info "Assign policy-map to the input of an interface"; + description "Assign policy-map to the input of an interface"; + type string { + tailf:info "WORD;;policy-map name"; + } + tailf:non-strict-leafref { + path "/ios:native/policy-map/name"; + } + } + leaf "output" { + tailf:cli-full-command; + tailf:info "Assign policy-map to the output of an interface"; + description "Assign policy-map to the output of an interface"; + type string { + tailf:info "WORD;;policy-map name"; + } + tailf:non-strict-leafref { + path "/ios:native/policy-map/name"; + } + } + container "type" { + tailf:info "Configure CPL Service Policy"; + description "Configure CPL Service Policy"; + container performance-monitor { + tailf:info "Configure media monitor service-policy type"; + description "Configure media monitor service-policy type"; + tailf:cli-sequence-commands; + tailf:cli-compact-syntax; + leaf direction { + tailf:cli-drop-node-name; + type enumeration { + enum "input" { + tailf:info "Assign policy-map to the input of an interfcae"; + } + enum "output" { + tailf:info "Assign policy-map to the output of an interfcae"; + } + } + } + leaf name { + tailf:cli-drop-node-name; + type string { + tailf:info "WORD;;policy-map name"; + } + tailf:non-strict-leafref { + path "/ios:native/policy-map/name"; + } + } + } + // interface * / service-policy type * / service-chain + container service-chain { + tailf:info "Configure Service-chain Service Policy"; + description "Configure Service-chain Service Policy"; + tailf:cli-sequence-commands; + tailf:cli-compact-syntax; + leaf direction { + tailf:cli-drop-node-name; + type enumeration { + enum "input" { + tailf:info "Assign policy-map to the input of an interfcae"; + } + enum "output" { + tailf:info "Assign policy-map to the output of an interfcae"; + } + } + } + leaf name { + tailf:cli-drop-node-name; + type string { + tailf:info "WORD;;policy-map name"; + } + tailf:non-strict-leafref { + path "/ios:native/policy-map/name"; + } + } + } + } + } + } + + grouping interface-ethernet-grouping { + // Removed body + } + + grouping interface-grouping { + // Removed body + } + + grouping interface-overlay-grouping { + // Removed body + } + + grouping interface-pointtopoint-grouping { + // Removed body + } + + grouping interface-pseudowire-grouping { + // Removed body + } + + grouping interface-switch-grouping { + // Removed body + } + + grouping interface-tunnel-grouping { + // Removed body + } + + grouping interface-zone-member-grouping { + // interface * / zone-member + container zone-member { + tailf:info "Apply zone name"; + description "Apply zone name"; + leaf security { + tailf:info "Security zone"; + description "Security zone"; + type string; + tailf:non-strict-leafref { + path "/ios:native/zone/security/id"; + } + } + } + } + + grouping police-action-drop-grouping { + leaf drop { + tailf:info "drop packet"; + description "drop packet"; + type empty; + } + } + + grouping police-action-grouping { + container actions { + tailf:cli-break-sequence-commands; + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + // policy-map * / class * / police ? / conform-action + uses police-conform-action-grouping; + // policy-map * / class * / police ? / exceed-action + uses police-exceed-action-grouping; + // policy-map * / class * / police ? / violate-action + uses police-violate-action-grouping; + } + } + + grouping police-conform-action-grouping { + container conform-set-clp-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-flatten-container; + leaf set-clp-transmit { + tailf:info "set atm clp and send it"; + description "set atm clp and send it"; + type empty; + } + } + } + container conform-set-cos-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-flatten-container; + leaf set-cos-transmit { + tailf:info "rewrite packet cos and send it"; + description "rewrite packet cos and send it"; + type cos_value-type; + } + } + } + container conform-set-cos-transmit-table { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-compact-syntax; + tailf:cli-flatten-container; + tailf:cli-sequence-commands; + leaf set-cos-transmit { + tailf:info "rewrite packet cos and send it"; + description "rewrite packet cos and send it"; + type cos_value-type; + } + leaf table { + tailf:info "Specify table-map"; + description "Specify table-map"; + type leafref { + path "/ios:native/table-map/name"; + } + } + } + } + container conform-set-discard-class-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-flatten-container; + leaf set-discard-class-transmit { + tailf:info "set discard-class and send it"; + description "set discard-class and send it"; + type uint8 { + tailf:info "<0-7>;;new discard-class"; + range "0..7"; + } + } + } + } + container conform-set-dscp-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-flatten-container; + leaf set-dscp-transmit { + tailf:info "set dscp and send it"; + description "set dscp and send it"; + type dscp-type; + } + } + } + container conform-set-dscp-transmit-table { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-compact-syntax; + tailf:cli-flatten-container; + tailf:cli-sequence-commands; + leaf set-dscp-transmit { + tailf:info "set dscp and send it"; + description "set dscp and send it"; + type dscp-type; + } + leaf table { + tailf:info "Specify table-map"; + description "Specify table-map"; + type leafref { + path "/ios:native/table-map/name"; + } + } + } + } + container conform-set-frde-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-flatten-container; + leaf set-frde-transmit { + tailf:info "set FR DE and send it"; + description "set FR DE and send it"; + type empty; + } + } + } + container conform-set-mpls-exp-imposition-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-flatten-container; + leaf set-mpls-exp-imposition-transmit { + tailf:info "set exp at tag imposition and send it"; + description "set exp at tag imposition and send it"; + type exp_value-type; + } + } + } + container conform-set-mpls-exp-imposition-transmit-table { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-compact-syntax; + tailf:cli-flatten-container; + tailf:cli-sequence-commands; + leaf set-mpls-exp-imposition-transmit { + tailf:info "set exp at tag imposition and send it"; + description "set exp at tag imposition and send it"; + type exp_value-type; + } + leaf table { + tailf:info "Specify table-map"; + description "Specify table-map"; + type leafref { + path "/ios:native/table-map/name"; + } + } + } + } + container conform-set-mpls-exp-topmost-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-flatten-container; + leaf set-mpls-exp-topmost-transmit { + tailf:info "set exp on topmost label and send it"; + description "set exp on topmost label and send it"; + type exp_value-type; + } + } + } + container conform-set-mpls-exp-topmost-transmit-table { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-compact-syntax; + tailf:cli-flatten-container; + tailf:cli-sequence-commands; + leaf set-mpls-exp-topmost-transmit { + tailf:info "set exp on topmost label and send it"; + description "set exp on topmost label and send it"; + type exp_value-type; + } + leaf table { + tailf:info "Specify table-map"; + description "Specify table-map"; + type leafref { + path "/ios:native/table-map/name"; + } + } + } + } + container conform-set-prec-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-flatten-container; + leaf set-prec-transmit { + tailf:info "rewrite packet precedence and send it"; + description "rewrite packet precedence and send it"; + type prec_value-type; + } + } + } + container conform-set-prec-transmit-table { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-compact-syntax; + tailf:cli-flatten-container; + tailf:cli-sequence-commands; + leaf set-prec-transmit { + tailf:info "rewrite packet precedence and send it"; + description "rewrite packet precedence and send it"; + type prec_value-type; + } + leaf table { + tailf:info "Specify table-map"; + description "Specify table-map"; + type leafref { + path "/ios:native/table-map/name"; + } + } + } + } + container conform-set-qos-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-flatten-container; + leaf set-qos-transmit { + tailf:info "set qos-group and send it"; + description "set qos-group and send it"; + type qos_value-type; + } + } + } + container conform-set-qos-transmit-table { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-compact-syntax; + tailf:cli-flatten-container; + tailf:cli-sequence-commands; + leaf set-qos-transmit { + tailf:info "set qos-group and send it"; + description "set qos-group and send it"; + type qos_value-type; + } + leaf table { + tailf:info "Specify table-map"; + description "Specify table-map"; + type leafref { + path "/ios:native/table-map/name"; + } + } + } + } + container conform-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-flatten-container; + uses police-action-transmit-grouping; + } + } + container conform-drop { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container conform-action { + tailf:info "action when rate is less than conform burst"; + description "action when rate is less than conform burst"; + tailf:cli-flatten-container; + uses police-action-drop-grouping; + } + } + } + + grouping police-action-transmit-grouping { + leaf transmit { + tailf:info "transmit packet"; + description "transmit packet"; + type empty; + } + } + + grouping police-exceed-action-grouping { + container exceed-dscp { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container exceed-action { + tailf:info "action when rate is within conform and "+ + "conform + exceed burst"; + description "action when rate is within conform and "+ + "conform + exceed burst"; + tailf:cli-flatten-container; + leaf dscp { + //tailf:info + type dscp-type; + } + } + } + container exceed-set-clp-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container exceed-action { + tailf:info "action when rate is within conform and "+ + "conform + exceed burst"; + description "action when rate is within conform and "+ + "conform + exceed burst"; + tailf:cli-flatten-container; + leaf set-clp-transmit { + tailf:info "set atm clp and send it"; + description "set atm clp and send it"; + type empty; + } + } + } + container exceed-set-cos-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container exceed-action { + tailf:info "action when rate is within conform and "+ + "conform + exceed burst"; + description "action when rate is within conform and "+ + "conform + exceed burst"; + tailf:cli-flatten-container; + leaf set-cos-transmit { + tailf:info "rewrite packet cos and send it"; + description "rewrite packet cos and send it"; + type cos_value-type; + } + } + } + container exceed-set-discard-class-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container exceed-action { + tailf:info "action when rate is within conform and "+ + "conform + exceed burst"; + description "action when rate is within conform and "+ + "conform + exceed burst"; + tailf:cli-flatten-container; + leaf set-discard-class-transmit { + tailf:info "set discard-class and send it"; + description "set discard-class and send it"; + type uint8 { + tailf:info "<0-7>;;new discard-class"; + range "0..7"; + } + } + } + } + container exceed-set-dscp-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container exceed-action { + tailf:info "action when rate is within conform and "+ + "conform + exceed burst"; + description "action when rate is within conform and "+ + "conform + exceed burst"; + tailf:cli-flatten-container; + leaf set-dscp-transmit { + tailf:info "set dscp and send it"; + description "set dscp and send it"; + type dscp-type; + } + container set-dscp-transmit-c { + tailf:alt-name "set-dscp-transmit"; + container dscp { + leaf table { + type enumeration { + enum policed-dscp; + } + } + } + } + } + } + container exceed-set-frde-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container exceed-action { + tailf:info "action when rate is within conform and "+ + "conform + exceed burst"; + description "action when rate is within conform and "+ + "conform + exceed burst"; + tailf:cli-flatten-container; + leaf set-frde-transmit { + tailf:info "set FR DE and send it"; + description "set FR DE and send it"; + type empty; + } + } + } + container exceed-set-mpls-exp-imposition-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container exceed-action { + tailf:info "action when rate is within conform and "+ + "conform + exceed burst"; + description "action when rate is within conform and "+ + "conform + exceed burst"; + tailf:cli-flatten-container; + leaf set-mpls-exp-imposition-transmit { + tailf:info "set exp at tag imposition and send it"; + description "set exp at tag imposition and send it"; + type exp_value-type; + } + } + } + container exceed-set-mpls-exp-topmost-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container exceed-action { + tailf:info "action when rate is within conform and "+ + "conform + exceed burst"; + description "action when rate is within conform and "+ + "conform + exceed burst"; + tailf:cli-flatten-container; + leaf set-mpls-exp-topmost-transmit { + tailf:info "set exp on topmost label and send it"; + description "set exp on topmost label and send it"; + type exp_value-type; + } + } + } + container exceed-set-prec-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container exceed-action { + tailf:info "action when rate is within conform and "+ + "conform + exceed burst"; + description "action when rate is within conform and "+ + "conform + exceed burst"; + tailf:cli-flatten-container; + leaf set-prec-transmit { + tailf:info "rewrite packet precedence and send it"; + description "rewrite packet precedence and send it"; + type prec_value-type; + } + } + } + container exceed-set-qos-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container exceed-action { + tailf:info "action when rate is within conform and "+ + "conform + exceed burst"; + description "action when rate is within conform and "+ + "conform + exceed burst"; + tailf:cli-flatten-container; + leaf set-qos-transmit { + tailf:info "set qos-group and send it"; + description "set qos-group and send it"; + type qos_value-type; + } + } + } + container exceed-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container exceed-action { + tailf:info "action when rate is within conform and "+ + "conform + exceed burst"; + description "action when rate is within conform and "+ + "conform + exceed burst"; + tailf:cli-flatten-container; + uses police-action-transmit-grouping; + } + } + container exceed-drop { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container exceed-action { + tailf:info "action when rate is within conform and "+ + "conform + exceed burst"; + description "action when rate is within conform and "+ + "conform + exceed burst"; + tailf:cli-flatten-container; + uses police-action-drop-grouping; + } + } + } + + grouping police-violate-action-grouping { + container violate-set-clp-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container violate-action { + tailf:info "action when rate is greater than conform + "+ + "exceed burst"; + description "action when rate is greater than conform + "+ + "exceed burst"; + tailf:cli-flatten-container; + leaf set-clp-transmit { + tailf:info "set atm clp and send it"; + description "set atm clp and send it"; + type empty; + } + } + } + container violate-set-cos-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container violate-action { + tailf:info "action when rate is greater than conform + "+ + "exceed burst"; + description "action when rate is greater than conform + "+ + "exceed burst"; + tailf:cli-flatten-container; + leaf set-cos-transmit { + tailf:info "rewrite packet cos and send it"; + description "rewrite packet cos and send it"; + type cos_value-type; + } + } + } + container violate-set-discard-class-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container violate-action { + tailf:info "action when rate is greater than conform + "+ + "exceed burst"; + description "action when rate is greater than conform + "+ + "exceed burst"; + tailf:cli-flatten-container; + leaf set-discard-class-transmit { + tailf:info "set discard-class and send it"; + description "set discard-class and send it"; + type uint8 { + tailf:info "<0-7>;;new discard-class"; + range "0..7"; + } + } + } + } + container violate-set-dscp-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container violate-action { + tailf:info "action when rate is greater than conform + "+ + "exceed burst"; + description "action when rate is greater than conform + "+ + "exceed burst"; + tailf:cli-flatten-container; + leaf set-dscp-transmit { + tailf:info "set dscp and send it"; + description "set dscp and send it"; + type dscp-type; + } + } + } + container violate-set-frde-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container violate-action { + tailf:info "action when rate is greater than conform + "+ + "exceed burst"; + description "action when rate is greater than conform + "+ + "exceed burst"; + tailf:cli-flatten-container; + leaf set-frde-transmit { + tailf:info "set FR DE and send it"; + description "set FR DE and send it"; + type empty; + } + } + } + container violate-set-mpls-exp-imposition-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container violate-action { + tailf:info "action when rate is greater than conform + "+ + "exceed burst"; + description "action when rate is greater than conform + "+ + "exceed burst"; + tailf:cli-flatten-container; + leaf set-mpls-exp-imposition-transmit { + tailf:info "set exp at tag imposition and send it"; + description "set exp at tag imposition and send it"; + type exp_value-type; + } + } + } + container violate-set-mpls-exp-topmost-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container violate-action { + tailf:info "action when rate is greater than conform + "+ + "exceed burst"; + description "action when rate is greater than conform + "+ + "exceed burst"; + tailf:cli-flatten-container; + leaf set-mpls-exp-topmost-transmit { + tailf:info "set exp on topmost label and send it"; + description "set exp on topmost label and send it"; + type exp_value-type; + } + } + } + container violate-set-prec-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container violate-action { + tailf:info "action when rate is greater than conform + "+ + "exceed burst"; + description "action when rate is greater than conform + "+ + "exceed burst"; + tailf:cli-flatten-container; + leaf set-prec-transmit { + tailf:info "rewrite packet precedence and send it"; + description "rewrite packet precedence and send it"; + type prec_value-type; + } + } + } + container violate-set-qos-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container violate-action { + tailf:info "action when rate is greater than conform + "+ + "exceed burst"; + description "action when rate is greater than conform + "+ + "exceed burst"; + tailf:cli-flatten-container; + leaf set-qos-transmit { + tailf:info "set qos-group and send it"; + description "set qos-group and send it"; + type qos_value-type; + } + } + } + container violate-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container violate-action { + tailf:info "action when rate is greater than conform + "+ + "exceed burst"; + description "action when rate is greater than conform + "+ + "exceed burst"; + tailf:cli-flatten-container; + uses police-action-transmit-grouping; + } + } + container violate-drop { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + container violate-action { + tailf:info "action when rate is greater than conform + "+ + "exceed burst"; + description "action when rate is greater than conform + "+ + "exceed burst"; + tailf:cli-flatten-container; + uses police-action-drop-grouping; + } + } + } + + grouping pseudowire-grouping { + // Removed body + } + + grouping random-detect-grouping { + leaf min-threshold { + tailf:cli-drop-node-name; + tailf:cli-incomplete-command; + type uint16 { + range "1..4096"; + tailf:info "<1-4096>;;minimum threshold (number of packets)"; + } + } + leaf max-threshold { + tailf:cli-drop-node-name; + tailf:cli-incomplete-command; + type uint16 { + range "1..4096"; + tailf:info "<1-4096>;;maximum threshold (number of packets)"; + } + } + leaf denominator { + tailf:cli-drop-node-name; + type uint32 { + range "1..65535"; + tailf:info "<1-65535>;;mark probability denominator"; + } + } + } + + +/// ======================================================================== +/// native +/// ======================================================================== + + container native { + tailf:cli-drop-node-name; + container table-map { + tailf:info "Map external entry attributes into routing table"; + tailf:cli-full-command; + description "Map external entry attributes into routing table"; + tailf:display-when "ipv4 or ../../ipv4 or ../ipv4 " + + " or ipv6 or ../../ipv6 or ../ipv6 "; + leaf name { + description "route-map name"; + tailf:cli-drop-node-name; + type string { + tailf:info "WORD;;route-map name"; + } + } + leaf filter { + tailf:info "Selective route download"; + type empty; + } + } + +/// ======================================================================== +/// interface +/// ======================================================================== + + container interface { + tailf:info "Configure interfaces"; + description "Configure interfaces"; + tailf:cli-diff-dependency "/ios:native/vrf"; + tailf:cli-explicit-exit; + + // interface AppNav-Compress + list AppNav-Compress { + tailf:info "Service-Context Virtual Interface Compress"; + description "Service-Context Virtual Interface Compress"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-suppress-key-abbreviation; + key name; + leaf name { + type uint16 { + tailf:info "<1-1000>;;AppNav-Compress interface number"; + range "1..1000"; + } + } + uses interface-common-grouping; + } + // interface AppNav-UnCompress + list AppNav-UnCompress { + tailf:info "Service-Context Virtual Interface UnCompress"; + description "Service-Context Virtual Interface UnCompress"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-suppress-key-abbreviation; + key name; + leaf name { + type uint16 { + tailf:info "<1-1000>;;AppNav-UnCompress interface number"; + range "1..1000"; + } + } + uses interface-common-grouping; + } + + // interface ATM # + list ATM { + tailf:info "ATM interface"; + description "ATM interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-suppress-key-abbreviation; + key name; + leaf name { + type string { + tailf:info "//;;ATM interface number"; + pattern "([0-9]/){2}([0-9]|(ima[0-9]))(:[0-9])?"; + } + } + uses interface-atm-grouping; + } + + // subinterface ATM #.# + container ATM-subinterface { + tailf:cli-drop-node-name; + list ATM { + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-subif"; + tailf:cli-suppress-key-abbreviation; + key name; + leaf name { + type string { + pattern "([0-9]/){2}[0-9]\.([0-9]/){3}[0-9]"; + } + } + uses interface-atm-grouping; + } + } + + // interface ATM-ACR # + list ATM-ACR { + tailf:info "ATM-ACR interface"; + description "ATM-ACR interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-suppress-key-abbreviation; + key name; + leaf name { + type string { + tailf:info "//;;ATM-ACR interface number"; + pattern "[0-9]"; + } + } + uses interface-atm-grouping; + } + + // subinterface ATM-ACR #.# + container ATM-ACRsubinterface { + tailf:cli-drop-node-name; + list ATM-ACR { + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-subif"; + tailf:cli-suppress-key-abbreviation; + key name; + leaf name { + type string { + pattern "[0-9]\.([0-9]/){3}[0-9]"; + } + } + uses interface-atm-grouping; + } + } + // interface BDI + list BDI { + tailf:info "Bridge-Domain interface"; + description "Bridge-Domain interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + key name; + leaf name { + type string { + // pattern "([0-9])+/([0-9])+(/([0-9])+)?"; + tailf:info "<1-16000>;;BDI interface number"; + } + } + uses interface-common-grouping; + } + + // interface CEM # + list CEM { + tailf:info "Circuit Emulation interface"; + description "Circuit Emulation interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-suppress-key-abbreviation; + key name; + leaf name { + type string { + tailf:info "/;;CEM interface number"; + pattern "([0-9]/){2}[0-9]"; + } + } + uses interface-atm-grouping; + } + + // interface CEM-ACR # + list CEM-ACR { + tailf:info "Circuit Emulation interface"; + description "Circuit Emulation interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-suppress-key-abbreviation; + key name; + leaf name { + type uint8 { + tailf:info "<0-255>;;CEM-ACR interface number"; + range "0..255"; + } + } + uses interface-atm-grouping; + } + + // interface Embedded-Service-Engine + list Embedded-Service-Engine { + tailf:info "cisco embedded service engine module"; + description "cisco embedded service engine module"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + // tailf:cli-full-command; + key name; + leaf name { + type string { + tailf:info "<0-2>/<0-0>;;Embedded-Service-Engine interface number"; + } + } + uses interface-common-grouping; + } + + // interface FastEthernet + list FastEthernet { + tailf:info "FastEthernet IEEE 802.3"; + description "FastEthernet IEEE 802.3"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + // tailf:cli-full-command; + key name; + leaf name { + type string { + //pattern "([0-9])+(/([0-9])+)*"; + tailf:info "<0-66>/<0-128>;;FastEthernet interface number"; + } + } + uses interface-ethernet-grouping; + uses interface-common-grouping; + uses interface-zone-member-grouping; + uses interface-switch-grouping; //CATALYST + } + + // interface GigabitEthernet + list GigabitEthernet { + tailf:info "GigabitEthernet IEEE 802.3z"; + description "GigabitEthernet IEEE 802.3z"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + // tailf:cli-full-command; + key name; + leaf name { + type string { + //pattern "([0-9])+(/([0-9])+)*"; + tailf:info "<0-66>/<0-128>;;"+ + "GigabitEthernet interface number"; + } + } + leaf media-type { + tailf:info "Media type"; + description "Media type"; + type enumeration { + enum auto-select { + tailf:info "Use whichever connector is attached"; + } + enum rj45 { + tailf:info "Copper"; + } + enum sfp { + tailf:info "Fiber"; + } + } + } + leaf port-type { + //FIXME: tailf:info + //FIXME: 3600 only? + type enumeration { + enum nni; + } + } + uses interface-ethernet-grouping; + uses interface-common-grouping; + uses interface-zone-member-grouping; + uses interface-switch-grouping; //CATALYST + } + + // interface TenGigabitEthernet + list TenGigabitEthernet { + tailf:info "Ten Gigabit Ethernet"; + description "Ten Gigabit Ethernet"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + // tailf:cli-full-command; + key name; + leaf name { + type string { + //pattern "([0-9])+(/([0-9])+)*"; + tailf:info "<0-66>/<0-128>;;"+ + "TenGigabitEthernet interface number"; + } + } + leaf media-type { + tailf:info "Media type"; + description "Media type"; + type enumeration { + enum auto-select { + tailf:info "Use whichever connector is attached"; + } + enum rj45 { + tailf:info "Copper"; + } + enum sfp { + tailf:info "Fiber"; + } + } + } + leaf port-type { + //FIXME: tailf:info + //FIXME: 3600 only? + type enumeration { + enum nni; + } + } + uses interface-ethernet-grouping; + uses interface-common-grouping; + uses interface-zone-member-grouping; + uses interface-switch-grouping; //CATALYST + } + + // interface Loopback + list Loopback { + // pvh hide Loopback interfaces + // tailf:hidden full; + tailf:info "Loopback interface"; + description "Loopback interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + // tailf:cli-full-command; + key name; + leaf name { + type string { + // pattern "([0-9])+/([0-9])+(/([0-9])+)?"; + tailf:info "<0-2147483647>;;Loopback interface number"; + } + } + uses interface-common-grouping; + } + + list nve { + tailf:info "Network virtualization endpoint interface"; + description "Network virtualization endpoint interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + key name; + leaf name { + type uint16 { + tailf:info "<1-4096>;;nve interface number"; + range "1..4096"; + } + } + + container source-interface { + tailf:info "Specify source interface for NVE"; + description "Specify source interface for NVE"; + // FIXME: tailf:cli-diff-dependency "/ios:native/interface"; + uses interface-grouping; + } + container member { + tailf:cli-incomplete-command; + tailf:cli-sequence-commands; + list vni { + tailf:info "Configure VNI information"; + description "Configure VNI information"; + tailf:cli-sequence-commands; + tailf:cli-compact-syntax; + + key vni-range; + leaf vni-range { + type string { + tailf:info "WORD;;VNI range or instance between 4096-16777215 example: 6010-6030 or 7115"; + } + } + container mcast-group { + tailf:cli-incomplete-command; + tailf:cli-sequence-commands; + leaf multicast-group-min { + tailf:cli-drop-node-name; + tailf:info "Starting Multicast Group IPv4 Address"; + description "Starting Multicast Group IPv4 Address"; + type inet:ipv4-address { + tailf:info "A.B.C.D;;IP address"; + } + } + leaf multicast-group-max { + tailf:cli-drop-node-name; + tailf:info "Ending Multicast Group IPv4 Address"; + description "Ending Multicast Group IPv4 Address"; + type inet:ipv4-address { + tailf:info "A.B.C.D;;IP address"; + } + } + } + } + } + } + + // interface overlay + list overlay { + tailf:info "Overlay interface"; + description "Overlay interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + key name; + leaf name { + type uint16 { + tailf:info "<0-512>;;Overlay interface number"; + range "0..512"; + } + } + uses interface-common-grouping; + uses interface-ethernet-grouping; + uses interface-overlay-grouping; + } + + // interface Port-channel + list Port-channel { + tailf:info "Ethernet Channel of interfaces"; + description "Ethernet Channel of interfaces"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + // tailf:cli-full-command; + key name; + leaf name { + type uint32 { + tailf:info "<1-512>;;Port-channel interface number"; + range "1..512"; + } + } + leaf pc-speed { + tailf:alt-name "speed"; + tailf:info "Configure speed operation."; + description "Configure speed operation."; + type enumeration { + enum "10" { + tailf:info "Force 10 Mbps operation"; + } + enum "100" { + tailf:info "Force 100 Mbps operation"; + } + enum "1000" { + tailf:info "Enable AUTO speed configuration"; + } + enum "nonegotiate" { + //FIXME + } + enum "auto" { + tailf:info "Enable AUTO speed configuration"; + } + } + } + uses interface-common-grouping; + uses interface-switch-grouping; //CATALYST + uses interface-ethernet-grouping; + } + + // subinterface Port-channel #.# + container Port-channel-subinterface { + tailf:cli-drop-node-name; + list Port-channel { + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-subif"; + tailf:cli-suppress-key-abbreviation; + key name; + leaf name { + type string; + } + uses interface-common-grouping; + uses interface-switch-grouping; //CATALYST + uses interface-ethernet-grouping; + } + } + + //interface pseudowire + list pseudowire { + tailf:info "Pseudowire Interface"; + description "Pseudowire Interface"; + tailf:cli-mode-name "config-if"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + key name; + leaf name { + type uint32 { + tailf:info "<1-231072>;;pseudowire interface number"; + range "1..231072"; + } + } + uses pseudowire-grouping; + } + //interface SM + list "SM" { + tailf:info "SM Interface"; + description "SM Interface"; + tailf:cli-mode-name "config-if"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + key name; + leaf name { + type string { + pattern "([0-9])+(/([0-9])+)?"; + } + } + uses interface-common-grouping; + } + //interface Cellular + list Cellular { + tailf:info "Cellular Interface"; + description "Cellular Interface"; + tailf:cli-mode-name "config-if"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + key name; + leaf name { + type string { + pattern "([0-9])+(/([0-9])+)?"; + } + } + uses interface-common-grouping; + uses interface-cellular-grouping; + } + + // interface Vlan + list Vlan { + tailf:info "Catalyst Vlans"; + description "Catalyst Vlans"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + key name; + leaf name { + type uint16 { + tailf:info "<1-4094>;;Vlan interface number"; + range "1..4094"; + } + } + uses interface-common-grouping; + uses interface-zone-member-grouping; + } + + // interface Group-Async + list Group-Async { + tailf:info "Async Group interface"; + description "Async Group interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + key name; + leaf name { + type uint16 { + tailf:info "<0-64>;;Group-Async interface number"; + range "0..64"; + } + } + leaf physical-layer { + tailf:info "Configure sync or async physical layer on serial "+ + "interface"; + description "Configure sync or async physical layer on serial "+ + "interface"; + type enumeration { + enum async { + tailf:info "Configure asynchronous physical layer on serial " + +"interface"; + } + enum sync { + tailf:info "Configure synchronous physical layer on serial "+ + "interface"; + } + } + } + uses interface-common-grouping; + } + + // interface Multilink + list Multilink { + tailf:info "Multilink-group interface"; + description "Multilink-group interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-full-command; + key name; + leaf name { + type uint16 { + tailf:info "<1-65535>;;Multilink interface number"; + range "1..65535"; + } + } + uses interface-common-grouping; + uses interface-pointtopoint-grouping; + } + + // interface Serial + list Serial { + tailf:info "Serial interface"; + description "Serial interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-full-command; + key name; + leaf name { + type string { + pattern "([0-9])+/([0-9])+/([0-9])+\.([0-9])+/([0-9])+/([0-9])+/([0-9])+:([0-9])"; + //FIXME: info + syntax + } + } + uses interface-common-grouping; + uses interface-pointtopoint-grouping; + } + + // interface Tunnel # + list Tunnel { + tailf:info "Tunnel interface"; + description "Tunnel interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-suppress-key-abbreviation; + key name; + leaf name { + type uint32 { + tailf:info "<0-2147483647>;;Tunnel interface number"; + } + } + uses interface-common-grouping; + + // interface Tunnel* / qos + container qos { + tailf:info "Quality of Service related commands"; + description "Quality of Service related commands"; + leaf pre-classify { + tailf:info "Enable QOS classification before packets are tunnel "+ + "encapsulated"; + description "Enable QOS classification before packets are tunnel "+ + "encapsulated"; + type empty; + } + } + + // interface Tunnel* / tunnel + uses interface-tunnel-grouping; + } + + // interface Virtual-Template + list Virtual-Template { + tailf:info "Virtual Template interface"; + description "Virtual Template interface"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-full-command; + tailf:cli-explicit-exit; + key name; + leaf name { + type uint16 { + tailf:info "<1-4095>;;Virtual-Template interface number"; + range "1..4095"; + } + } + leaf type { + tailf:info "type of the virtual-template"; + description "type of the virtual-template"; + tailf:cli-hide-in-submode; + type enumeration { + enum ethernet { + tailf:info "Set VT type as ethernet"; + } + enum serial { + tailf:info "Set VT type as serial"; + } + enum tunnel { + tailf:info "Set VT type as tunnel"; + } + enum vpn { + tailf:info "Set VT type as vpn"; + } + } + } + + uses interface-ethernet-grouping; + uses interface-common-grouping; + uses interface-zone-member-grouping; + uses interface-switch-grouping; //CATALYST + uses interface-pointtopoint-grouping; + // interface Tunnel* / tunnel + uses interface-tunnel-grouping; + } + + // interface VirtualPortGroup + list VirtualPortGroup { + tailf:info "Virtual Port Group"; + description "Virtual Port Group"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-full-command; + tailf:cli-explicit-exit; + key name; + leaf name { + type uint16 { + tailf:info " <0-31>;;VirtualPortGroup interface number"; + range "0..31"; + } + } + uses interface-switch-grouping; //CATALYST + uses interface-ethernet-grouping; + uses interface-common-grouping; + } + // interface vasileft + list vasileft { + tailf:info "vasileft"; + description "vasileft"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-full-command; + tailf:cli-explicit-exit; + key name; + leaf name { + type uint16 { + tailf:info "<1-2000>;;vasileft interface number"; + range "1..2000"; + } + } + uses interface-switch-grouping; //CATALYST + uses interface-ethernet-grouping; + uses interface-common-grouping; + } + + // interface vasiright + list vasiright { + tailf:info "vasiright"; + description "vasiright"; + tailf:cli-allow-join-with-key { + tailf:cli-display-joined; + } + tailf:cli-mode-name "config-if"; + tailf:cli-full-command; + tailf:cli-explicit-exit; + key name; + leaf name { + type uint16 { + tailf:info "<1-2000>;;vasiright interface number"; + range "1..2000"; + } + } + uses interface-switch-grouping; //CATALYST + uses interface-ethernet-grouping; + uses interface-common-grouping; + } + } + + +/// ======================================================================== +/// mls +/// ======================================================================== +/// Note: must come before class-map and policy-map. + + container mls { + tailf:info "mls global commands"; + description "mls global commands"; + tailf:cli-incomplete-no; + + // mls acl + container acl { + tailf:info "MLS ACL operation"; + description "MLS ACL operation"; + // mls acl tcam + container tcam { + tailf:info "ACL TCAM"; + description "ACL TCAM"; + leaf default-result { + tailf:info "Default result to be used during tcam programming"; + description "Default result to be used during tcam programming"; + type enumeration { + enum bridge { + tailf:info "Bridge result"; + } + enum deny { + tailf:info "Deny result"; + } + enum permit { + tailf:info "Permit result"; + } + } + } + container log-update { + tailf:info "Log TCAM updates"; + description "Log TCAM updates"; + presence true; + leaf rate-limit-msg { + tailf:info "Enable/Disable syslog ratelimiting"; + description "Enable/Disable syslog ratelimiting"; + type enumeration { + enum disable { + tailf:info "Disable ratelimiting syslog"; + } + enum enable { + tailf:info "Enable syslog ratelimiting at 1 per second"; + } + } + } + } + leaf share-global { + tailf:info "share global deny or permit any entries"; + description "share global deny or permit any entries"; + tailf:cli-boolean-no; + tailf:cli-trim-default; + type boolean; + default true; + } + } + } + + // aging L3 aging + // mls cef + container cef { + tailf:info "cef keyword"; + description "cef keyword"; + container error { + leaf action { + type enumeration { + enum reset; + } + } + } + // maximum-routes Configure route allocation for protocols + // tunnel Allow tunnel fragmentation + } + // erm FIB Exception Recovery Manager + // exclude exclude keyword + // mls flow + container flow { + tailf:info "flowmask keyword"; + description "flowmask keyword"; + leaf ip { + tailf:info "flowmask ip keyword"; + description "flowmask ip keyword"; + type enumeration { + enum interface-destination { + tailf:info "interface-destination flow keyword"; + } + enum interface-destination-source { + tailf:info "interface-destination-source flow keyword"; + } + enum interface-full { + tailf:info "interface-full flow keyword"; + } + enum interface-source { + tailf:info "interface-source only flow keyword"; + } + } + } + } + // mls ip + container ip { + tailf:info "ip keyword"; + description "ip keyword"; + // cef cef keyword + // inspect inspect + // mls ip multicast + container multicast { + tailf:info "multicast keyword"; + description "multicast keyword"; + tailf:cli-display-separated; + presence true; + // bidir Bidir commands + // connected Enable download of interface/mask entry + container consistency-check { + tailf:info "Set consistency checking characteristics"; + description "Set consistency checking characteristics"; + presence true; + leaf settle-time { + tailf:info "Settle time for entry/oif for consistancy-checker"; + description "Settle time for entry/oif for consistancy-checker"; + type uint16 { + tailf:info "<2-3600>;;Settle time for entry/oif in seconds"; + range "2..3600"; + } + } + // type Set consistency checker type + } + // egress Set egress replication options + leaf flow-stat-timer { + tailf:info "timer for flow statistic used by mls-msc and mlsm"; + description "timer for flow statistic used by mls-msc and mlsm"; + type uint8 { + tailf:info "<1-100>;;#seconds between one batch and another"; + range "1..100"; + } + } + // met-optimization Enable or disable met optimisation + // non-rpf Enable rate-limiting of non-RPF traffic + // replication-mode Disable auto-detection mode for egress + // sso Stateful switchover parameters + // threshold Threshold rate for installing h/w shortcuts + } + // nat nat keyword + // slb Server Load Balancing + } + // nde netflow data export (nde) keyword + // netflow netflow keyword + // mls qos + container mls-qos-conf { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + leaf qos { + type empty; + } + } + // mls qos + container qos { + tailf:info "QoS parameters"; + description "QoS parameters"; + tailf:cli-incomplete-command; + tailf:cli-incomplete-no; + // mls qos aggregate-policer * + list aggregate-policer { + tailf:info "Assign aggregate policer"; + description "Assign aggregate policer"; + tailf:cli-suppress-mode; + tailf:cli-delete-when-empty; + tailf:cli-compact-syntax; + tailf:cli-sequence-commands { + tailf:cli-reset-all-siblings; + } + key name; + leaf name { + type string { + tailf:info "WORD;;aggregate policer name"; + } + } + leaf target-bit-rate { + tailf:cli-drop-node-name; + type uint64 { + tailf:info "<32000-60000000000>;;Target Bit Rate (bits per " + +"second) (postfix k, m, g optional; decimal point allowed)"; + range "32000..60000000000"; + } + } + leaf burst-normal { + tailf:cli-drop-node-name; + tailf:cli-optional-in-sequence; + type uint32 { + tailf:info "<1000-31250000>;;Normal burst bytes"; + range "1000..31250000"; + } + } + leaf burst-max { + tailf:cli-drop-node-name; + tailf:cli-optional-in-sequence; + when "../burst-normal" { + tailf:dependency "../burst-normal"; + } + type uint32 { + tailf:info "<1000-31250000>;;Maximum burst bytes"; + range "1000..31250000"; + } + } + leaf pir { + tailf:info "PIR"; + description "PIR"; + tailf:cli-optional-in-sequence; + type uint64 { + tailf:info "<32000-60000000000>;;Target Bit Rate (bits per " + +"second) (postfix k, m, g optional; decimal point allowed)"; + range "32000..60000000000"; + } + } + container conform-action { + tailf:info "action when rate is not exceeded"; + description "action when rate is not exceeded"; + tailf:cli-optional-in-sequence; + tailf:cli-compact-syntax; + tailf:cli-flatten-container; + choice action-choice { + leaf drop { + tailf:info "drop packet"; + description "drop packet"; + type empty; + } + leaf set-dscp-transmit { + tailf:info "set dscp and send it"; + description "set dscp and send it"; + type dscp-type; + } + leaf set-mpls-exp-imposition-transmit { + tailf:info "set exp at tag imposition and send it"; + description "set exp at tag imposition and send it"; + type uint8 { + tailf:info "<0-7>;;new exp"; + range "0..7"; + } + } + leaf set-prec-transmit { + tailf:info "rewrite packet precedence and send it"; + description "rewrite packet precedence and send it"; + type uint8 { + tailf:info "<0-7>;;new precedence"; + range "0..7"; + } + } + leaf transmit { + tailf:info "transmit packet"; + description "transmit packet"; + type empty; + } + } + } + leaf exceed-action { + tailf:info "action when rate is exceeded"; + description "action when rate is exceeded"; + tailf:cli-optional-in-sequence; + type enumeration { + enum drop { + tailf:info "drop packet"; + } + enum policed-dscp-transmit { + tailf:info "change dscp per policed-dscp map and send it"; + } + enum transmit { + tailf:info "transmit packet"; + } + } + } + leaf violate-action { + tailf:info "action when rate violated"; + description "action when rate violated"; + type enumeration { + enum drop { + tailf:info "drop packet"; + } + enum policed-dscp-transmit { + tailf:info "change dscp per policed-dscp map and send it"; + } + enum transmit { + tailf:info "transmit packet"; + } + } + } + } + // map Define QoS mapping + // mls qos map + container map { + tailf:info "qos map keyword"; + description "qos map keyword"; + leaf-list cos-dscp { + tailf:info "cos-dscp map: eight dscp values for cos 0-7"; + description "cos-dscp map: eight dscp values for cos 0-7"; + tailf:cli-flat-list-syntax; + //max-elements 8; + type uint8 { + tailf:info "<0-63>;;CoS values separated by spaces (up to 8 values total)"; + range "0..63"; + } + } + leaf-list policed-dscp { + tailf:info "policed-dscp map keyword"; + description "policed-dscp map keyword"; + ordered-by user; + tailf:cli-flat-list-syntax; + type union { + type uint8 { + tailf:info "<0-63>;;DSCP values separated by spaces (up to 8 values total)"; + range "0..63"; + } + type enumeration { + enum to { + tailf:info "to keyword"; + } + } + } + } + } + // marking marking keyword + // police police keyword + // protocol protocol keyword + // queueing-only queueing-only (no QoS rewrite, no policing) + // recirc recirculate path + // mls qos rewrite + container rewrite { + tailf:info "packet qos rewrite enable/disable"; + description "packet qos rewrite enable/disable"; + container ip { + tailf:info "ip packet qos rewrite enable/disable"; + description "ip packet qos rewrite enable/disable"; + container dscp { + tailf:info "packet ip dscp rewrite enable/disable"; + description "packet ip dscp rewrite enable/disable"; + presence true; + leaf slot { + tailf:info "slot number"; + description "slot number"; + type string { + tailf:info "WORD;;Slots seperated by commas. Valid slots: 1,2," + +"3,4,5,6,7,8,9"; + } + } + } + } + } + // mls qos queue-set + container queue-set { + tailf:info "Choose a queue set for this queue"; + description "Choose a queue set for this queue"; + container output { + tailf:info "Direction the command applies for this command"; + description "Direction the command applies for this command"; + tailf:cli-sequence-commands; + tailf:cli-compact-syntax; + leaf queue-set-id { + tailf:cli-drop-node-name; + type uint8 { + tailf:info "<1-2>;;queue-set id"; + range "1..2"; + } + } + list threshold { + tailf:info "Assign threshold values to a queue"; + description "Assign threshold values to a queue"; + tailf:cli-suppress-mode; + tailf:cli-break-sequence-commands; + tailf:cli-compact-syntax; + tailf:cli-sequence-commands; + key queue-id; + leaf queue-id { + type uint8 { + tailf:info "<1-4>;;enter queue id in this queue set"; + range "1..4"; + } + } + leaf drop1 { + tailf:cli-drop-node-name; + description "drop threshold1 1-3200"; + type uint32 { + tailf:info "<1-3200>;;enter drop threshold1 1-3200"; + range "1..3200"; + } + } + leaf drop2 { + tailf:cli-drop-node-name; + description "drop threshold2 1-3200"; + type uint32 { + tailf:info "<1-3200>;;enter drop threshold2 1-3200"; + range "1..3200"; + } + } + leaf reserved { + tailf:cli-drop-node-name; + description "reserved threshold 1-100"; + type uint32 { + tailf:info "<1-3200>;;enter drop threshold2 1-3200"; + range "1..3200"; + } + } + leaf maximum { + tailf:cli-drop-node-name; + description "maximum threshold1 1-3200"; + type uint32 { + tailf:info "<1-3200>;;enter maximum threshold1 1-3200"; + range "1..3200"; + } + } + } + leaf-list buffers { + tailf:info "assign buffers to each egress queue"; + description "assign buffers to each egress queue"; + tailf:cli-flat-list-syntax; + type uint16 { + tailf:info "<0-99>/<1-100>;;enter buffer percentage for queue x 0-99/2 1-100"; + range "0..100"; + } + } + } + } + // mls qos srr-queue + container srr-queue { + tailf:info "Configure SRR receive queues"; + description "Configure SRR receive queues"; + container input { + tailf:info "input keyword"; + description "input keyword"; + leaf-list bandwidth { + tailf:info "Configure SRR bandwidth"; + description "Configure SRR bandwidth"; + tailf:cli-flat-list-syntax; + type uint8 { + tailf:info "<1-100>;;enter bandwidth weight for queue id x"; + range "1..100"; + } + } + list threshold { + tailf:info "Configure queue tail-drop thresholds"; + description "Configure queue tail-drop thresholds"; + tailf:cli-suppress-mode; + key queue-id; + leaf queue-id { + type uint8 { + tailf:info "<1-2>;;enter threshold queue id (1-2)"; + range "1..2"; + } + } + leaf-list queue-size-percent { + tailf:cli-drop-node-name; + tailf:cli-flat-list-syntax; + type uint8 { + tailf:info "<1-100>;;enter percent of queue size for threshold x"; + range "1..100"; + } + } + } + list priority-queue { + tailf:info "Configure priority scheduling"; + description "Configure priority scheduling"; + tailf:cli-suppress-mode; + key queue-number; + leaf queue-number { + type uint8 { + tailf:info "<1-2>;;enter priority queue number [1-2]"; + } + } + leaf bandwidth { + tailf:info "ingress priority queue bandwidth % of stack ring"; + description "ingress priority queue bandwidth % of stack ring"; + type uint8 { + tailf:info "<0-40>;;enter bandwidth number [0-40]"; + range "0..40"; + } + } + } + list cos-map { + tailf:info "Configure cos-map for a queue id"; + description "Configure cos-map for a queue id"; + tailf:cli-suppress-mode; + key "queue threshold"; + leaf queue { + tailf:info "Assign COS values to a queue"; + description "Assign COS values to a queue"; + tailf:cli-expose-key-name; + type uint8 { + tailf:info "<1-4>;;enter cos-map output queue id"; + range "1..4"; + } + } + leaf threshold { + tailf:info "Assign COS values to a queue threshold"; + description "Assign COS values to a queue threshold"; + tailf:cli-expose-key-name; + type uint8 { + tailf:info "<1-3>;;enter cos-map threshold id"; + range "1..3"; + } + } + leaf-list cos { + tailf:cli-drop-node-name; + tailf:cli-flat-list-syntax; + max-elements 8; + type uint8 { + tailf:info "<0-7>;;8 cos values separated by spaces"; + range "0..7"; + } + } + } + list dscp-map { + tailf:info "Configure dscp-map for a queue id"; + description "Configure dscp-map for a queue id"; + tailf:cli-suppress-mode; + key "queue threshold"; + leaf queue { + tailf:info "Assign DSCP values to a queue"; + description "Assign DSCP values to a queue"; + tailf:cli-expose-key-name; + type uint8 { + tailf:info "<1-4>;;enter dscp-map output queue id"; + range "1..4"; + } + } + leaf threshold { + tailf:info "Assign DSCP values to a queue threshold"; + description "Assign DSCP values to a queue threshold"; + tailf:cli-expose-key-name; + type uint8 { + tailf:info "<1-3>;;enter dscp-map threshold id"; + range "1..3"; + } + } + leaf-list dscp { + tailf:cli-drop-node-name; + tailf:cli-flat-list-syntax; + max-elements 8; + type uint8 { + tailf:info "<0-63>;;dscp values separated by spaces (up to 8 values total)"; + range "0..63"; + } + } + } + } + container output { + tailf:info "output keyword"; + description "output keyword"; + list cos-map { + tailf:info "Configure cos-map for a queue id"; + description "Configure cos-map for a queue id"; + tailf:cli-suppress-mode; + key "queue threshold"; + leaf queue { + tailf:info "Assign COS values to a queue"; + description "Assign COS values to a queue"; + tailf:cli-expose-key-name; + type uint8 { + tailf:info "<1-4>;;enter cos-map output queue id"; + range "1..4"; + } + } + leaf threshold { + tailf:info "Assign COS values to a queue threshold"; + description "Assign COS values to a queue threshold"; + tailf:cli-expose-key-name; + type uint8 { + tailf:info "<1-3>;;enter cos-map threshold id"; + range "1..3"; + } + } + leaf-list cos { + tailf:cli-drop-node-name; + tailf:cli-flat-list-syntax; + max-elements 8; + type uint8 { + tailf:info "<0-7>;;8 cos values separated by spaces"; + range "0..7"; + } + } + } + list dscp-map { + tailf:info "Configure dscp-map for a queue id"; + description "Configure dscp-map for a queue id"; + tailf:cli-suppress-mode; + key "queue threshold"; + leaf queue { + tailf:info "Assign DSCP values to a queue"; + description "Assign DSCP values to a queue"; + tailf:cli-expose-key-name; + type uint8 { + tailf:info "<1-4>;;enter dscp-map output queue id"; + range "1..4"; + } + } + leaf threshold { + tailf:info "Assign DSCP values to a queue threshold"; + description "Assign DSCP values to a queue threshold"; + tailf:cli-expose-key-name; + type uint8 { + tailf:info "<1-3>;;enter dscp-map threshold id"; + range "1..3"; + } + } + leaf-list dscp { + tailf:cli-drop-node-name; + tailf:cli-flat-list-syntax; + max-elements 8; + type uint8 { + tailf:info "<0-63>;;dscp values separated by spaces (up to 8 values total)"; + range "0..63"; + } + } + } + } + } + } + // statistics-export qos statistics data export + // mls rate-limit + container rate-limit { + tailf:info "Rate limit different behaviors"; + description "Rate limit different behaviors"; + // all Rate Limiting for both Unicast and Multicast packets + container layer2 { + tailf:info "layer2 protocol cases"; + description "layer2 protocol cases"; + // ip-admission IP admission on Layer2 ports + container l2pt { + tailf:cli-compact-syntax; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + tailf:info "layer2 protocol tunnelling packets"; + leaf packets-per-second { + description "layer2 protocol tunnelling packets"; + tailf:cli-drop-node-name; + type uint32 { + tailf:info "<10-1000000>;;packets per second"; + range "10..1000000"; + } + } + leaf packets-in-burst { + tailf:cli-drop-node-name; + type uint32 { + tailf:info "<1-255>;;packets in burst"; + range "1..255"; + } + } + } + // mac-security Mac security traffics + container pdu { + tailf:info "layer2 protocol data unit packets"; + description "layer2 protocol data unit packets"; + tailf:cli-compact-syntax; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + leaf packets-per-second { + tailf:cli-drop-node-name; + type uint32 { + tailf:info "<10-1000000>;;packets per second"; + range "10..1000000"; + } + } + leaf packets-in-burst { + tailf:cli-drop-node-name; + type uint32 { + tailf:info "<1-255>;;packets in burst"; + range "1..255"; + } + } + } + // port-security Port security traffics + } + // multicast Rate limiting for Multicast packets + // unicast Rate limiting for Unicast packets + } + // rp rp + // sampling sampling keyword + // mls verify + container verify { + tailf:info "enable hardware packet parsing error checks"; + description "enable hardware packet parsing error checks"; + container ip { + tailf:info "check on IP packets"; + description "check on IP packets"; + leaf checksum { + tailf:info "check for packet checksum errors"; + description "check for packet checksum errors"; + tailf:cli-boolean-no; + tailf:cli-trim-default; + type boolean; + default true; + } + container "length" { + tailf:info "check for packet length errors"; + description "check for packet length errors"; + leaf consistent { + tailf:info "check length in header against physical frame length"; + description "check length in header against physical frame length"; + tailf:cli-boolean-no; + tailf:cli-trim-default; + type boolean; + default true; + } + leaf minimum { + tailf:info "check for minimum packet length"; + description "check for minimum packet length"; + tailf:cli-boolean-no; + tailf:cli-trim-default; + type boolean; + default true; + } + } + leaf same-address { + tailf:info "check for packet having equal source and destination IP " + +"addresses"; + description "check for packet having equal source and destination IP " + +"addresses"; + type empty; + } + leaf syslog { + tailf:info "syslog packet parse errors"; + description "syslog packet parse errors"; + type empty; + } + } + } + } + +/// ======================================================================== +/// policer +/// ======================================================================== +// Note: must come before class-map and policy-map. + + container policer { + tailf:info "Switch policer"; + description "Switch policer"; + // policer aggregate * + list aggregate { + tailf:info "Named aggregate policer"; + description "Named aggregate policer"; + tailf:cli-suppress-mode; + tailf:cli-delete-when-empty; + tailf:cli-compact-syntax; + tailf:cli-reset-container; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + key name; + leaf name { + type string { + tailf:info "WORD;;aggregate policer Name"; + } + } + // cir + leaf cir { + tailf:info "Committed information rate"; + description "Committed information rate"; + type uint32 { + tailf:info "<8000-1000000000>;;Bits per second"; + range "8000..1000000000"; + } + } + // bc + leaf bc { + tailf:info "Conform burst"; + description "Conform burst"; + tailf:cli-optional-in-sequence; + type uint32 { + tailf:info "<8000-1000000000>;;Burst bytes"; + range "8000..1000000000"; + } + } + // conform-action + leaf conform-action { + tailf:info "action when rate is within conform and conform + "+ + "exceed burst"; + description "action when rate is within conform and conform + "+ + "exceed burst"; + tailf:cli-optional-in-sequence; + type empty; + } + leaf set-qos-transmit { + tailf:info "set qos-group and send it"; + description "set qos-group and send it"; + when "../conform-action"; + tailf:cli-optional-in-sequence; + type uint8 { + tailf:info "<0-99>;;new qos-group"; + range "0..99"; + } + } + leaf set-dot1ad-dei-transmit { + tailf:info "set dei and send it"; + description "set dei and send it"; + when "../conform-action"; + tailf:cli-optional-in-sequence; + type uint8 { + tailf:info "<0-1>;;new dei value"; + range "0..1"; + } + } + leaf set-prec-transmit { + tailf:info "rewrite packet precedence and send it"; + description "rewrite packet precedence and send it"; + when "../conform-action"; + tailf:cli-optional-in-sequence; + type prec_value-type; + } + container set-prec-transmit-table { + when "../set-prec-transmit"; + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-optional-in-sequence; + tailf:cli-flatten-container; + leaf table { + tailf:info "Set packet cos from cos based on table map"; + description "Set packet cos from cos based on table map"; + tailf:cli-optional-in-sequence; + type string; + tailf:non-strict-leafref { + path "/ios:native/table-map/name"; + } + } + } + leaf set-dscp-transmit { + tailf:info "set dscp and send it"; + description "set dscp and send it"; + when "../conform-action"; + tailf:cli-optional-in-sequence; + type dscp-type; + } + container set-dscp-transmit-table { + when "../set-dscp-transmit"; + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-optional-in-sequence; + tailf:cli-flatten-container; + leaf table { + tailf:info "Set packet cos from cos based on table map"; + description "Set packet cos from cos based on table map"; + tailf:cli-optional-in-sequence; + type string; + tailf:non-strict-leafref { + path "/ios:native/table-map/name"; + } + } + } + leaf set-cos-transmit { + tailf:info "set cos and send it"; + description "set cos and send it"; + when "../conform-action"; + tailf:cli-optional-in-sequence; + type cos_value-type; + } + container set-cos-transmit-table { + when "../set-cos-transmit"; + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-optional-in-sequence; + tailf:cli-flatten-container; + leaf table { + tailf:info "Set packet cos from cos based on table map"; + description "Set packet cos from cos based on table map"; + tailf:cli-optional-in-sequence; + type string; + tailf:non-strict-leafref { + path "/ios:native/table-map/name"; + } + } + } + leaf transmit { + tailf:info "transmit packet"; + description "transmit packet"; + when "../conform-action"; + tailf:cli-optional-in-sequence; + type empty; + } + // exceed-action + leaf exceed-action { + tailf:info "action when rate is within conform and conform + "+ + "exceed burst"; + description "action when rate is within conform and conform + "+ + "exceed burst"; + type empty; + } + leaf drop { + tailf:info "drop packet"; + description "drop packet"; + when "../exceed-action"; + tailf:cli-optional-in-sequence; + tailf:cli-full-command; + type empty; + } + container exceed-transmit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-optional-in-sequence; + tailf:cli-flatten-container; + leaf transmit { + tailf:info "transmit packet"; + description "transmit packet"; + when "../../exceed-action"; + tailf:cli-optional-in-sequence; + type empty; + } + } + } + } + +/// ======================================================================== +/// class-map +/// ======================================================================== + + list class-map { + tailf:info "Configure QoS Class Map"; + description "Configure QoS Class Map"; + tailf:cli-mode-name "config-cmap"; + tailf:cli-suppress-list-no; + tailf:cli-delete-when-empty; + tailf:cli-no-key-completion; + // class-map * + key name; + leaf name { + type string { + tailf:info "WORD;;class-map name"; + } + tailf:cli-disallow-value "type"; + } + // class-map * type inspect + leaf "type" { + tailf:info "type of the class-map"; + description "type of the class-map"; + tailf:cli-prefix-key; + type enumeration { + enum access-control { + tailf:info "access-control specific class-map"; + } + enum appnav { + tailf:info "Configure a APPNAV Class Map"; + } + enum control { + tailf:info "Configure a control policy class-map"; + } + enum inspect { + tailf:info "Configure Firewall Class Map"; + } + enum multicast-flows { + tailf:info "multicast class-maps"; + } + enum stack { + tailf:info "class-map for protocol header stack specification"; + } + enum traffic { + tailf:info "Configure a subscriber policy traffic classmap"; + } + } + } + // class-map * + leaf protocol { + when "../type = 'inspect'"; + tailf:cli-drop-node-name; + tailf:cli-prefix-key; + type enumeration { + enum aol { + tailf:info "Configure CBAC class-map for IM-AOL protocol"; + } + enum edonkey { + tailf:info "eDonkey"; + } + enum fasttrack { + tailf:info "FastTrack Traffic - KaZaA, Morpheus, Grokster..."; + } + enum gnutella { + tailf:info "Gnutella Version2 Traffic - BearShare, Shareeza, " + +"Morpheus ..."; + } + enum http { + tailf:info "Configure CBAC class-map for HTTP protocol"; + } + enum imap { + tailf:info "Configure CBAC class-map for IMAP protocol"; + } + enum kazaa2 { + tailf:info "Kazaa Version 2"; + } + enum msnmsgr { + tailf:info "Configure CBAC class-map for IM-MSN protocol"; + } + enum pop3 { + tailf:info "Configure CBAC class-map for POP3 protocol"; + } + enum smtp { + tailf:info "Configure CBAC class-map for SMTP protocol"; + } + enum sunrpc { + tailf:info "Configure CBAC class-map for RPC protocol"; + } + enum ymsgr { + tailf:info "Configure CBAC class-map for IM-YAHOO protocol"; + } + } + } + // class-map * + leaf prematch { + tailf:cli-no-keyword; + tailf:cli-prefix-key; + tailf:cli-drop-node-name; + type enumeration { + enum match-all { + tailf:info "Logical-AND all matching statements under "+ + "this classmap"; + } + enum match-any { + tailf:info "Logical-OR all matching statements under this "+ + "classmap"; + } + } + mandatory true; + } + // class-map * / description + leaf "description" { + tailf:info "Class-Map description"; + description "Class-Map description"; + tailf:cli-multi-value; + type string { + tailf:info "LINE;;Description of this class-map (up to 200 "+ + "characters)"; + } + } + // class-map * / match + container match { + tailf:info "classification criteria"; + description "classification criteria"; + uses class-map-match-grouping; + uses class-map-appnav-match-grouping; + container not { + tailf:info "Negate this match result"; + description "Negate this match result"; + uses class-map-match-grouping; + uses class-map-appnav-not-match-grouping; + } + } + } + +/// ======================================================================== +/// policy-map +/// ======================================================================== + + list policy-map { + tailf:info "Configure QoS Policy Map"; + description "Configure QoS Policy Map"; + tailf:cli-mode-name "config-pmap"; + tailf:cli-diff-dependency "/ios:native/class-map"; + tailf:cli-diff-dependency "/ios:native/table-map"; + tailf:cli-diff-dependency "/ios:native/mls/qos/aggregate-policer"; + tailf:cli-diff-dependency "/ios:native/policer/aggregate"; + key name; + leaf name { + type string { + tailf:info "WORD;;policy-map name"; + } + tailf:cli-disallow-value + "(type)|(http)|(im)|(imap)|(p2p)|(pop3)|(smtp)|(sunrpc)"; + } + leaf "type" { + tailf:info "type of the policy-map"; + description "type of the policy-map"; + tailf:cli-prefix-key; + type enumeration { + enum access-control { + tailf:info "access-control specific policy-map"; + } + enum appnav { + tailf:info "Configure a APPNAV Policy Map"; + } + enum inspect { + tailf:info "Configure Firewall Policy Map"; + } + enum packet-service { + tailf:info "Configure Packet Service Policy Map"; + } + enum performance-monitor { + tailf:info "Performance monitoring policy-map type"; + } + enum service { + tailf:info "policymap service configuration"; + } + enum service-chain { + tailf:info "Configure Service Chain Policy Map"; + } + } + } + leaf protocol { + when "../type = 'inspect'"; + tailf:cli-drop-node-name; + tailf:cli-prefix-key; + type enumeration { + enum http { + tailf:info "Configure CBAC policy-map for HTTP protocol"; + } + enum im { + tailf:info "Configure CBAC policy-map for IM protocol"; + } + enum imap { + tailf:info "Configure CBAC policy-map for IMAP protocol"; + } + enum p2p { + tailf:info "Configure CBAC policy-map for P2P protocols"; + } + enum pop3 { + tailf:info "Configure CBAC policy-map for POP3 protocol"; + } + enum smtp { + tailf:info "Configure CBAC policy-map for SMTP protocol"; + } + enum sunrpc { + tailf:info "Configure CBAC policy-map for RPC protocol"; + } + } + } + // policy-map * / class * + list class { + tailf:info "policy criteria"; + description "policy criteria"; + tailf:cli-mode-name "config-pmap-c"; + key name; + leaf name { + tailf:cli-disallow-value "type"; + type class-name-type; + } + // policy-map * / class * / type + leaf "type" { + tailf:info "type of the class-map"; + description "type of the class-map"; + tailf:cli-prefix-key; + type enumeration { + enum inspect { + tailf:info "Configure CBAC Class Map"; + } + } + } + leaf insert-before { + tailf:info "Insert the class before a specified class"; + description "Insert the class before a specified class"; + tailf:cli-hide-in-submode; + when "../../type = 'appnav'"; + type string { + tailf:info "WORD;;Insert the class before a specified class"; + } + } + // policy-map * / class * / appnav policy + container appnav-policy { + when "../../type = 'appnav'"; + tailf:cli-drop-node-name; + list distribute { + tailf:info "Distribute action"; + description "Distribute action"; + tailf:cli-suppress-mode; + key service-node-group; + leaf service-node-group { + tailf:info "Distribute to service-node-group"; + description "Distribute to service-node-group"; + tailf:cli-expose-key-name; + type string { + tailf:info "WORD;;service-node-group name"; + } + } + leaf insert-before { + tailf:info "Insert before specific node"; + description "Insert before specific node"; + tailf:cli-optional-in-sequence; + type string { + tailf:info "WORD;;service-node-group name"; + } + } + } + leaf monitor-load { + tailf:info "Monitor AO"; + description "Monitor AO"; + when "../distribute"; + type enumeration { + enum MS-port-mapper { + tailf:info "Monitor Microsoft Endpoint Port Mapper load"; + } + enum cifs { + tailf:info "Monitor CIFS Accelerator load"; + } + enum http { + tailf:info "Monitor HTTP Accelerator load"; + } + enum ica { + tailf:info "Monitor ICA Accelerator load"; + } + enum mapi { + tailf:info "Monitor MAPI Accelerator load"; + } + enum nfs { + tailf:info "Monitor NFS Accelerator load"; + } + enum ssl { + tailf:info "Monitor SSL accelerator load"; + } + enum video { + tailf:info "Monitor Video Accelerator load"; + } + } + } + leaf pass-through { + tailf:info "pass-through action"; + description "pass-through action"; + type empty; + } + } + // policy-map * / class * / inspect policy + container policy { + when "../../type = 'inspect'"; + tailf:cli-drop-node-name; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + leaf action { + tailf:cli-drop-node-name; + tailf:cli-remove-before-change; + type enumeration { + enum cxsc { + tailf:info "CXSC Inspection"; + } + enum drop { + tailf:info "Drop the packet"; + } + enum inspect { + tailf:info "Context-based Access Control Engine"; + } + enum pass { + tailf:info "Pass the packet"; + } + enum service-policy { + tailf:info "Deep Packet Inspection Engine"; + } + } + } + leaf log { + tailf:info "Send logging message for drop or pass"; + description "Send logging message for drop or pass"; + when "../action = 'drop'or ../action = 'pass'"; + type empty; + } + leaf parameter-map { + tailf:cli-drop-node-name; + when "../action = 'inspect' or ../action = 'cxsc'"; + type string; + tailf:non-strict-leafref { + path "/ios:native/parameter-map/name"; + } + } + container dpi { + tailf:cli-drop-node-name; + when "../action = 'service-policy'"; + tailf:cli-sequence-commands; + tailf:cli-compact-syntax; + leaf type { + tailf:cli-drop-node-name; + type enumeration { + enum gtpv0 { + tailf:info "GTPv0 DPI"; + } + enum gtpv1 { + tailf:info "GTPv1 DPI"; + } + enum imap { + tailf:info "IMAP DPI"; + } + enum pop3 { + tailf:info "POP3 DPI"; + } + enum smtp { + tailf:info "SMTP DPI"; + } + enum sunrpc { + tailf:info "RPC DPI"; + } + } + } + leaf policy-map { + tailf:cli-drop-node-name; + type string { + tailf:info "WORD;;DPI policy-map name"; + } + } + } + } + // policy-map * / class * / performance-monitor policy + container pm-policy { + when "../../type = 'performance-monitor'"; + tailf:cli-drop-node-name; + container flow { + tailf:info "Flow subcommands"; + description "Flow subcommands"; + leaf monitor { + tailf:info "Apply a Flow Monitor"; + description "Apply a Flow Monitor"; + type string { + tailf:info "WORD;;Flow monitor name"; + } + } + } + container monitor { + tailf:info "Monitor related parameters"; + description "Monitor related parameters"; + container metric { + tailf:info "Monitor metric"; + description "Monitor metric"; + container rtp { + tailf:info "RTP metrics parameters"; + description "RTP metrics parameters"; + tailf:cli-add-mode; + tailf:cli-mode-name "config-pmap-c-mrtp"; + list clock-rate { + tailf:info "RTP timestamp field's sampling frequency"; + description "RTP timestamp field's sampling frequency"; + tailf:cli-suppress-mode; + tailf:cli-sequence-commands; + tailf:cli-compact-syntax; + key number; + leaf number { + type union { + type uint8 { + tailf:info "<0-127>;;payload type number"; + range "0..127"; + } + type enumeration { + enum celb { + tailf:info "CELB(25)"; + } + enum cn { + tailf:info "CN(13)"; + } + enum default { + tailf:info "Change the default clock rate for all the dynamic payload type"; + } + enum dvi4 { + tailf:info "DVI4 RFC-3551 8000Hz(5)"; + } + enum dvi4-2 { + tailf:info "DVI4 RFC-3551 16000Hz(6)"; + } + enum dvi4-3 { + tailf:info "DVI4 Dipol 11025Hz(16)"; + } + enum dvi4-4 { + tailf:info "DVI4 Dipol 22050Hz(17)"; + } + enum g722 { + tailf:info "G722(9)"; + } + enum g723 { + tailf:info "G723(4)"; + } + enum g728 { + tailf:info "G728(15)"; + } + enum g729 { + tailf:info "G729(18)"; + } + enum gsm { + tailf:info "GSM(3)"; + } + enum h261 { + tailf:info "H261(31)"; + } + enum h263 { + tailf:info "H263(34)"; + } + enum jpeg { + tailf:info "JPEG(26)"; + } + enum l16 { + tailf:info "L16 channel 1(11)"; + } + enum l16-2 { + tailf:info "L16 channel 2(10)"; + } + enum lpc { + tailf:info "LPC(7)"; + } + enum mp2t { + tailf:info "MP2T(33)"; + } + enum mpa { + tailf:info "MPA(14)"; + } + enum mpv { + tailf:info "MPV(32)"; + } + enum nv { + tailf:info "NV(28)"; + } + enum pcma { + tailf:info "PCMA(8)"; + } + enum pcmu { + tailf:info "PCMU(0)"; + } + enum qcelp { + tailf:info "QCELP(12)"; + } + } + } + } + leaf frequency { + tailf:cli-drop-node-name; + type uint32 { + tailf:info "<1000-192000>;;frequency in Hz"; + range "1000..192000"; + } + } + } + } + } + } + list react { + tailf:info "Configure threshold crossing actions"; + description "Configure threshold crossing actions"; + tailf:cli-mode-name "config-pmap-c-react"; + key id; + leaf id { + type uint16 { + tailf:info "<1-65535> React instance id"; + } + } + leaf mode { + tailf:cli-drop-node-name; + tailf:cli-hide-in-submode; + type enumeration { + enum media-stop { + tailf:info "Media stream stopped"; + } + enum mrv { + tailf:info "Variation in packet rate from configured expected rate"; + } + enum rtp-jitter-average { + tailf:info "Mean jitter for the RTP stream"; + } + enum transport-packets-lost-rate { + tailf:info "Ratio of lost packets to total reaceived packets"; + } + } + } + leaf description { + tailf:info "Description for threshold crossing action instance"; + description "Description for the instance"; + tailf:cli-multi-value; + type string; + } + container action { + tailf:info "Config react action"; + description "Config react action"; + leaf snmp { + tailf:info "SNMP is notified of the event"; + description "SNMP is notified of the event"; + tailf:cli-full-command; + type empty; + } + leaf syslog { + tailf:info "The threshold-crossing event is logged to syslog"; + description "The threshold-crossing event is logged to syslog"; + tailf:cli-full-command; + type empty; + } + } + container alarm { + tailf:info "Config react alarm"; + description "Config react alarm"; + leaf severity { + tailf:info "Alarm severity - default level none"; + description "Alarm severity - default level none"; + type enumeration { + enum alert { + tailf:info "TCA severity level critical (severity = 2)"; + } + enum critical { + tailf:info "TCA severity level major (severity = 3)"; + } + enum emergency { + tailf:info "TCA severity level critical (severity = 1)"; + } + enum error { + tailf:info "TCA severity level minor (severity = 4)"; + } + enum info { + tailf:info "TCA severity level default (severity = 5)"; + } + } + } + container type { + tailf:info "Alarm raised type - for each flow or a group"; + description "Alarm raised type - for each flow or a group"; + leaf discrete { + tailf:info "Alert for each flow within the class"; + description "Alert for each flow within the class"; + tailf:cli-full-command; + type empty; + } + container grouped { + tailf:info "Alert if more than one flow cross the threshold"; + description "Alert if more than one flow cross the threshold"; + leaf count { + tailf:info "Number of flows in the group cross the threshold"; + description "Number of flows in the group cross the threshold"; + tailf:cli-full-command; + type uint16 { + tailf:info "<1-65535>;;Number of flows"; + } + } + leaf percent { + tailf:info "Percent of flows in the group cross the threshold"; + description "Percent of flows in the group cross the threshold"; + tailf:cli-full-command; + type uint8 { + tailf:info "<1-100>;;Percent of flows"; + range "1..100"; + } + } + } + } + } + container threshold { + tailf:info "Config react threshold"; + description "Config react threshold"; + container value { + tailf:info "Range of percentage loss that would trigger the alarm"; + description "Range of percentage loss that would trigger the alarm"; + leaf ge { + tailf:info "greater and equal to"; + description "greater and equal to"; + tailf:cli-full-command; + type string { + tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)"; + } + } + leaf gt { + tailf:info "greater than"; + description "greater than"; + tailf:cli-full-command; + type string { + tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)"; + } + } + leaf le { + tailf:info "less and equal to"; + description "less and equal to"; + tailf:cli-full-command; + type string { + tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)"; + } + } + leaf lt { + tailf:info "less than"; + description "less than"; + tailf:cli-full-command; + type string { + tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)"; + } + } + container range { + tailf:info "threshold within the range of"; + description "threshold within the range of"; + tailf:cli-sequence-commands; + tailf:cli-compact-syntax; + leaf low { + tailf:cli-drop-node-name; + type string { + tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)"; + } + } + leaf high { + tailf:cli-drop-node-name; + type string { + tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)"; + } + } + } + } + } + } + } + // policy-map * / class * / inspect-police + container inspect-police { + when "../policy/action = 'inspect'"; + tailf:cli-drop-node-name; + container police { + tailf:info "Police"; + description "Police"; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + tailf:cli-compact-syntax; + leaf rate { + tailf:info "Specify police rate"; + description "Specify police rate"; + type uint32 { + tailf:info "<8000-2000000000>;;Rate value in bps"; + range "8000..2000000000"; + } + } + leaf burst { + tailf:info "Specify 'burst' parameter"; + description "Specify 'burst' parameter"; + type uint32 { + tailf:info "<1000-512000000>;;Burst value in bytes"; + range "1000..512000000"; + } + } + } + } + list action-list { + tailf:cli-drop-node-name; + tailf:cli-suppress-mode; + key action-type; + ordered-by user; + leaf action-type { + type policy-action-type; + } + choice action-param { + case bandwidth-case { + // policy-map * / class * / bandwidth + container bandwidth { + //tailf:info "Bandwidth"; + tailf:cli-drop-node-name; + when "../action-type = 'bandwidth'"; + leaf bits { + tailf:cli-drop-node-name; + type uint32 { + range "8..2000000"; + tailf:info "<8-2000000>;;Kilo Bits per second"; + } + } + leaf percent { + tailf:info "% of total Bandwidth"; + description "% of total Bandwidth"; + type percentage-type; + } + container remaining { + tailf:info "% of the remaining bandwidth"; + description "% of the remaining bandwidth"; + leaf percent { + tailf:info "% of the remaining bandwidth"; + description "% of the remaining bandwidth"; + type percentage-type; + } + leaf ratio { + tailf:info "ratio for sharing excess bandwidth"; + description "ratio for sharing excess bandwidth"; + type uint16 { + tailf:info "<1-65536>;;Ratio"; + } + } + } + } + } + case compression-case { + // policy-map * / class * / compression + container compression { + //tailf:info "Activate Compression"; + tailf:cli-drop-node-name; + //presence "Activate Compression"; + when "../action-type = 'compression'"; + container header { + tailf:info "configure header compression"; + description "configure header compression"; + presence "configure header compression"; + leaf ip { + tailf:info "configure ip header compression"; + description "configure ip header compression"; + type enumeration { + enum rtp { + tailf:code-name "header_rtp"; + tailf:info "configure rtp header compression"; + } + enum tcp { + tailf:info "configure tcp header compression"; + } + } + } + } + } + } + //case drop-case { + // policy-map * / class * / drop + //leaf drop { + //tailf:info "Drop all packets"; + // tailf:cli-full-command; + //type empty; + //} + //} + case estimate-case { + // policy-map * / class * / estimate + container estimate { + //tailf:info "estimate resources required for this class"; + tailf:cli-drop-node-name; + when "../action-type = 'estimate'"; + container bandwidth { + presence "bandwidth required to service this class"; + tailf:info "bandwidth required to service this class"; + description "bandwidth required to service this class"; + tailf:cli-sequence-commands; + tailf:cli-compact-syntax; + container delay-one-in { + tailf:info "specify QoS target delay"; + description "specify QoS target delay"; + tailf:cli-compact-syntax; + tailf:cli-sequence-commands; + leaf doi { + tailf:cli-drop-node-name; + tailf:cli-incomplete-command; + type uint32 { + range "50..1000000"; + tailf:info "<50-1000000>;;delay one packet "+ + "of N"; + } + } + leaf milliseconds { + type uint32 { + range "8..1000" { + tailf:info "<8-1000>;;worst-case "+ + "milliseconds of delay"; + } + } + } + } + leaf drop-one-in { + tailf:info "specify QoS target loss rate"; + description "specify QoS target loss rate"; + type uint32 { + tailf:info "<50-1000000>;;drop one packet of N"; + } + } + } + } + } + case forward-case { + //policy-map * / class * / forward service-path + container forward { + //tailf:info "forward service-path action"; + tailf:cli-reset-container; + tailf:cli-drop-node-name; + when "../action-type = 'forward'"; + list service-path { + tailf:info "Service Path Entries"; + description "Service Path Entries"; + tailf:cli-suppress-mode; + key "service-path-id"; + leaf service-path-id { + type uint32 { + range "0..16777215"; + tailf:info "<0-16777215>;;Service Path ID"; + } + } + leaf service-index { + tailf:info "Service Index"; + description "Service Index"; + type uint8 { + range "2..255"; + tailf:info "<2-255>;;Service Index ID"; + } + } + } + } + } + case fair-queue-case { + // policy-map * / class * / fair-queue + // class-default: fair-queue [number-of-dynamic-queues] + // DWFQ: fair-queue + // policy-map: fair-queue [queue-limit queue-value] + // NOT SUPPORTED: + // air-queue [congestive-discard-threshold [dynamic-q [reservable-q]]] + container fair-queue { + //tailf:info "Enable Flow-based Fair Queuing in this Class"; + tailf:cli-reset-container; + tailf:cli-drop-node-name; + when "../action-type = 'fair-queue'"; + leaf dynamic-queues { + tailf:cli-drop-node-name; + tailf:cli-full-command; + type uint32 { + range "16|32|64|128|256|512|1024|2048|4096" { + tailf:info "<16-4096>;;Number Dynamic Conversation "+ + "Queues"; + } + } + } + leaf queue-limit { + tailf:info "per flow queue limit"; + description "per flow queue limit"; + tailf:cli-full-command; + type uint16 { + tailf:info "<1-32768>;;packets"; + range "1..32768"; + } + } + } + } + case netflow-sampler-case { + // policy-map * / class * / netflow-sampler + leaf netflow-sampler { + //tailf:info "NetFlow action"; + tailf:cli-drop-node-name; + tailf:cli-full-command; + when "../action-type = 'netflow-sampler'"; + // should be leafref to sampler + type string { + tailf:info "WORD;;Name of the flow sampler"; + } + } + } + case police-case { + // policy-map * / class * / police ? + choice police-choice { + // policy-map * / class * / police aggregate + case police-aggregate-case { + container police-aggregate { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + container police { + //tailf:info "Police"; + tailf:cli-drop-node-name; + when "../../action-type = 'police'" { + tailf:dependency "../../action-type"; + } + leaf aggregate { + tailf:info "Choose aggregate policer for current class"; + description "Choose aggregate policer for current class"; + type string { + tailf:info "WORD;;enter aggregate-policer name"; + } + } + } + } + } + // police (policy-map) + // police cir [[bc ] [be ]] + // [pir [be ]] ACTIONS + // NOTE: cir, bc & be keywords are mandatory in this model. + // Java code will add missing cir,bc and be in show(). + case police-policy-map-case { + container police-policy-map { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + container police { + tailf:cli-add-mode; + tailf:cli-mode-name "config-pmap-c-police"; + tailf:cli-flatten-container; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + tailf:cli-drop-node-name; + when "../../action-type = 'police'" { + tailf:dependency "../../action-type"; + } + // cir + leaf cir { + tailf:info "Committed information rate"; + description "Committed information rate"; + tailf:cli-hide-in-submode; + type police-bps-type; + } + // [bc ] + leaf bc { + tailf:info "Conform burst"; + description "Conform burst"; + tailf:cli-optional-in-sequence; + tailf:cli-hide-in-submode; + type police-burst-type; + } + // [be ] + leaf be { + when "../bc"; + tailf:info "Excess burst"; + description "Excess burst"; + tailf:cli-optional-in-sequence; + tailf:cli-hide-in-submode; + type police-burst-type; + } + // [pir [be ]] + leaf pir { + tailf:info "Peak Information Rate"; + description "Peak Information Rate"; + tailf:cli-optional-in-sequence; + tailf:cli-hide-in-submode; + type police-bps-type; + } + container pir-be { + when "../pir"; + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-optional-in-sequence; + tailf:cli-flatten-container; + tailf:cli-hide-in-submode; + leaf be { + tailf:info "Excess burst"; + description "Excess burst"; + type police-burst-type; + } + } + // conform-action | exceed-action | violate-action + uses police-action-grouping; + } + } + } + // police cir percent (combo of percent & policy-map versions) + // police cir percent + // [bc] ms] [be [ ms] + // [pir percent [be ms]] ACTIONS + case police-cir-percent-case { + container police-cir-percent { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + container police { + tailf:cli-drop-node-name; + when "../../action-type = 'police'" { + tailf:dependency "../../action-type"; + } + container cir { + tailf:info "Committed information rate"; + description "Committed information rate"; + container percent { + tailf:info "% of interface bandwidth for Committed "+ + "information rate"; + description "% of interface bandwidth for Committed "+ + "information rate"; + tailf:cli-add-mode; + tailf:cli-mode-name "config-pmap-c-police"; + tailf:cli-incomplete-command; + tailf:cli-flatten-container; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + // percent + leaf percentage { + tailf:cli-drop-node-name; + tailf:cli-hide-in-submode; + type percentage-type; + } + // [bc ms] + leaf bc { + tailf:info "Conform burst"; + description "Conform burst"; + tailf:cli-optional-in-sequence; + tailf:cli-hide-in-submode; + type uint16 { + tailf:info "<1-2000>;;Burst ms"; + } + } + container bc-ms { + when "../bc"; + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-optional-in-sequence; + tailf:cli-hide-in-submode; + tailf:cli-compact-syntax; + tailf:cli-flatten-container; + leaf ms { + tailf:info "Milli seconds"; + description "Milli seconds"; + tailf:cli-no-keyword; + type empty; + } + } + // [be [ ms] + leaf be { + when "../bc-ms/ms" { + tailf:dependency "../bc-ms/ms"; + } + tailf:info "Excess burst"; + tailf:cli-optional-in-sequence; + tailf:cli-hide-in-submode; + type uint16 { + tailf:info "<1-2000>;;Burst ms"; + } + } + container be-ms { + when "../be"; + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-hide-in-submode; + tailf:cli-compact-syntax; + tailf:cli-flatten-container; + leaf ms { + tailf:info "Milli seconds"; + description "Milli seconds"; + tailf:cli-no-keyword; + type empty; + } + } + // [pir percent [be ms]] + container pir { + tailf:info "Peak Information Rate"; + description "Peak Information Rate"; + tailf:cli-compact-syntax; + tailf:cli-flatten-container; + tailf:cli-hide-in-submode; + tailf:cli-optional-in-sequence; + leaf percent { + tailf:info "% of interface bandwidth for Peak "+ + "Information Rate"; + description "% of interface bandwidth for Peak "+ + "Information Rate"; + type percentage-type; + } + } + container pir-be { + when "../pir"; + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-optional-in-sequence; + tailf:cli-flatten-container; + tailf:cli-hide-in-submode; + leaf be { + tailf:info "Excess burst"; + description "Excess burst"; + type uint16 { + tailf:info "<1-2000>;;Burst ms"; + } + } + } + container pir-be-ms { + when "../pir-be/be" { + tailf:dependency "../pir-be/be"; + } + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-optional-in-sequence; + tailf:cli-hide-in-submode; + tailf:cli-flatten-container; + leaf ms { + tailf:info "Milli seconds"; + description "Milli seconds"; + tailf:cli-no-keyword; + type empty; + } + } + // conform-action | exceed-action | violate-action + uses police-action-grouping; + } + } + } + } + } + // police rate (control-plane) + // police rate [burst ] + // [peak-rate ] + // [peak-burst ] + // [conform-action ] + case police-rate-unit-case { + container police-rate-unit { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + container police { + tailf:cli-drop-node-name; + when "../../action-type = 'police'" { + tailf:dependency "../../action-type"; + } + container rate { + tailf:info "Specify police rate"; + description "Specify police rate"; + tailf:cli-add-mode; + tailf:cli-mode-name "config-pmap-c-police"; + tailf:cli-flatten-container; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + // + leaf "units" { + tailf:cli-drop-node-name; + tailf:cli-hide-in-submode; + type uint64 { + tailf:info "<1-2000000000>;;Rate value in the range "+ + "8000-2,000,000,000 bps or 1-2,000,000 pps"; + } + } + // + leaf xps { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-hide-in-submode; + type police-pps-bps-type; + } + // [burst ] + container burst { + tailf:info "Specify 'burst' parameter"; + description "Specify 'burst' parameter"; + tailf:cli-optional-in-sequence; + tailf:cli-compact-syntax; + tailf:cli-hide-in-submode; + tailf:cli-flatten-container; + tailf:cli-sequence-commands; + leaf burst-value { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-incomplete-command; + type uint32 { + tailf:info "<1-512000000>;;Burst value in "+ + "packets/bytes"; + } + } + leaf burst-type { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-hide-in-submode; + type police-packets-bytes-type; + } + } + // [peak-rate ] + container peak-rate { + tailf:info "Specify peak rate"; + description "Specify peak rate"; + tailf:cli-optional-in-sequence; + tailf:cli-compact-syntax; + tailf:cli-flatten-container; + tailf:cli-hide-in-submode; + tailf:cli-sequence-commands; + leaf peak-rate-value { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-incomplete-command; + type uint32 { + tailf:info "<1-512000000>;;Peak-rate value in "+ + "packets or bytes per second"; + range "1..512000000"; + } + } + leaf xps { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + type police-pps-bps-type; + } + } + // [peak-burst ] + container peak-burst { + tailf:info "Specify 'peak-burst' parameter for peak-rate"; + description "Specify 'peak-burst' parameter for peak-rate"; + tailf:cli-optional-in-sequence; + tailf:cli-compact-syntax; + tailf:cli-flatten-container; + tailf:cli-hide-in-submode; + tailf:cli-sequence-commands; + leaf burst-value { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-incomplete-command; + type uint32 { + tailf:info "<1-512000000>;;Burst value in "+ + "packets/bytes"; + } + } + leaf burst-type { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + type police-packets-bytes-type; + } + } + // conform-action | exceed-action | violate-action + uses police-action-grouping; + } + } + } + } + // police rate percent (control-plane) + // police rate percent [burst ms] + // [peak-rate percent ] [peak-burst ms] + case police-rate-percent-case { + container police-rate-percent { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + container police { + tailf:cli-drop-node-name; + when "../../action-type = 'police'" { + tailf:dependency "../../action-type"; + } + container rate { + tailf:info "Specify police rate"; + description "Specify police rate"; + container percent { + tailf:info "% of interface bandwidth for rate"; + description "% of interface bandwidth for rate"; + tailf:cli-add-mode; + tailf:cli-mode-name "config-pmap-c-police"; + tailf:cli-flatten-container; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + // + leaf percentage { + tailf:cli-drop-node-name; + tailf:cli-hide-in-submode; + type percentage-type; + } + // [burst ms] + leaf burst { + tailf:info "Specify 'burst' parameter"; + description "Specify 'burst' parameter"; + tailf:cli-optional-in-sequence; + tailf:cli-hide-in-submode; + type uint16 { + tailf:info "<1-2000>;;Burst value in milliseconds"; + } + } + leaf ms { + when "../burst"; + tailf:info "Treat 'burst' value in milliseconds"; + description "Treat 'burst' value in milliseconds"; + tailf:cli-hide-in-submode; + type empty; + } + // [peak-rate percent ] + container peak-rate { + tailf:info "Specify peak rate"; + description "Specify peak rate"; + tailf:cli-hide-in-submode; + tailf:cli-optional-in-sequence; + tailf:cli-flatten-container; + leaf percent { + tailf:info "% of interface bandwidth for peak-rate"; + description "% of interface bandwidth for peak-rate"; + type percentage-type; + } + } + // [peak-burst ms] + leaf peak-burst { + tailf:info "Specify 'peak-burst' parameter for "+ + "'peak-rate'"; + description "Specify 'peak-burst' parameter for "+ + "'peak-rate'"; + tailf:cli-hide-in-submode; + tailf:cli-optional-in-sequence; + type uint16 { + tailf:info "<1-2000>;;Peak burst value in "+ + "milliseconds"; + } + } + container peak-burst-ms { + when "../peak-burst"; + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-optional-in-sequence; + tailf:cli-hide-in-submode; + tailf:cli-flatten-container; + leaf ms { + tailf:info "Milli seconds"; + description "Milli seconds"; + tailf:cli-no-keyword; + type empty; + } + } + // conform-action | exceed-action | violate-action + uses police-action-grouping; + } + } + } + } + } + // police rate pdp + // police rate pdp [burst ] + // [peak-rate pdp [peak-burst ]] ACTIONS + case police-rate-pdp-case { + container police-rate-pdp { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + container police { + tailf:cli-drop-node-name; + when "../../action-type = 'police'" { + tailf:dependency "../../action-type"; + } + container rate { + tailf:info "Specify police rate"; + description "Specify police rate"; + container pdp { + tailf:info "% of interface bandwidth for rate"; + description "% of interface bandwidth for rate"; + tailf:cli-add-mode; + tailf:cli-mode-name "config-pmap-c-police"; + tailf:cli-flatten-container; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + // [burst ] + leaf burst { + tailf:info "Conform burst"; + description "Conform burst"; + tailf:cli-hide-in-submode; + tailf:cli-optional-in-sequence; + type police-burst-type; + } + // [peak-rate pdp [peak-burst ]] + leaf peak-rate { + tailf:info "Specify peak rate"; + description "Specify peak rate"; + tailf:cli-hide-in-submode; + tailf:cli-optional-in-sequence; + type enumeration { + enum "pdp" { + } + } + } + leaf peak-burst { + when "../peak-rate"; + tailf:info "Specify 'peak-burst' parameter for "+ + "'peak-rate'"; + description "Specify 'peak-burst' parameter for "+ + "'peak-rate'"; + tailf:cli-hide-in-submode; + tailf:cli-optional-in-sequence; + type police-burst-type; + } + // conform-action | exceed-action | violate-action + uses police-action-grouping; + } + } + } + } + } + // police target-bit-rate + case police-target-bitrate-case { + container police-target-bitrate { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + container police { + tailf:cli-drop-node-name; + when "../../action-type = 'police'" { + tailf:dependency "../../action-type"; + } + tailf:cli-add-mode; + tailf:cli-mode-name "config-pmap-c-police"; + leaf bit-rate { + tailf:info "Target bit rate (bits per second) (postfix k, m, g optional), + decimal point allowed"; + description "Target bit rate (bits per second) (postfix k, m, g optional), + decimal point allowed"; + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-hide-in-submode; + type uint64 { + tailf:info "<8000-10000000000>;;Target bit rate (bits per second)"; + range "8000..10000000000"; + } + } + // conform-action | exceed-action | violate-action + uses police-action-grouping; + } + } + } + // police flow (policy-map) + // police flow [mask {dest-only | full-flow | src-only}] + // [] ACTIONS + case police-flow-case { + container police-flow { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + container police { + tailf:cli-drop-node-name; + when "../../action-type = 'police'" { + tailf:dependency "../../action-type"; + } + container flow { + tailf:info "police each flow"; + description "police each flow"; + tailf:cli-add-mode; + tailf:cli-mode-name "config-pmap-c-police"; + tailf:cli-flatten-container; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + // [mask {dest-only | full-flow | src-only}] + leaf mask { + tailf:info "flow mask to be used for policing"; + description "flow mask to be used for policing"; + tailf:cli-hide-in-submode; + tailf:cli-optional-in-sequence; + type enumeration { + enum dest-only { + tailf:info "destination-address only flow mask"; + } + enum full-flow { + tailf:info "full flow mask"; + } + enum src-only { + tailf:info "source-address only flow mask"; + } + } + } + // + leaf bps { + tailf:cli-drop-node-name; + tailf:cli-hide-in-submode; + type police-bps-type; + } + // [] + leaf burst-normal { + when "../bps"; + tailf:cli-drop-node-name; + tailf:cli-hide-in-submode; + tailf:cli-optional-in-sequence; + type police-burst-type; + } + // conform-action | exceed-action | violate-action + uses police-action-grouping; + } + } + } + } + // police (Catalyst 4500) + // police bps byte ACTIONS + case police-catalyst-case { + container police-catalyst { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + container police { + tailf:cli-add-mode; + tailf:cli-mode-name "config-pmap-c-police"; + tailf:cli-flatten-container; + tailf:cli-drop-node-name; + when "../../action-type = 'police'" { + tailf:dependency "../../action-type"; + } + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + // bps + leaf bps-value { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-hide-in-submode; + tailf:cli-incomplete-command; + type string { + tailf:info "<32000-32000000000>;;Rate in bits per second "+ + "(postfix k, m, g optional; decimal point allowed)"; + } + } + leaf bps { + tailf:cli-hide-in-submode; + tailf:cli-incomplete-command; + type empty; + } + // byte + leaf byte-value { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + tailf:cli-hide-in-submode; + tailf:cli-incomplete-command; + type string { + tailf:info "<32000-32000000000>;;(postfix k, m, g "+ + "optional; decimal point allowed)"; + } + } + leaf byte { + tailf:cli-hide-in-submode; + type empty; + } + // conform-action | exceed-action | violate-action + container actions { + tailf:cli-no-keyword; + tailf:cli-break-sequence-commands; + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + tailf:cli-hide-in-submode; + // policy-map * / class * / police ? / conform-action + uses police-conform-action-grouping; + // policy-map * / class * / police ? / exceed-action + uses police-exceed-action-grouping; + // policy-map * / class * / police ? / violate-action + uses police-violate-action-grouping; + } + } + } + } + // police (Catalyst C3550) + // police exceed-action {drop | policed-dscp-transmit}] + case police-switch-case { + container police-switch { + tailf:cli-no-keyword; + tailf:cli-drop-node-name; + container police { + tailf:cli-compact-syntax; + tailf:cli-drop-node-name; + when "../../action-type = 'police'" { + tailf:dependency "../../action-type"; + } + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + // + leaf cir { + tailf:cli-incomplete-command; + tailf:cli-drop-node-name; + type uint32 { + tailf:info "<8000-1000000000>;;Bits per second"; + range "8000..1000000000"; + } + } + // + leaf bc { + tailf:cli-drop-node-name; + type uint32 { + tailf:info "<8000-2000000>;;Normal burst bytes"; + range "8000..2000000"; + } + } + // exceed-action + leaf exceed-action { + tailf:info "action when rate is exceeded"; + description "action when rate is exceeded"; + type enumeration { + enum drop { + tailf:info "drop packet"; + } + enum policed-dscp-transmit { + tailf:info "change dscp per policed-dscp map and send it"; + } + } + } + } + } + } + } + } + case priority-case { + // policy-map * / class * / priority + container priority { + //tailf:info "Strict Scheduling Priority for this Class"; + tailf:cli-compact-syntax; + tailf:cli-sequence-commands; + tailf:cli-drop-node-name; + when "../action-type = 'priority'"; + leaf level { + tailf:info "Multi-Level Priority Queue"; + description "Multi-Level Priority Queue"; + tailf:cli-optional-in-sequence; + type uint8 { + tailf:info "<1-2>;;Multi-Level Priority Queue"; + range "1..2"; + } + } + choice priority-type { + leaf kilo-bits { + tailf:cli-drop-node-name; + type uint32 { + range "8..2000000"; + tailf:info "<8-2000000>;;Kilo Bits per second"; + } + } + leaf percent { + tailf:info "% of total bandwidth"; + description "% of total bandwidth"; + type uint16 { + range "1..100"; + tailf:info "<1-100>;;percentage"; + } + } + } + leaf burst { + tailf:cli-drop-node-name; + type uint32 { + tailf:info "<32-64000000>;;Burst in bytes"; + range "32..64000000"; + } + } + } + } + case queue-buffers-case { + // policy-map * / class * / queue-buffers + container queue-buffers { + tailf:cli-drop-node-name; + when "../action-type = 'queue-buffers'"; + leaf ratio { + tailf:info "Relative buffer size for queue"; + description "Relative buffer size for queue"; + type uint8 { + tailf:info "<0-100>;;Queue-buffers ratio limit"; + range "0..100"; + } + } + } + } + case queue-limit-case { + // policy-map * / class * / queue-limit + container queue-limit { + //tailf:info "Queue Max Threshold for Tail Drop"; + tailf:cli-compact-syntax; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + tailf:cli-drop-node-name; + when "../action-type = 'queue-limit'"; + leaf queue-limit-value { + tailf:cli-drop-node-name; + type uint32 { + tailf:info "<1-8192000> in bytes, <1-3400> in ms, "+ + "<1-32768> in packets by default"; + range "1..8192000"; + } + } + leaf queue-limit-type { + tailf:cli-drop-node-name; + type enumeration { + enum bytes { + tailf:info "in bytes"; + } + enum ms { + tailf:info "in milliseconds"; + } + enum packets { + tailf:info "in packets"; + } + enum us { + tailf:info "in microseconds"; + } + } + } + } + container queue-limit-dscp { + //tailf:info "Queue Max Threshold for Tail Drop"; + tailf:cli-compact-syntax; + tailf:cli-drop-node-name; + when "../action-type = 'queue-limit'"; + leaf dscp { + tailf:info "parameters for each dscp value"; + description "parameters for each dscp value"; + type empty; + } + leaf values { + tailf:info "dscp values"; + description "dscp values"; + type empty; + } + leaf-list sdcp-val { + tailf:cli-drop-node-name; + type dscp-type; + } + leaf percent { + tailf:info "% of threshold"; + description "% of threshold"; + type uint8 { + tailf:info "<0-100>;;% of threshold"; + range "0..100"; + } + } + } + } + case random-detect { + // policy-map * / class * / random-detect + container random-detect { + //tailf:info "Enable Random Early Detection as drop policy"; + //presence true; + tailf:cli-drop-node-name; + when "../action-type = 'random-detect'"; + container aggregate { + tailf:info "aggregate subclasses"; + description "aggregate subclasses"; + tailf:cli-compact-syntax; + tailf:cli-sequence-commands { + tailf:cli-reset-siblings; + } + presence true; + leaf minimum-thresh { + tailf:info "minimum threshold for red aggregate"; + description "minimum threshold for red aggregate"; + type uint32 { + tailf:info "<0-1000000>;;minimum threshold (number of packets)"; + range "0..1000000"; + } + } + leaf maximum-thresh { + tailf:info "maximum threshold for red aggregate"; + description "maximum threshold for red aggregate"; + type uint32 { + tailf:info "<0-1000000>;;maximum threshold (number of packets)"; + range "0..1000000"; + } + } + leaf mark-probability { + tailf:info "mark-probability for red aggregate"; + description "mark-probability for red aggregate"; + type empty; + } + leaf denominator { + tailf:cli-drop-node-name; + type uint32 { + tailf:info "<0-65535>;;mark probability denominator"; + range "0..65535"; + } + } + } + container discard-class { + tailf:info "parameters for each discard-class value"; + description "parameters for each discard-class value"; + tailf:cli-compact-syntax; + tailf:cli-sequence-commands; + leaf dclass { + tailf:cli-drop-node-name; + tailf:cli-incomplete-command; + type uint16 { + range "0..7"; + tailf:info "<0-7>;;discard-class value"; + } + } + uses random-detect-grouping; + } + leaf discard-class-based { + tailf:info "Enable discard-class-based WRED as drop policy"; + description "Enable discard-class-based WRED as drop policy"; + tailf:cli-full-command; + type empty; + } + leaf dscp-based { + tailf:info "Enable dscp-based WRED as drop policy"; + description "Enable dscp-based WRED as drop policy"; + tailf:cli-full-command; + type empty; + } + list dscp { + tailf:info "parameters for each dscp value"; + description "parameters for each dscp value"; + tailf:cli-suppress-mode; + tailf:cli-compact-syntax; + tailf:cli-sequence-commands; + key dscp-val; + leaf dscp-val { + type dscp-type; + } + uses random-detect-grouping; + } + leaf ecn { + tailf:info "explicit congestion notification"; + description "explicit congestion notification"; + tailf:cli-full-command; + type empty; + } + leaf exponential-weighting-constant { + tailf:info "weight for mean queue depth calculation"; + description "weight for mean queue depth calculation"; + tailf:cli-full-command; + type uint16 { + range "1..16"; + tailf:info "<1-16>;;integer in 1..16 used in weighted "+ + "average to mean 2^number"; + } + } + leaf prec-based { + tailf:info "Enable precedence-based WRED as drop policy"; + description "Enable precedence-based WRED as drop policy"; + tailf:cli-full-command; + type empty; + } + container precedence { + tailf:info "parameters for each precedence value"; + description "parameters for each precedence value"; + tailf:cli-sequence-commands; + tailf:cli-compact-syntax; + leaf prec { + tailf:cli-drop-node-name; + tailf:cli-incomplete-command; + type precedence-type2; + } + uses random-detect-grouping; + } + } + } + case service-policy-case { + // policy-map * / class * / service-policy + leaf service-policy { + //tailf:info "Configure Flow Next"; + tailf:cli-full-command; + tailf:cli-drop-node-name; + when "../action-type = 'service-policy'"; + type string; + tailf:non-strict-leafref { + path "/ios:native/policy-map/name"; + } + } + } + case set-case { + // policy-map * / class * / set + container set { + //tailf:info "Set QoS values"; + tailf:cli-drop-node-name; + when "../action-type = 'set'"; + // policy-map * / class * / set atm-clp + leaf atm-clp { + tailf:info "Set ATM CLP bit to 1"; + description "Set ATM CLP bit to 1"; + tailf:cli-full-command; + type empty; + } + // policy-map * / class * / set cos + container cos { + tailf:info "Set IEEE 802.1Q/ISL class of service/user "+ + "priority"; + description "Set IEEE 802.1Q/ISL class of service/user "+ + "priority"; + tailf:cli-compact-syntax; + tailf:cli-sequence-commands; + choice cos-type { + case a { + leaf val { + tailf:cli-drop-node-name; + type uint16 { + range "0..7"; + tailf:info "<0-7>;;cos value"; + } + } + } + case b { + leaf pack { + tailf:cli-drop-node-name; + type enumeration { + enum dscp { + tailf:code-name "pack_dscp"; + tailf:info "Set value from packet dscp"; + } + enum precedence { + tailf:code-name "pack_precedence"; + tailf:info "Set value from packet "+ + "precedence."; + } + } + } + leaf table { + tailf:info "Set codepoint value based on tablemap."; + description "Set codepoint value based on tablemap."; + type string { + tailf:info "WORD;;table-map name"; + } + tailf:non-strict-leafref { + path "/ios:native/table-map/name"; + } + } + } + } + } + // policy-map * / class * / set discard-class + leaf discard-class { + tailf:info "Discard behavior identifier"; + description "Discard behavior identifier"; + tailf:cli-full-command; + type uint16 { + range "0..7"; + tailf:info "<0-7>;;Discard Class value"; + } + } + // policy-map * / class * / set dscp + container dscp { + tailf:info "Set DSCP in IP(v4) and IPv6 packets"; + description "Set DSCP in IP(v4) and IPv6 packets"; + tailf:cli-compact-syntax; + leaf tunnel { + tailf:info "set tunnel packet dscp"; + description "set tunnel packet dscp"; + type empty; + } + leaf dscp-val { + tailf:cli-drop-node-name; + type dscp-type; + } + } + // policy-map * / class * / set fr-de + leaf fr-de { + tailf:info "Set FR DE bit to 1"; + description "Set FR DE bit to 1"; + tailf:cli-full-command; + type empty; + } + // policy-map * / class * / set ip + container ip { + tailf:info "Set IP specific values"; + description "Set IP specific values"; + choice ip-choice { + container dscp { + tailf:info "Set IP DSCP (DiffServ CodePointint)"; + description "Set IP DSCP (DiffServ CodePointint)"; + tailf:cli-compact-syntax; + leaf tunnel { + tailf:info "set tunnel packet dscp"; + description "set tunnel packet dscp"; + type empty; + } + leaf dscp-val { + tailf:cli-drop-node-name; + type dscp-type; + } + } + container precedence { + tailf:info "Set IP precedence"; + description "Set IP precedence"; + presence "Set IP precedence"; + leaf precedence-val { + tailf:cli-drop-node-name; + type precedence-type; + } + } + } + } + // policy-map * / class * / set mpls + container mpls { + tailf:info "Set MPLS specific values"; + description "Set MPLS specific values"; + container experimental { + tailf:info "Set Experimental value"; + description "Set Experimental value"; + // 0-7 + container imposition { + tailf:info "Set Experimental value at tag imposition"; + description "Set Experimental value at tag imposition"; + leaf exp-value { + tailf:cli-drop-node-name; + tailf:cli-full-command; + type uint8 { + tailf:info "<0-7>;;Experimental value"; + range "0..7"; + } + } + // dscp + // precedence + } + // topmost + container topmost { + tailf:info "Set Experimental value on topmost label"; + description "Set Experimental value on topmost label"; + leaf exp-value { + tailf:cli-drop-node-name; + tailf:cli-full-command; + type uint8 { + tailf:info "<0-7>;;Experimental value"; + range "0..7"; + } + } + } + } + } + // policy-map * / class * / set qos-group + container qos-group { + tailf:info "Set QoS Group"; + description "Set QoS Group"; + leaf qos-group-value { + tailf:cli-drop-node-name; + tailf:cli-full-command; + type uint8 { + range "0..99"; + } + } + // dscp + // mpls + // precedence + } + } + } + case shape-case { + // policy-map * / class * / shape + container shape { + //tailf:info "Traffic Shaping"; + tailf:cli-drop-node-name; + when "../action-type = 'shape'"; + // policy-map * / class * / shape adaptive + leaf adaptive { + tailf:info "Enable Traffic Shaping adaptation to BECN"; + description "Enable Traffic Shaping adaptation to BECN"; + tailf:cli-full-command; + type uint32 { + range "8000..154400000"; + tailf:info "<8000-154400000>;;Lower Bound Target Bit "+ + "Rate (bits per second)"; + } + } + // policy-map * / class * / shape average + container average { + tailf:info "configure token bucket: CIR (bps) [Bc (bits) "+ + "[Be (bits)]], send out Bc only per interval"; + description "configure token bucket: CIR (bps) [Bc (bits) "+ + "[Be (bits)]], send out Bc only per interval"; + tailf:cli-sequence-commands; + tailf:cli-compact-syntax; + choice average-choice { + case a { + leaf bit-rate { + tailf:cli-drop-node-name; + type uint64 { + //range "8000..154400000"; + //FIXME: what is range max? + tailf:info "<8000-max>;;Target Bit "+ + "Rate (bits per second), the value "+ + "needs to be a multiple of 8000"; + } + } + leaf bits-per-interval-sustained { + tailf:cli-drop-node-name; + type uint32 { + range "256..154400000"; + tailf:info "<256-154400000>;;bits per "+ + "interval, sustained. Needs to be "+ + "multiple of 128. Recommend not to "+ + "configure it, the algorithm will "+ + "find out the best value"; + } + } + leaf bits-per-interval-excess { + tailf:cli-drop-node-name; + type uint32 { + range "0..154400000"; + tailf:info "<0-154400000>;;bits per "+ + "interval, excess. Needs to be "+ + "multiple of 128. Bc will be used if "+ + "you don't configure it."; + } + } + } + case b { + leaf percent { + tailf:info "% of interface bandwidth for "+ + "Committed information rate"; + description "% of interface bandwidth for "+ + "Committed information rate"; + type percentage-type; + } + leaf burst-size-sustained { + tailf:cli-incomplete-command; + tailf:cli-drop-node-name; + type uint16 { + range "10..2000"; + tailf:info "<10-2000>;;Sustained burst "+ + "size in msec"; + } + } + leaf ms { + tailf:info "milliseconds"; + description "milliseconds"; + type empty; + } + container bse { + tailf:cli-drop-node-name; + tailf:cli-flatten-container; + tailf:cli-sequence-commands; + tailf:cli-compact-syntax; + leaf burst-size-excess { + tailf:cli-incomplete-command; + type uint16 { + range "10..2000"; + tailf:info "<10-2000>;;Excess burst "+ + "size in msec"; + } + } + leaf ms { + tailf:info "milliseconds"; + description "milliseconds"; + type empty; + } + } + } + } + } + // policy-map * / class * / shape fecn-adapt + leaf fecn-adapt { + tailf:info "Enable Traffic Shaping reflection of FECN as "+ + "BECN"; + description "Enable Traffic Shaping reflection of FECN as "+ + "BECN"; + tailf:cli-full-command; + type empty; + } + // policy-map * / class * / shape fr-voice-adapt + container fr-voice-adapt { + tailf:info "Enable rate adjustment depending on voice "+ + "presence"; + description "Enable rate adjustment depending on voice "+ + "presence"; + presence "Enable rate adjustment depending on voice "+ + "presence" ; + leaf deactivation { + type uint16 { + range "1..10000"; + tailf:info "<1-10000>;;de-activation delay in "+ + "seconds"; + } + } + } + // policy-map * / class * / shape max-buffers + leaf max-buffers { + tailf:cli-full-command; + tailf:info "Set Maximum Buffer Limit"; + description "Set Maximum Buffer Limit"; + type uint16 { + range "1..4096"; + tailf:info "<1-4096>;;Maximum Buffer Limit"; + } + } + } + } + case trust-case { + // policy-map * / class * / trust + leaf trust { + //tailf:info "Set trust value for the class"; + tailf:cli-drop-node-name; + when "../action-type = 'trust'"; + type enumeration { + enum cos { + tailf:info "trust value for the class"; + } + enum dscp { + tailf:info "trust value for the class"; + } + enum ip-precedence { + tailf:info "trust value for the class"; + } + } + } + } + } + } + } + // policy-map * / description + leaf "description" { + tailf:info "Policy-Map description"; + description "Policy-Map description"; + tailf:cli-multi-value; + type string { + length "1..200"; + tailf:info "LINE;;Description of this policy-map (up to " + +"200 characters)"; + } + } + // policy-map * /sequence-interval + leaf sequence-interval { + tailf:info "Enable sequence number capability"; + description "Enable sequence number capability"; + when "../type = 'appnav'"; + type uint16 { + tailf:info "<0-65535>;;Sequence Number Interval"; + } + } + } + +/// ======================================================================== +/// service-chain +/// ======================================================================== + + grouping config-service-chain-grouping { + leaf description { + tailf:info "Service function forwarder description"; + description "Service function forwarder description"; + tailf:cli-multi-value; + type string { + tailf:info "LINE;;Up to 256 characters describing this " + "service function forwarder"; + length "1..256"; + } + } + container ip { + tailf:info "IP address for Service Function Forwarder"; + description "IP address for Service Function Forwarder"; + leaf address { + tailf:info "Set IPv4 address"; + description "Set IPv4 address"; + type inet:ipv4-address { + tailf:info "A.B.C.D;;IP address of Service Function Forwarder"; + } + } + } + } + + container service-chain { + tailf:info "Service Chain mode"; + description "Service Chain mode"; + list service-function { + tailf:info "Service function details"; + description "Service function details"; + tailf:cli-mode-name "config-service-chain-sf"; + key "name"; + leaf name { + tailf:info "WORD;;Service function name"; + description "WORD;;Service function name"; + type string; + } + container config-service-chain-sf-mode { + tailf:cli-drop-node-name; + leaf description { + tailf:info "Service function description"; + description "Service function description"; + tailf:cli-multi-value; + tailf:cli-full-command; + type string { + tailf:info "LINE;;Up to 256 characters describing this " + +"service function"; + length "1..256"; + } + } + container encapsulation { + tailf:info "Service node encapsulation"; + description "Service node encapsulation"; + container gre { + tailf:info "Service node encapsulation type"; + description "Service node encapsulation type"; + leaf enhanced { + tailf:info "Add enhanced NSH TLV information"; + description "Add enhanced NSH TLV information"; + type enumeration { + enum copy { + tailf:info "Send a copy of the packet"; + } + enum divert { + tailf:info "Divert the packet (default)"; + } + } + } + } + leaf none { + tailf:info "Service node encapsulation type"; + description "Service node encapsulation type"; + type empty; + } + } + container ip { + tailf:info "Service node"; + description "Service node"; + leaf address { + type inet:ipv4-address { + tailf:info "A.B.C.D;;Service node"; + } + } + } + } + } + container service-function-forwarder { + tailf:info "Service function forwarder details"; + description "Service function forwarder details"; + list service-ff-name { + tailf:cli-drop-node-name; + tailf:cli-mode-name "config-service-chain-sff"; + key "name"; + leaf name { + tailf:info "WORD;;Service function forwarder name"; + description "WORD;;Service function forwarder name"; + type string; + } + uses config-service-chain-grouping; + } + container local { + tailf:info "Local service function forwarder"; + description "Local service function forwarder"; + tailf:cli-add-mode; + tailf:cli-mode-name "config-service-chain-sff"; + presence true; + uses config-service-chain-grouping; + } + } + list service-path { + tailf:info "Service Path Entries"; + description "Service Path Entries"; + tailf:cli-mode-name "config-service-chain-path"; + key "service-path-id"; + leaf service-path-id { + type uint32 { + range "0..16777215"; + tailf:info "<0-16777215>;;Service Path ID"; + } + } + container config-service-chain-path-mode { + tailf:cli-drop-node-name; + leaf description { + tailf:info "Path Description"; + description "Path Description"; + tailf:cli-multi-value; + tailf:cli-full-command; + type string { + tailf:info "LINE;;Up to 256 characters describing this " + +"service path"; + length "1..256"; + } + } + container service-index { + tailf:info "Service Index"; + description "Service Index"; + list services { + tailf:cli-drop-node-name; + tailf:cli-suppress-mode; + key "service-index-id"; + leaf service-index-id { + type uint8 { + range "2..255"; + tailf:info "<2-255>;;Service Index ID"; + } + } + choice service-type-choice { + leaf service-function { + tailf:info "Service Function name"; + description "Service Function name"; + type string { + tailf:info "WORD;;Service Function name"; + } + } + leaf service-function-forwarder { + tailf:info "Service Function Forwarder name"; + description "Service Function Forwarder name"; + type string { + tailf:info "WORD;;Service Function Forwarder name"; + } + } + leaf terminate { + tailf:info "Terminate(Proxy)"; + description "Terminate(Proxy)"; + type empty; + } + } + } + } + } + } + } + } + +/// ======================================================================== +/// eof +/// ======================================================================== + +} diff --git a/experimental/odp/netconf-clustered-topology-config.yang b/experimental/odp/netconf-clustered-topology-config.yang new file mode 100644 index 000000000..b8cf643e3 --- /dev/null +++ b/experimental/odp/netconf-clustered-topology-config.yang @@ -0,0 +1,22 @@ +module netconf-clustered-topology-config { + yang-version 1; + namespace "urn:opendaylight:netconf:topology:singleton:config"; + prefix nctc; + + description + "Configuration for Netconf Clustered Topology"; + + revision "2017-04-19" { + description + "Initial revision."; + } + + container config { + leaf write-transaction-idle-timeout { + type uint16; + default 0; + description "Idle time in seconds after which write transaction is cancelled + automatically. If 0, automatic cancellation is turned off."; + } + } +} \ No newline at end of file diff --git a/experimental/odp/netconf-keystore.yang b/experimental/odp/netconf-keystore.yang new file mode 100644 index 000000000..b4c1c5d0e --- /dev/null +++ b/experimental/odp/netconf-keystore.yang @@ -0,0 +1,129 @@ +module netconf-keystore { + namespace "urn:opendaylight:netconf:keystore"; + prefix "keystore"; + + revision "2017-10-17" { + description "Initial revision of the Netconf SBP keystore."; + } + + description "Store used for key based Credentials for Netconf SBP. Before a connector with key based authentication + is created it needs to have a record for the key pair it uses. All the records here need to be + encrypted as they contain sensitive data. Therefore NEVER do direct writes and only use the provided + RPCs for adding/removing key entries."; + + grouping keystore-entry { + list key-credential { + key key-id; + + leaf key-id { + type string; + } + + leaf private-key { + description "Base64 encoded private key that should be used for authentication with a netconf device. + Do not include a public key as that is calculated from the private key. + DO NOT write this directly into the data store, use the provided RPCs as these will + encrypt the key before the entry is written into the data store."; + type string; + } + + leaf passphrase { + description "If the provided key is encrypted by a passphrase this needs to be included. Leave empty + if the key does not have a passphrase. + DO NOT write write this directly into the data store, use the provided RPCs as these will + encrypt the passphrase before the entry is written into the data store."; + type string; + } + } + } + + grouping private-keys { + list private-key { + key name; + description "A private key."; + leaf name { + type string; + } + leaf data { + description "Base64 encoded private key."; + type string; + } + leaf-list certificate-chain { + description "A certificate chain for this public key. Each certificate is an X.509 v3 certificate + structure as specified by RFC5280, encoded using the Base64 format."; + type string; + } + } + } + + grouping trusted-certificates { + list trusted-certificate { + key name; + description "A list of trusted certificate. These certificates can be used by a server to authenticate + clients, or by clients to authenticate servers."; + leaf name { + type string; + } + leaf certificate { + description "An X.509 v3 certificate structure as specified by RFC5280, encoded using + the Base64 format."; + type string; + } + } + } + + container keystore { + uses keystore-entry; + uses private-keys; + uses trusted-certificates; + } + + rpc add-keystore-entry { + description "Use this rpc to add a single or multiple new keys into the keystore. The private key and passphrase + will both be encrypted before they are written into the data store."; + input { + uses keystore-entry; + } + } + + rpc remove-keystore-entry { + description "Use this rpc to remove a single or multiple keys from the data store."; + input { + leaf-list key-id { + type string; + } + } + } + + rpc add-private-key { + description "Add a list of private keys into the keystore."; + input { + uses private-keys; + } + } + + rpc remove-private-key { + description "Remove a list of private keys from the data store."; + input { + leaf-list name { + type string; + } + } + } + + rpc add-trusted-certificate { + description "Add a list of trusted certificates into the keystore."; + input { + uses trusted-certificates; + } + } + + rpc remove-trusted-certificate { + description "Remove a list of trusted certificates from the data store."; + input { + leaf-list name { + type string; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/netconf-node-inventory.yang b/experimental/odp/netconf-node-inventory.yang deleted file mode 100644 index e7ac38cba..000000000 --- a/experimental/odp/netconf-node-inventory.yang +++ /dev/null @@ -1,39 +0,0 @@ -module netconf-node-inventory { - namespace "urn:opendaylight:netconf-node-inventory"; - prefix "netinv"; - - import opendaylight-inventory { prefix inv; revision-date "2013-08-19";} - import yang-ext {prefix ext; revision-date "2013-07-09";} - - revision "2014-01-08" { - description "Initial revision of Inventory model"; - } - - grouping netconf-node-fields { - leaf connected { - type boolean; - } - - leaf-list initial-capability { - type string; - } - - leaf-list current-capability { - type string; - } - - container pass-through { - when "../connected = true"; - description - "When the underlying node is connected, its NETCONF context - is available verbatim under this container through the - mount extension."; - } - } - - augment /inv:nodes/inv:node { - ext:augment-identifier "netconf-node"; - - uses netconf-node-fields; - } -} diff --git a/experimental/odp/netconf-node-topology.yang b/experimental/odp/netconf-node-topology.yang new file mode 100644 index 000000000..78fb0422e --- /dev/null +++ b/experimental/odp/netconf-node-topology.yang @@ -0,0 +1,367 @@ +module netconf-node-topology { + namespace "urn:opendaylight:netconf-node-topology"; + prefix "nettop"; + + import network-topology { prefix nt; revision-date 2013-10-21; } + import yang-ext { prefix ext; revision-date "2013-07-09";} + import ietf-inet-types { prefix inet; revision-date "2013-07-15"; } + + revision "2015-01-14" { + description "Initial revision of Topology model"; + } + + augment "/nt:network-topology/nt:topology/nt:topology-types" { + container topology-netconf { + presence "The presence of the container node indicates a network + of NETCONF devices"; + } + } + + grouping username-password { + leaf username { + type string; + } + + leaf password { + type string; + } + } + + grouping netconf-node-credentials { + choice credentials { + config true; + case login-password { + description "Deprecated way of storing credentials, unencrypted."; + + status deprecated; + uses username-password; + } + case login-pw { + description "login-password credentials, encrypted."; + + container login-password { + uses username-password; + } + } + case login-pw-unencrypted { + description "login-password credentials, not encrypted."; + + container login-password-unencrypted { + uses username-password; + } + } + case key-auth { + description "key-based authentication, use the id for the pair thats stored in the keystore."; + + container key-based { + leaf key-id { + type string; + } + + leaf username { + type string; + } + } + } + } + } + + grouping netconf-node-connection-parameters { + + leaf host { + type inet:host; + } + + leaf port { + type inet:port-number; + } + + leaf tcp-only { + config true; + type boolean; + } + + container protocol { + config true; + leaf name { + type enumeration { + enum SSH; + enum TLS; + } + default SSH; + } + + choice specification { + case tls-case { + container tls { + leaf-list excluded-versions { + type string; + description "A list of TLS version names provided in JDK that are not supported by the + target netconf device, eg, the netopeer2 simulator does not support the + SSLv2Hello. Most of the time, this list need not be set"; + } + } + } + } + } + + leaf schemaless { + type boolean; + default false; + } + + container yang-module-capabilities { + config true; + leaf override { + type boolean; + default false; + description "Whether to override or merge this list of capabilities with capabilities from device"; + } + + leaf-list capability { + type string; + description "Set a list of capabilities to override capabilities provided in device's hello message. + Can be used for devices that do not report any yang modules in their hello message"; + } + } + + container non-module-capabilities { + config true; + leaf override { + type boolean; + default false; + description "Whether to override or merge this list of non-module based capabilities with non-module + based capabilities from device"; + } + + leaf-list capability { + type string; + description "Set a list of non-module based capabilities to override or merge non-module capabilities + provided in device's hello message. Can be used for devices that do not report or + incorrectly report non-module based capabilities in their hello message"; + } + } + + leaf reconnect-on-changed-schema { + config true; + type boolean; + default false; + description "If true, the connector would auto disconnect/reconnect when schemas are changed in the remote device. + The connector subscribes (right after connect) to base netconf notifications and listens for netconf-capability-change notification"; + } + + leaf connection-timeout-millis { + description "Specifies timeout in milliseconds after which connection must be established."; + config true; + type uint32; + default 20000; + } + + leaf default-request-timeout-millis { + description "Timeout for blocking operations within transactions."; + config true; + type uint32; + default 60000; + } + + leaf max-connection-attempts { + description "Maximum number of connection retries. Non positive value or null is interpreted as infinity."; + config true; + type uint32; + default 0; // retry forever + } + + leaf between-attempts-timeout-millis { + description "Initial timeout in milliseconds to wait between connection attempts. Will be multiplied by sleep-factor with every additional attempt"; + config true; + type uint16; + default 2000; + } + + leaf sleep-factor { + config true; + type decimal64 { + fraction-digits 1; + } + default 1.5; + } + + // Keepalive configuration + leaf keepalive-delay { + config true; + type uint32; + default 120; + description "Netconf connector sends keepalive RPCs while the session is idle, this delay specifies the delay between keepalive RPC in seconds + If a value <1 is provided, no keepalives will be sent"; + } + + leaf concurrent-rpc-limit { + config true; + type uint16; + default 0; + description "Limit of concurrent messages that can be send before reply messages are received. + If value <1 is provided, no limit will be enforced"; + } + + leaf actor-response-wait-time { + config true; + type uint16 { + range "1..max"; + } + default 5; + description "Time that slave actor will wait for response from master."; + } + + container odl-hello-message-capabilities { + config true; + leaf-list capability { + type inet:uri; + description "Certain devices are non-accepting of ODL's hello message. This allows specification of + a custom ODL hello message based on a list of supported capabilities."; + } + } + } + + grouping netconf-node-connection-status { + + leaf connection-status { + config false; + type enumeration { + enum connecting; + enum connected; + enum unable-to-connect; + } + } + + container clustered-connection-status { + config false; + list node-status { + leaf node { + type string; + } + leaf status { + type enumeration { + enum connected; + enum unavailable; + enum failed; + } + } + } + leaf netconf-master-node { + config false; + type string; + } + } + + leaf connected-message { + config false; + type string; + } + + container available-capabilities { + config false; + list available-capability { + leaf capability { + type string; + } + leaf capability-origin { + type enumeration { + enum user-defined; + enum device-advertised; + } + } + } + } + + container unavailable-capabilities { + config false; + list unavailable-capability { + leaf capability { + type string; + } + + leaf failure-reason { + type enumeration { + enum missing-source; + enum unable-to-resolve; + } + } + } + } + + container pass-through { + when "../connection-status = connected"; + description + "When the underlying node is connected, its NETCONF context + is available verbatim under this container through the + mount extension."; + } + + } + + grouping netconf-schema-storage { + leaf schema-cache-directory { + config true; + type string; + default "schema"; + description "The destination schema repository for yang files relative to the cache directory. This may be specified per netconf mount + so that the loaded yang files are stored to a distinct directory to avoid potential conflict."; + } + + container yang-library { + leaf yang-library-url { + config true; + type inet:uri; + description "Yang library to be plugged as additional source provider into the shared schema repository"; + } + + // credentials for basic http authentication + leaf username { + config true; + type string; + } + + leaf password { + config true; + type string; + } + } + } + + grouping netconf-node-fields { + + uses netconf-node-credentials; + + uses netconf-node-connection-parameters; + + uses netconf-node-connection-status; + + uses netconf-schema-storage; + + } + + rpc create-device { + input { + uses netconf-node-fields; + leaf node-id { + type string; + } + } + } + + rpc delete-device { + input { + leaf node-id { + type string; + } + } + } + + augment "/nt:network-topology/nt:topology/nt:node" { + when "../../nt:topology-types/topology-netconf"; + ext:augment-identifier "netconf-node"; + + uses netconf-node-fields; + } + +} diff --git a/experimental/odp/netvirt-sfc-acl.yang b/experimental/odp/netvirt-sfc-acl.yang new file mode 100644 index 000000000..a479b18d2 --- /dev/null +++ b/experimental/odp/netvirt-sfc-acl.yang @@ -0,0 +1,53 @@ +module netvirt-sfc-acl { + yang-version 1; + namespace "urn:opendaylight:netvirt:sfc:acl"; + prefix "acl"; + + import ietf-access-control-list { prefix ietf-acl; revision-date 2016-02-18; } + import yang-ext { prefix ext; } + + revision "2015-01-05" { + description "Initial revision of netvirt extensions to ietf-acl model"; + } + + augment "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:matches" { + description "Neutron network uuid"; + ext:augment-identifier "neutron-network"; + leaf network-uuid { + type string; + } + } + + augment "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:matches" { + description "Match traffic based on its source or destination neutron port"; + ext:augment-identifier "neutron-ports"; + leaf source-port-uuid { + type string; + } + leaf destination-port-uuid { + type string; + } + } + + grouping netvirtsfc-acl-actions { + leaf sfc-name { + type string; + } + leaf sfp-name { + type string; + } + leaf rsp-name { + type string; + } + leaf render-rsp { + type boolean; + default "false"; + } + } + + augment "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:actions" { + description "Redirect traffic to SFC identified by either SFC, SFP or RSP"; + ext:augment-identifier "redirect-to-sfc"; + uses netvirtsfc-acl-actions; + } +} diff --git a/experimental/odp/netvirt-sfc-classifier.yang b/experimental/odp/netvirt-sfc-classifier.yang new file mode 100644 index 000000000..c9f4564b0 --- /dev/null +++ b/experimental/odp/netvirt-sfc-classifier.yang @@ -0,0 +1,48 @@ +module netvirt-sfc-classifier { + yang-version 1; + namespace "urn:opendaylight:netvirt:sfc:classifier"; + prefix "classifier"; + + revision "2015-01-05" { + description "Initial revision of netvirt classifier model"; + } + + container classifiers { + description "Classifier container which represents the ACL being applied, + attachment point and the associated chain"; + + list classifier { + description "A list of SFC classifiers"; + key "name"; + leaf name { + type string; + } + leaf acl { + type string; + } + container sffs { + list sff { + description "The classifier will be attached to these SFFs"; + key "name"; + leaf name { + type string; + } + } + } + container bridges { + list bridge { + key "name"; + leaf name { + type string; + } + leaf direction { + type enumeration { + enum ingress; + enum egress; + } + } + } + } + } + } +} diff --git a/experimental/odp/netvirt-sfc.yang b/experimental/odp/netvirt-sfc.yang new file mode 100644 index 000000000..e00ddb623 --- /dev/null +++ b/experimental/odp/netvirt-sfc.yang @@ -0,0 +1,15 @@ +module netvirt-sfc { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:netvirt:sfc"; + prefix "netvirt-sfc"; + + revision "2015-01-05" { + description "Initial revision of the netvirt sfc model"; + } + + container sfc { + leaf name { + type string; + } + } +} diff --git a/experimental/odp/network-concepts.yang b/experimental/odp/network-concepts.yang new file mode 100644 index 000000000..a4e6f28c5 --- /dev/null +++ b/experimental/odp/network-concepts.yang @@ -0,0 +1,72 @@ +module network-concepts { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:network:concepts"; + prefix "netc"; + + import ieee754 { prefix ieee754; revision-date 2013-08-19; } + + organization "Cisco Systems, Inc."; + contact "Dana Kutenicsova "; + + description + "This module contains the base data model of used general + concepts. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2013-11-25" { + description + "Rename to network concepts"; + } + + revision "2013-09-30" { + description + "Initial revision."; + } + + typedef iso-system-identifier { + reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4"; + type binary { + length "6"; + } + } + + typedef igp-metric { + reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2.3"; + type uint32 { + range "0..16777215"; + } + } + + typedef te-metric { + reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2.3"; + type uint32; + } + + typedef bandwidth { + type ieee754:float32; + } + + typedef metric { + reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.4"; + type uint32; + } + + typedef accumulated-igp-metric { + reference "https://tools.ietf.org/html/rfc7311#section-3"; + type uint64; + } + + typedef mpls-label { + reference "https://tools.ietf.org/html/rfc3032#section-2.1"; + type uint32 { + range "0..1048575"; + } + } +} + diff --git a/experimental/odp/network-config.yang b/experimental/odp/network-config.yang new file mode 100644 index 000000000..36166467a --- /dev/null +++ b/experimental/odp/network-config.yang @@ -0,0 +1,33 @@ +module network-config { + yang-version 1; + namespace "urn:opendaylight:genius:networkutils:config"; + prefix "network-config"; + description + "Configuration for network parameters"; + + revision "2018-11-29" { + description + "Initial revision."; + } + + container network-config { + config true; + + leaf opendaylight-vni-ranges { + type string; + default "70000:99999"; + } + + leaf opendaylight-rd-start-value { + type string; + description "start value of auto generated RD"; + default "100:1"; + } + + leaf opendaylight-rd-count { + type uint32; + description "number of RD values to be autogenarated"; + default 65535; + } + } +} diff --git a/experimental/odp/network-pcep-topology-config.yang b/experimental/odp/network-pcep-topology-config.yang new file mode 100644 index 000000000..d624bdb3a --- /dev/null +++ b/experimental/odp/network-pcep-topology-config.yang @@ -0,0 +1,50 @@ +// vi: set smarttab et sw=4 tabstop=4: +module network-pcep-topology-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:pcep:config"; + prefix pnc; + + import network-topology { prefix nt; revision-date 2013-10-21; } + import network-topology-pcep { prefix pn; revision-date 2018-11-09; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + import pcep-config { prefix pdc; revision-date 2017-10-25; } + + description + "This module contains the PCEP config extensions to base topology model. + Copyright (c)2017 AT&T Services, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + organization "AT&T Services, Inc."; + contact "Claudio D. Gasparini "; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision "2017-10-25" { + description + "Initial revision."; + } + + augment "/nt:network-topology/nt:topology" { + when "nt:topology-types/pn:topology-pcep"; + ext:augment-identifier pcep-topology-type-config; + description "Augment Pcep topology with session config"; + + uses pdc:pcep-config; + } + + augment "/nt:network-topology/nt:topology/nt:node" { + when "../nt:topology-types/pn:topology-pcep"; + ext:augment-identifier pcep-node-config; + description "Augment Pcep topology node with config"; + + uses pdc:pcep-node-config; + } +} \ No newline at end of file diff --git a/experimental/odp/network-pcep-topology-stats.yang b/experimental/odp/network-pcep-topology-stats.yang new file mode 100644 index 000000000..5dea856aa --- /dev/null +++ b/experimental/odp/network-pcep-topology-stats.yang @@ -0,0 +1,42 @@ +// vi: set smarttab et sw=4 tabstop=4: +module network-pcep-topology-stats { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:pcep:stats"; + prefix npts; + + import network-topology { prefix nt; revision-date 2013-10-21; } + import network-topology-pcep { prefix pn; revision-date 2018-11-09; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + import pcep-session-stats { prefix pss; revision-date 2017-11-13; } + + description + "This module contains the PCEP stats extensions to base topology model. + Copyright (c)2017 AT&T Services, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + organization "AT&T Services, Inc."; + contact "Claudio D. Gasparini "; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision "2017-11-13" { + description + "Initial revision."; + } + + augment "/nt:network-topology/nt:topology/nt:node" { + when "../nt:topology-types/pn:topology-pcep"; + ext:augment-identifier pcep-topology-node-stats-aug; + description "Augment Pcep topology node with session stats"; + + uses pss:pcep-session-state-grouping; + } +} \ No newline at end of file diff --git a/experimental/odp/network-policy-aug.yang b/experimental/odp/network-policy-aug.yang new file mode 100644 index 000000000..0b4978a22 --- /dev/null +++ b/experimental/odp/network-policy-aug.yang @@ -0,0 +1,65 @@ +module network-policy-aug { + yang-version 1; + namespace "urn:opendaylight:k8s:network-policy-aug"; + prefix "network-policy-aug"; + + description + "This YANG module defines the kubernetes network policy API + augmentations."; + + revision "2018-12-05" { + description "Initial revision."; + } + + import yang-ext { prefix "ext"; } + import k8s { prefix k8s; revision-date "2018-12-05"; } + import meta-v1 { prefix meta-v1; revision-date "2018-12-05"; } + import network-policy { prefix network-policy; revision-date "2018-12-05"; } + import pod { prefix pod; revision-date "2017-06-11"; } + + organization "OpenDaylight COE Group"; + + contact "COE Developers "; + + grouping pods { + list pods { + key "uid"; + + description + "List of all configured pods in the network."; + + uses pod:pod_attributes; + } + } + } + + augment "/k8s:k8s/k8s:network-policies/k8s:network-policy/k8s:pod-selector" { + description "Augment the network-policy container with pods information."; + ext:augment-identifier "spec-pod-selector-aug"; + uses pods; + } + + augment "/k8s:k8s/k8s:network-policies/k8s:network-policy/k8s:ingress/k8s:from/k8s:peer-pod-selector" { + description "Augment the container with pods information."; + ext:augment-identifier "from-peer-pod-selector-aug"; + uses pods; + } + + augment "/k8s:k8s/k8s:network-policies/k8s:network-policy/k8s:egress/k8s:to/k8s:peer-pod-selector" { + description "Augment the container with pods information."; + ext:augment-identifier "to-peer-pod-selector-aug"; + uses pods; + } + + augment "/k8s:k8s/k8s:network-policies/k8s:network-policy/k8s:ingress/k8s:from/k8s:peer-namespace-selector" { + description "Augment the container with pods information."; + ext:augment-identifier "from-peer-namespace-selector-aug"; + uses pods; + } + + augment "/k8s:k8s/k8s:network-policies/k8s:network-policy/k8s:egress/k8s:to/k8s:peer-namespace-selector" { + description "Augment the container with pods information."; + ext:augment-identifier "to-peer-namespace-selector-aug"; + uses pods; + } +} diff --git a/experimental/odp/network-policy.yang b/experimental/odp/network-policy.yang new file mode 100644 index 000000000..045217a9b --- /dev/null +++ b/experimental/odp/network-policy.yang @@ -0,0 +1,281 @@ +module network-policy { + yang-version 1; + namespace "urn:opendaylight:k8s:network-policy"; + prefix "network-policy"; + + description + "This YANG module defines the kubernetes network policy API."; + + revision "2018-12-05" { + description "Initial revision."; + } + + import ietf-yang-types { prefix yang; revision-date "2013-07-15"; } + import core { prefix core; revision-date "2018-12-05"; } + import meta-v1 { prefix meta-v1; revision-date "2018-12-05"; } + + organization "OpenDaylight COE Group"; + + contact "COE Developers "; + + typedef policy-type { + description "List of rule types that the NetworkPolicy relates to."; + type enumeration { + enum "egress"; + enum "ingress"; + } + } + + grouping ip-block { + description + "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") that + is allowed to the pods matched by a NetworkPolicySpec's + podSelector. The except entry describes CIDRs that should + not be included within this rule."; + + container ip-block { + leaf cidr { + description + "CIDR is a string representing the IP Block + Valid examples are \"192.168.1.1/24\""; + + type string; + + mandatory true; + } + + leaf-list except { + description + "Except is a slice of CIDRs that should not be included within + an IP Block. Valid examples are \"192.168.1.1/24\". Except + values will be rejected if they are outside the CIDR range."; + + type string; + } + } + } + + grouping network-policy-peer { + description + "NetworkPolicyPeer describes a peer to allow traffic from."; + + container network-policy-peer { + container peer-pod-selector { + description + "This is a label selector which selects Pods. This field + follows standard label selector semantics; if present but + empty, it selects all pods. If NamespaceSelector is also set, + then the NetworkPolicyPeer as a whole selects the Pods + matching PodSelector in the Namespaces selected by + NamespaceSelector. Otherwise it selects the Pods matching + PodSelector in the policy's own Namespace."; + + uses meta-v1:label-selector; + } + + container peer-namespace-selector { + description + "Selects Namespaces using cluster-scoped labels. This field + follows standard label selector semantics; if present but + empty, it selects all namespaces. If PodSelector is also set, + then the NetworkPolicyPeer as a whole selects the Pods + matching PodSelector in the Namespaces selected by + NamespaceSelector. Otherwise it selects all Pods in the + Namespaces selected by NamespaceSelector."; + + uses meta-v1:label-selector; + } + + /* + IPBlock defines policy on a particular IPBlock. If this field + is set then neither of the other fields can be. + */ + uses ip-block; + } + } + + grouping network-policy-port { + description + "NetworkPolicyPort describes a port to allow traffic on"; + + container network-policy-port { + leaf protocol { + description + "The protocol (TCP, UDP, or SCTP) which traffic must match. + If not specified, this field defaults to TCP."; + + type core:protocol; + } + + leaf port { + description + "The port on the given protocol. This can either be a + numerical or named port on a pod. If this field is not + provided, this matches all port names and numbers."; + + type string; + } + } + } + + grouping network-policy-ingress-rule { + description + "NetworkPolicyIngressRule describes a particular set of traffic + that is allowed to the pods matched by a NetworkPolicySpec's + podSelector. The traffic must match both ports and from."; + + container network-policy-ingress-rule { + list ingress-ports { + description + "List of ports which should be made accessible on the pods + selected for this rule. Each item in this list is combined + using a logical OR. If this field is empty or missing, this + rule matches all ports (traffic not restricted by port). If + this field is present and contains at least one item, then + this rule allows traffic only if the traffic matches at least + one port in the list."; + + uses network-policy-port; + } + + list from { + description + "List of sources which should be able to access the pods + selected for this rule. Items in this list are combined using + a logical OR operation. If this field is empty or missing, + this rule matches all sources (traffic not restricted by + source). If this field is present and contains at least on + item, this rule allows traffic only if the traffic matches + at least one item in the from list."; + + uses network-policy-peer; + } + } + } + + grouping network-policy-egress-rule { + description + "NetworkPolicyEgressRule describes a particular set of traffic + that is allowed out of pods matched by a NetworkPolicySpec's + podSelector. The traffic must match both ports and to."; + + container network-policy-egress-rule { + list egress-ports { + description + "List of destination ports for outgoing traffic. + Each item in this list is combined using a logical OR. If + this field is empty or missing, this rule matches all ports + (traffic not restricted by port). If this field is present + and contains at least one item, then this rule allows traffic + only if the traffic matches at least one port in the list."; + + uses network-policy-port; + } + + list to { + description + "List of destinations for outgoing traffic of pods selected + for this rule. Items in this list are combined using a + logical OR operation. If this field is empty or missing, this + rule matches all destinations (traffic not restricted by + destination). If this field is present and contains at least + one item, this rule allows traffic only if the traffic + matches at least one item in the to list."; + + uses network-policy-peer; + } + } + } + + grouping network-policy-spec { + description + "NetworkPolicySpec provides the specification of a + NetworkPolicy."; + + container network-policy-spec { + container pod-selector { + description + "Selects the pods to which this NetworkPolicy object applies. The + array of ingress rules is applied to any pods selected by this + field. Multiple network policies can select the same set of pods. + In this case, the ingress rules for each are combined additively. + This field is NOT optional and follows standard label selector + semantics. An empty podSelector matches all pods in this + namespace."; + + uses meta-v1:label-selector; + } + + list ingress { + description + "List of ingress rules to be applied to the selected pods. + Traffic is allowed to a pod if there are no NetworkPolicies + selecting the pod (and cluster policy otherwise allows the + traffic), OR if the traffic source is the pod's local node, + OR if the traffic matches at least one ingress rule across + all of the NetworkPolicy objects whose podSelector matches + the pod. If this field is empty then this NetworkPolicy does + not allow any traffic (and serves solely to ensure that the + pods it selects are isolated by default)"; + + uses network-policy-ingress-rule; + } + + list egress { + description + "List of egress rules to be applied to the selected pods. + Outgoing traffic is allowed if there are no NetworkPolicies + selecting the pod (and cluster policy otherwise allows the + traffic), OR if the traffic matches at least one egress rule + across all of the NetworkPolicy objects whose podSelector + matches the pod. If this field is empty then this + NetworkPolicy limits all outgoing traffic (and serves solely + to ensure that the pods it selects are isolated by + default)."; + + uses network-policy-egress-rule; + } + + leaf-list policy-types { + description + "List of rule types that the NetworkPolicy relates to. + Valid options are Ingress, Egress, or Ingress,Egress. + If this field is not specified, it will default based on the + existence of Ingress or Egress rules; policies that contain + an Egress section are assumed to affect Egress, and all + policies (whether or not they contain an Ingress section) are + assumed to affect Ingress. If you want to write an + egress-only policy, you must explicitly specify policyTypes + [ Egress ]. Likewise, if you want to write a policy that + specifies that no egress is allowed, you must specify a + policyTypes value that include \"Egress\" (since such a policy + would not include an Egress section and would otherwise + default to just [ \"Ingress\" ])."; + + type policy-type; + } + } + } + + grouping network-policy { + description + "NetworkPolicyList is a list of NetworkPolicy objects."; + + container network-policies { + list network-policy { + key "uuid"; + + leaf uuid { + type yang:uuid; + description "UUID representing the network-policy."; + } + + leaf name { + type string; + } + + uses network-policy-spec; + } + } + } +} diff --git a/experimental/odp/network-topology-pcep-programming.yang b/experimental/odp/network-topology-pcep-programming.yang new file mode 100644 index 000000000..77a35ca36 --- /dev/null +++ b/experimental/odp/network-topology-pcep-programming.yang @@ -0,0 +1,100 @@ +module network-topology-pcep-programming { + // vi: set et smarttab sw=4 tabstop=4: + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:pcep:programming"; + prefix "pnp"; + + import network-topology-programming { prefix ntp; revision-date 2013-11-02; } + import network-topology-pcep { prefix pcep; revision-date 2018-11-09; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the PCEP extensions to base topology model. It + exposes the LSPs for which a particular node is the head end. + + This module exposes three programming instructions,add-lsp, + remove-lsp and update-lsp, which map to actively-stateful PCEP + operations using PCInitiate and PCUpd messages to initiate, + destroy and udpate LSP configuration. The lifecycle of these + instructions follows draft-crabbe-pce-pce-initiated-lsp and + draft-ietf-pce-stateful-pce, completing execution once the head-end + router has acknowledged operation success. Should the router become + disconnected, the instruction resolve to Cancelled if the message + has not been sent into the TCP socket, or Failed it they have. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision 2017-10-25 { + description "Update network-topology-pcep revision"; + } + + revision "2013-11-06" { + description + "Initial revision."; + reference ""; + } + + rpc submit-add-lsp { + input { + uses ntp:topology-instruction-input; + uses pcep:add-lsp-args; + } + output { + uses ntp:topology-instruction-output; + } + } + + rpc submit-remove-lsp { + input { + uses ntp:topology-instruction-input; + uses pcep:remove-lsp-args; + } + output { + uses ntp:topology-instruction-output; + } + } + + rpc submit-update-lsp { + input { + uses ntp:topology-instruction-input; + uses pcep:update-lsp-args; + } + output { + uses ntp:topology-instruction-output; + } + } + + rpc submit-ensure-lsp-operational { + input { + uses ntp:topology-instruction-input; + uses pcep:ensure-lsp-operational-args; + } + output { + uses ntp:topology-instruction-output; + } + } + + rpc submit-trigger-sync { + input { + uses ntp:topology-instruction-input; + uses pcep:trigger-sync-args; + } + output { + uses ntp:topology-instruction-output; + } + } +} + diff --git a/experimental/odp/network-topology-pcep.yang b/experimental/odp/network-topology-pcep.yang new file mode 100644 index 000000000..d5eaf1527 --- /dev/null +++ b/experimental/odp/network-topology-pcep.yang @@ -0,0 +1,323 @@ +module network-topology-pcep { + // vi: set et smarttab sw=4 tabstop=4: + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:pcep"; + prefix "pn"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import network-topology { prefix nt; revision-date 2013-10-21; } + import odl-network-topology { prefix ont; revision-date 2014-01-13; } + import pcep-types { prefix pcep; revision-date 2018-11-09; } + import rsvp { prefix rsvp; revision-date 2015-08-20; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the PCEP extensions to base topology model. It + exposes the LSPs for which a particular node is the head end. + + This module exposes three programming instructions,add-lsp, + remove-lsp and update-lsp, which map to actively-stateful PCEP + operations using PCInitiate and PCUpd messages to initiate, + destroy and udpate LSP configuration. The lifecycle of these + instructions follows draft-crabbe-pce-pce-initiated-lsp and + draft-ietf-pce-stateful-pce, completing execution once the head-end + router has acknowledged operation success. Should the router become + disconnected, the instruction resolve to Cancelled if the message + has not been sent into the TCP socket, or Failed it they have. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision 2017-10-25 { + description "Add release-connection rpc"; + } + + revision "2013-10-24" { + description + "Initial revision."; + reference ""; + } + + typedef pcc-sync-state { + type enumeration { + enum initial-resync { + description + "Initial state resynchronization is being performed."; + } + enum incremental-sync { + description + "Incremental state resynchronization is being performed."; + } + enum triggered-initial-sync { + description + "Triggered initial state resynchronization is being performed."; + } + enum pcep-triggered-resync { + description + "Pcep triggered state resynchronization is being performed."; + } + enum synchronized { + description + "State synchronization has been achieved."; + } + } + } + + grouping topology-pcep-type { + container topology-pcep { + presence "indicates a PCEP-aware topology"; + } + } + + augment "/nt:network-topology/nt:topology/nt:topology-types" { + uses topology-pcep-type; + } + + grouping pcep-client-attributes { + description "Data present in a node which is a PCEP client (PCC)."; + + container path-computation-client { + description + "PCC-related run-time information. This container is only + present when the node is connected through PCEP in a PCC + role."; + config false; + + leaf ip-address { + description + "IP address which the node used to connected to the PCE. + There are no guarantees as to reachability of the address, + nor its relationship to other control, management, or + data plane addresses."; + + type inet:ip-address; + } + + container stateful-tlv { + + } + + leaf state-sync { + type pcc-sync-state; + when "../stateful-tlv"; + } + + list reported-lsp { + leaf name { + type string; + } + key name; + + list path { + leaf lsp-id { + type rsvp:lsp-id; + mandatory true; + } + key lsp-id; + + uses pcep:path-definition; + } + uses lsp-metadata; + } + } + } + + augment "/nt:network-topology/nt:topology/nt:node" { + when "../../nt:topology-types/topology-pcep"; + + uses pcep-client-attributes; + } + + typedef failure-type { + description + "Enumeration of all the distinct failure modes that can + happen while servicing a request towards the PCC."; + + type enumeration { + enum unsent { + description + "The request failed before it was sent to the PCC. + PCC's state is guaranteed not to reflect state + transition implied by the request. This typically + happens if the request is syntactically invalid, + the target PCC is not connected or disconnects + while the request is enqueued."; + } + enum no-ack { + description + "The request has been sent to the PCC, but either the + session went down before we have received confirmation + of the request being received by the PCC, or the request + timed-out waiting for response from PCC. PCC's state is + unknown -- the request may or may not be reflected + in its internal state. The caller should not make + any hard assumptions about PCC state until it reconnects + and state synchronization completes."; + } + enum failed { + description + "The request has been seen by the PCC, where it failed + for some external reason. The caller can assume the + state transition has not taken place, but is advised + to examine the attached error list to gain a deeper + understanding of the failure cause."; + } + } + } + + grouping node-id { + leaf node { + type nt:node-ref; + mandatory true; + } + } + + grouping lsp-id { + uses node-id; + + leaf name { + type string; + mandatory true; + } + } + + grouping operation-result { + leaf failure { + type failure-type; + } + + list error { + when "../failure = failed"; + uses pcep:pcep-error-object; + } + } + + grouping lsp-metadata { + + container metadata { + description + "Container for external metadata attached to the LSP. Contents of this container + are not propagated onto the router itself, so it is persisted only while the LSP + is present."; + } + } + + grouping add-lsp-args { + uses lsp-id; + + container arguments { + + uses pcep:endpoints-object; + + uses pcep:path-definition; + + uses lsp-metadata; + } + } + + rpc add-lsp { + input { + uses ont:network-topology-reference; + uses add-lsp-args; + } + output { + uses operation-result; + } + } + + grouping remove-lsp-args { + uses lsp-id; + } + + rpc remove-lsp { + input { + uses ont:network-topology-reference; + uses remove-lsp-args; + } + output { + uses operation-result; + } + } + + grouping update-lsp-args { + uses lsp-id; + + container arguments { + + uses pcep:path-definition; + + uses lsp-metadata; + } + } + + rpc update-lsp { + input { + uses ont:network-topology-reference; + uses update-lsp-args; + } + output { + uses operation-result; + } + } + + grouping ensure-lsp-operational-args { + uses lsp-id; + + container arguments { + + } + } + + rpc ensure-lsp-operational { + description + "Ensure that the target LSP is provisioned and has specified + operational status."; + + input { + uses ont:network-topology-reference; + uses ensure-lsp-operational-args; + } + output { + uses operation-result; + } + } + + grouping trigger-sync-args { + uses lsp-id { + refine name { + mandatory false; + } + } + } + + rpc trigger-sync { + input { + uses ont:network-topology-reference; + uses trigger-sync-args; + } + output { + uses operation-result; + } + } + + rpc tear-down-session { + description "Closes the session between PCE and PCC."; + input { + uses ont:network-topology-reference; + uses node-id; + } + } +} + diff --git a/experimental/odp/network-topology-programming.yang b/experimental/odp/network-topology-programming.yang new file mode 100644 index 000000000..b9da4e495 --- /dev/null +++ b/experimental/odp/network-topology-programming.yang @@ -0,0 +1,39 @@ +module network-topology-programming { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:programming"; + prefix "tp"; + + import network-topology { prefix nt; revision-date 2013-10-21; } + import odl-network-topology { prefix ont; revision-date 2014-01-13; } + import programming { prefix pgm; revision-date 2015-07-20; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the programming extensions for tunnel + topologies. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2013-11-02" { + description + "Initial revision."; + reference ""; + } + + grouping topology-instruction-input { + uses pgm:submit-instruction-input; + uses ont:network-topology-reference; + } + + grouping topology-instruction-output { + uses pgm:submit-instruction-output; + } +} + diff --git a/experimental/odp/network-topology-sr.yang b/experimental/odp/network-topology-sr.yang new file mode 100644 index 000000000..b94990aa8 --- /dev/null +++ b/experimental/odp/network-topology-sr.yang @@ -0,0 +1,93 @@ +module network-topology-sr { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:sr"; + prefix "sr"; + + import network-topology { prefix nt; revision-date 2013-10-21; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the Segment Routing extensions to + the base network topology model. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2013-08-19" { + description + "Initial revision."; + reference ""; + } + + typedef segment-id { + type uint32; + reference "http://tools.ietf.org/html/draft-filsfils-rtgwg-segment-routing-00#section-1.1"; + } + + typedef segment-ref { + type leafref { + path "/nt:network-topology/nt:topology/nt:node/segments/segment-id"; + } + } + + grouping sr-link-attributes { + leaf segment { + type segment-ref; + } + } + + grouping sr-node-attributes { + list segments { + leaf segment-id { + type segment-id; + mandatory true; + } + key segment-id; + + choice segment-specification { + case adjacency-case { + container adjacency { + leaf adjacency { + type nt:link-ref; + mandatory true; + } + } + } + case node-case { + container node { + leaf node { + type nt:node-ref; + mandatory true; + } + } + } + } + } + } + + grouping topology-sr-type { + container topology-sr { + presence "indicates a Segment Routing-aware topology"; + } + } + + augment "/nt:network-topology/nt:topology/nt:topology-types" { + uses topology-sr-type; + } + + augment "/nt:network-topology/nt:topology/nt:link" { + when "../../nt:topology-types/topology-sr"; + uses sr-link-attributes; + } + + augment "/nt:network-topology/nt:topology/nt:node" { + when "../../nt:topology-types/topology-sr"; + uses sr-node-attributes; + } +} diff --git a/experimental/odp/network-topology@2013-10-21.yang b/experimental/odp/network-topology@2013-10-21.yang new file mode 100644 index 000000000..dc5dcad70 --- /dev/null +++ b/experimental/odp/network-topology@2013-10-21.yang @@ -0,0 +1,339 @@ +module network-topology { + yang-version 1; + namespace "urn:TBD:params:xml:ns:yang:network-topology"; + // replace with IANA namespace when assigned + prefix "nt"; + + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + + organization "TBD"; + + contact "WILL-BE-DEFINED-LATER"; + + description + "This module defines a model for the topology of a network. + Key design decisions are as follows: + A topology consists of a set of nodes and links. + Links are point-to-point and unidirectional. + Bidirectional connections need to be represented through + two separate links. + Multipoint connections, broadcast domains etc can be represented + through a hierarchy of nodes, then connecting nodes at + upper layers of the hierarchy."; + + revision 2013-10-21 { + description + "Initial revision."; + } + + typedef topology-id { + type inet:uri; + description + "An identifier for a topology."; + } + + typedef node-id { + type inet:uri; + description + "An identifier for a node in a topology. + The identifier may be opaque. + The identifier SHOULD be chosen such that the same node in a + real network topology will always be identified through the + same identifier, even if the model is instantiated in separate + datastores. An implementation MAY choose to capture semantics + in the identifier, for example to indicate the type of node + and/or the type of topology that the node is a part of."; + } + + + typedef link-id { + type inet:uri; + description + "An identifier for a link in a topology. + The identifier may be opaque. + The identifier SHOULD be chosen such that the same link in a + real network topology will always be identified through the + same identifier, even if the model is instantiated in separate + datastores. An implementation MAY choose to capture semantics + in the identifier, for example to indicate the type of link + and/or the type of topology that the link is a part of."; + } + + typedef tp-id { + type inet:uri; + description + "An identifier for termination points on a node. + The identifier may be opaque. + The identifier SHOULD be chosen such that the same TP in a + real network topology will always be identified through the + same identifier, even if the model is instantiated in separate + datastores. An implementation MAY choose to capture semantics + in the identifier, for example to indicate the type of TP + and/or the type of node and topology that the TP is a part of."; + } + + typedef tp-ref { + type leafref { + path "/network-topology/topology/node/termination-point/tp-id"; + } + description + "A type for an absolute reference to a termination point. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + typedef topology-ref { + type leafref { + path "/network-topology/topology/topology-id"; + } + description + "A type for an absolute reference a topology instance."; + } + + typedef node-ref { + type leafref { + path "/network-topology/topology/node/node-id"; + } + description + + "A type for an absolute reference to a node instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + + typedef link-ref { + type leafref { + path "/network-topology/topology/link/link-id"; + } + description + "A type for an absolute reference a link instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + + grouping tp-attributes { + description + "The data objects needed to define a termination point. + (This only includes a single leaf at this point, used + to identify the termination point.) + Provided in a grouping so that in addition to the datastore, + the data can also be included in notifications."; + leaf tp-id { + type tp-id; + } + leaf-list tp-ref { + type tp-ref; + config false; + description + "The leaf list identifies any termination points that the + termination point is dependent on, or maps onto. + Those termination points will themselves be contained + in a supporting node. + This dependency information can be inferred from + the dependencies between links. For this reason, + this item is not separately configurable. Hence no + corresponding constraint needs to be articulated. + The corresponding information is simply provided by the + implementing system."; + } + } + + grouping node-attributes { + description + "The data objects needed to define a node. + The objects are provided in a grouping so that in addition to + the datastore, the data can also be included in notifications + as needed."; + + leaf node-id { + type node-id; + description + "The identifier of a node in the topology. + A node is specific to a topology to which it belongs."; + } + list supporting-node { + description + "This list defines vertical layering information for nodes. + It allows to capture for any given node, which node (or nodes) + in the corresponding underlay topology it maps onto. + A node can map to zero, one, or more nodes below it; + accordingly there can be zero, one, or more elements in the list. + If there are specific layering requirements, for example + specific to a particular type of topology that only allows + for certain layering relationships, the choice + below can be augmented with additional cases. + A list has been chosen rather than a leaf-list in order + to provide room for augmentations, e.g. for + statistics or priorization information associated with + supporting nodes."; + // This is not what was published in the initial draft, + // added topology-ref leaf and added it to the key + key "topology-ref node-ref"; + leaf topology-ref { + type topology-ref; + } + leaf node-ref { + type node-ref; + } + } + } + + grouping link-attributes { + // This is a grouping, not defined inline with the link definition itself, + // so it can be included in a notification, if needed + leaf link-id { + type link-id; + description + "The identifier of a link in the topology. + A link is specific to a topology to which it belongs."; + } + container source { + leaf source-node { + mandatory true; + type node-ref; + description + "Source node identifier, must be in same topology."; + } + leaf source-tp { + type tp-ref; + description + "Termination point within source node that terminates the link."; + + } + } + container destination { + leaf dest-node { + mandatory true; + type node-ref; + description + "Destination node identifier, must be in same topology."; + } + leaf dest-tp { + type tp-ref; + description + "Termination point within destination node that terminates the link."; + } + } + list supporting-link { + key "link-ref"; + leaf link-ref { + type link-ref; + } + } + } + + + container network-topology { + list topology { + description " + This is the model of an abstract topology. + A topology contains nodes and links. + Each topology MUST be identified by + unique topology-id for reason that a network could contain many + topologies. + "; + key "topology-id"; + leaf topology-id { + type topology-id; + description " + It is presumed that a datastore will contain many topologies. To + distinguish between topologies it is vital to have UNIQUE + topology identifiers. + "; + } + leaf server-provided { + type boolean; + config false; + description " + Indicates whether the topology is configurable by clients, + or whether it is provided by the server. This leaf is + + populated by the server implementing the model. + It is set to false for topologies that are created by a client; + it is set to true otherwise. If it is set to true, any + attempt to edit the topology MUST be rejected. + "; + } + container topology-types { + description + "This container is used to identify the type, or types + (as a topology can support several types simultaneously), + of the topology. + Topology types are the subject of several integrity constraints + that an implementing server can validate in order to + maintain integrity of the datastore. + Topology types are indicated through separate data nodes; + the set of topology types is expected to increase over time. + To add support for a new topology, an augmenting module + needs to augment this container with a new empty optional + container to indicate the new topology type. + The use of a container allows to indicate a subcategorization + of topology types. + The container SHALL NOT be augmented with any data nodes + that serve a purpose other than identifying a particular + topology type. + "; + } + list underlay-topology { + key "topology-ref"; + leaf topology-ref { + type topology-ref; + } + // a list, not a leaf-list, to allow for potential augmentation + // with properties specific to the underlay topology, + // such as statistics, preferences, or cost. + description + "Identifies the topology, or topologies, that this topology + is dependent on."; + } + + list node { + description "The list of network nodes defined for the topology."; + key "node-id"; + uses node-attributes; + must "boolean(../underlay-topology[*]/node[./supporting-nodes/node-ref])"; + // This constraint is meant to ensure that a referenced node is in fact + // a node in an underlay topology. + list termination-point { + description + + "A termination point can terminate a link. + Depending on the type of topology, a termination point could, + for example, refer to a port or an interface."; + key "tp-id"; + uses tp-attributes; + } + } + + list link { + description " + A Network Link connects a by Local (Source) node and + a Remote (Destination) Network Nodes via a set of the + nodes' termination points. + As it is possible to have several links between the same + source and destination nodes, and as a link could potentially + be re-homed between termination points, to ensure that we + would always know to distinguish between links, every link + is identified by a dedicated link identifier. + Note that a link models a point-to-point link, not a multipoint + link. + Layering dependencies on links in underlay topologies are + not represented as the layering information of nodes and of + termination points is sufficient. + "; + key "link-id"; + uses link-attributes; + must "boolean(../underlay-topology/link[./supporting-link])"; + // Constraint: any supporting link must be part of an underlay topology + must "boolean(../node[./source/source-node])"; + // Constraint: A link must have as source a node of the same topology + must "boolean(../node[./destination/dest-node])"; + // Constraint: A link must have as source a destination of the same topology + must "boolean(../node/termination-point[./source/source-tp])"; + // Constraint: The source termination point must be contained in the source node + must "boolean(../node/termination-point[./destination/dest-tp])"; + // Constraint: The destination termination point must be contained + // in the destination node + } + } + } +} diff --git a/experimental/odp/neutron-L3-ext.yang b/experimental/odp/neutron-L3-ext.yang new file mode 100644 index 000000000..4e32fdf07 --- /dev/null +++ b/experimental/odp/neutron-L3-ext.yang @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-L3-ext { + + yang-version 1; + + namespace "urn:opendaylight:neutron-L3-ext"; + + prefix neutron-L3-ext; + + import neutron { prefix "neutron"; } + import yang-ext { prefix "ext"; } + + organization "OpenDaylight Neutron Group"; + + contact "J. Gregory Hall , Kiran Sreenivasa "; + + description "This YANG module defines Openstack Neutron L3 model extensions"; + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + augment "/neutron:neutron/neutron:networks/neutron:network"{ + description "This module augments the networks container + in the neutron-networks module with router information."; + ext:augment-identifier "network-l3-extension"; + leaf external { + description "If true, it indicates that the router is externally accessible."; + type boolean; + default "false"; + } + } +} diff --git a/experimental/odp/neutron-L3.yang b/experimental/odp/neutron-L3.yang new file mode 100644 index 000000000..5e2ce387c --- /dev/null +++ b/experimental/odp/neutron-L3.yang @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-L3 { + + yang-version 1; + + namespace "urn:opendaylight:neutron-L3"; + + prefix neutron-L3; + + import ietf-yang-types { prefix "yang";} + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + import neutron-attrs { prefix "attrs"; } + + organization "OpenDaylight Neutron Group"; + + contact "J. Gregory Hall , Kiran Sreenivasa "; + + description "This YANG module defines attributes used by Openstack Neutron L3 modules."; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + grouping L3-attributes { + leaf distributed { + description "whether this router is distributed or not."; + type boolean; + default "false"; + } + leaf gateway-port-id { + description "the port uuid holding the router's gateway address."; + type yang:uuid; + } + list routes { + description "list of routes for this router."; + key "destination nexthop"; + leaf destination { + description "Specifies a destination in CIDR format"; + type inet:ip-prefix; + } + leaf nexthop { + type inet:ip-address; + } + } + leaf router-status { + description "Contains the Router status."; + type string; + } + } + + grouping L3-floatingip-attributes { + leaf router-id { + description "Contains the Router ID of this floatingip object."; + type yang:uuid; + } + leaf port-id { + description "Contains the Port ID of the fixed IP address that will be + associated with this object."; + type yang:uuid; + } + leaf floating-network-id { + description "The ID of the network associated with the floating IP."; + type yang:uuid; + } + leaf floating-ip-address { + description "The floating IP address."; + type inet:ip-address; + } + leaf fixed-ip-address { + description "The fixed IP address associated with the floating IP. + If you intend to associate the floating IP with a fixed IP at + creation time, then you must indicate the identifier of the + internal port(using port-id object). If an internal port has + multiple associated IP addresses, the service chooses the first + IP unless you explicitly specify the parameter fixed_ip_address + to select a specific IP."; + type inet:ip-address; + } + leaf status { + type string; + description "The network status."; + } + } + + grouping routers-attributes { + container routers { + list router { + + description "A logical entity for forwarding packets across internal subnets + and NATting them on external networks through an appropriate external + gateway."; + + key "uuid"; + uses attrs:base-attributes; + uses attrs:admin-attributes; + uses L3-attributes; + container external_gateway_info { + leaf external-network-id { + description "The network_id, for the external gateways. If this is empty, then this + network does not have external access"; + type yang:uuid; + } + leaf enable-snat { + description "If true, it indicates that the router is performing snat on external access "; + type boolean; + default "true"; + } + list external-fixed-ips { + description "external fixed IPs for this router "; + key "subnet-id ip-address"; + leaf subnet-id { + type yang:uuid; + } + leaf ip-address { + type inet:ip-address; + } + } + } + } + } + } + grouping floatingips-attributes { + container floatingips { + list floatingip { + + description "An external IP address that is mapped to a port that is + attached to an internal network."; + + key "uuid"; + uses attrs:id-attributes; + uses L3-floatingip-attributes; + } + } + } +} diff --git a/experimental/odp/neutron-attrs.yang b/experimental/odp/neutron-attrs.yang new file mode 100644 index 000000000..4ca1d6de1 --- /dev/null +++ b/experimental/odp/neutron-attrs.yang @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-attrs { + + yang-version 1; + + namespace "urn:opendaylight:neutron-attrs"; + + prefix neutron-attrs; + + import ietf-yang-types { prefix "yang"; revision-date "2013-07-15";} + + organization "OpenDaylight Neutron Group"; + + contact "J. Gregory Hall , Kiran Sreenivasa "; + + description "This YANG module defines groupings that are used + by OpenDaylight Neutron YANG modules."; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + grouping id-attributes { + leaf uuid { + type yang:uuid; + description "UUID to index this neutron object."; + } + leaf tenant-id { + status deprecated; + type yang:uuid; + description "The UUID of the tenant that will own the object."; + } + + leaf project-id { + type string { + length "0..255"; + } + description "The id of the project."; + } + + leaf revision-number { + type int64; + description "The revision number of the resource. Used as monotonic + counter that is updated whenever an object is updated + on neutron server"; + } + } + + grouping base-attributes { + uses id-attributes; + leaf name { + type string; + description "Human-readable name for the item. Might not be unique."; + } + } + + grouping admin-attributes { + leaf admin-state-up { + type boolean; + description "The administrative state of the object, which is up (true) or + down (false)."; + } + leaf status { + type string; + description "The object status."; + } + } +} diff --git a/experimental/odp/neutron-bgpvpns.yang b/experimental/odp/neutron-bgpvpns.yang new file mode 100644 index 000000000..67c506449 --- /dev/null +++ b/experimental/odp/neutron-bgpvpns.yang @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +module neutron-bgpvpns { + + yang-version 1; + + namespace "urn:opendaylight:neutron-bgpvpns"; + + prefix neutron-bgpvpns; + + import ietf-yang-types { prefix "yang"; } + import neutron-attrs { prefix "attrs"; } + + organization "OpenDaylight Neutron Group"; + + contact "Vishal Thapar "; + + description "This YANG module defines Openstack Liberty Neutron BGPVPN model"; + + revision "2015-09-03" { + description + "Initial version of Openstack Neutron Liberty BGPVPN model."; + } + + identity bgpvpn-type-base { + description + "Base Network type for all Bgpvpn type identifiers."; + } + + identity bgpvpn-type-l2 { + base bgpvpn-type-base; + description + "L2 bgpvpn type identity."; + } + identity bgpvpn-type-l3 { + base bgpvpn-type-base; + description + "L3 bgpvpn type identity."; + } + + typedef bgpvpn-type { + type identityref { + base bgpvpn-type-base; + } + description + "This type is used to refer to a Bgpvpn Type."; + } + + grouping bgpvpn-attributes { + leaf type { + type bgpvpn-type; + description "selection of the type of VPN. e.g. l3 or l2"; + } + leaf technique { + type string; + description "selection of technique used to implement VPN"; + } + leaf-list route-targets { + type string; + description "route-targets"; + } + leaf-list import-targets { + type string; + description "import RTs"; + } + leaf-list export-targets { + type string; + description "export RTs"; + } + leaf-list route-distinguishers { + type string; + description "list route-distinguishers"; + } + leaf vni { + type uint32; + description "globally assigned VxLanId"; + } + leaf auto-aggregate { + type boolean; + description "auto-aggregate enabled or not"; + default "false"; + } + leaf-list networks { + type yang:uuid; + description "list of networks this vpn is associated with."; + } + leaf-list routers { + type yang:uuid; + description "list of routers this vpn is associated with."; + } + } + + grouping bgpvpns-attributes { + container bgpvpns { + list bgpvpn { + key "uuid"; + uses attrs:base-attributes; + uses attrs:admin-attributes; + uses bgpvpn-attributes; + } + } + } +} diff --git a/experimental/odp/neutron-binding.yang b/experimental/odp/neutron-binding.yang new file mode 100644 index 000000000..1721fb836 --- /dev/null +++ b/experimental/odp/neutron-binding.yang @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2015 IBM Corporation. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-binding { + + yang-version 1; + + namespace "urn:opendaylight:neutron-binding"; + + prefix neutron-binding; + + import yang-ext { prefix "ext"; } + import neutron { prefix "neutron"; } + + + organization "OpenDaylight Neutron Group"; + + contact "Ryan Moats "; + + description "This YANG module defines binding attributes that are used + by OpenDaylight Neutron YANG modules."; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + grouping binding-attributes { + leaf host-id { + type string; + description "The ID of the host where the port is allocated. In some cases, + different implementations can run on different hosts."; + } + + list vif-details { + description "A dictionary that enables the application to pass information + about functions that the Networking API provides. To enable or + disable port filtering features such as security group and anti-MAC/IP + spoofing, specify port-filter: True or port-filter: False "; + // work around: "key" as leaf name in list can't be used due to java code + // generation. getKey() method is reserved for to retrieve key of the list + // and get() is also generated as a getter. it results in name + // collision. + // please see BindingGeneratorImpl#typeBuildersToGenTypes() for details. + // This isn't easily fixed as it's deeply hard-coded. + key details-key; + leaf details-key { + type string; + } + leaf value { + type string; + } + } + leaf vif-type { + type string; + } + leaf vnic-type { + type string; + } + leaf profile { + type string; + } + } + + augment "/neutron:neutron/neutron:ports/neutron:port" { + description "This module augments the ports container in + the neutron-ports module with binding information."; + ext:augment-identifier "port-binding-extension"; + uses binding-attributes; + } +} diff --git a/experimental/odp/neutron-constants.yang b/experimental/odp/neutron-constants.yang new file mode 100644 index 000000000..cf1a209f9 --- /dev/null +++ b/experimental/odp/neutron-constants.yang @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2018 Intel Corporation and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-constants { + + yang-version 1; + + namespace "urn:opendaylight:neutron-constants"; + + prefix neutron-constants; + + organization "OpenDaylight Neutron Group"; + + contact "Ryan Moats "; + + revision "2015-07-12" { + description "Initial revision"; + } + + // PROTOCOL + identity protocol-base { + description "Base identity for all front end protocols"; + } + + identity protocol-http { + description "HTTP protocol."; + base protocol-base; + } + + identity protocol-terminated-https { + description "TERMINATED HTTPS protocol."; + base protocol-base; + } + + identity protocol-https { + description "HTTPS protocol."; + base protocol-base; + } + + identity protocol-tcp { + description "TCP protocol."; + base protocol-base; + } + + identity protocol-icmp { + description "ICMP protocol."; + base protocol-base; + } + + identity protocol-icmp-v6 { + description "ICMPV6 protocol."; + base protocol-base; + } + + identity protocol-udp { + description "UDP protocol."; + base protocol-base; + } + + identity protocol-igmp { + description "IGMP protocol."; + base protocol-base; + } + + // PROBE + identity probe-base { + description "Base identity for all probes"; + } + + identity probe-http { + description "HTTP protocol."; + base probe-base; + } + + identity probe-https { + description "HTTPS protocol."; + base probe-base; + } + + identity probe-tcp { + description "TCP protocol."; + base probe-base; + } + + identity probe-ping { + description "PING protocol."; + base probe-base; + } + + // FWaaS v1 + identity fw-protocol-base { + description "Base identity for firewall protocol"; + } + + identity fw-protocol-tcp { + description "TCP protocol."; + base fw-protocol-base; + } + + identity fw-protocol-udp { + description "UDP protocol."; + base fw-protocol-base; + } + + identity fw-protocol-icmp { + description "ICMP protocol."; + base fw-protocol-base; + } + + // DIRECTION + identity direction-base { + description "Base identity for direction"; + } + + identity direction-ingress { + description "Ingress direction."; + base direction-base; + } + + identity direction-egress { + description "Egress direction."; + base direction-base; + + } + + // IP VERSION + identity ip-version-base { + description "the base identity for ip versions"; + } + + identity ip-version-v4 { + description "IP v4"; + base ip-version-base; + } + + identity ip-version-v6 { + description "IP v6"; + base ip-version-base; + } + + // ETHERTYPE + identity ethertype-base { + description "the base identity for ethertype versions"; + } + + identity ethertype-v4 { + description "IP v4"; + base ethertype-base; + } + + identity ethertype-v6 { + description "IP v6"; + base ethertype-base; + } + + // DHCP + identity dhcpv6-base { + description "the base identity for DHCP v6 information"; + } + + identity dhcpv6-off { + description "DHCP v6 off"; + base dhcpv6-base; + } + + identity dhcpv6-stateful { + description "DHCP v6 stateful"; + base dhcpv6-base; + } + + identity dhcpv6-slaac { + description "SLAAC"; + base dhcpv6-base; + } + + identity dhcpv6-stateless { + description "DHCP v6 stateless"; + base dhcpv6-base; + } +} diff --git a/experimental/odp/neutron-extensions.yang b/experimental/odp/neutron-extensions.yang new file mode 100644 index 000000000..1ea6ab796 --- /dev/null +++ b/experimental/odp/neutron-extensions.yang @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2016 Intel Corporation. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +module neutron-extensions { + yang-version 1; + + namespace "urn:opendaylight:neutron-extensions"; + + prefix neutron-extensions; + + organization "OpenDaylight Neutron Group"; + + contact "Isaku Yamahata "; + + description "This YANG module defines neutron extensions attributes that are used + by OpenDaylight Neutron YANG modules. + http://developer.openstack.org/api-ref-networking-v2-ext.html#neutron_extensions"; + + revision "2016-06-17" { + description + "OpenDaylight Boron release"; + } + + grouping extension-attributes { + leaf name { + type string; + description "The name of the extension"; + } + leaf alias { + type string; + description "The alias for the extension"; + } + leaf configuration { + type string; + description "The configuration of this extension"; + } + } + + grouping extensions-attributes { + container extensions { + config false; + list extension { + key "alias"; + uses extension-attributes; + } + } + } + + identity service-provider-feature-type-base { + description "Base identity for Feature that openstack service provider + supports."; + } + + // The list of openstack service provider features. + // Maintain the list of features as they are introduced + // identity extension-report { + // description "extensions-attributes is populated"; + // base service-provider-feature-type-base; + // } + // identity port-status { + // description "port status is updated"; + // base service-provider-feature-type-base; + // } + + identity bgpvpn-vni { + description "Support for vni attribute in bgpvpn resource"; + base service-provider-feature-type-base; + } + + identity operational-port-status { + description "port status update when port created"; + base service-provider-feature-type-base; + } + + identity qos-rules { + description "The qos rules supported. The configuration leaf should + contain a json string such that models the supported_rules + parameter of neutron_lib.services.qos.DriverBase"; + + base service-provider-feature-type-base; + } + + grouping service-provider-feature-attributes { + leaf service-provider-feature { + type identityref { + base service-provider-feature-type-base; + } + description "supported features by openstack service provider"; + } + leaf configuration { + type string; + description "The configuration of this feature"; + } + } + + grouping service-provider-features-attributes { + description "List of features that openstack service provider supports. + networking-odl will retrieve this list and configures itself + to use what features. + This is for networking-odl to support multiple versions + ODL and multiple openstack service providers"; + container features { + config false; + list feature { + key "service-provider-feature"; + uses service-provider-feature-attributes; + } + } + } +} diff --git a/experimental/odp/neutron-fwaas.yang b/experimental/odp/neutron-fwaas.yang new file mode 100644 index 000000000..7705cb4f6 --- /dev/null +++ b/experimental/odp/neutron-fwaas.yang @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2015 IBM Corporation. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-fwaas { + + yang-version 1; + + namespace "urn:opendaylight:neutron-fwaas"; + + prefix neutron-fwaas; + + import ietf-yang-types { prefix "yang"; } + import neutron-attrs { prefix "attrs"; } + import neutron-constants { prefix "constants"; } + import neutron-types { prefix "types"; } + + organization "OpenDaylight Neutron Group"; + + contact "R. Moats "; + + description "This YANG module defines Openstack Neutron VPNaaS model"; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + grouping firewall-attributes { + leaf shared { + description "whether the firewall is shared or not"; + type boolean; + } + leaf firewall-policy-id { + description "the firewall policy UUID for this firewall"; + type yang:uuid; + } + } + + grouping firewall-policy-attributes { + leaf shared { + description "whether the firewall policy is shared or not"; + type boolean; + } + leaf audited { + description "whether the firewall policy is audited or not"; + type boolean; + } + } + + identity action-base { + description "firewall rule action"; + } + + identity action-allow { + description "firewall rule allow"; + base action-base; + } + + identity action-deny { + description "firewall rule deny"; + base action-base; + } + + grouping firewall-rule-attributes { + leaf shared { + description "whether the firewall rule is shared or not"; + type boolean; + } + leaf enabled { + description "whether the firewall rule is enabled or not"; + type boolean; + } + leaf firewall-policy-id { + description "the firewall policy UUID for this firewall rule"; + type yang:uuid; + } + leaf protocol { + description "the protocol this rule applies to"; + type union { + type uint8; + type identityref { + base "constants:fw-protocol-base"; + } + } + } + leaf ip-version { + description "the ip version this rule applies to"; + type identityref { + base "constants:ip-version-base"; + } + } + leaf source-ip-addr { + type types:ip-prefix-or-address; + description "the source ip address for this rule"; + } + leaf destination-ip-addr { + type types:ip-prefix-or-address; + description "the destination ip address for this rule"; + } + leaf source-port-range-min { + description "the source port range min for this rule"; + type uint16; + } + leaf source-port-range-max { + description "the source port range max for this rule"; + type uint16; + } + leaf destination-port-range-min { + description "the destination port range min for this rule"; + type uint16; + } + leaf destination-port-range-max { + description "the destination port range max for this rule"; + type uint16; + } + leaf position { + description "the priority position this rule occupies"; + type int16; + } + leaf action { + description "the action fot this rule"; + type identityref { + base "action-base"; + } + } + } + + grouping firewalls-attributes { + container firewalls { + list firewall { + key "uuid"; + uses attrs:base-attributes; + uses attrs:admin-attributes; + uses firewall-attributes; + } + } + } + grouping policies-attributes { + container firewall-policies { + list firewall-policy { + key "uuid"; + uses attrs:base-attributes; + uses firewall-policy-attributes; + } + } + } + grouping rules-attributes { + container firewall-rules { + list firewall-rule { + key "uuid"; + uses attrs:base-attributes; + uses firewall-rule-attributes; + } + } + } +} diff --git a/experimental/odp/neutron-hostconfig.yang b/experimental/odp/neutron-hostconfig.yang new file mode 100644 index 000000000..7fe47eca1 --- /dev/null +++ b/experimental/odp/neutron-hostconfig.yang @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2016 Intel Corporation. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +module neutron-hostconfig { + + yang-version 1; + + namespace "urn:opendaylight:neutron-hostconfig"; + + prefix neutron-hostconfig; + + organization "OpenDaylight Neutron Group"; + + contact "Ritu Sood "; + + description "This YANG module defines host configurations that is used + in specifying the physical node type (network node, compute node) for + a host system. This information is used by Openstack Neutron scheduler. + For example for L3 centralized SNAT support this will be used to inform + Neutron which node is Network node. This information will be read and + populated by networking-odl in Neutron agent_db. This model corresponds + to openstack neutron agent API"; + + revision "2015-07-12" { + description + "OpenDaylight Boron release"; + } + + grouping hostconfig-entry-attributes { + description "These values will be populated by the Cloud Operator and + will be stored in the Open_vSwitch configuration data in the + external_ids field as a key value pair."; + + leaf host-id { + type string; + config false; + description "Host identification string. This string will be + stored with the key as odl_os_hostconfig_hostid."; + } + leaf host-type { + type string; + config false; + description "The string is for type of the node. For example L3 + Agent,DHCP Agent etc. This string will be stored with the key as + odl_os_hostconfig_hosttype."; + } + leaf config { + type string; + config false; + description "This is the configuration data for the host type to + be used to configure that host type by Openstack. This string + will be stored with the key as odl_os_hostconfig_config."; + } + } + + grouping hostconfig-attributes { + container hostconfigs { + config false; + list hostconfig { + description "List of Host with types and configurations."; + key "host-id host-type"; + uses hostconfig-entry-attributes; + } + } + } +} diff --git a/experimental/odp/neutron-l2gateways.yang b/experimental/odp/neutron-l2gateways.yang new file mode 100644 index 000000000..98dc2909f --- /dev/null +++ b/experimental/odp/neutron-l2gateways.yang @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2015 Hewlett-Packard Development Company and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-l2gateways{ + yang-version 1; + namespace "urn:opendaylight:neutron-l2gateways"; + prefix neutron-l2gateways; + + import ietf-yang-types { prefix "yang"; } + import neutron-attrs { prefix "attrs"; } + + organization "OpenDaylight Neutron Group"; + + description "This YANG module defines l2gateway objects that are used by + Openstack kilo Neutron YANG modules."; + + revision "2015-07-12" { + description + "Initial version of l2gateway group objects used by OpenStack + kilo Neutron models"; + } + + grouping l2gateway-connection-attributes { + leaf l2gateway-id { + type yang:uuid; + } + leaf network-id { + type yang:uuid; + } + leaf segment-id { + type int32; + } + leaf port-id { + type yang:uuid; + } + } + + grouping l2gateway-attributes { + list devices { + description "Description of devices."; + key "uuid"; + leaf uuid { + type yang:uuid; + } + leaf device-name { + type string; + } + list interfaces { + description "Description of interfaces"; + key interface-name; + leaf interface-name { + type string; + } + leaf-list segmentation-ids { + description "Description of segmentations"; + type int32; + } + } + } + } + + grouping l2gateways-attributes { + container l2gateways { + list l2gateway { + description "l2gateway description "; + key "uuid"; + uses attrs:base-attributes; + uses l2gateway-attributes; + } + } + } + + grouping l2gateway-connections-attributes{ + container l2gatewayConnections { + list l2gatewayConnection { + description "l2gateway connection description "; + key "uuid"; + uses attrs:base-attributes; + uses l2gateway-connection-attributes; + } + } + } + +} \ No newline at end of file diff --git a/experimental/odp/neutron-lbaasv2.yang b/experimental/odp/neutron-lbaasv2.yang new file mode 100644 index 000000000..fa5764d2c --- /dev/null +++ b/experimental/odp/neutron-lbaasv2.yang @@ -0,0 +1,248 @@ +/* + * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-lbaasv2 { + + yang-version 1; + + namespace "urn:opendaylight:neutron-lbaasv2"; + + prefix neutron-lbaasv2; + + import ietf-yang-types { prefix "yang"; } + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + import neutron-attrs { prefix "attrs"; } + import neutron-constants { prefix "constants"; } + + organization "OpenDaylight Neutron Group"; + + contact "Kiran Sreenivasa "; + + description "This YANG module defines OpenStack Neutron LBaaSV2.0 modules"; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + grouping loadbalancer-attributes { + description "LBaaSV2.0 load balancer attributes."; + leaf vip-address { + type inet:ip-address; + description "The IP address of the VIP."; + } + leaf vip-subnet-id { + type yang:uuid; + description "The ID of the subnet on which to allocate the VIP address."; + } + } + grouping listener-attributes { + description "LBaaSV2.0 listener attributes."; + leaf default-pool-id { + type yang:uuid; + description "ID of default pool. Must have compatible protocol with listener."; + } + leaf admin-state-up { + type boolean; + description "The administrative state of the listener, which is up (true) or + down (false)."; + default "true"; + } + leaf protocol { + description "The protocol the front end listens for."; + type identityref { + base "constants:protocol-base"; + } + } + leaf protocol-port { + description "The port on which the front end listens."; + type uint16 { + range 0..65535; + } + } + leaf-list loadbalancers { + type yang:uuid; + description "List of loadbalancers on which this listener is provisioned."; + } + leaf connection-limit { + description "Maximum connections this load balancer can have. Default is infinite."; + type int32 { + range -1..65535; + } + default "-1"; + } + } + grouping pool-attributes { + leaf admin-state-up { + type boolean; + description "The administrative state of the pool, which is up (true) or + down (false)."; + } + leaf protocol { + description "The protocol the front end listens for."; + type identityref { + base "constants:protocol-base"; + } + } + leaf lb-algorithm { + type string; + description "The load-balancer algorithm, which is round-robin, + least-connections, and so on. This value, which must be supported, + is dependent on the load-balancer provider. Round-robin + must be supported."; + } + leaf healthmonitor-id { + type yang:uuid; + description "The healthmonitor associated with this pool."; + } + leaf-list listeners { + type yang:uuid; + description "List of listeners that belong to the pool."; + } + container session-persistence { + description "The session persistence algorithm. This algorithm is a + dictionary with type and cookie_name keys."; + leaf cookie-name { + type string; + description "Cookie Name."; + } + leaf type { + type string; + description "Cookie type."; + } + } + } + grouping member-attributes { + leaf subnet-id { + type yang:uuid; + description "Subnet in which to access this member."; + } + leaf address { + type inet:ip-address; + description "The IP address of the member."; + } + leaf protocol-port { + description "The port on which the application is hosted."; + type uint16 { + range 0..65535; + } + } + leaf weight { + description "Weight of member."; + type uint16 { + range 0..256; + } + default "1"; + } + leaf admin-state-up { + type boolean; + description "The administrative state of the member, which is up (true) or + down (false)."; + default "true"; + } + } + grouping healthmonitor-attributes { + leaf type { + description "The type of probe, which is PING, TCP, HTTP, or HTTPS, that + is sent by the load balancer to verify the member state."; + type identityref { + base "constants:probe-base"; + } + } + leaf admin-state-up { + type boolean; + description "The administrative state of the VPI, which is up (true) or + down (false)."; + default "true"; + } + leaf delay { + description "The time, in seconds, between sending probes to members."; + type uint32; + } + leaf timeout { + description "The maximum number of seconds for a monitor to wait for a + connection to be established before it times out. This value must be + less than the delay value."; + type uint32; + } + leaf max-retries { + description "Number of allowed connection failures before changing the + status of the member to INACTIVE."; + type uint16 { + range 1..10; + } + } + leaf http-method { + type string; + description "The HTTP method that the monitor uses for requests."; + default ""; + } + leaf url-path { + type string; + description "The HTTP path of the request sent by the monitor to test + the health of a member. Must be a string beginning with a forward + slash (/)."; + } + leaf expected-codes { + type string; + description "Expected HTTP codes for a passing HTTP(S) monitor."; + default ""; + } + leaf-list pools { + type yang:uuid; + description "List of pools associated with this healthmonitor."; + } + } + grouping lbaas-attributes { + container loadbalancers { + description "Container for Loadbalancers."; + list loadbalancer { + key "uuid"; + uses attrs:base-attributes; + uses attrs:admin-attributes; + uses loadbalancer-attributes; + description "List of Loadbalancers."; + } + } + container listeners { + description "Container for Listeners."; + list listener { + key "uuid"; + uses attrs:base-attributes; + uses listener-attributes; + description "List of Listeners"; + } + } + container pools { + description "Container for LBaaSV2.0 pools."; + list pool { + key "uuid"; + uses attrs:base-attributes; + uses pool-attributes; + description "List of Pools"; + container members { + description "Container for pool members."; + list member { + key "uuid"; + uses attrs:id-attributes; + uses member-attributes; + description "List of members."; + } + } + } + } + container healthmonitors { + description "Container for LBaaSV2.0 healthmonitors."; + list healthmonitor { + key "uuid"; + uses attrs:id-attributes; + uses healthmonitor-attributes; + description "List of healthmonitors."; + } + } + } +} diff --git a/experimental/odp/neutron-metering.yang b/experimental/odp/neutron-metering.yang new file mode 100644 index 000000000..aa72814fe --- /dev/null +++ b/experimental/odp/neutron-metering.yang @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-metering { + + yang-version 1; + + namespace "urn:opendaylight:neutron-metering"; + + prefix neutron-metering; + + import ietf-yang-types { prefix "yang"; } + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + import neutron-attrs { prefix "attrs"; } + import neutron-constants { prefix "constants"; } + + organization "OpenDaylight Neutron Group"; + + contact "J. Gregory Hall , Kiran Sreenivasa "; + + description "This YANG module defines Openstack Neutron Metering attributes"; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + grouping metering-label-attributes { + description "OpenStack Layer3 Metering label information."; + leaf shared { + type boolean; + description "Indicates whether this metering label is shared across all tenants."; + default "false"; + } + } + + grouping metering-rule-attributes { + description "OpenStack Layer3 Metering label rules."; + leaf direction { + type identityref { + base "constants:direction-base"; + } + description "The direction in which metering rule is applied."; + } + leaf metering-label-id { + type yang:uuid; + description "Metering Label ID to associate with this metering rule."; + } + leaf remote-ip-prefix { + description "The remote IP prefix to be associated with this metering rule. packet."; + type inet:ip-prefix; + } + leaf excluded { + type boolean; + description "Specify whether the remote_ip_prefix + will be excluded or not from traffic counters of + the metering label, ie: to not count the traffic + of a specific IP address of a range."; + default "false"; + } + } + + grouping metering-labels-attributes { + container metering-labels { + description "Container for metering labels."; + list metering-label { + key "uuid"; + uses attrs:base-attributes; + uses metering-label-attributes; + description "List of Metering Labels."; + } + } + } + + grouping metering-rules-attributes { + container metering-rules { + description " Container for metering rules."; + list metering-rule { + key "uuid"; + uses attrs:id-attributes; + uses metering-rule-attributes; + description "List of Metering Rules."; + } + } + } +} diff --git a/experimental/odp/neutron-mtu-ext.yang b/experimental/odp/neutron-mtu-ext.yang new file mode 100755 index 000000000..25cfaaef2 --- /dev/null +++ b/experimental/odp/neutron-mtu-ext.yang @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2018 Redhat Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-mtu-ext { + + yang-version 1; + + namespace "urn:opendaylight:neutron-mtu-ext"; + + prefix neutron-mtu-ext; + + import neutron { prefix "neutron"; } + import neutron-mtu { prefix "mtu"; } + import yang-ext { prefix "ext"; } + + organization "OpenDaylight Neutron Group"; + + description "This YANG module defines Openstack Neutron mtu extensions model"; + + revision "2018-11-14" { + description + "OpenDaylight Neon release"; + } + + augment "/neutron:neutron/neutron:networks/neutron:network"{ + description "This module augments the networks container + in the neutron-networks module with mtu information."; + ext:augment-identifier "network-mtu-extension"; + uses mtu:mtu-attributes; + } +} diff --git a/experimental/odp/neutron-mtu.yang b/experimental/odp/neutron-mtu.yang new file mode 100755 index 000000000..6abdcf61d --- /dev/null +++ b/experimental/odp/neutron-mtu.yang @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2018 Redhat Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-mtu { + + yang-version 1; + + namespace "urn:opendaylight:neutron-mtu"; + + prefix neutron-mtu; + + import neutron-networks { prefix "networks"; } + + organization "OpenDaylight Neutron Group"; + + description "This YANG module defines Openstack Neutron mtu extension attributes"; + + revision "2018-11-14"; + + grouping mtu-attributes { + leaf mtu { + type uint16; + description "The maximum transmission unit (MTU) value to address fragmentation. + Minimum value is 68 for IPv4, and 1280 for IPv6."; + } + } +} diff --git a/experimental/odp/neutron-networks.yang b/experimental/odp/neutron-networks.yang new file mode 100644 index 000000000..d065fdd82 --- /dev/null +++ b/experimental/odp/neutron-networks.yang @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-networks { + + yang-version 1; + + namespace "urn:opendaylight:neutron-networks"; + + prefix neutron-networks; + + import neutron-attrs { prefix "attrs"; } + + organization "OpenDaylight Neutron Group"; + + contact "J. Gregory Hall , Kiran Sreenivasa "; + + description "This YANG module defines Openstack Neutron Network model"; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + identity network-type-base { + description + "Base Network type for all Network type identifiers."; + } + + identity network-type-flat { + base network-type-base; + description + "Flat network type identity."; + } + identity network-type-vlan { + base network-type-base; + description + "VLAN network type identity."; + } + identity network-type-vxlan { + base network-type-base; + description + "VXLAN network type identity."; + } + identity network-type-gre { + base network-type-base; + description + "GRE network type identity."; + } + + typedef network-type { + type identityref { + base network-type-base; + } + description + "This type is used to refer to a Network Type."; + } + + grouping networks-attributes { + container networks { + list network { + + description "A network is a virtual isolated layer-2 broadcast domain which + is typically reserved to the tenant who created it, unless the + network has been explicitly configured to be shared. Tenants can + create multiple networks, until they reach the thresholds specified + by per-tenant Quotas. The network is the principal entity for + the Neutron API. Ports and Subnets must always be associated + with a network."; + + key "uuid"; + + leaf shared { + type boolean; + default "false"; + description "Indicates whether this network or subnet is shared across all + tenants. By default, only administrative users can change this + value."; + } + + leaf vlan-transparent { + type boolean; + default "false"; + description "The state of the network, which is VLAN transparent (true) or + not VLAN transparent (false)"; + } + + uses attrs:base-attributes; + uses attrs:admin-attributes; + } + } + } +} diff --git a/experimental/odp/neutron-ports.yang b/experimental/odp/neutron-ports.yang new file mode 100644 index 000000000..31113d2b7 --- /dev/null +++ b/experimental/odp/neutron-ports.yang @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-ports { + + yang-version 1; + + namespace "urn:opendaylight:neutron-ports"; + + prefix neutron-ports; + + import ietf-yang-types { prefix "yang"; } + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + import neutron-attrs { prefix "attrs"; } + import neutron-constants { prefix "constants"; } + import neutron-types { prefix "types"; } + + organization "OpenDaylight Neutron Group"; + + contact "J. Gregory Hall , Kiran Sreenivasa "; + + description "This YANG module defines Openstack Neutron Ports model"; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + grouping port-attributes { + list allowed-address-pairs { + description "Allowed address pairs for this port. For example: neutron port-create + net1 --allowed-address-pairs type=dict list=true mac_address=,ip_address= + Setting an allowed-address-pair that matches the mac_address and + ip_address of a port is prevented. This is because that would + have no effect since traffic matching the mac_address and ip_address + is already allowed to pass through the port"; + key "mac-address ip-address"; + leaf mac-address { + type yang:mac-address; + } + leaf ip-address { + type types:ip-prefix-or-address; + } + } + + leaf network-id { + type yang:uuid; + } + list extra-dhcp-opts { + description "Extra DHCP options"; + reference "http://developer.openstack.org/api-ref-networking-v2.html"; + key "opt-name ip-version"; + leaf opt-name { + type string; + } + leaf opt-value { + type string; + } + leaf ip-version { + type identityref { + base "constants:ip-version-base"; + } + } + } + leaf device-owner { + type string; + } + leaf mac-address { + type yang:mac-address; + } + list fixed-ips { + key "subnet-id ip-address"; + leaf subnet-id { + type yang:uuid; + } + leaf ip-address { + type inet:ip-address; + } + } + + leaf-list security-groups { + type yang:uuid; + } + leaf device-id { + type string; + } + } + + grouping ports-attributes { + container ports { + list port { + key "uuid"; + uses attrs:base-attributes; + uses attrs:admin-attributes; + uses port-attributes; + } + } + } +} diff --git a/experimental/odp/neutron-portsecurity.yang b/experimental/odp/neutron-portsecurity.yang new file mode 100644 index 000000000..d10f035bd --- /dev/null +++ b/experimental/odp/neutron-portsecurity.yang @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2016 Intel Corporation. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +module neutron-portsecurity { + + yang-version 1; + + namespace "urn:opendaylight:neutron-portsecurity"; + + prefix neutron-portsecurity; + + import yang-ext { prefix "ext"; } + import neutron { prefix "neutron"; } + + + organization "OpenDaylight Neutron Group"; + + contact "Dileep Ranganathan "; + + description "This YANG module defines port-security attributes that are used + by OpenDaylight Neutron YANG modules."; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + augment "/neutron:neutron/neutron:ports/neutron:port" { + description "This module augments the ports container in + the neutron-ports module with port-security information."; + ext:augment-identifier "port-security-extension"; + leaf port-security-enabled { + type boolean; + description "The port security status. The status is enabled (true) or disabled (false)."; + } + } +} diff --git a/experimental/odp/neutron-provider-ext.yang b/experimental/odp/neutron-provider-ext.yang new file mode 100644 index 000000000..38da3ce3d --- /dev/null +++ b/experimental/odp/neutron-provider-ext.yang @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-provider-ext { + + yang-version 1; + + namespace "urn:opendaylight:neutron-provider-ext"; + + prefix neutron-provider-ext; + + import neutron { prefix "neutron"; } + import neutron-provider { prefix "provider"; } + import yang-ext { prefix "ext"; } + + organization "OpenDaylight Neutron Group"; + + contact "J. Gregory Hall , Kiran Sreenivasa "; + + description "This YANG module defines Openstack Neutron provider extensions model"; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + augment "/neutron:neutron/neutron:networks/neutron:network"{ + description "This module augments the networks container + in the neutron-networks module with provider information."; + ext:augment-identifier "network-provider-extension"; + list segments { + description "List of provider network(s) associated with this network."; + key segmentation-index; + uses provider:provider-attributes; + } + uses provider:provider-attributes; + } +} diff --git a/experimental/odp/neutron-provider.yang b/experimental/odp/neutron-provider.yang new file mode 100644 index 000000000..c84aba2b8 --- /dev/null +++ b/experimental/odp/neutron-provider.yang @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-provider { + + yang-version 1; + + namespace "urn:opendaylight:neutron-provider"; + + prefix neutron-provider; + + import neutron-networks { prefix "networks"; } + + organization "OpenDaylight Neutron Group"; + + contact "J. Gregory Hall , Kiran Sreenivasa "; + + description "This YANG module defines Openstack Neutron Provider extension attributes"; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + grouping provider-attributes { + leaf physical-network { + type string; + description "The physical network where this network object is implemented. + The Networking API v2.0 does not provide a way to list available + physical networks. For example, the Open vSwitch plug-in configuration + file defines a symbolic name that maps to specific bridges on + each Compute host."; + } + + leaf network-type { + type networks:network-type; + description "The type of physical network that maps to this network resource."; + } + leaf segmentation-id { + type string; + description "An isolated segment on the physical network. The network-type + attribute defines the segmentation model. For example, if network-type + is vlan, this ID is a vlan identifier. If network-type is gre, + this ID is a gre key."; + } + leaf segmentation-index { + type uint32; + description "A hidden counter to act as a key, because + segmentation id is not required."; + } + } +} diff --git a/experimental/odp/neutron-qos-ext.yang b/experimental/odp/neutron-qos-ext.yang new file mode 100644 index 000000000..016f1a861 --- /dev/null +++ b/experimental/odp/neutron-qos-ext.yang @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2016 Intel Corporation, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-qos-ext { + // This model augments the network and port yang model for Qos. + // In order to do that it is required to import neutron.yang. + // Neutron model can't be imported in neutron-qos.yang as neutron-qos.yang + // itself is imported in neutron.yang. Due to do this reason a seperate file is + // created for augmentation. + + yang-version 1; + + namespace "urn:opendaylight:neutron-qos-ext"; + + prefix neutron-qos-ext; + + import neutron { prefix "neutron"; } + import yang-ext { prefix "ext"; } + import ietf-yang-types { prefix "yang"; revision-date "2013-07-15"; } + + organization "OpenDaylight Neutron Group"; + + contact "Pramod Raghavendra Jayathirth "; + + description "This YANG module defines Openstack Neutron Qos provider extensions model"; + + revision "2016-06-13" { + description + "OpenDaylight Boron release"; + } + + augment "/neutron:neutron/neutron:networks/neutron:network" { + description "This module augments the networks container + in the neutron-networks module with qos information"; + // ext:augment-identifier value needs to unique as name of the generated classes + // is derived from this string + ext:augment-identifier "qos-network-extension"; + leaf qos-policy-id { + description "The Networks to which the Qos Policies can be applied"; + type yang:uuid; + } + } + + augment "/neutron:neutron/neutron:ports/neutron:port" { + description "This module augments the ports container + in the neutron-ports module with qos information"; + // ext:augment-identifier value needs to unique as name of the generated classes + // is derived from this string + ext:augment-identifier "qos-port-extension"; + leaf qos-policy-id { + description "The ports to which the Qos Policies can be applied"; + type yang:uuid; + } + } +} diff --git a/experimental/odp/neutron-qos.yang b/experimental/odp/neutron-qos.yang new file mode 100644 index 000000000..879e9cf52 --- /dev/null +++ b/experimental/odp/neutron-qos.yang @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2016 Intel Corporation. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-qos { + + yang-version 1; + + namespace "urn:opendaylight:neutron-qos"; + + prefix neutron-qos; + + import ietf-yang-types { prefix "yang"; revision-date "2013-07-15"; } + import neutron-attrs { prefix "attrs"; } + import neutron-constants { prefix "constants"; } + + organization "OpenDaylight Neutron Group"; + + contact "Pramod Raghavendra Jayathirth "; + + description "This YANG module defines qos attributes that are used + by OpenDaylight Neutron YANG module."; + + revision "2016-06-13" { + description + "OpenDaylight Boron release"; + } + + grouping qos-policy-attributes { + leaf shared { + type boolean; + description "Whether the policy is shared or not"; + } + } + + grouping qos-rule-type { + leaf rule-type { + type string; + description "The type of the qos rule"; + } + } + + grouping bandwidthlimit-rule-attributes { + leaf max-kbps { + type uint64; + description "The maximum KBPS value"; + } + leaf max-burst-kbps { + type uint64; + description "The burst over the maximum KBPS value"; + } + leaf direction { + type identityref { + base "constants:direction-base"; + } + description "The traffic direction"; + } + } + + grouping dscpmarking-rule-attributes { + leaf dscp-mark { + type uint8 { + range "0 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 + | 38 | 40 | 46 | 48 | 56"; + } + description "the value of dscp mark"; + } + } + + grouping minimumbandwidth-rule-attributes { + leaf min-kbps { + type uint64; + description "The minimum KBPS value"; + } + leaf direction { + type identityref { + base "constants:direction-base"; + } + description "The traffic direction"; + } + } + + grouping qos-attributes { + container qos-policies { + list qos-policy { + key "uuid"; + uses attrs:base-attributes; + uses qos-policy-attributes; + list bandwidth-limit-rules { + key "uuid"; + uses attrs:id-attributes; + uses bandwidthlimit-rule-attributes; + } + list dscpmarking-rules { + key "uuid"; + uses attrs:id-attributes; + uses dscpmarking-rule-attributes; + } + list minimumbandwidth-rules { + key "uuid"; + uses attrs:id-attributes; + uses minimumbandwidth-rule-attributes; + } + } + } + container qos-rule-types { + config false; + list rule-types { + key "rule-type"; + uses qos-rule-type; + } + } + } +} diff --git a/experimental/odp/neutron-secgroups.yang b/experimental/odp/neutron-secgroups.yang new file mode 100644 index 000000000..132d814dc --- /dev/null +++ b/experimental/odp/neutron-secgroups.yang @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-secgroups { + + yang-version 1; + + namespace "urn:opendaylight:neutron-secgroups"; + + prefix neutron-secgroups; + + import ietf-yang-types { prefix "yang"; } + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + import neutron-attrs { prefix "attrs"; } + import neutron-constants { prefix "constants"; } + + organization "OpenDaylight Neutron Group"; + + contact "J. Gregory Hall , Kiran Sreenivasa "; + + description "This YANG module defines OpenStack Neutron security group model"; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + grouping security-group-attributes { + description "OpenStack Layer3 Security group information."; + } + grouping security-rule-attributes { + description "OpenStack Layer3 Security Group rules."; + leaf direction { + type identityref { + base "constants:direction-base"; + } + description "The direction in which metering rule is applied. + For a compute instance, an ingress security group rule is + applied to incoming (ingress) traffic for that instance. + An egress rule is applied to traffic leaving the instance."; + } + leaf security-group-id { + type yang:uuid; + mandatory true; + description "The security group ID to associate with this security group rule."; + } + leaf remote-group-id { + description "The remote group ID to be associated with this security group rule. + You can specify either remote-ip-prefix or remote-group-id in the request body."; + type yang:uuid; + } + leaf remote-ip-prefix { + description "The remote IP Prefix to be associated with this security group rule. + You can specify either remote-ip-prefix or remote-group-id in the request body."; + type inet:ip-prefix; + } + leaf protocol { + type union { + type uint8; + type identityref { + base "constants:protocol-base"; + } + } + description "The protocol that is matched by the security group rule."; + } + leaf ethertype { + description "Must be IPv4 or IPv6, and addresses represented in CIDR must + match the ingress or egress rules."; + type identityref { + base "constants:ethertype-base"; + } + } + leaf port-range-min { + type uint16; + description "The minimum port number in the range that is matched by the + security group rule. If the protocol is TCP or UDP, this value must + be less than or equal to the value of the attribute. If the protocol + is ICMP, this value must be an ICMP type."; + } + leaf port-range-max { + type uint16; + description "The maximum port number in the range that is matched by the + security group rule. If the protocol is TCP or UDP, this value must + be less than or equal to the value of the attribute. If the protocol + is ICMP, this value must be an ICMP type."; + } + } + + grouping security-groups-attributes { + container security-groups { + description "Container for security groups."; + list security-group { + key "uuid"; + uses attrs:base-attributes; + uses security-group-attributes; + description "List of Security Groups."; + } + } + } + + grouping security-rules-attributes { + container security-rules { + description "Container for security group rules."; + list security-rule { + key "uuid"; + uses attrs:id-attributes; + uses security-rule-attributes; + description "List of Security Group Rules."; + } + } + } +} diff --git a/experimental/odp/neutron-sfc-flow-classifier.yang b/experimental/odp/neutron-sfc-flow-classifier.yang new file mode 100644 index 000000000..bc71f2119 --- /dev/null +++ b/experimental/odp/neutron-sfc-flow-classifier.yang @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + module neutron-sfc-flow-classifier { + + yang-version 1; + + namespace "urn:opendaylight:neutron-sfc-flow-classifier"; + + prefix neutron-sfc-flow-classifier; + + import ietf-yang-types { prefix "yang"; } + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + import neutron-attrs { prefix "attrs"; } + import neutron-constants { prefix "constants"; } + + + organization "OpenDaylight Neutron Northbound Project"; + + contact "Anil Vishnoi "; + + description "This YANG module defines Openstack Neutron SFC Flow Classfier Models.These models are based on the + API's exposed by the OpenStack Neutron Networking SFC (networking-sfc) project. List of classifier APIs + are listed at following URL (http://docs.openstack.org/developer/networking-sfc/api.html)"; + + revision "2016-05-11" { + description + "OpenStack Neutron SFC Flow Classfier Models - Version 1."; + } + + grouping flow-classifier-match-attributes { + leaf ethertype { + description " + Classify flows based on the provided ethertype.Currently OpenStack SFC only supports IPv4 and IPv6."; + + type identityref { + base "constants:ethertype-base"; + } + } + leaf protocol { + description " + Classify flows based on the provided protocol.Currently OpenStack SFC only supports TCP,UDP and ICMP"; + type identityref { + base "constants:protocol-base"; + } + } + leaf source-port-range-min { + description "Minimum source protocol port"; + type uint16 { + range "0 .. 65535"; + } + } + leaf source-port-range-max { + description "Maximum source protocol port."; + type uint16 { + range "0 .. 65535"; + } + } + leaf destination-port-range-min { + description "Minimum destination protocol port."; + type uint16 { + range "0 .. 65535"; + } + } + leaf destination-port-range-max { + description "Maximum destination protocol port."; + type uint16 { + range "0 .. 65535"; + } + } + leaf source-ip-prefix { + description "Source IPv4 or IPv6 prefix."; + type inet:ip-prefix; + } + leaf destination-ip-prefix { + description "Destination IPv4 or IPv6 prefix."; + type inet:ip-prefix; + } + leaf logical-source-port { + description "Neutron source port."; + type yang:uuid; + } + leaf logical-destination-port { + description "Neutron destination port."; + type yang:uuid; + } + list l7-parameter { + description "List of Key-Value pair of L7 matching attributes"; + key "match-parameter"; + leaf match-parameter { + description "Name of the L7 parameter"; + type string; + } + leaf match-parameter-value { + description "Value of the L7 parameter"; + type string; + } + } + } + + grouping sfc-flow-classifiers-attributes { + container sfc-flow-classifiers { + description "Contains list of Service Function Chaining flow classifiers"; + list sfc-flow-classifier { + description " + Defines high level model of SFC Flow Classifier. This models is based on the flow classifier APIs + defined by OpenStack Neutron networking-sfc project."; + + key "uuid"; + uses attrs:base-attributes; + uses flow-classifier-match-attributes; + } + } + } + } diff --git a/experimental/odp/neutron-sfc.yang b/experimental/odp/neutron-sfc.yang new file mode 100644 index 000000000..bc600e7aa --- /dev/null +++ b/experimental/odp/neutron-sfc.yang @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + module neutron-sfc { + + yang-version 1; + + namespace "urn:opendaylight:neutron-sfc"; + + prefix neutron-sfc; + + import ietf-yang-types { prefix "yang"; } + import neutron-attrs { prefix "attrs"; } + + + organization "OpenDaylight Neutron Northbound Project"; + + contact "Anil Vishnoi "; + + description "This YANG module defines Openstack Neutron Service Function Chaining Models.These models are based on + the API's exposed by the OpenStack Neutron Networking SFC (networking-sfc) project. List of SFC related + APIs are listed at following URL (http://docs.openstack.org/developer/networking-sfc/api.html)"; + + revision "2016-05-11" { + description + "OpenStack Neutron Service Function Chaining Models - Version 1."; + } + + grouping port-chain-attributes { + description "Grouping of port chain attributes"; + + leaf-list port-pair-groups { + description "List of ID of Port pair groups that is part of the SF chain"; + type yang:uuid; + } + + leaf-list flow-classifiers { + description "List of ID of flow classifiers associated to the SF chain"; + type yang:uuid; + } + + list chain-parameters { + description " + List of additional parameters related to the SF chain. Current only one parameter 'correlation' is + defined. The 'correlation' parameter is used to specify the type of chain correlation mechanism. This + parameter allows different correlation mechanism to be selected. This is currently set to 'mpls' as a + default correlation mechanism because that's the only mechanism OpenStack SFC API's supports. If this + parameter is not specified, it will default to 'mpls'"; + + key "chain-parameter"; + + leaf chain-parameter { + description "SF Chain parameter attribute name"; + type string; + default "correlation"; + } + + leaf chain-parameter-value { + description "SF Chain parameter's value"; + type string; + default "mpls"; + } + } + } + + grouping port-pair-group-attributes { + description "Grouping of port pair group attributes"; + + leaf-list port-pairs { + description "List of the port pair's ID that is part of the port pair group"; + type yang:uuid; + } + } + + grouping port-pair-attributes { + description "Grouping of port pair attributes"; + + leaf ingress { + description "Ingress neutron port ID of the Service Function"; + type yang:uuid; + } + + leaf egress { + description "Egress neutron port ID of the Service Function"; + type yang:uuid; + } + + list service-function-parameters { + description " + Service Function specific parameters. These parameters are generally used to pass the SF specific parameter + information to the data path. Currently OpenStack SFC defined only one parameter - 'correlation'. The + 'correlation' parameter is used to specify the type of chain correlation mechanism supported by a specific + SF. This is needed by the data plane switch to determine how to associate a packet with a chain. Currently + there is no default mechanism defined by OpenStack SFC API."; + + key "service-function-parameter"; + + leaf service-function-parameter { + description "Name of parameter defined for service function "; + type string; + default "correlation"; + } + + leaf service-function-parameter-value { + description "Value of the service function parameter"; + type string; + } + } + } + + grouping sfc-attributes { + + container port-chains { + description "List of Service Function Paths (Port Chain) created by OpenStack SFC"; + + list port-chain { + description " + A Port Chain (Service Function Path) consists of (1) a set of Neutron ports, to define the sequence + of service functions and (2)a set of flow classifiers, to specify the classified traffic flows to + enter the chain. (1) is defined using the port pair groups. If a chain consists of a sequence of + different types of Service Functions, then the chain will have multiple 'port-pair-group's. There + must be at least one 'port-pair-group' in the Port Chain. Each port chain can be associated with + multiple flow classifiers"; + + key "uuid"; + uses attrs:base-attributes; + uses port-chain-attributes; + } + } + + container port-pair-groups { + description "List of group of Service Functions (Port Pair Groups) created by OpenStack SFC"; + + list port-pair-group { + description " + Port Pair group defines the group of Service Fucntions (Port pair). Inside each 'port-pair-group', + there could be one or more port-pairs. Multiple port-pairs may be included in a 'port-pair-group to + allow the specification of a set of functionally equivalent SFs that can be be used for load + distribution, i.e., the 'port-pair' option may be repeated for multiple port-pairs of functionally + equivalent SFs."; + + key "uuid"; + uses attrs:base-attributes; + uses port-pair-group-attributes; + } + } + + container port-pairs { + description "List of Service Function (Port Pair) created by OpenStack"; + + list port-pair { + description " + A Port Pair represents a service function instance. The ingress port and the egress port of the service + function are defined separately but if the service function has one bidirectional port, the ingress + port will have the same value as the egress port. "; + + key "uuid"; + uses attrs:base-attributes; + uses port-pair-attributes; + } + } + } + } diff --git a/experimental/odp/neutron-subnets.yang b/experimental/odp/neutron-subnets.yang new file mode 100644 index 000000000..abaa94cdd --- /dev/null +++ b/experimental/odp/neutron-subnets.yang @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-subnets { + + yang-version 1; + + namespace "urn:opendaylight:neutron-subnets"; + + prefix neutron-subnets; + + import ietf-yang-types { prefix "yang"; } + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + import neutron-attrs { prefix "attrs"; } + import neutron-constants { prefix "constants"; } + + organization "OpenDaylight Neutron Group"; + + contact "J. Gregory Hall , Kiran Sreenivasa "; + + description "This YANG module defines Openstack Neutron Subnets model"; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + grouping subnet-attributes { + leaf network-id { + type yang:uuid; + description "network this subnet is associated with."; + } + leaf ip-version { + description "IP version"; + type identityref { + base "constants:ip-version-base"; + } + } + leaf cidr { + type inet:ip-prefix; + description "cidr representing IP range for this subnet, based on IP version"; + } + leaf gateway-ip { + type inet:ip-address; + description "default gateway used by devices in this subnet"; + } + leaf-list dns-nameservers { + type inet:ip-address; + description "DNS name servers used by hosts in this subnet."; + // neutron subnet-create test-net1 40.0.0.0/24 --dns-nameservers list=true 8.8.8.7 8.8.8.8 } } + } + leaf ipv6-address-mode { + + description "neutron subnet-create --ip-version 6 --ipv6_ra_mode off --ipv6_address_mode + off NETWORK CIDR neutron subnet-create --ip-version 6 --ipv6_ra_mode + off --ipv6_address_mode dhcpv6-stateful NETWORK CIDR neutron subnet-create + --ip-version 6 --ipv6_ra_mode slaac --ipv6_address_mode slaac + NETWORK CIDR neutron subnet-create --ip-version 6 --ipv6_ra_mode + dhcpv6-stateful --ipv6_address_mode off NETWORK CIDR neutron subnet-create + --ip-version 6 --ipv6_ra_mode dhcpv6-stateless --ipv6_address_mode + dhcpv6-stateless NETWORK CIDR Note: can't find this in the spec + but OS is sending it with a null value."; + type identityref { + base "constants:dhcpv6-base"; + } + } + leaf ipv6-ra-mode { + description "TODO can't find this in the spec but OS sends it with a null + value."; + type identityref { + base "constants:dhcpv6-base"; + } + } + list allocation-pools { + description "Sub-ranges of cidr available for dynamic allocation to ports"; + key start; + leaf start { + type inet:ip-address; + } + leaf end { + type inet:ip-address; + } + } + list host-routes { + description "Routes that should be used by devices with IPs from this subnet + (not including local subnet route)."; + key destination; + leaf destination { + description "Specifies a destination in CIDR format"; + type inet:ip-prefix; + } + leaf nexthop { + type inet:ip-address; + } + } + leaf enable-dhcp { + type boolean; + description "Specifies whether DHCP is enabled for this subnet or not."; + default "true"; + } + } + grouping subnets-attributes { + container subnets { + list subnet { + key "uuid"; + uses attrs:base-attributes; + uses subnet-attributes; + } + } + } +} diff --git a/experimental/odp/neutron-tapaas.yang b/experimental/odp/neutron-tapaas.yang new file mode 100644 index 000000000..55d973071 --- /dev/null +++ b/experimental/odp/neutron-tapaas.yang @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2017 Intel Corporation. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +module neutron-tapaas { + yang-version 1; + namespace "urn:opendaylight:neutron-tapaas"; + prefix neutron-tapaas; + + import ietf-yang-types { prefix "yang"; } + import neutron-attrs { prefix "attrs"; } + + organization "OpenDaylight Neutron Northbound Project"; + + contact "Neutron Northbound "; + + description " This YANG module defines Openstack Neutron Tap-as-a-Service(Taas) Model. + The model is based on the REST APIs exposed by the trunk service of Neutron version 2. + description of the REST API is located in inside the specification for tap-as-a-service + (https://github.com/openstack/tap-as-a-service/blob/master/specs/mitaka/tap-as-a-service.rst)"; + + revision "2017-10-24" { + description + "OpenStack Neutron Tap as a service - Version 1."; + } + + identity direction-base { + description "Base for defining direction of traffic"; + } + + identity direction-in { + description "Traffic arriving at Source Port"; + base direction-base; + } + + identity direction-out { + description "Traffic leaving Source Port"; + base direction-base; + } + + identity direction-both { + description "Both Directions are mirrored"; + base direction-base; + } + + grouping tap-flow-attributes { + description "Grouping for Tap Flow"; + leaf tap-service-id { + type yang:uuid; + description "UUID of the Tap Service Instance"; + } + leaf source-port { + type yang:uuid; + description "Source port of traffic "; + } + leaf direction { + type identityref { + base "direction-base"; + } + description "Direction of traffic"; + } + } + + grouping tap-service-attributes { + description "Grouping for Tap Service"; + leaf port-id { + type yang:uuid; + description "Destination port for traffic"; + } + container tap-flows { + list tap-flow { + key uuid; + uses attrs:base-attributes; + uses tap-flow-attributes; + description "Tap Flow container"; + } + } + } + + grouping tap-services-attributes { + container tap-services { + list tap-service { + key uuid; + uses attrs:base-attributes; + uses tap-service-attributes; + description "Tap Services Container which includes Tap Flow"; + } + } + container tap-services-status { + config false; + list tap-service-status { + key "tap-service"; + leaf tap-service { + type yang:uuid; + description "UUID of the Tap Service Instance"; + } + leaf status { + type string; + description "Operational parameter to track status"; + } + } + } + } +} diff --git a/experimental/odp/neutron-trunks.yang b/experimental/odp/neutron-trunks.yang new file mode 100644 index 000000000..cdf92d771 --- /dev/null +++ b/experimental/odp/neutron-trunks.yang @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd.. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + module neutron-trunks { + yang-version 1; + namespace "urn:opendaylight:neutron-trunks"; + + prefix neutron-trunks; + + import ietf-yang-types { prefix "yang"; } + import neutron-networks { prefix "networks"; } + import neutron-attrs { prefix "attrs"; } + + organization "OpenDaylight Neutron Northbound Project"; + + contact "Neutron Northbound "; + + description " This YANG module defines Openstack Neutron Trunk Ports Model. The model is based on the REST APIs + exposed by the trunk service of Neutron version 2. description of the REST API is located in + both the Openstack Wiki (https://wiki.openstack.org/wiki/Neutron/TrunkPort) and inside the + specification for VLAN Aware VMs + (http://specs.openstack.org/openstack/neutron-specs/specs/newton/vlan-aware-vms.html)"; + + revision "2017-01-18" { + description + "OpenStack Neutron Service Trunk Model - Version 1."; + } + + grouping sub-port-attributes { + description "Decorates a single neutron port to serve as a tunneling port that a VM can use for + segmented traffic. The VM in question must have the ability to encapsulate and decapsulate the + traffic based on the port's tunneling protocol and tunnel id. + NOTE: Currently the only supported tunneling protocol is 802.1q."; + leaf port-id { + type yang:uuid; + description "UUID of the neutron port to be turned into a trunk."; + } + leaf segmentation-type { + type networks:network-type; + description "Type of tunneling protocol used to encapsulate traffic in this port."; + } + leaf segmentation-id { + type uint32; + description "Tunnel id of the specific tunnel."; + } + } + grouping trunk-attributes { + description "Decorates a single neutron port to serve as a trunk port, bundling several sub ports (tunnels) + together."; + uses attrs:base-attributes; + uses attrs:admin-attributes; + leaf port-id { + type yang:uuid; + description "UUID of the neutron port to be turned into a trunk."; + } + list sub-ports { + description "Bundled sub ports (tunnels), transmitted through this trunk port."; + key port-id; + unique "segmentation-type segmentation-id"; + uses sub-port-attributes; + } + } + grouping trunks-attributes{ + container trunks { + list trunk { + key uuid; + uses trunk-attributes; + } + } + } + } diff --git a/experimental/odp/neutron-types.yang b/experimental/odp/neutron-types.yang new file mode 100644 index 000000000..33f2cd7b2 --- /dev/null +++ b/experimental/odp/neutron-types.yang @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2016 Intel Corporation. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-types { + + yang-version 1; + + namespace "urn:opendaylight:neutron-types"; + + prefix neutron-types; + + import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; } + + organization "OpenDaylight Neutron Group"; + + contact "Isaku Yamahata "; + + description "This YANG module defines common typedefs for Openstack Neutron"; + + revision "2016-05-17" { + description + "OpenDaylight Boron release"; + } + + typedef ip-prefix-or-address { + description "ip prefix or ip address"; + type union { + type inet:ip-prefix; + type inet:ip-address; + } + } +} + diff --git a/experimental/odp/neutron-vpnaas.yang b/experimental/odp/neutron-vpnaas.yang new file mode 100644 index 000000000..366e0a1d0 --- /dev/null +++ b/experimental/odp/neutron-vpnaas.yang @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2015 IBM Corporation. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +module neutron-vpnaas { + + yang-version 1; + + namespace "urn:opendaylight:neutron-vpnaas"; + + prefix neutron-vpnaas; + + import ietf-yang-types { prefix "yang"; } + import neutron-attrs { prefix "attrs"; } + + organization "OpenDaylight Neutron Group"; + + contact "R. Moats "; + + description "This YANG module defines Openstack Neutron VPNaaS model"; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + grouping vpnservice-attributes { + leaf router-id { + description "Contains the Router ID for the vpn service."; + type yang:uuid; + } + leaf subnet-id { + description "Contains the Subnet ID for the vpn service."; + type yang:uuid; + } + } + + grouping ikepolicy-attributes { + leaf auth-algorithm { + type string; + description "Authentication hash algorithm."; + } + leaf encryption-algorithm { + description "Encryption algorithm"; + type string; + } + leaf phase-negotiation-mode { + description "IKE mode"; + type string; + } + leaf pfs { + description "Perfect Forward Secrecy"; + type string; + } + leaf ike-version { + description "IKE Version"; + type string; + } + container lifetime { + description "Security Association Lifetime"; + leaf units { + description "Units for lifetime of the security association"; + type string; + } + leaf value { + description "Lifetime value, as a positive integer"; + type int32; + } + } + } + + grouping ipsecpolicy-attributes { + leaf transform-protocol { + type string; + description "Transform protocol."; + } + leaf encapsulation-mode { + description "Encapsulation mode"; + type string; + } + leaf auth-algorithm { + type string; + description "Authentication hash algorithm."; + } + leaf encryption-algorithm { + description "Encryption algorithm"; + type string; + } + leaf pfs { + description "Perfect Forward Secrecy"; + type string; + } + container lifetime { + description "Security Association Lifetime"; + leaf units { + description "Units for lifetime of the security association"; + type string; + } + leaf value { + description "Lifetime value, as a positive integer"; + type int32; + } + } + } + + grouping ipsecconnection-attributes { + leaf peer_address { + type string; + description "Peer gateway public IPv4/IPv6 address or FQDN"; + } + leaf peer_id { + type string; + description "Peer router identity for authentication"; + } + leaf-list peer_cidrs { + type string; + description "Unique list of valid peer private CIDRs in the form /"; + } + leaf route_mode { + type string; + description "Route mode"; + } + leaf mtu { + type int16; + description "Maximum Transmission Unit to address fragmentation"; + } + leaf auth_mode { + type string; + description "Authentication mode"; + } + leaf psk { + type string; + description "Pre Shared Key"; + } + leaf initiator { + type string; + description "Whether this VPN can only respond to connections, response-only, or can initiate as well, bi-directional(default)."; + } + leaf ikepolicy-id { + description "Unique identifier of IKE policy."; + type yang:uuid; + } + leaf ipsecpolicy-id { + description "Unique identifier of IPSec policy."; + type yang:uuid; + } + leaf vpnservice-id { + description "Unique identifier of VPN service."; + type yang:uuid; + } + container dpd { + description "Dead Peer Detection protocol controls"; + leaf action { + description "DPD action"; + type string; + } + leaf interval { + description "DPD interval in seconds"; + type int32; + } + leaf timeout { + description "DPD timeout in seconds"; + type int32; + } + } + } + + grouping vpnservices-attributes { + container vpn-services { + list vpnservice { + key "uuid"; + uses attrs:base-attributes; + uses attrs:admin-attributes; + uses vpnservice-attributes; + } + } + } + grouping ikepolicies-attributes { + container ike-policies { + list ikepolicy { + key "uuid"; + uses attrs:base-attributes; + uses ikepolicy-attributes; + } + } + } + grouping ipsecpolicies-attributes { + container ipsec-policies { + list ipsecpolicy { + key "uuid"; + uses attrs:base-attributes; + uses ipsecpolicy-attributes; + } + } + } + grouping ipsecconnections-attributes { + container ipsec-site-connections { + list ipsecsiteconnection { + key "uuid"; + uses attrs:base-attributes; + uses attrs:admin-attributes; + uses ipsecconnection-attributes; + } + } + } +} diff --git a/experimental/odp/neutron.yang b/experimental/odp/neutron.yang new file mode 100644 index 000000000..0e9fa50e8 --- /dev/null +++ b/experimental/odp/neutron.yang @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +module neutron { + + yang-version 1; + + namespace "urn:opendaylight:neutron"; + + prefix neutron; + + import neutron-extensions { prefix "extensions"; } + import neutron-networks { prefix "networks"; } + import neutron-ports { prefix "ports"; } + import neutron-subnets { prefix "subnets"; } + import neutron-secgroups { prefix "secgroups"; } + import neutron-L3 { prefix "l3"; } + import neutron-metering { prefix "metering"; } + import neutron-lbaasv2 { prefix "lbaasv2"; } + import neutron-l2gateways { prefix "l2gateways"; } + import neutron-vpnaas { prefix "vpnaas"; } + import neutron-fwaas { prefix "fwaas"; } + import neutron-bgpvpns { prefix "bgpvpns"; } + import neutron-hostconfig { prefix "hostconfig"; } + import neutron-qos { prefix "qos"; } + import neutron-sfc-flow-classifier { prefix "sfc-flow-classifier"; } + import neutron-sfc { prefix "sfc"; } + import neutron-trunks { prefix "trunks"; } + import neutron-tapaas { prefix "tapaas"; } + + organization "OpenDaylight Neutron Group"; + + contact "Ed Warnicke "; + + description "This YANG module defines a top level for the neutron models in opendaylight."; + + revision "2015-07-12" { + description + "OpenDaylight Beryllium release"; + } + + container neutron { + uses extensions:extensions-attributes; + uses extensions:service-provider-features-attributes; + uses networks:networks-attributes; + uses subnets:subnets-attributes; + uses ports:ports-attributes; + uses l3:routers-attributes; + uses l3:floatingips-attributes; + uses metering:metering-labels-attributes; + uses metering:metering-rules-attributes; + uses secgroups:security-groups-attributes; + uses secgroups:security-rules-attributes; + uses fwaas:firewalls-attributes; + uses fwaas:policies-attributes; + uses fwaas:rules-attributes; + uses lbaasv2:lbaas-attributes; + uses vpnaas:vpnservices-attributes; + uses vpnaas:ikepolicies-attributes; + uses vpnaas:ipsecpolicies-attributes; + uses vpnaas:ipsecconnections-attributes; + uses bgpvpns:bgpvpns-attributes; + uses l2gateways:l2gateways-attributes; + uses l2gateways:l2gateway-connections-attributes; + uses hostconfig:hostconfig-attributes; + uses qos:qos-attributes; + uses sfc-flow-classifier:sfc-flow-classifiers-attributes; + uses sfc:sfc-attributes; + uses trunks:trunks-attributes; + uses tapaas:tap-services-attributes; + } +} diff --git a/experimental/odp/neutronvpn-config.yang b/experimental/odp/neutronvpn-config.yang new file mode 100644 index 000000000..85064b1ca --- /dev/null +++ b/experimental/odp/neutronvpn-config.yang @@ -0,0 +1,21 @@ +module neutronvpn-config { + yang-version 1; + namespace "urn:opendaylight:netvirt:neutronvpn:config"; + prefix "neutronvpn-config"; + description + "Configuration for neutronvpn-impl."; + + revision "2016-08-06" { + description + "Initial revision."; + } + + container neutronvpn-config { + config true; + + leaf opendaylight-vni-ranges { + type string; + default "70000:99999"; + } + } +} diff --git a/experimental/odp/neutronvpn.yang b/experimental/odp/neutronvpn.yang new file mode 100644 index 000000000..a23213005 --- /dev/null +++ b/experimental/odp/neutronvpn.yang @@ -0,0 +1,463 @@ + +module neutronvpn { + + namespace "urn:opendaylight:netvirt:neutronvpn"; + prefix neutronvpn; + + import ietf-yang-types { prefix yang; revision-date "2013-07-15";} + + revision "2015-06-02" { + description "Neutron based L3Service Module, provides integration of ODL VPN service with Neutron NSF"; + } + + container subnetmaps{ + list subnetmap { + key id; + leaf id { + type yang:uuid; + description "UUID representing the subnet "; + } + + leaf subnet-ip { + type string; + description "Specifies the subnet IP in CIDR format"; + } + + uses network-attributes; + + leaf tenant-id { + type yang:uuid; + description "The UUID of the tenant that will own the subnet."; + } + + leaf router-id { + type yang:uuid; + description "router to which this subnet belongs"; + } + + leaf router-interface-port-id { + type yang:uuid; + description "port corresponding to router interface on this subnet"; + } + + leaf router-intf-mac-address { + type string; + description "router interface mac address on this subnet"; + } + + leaf router-interface-fixed-ip { + type string; + description "fixed ip of the router interface port on this subnet"; + } + + leaf vpn-id { + type yang:uuid; + description "VPN to which this subnet belongs"; + } + + leaf internet-vpn-id { + type yang:uuid; + description "internet VPN to which this IPv6 subnet belongs"; + } + + leaf-list port-list { + type yang:uuid; + } + + leaf-list direct-port-list{ + type yang:uuid; + } + } + } + + container networkMaps{ + list networkMap { + key network-id; + + leaf network-id { + type yang:uuid; + description "UUID representing the network"; + } + + leaf-list subnet-id-list { + type yang:uuid; + description "List of UUIDs representing the subnets associated to the network"; + } + } + } + + grouping vpn-instance{ + + leaf id { + mandatory "true"; + type yang:uuid; + description "vpn-id"; + } + + leaf name { + type string; + description "VPN name"; + } + + leaf tenant-id { + type yang:uuid; + description "The UUID of the tenant that will own the subnet."; + } + + leaf-list route-distinguisher { + type string; + description + "configures a route distinguisher (RD) for the VPN instance. + Format is ASN:nn or IP-address:nn."; + } + + leaf-list import-RT { + type string; + description + "configures a list of import route target. + Format is ASN:nn or IP-address:nn."; + } + + leaf-list export-RT{ + type string; + description + "configures a list of export route targets. + Format is ASN:nn or IP-address:nn."; + } + + list router-ids { + key "router-id"; + leaf router-id { + type yang:uuid; + description "UUID of router "; + } + } + + leaf-list network-ids { + type yang:uuid; + description "UUID representing the network "; + } + + leaf l3vni { + type uint32; + } + } + + grouping network-attributes { + leaf network-id { + type yang:uuid; + description "UUID representing the network"; + } + leaf network-type { + type enumeration { + enum "FLAT"; + enum "VLAN"; + enum "VXLAN"; + enum "GRE"; + } + } + leaf segmentation-id { + type uint32; + description "Optional. Isolated segment on the physical network. + If segment-type is vlan, this ID is a vlan identifier. + If segment-type is vxlan, this ID is a vni. + If segment-type is flat/gre, this ID is set to 0"; + } + } + + container vpnMaps { + list vpnMap { + key vpn-id; + leaf vpn-id { + type yang:uuid; + description "vpn-id"; + } + leaf name { + type string; + description "vpn name"; + } + leaf tenant-id { + type yang:uuid; + description "The UUID of the tenant that will own the subnet."; + } + + list router-ids { + key "router-id"; + leaf router-id { + type yang:uuid; + description "UUID of router "; + } + } + leaf-list network_ids { + type yang:uuid; + description "UUID representing the network "; + } + } + } + + /* Data models to adhere to restart requirements */ + container neutron-vpn-portip-port-data { + config true; + list vpn-portip-to-port { + key "vpn-name port-fixedip"; + leaf vpn-name { type string;} + leaf port-fixedip { type string;} + leaf port-name { type string;} + leaf mac-address { type string;} + leaf subnet-ip { type boolean;} + } + } + + container router-interfaces-map { + list router-interfaces { + key router-id; + leaf router-id { type yang:uuid; } + list interfaces { + key interface-id; + leaf interface-id { type string; } + } + } + } + + /* container for DHCP Configuration */ + container dhcp-config { + list configs { + leaf lease-duration { + type int32; + description "default lease duration for dhcp lease. + -1 means infinite"; + } + leaf default-domain { + type string; + description "default domain-name. used in dhcp reply"; + } + } + } + + rpc createL3VPN{ + description "Create one or more L3VPN(s)"; + input { + list l3vpn { + uses vpn-instance; + } + } + output { + leaf-list response { + type string; + description "Status response for createVPN RPC"; + } + } + } + + rpc createEVPN { + description "Create one or more EVPN(s)"; + input { + list evpn { + uses evpn-instance; + } + } + output { + leaf-list response { + type string; + description "Status response for createEVPN RPC"; + } + } + } + + grouping evpn-instance { + + leaf id { + mandatory "true"; + type yang:uuid; + description "evpn-id"; + } + + leaf name { + type string; + description "EVPN name"; + } + + leaf tenant-id { + type yang:uuid; + description "The UUID of the tenant that will own the subnet."; + } + + leaf-list route-distinguisher { + type string; + description + "configures a route distinguisher (RD) for the EVPN instance. + Format is ASN:nn or IP-address:nn."; + } + + leaf-list import-RT { + type string; + description + "configures a list of import route target. + Format is ASN:nn or IP-address:nn."; + } + + leaf-list export-RT{ + type string; + description + "configures a list of export route targets. + Format is ASN:nn or IP-address:nn."; + } + } + + rpc associateRouter { + description "associates a router with L3VPN"; + input { + leaf vpn-id { + type yang:uuid; + mandatory "true"; + description "vpn-id"; + } + list router-ids { + key "router-id"; + min-elements "1"; + description "list of router-ids to be associated with the vpn"; + leaf router-id { + type yang:uuid; + } + } + } + } + + rpc dissociateRouter { + description "dissociates a router with L3VPN"; + input { + leaf vpn-id { + type yang:uuid; + mandatory "true"; + description "vpn-id"; + } + list router-ids { + key "router-id"; + min-elements "1"; + description "list of router-ids to be dissociated from the vpn"; + leaf router-id { + type yang:uuid; + } + } + } + } + + rpc associateNetworks { + description "associates a list of networks with L3VPN"; + input { + leaf vpn-id { + type yang:uuid; + mandatory "true"; + description "vpn-id"; + } + leaf-list network-id { + type yang:uuid; + description "network-id"; + } + } + output { + leaf response { + type string; + description "Status response for associateNetworks RPC"; + } + } + } + + rpc dissociateNetworks{ + description "dissociates a list of networks with L3VPN"; + input { + leaf vpn-id { + type yang:uuid; + mandatory "true"; + description "vpn-id"; + } + leaf-list network-id { + type yang:uuid; + description "network-id"; + } + } + output { + leaf response { + type string; + description "Status response for dissociateNetworks RPC"; + } + } + } + + rpc getEVPN{ + description "returns EVPN configuration"; + input { + leaf id { + type yang:uuid; + description "evpn-id"; + } + } + output { + list evpn-instances { + uses evpn-instance; + } + } + } + + rpc deleteEVPN{ + description "delete EVPNs for specified Id list"; + input { + leaf-list id { + type yang:uuid; + description "evpn-id"; + } + } + output { + leaf-list response { + type string; + description "Status response for deleteEVPN RPC"; + } + } + } + + rpc deleteL3VPN{ + description "delete VPNs for specified Id list"; + input { + leaf-list id { + type yang:uuid; + description "vpn-id"; + } + } + output { + leaf-list response { + type string; + description "Status response for deleteL3VPN RPC"; + } + } + } + + rpc getL3VPN{ + description "returns VPN configuration"; + input { + leaf id { + type yang:uuid; + description "vpn-id"; + } + } + output { + list l3vpn-instances { + uses vpn-instance; + } + } + } + + rpc get-fixedIPs-for-neutron-port { + description "returns neutron port fixed IPs"; + input { + leaf port-id { + type yang:uuid; + } + } + output { + leaf-list fixedIPs { + type string; + description "The neutron port fixedIPs list corresponding to the port uuid"; + } + } + } +} diff --git a/experimental/odp/nicira-action.yang b/experimental/odp/nicira-action.yang new file mode 100644 index 000000000..ee8b03d0e --- /dev/null +++ b/experimental/odp/nicira-action.yang @@ -0,0 +1,570 @@ +module nicira-action { + yang-version 1; + + namespace "urn:opendaylight:openflowjava:nx:action"; + prefix "nicira-action"; + + import openflow-extensible-match { prefix oxm;} + import openflow-action {prefix ofaction; revision-date "2015-02-03";} + import openflow-types {prefix oft;} + import yang-ext {prefix ext; revision-date "2013-07-09";} + import ietf-inet-types { prefix "inet"; revision-date "2013-07-15"; } + + description + "Nicira openflow extensions of action."; + + revision "2014-04-21" { + description "Initial revision"; + } + + identity nxm-nx-reg-load { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-reg-load2 { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-reg-move { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-output-reg { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-output-reg2 { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-resubmit { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-fin-timeout { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-multipath { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-conntrack { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-ct-clear { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-learn { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-encap { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-decap { + base ofaction:experimenter-action-sub-type; + } + identity nxm-nx-dec-nsh-ttl { + base ofaction:experimenter-action-sub-type; + } + + grouping ofj-nx-action-reg-load-grouping { + container nx-action-reg-load { + leaf ofs_nbits { + type uint16; + } + leaf dst { + type uint32; + } + leaf value { + type uint64; + } + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + + grouping ofj-nx-action-reg-load2-grouping { + container nx-action-reg-load2 { + uses oxm:match-entries-grouping; + } + } + + grouping ofj-nx-action-reg-move-grouping { + container nx-action-reg-move { + leaf n_bits { + type uint16; + } + leaf src_ofs { + type uint16; + } + leaf dst_ofs { + type uint16; + } + leaf src { + type uint64; + } + leaf dst { + type uint64; + } + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + grouping ofj-nx-action-output-reg-grouping { + container nx-action-output-reg { + leaf n_bits { + type uint16; + } + leaf src { + type uint32; + } + leaf max_len { + type uint16; + } + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + + grouping ofj-nx-action-output-reg2-grouping { + container nx-action-output-reg2 { + leaf n_bits { + type uint16; + } + leaf src { + type uint64; + } + leaf max_len { + type uint16; + } + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + + grouping ofj-nx-action-resubmit-grouping { + container nx-action-resubmit { + leaf in-port { + type uint16; + default 0xfff8; // OFPP_INPORT + } + leaf table { + type uint8 { + range "0 .. 255"; + } + default 255; // Current Table + } + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + + grouping ofj-nx-action-fin-timeout-grouping { + container nx-action-fin-timeout { + leaf fin-idle-timeout { + type uint16; + } + leaf fin-hard-timeout { + type uint16; + } + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + + typedef ofj-nx-hash-fields { + type enumeration { + enum NX_HASH_FIELDS_ETH_SRC { + value 0; + description "eth src address only"; + } + enum NX_HASH_FIELDS_SYMMETRIC_L4 { + value 1; + description "L2 through L4 fields"; + } + } + } + + typedef ofj-nx-mp-algorithm { + type enumeration { + enum NX_MP_ALG_MODULO_N { + value 0; + } + enum NX_MP_ALG_HASH_THRESHOLD { + value 1; + } + enum NX_MP_ALG_HRW { + value 2; + } + enum NX_MP_ALG_ITER_HASH { + value 3; + } + } + } + + typedef nx-action-nat-range-present { + type enumeration { + enum NX_NAT_RANGE_IPV4_MIN { + value 1; + description "IPV4 minimum value is present"; + } + enum NX_NAT_RANGE_IPV4_MAX { + value 2; + description "IPV4 maximum value is present"; + } + enum NX_NAT_RANGE_IPV6_MIN { + value 4; + description "IPV6 minimum value is present in range"; + } + enum NX_NAT_RANGE_IPV6_MAX { + value 8; + description "IPV6 maximum value is present in range"; + } + enum NX_NAT_RANGE_PROTO_MIN { + value 16; + description "Port minimum value is present in range"; + } + enum NX_NAT_RANGE_PROTO_MAX { + value 32; + description "Port maximum value is present in range"; + } + } + } + + typedef nx-action-nat-flags { + type enumeration { + enum NX_NAT_F_SRC { + value 1; + description "Source nat is selected ,Mutually exclusive with NX_NAT_F_DST"; + } + enum NX_NAT_F_DST { + value 2; + description "Destination nat is selected"; + } + enum NX_NAT_F_PERSISTENT { + value 4; + description "Persistant flag is selected"; + } + enum NX_NAT_F_PROTO_HASH { + value 8; + description "Hash mode is selected for port mapping, Mutually exclusive with PROTO_RANDOM "; + } + enum NX_NAT_F_PROTO_RANDOM { + value 16; + description "Port mapping will be randomized"; + } + } + } + + grouping ofj-nx-action-multipath-grouping { + container nx-action-multipath { + leaf fields { + type ofj-nx-hash-fields; + } + leaf basis { + type uint16; + default 0x400; + } + leaf algorithm { + type ofj-nx-mp-algorithm; + } + leaf max-link { + type uint16; + } + leaf arg { + type uint32; + } + leaf ofs-nbits { + type uint16; + } + leaf dst { + type uint32; + } + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + + grouping ofj-nx-action-conntrack-grouping { + container nx-action-conntrack { + leaf flags { + type uint16; + } + leaf zone-src { + type uint32; + } + leaf conntrack-zone { + type uint16; + } + leaf recirc-table { + type uint8; + } + leaf experimenter-id { + type oft:experimenter-id; + } + list ct-actions{ + uses ofpact-actions; + } + } + } + + grouping ofj-nx-action-ct-clear-grouping { + container nx-action-ct-clear { + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + + grouping ofpact-actions { + description + "Actions to be performed with conntrack."; + choice ofpact-actions { + case nx-action-nat-case { + container nx-action-nat { + leaf flags { + type uint16; + } + leaf range_present { + type uint16; + } + leaf ip-address-min { + type inet:ip-address; + } + leaf ip-address-max { + type inet:ip-address; + } + leaf port-min { + type uint16; + } + leaf port-max { + type uint16; + } + } + } + case nx-action-ct-mark-case { + container nx-action-ct-mark { + leaf ct-mark { + type uint32; + } + // TODO: ct_mark mask is not supported yet + } + } + } + } + + grouping flow-mod-spec { + description + "flow mod spec indicates the actions that should be performed to create a new flow which was learned from learn action."; + choice flow-mod-spec{ + case flow-mod-add-match-from-field-case{ + container flow-mod-add-match-from-field{ + leaf flow-mod-num-bits{ + type uint16; + } + + leaf src-field{ + type uint32; + } + + leaf src-ofs{ + type uint16; + } + + leaf dst-field{ + type uint32; + } + + leaf dst-ofs{ + type uint16; + } + } + } + case flow-mod-add-match-from-value-case{ + container flow-mod-add-match-from-value{ + leaf flow-mod-num-bits{ + type uint16; + } + + leaf value{ + type uint16; + } + + leaf src-field{ + type uint32; + } + + leaf src-ofs{ + type uint16; + } + } + } + case flow-mod-copy-field-into-field-case{ + container flow-mod-copy-field-into-field{ + leaf flow-mod-num-bits{ + type uint16; + } + + leaf src-field{ + type uint32; + } + + leaf src-ofs{ + type uint16; + } + + leaf dst-field{ + type uint32; + } + + leaf dst-ofs{ + type uint16; + } + } + } + case flow-mod-copy-value-into-field-case{ + container flow-mod-copy-value-into-field{ + leaf flow-mod-num-bits{ + type uint16; + } + + leaf value{ + type uint16; + } + + leaf dst-field{ + type uint32; + } + + leaf dst-ofs{ + type uint16; + } + } + } + case flow-mod-output-to-port-case{ + container flow-mod-output-to-port{ + leaf flow-mod-num-bits{ + type uint16; + } + + leaf src-field{ + type uint32; + } + + leaf src-ofs{ + type uint16; + } + } + } + } + } + + grouping ofj-nx-action-learn-grouping { + container nx-action-learn { + leaf idle-timeout { + type uint16; + } + leaf hard-timeout { + type uint16; + } + leaf priority { + type uint16; + } + leaf cookie { + type uint64; + } + leaf flags { + type uint16; + } + leaf table-id { + type uint8; + } + leaf fin-idle-timeout { + type uint16; + } + leaf fin-hard-timeout { + type uint16; + } + + list flow-mods{ + uses flow-mod-spec; + } + } + } + + grouping ofj-nx-action-encap-grouping { + container nx-action-encap { + leaf packet-type { + type uint32; + } + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + + grouping ofj-nx-action-decap-grouping { + container nx-action-decap { + leaf packet-type { + type uint32; + } + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + + grouping ofj-nx-action-dec-nsh-ttl-grouping { + container nx-action-dec-nsh-ttl { + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + + augment "/ofaction:action-container/ofaction:action-choice" { + ext:augment-identifier "ofj-aug-nx-action"; + case action-reg-load { + uses ofj-nx-action-reg-load-grouping; + } + case action-reg-load2 { + uses ofj-nx-action-reg-load2-grouping; + } + case action-reg-move { + uses ofj-nx-action-reg-move-grouping; + } + case action-output-reg { + uses ofj-nx-action-output-reg-grouping; + } + case action-output-reg2 { + uses ofj-nx-action-output-reg2-grouping; + } + case action-resubmit { + uses ofj-nx-action-resubmit-grouping; + } + case action-fin-timeout { + uses ofj-nx-action-fin-timeout-grouping; + } + case action-multipath { + uses ofj-nx-action-multipath-grouping; + } + case action-conntrack { + uses ofj-nx-action-conntrack-grouping; + } + case action-ct-clear { + uses ofj-nx-action-ct-clear-grouping; + } + case action-learn { + uses ofj-nx-action-learn-grouping; + } + case action-encap { + uses ofj-nx-action-encap-grouping; + } + case action-decap { + uses ofj-nx-action-decap-grouping; + } + case action-dec-nsh-ttl { + uses ofj-nx-action-dec-nsh-ttl-grouping; + } + } +} diff --git a/experimental/odp/nicira-match.yang b/experimental/odp/nicira-match.yang new file mode 100644 index 000000000..c812f911e --- /dev/null +++ b/experimental/odp/nicira-match.yang @@ -0,0 +1,623 @@ +module nicira-match { + yang-version 1; + + namespace "urn:opendaylight:openflowjava:nx:match"; + prefix "nicira-match"; + + import openflow-extensible-match {prefix ofoxm;} + import openflow-types {prefix oft;} + import openflow-augments {prefix aug;} + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} + import yang-ext {prefix ext; revision-date "2013-07-09";} + import ietf-inet-types {prefix inet; revision-date "2013-07-15";} + + description + "Nicira openflow extensions of match."; + + revision "2014-04-21" { + description "Initial revision"; + } + + identity nxm-nx-reg { + base ofoxm:match-field; + } + + identity nxm-nx-reg0 { + base nxm-nx-reg; + } + identity nxm-nx-reg1 { + base nxm-nx-reg; + } + identity nxm-nx-reg2 { + base nxm-nx-reg; + } + identity nxm-nx-reg3 { + base nxm-nx-reg; + } + identity nxm-nx-reg4 { + base nxm-nx-reg; + } + identity nxm-nx-reg5 { + base nxm-nx-reg; + } + identity nxm-nx-reg6 { + base nxm-nx-reg; + } + identity nxm-nx-reg7 { + base nxm-nx-reg; + } + identity nxm-nx-tun-id { + base ofoxm:match-field; + } + identity nxm-nx-arp-sha { + base ofoxm:match-field; + } + identity nxm-nx-arp-tha { + base ofoxm:match-field; + } + identity nxm-of-arp-op { + base ofoxm:match-field; + } + identity nxm-of-arp-spa { + base ofoxm:match-field; + } + identity nxm-of-arp-tpa { + base ofoxm:match-field; + } + identity nxm-of-in-port { + base ofoxm:match-field; + } + identity nxm-nx-tun-ipv4-dst { + base ofoxm:match-field; + } + identity nxm-nx-tun-ipv4-src { + base ofoxm:match-field; + } + identity nxm-of-eth-src { + base ofoxm:match-field; + } + identity nxm-of-eth-dst { + base ofoxm:match-field; + } + identity nxm-of-eth-type { + base ofoxm:match-field; + } + identity nxm-nx-nsp { + base ofoxm:match-field; + } + identity nxm-nx-nsi { + base ofoxm:match-field; + } + identity nxm-nx-nshc-1 { + base ofoxm:match-field; + } + identity nxm-nx-nshc-2 { + base ofoxm:match-field; + } + identity nxm-nx-nshc-3 { + base ofoxm:match-field; + } + identity nxm-nx-nshc-4 { + base ofoxm:match-field; + } + identity nxm-of-tcp-src { + base ofoxm:match-field; + } + identity nxm-of-tcp-dst { + base ofoxm:match-field; + } + identity nxm-of-udp-src { + base ofoxm:match-field; + } + identity nxm-of-udp-dst { + base ofoxm:match-field; + } + identity nxm-nx-ct-state { + base ofoxm:match-field; + } + identity nxm-nx-ct-zone { + base ofoxm:match-field; + } + identity nxm-of-ip-dst { + base ofoxm:match-field; + } + identity nxm-of-ip-src { + base ofoxm:match-field; + } + identity nxm-of-icmp-type { + base ofoxm:match-field; + } + identity nxm-nx-nsh-flags { + base ofoxm:match-field; + } + identity nxm-nx-nsh-mdtype { + base ofoxm:match-field; + } + identity nxm-nx-nsh-np { + base ofoxm:match-field; + } + identity nxm-nx-nsh-ttl { + base ofoxm:match-field; + } + identity nxm-of-mpls-label { + base ofoxm:match-field; + } + identity nxm-of-metadata { + base ofoxm:match-field; + } + identity nxm-nx-ct-mark { + base ofoxm:match-field; + } + identity nxm-nx-ct-tp-src { + base ofoxm:match-field; + } + identity nxm-nx-ct-tp-dst { + base ofoxm:match-field; + } + identity nxm-nx-pkt-mark { + base ofoxm:match-field; + } + + grouping ofj-nxm-nx-match-reg-grouping { + container reg-values { + leaf value { + type uint32; + } + leaf mask { + type uint32; + } + } + } + + grouping ofj-oxm-of-mpls-label-grouping { + container mpls-label-values { + leaf mpls-label { + type uint32; + } + } + } + + grouping ofj-oxm-of-metadata-grouping { + container metadata-values { + leaf metadata { + type uint32; + } + } + } + + grouping ofj-nxm-nx-match-tun-id-grouping { + container tun-id-values { + leaf value { + type uint64; + } + } + } + + grouping ofj-nxm-nx-match-arp-sha-grouping { + container arp-sha-values { + leaf mac-address { + type yang:mac-address; + } + } + } + + grouping ofj-nxm-nx-match-arp-tha-grouping { + container arp-tha-values { + leaf mac-address { + type yang:mac-address; + } + } + } + + grouping ofj-nxm-of-match-arp-op-grouping { + container arp-op-values { + leaf value { + type uint16; + } + } + } + + grouping ofj-nxm-of-match-arp-spa-grouping { + container arp-spa-values { + leaf value { + type uint32; + } + } + } + + grouping ofj-nxm-of-match-arp-tpa-grouping { + container arp-tpa-values { + leaf value { + type uint32; + } + } + } + + grouping ofj-nxm-of-in-port-type-grouping { + container nxm-of-in-port-values { + leaf value { + type uint16; + } + } + } + + grouping ofj-nxm-nx-match-tun-ipv4-dst-grouping { + container tun-ipv4-dst-values { + leaf value { + type uint32; + } + } + } + + grouping ofj-nxm-nx-match-tun-ipv4-src-grouping { + container tun-ipv4-src-values { + leaf value { + type uint32; + } + } + } + + grouping ofj-nxm-of-match-eth-src-grouping { + container eth-src-values { + leaf mac-address { + type yang:mac-address; + } + } + } + + grouping ofj-nxm-of-match-eth-dst-grouping { + container eth-dst-values { + leaf mac-address { + type yang:mac-address; + } + } + } + + grouping ofj-nxm-of-match-eth-type-grouping { + container eth-type-values { + leaf value { + type uint16; + } + } + } + + grouping ofj-nxm-nx-match-nsp-grouping { + container nsp-values { + leaf nsp { + type uint32; + } + leaf mask { + type uint32; + } + } + } + + grouping ofj-nxm-nx-match-nsi-grouping { + container nsi-values { + leaf nsi { + type uint8; + } + leaf mask { + type uint8; + } + } + } + + grouping ofj-nxm-nx-match-nshc-grouping { + leaf nshc { + type uint32; + } + leaf mask { + type uint32; + } + } + + grouping ofj-nxm-nx-match-nshc-1-grouping { + container nshc-1-values { + uses ofj-nxm-nx-match-nshc-grouping; + } + } + + grouping ofj-nxm-nx-match-nshc-2-grouping { + container nshc-2-values { + uses ofj-nxm-nx-match-nshc-grouping; + } + } + + grouping ofj-nxm-nx-match-nshc-3-grouping { + container nshc-3-values { + uses ofj-nxm-nx-match-nshc-grouping; + } + } + + grouping ofj-nxm-nx-match-nshc-4-grouping { + container nshc-4-values { + uses ofj-nxm-nx-match-nshc-grouping; + } + } + + grouping ofj-nxm-of-match-tcp-src-grouping { + container tcp-src-values { + leaf port { + type inet:port-number; + } + leaf mask { + type uint16; + } + } + } + + grouping ofj-nxm-of-match-tcp-dst-grouping { + container tcp-dst-values { + leaf port { + type inet:port-number; + } + leaf mask { + type uint16; + } + } + } + + grouping ofj-nxm-of-match-udp-src-grouping { + container udp-src-values { + leaf port { + type inet:port-number; + } + leaf mask { + type uint16; + } + } + } + + grouping ofj-nxm-of-match-udp-dst-grouping { + container udp-dst-values { + leaf port { + type inet:port-number; + } + leaf mask { + type uint16; + } + } + } + + grouping ofj-nxm-nx-match-ct-state-grouping{ + container ct-state-values { + leaf ct-state { + type uint32; + } + leaf mask { + type uint32; + } + } + } + + grouping ofj-nxm-nx-match-ct-zone-grouping{ + container ct-zone-values { + leaf ct-zone { + type uint16; + } + } + } + + grouping ofj-nxm-of-match-ip-dst-grouping { + container ip-dst-values { + leaf value { + type uint32; + } + } + } + + grouping ofj-nxm-of-match-ip-src-grouping { + container ip-src-values { + leaf value { + type uint32; + } + } + } + + grouping ofj-nxm-of-match-icmp-type-grouping { + container icmp-type-values { + leaf value { + type uint8; + } + } + } + + grouping ofj-nxm-nx-match-nsh-flags-grouping { + container nsh-flags-values { + leaf nsh-flags { + type uint8; + } + leaf mask { + type uint8; + } + } + } + + grouping ofj-nxm-nx-match-nsh-mdtype-grouping { + container nsh-mdtype-values { + leaf value { + type uint8; + } + } + } + + grouping ofj-nxm-nx-match-nsh-np-grouping { + container nsh-np-values { + leaf value { + type uint8; + } + } + } + + grouping ofj-nxm-nx-match-nsh-ttl-grouping { + container nsh-ttl-values { + leaf nsh-ttl { + type uint8; + } + leaf mask { + type uint8; + } + } + } + + grouping ofj-nxm-nx-match-ct-mark-grouping { + container ct-mark-values { + leaf ct-mark { + type uint32; + } + leaf mask { + type uint32; + } + } + } + + grouping ofj-nxm-nx-match-ct-tp-src-grouping { + container ct-tp-src-values { + leaf ct-tp-src { + type uint16; + } + leaf mask { + type uint16; + } + } + } + + grouping ofj-nxm-nx-match-ct-tp-dst-grouping { + container ct-tp-dst-values { + leaf ct-tp-dst { + type uint16; + } + leaf mask { + type uint16; + } + } + } + + grouping ofj-nxm-nx-match-pkt-mark-grouping { + container pkt-mark-values { + leaf pkt-mark { + type uint32; + } + leaf mask { + type uint32; + } + } + } + + augment "/ofoxm:oxm-container/ofoxm:match-entry-value" { + ext:augment-identifier "ofj-aug-nx-match"; + case reg-case-value { + uses ofj-nxm-nx-match-reg-grouping; + } + case tun-id-case-value { + uses ofj-nxm-nx-match-tun-id-grouping; + } + case arp-sha-case-value { + uses ofj-nxm-nx-match-arp-sha-grouping; + } + case arp-tha-case-value { + uses ofj-nxm-nx-match-arp-tha-grouping; + } + case arp-op-case-value { + uses ofj-nxm-of-match-arp-op-grouping; + } + case arp-spa-case-value { + uses ofj-nxm-of-match-arp-spa-grouping; + } + case arp-tpa-case-value { + uses ofj-nxm-of-match-arp-tpa-grouping; + } + case of-in-port-case-value { + uses ofj-nxm-of-in-port-type-grouping; + } + case tun-ipv4-dst-case-value { + uses ofj-nxm-nx-match-tun-ipv4-dst-grouping; + } + case tun-ipv4-src-case-value { + uses ofj-nxm-nx-match-tun-ipv4-src-grouping; + } + case eth-src-case-value { + uses ofj-nxm-of-match-eth-src-grouping; + } + case of-mpls-label-case-value { + uses ofj-oxm-of-mpls-label-grouping; + } + case of-metadata-case-value { + uses ofj-oxm-of-metadata-grouping; + } + case eth-dst-case-value { + uses ofj-nxm-of-match-eth-dst-grouping; + } + case eth-type-case-value { + uses ofj-nxm-of-match-eth-type-grouping; + } + case tcp-src-case-value { + uses ofj-nxm-of-match-tcp-src-grouping; + } + case tcp-dst-case-value { + uses ofj-nxm-of-match-tcp-dst-grouping; + } + case udp-src-case-value { + uses ofj-nxm-of-match-udp-src-grouping; + } + case udp-dst-case-value { + uses ofj-nxm-of-match-udp-dst-grouping; + } + case ct-state-case-value { + uses ofj-nxm-nx-match-ct-state-grouping; + } + case ct-zone-case-value { + uses ofj-nxm-nx-match-ct-zone-grouping; + } + case ip-dst-case-value { + uses ofj-nxm-of-match-ip-dst-grouping; + } + case ip-src-case-value { + uses ofj-nxm-of-match-ip-src-grouping; + } + case icmp-type-case-value { + uses ofj-nxm-of-match-icmp-type-grouping; + } + case ct-mark-case-value { + uses ofj-nxm-nx-match-ct-mark-grouping; + } + case ct-tp-src-case-value { + uses ofj-nxm-nx-match-ct-tp-src-grouping; + } + case ct-tp-dst-case-value { + uses ofj-nxm-nx-match-ct-tp-dst-grouping; + } + case pkt-mark-case-value { + uses ofj-nxm-nx-match-pkt-mark-grouping; + } + } + + augment "/ofoxm:oxm-container/ofoxm:match-entry-value/aug:experimenter-id-case" { + ext:augment-identifier "ofj-aug-nx-exp-match"; + choice nx-exp-match-entry-value { + case nsh-flags-case-value { + uses ofj-nxm-nx-match-nsh-flags-grouping; + } + case nsh-mdtype-case-value { + uses ofj-nxm-nx-match-nsh-mdtype-grouping; + } + case nsh-np-case-value { + uses ofj-nxm-nx-match-nsh-np-grouping; + } + case nsp-case-value { + uses ofj-nxm-nx-match-nsp-grouping; + } + case nsi-case-value { + uses ofj-nxm-nx-match-nsi-grouping; + } + case nshc-case-value { + uses ofj-nxm-nx-match-nshc-grouping; + } + case nsh-ttl-case-value { + uses ofj-nxm-nx-match-nsh-ttl-grouping; + } + } + } + +} diff --git a/experimental/odp/node-config.yang b/experimental/odp/node-config.yang new file mode 100644 index 000000000..58ba497a4 --- /dev/null +++ b/experimental/odp/node-config.yang @@ -0,0 +1,38 @@ +module node-config { + namespace "urn:opendaylight:module:config"; + prefix node-config; + + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + + description "Openflow initial device config."; + + revision "2014-10-15" { + description "Initial revision + + simplified node-context-ref in rpc input"; + } + + grouping node-config { + description "Openflow device initial configuration structure."; + + leaf flag { + type string; + description "Switch config flag. Expected values FRAGNORMAL, OFPCFRAGDROP, OFPCFRAGREASM, OFPCFRAGMASK"; + } + leaf miss-search-length{ + type uint16; + } + } + + rpc set-config { + description "Sending initial configuration to device."; + input { + uses node-config; + uses tr:transaction-aware; + uses inv:node-context-ref; + } + output { + uses tr:transaction-aware; + } + } +} diff --git a/experimental/odp/node-errors.yang b/experimental/odp/node-errors.yang new file mode 100644 index 000000000..ddced8dc8 --- /dev/null +++ b/experimental/odp/node-errors.yang @@ -0,0 +1,191 @@ +module node-error { + namespace "urn:opendaylight:node:error:service"; + prefix node-error; + + import sal-flow {prefix flow; revision-date "2013-08-19";} + import flow-errors {prefix error; revision-date "2013-11-16";} + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} + import yang-ext {prefix ext; revision-date "2013-07-09";} + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + import opendaylight-flow-types {prefix types;revision-date "2013-10-26";} + import opendaylight-group-types {prefix group-type;revision-date "2013-10-18";} + import opendaylight-meter-types {prefix meter-type;revision-date "2013-09-18";} + + description "Openflow error messages notifications - depricated in lithium. + Error messages wont be published as standalone entities but rather packed into + special exception which will be delivered inside of RpcResult in case of failure."; + + revision "2014-04-10" { + description "Initial revision of errors received from a node"; + } + + notification hello-failed-error-notification { + description "Model for ofp_error-Type=0, Hello protocol failed"; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification bad-request-error-notification { + description "Model for ofp_error-Type=1, Request was not understood."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification bad-action-error-notification { + description "Model for ofp_error-Type=2, Error in action description."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification bad-instruction-error-notification { + description "Model for ofp_error-Type=3, Error in instruction list."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification bad-match-error-notification { + description "Model for ofp_error-Type=4, Error in match."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification flow-mod-error-notification { + description "Model for ofp_error-Type=5 - Problem modifying flow entry."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification group-mod-error-notification { + description "Model for ofp_error-Type=6 - Problem modifying group entry."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification port-mod-error-notification { + description "Model for ofp_error-Type=7 - Port mod request failed."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification table-mod-error-notification { + description "Model for ofp_error-Type=8 - Table mod request failed."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification queue-op-error-notification { + description "Model for ofp_error-Type=9 - Queue operation failed."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification switch-config-error-notification { + description "Model for ofp_error-Type=10 - Switch Config request failed."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification role-request-error-notification { + description "Model for ofp_error-Type=11 - Controller Role request failed."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification meter-mod-error-notification { + description "Model for ofp_error-Type=12 - Error in meter."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification table-features-error-notification { + description "Model for ofp_error-Type=13 - Setting table features failed."; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + notification experimenter-error-notification { + description "Model for ofp_error-Type=65535 - Experimenter Error Messages"; + status deprecated; + + uses error:error-message; + uses tr:transaction-aware; + uses tr:transaction-metadata; + uses flow:base-node-error-notification; + uses flow:node-error-reference; + } + + container node-error-container { + uses error:error-message; + } +} + diff --git a/experimental/odp/northbound-api-config.yang b/experimental/odp/northbound-api-config.yang new file mode 100644 index 000000000..eae2a207d --- /dev/null +++ b/experimental/odp/northbound-api-config.yang @@ -0,0 +1,22 @@ +module neutron-northbound-api-config { + + namespace "urn:opendaylight:neutron:northbound-api:config"; + + prefix neutron-northbound-api-config; + + import ietf-yang-types { + prefix yang; + } + + description "This YANG module defines neutron northbound-api configuration."; + revision "2018-10-24"; + + container neutron-northbound-api-config { + config true; + leaf pre-register-port-status-websocket { + type boolean; + default true; + description "Pre-register the port status update websocket"; + } + } +} diff --git a/experimental/odp/notifications@2008-07-14.yang b/experimental/odp/notifications@2008-07-14.yang new file mode 100644 index 000000000..77fbe9820 --- /dev/null +++ b/experimental/odp/notifications@2008-07-14.yang @@ -0,0 +1,83 @@ +module notifications { + + namespace "urn:ietf:params:xml:ns:netconf:notification:1.0"; + prefix "ncEvent"; + + import ietf-yang-types { prefix yang; revision-date "2013-07-15";} + + organization + "IETF NETCONF WG"; + + contact + "netconf@ops.ietf.org"; + + description + "Conversion of the 'ncEvent' XSD in the + NETCONF Notifications RFC."; + + reference + "RFC 5277."; + + revision 2008-07-14 { + description "RFC 5277 version."; + } + + typedef streamNameType { + description + "The name of an event stream."; + type string; + } + + rpc create-subscription { + description + "The command to create a notification subscription. It + takes as argument the name of the notification stream + and filter. Both of those options limit the content of + the subscription. In addition, there are two time-related + parameters, startTime and stopTime, which can be used to + select the time interval of interest to the notification + replay feature."; + + input { + leaf stream { + description + "An optional parameter that indicates which stream of events + is of interest. If not present, then events in the default + NETCONF stream will be sent."; + type streamNameType; + default "NETCONF"; + } + + anyxml filter { + description + "An optional parameter that indicates which subset of all + possible events is of interest. The format of this + parameter is the same as that of the filter parameter + in the NETCONF protocol operations. If not present, + all events not precluded by other parameters will + be sent."; + } + + leaf startTime { + description + "A parameter used to trigger the replay feature and + indicates that the replay should start at the time + specified. If start time is not present, this is not a + replay subscription."; + type yang:date-and-time; + } + + leaf stopTime { + // must ". >= ../startTime"; + description + "An optional parameter used with the optional replay + feature to indicate the newest notifications of + interest. If stop time is not present, the notifications + will continue until the subscription is terminated. + Must be used with startTime."; + type yang:date-and-time; + } + } + } +} + diff --git a/experimental/odp/ntfbench-payload.yang b/experimental/odp/ntfbench-payload.yang new file mode 100644 index 000000000..307c06341 --- /dev/null +++ b/experimental/odp/ntfbench-payload.yang @@ -0,0 +1,24 @@ +module ntfbench-payload { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:ntfbench-payload"; + prefix "ntfbenchmark"; + + revision "2015-07-09" { + description "Initial revision of ntfbenchmark model"; + } + + grouping payload { + list payload { + description + "The payload for the notification"; + key id; + leaf id { + type int32; + } + } + } + + notification ntfbench { + uses payload; + } +} diff --git a/experimental/odp/ntfbenchmark.yang b/experimental/odp/ntfbenchmark.yang new file mode 100644 index 000000000..c1619b6ec --- /dev/null +++ b/experimental/odp/ntfbenchmark.yang @@ -0,0 +1,128 @@ +module ntfbenchmark { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:ntfbenchmark"; + prefix "ntfbenchmark"; + + revision "2015-01-05" { + description "Initial revision of ntfbenchmark model"; + } + + rpc test-status { + description + "Get test status"; + output { + leaf execStatus { + type enumeration { + enum "idle" { + value 1; + } + enum "executing" { + value 2; + } + } + } + leaf ntf-cnt { + type uint32; + default 0; + description + "The number of times the notification benchmark test was invoked"; + } + } + } + + rpc start-test { + description + "Start a new RPC Benchmark test"; + + input { + leaf producer-type { + mandatory true; + type enumeration { + enum "BLOCKING" { + value 1; + description + "The producer waits for a free slot in RPC Broker's ring buffer"; + } + enum "DROPPING" { + value 2; + description + "The producer drops a notification if there is no free slot in RPC Broker's ring buffer"; + } + } + description + "RPC type and client type to use in the test"; + } + leaf producers { + type uint32; + default 1; + description + "Number of notification producers (test client threads) to start"; + } + leaf listeners { + type uint32; + default 1; + description + "Number of notification listener instances"; + } + + leaf payload-size { + type uint32; + default 1; + description + "Notification payload size: number of elements in the list of integers that is the notification payload"; + } + leaf iterations { + type uint32; + default 1; + description + "Number of notifications to generate in each client thread"; + } + + } + + output { + leaf listener-ok { + type uint32; + default 0; + description + "Number of successfully creceived notifications by all listeners"; + } + leaf producer-ok { + type uint32; + default 0; + description + "Number of successfully generated notifications in all producer clients"; + } + leaf producer-error { + type uint32; + default 0; + description + "Number of errors encoutered during notification generation at all producers"; + } + leaf producer-elapsed-time { + type uint32; + default 0; + description + "The time it took for all producers to finish (i.e. to send their notifications), in milliseconds"; + } + leaf listener-elapsed-time { + type uint32; + default 0; + description + "The time it took for all listeners to finish (i.e. to receive their notifications), in milliseconds"; + } + leaf producer-rate { + type uint32; + default 0; + description + "RPC rate (Number of RPCs/sec)"; + } + leaf listener-rate { + type uint32; + default 0; + description + "RPC rate (Number of RPCs/sec)"; + } + } + } +} diff --git a/experimental/odp/odl-arputil.yang b/experimental/odp/odl-arputil.yang new file mode 100644 index 000000000..fc0cf9a93 --- /dev/null +++ b/experimental/odp/odl-arputil.yang @@ -0,0 +1,159 @@ +module odl-arputil { + yang-version 1; + namespace "urn:opendaylight:genius:arputil"; + prefix "odl-arputil"; + + import ietf-interfaces { + prefix if; + } + + import ietf-inet-types { + prefix inet; + } + + import ietf-yang-types { + prefix yang; + } + + import opendaylight-inventory { + prefix inv; revision-date 2013-08-19; + } + + revision "2016-04-06" { + description "Arp Util module"; + } + + grouping interfaces { + list interface-address { + key interface; + leaf interface { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + leaf ip-address { + type inet:ip-address; + } + leaf macaddress { + type yang:phys-address; + } + } + } + + + rpc get-mac { + input { + leaf ipaddress { + type inet:ip-address; + } + uses interfaces; + } + output { + leaf macaddress { + type yang:phys-address; + } + } + } + + rpc send-arp-request { + input { + leaf ipaddress { + type inet:ip-address; + } + uses interfaces; + } + } + + rpc send-arp-response { + input { + leaf dst-ipaddress { + type inet:ip-address; + } + leaf dst-macaddress { + type yang:phys-address; + } + leaf interface { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + leaf src-ipaddress { + type inet:ip-address; + } + leaf src-macaddress { + type yang:phys-address; + } + } + } + + + notification mac-changed { + leaf ipaddress { + type inet:ip-address; + } + leaf macaddress { + type yang:phys-address; + } + leaf interface { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + } + + notification arp-request-received { + leaf dst-ipaddress { + type inet:ip-address; + } + leaf src-ipaddress { + type inet:ip-address; + } + leaf src-mac { + type yang:phys-address; + } + leaf of-table-id { + type uint32; + } + leaf interface { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + leaf metadata { + type uint64; + } + leaf dpn-id { + type uint64; + } + } + + notification arp-response-received { + leaf dst-ipaddress { + type inet:ip-address; + } + leaf src-ipaddress { + type inet:ip-address; + } + leaf src-mac { + type yang:phys-address; + } + leaf dst-mac { + type yang:phys-address; + } + leaf of-table-id { + type uint32; + } + leaf interface { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + } + leaf metadata { + type uint64; + } + leaf dpn-id { + type uint64; + } + } + +} diff --git a/experimental/odp/odl-bgp-app-peer-benchmark-config.yang b/experimental/odp/odl-bgp-app-peer-benchmark-config.yang new file mode 100644 index 000000000..493d489c6 --- /dev/null +++ b/experimental/odp/odl-bgp-app-peer-benchmark-config.yang @@ -0,0 +1,28 @@ +module odl-bgp-app-peer-benchmark-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark-config"; + prefix bgp-benchmark-app-config; + + description + "This module contains the base YANG definitions for + BGP Peer Acceptor Configuration. + Copyright (c)2016 Cisco Systems, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2016-11-29" { + description + "Initial revision."; + } + + container config { + leaf app-peer-id { + type string; + default "192.0.2.6"; + mandatory true; + } + } +} \ No newline at end of file diff --git a/experimental/odp/odl-bgp-app-peer-benchmark.yang b/experimental/odp/odl-bgp-app-peer-benchmark.yang new file mode 100644 index 000000000..91cefd005 --- /dev/null +++ b/experimental/odp/odl-bgp-app-peer-benchmark.yang @@ -0,0 +1,97 @@ +// Contents of "odl-bgp-benchmark" +module odl-bgp-app-peer-benchmark { + namespace "urn:opendaylight:params:xml:ns:yang:odl-bgp-app-peer-benchmark"; + prefix "bgp-app-peer-bm"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + + organization "Cisco Systems, Inc."; + contact "Milos Fabian "; + + description + "This module contains Yang Data Models for BGP Application Peer + Benchmark application. + + Copyright (c)2016 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision 2016-03-09 { + description "Initial revision"; + } + + grouping input { + leaf prefix { + mandatory true; + type inet:ipv4-prefix; + description + "IPv4 prefix"; + } + leaf count { + mandatory true; + type uint32; + description + "loop count"; + } + leaf batchsize { + mandatory true; + type uint32; + description + "batchsize"; + } + } + + grouping output { + container result { + leaf count { + mandatory true; + type uint32; + } + leaf duration { + mandatory true; + type uint32; + units seconds; + } + leaf rate { + mandatory true; + type uint32; + units "per-second"; + } + } + } + + rpc add-prefix { + description + "Add prefix into RIB"; + input { + uses input; + leaf nexthop { + mandatory true; + type inet:ipv4-address; + description + "nexthop"; + } + } + + output { + uses output; + } + } + + rpc delete-prefix { + description + "Delete prefix into RIB"; + + input { + uses input; + } + + output { + uses output; + } + } + +} \ No newline at end of file diff --git a/experimental/odp/odl-bgp-default-policy.yang b/experimental/odp/odl-bgp-default-policy.yang new file mode 100644 index 000000000..8735bc11d --- /dev/null +++ b/experimental/odp/odl-bgp-default-policy.yang @@ -0,0 +1,313 @@ +module odl-bgp-policy { + yang-version 1.1; + namespace "urn:opendaylight:params:xml:ns:yang:odl:bgp:default:policy"; + prefix "odl-bgp-policy"; + + import yang-ext { prefix ext; revision-date 2013-07-09; } + import openconfig-network-instance { prefix netinst; } + import openconfig-bgp { prefix openconfig-bgp; } + import openconfig-bgp-types { prefix oc-bgp-t; } + import bgp-rib { prefix rib; revision-date 2018-03-29; } + import openconfig-routing-policy { prefix rpol; } + import openconfig-bgp-policy { prefix bgppol; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + + organization "AT&T Services, Inc."; + contact "Claudio D. Gasparini "; + + description + "This module contains odl bgp policy model + to be used under openconfig policy model definitions. + + Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2018-01-09" { + description + "ODL BGP policy models"; + } + + grouping match-role-condition-grouping { + leaf role-set { + type leafref { + path "/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/role-sets/role-set/role-set-name"; + require-instance true; + } + description "References a defined neighbor roles set"; + } + uses rpol:match-set-options-restricted-group; + } + + grouping match-role-set-condition-grouping { + container match-role-set { + description + "Match a list of referenced role-set according to the logic + defined in the match-set-options leaf"; + + container from-role { + uses match-role-condition-grouping; + } + + container to-role { + uses match-role-condition-grouping; + } + } + } + + grouping bgp-neighbor { + leaf neighbor-set { + type leafref { + path "/rpol:routing-policy/rpol:defined-sets/rpol:neighbor-sets/rpol:neighbor-set/rpol:neighbor-set-name"; + require-instance true; + } + description "References a defined neighbor set"; + } + uses rpol:match-set-options-restricted-group; + } + + grouping match-bgp-neighbor-grouping { + container match-bgp-neighbor-set { + presence + "The presence of this container indicates that the routes + should match the neighbour address of set referenced"; + + description + "Match a referenced neighbor set according to the logic + defined in the match-set-options-leaf"; + + container from-neighbor { + uses bgp-neighbor; + } + + container to-neighbor { + uses bgp-neighbor; + } + } + } + + grouping match-originator-id-set-condition-grouping { + description + "Match a list of referenced originator-id-set according to the logic + defined in the match-set-options leaf"; + + container match-originator-id-set-condition { + leaf originator-id-set { + type leafref { + path "/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/originator-id-sets/originator-id-set/originator-id-set-name"; + require-instance true; + } + description "References a defined Originator Id set"; + } + uses rpol:match-set-options-restricted-group; + } + } + + grouping match-cluster-id-set-condition-grouping { + description + "Match a list of referenced cluster-id-set according to the logic + defined in the match-set-options leaf"; + container match-cluster-id-set-condition { + leaf cluster-id-set { + type leafref { + path "/rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets/cluster-id-sets/cluster-id-set/cluster-id-set-name"; + require-instance true; + } + description "References a defined cluster Id set"; + } + uses rpol:match-set-options-group; + } + } + + grouping role-set { + description "Data definition for a list of Odl Bgp roles which + are matched as part of a policy"; + + list role-set { + key role-set-name; + description "List of the defined role sets"; + + leaf role-set-name { + type string; + description + "name / label of the role set -- this is used to + reference the set in match conditions"; + } + + leaf-list role { + type rib:peer-role; + description + "List of role expressions that are part of the set"; + } + } + } + + grouping originator-id-set { + description "Data definition for a list of Originators Ids which + are matched as part of a policy"; + + list originator-id-set { + key originator-id-set-name; + description "List of the defined Originators Ids sets"; + + leaf originator-id-set-name { + type string; + description + "name / label of the set -- this is used to + reference the set in match conditions"; + } + + leaf-list originator-id { + type inet:ipv4-address; + description + "List of role expressions that are part of the set"; + } + + container local { + presence "Local originator Id"; + description "Validates also Local Originator Id"; + } + } + } + + grouping cluster-id-set { + description "Data definition for a list of Cluster Ids which + are matched as part of a policy"; + + list cluster-id-set { + key cluster-id-set-name; + description "List of the defined cluster Ids sets"; + + leaf cluster-id-set-name { + type string; + description + "name / label of the set -- this is used to + reference the set in match conditions"; + } + + leaf-list cluster-id { + type bgp-t:cluster-identifier; + description + "List of role expressions that are part of the set"; + } + + container local { + presence "Local cluster Id"; + description "Validates also cluster Originator Id"; + } + } + } + + augment /rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets { + ext:augment-identifier bgp-cluster-id-sets; + container cluster-id-sets { + description "Enclosing container for defined cluster-id sets for matching"; + uses cluster-id-set; + } + } + + augment /rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets { + ext:augment-identifier bgp-role-sets; + container role-sets { + description "Enclosing container for defined role sets for matching"; + uses role-set; + } + } + + augment /rpol:routing-policy/rpol:defined-sets/bgppol:bgp-defined-sets { + ext:augment-identifier bgp-originator-id-sets; + container originator-id-sets { + description "Enclosing container for defined role sets for matching"; + uses originator-id-set; + } + } + + augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:conditions/bgppol:bgp-conditions { + ext:augment-identifier match-afi-safi-not-in-condition; + leaf-list afi-safi-not-in { + type identityref { + base "oc-bgp-t:afi-safi-type"; + } + description + "List of address families which the NLRI must not be within"; + } + } + + augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:conditions/bgppol:bgp-conditions { + ext:augment-identifier match-bgp-neighbor-condition; + uses match-bgp-neighbor-grouping; + } + + augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:conditions/bgppol:bgp-conditions { + ext:augment-identifier match-role-set-condition; + uses match-role-set-condition-grouping; + } + + augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:conditions/bgppol:bgp-conditions { + ext:augment-identifier match-originator-id-set-condition; + uses match-originator-id-set-condition-grouping; + } + + augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:conditions/bgppol:bgp-conditions { + ext:augment-identifier match-cluster-id-set-condition; + uses match-cluster-id-set-condition-grouping; + } + + augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:conditions/bgppol:bgp-conditions { + ext:augment-identifier vpn-non-member-condition; + container vpn-non-member { + presence "Match Route Target Attribute with Route Target memberships of destiny peer. Asserts peers is a non member."; + } + } + + augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:actions/bgppol:bgp-actions { + ext:augment-identifier reflect-attributes-actions; + container reflect-attributes-actions { + presence "Modify attributes so they are updated as per RFC4456 route reflection"; + } + } + + augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:actions/bgppol:bgp-actions { + ext:augment-identifier non-transitive-attributes-filter; + container non-transitive-attributes-filter { + presence "Filters attributes, removing non transitive attributes"; + } + } + + augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:actions/bgppol:bgp-actions { + ext:augment-identifier local-as-path-prepend; + container local-as-path-prepend { + presence "Prepends local AS Path"; + } + } + + augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:actions/bgppol:bgp-actions { + ext:augment-identifier set-cluster-id-prepend; + container set-cluster-id-prepend { + + presence "node is present in the config data to use the Cluster Id prepend action"; + description "action to prepend local Cluster Id to the Cluster Id List"; + } + } + + augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:actions/bgppol:bgp-actions { + ext:augment-identifier set-originator-id-prepend; + container set-originator-id-prepend { + presence "node is present in the config data to use the Originator Id prepend action"; + description "action to prepend Originator Id if non Originator Id is present. If no Originator Id" + + "is defined, local Originator Id is used."; + leaf originator-id { + type inet:ipv4-address; + description "Originator Id"; + } + } + } +} diff --git a/experimental/odp/odl-bgp-evpn.yang b/experimental/odp/odl-bgp-evpn.yang new file mode 100644 index 000000000..a14cc8dee --- /dev/null +++ b/experimental/odp/odl-bgp-evpn.yang @@ -0,0 +1,542 @@ +// vi: set smarttab et sw=4 tabstop=4: +module odl-bgp-evpn { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgp-evpn"; + prefix "bgp-evpn"; + + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import ietf-yang-types {prefix yang; revision-date 2013-07-15;} + import network-concepts { prefix netc; revision-date 2013-11-25; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; } + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } + import pmsi-tunnel { prefix pmsi; revision-date 2018-03-29; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + + organization "Cisco Systems, Inc."; + + contact "Claudio D. Gasparini "; + + description + "This module contains the base data model of a BGP flow specification. + It rolls up the definitions contained in RFC7432. + + Copyright (c)2016 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2017-12-13" { + description "Support draft https://tools.ietf.org/html/draft-sajassi-bess-evpn-vpws-fxc-01"; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision "2016-03-21" { + description + "Initial revision"; + reference "https://tools.ietf.org/html/rfc7432"; + } + + identity l2vpn-address-family { + reference "https://tools.ietf.org/html/rfc7432#section-20"; + base bgp-t:address-family; + } + + identity evpn-subsequent-address-family { + reference "https://tools.ietf.org/html/rfc7432#section-20"; + base bgp-t:subsequent-address-family; + } + + typedef nlri-type { + reference "https://tools.ietf.org/html/rfc7432#section-7"; + type enumeration { + enum eth-a-d-disc { + value 1; + } + enum mac-ip-adv { + value 2; + } + enum inc-mult-eth-tag { + value 3; + } + enum eth-seg { + value 4; + } + } + } + + typedef esi-type { + reference "https://tools.ietf.org/html/rfc7432#section-5"; + type enumeration { + enum arbitrary { + value 0; + } + enum lacp-auto-generated { + value 1; + } + enum lan-auto-generated { + value 2; + } + enum mac-auto-generated { + value 3; + } + enum router-id-generated { + value 4; + } + enum as-generated { + value 5; + } + } + } + + typedef uint24 { + type uint32 { + range "0 .. 16777215"; + } + description + "24-bit unsigned integer."; + } + + grouping ethernet-tag-id { + reference "https://tools.ietf.org/html/rfc7432#section-7.1"; + description "An Ethernet Tag ID is a 32-bit field containing either + a 12-bit or 24-bit identifier that identifies a particular + broadcast domain (e.g., a VLAN) in an EVPN instance"; + + container ethernet-tag-id { + leaf vlan-id { + type uint32; + mandatory true; + } + } + } + + grouping local-discriminator { + leaf local-discriminator { + type uint32; + mandatory true; + } + } + + grouping esi { + reference "https://tools.ietf.org/html/rfc7432#section-5"; + description "Ethernet segment (ES) are identified by a unique non-zero identifier + called an Ethernet Segment Identifier (ESI). An ESI is encoded as a 10-octet + integer in line format with the most significant octet sent first"; + + choice esi { + mandatory true; + case arbitrary-case { + container arbitrary { + description "Type 0 indicates an arbitrary 9-octet ESI + value, which is managed and configured by the operator"; + + leaf arbitrary { + type binary { + length 9; + } + mandatory true; + } + } + } + case lacp-auto-generated-case { + container lacp-auto-generated { + description "When IEEE 802.1AX LACP is used between the PEs and CEs, + ESI type 1 indicates an auto-generated ESI value determined from LACP"; + + leaf ce-lacp-mac-address { + type yang:mac-address; + mandatory true; + } + leaf ce-lacp-port-key { + type uint16; + mandatory true; + } + } + } + case lan-auto-generated-case { + container lan-auto-generated { + description "Type 2 is used in the case of indirectly connected hosts via a bridged + LAN between the CEs and the PEs. The ESI Value is auto-generated and determined + based on the Layer 2 bridge protocol"; + + leaf root-bridge-mac-address { + type yang:mac-address; + mandatory true; + } + leaf root-bridge-priority { + type uint16; + mandatory true; + } + } + } + case mac-auto-generated-case { + container mac-auto-generated { + description "Type 3 indicates a MAC-based ESI Value that + can be auto-generated or configured by the operator."; + + leaf system-mac-address { + type yang:mac-address; + mandatory true; + } + leaf local-discriminator { + type uint24; + mandatory true; + } + } + } + case router-id-generated-case { + container router-id-generated { + description "Type 4 indicates a router-ID ESI Value that + can be auto-generated or configured by the operator"; + + leaf router-id { + type inet:ipv4-address; + mandatory true; + } + uses local-discriminator; + } + } + case as-generated-case { + container as-generated { + description "Type 5 indicates an Autonomous System (AS)-based ESI + Value that can be auto-generated or configured by the operator"; + + leaf as { + type inet:as-number; + mandatory true; + } + uses local-discriminator; + } + } + } + } + + grouping ethernet-a-d-route { + container ethernet-a-d-route { + reference "https://tools.ietf.org/html/rfc7432#section-7.1"; + description "Ethernet Auto-Discovery (A-D) route"; + + uses esi; + uses ethernet-tag-id; + leaf mpls-label { + type netc:mpls-label; + mandatory true; + } + } + } + + grouping mac-ip-adv-route { + container mac-ip-adv-route { + reference "https://tools.ietf.org/html/rfc7432#section-7.2"; + description "MAC/IP Advertisement route"; + + uses esi; + uses ethernet-tag-id; + leaf mac-address { + type yang:mac-address; + mandatory true; + } + leaf ip-address { + type inet:ip-address; + } + leaf mpls-label1 { + type netc:mpls-label; + mandatory true; + } + leaf mpls-label2 { + type netc:mpls-label; + } + } + } + + grouping inc-multi-ethernet-tag-res { + container inc-multi-ethernet-tag-res { + reference "https://tools.ietf.org/html/rfc7432#section-7.3"; + description "Inclusive Multicast Ethernet Tag route"; + + uses ethernet-tag-id; + uses bgp-t:orig-route-ip-grouping; + } + } + + grouping es-route { + container es-route { + reference "https://tools.ietf.org/html/rfc7432#section-7.4"; + description "Ethernet Segment route"; + + uses esi; + uses bgp-t:orig-route-ip-grouping; + } + } + + grouping esi-label-extended-community { + container esi-label-extended-community { + reference "https://tools.ietf.org/html/rfc7432#section-7.5"; + description "The ESI Label Extended Community is a transitive Extended + Community that may be advertised along with Ethernet Auto-discovery + routes, and it enables split-horizon procedures for multihomed sites"; + + leaf single-active-mode { + type boolean; + default false; + } + leaf esi-label { + type netc:mpls-label; + mandatory true; + } + } + } + + grouping es-import-route-extended-community { + container es-import-route-extended-community { + reference "https://tools.ietf.org/html/rfc7432#section-7.6"; + description + "New transitive Route Target extended community carried with + the Ethernet Segment route. When used, it enables all the PEs + connected to the same multihomed site to import the Ethernet Segment + routes"; + + leaf es-import { + type yang:mac-address; + mandatory true; + } + } + } + + grouping mac-mobility-extended-community { + container mac-mobility-extended-community { + reference "https://tools.ietf.org/html/rfc7432#section-7.7"; + description + "The MAC Mobility Extended Community is a transitive Extended Community + that may be advertised along with MAC/IP Advertisement routes."; + + leaf static { + type boolean; + default false; + } + leaf seq-number { + type uint32; + mandatory true; + } + } + } + + grouping default-gateway-extended-community { + container default-gateway-extended-community { + presence + "The Default Gateway community is an Extended Community of an + Opaque Type"; + + reference "https://tools.ietf.org/html/rfc7432#section-7.8"; + + description + "The Default Gateway community is an Extended Community of an + Opaque Type "; + } + } + + typedef operational-mode { + type enumeration { + enum vlan-aware-fxc { + value 1; + } + enum vlan-unaware-fxc { + value 2; + } + } + } + + typedef normalization-type { + type enumeration { + enum single-vid { + value 1; + } + enum double-vid { + value 2; + } + } + } + + grouping layer-2-attributes-extended-community { + container layer-2-attributes-extended-community { + reference "https://tools.ietf.org/html/draft-ietf-bess-evpn-vpws-02#section-3.1"; + description + "The EVPN Layer 2 attributes extended community is a extended community + to be included with Ethernet A-D per EVI route. + This attribute is mandatory if multihoming is enabled."; + + leaf primary-pe { + type boolean; + default false; + } + leaf backup-pe { + type boolean; + default false; + } + leaf control-word { + type boolean; + default false; + } + leaf mode-of-operation { + reference "https://tools.ietf.org/html/draft-sajassi-bess-evpn-vpws-fxc-01#section-5"; + type operational-mode; + } + leaf operating-per { + reference "https://tools.ietf.org/html/draft-sajassi-bess-evpn-vpws-fxc-01#section-5"; + type normalization-type; + } + leaf l2-mtu { + type uint16; + mandatory true; + } + } + } + + grouping evpn-destination { + list evpn-destination { + uses evpn; + uses bgp-msg:path-id-grouping; + } + } + + grouping evpn-routes { + container evpn-routes { + list evpn-route { + key "route-key path-id"; + uses evpn; + uses pmsi:bgp-rib-route { + augment "attributes/extended-communities/extended-community" { + case esi-label-extended-community-case { + uses esi-label-extended-community; + } + case es-import-route-extended-community-case { + uses es-import-route-extended-community; + } + case mac-mobility-extended-community-case { + uses mac-mobility-extended-community; + } + case default-gateway-extended-community-case { + uses default-gateway-extended-community; + } + case layer-2-attributes-extended-community-case { + uses layer-2-attributes-extended-community; + } + } + } + } + } + } + + grouping evpn { + reference "https://tools.ietf.org/html/rfc7432#section-7"; + description "The EVPN NLRI is carried in BGP [RFC4271] using BGP Multiprotocol + Extensions [RFC4760] with an Address Family Identifier (AFI) of 25 (L2VPN) + and a Subsequent Address Family Identifier (SAFI) of 70 (EVPN)"; + + choice evpn-choice { + case ethernet-a-d-route-case { + uses ethernet-a-d-route; + } + case mac-ip-adv-route-case { + uses mac-ip-adv-route; + } + case inc-multi-ethernet-tag-res-case { + uses inc-multi-ethernet-tag-res; + } + case es-route-case { + uses es-route; + } + mandatory true; + } + + uses bgp-t:route-distinguisher-grouping; + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" { + case destination-evpn-case { + container destination-evpn { + uses evpn-destination; + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" { + case destination-evpn-case { + container destination-evpn { + uses evpn-destination; + } + } + } + + augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" { + case evpn-routes-case { + uses evpn-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" { + case evpn-routes-case { + uses evpn-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" { + case evpn-routes-case { + uses evpn-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" { + case evpn-routes-case { + uses evpn-routes; + } + } + + augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" { + case evpn-routes-case { + uses evpn-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case evpn-routes-case { + uses evpn-routes; + } + } + + augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" { + case evpn-routes-case { + uses evpn-routes; + } + } + + augment "/bgp-msg:update/bgp-msg:attributes/bgp-msg:extended-communities/bgp-msg:extended-community" { + case esi-label-extended-community-case { + uses esi-label-extended-community; + } + case es-import-route-extended-community-case { + uses es-import-route-extended-community; + } + case mac-mobility-extended-community-case { + uses mac-mobility-extended-community; + } + case default-gateway-extended-community-case { + uses default-gateway-extended-community; + } + case layer-2-attributes-extended-community-case { + uses layer-2-attributes-extended-community; + } + } +} diff --git a/experimental/odp/odl-bgp-peer-acceptor-config.yang b/experimental/odp/odl-bgp-peer-acceptor-config.yang new file mode 100644 index 000000000..ce76d8c6f --- /dev/null +++ b/experimental/odp/odl-bgp-peer-acceptor-config.yang @@ -0,0 +1,41 @@ +module odl-bgp-peer-acceptor-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:odl-bgp-peer-acceptor-config"; + prefix bgp-peer-acceptor-config; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + + description + "This module contains the base YANG definitions for + BGP Peer Acceptor Configuration. + Copyright (c)2016 Cisco Systems, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2016-10-03" { + description + "Initial revision."; + } + + list bgp-peer-acceptor-config { + key "config-name"; + leaf config-name { + type string; + } + + leaf binding-address { + description "IP address to bind to"; + type inet:ip-address; + default "0.0.0.0"; + } + + leaf binding-port { + description "Port to bind to"; + type inet:port-number; + default "179"; + } + } +} \ No newline at end of file diff --git a/experimental/odp/odl-bgp-topology-config.yang b/experimental/odp/odl-bgp-topology-config.yang new file mode 100644 index 000000000..c9944da7f --- /dev/null +++ b/experimental/odp/odl-bgp-topology-config.yang @@ -0,0 +1,52 @@ +// vi: set smarttab et sw=4 tabstop=4: +module odl-bgp-topology-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config"; + prefix "bgp-topo-cfg"; + + import network-topology { prefix nt; revision-date 2013-10-21; } + import bgp-rib { prefix rib; revision-date 2018-03-29; } + import odl-bgp-topology-types { prefix topology-tpes; revision-date 2016-05-24; } + + organization "Cisco Systems, Inc."; + + contact "Milos Fabian "; + + description + "This module contains the base YANG definitions for + BGP topology provider configuration. + + Copyright (c)2016 Cisco Systems, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision "2016-07-26" { + description + "Initial revision"; + } + + grouping bgp-topology-configuration { + leaf rib-id { + type rib:rib-id; + } + } + + augment "/nt:network-topology/nt:topology" { + when "/nt:network-topology/nt:topology/nt:topology-types/topology-tpes:bgp-ipv4-reachability-topology or" + + "/nt:network-topology/nt:topology/nt:topology-types/topology-tpes:bgp-ipv6-reachability-topology or" + + "/nt:network-topology/nt:topology/nt:topology-types/topology-tpes:bgp-linkstate-topology"; + uses bgp-topology-configuration; + } +} + diff --git a/experimental/odp/odl-bgp-topology-types.yang b/experimental/odp/odl-bgp-topology-types.yang new file mode 100644 index 000000000..7ea3b2e02 --- /dev/null +++ b/experimental/odp/odl-bgp-topology-types.yang @@ -0,0 +1,48 @@ +module odl-bgp-topology-types { + namespace "urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"; + prefix "topology-types"; + + import network-topology { prefix nt; revision-date 2013-10-21; } + + organization "Brocade Communications Systems, Inc."; + contact "Ajay Lele "; + + description + "This module contains augmentations to ODL network topology + types for various BGP topologies. + + Copyright (c) 2016 Brocade Communications Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision 2016-05-24 { + description "Initial revision"; + } + + grouping bgp-ipv4-reachability-topology-type { + container bgp-ipv4-reachability-topology { + presence "Indicates a BGP IPv4 reachability aware topology"; + } + } + + grouping bgp-ipv6-reachability-topology-type { + container bgp-ipv6-reachability-topology { + presence "Indicates a BGP IPv6 reachability aware topology"; + } + } + + grouping bgp-linkstate-topology-type { + container bgp-linkstate-topology { + presence "Indicates a BGP linkstate aware topology"; + } + } + + augment "/nt:network-topology/nt:topology/nt:topology-types" { + uses bgp-ipv4-reachability-topology-type; + uses bgp-ipv6-reachability-topology-type; + uses bgp-linkstate-topology-type; + } +} diff --git a/experimental/odp/odl-bmp-monitor-config.yang b/experimental/odp/odl-bmp-monitor-config.yang new file mode 100644 index 000000000..416bd5b5e --- /dev/null +++ b/experimental/odp/odl-bmp-monitor-config.yang @@ -0,0 +1,82 @@ +module odl-bmp-monitor-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bmp-monitor-config"; + prefix bmp-monitor-config; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import rfc2385 { prefix rfc2385; revision-date 2016-03-24; } + import bmp-monitor { prefix bmp-monitor; revision-date 2018-03-29; } + + description + "This module contains the base YANG definitions for + BMP Monitor Configuration. + Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add support for add-path for all afi/safi."; + } + + revision "2017-12-07" { + description "Add support for add-path in base BGP NLRI."; + } + + revision "2017-05-17" { + description + "Initial revision."; + } + + grouping server-config { + container server { + leaf binding-address { + type inet:ip-address; + default "0.0.0.0"; + } + + leaf binding-port { + type inet:port-number; + mandatory true; + } + } + } + + container odl-bmp-monitors { + list bmp-monitor-config { + + key "monitor-id"; + leaf monitor-id { + type bmp-monitor:monitor-id; + } + + uses server-config; + + list monitored-router { + leaf address { + type inet:ip-address; + mandatory true; + } + + key "address"; + + leaf active { + type boolean; + } + + leaf port { + when "../active = 'true'"; + type inet:port-number; + } + + leaf password { + type rfc2385:rfc2385-key; + description "RFC2385 shared secret"; + } + } + } + } + +} diff --git a/experimental/odp/odl-data-change-counter-config.yang b/experimental/odp/odl-data-change-counter-config.yang new file mode 100644 index 000000000..833e2035b --- /dev/null +++ b/experimental/odp/odl-data-change-counter-config.yang @@ -0,0 +1,32 @@ +// vi: set smarttab et sw=4 tabstop=4: +module odl-data-change-counter-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:bgpcep:data-change-counter-config"; + prefix "dcc-cfg"; + + description + "This module contains the base YANG definitions for + topology data-change counter configuration. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2017-04-24" { + description + "Initial revision"; + } + + list data-change-counter-config { + key "counter-id"; + leaf counter-id { + type string; + mandatory true; + } + leaf topology-name { + type string; + mandatory true; + } + } +} \ No newline at end of file diff --git a/experimental/odp/odl-external-reference.yang b/experimental/odp/odl-external-reference.yang new file mode 100644 index 000000000..e82bfe2b7 --- /dev/null +++ b/experimental/odp/odl-external-reference.yang @@ -0,0 +1,41 @@ +module odl-external-reference { + // vi: set et smarttab sw=4 tabstop=4: + + yang-version 1; + // FIXME: this mode should go to OpenDaylight/mdsal + namespace "urn:opendaylight:params:xml:ns:yang:external:reference"; + prefix "extref"; + + organization "Cisco Systems, Inc."; + + contact "Robert Varga "; + + description + "Model defining the base type for external references for use instead + of an instance-identifier, which does not allow referencing entities + unknown in the model (due to imports, etc.). + + Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v1.0 which accompanies this distribution, + and is available at http://www.eclipse.org/legal/epl-v10.html"; + + revision "2016-01-29" { + description "Initial model"; + } + + typedef external-reference { + description "Reference to a YANG-modeled node which resides outside + of this system. The format must use module names as namespace + prefixes -- in a similar fashion RESTCONF does. The reference + is evaluated from the root of the external system. + + This data type does not hold the coordinates of the external + system, nor does it specify which data store on the external + system should be used to satisfy the reference. This information + should be described in the model which instantiates a leaf of + this type."; + type string; + } +} diff --git a/experimental/odp/odl-fib.yang b/experimental/odp/odl-fib.yang new file mode 100644 index 000000000..c12f91518 --- /dev/null +++ b/experimental/odp/odl-fib.yang @@ -0,0 +1,220 @@ +module odl-fib { + namespace "urn:opendaylight:netvirt:fibmanager"; + prefix odl-fib; + + import yang-ext {prefix ext; revision-date "2013-07-09";} + + revision "2015-03-30" { + description "FIB Manager module"; + } + + grouping ipv4Entries { + list ipv4Entry{ + key "destPrefix"; + leaf destPrefix {type string;} + leaf nextHopAddress {type string;} + } + } + + grouping vrfEntryBase { + leaf destPrefix { + type string; + mandatory true; + } + leaf mac { + type string; + } + leaf origin { + type string; + mandatory true; + } + leaf encap-type { + description + "This flag indicates how to interpret the existing label field. + A value of mplsgre indicates that the label within route paths will continue to be considered as an MPLS Label. + A value of vxlan indicates that l3vni should be used to advertise to bgp and label will be ignored."; + + type enumeration { + enum mplsgre { + value "0"; + description "MPLSOverGRE"; + } + enum vxlan { + value "1"; + description "VNI"; + } + } + default "mplsgre"; + } + + leaf l3vni { + type uint32; + } + leaf gateway_mac_address { + type string; + } + leaf parent-vpn-rd { + description + "If set will get the vpn-to-dpn information from the parent-vpn-rd"; + type string; + } + list route-paths { + key "nexthop-address"; + leaf nexthop-address { + type string; + } + leaf label { + type uint32; + } + } + } + + grouping vrfEntries { + list vrfEntry{ + key "destPrefix"; + uses vrfEntryBase; + } + } + + grouping macVrfEntries { + list macVrfEntry { + key "mac"; + uses vrfEntryBase; + leaf l2vni { + type uint32; + } + } + } + + augment "/odl-fib:fibEntries/odl-fib:vrfTables/odl-fib:vrfEntry" { + ext:augment-identifier "subnetRoute"; + leaf elantag {type uint32;} + } + + augment "/odl-fib:fibEntries/odl-fib:vrfTables/odl-fib:vrfEntry" { + ext:augment-identifier "routerInterface"; + leaf uuid {type string;} + leaf mac-address {type string;} + leaf ip-address {type string;} + } + + container fibEntries { + config true; + list vrfTables{ + key "routeDistinguisher"; + leaf routeDistinguisher {type string;} + uses vrfEntries; + uses macVrfEntries; + } + + container ipv4Table{ + uses ipv4Entries; + } + } + + container label-route-map { + config false; + list label-route-info { + key label; + leaf label { type uint32; } + leaf dpn-id { type uint64; } + leaf prefix { type string; } + leaf-list next-hop-ip-list { type string; } + leaf-list vpn-instance-list { type string; } + leaf parent-vpnid { type uint32; } + leaf vpn-interface-name { type string; } + leaf elan-tag { type uint32; } + leaf is-subnet-route { type boolean; } + leaf parent-vpn-rd { type string; } + } + } + + container extraroute-rds-map { + config true; + list extraroute-rds { + description + "List of route distinguishers used to create a unique NLRI for the destination prefix"; + key "vpnid"; + leaf vpnid { + type uint32; + } + list dest-prefixes { + key "dest-prefix"; + leaf dest-prefix { + type string; + } + list allocated-rds { + key nexthop; + leaf nexthop { + type string; + description "Ip address of the VM which is the nexthop for the extra route"; + } + leaf rd {type string;} + } + } + } + } + + container ip-prefix-map { + description "Stores information about a parent vpn and prefix in that parent vpn, + along with what other vpn-instances import the parent vpn"; + config false; + list ip-prefix-info { + key "prefix parent-primary-rd"; + leaf prefix { + type string; + } + leaf parent-primary-rd { + type string; + } + leaf dpn-id { + type uint64; + } + leaf-list vpn-instance-list { + type string; + } + leaf parent-vpnid { + type uint32; + } + leaf vpn-interface-name { + type string; + } + leaf elan-tag { + type uint32; + } + leaf is-subnet-route { + type boolean; + } + leaf encap-type { + type enumeration { + enum mplsgre { + value "0"; + } + enum vxlan { + value "1"; + } + } + default "mplsgre"; + } + leaf l3vni { + type uint32; + } + leaf l2vni { + type uint32; + } + list route-paths { + key "nexthop-address"; + leaf nexthop-address { + type string; + } + leaf label { + type uint32; + } + leaf gateway_mac_address { + type string; + } + } + } + } + +} diff --git a/experimental/odp/odl-general-entity.yang b/experimental/odp/odl-general-entity.yang new file mode 100644 index 000000000..9a68ebf29 --- /dev/null +++ b/experimental/odp/odl-general-entity.yang @@ -0,0 +1,17 @@ +module odl-general-entity { + namespace "urn:opendaylight:params:xml:ns:yang:mdsal:core:general-entity"; + prefix "odl-general-entity"; + + description "Defines a model to describe a general entity whose path can be used as an ID for an entity that isn't otherwise modelled"; + + revision 2015-09-30 { + description "Initial revision"; + } + + list entity { + key name; + leaf name { + type string; + } + } +} \ No newline at end of file diff --git a/experimental/odp/odl-inet-binary-types.yang b/experimental/odp/odl-inet-binary-types.yang new file mode 100644 index 000000000..9706197c7 --- /dev/null +++ b/experimental/odp/odl-inet-binary-types.yang @@ -0,0 +1,46 @@ +module odl-inet-binary-types { + + yang-version 1; + namespace "urn:opendaylight:lfm:inet-binary-types"; + prefix "inet-binary"; + + contact + "Lori Jakab "; + + description + "Binary representation type definitions for IPv4 and IPv6 addresses and + prefixes"; + + revision "2016-03-03" { + description "Initial revision."; + } + + typedef ipv4-address-binary { + type binary { + length "4"; + } + description + "The ipv4-address-binary type represents an IPv4 address in binary + in network byte order."; + } + + typedef ipv6-address-binary { + type binary { + length "16"; + } + description + "The ipv6-address-binary type represents an IPv6 address in binary + in network byte order."; + } + + typedef ip-address-binary { + type union { + type ipv4-address-binary; + type ipv6-address-binary; + } + description + "The ip-address-binary type represents an IP address in binary + in network byte order, and is IP version neutral. The length of + the byte array implies the IP version."; + } +} diff --git a/experimental/odp/odl-interface-meta.yang b/experimental/odp/odl-interface-meta.yang new file mode 100644 index 000000000..f13e63777 --- /dev/null +++ b/experimental/odp/odl-interface-meta.yang @@ -0,0 +1,151 @@ +module odl-interface-meta { + namespace "urn:opendaylight:genius:interfacemanager:meta"; + prefix "odlifmeta"; + + import ietf-interfaces { + prefix if; + } + + import ovsdb { + prefix southbound; revision-date "2015-01-05"; + } + + import odl-interface { + prefix odlif; revision-date 2016-04-06; + } + + revision "2016-04-06" { + description "ODL rendering specific Interface Manager Meta Module"; + } + + container bridge-interface-info { + description "Contains the list of dpns along with the tunnel interfaces configured on them."; + + list bridge-entry { + key dpid; + leaf dpid { + type uint64; + } + + leaf bridge-reference { + type southbound:ovsdb-bridge-ref; + description "This is the reference to an ovs bridge"; + } + list bridge-interface-entry { + key interface-name; + leaf interface-name { + type string; + } + } + } + } + + container bridge-ref-info { + config false; + description "The container that maps dpid with ovs bridge ref in the operational DS."; + + list bridge-ref-entry { + key dpid; + leaf dpid { + type uint64; + } + + leaf bridge-reference { + type southbound:ovsdb-bridge-ref; + description "This is the reference to an ovs bridge"; + } + } + } + + container interface-child-info { + description "The container of all Child-Interfaces for a given interface."; + list interface-parent-entry { + key parent-interface; + leaf parent-interface { + type string; + } + + list interface-child-entry { + key child-interface; + leaf child-interface { + type string; + } + } + } + } + + container if-indexes-interface-map { + config false; + list if-index-interface { + key if-index; + leaf if-index { + type int32; + } + leaf interface-name { + type string; + } + } + } + + container interface-monitor-id-map { + config false; + list interface-monitor-id { + key interface-name; + leaf interface-name { + type string; + } + leaf-list monitor-id { + type uint32; + } + } + } + + container monitor-id-interface-map { + config false; + list monitor-id-interface { + key monitor-id; + leaf monitor-id { + type uint32; + } + leaf interface-name { + type string; + } + } + } + + container tunnel-instance-interface-map { + config false; + list tunnel-instance-interface { + key tunnel-instance-identifier; + leaf tunnel-instance-identifier { + type string; + } + leaf interface-name { + type string; + } + } + } + + container dpn-to-interface-list { + config false; + description "Contains the list of interfaces on the given dpn"; + + list dpn-to-interface { + key dpid; + leaf dpid { + type uint64; + } + list interface-name-entry { + key interface-name; + leaf interface-name { + type string; + } + leaf interface-type { + type identityref { + base if:interface-type; + } + } + } + } + } +} diff --git a/experimental/odp/odl-interface-rpc.yang b/experimental/odp/odl-interface-rpc.yang new file mode 100644 index 000000000..960c79bc0 --- /dev/null +++ b/experimental/odp/odl-interface-rpc.yang @@ -0,0 +1,205 @@ +module odl-interface-rpc { + namespace "urn:opendaylight:genius:interfacemanager:rpcs"; + prefix "odlifrpc"; + + import ietf-inet-types { + prefix inet; + } + + import odl-interface { + prefix odlif; revision-date 2016-04-06; + } + + import opendaylight-inventory { + prefix inv; revision-date 2013-08-19; + } + + import ietf-interfaces { + prefix if; revision-date 2014-05-08; + } + + import opendaylight-action-types {prefix action;} + import opendaylight-flow-types {prefix offlow;revision-date "2013-10-26";} + + revision "2016-04-06" { + description "ODL Specific Interface Manager Rpcs Module"; + } + + /* RPCs */ + + rpc get-dpid-from-interface { + description "used to retrieve dpid from interface name"; + input { + leaf intf-name { + type string; + } + } + output { + leaf dpid { + type uint64; + } + } + } + + rpc get-port-from-interface { + description "used to retrieve dpid from interface name"; + input { + leaf intf-name { + type string; + } + } + output { + leaf dpid { + type uint64; + } + leaf portno { + type uint32; + } + leaf portname { + type string; + } + leaf phy-address { + type string; + } + } + } + + rpc get-egress-actions-for-interface { + description "used to retrieve group actions to use from interface name"; + input { + leaf intf-name { + type string; + mandatory true; + } + + leaf tunnel-key { + description "It can be VNI for VxLAN tunnel ifaces, Gre Key for GRE tunnels, etc."; + type uint32; + mandatory false; + } + leaf action-key { + description "By default action keys are incremented from zero, for custom initial value set action-key"; + type int32; + mandatory false; + } + } + output { + uses action:action-list; + } + } + + rpc get-egress-instructions-for-interface { + description "used to retrieve flow instructions to use from interface name"; + input { + leaf intf-name { + type string; + mandatory true; + } + + leaf tunnel-key { + description "It can be VNI for VxLAN tunnel ifaces, Gre Key for GRE tunnels, etc."; + type uint32; + mandatory false; + } + } + output { + uses offlow:instruction-list; + } + } + + rpc get-endpoint-ip-for-dpn { + description "to get the local ip of the tunnel/trunk interface"; + input { + leaf dpid { + type uint64; + } + } + output { + leaf-list local-ips { + type inet:ip-address; + } + } + } + + rpc get-interface-type { + description "to get the type of the interface(vlan, vxlan, vxlan-gpe or gre)"; + input { + leaf intf-name { + type string; + } + } + output { + leaf interface-type { + type identityref { + base if:interface-type; + } + } + } + } + + rpc get-tunnel-type { + description "to get the type of the tunnel interface(vxlan, vxlan-gpe, gre, etc.)"; + input { + leaf intf-name { + type string; + } + } + output { + leaf tunnel-type { + type identityref { + base odlif:tunnel-type-base; + } + } + } + } + + + rpc get-nodeconnector-id-from-interface { + description "to get nodeconnector id associated with an interface"; + input { + leaf intf-name { + type string; + } + } + output { + leaf nodeconnector-id { + type inv:node-connector-id; + } + } + } + + rpc get-interface-from-if-index { + description "to get interface associated with an if-index"; + input { + leaf if-index { + type int32; + } + } + output { + leaf interface-name { + type string; + } + } + } + + rpc get-dpn-interface-list { + description "used to retrieve interface list for a given Dpn"; + input { + leaf dpid { + type uint64; + } + } + output { + list interfaces { + leaf interface-name { + type string; + } + leaf interface-type { + type identityref { + base if:interface-type; + } + } + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/odl-interface-service-bindings.yang b/experimental/odp/odl-interface-service-bindings.yang new file mode 100644 index 000000000..2dabad669 --- /dev/null +++ b/experimental/odp/odl-interface-service-bindings.yang @@ -0,0 +1,259 @@ +module interface-service-bindings { + namespace "urn:opendaylight:genius:interfacemanager:servicebinding"; + prefix ifservicebindings; + + import opendaylight-flow-types {prefix offlow;revision-date "2013-10-26";} + import openflowplugin-extension-nicira-action { + prefix ofplugin; + revision-date "2014-07-14"; + } + + import yang-ext { + prefix ext; + } + + import ietf-interfaces { + prefix if; revision-date 2014-05-08; + } + + revision "2016-04-06" { + description "This YANG module defines the service binding model."; + } + + identity service-type-base { + description "Base identity for all service-types"; + } + + identity service-type-flow-based { + description "Service type for flow-based services"; + base service-type-base; + } + + identity service-mode-base { + description "Base identity for all service-modes"; + } + + identity service-mode-ingress { + description "Service mode for ingress binding services. + Ingress binding services get applied to all packets ingressing the switch. + e.g. egress ACLs applied to VM ports are considered ingress service for the switch"; + base service-mode-base; + } + + identity service-mode-egress { + description "Service mode for egress binding services. + Egress binding services get applied to all packets egressing the switch. + e.g. ingress ACLs applied to VM ports are considered egress service for the switch"; + base service-mode-base; + } + + container service-bindings { + list services-info { + key "interface-name service-mode"; + leaf interface-name { + type string; + } + + leaf service-mode { + type identityref{ + base service-mode-base; + } + } + + list bound-services { + key "service-priority"; + max-elements "16"; + min-elements "0"; + leaf service-priority { + type uint8; + } + + leaf service-type { + type identityref { + base service-type-base; + } + } + + leaf service-name { + type string; + } + } + } + } + + grouping service-openflow-info { + description "openflow specific information for services info."; + + leaf dispatcher-table-id { + type uint8; + } + + leaf flow-priority { + type uint16; + } + + leaf flow-cookie { + type uint64; + } + + uses offlow:instruction-list; + } + + augment "/service-bindings/services-info/bound-services" { + ext:augment-identifier "stype-openflow"; + when "service-type = 'service-type-flow-based'"; + uses service-openflow-info; + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/apply-actions-case/apply-actions/action/action" { + case "service-binding-nx-action-reg-load-apply-actions-case" { + uses ofplugin:nx-action-reg-load-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/write-actions-case/write-actions/action/action" { + case "service-binding-nx-action-reg-load-write-actions-case" { + uses ofplugin:nx-action-reg-load-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/apply-actions-case/apply-actions/action/action" { + case "service-binding-nx-action-reg-move-apply-actions-case" { + uses ofplugin:nx-action-reg-move-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/write-actions-case/write-actions/action/action" { + case "service-binding-nx-action-reg-move-write-actions-case" { + uses ofplugin:nx-action-reg-move-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/apply-actions-case/apply-actions/action/action" { + case "service-binding-nx-action-output-reg-apply-actions-case" { + uses ofplugin:nx-action-output-reg-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/write-actions-case/write-actions/action/action" { + case "service-binding-nx-action-output-reg-write-actions-case" { + uses ofplugin:nx-action-output-reg-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/apply-actions-case/apply-actions/action/action" { + case "service-binding-nx-action-resubmit-apply-actions-case" { + uses ofplugin:nx-action-resubmit-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/write-actions-case/write-actions/action/action" { + case "service-binding-nx-action-resubmit-write-actions-case" { + uses ofplugin:nx-action-resubmit-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/apply-actions-case/apply-actions/action/action" { + case "service-binding-nx-action-multipath-apply-actions-case" { + uses ofplugin:nx-action-multipath-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/write-actions-case/write-actions/action/action" { + case "service-binding-nx-action-multipath-write-actions-case" { + uses ofplugin:nx-action-multipath-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/apply-actions-case/apply-actions/action/action" { + case "service-binding-nx-action-encap-apply-actions-case" { + uses ofplugin:nx-action-encap-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/write-actions-case/write-actions/action/action" { + case "service-binding-nx-action-encap-write-actions-case" { + uses ofplugin:nx-action-encap-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/apply-actions-case/apply-actions/action/action" { + case "service-binding-nx-action-decap-apply-actions-case" { + uses ofplugin:nx-action-decap-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/write-actions-case/write-actions/action/action" { + case "service-binding-nx-action-decap-write-actions-case" { + uses ofplugin:nx-action-decap-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/apply-actions-case/apply-actions/action/action" { + case "service-binding-nx-action-conntrack-apply-actions-case" { + uses ofplugin:nx-action-conntrack-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/write-actions-case/write-actions/action/action" { + case "service-binding-nx-action-conntrack-write-actions-case" { + uses ofplugin:nx-action-conntrack-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/apply-actions-case/apply-actions/action/action" { + case "service-binding-nx-action-learn-apply-actions-case" { + uses ofplugin:nx-action-learn-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/write-actions-case/write-actions/action/action" { + case "service-binding-nx-action-learn-write-actions-case" { + uses ofplugin:nx-action-learn-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/apply-actions-case/apply-actions/action/action" { + case "service-binding-nx-action-dec-nsh-ttl-apply-actions-case" { + uses ofplugin:nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/service-bindings/services-info/bound-services/instruction/instruction/write-actions-case/write-actions/action/action" { + case "service-binding-nx-action-dec-nsh-ttl-write-actions-case" { + uses ofplugin:nx-action-dec-nsh-ttl-grouping; + } + } + + container bound-services-state-list { + config false; + description "Contains the interface-state information for bound-services"; + + list bound-services-state { + key "interface-name service-mode"; + leaf interface-name { + type string; + } + + leaf service-mode { + type identityref{ + base service-mode-base; + } + } + leaf dpid { + type uint64; + } + leaf port-no { + type uint32; + } + leaf if-index { + type int32; + } + leaf interface-type { + type identityref { + base if:interface-type; + } + } + } + } +} diff --git a/experimental/odp/odl-interface.yang b/experimental/odp/odl-interface.yang new file mode 100644 index 000000000..c0c5b5fbe --- /dev/null +++ b/experimental/odp/odl-interface.yang @@ -0,0 +1,305 @@ +module odl-interface { + namespace "urn:opendaylight:genius:interfacemanager"; + + prefix "odlif"; + + import ietf-interfaces { + prefix if; + } + + import yang-ext { + prefix ext; + } + + import iana-if-type { + prefix ianaift; + } + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + + import opendaylight-inventory { + prefix inv; revision-date 2013-08-19; + } + + import opendaylight-l2-types { prefix ethertype; revision-date "2013-08-27";} + + revision "2016-04-06" { + description "ODL Interface Manager Module"; + } + + identity stacked-vlan { + base if:interface-type; + reference "Q-in-Q interface"; + } + + identity mpls { + base if:interface-type; + reference "MPLS interface"; + } + + identity tunnel-type-base { + description "Base identity for all tunnel-types"; + } + + identity tunnel-type-vxlan { + description "Tunnel type for vxlan tunnels"; + base tunnel-type-base; + } + + identity tunnel-type-vxlan-gpe { + description "Tunnel type for vxlan-gpe"; + base tunnel-type-base; + } + + identity tunnel-type-gre { + description "Tunnel type for gre tunnels"; + base tunnel-type-base; + } + + identity tunnel-type-mpls-over-gre { + description "Tunnel type for mpls over gre tunnels"; + base tunnel-type-base; + } + + identity tunnel-type-logical-group { + description "Aggregation group of multiple tunnel endpoints between two DPNs"; + base tunnel-type-base; + } + + identity tunnel-monitoring-type-base { + description "Base identity for all tunnel-monitoring-types"; + } + + identity tunnel-monitoring-type-lldp { + description "Tunnel monitoring using lldp"; + base tunnel-monitoring-type-base; + } + + identity tunnel-monitoring-type-bfd { + description "Tunnel monitoring using bfd support on OVS"; + base tunnel-monitoring-type-base; + } + + grouping tunnel-optional-params { + leaf tunnel-source-ip-flow { + description "Use local_ip=flow for this tunnel"; + type boolean; + default false; + } + leaf tunnel-remote-ip-flow { + description "Use remote_ip=flow for this tunnel"; + type boolean; + default false; + } + + leaf weight { + type uint16; + default 1; + description "Bucket weight if tunnel belongs to OF select group"; + } + + list tunnel-options { + key "tunnel-option"; + leaf tunnel-option { + description "Tunnel Option name"; + type string; + } + leaf value { + description "Option value"; + type string; + } + } + } + + grouping monitor-params { + leaf monitor-enabled { + type boolean; + default false; + } + + leaf monitor-interval { + type uint32; + default 10000; + } + + leaf monitor-protocol { + type identityref { + base tunnel-monitoring-type-base; + } + default tunnel-monitoring-type-bfd; + } + + list monitor-config { + key "monitor-config-key"; + leaf monitor-config-key { + type string; + } + leaf monitor-config-value { + type string; + } + } + } + + /* Overridding of OVS Split-Horizon Protection */ + augment "/if:interfaces/if:interface" { + ext:augment-identifier "split-horizon"; + leaf override-split-horizon-protection { + type boolean; + default "false"; + description "represents whether to override OVS split horizon protection on this port."; + } + } + + augment "/if:interfaces/if:interface" { + ext:augment-identifier "parent-refs"; + leaf datapath-node-identifier { + type uint64; + description "can be a physical switch identifier (optional)"; + } + + leaf parent-interface { + type string; + description "can be a physical switch port or virtual switch port e.g. neutron port"; + } + + list node-identifier { + key "topology-id"; + description "an identifier of the dependant underlying configuration protocol"; + leaf "topology-id" { + type string; + description "can be ovsdb configuration protocol"; + } + leaf "node-id" { + type string; + description "can be hwvtep configuration protocol"; + } + } + } + + /* interface type specific properties */ + + /* VLAN logical port */ + augment "/if:interfaces/if:interface" { + ext:augment-identifier "if-l2vlan"; + when "if:type = 'ianaift:l2vlan'"; + leaf vlan-id { + type ethertype:vlan-id; + } + + leaf l2vlan-mode { + description "The VLAN mode of the L2Vlan Interface."; + type enumeration { + enum "access" { + value 1; + description + "The VLAN mode access."; + } + enum "native-tagged" { + value 2; + description + "The VLAN mode native-tagged."; + } + enum "native-untagged" { + value 3; + description + "The VLAN mode native-untagged."; + } + enum "trunk" { + value 4; + description + "The VLAN mode trunk."; + } + enum "trunk-member" { + value 5; + description + "The VLAN mode trunk-member."; + } + enum "transparent" { + value 6; + description + "The VLAN mode transparent."; + } + } + default "trunk"; + } + } + + /* Q-in-Q logical port */ + augment "/if:interfaces/if:interface" { + ext:augment-identifier "if-stacked-vlan"; + when "if:type = 'stacked-vlan'"; + leaf stacked_vlan-id { + type uint16 { + range "1..4094"; + } + } + } + + augment "/if:interfaces/if:interface" { + ext:augment-identifier "if-tunnel"; + when "if:type = 'ianaift:tunnel'"; + + leaf internal { + type boolean; + default "false"; + description + "represents whether this is an internal or external tunnel."; + } + + leaf tunnel-interface-type { + type identityref { + base tunnel-type-base; + } + } + + leaf tunnel-source { + type inet:ip-address; + description "Local Endpoint IP address"; + } + + leaf tunnel-destination { + type inet:ip-address; + description "Remote Endpoint IP address"; + } + + leaf tunnel-gateway { + type inet:ip-address; + description "gateway IP address"; + } + + uses tunnel-optional-params; + uses monitor-params; + } + + /* MPLS logical port */ + augment "/if:interfaces/if:interface" { + ext:augment-identifier "if-mpls"; + when "if:type = 'mpls'"; + leaf-list labelStack { + type uint32 { + range "15..1048575"; + } + } + leaf numLabels{ + type uint8 { + range "1..7"; + } + } + } + + /* Port to external network */ + augment "/if:interfaces/if:interface" { + ext:augment-identifier "if-external"; + when "if:type = 'ianaift:l2vlan'"; + + leaf external { + type boolean; + default "true"; + description + "represents whether port belongs to external network."; + } + } +} diff --git a/experimental/odp/odl-itm-meta.yang b/experimental/odp/odl-itm-meta.yang new file mode 100644 index 000000000..ac2585d14 --- /dev/null +++ b/experimental/odp/odl-itm-meta.yang @@ -0,0 +1,111 @@ +module odl-itm-meta { + namespace "urn:opendaylight:genius:itm:meta"; + prefix "odlitmmeta"; + + import ietf-interfaces { + prefix if; + } + + import ovsdb { + prefix southbound; revision-date "2015-01-05"; + } + + import odl-interface { + prefix odlif; revision-date 2016-04-06; + } + + revision "2017-12-10" { + description "ODL rendering specific ITM Meta Module"; + } + + container bridge-tunnel-info { + description "Contains the list of dpns along with the tunnel interfaces configured on them."; + + list ovs-bridge-entry { + key dpid; + leaf dpid { + type uint64; + } + leaf ovs-bridge-reference { + type southbound:ovsdb-bridge-ref; + description "This is the reference to an ovs bridge"; + } + list ovs-bridge-tunnel-entry { + key tunnel-name; + leaf tunnel-name { + type string; + } + } + } + } + + container ovs-bridge-ref-info { + config false; + description "The container that maps dpid with ovs bridge ref in the operational DS."; + + list ovs-bridge-ref-entry { + key dpid; + leaf dpid { + type uint64; + } + leaf ovs-bridge-reference { + type southbound:ovsdb-bridge-ref; + description "This is the reference to an ovs bridge"; + } + } + } + + container if-indexes-tunnel-map { + config false; + list if-index-tunnel { + key if-index; + leaf if-index { + type int32; + } + leaf interface-name { + type string; + } + } + } + + container dpn-to-interface-list { + config false; + description "Contains the list of interfaces on the given dpn"; + + list dpn-to-interface { + key dpid; + leaf dpid { + type uint64; + } + list interface-name-entry { + key interface-name; + leaf interface-name { + type string; + } + leaf interface-type { + type identityref { + base if:interface-type; + } + } + } + } + } + + container interface-child-info { + description "The container of all child-interfaces for an interface."; + + list interface-parent-entry { + key parent-interface; + leaf parent-interface { + type string; + } + + list interface-child-entry { + key child-interface; + leaf child-interface { + type string; + } + } + } + } +} diff --git a/experimental/odp/odl-l3vpn.yang b/experimental/odp/odl-l3vpn.yang new file mode 100644 index 000000000..b03a029c2 --- /dev/null +++ b/experimental/odp/odl-l3vpn.yang @@ -0,0 +1,759 @@ +module odl-l3vpn { + namespace "urn:opendaylight:netvirt:l3vpn"; + prefix odl-l3vpn; + + import yang-ext {prefix ext; revision-date "2013-07-09";} + import l3vpn { prefix l3vpn; revision-date "2014-08-15"; } + import ietf-yang-types { prefix "yang"; revision-date "2013-07-15"; } + import odl-interface { prefix odlif; revision-date "2016-04-06"; } + import neutronvpn { + prefix nvpn; + revision-date "2015-06-02"; + } + + revision "2013-09-11" { + description "L3 VPN Service module"; + } + + grouping adjacency-list{ + list adjacency{ + key "ip_address"; + leaf-list next-hop-ip-list { type string; } + leaf ip_address {type string;} + leaf adjacency_type { + description "The type of adjacency"; + type enumeration { + enum "primary-adjacency" { + value 1; + description + "Primary adjacency type."; + } + enum "learnt-ip" { + value 2; + description + "Learnt ip adjacency type."; + } + enum "extra-route" { + value 3; + description + "Extra route adjacency type."; + } + } + default "extra-route"; + } + leaf mac_address {type string;} /* optional */ + leaf subnet_id {type yang:uuid;} /* optional */ + leaf subnet_gateway_ip {type string;} /* optional */ + leaf phys-network-func { + type boolean; + default false; + description "Value of True indicates this is an adjacency of a device in a provider network"; + } + uses adjacency-op-data; + } + } + + grouping adjacency-op-data{ + leaf label { type uint32; config "false"; } /* optional */ + leaf subnet_gateway_mac_address {type string; config "false";} /* optional */ + leaf vrf-id { type string; config "false"; } + leaf marked_for_deletion { + config "false"; + type boolean; + description "This flag if true suggest this adjancency has been marked for deletion"; + } + } + + grouping vpn-route-list{ + leaf-list route-entry-id{ + type uint32; + } + } + + augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" { + ext:augment-identifier "adjacencies"; + uses adjacency-list; + } + + /* Operational DS containers for reverse lookups*/ + container prefix-to-interface { + config false; + list vpn-ids { + key vpn-id; + leaf vpn-id {type uint32;} + list prefixes { + key ip_address; + leaf ip_address {type string;} + leaf dpnId { + type uint64; + } + leaf vpn-interface-name { + type string; + } + uses nvpn:network-attributes; + leaf prefix-cue { + type enumeration { + enum none { + value "0"; + description "Nothing special"; + } + enum nat { + value "1"; + description "NAT prefix"; + } + enum phys-net-func { + value "2"; + description "Physical Network Function(PNF) prefix"; + } + enum subnet-route { + value "3"; + description "Subnet Route prefix"; + } + } + default "none"; + } + } + } + } + + container vpn-to-extraroutes { + config false; + list vpn { + key vpn-name; + leaf vpn-name { + type string; + description "VPN Instance name"; + } + list extra-routes { + key vrf-id; + leaf vrf-id { + description + "The vrf-id configures unique route distinguisher (RD) for each ipv4 + or ipv6 prefix when its nexthop-ip-list connected to same compute node"; + type string; + } + list routes { + key prefix; + leaf prefix {type string;} + leaf-list nexthop-ip-list { + type string; + } + } + } + } + } + + /* Data models to adhere to restart requirements */ + container vpn-instance-to-vpn-id { + list vpn-instance { + key vpn-instance-name; + leaf vpn-instance-name { + type string; + } + leaf vpn-id { + type uint32; + } + leaf vrf-id { + description + "The vrf-id command configures a route distinguisher (RD) + for the IPv4 or IPv6 address family of a VPN instance or + vpn instance name for internal vpn case."; + type string; + } + } + } + + container vpn-id-to-vpn-instance { + list vpn-ids { + key vpn-id; + leaf vpn-id { + type uint32; + } + leaf vpn-instance-name { + type string; + } + leaf vrf-id { + description + "The vrf-id command configures a route distinguisher (RD) + for the IPv4 or IPv6 address family of a VPN instance or + vpn instance name for internal vpn case."; + type string; + } + leaf external-vpn { + type boolean; + description "The VPN is external?"; + } + } + } + + container evpn-rd-to-networks { + description "Holds the networks to which given evpn is attached"; + list evpn-rd-to-network { + key rd; + leaf rd { + type string; + } + leaf network-id { + type string; + } + } + } + + /* Binding Interfaces to a VPN Instance. */ + container vpn-interface-op-data { + config false; + list vpn-interface-op-data-entry { + key "name vpn-instance-name"; + leaf name { + type string; + } + leaf vpn-instance-name { + type string { + length "1..40"; + } + } + max-elements "unbounded"; + min-elements "0"; + leaf dpn-id { + type uint64; + } + leaf router-interface { + type boolean; + } + leaf gateway-mac-address { + type string; + } + leaf lport-tag { + type uint32; + } + leaf vpn-interface-state { + description + "This flag indicates the state of this interface in the VPN identified by vpn-name. + ACTIVE state indicates that this vpn-interface is currently associated to vpn-name + available as one of the keys. + INACTIVE state indicates that this vpn-interface has already been dis-associated + from vpn-name available as one of the keys."; + + type enumeration { + enum active { + value "0"; + description + "Active state"; + } + enum inactive { + value "1"; + description + "Inactive state"; + } + } + default "active"; + } + } + } + + augment "/odl-l3vpn:vpn-interface-op-data/odl-l3vpn:vpn-interface-op-data-entry" { + ext:augment-identifier "adjacencies-op"; + uses adjacency-list; + } + + container vpn-instance-op-data { + config false; + list vpn-instance-op-data-entry { + key vrf-id; + leaf vpn-id { type uint32;} + leaf vrf-id { + description + "The vrf-id command configures a route distinguisher (RD) + for the IPv4 or IPv6 address family of a VPN instance or + vpn instance name for internal vpn case."; + type string; + } + + leaf vpn-instance-name { + description "Typical the VPN Uuid"; + type string; + } + + leaf vpn-interface-count { type uint32; } + uses vpn-route-list; + list vpn-to-dpn-list { + key dpnId; + leaf dpnId { + type uint64; + } + list vpn-interfaces { + key interface-name; + leaf interface-name { + type string; + } + } + list ip-addresses { + key ip-address; + leaf ip-address { type string; } + leaf ip-address-source { + description + "This field indicates whether the IP address here is an External-Fixed-Ip(Owned by Router). + or Floating-Ip(Used by Ports)."; + type enumeration { + enum "ExternalFixedIP"; + enum "FloatingIP"; + } + } + } + leaf dpn-state { + description + "This flag indicates the state of the DPN. + Active state indicates atleast one vpn interface present on that DPN for the vpn. + Inactive state indicates no vpn interface present on that DPN for this vpn."; + + type enumeration { + enum active { + value "0"; + description + "Active state"; + } + enum inactive { + value "1"; + description + "Inactive state"; + } + } + default "active"; + } + } + leaf ipv4-configured { + type boolean; + description + "This VPN Instance handles IPv4 traffic"; + default false; + } + leaf ipv6-configured { + type boolean; + description + "This VPN Instance handles IPv6 traffic"; + default false; + } + leaf bgpvpn-type { + type enumeration { + enum BGPVPNInternet { + value "0"; + description "BGPVPN Internet"; + } + enum BGPVPNExternal { + value "1"; + description "BGPVPN External"; + } + enum VPN { + value "2"; + description "Default VPN"; + } + } + } + leaf type { + description + "The type of the VPN Instance. + L3 indicates it is an L3VPN. + L2 indicates it is an EVPN"; + + type enumeration { + enum l3 { + value "0"; + description "L3VPN"; + } + enum l2{ + value "1"; + description "EVPN"; + } + } + default "l3"; + } + leaf l3vni { + type uint32; + } + container vpnTargets { + description + "The vpn-target command configures the export or import VPN target + extended community attribute for the VPN instance IPv4/IPv6 address + family. + Format is ASN:nn or IP-address:nn."; + + list vpnTarget { + key "vrfRTValue"; + max-elements "unbounded"; + min-elements "0"; + description + "L3vpn vpntarget configure class"; + + leaf vrfRTValue { + description + "Vpn-target: adds VPN target extended community attribute to the + export or import VPN target extended community list. The + vpn-target can be expressed in either of the following formats: + (1)16-bit AS number:32-bit user-defined number + For example, 1:3. The AS number ranges from 0 to 65535. The + user-defined number ranges from 0 to 4294967295. The AS number + and the user-defined number cannot be 0s at the same time. + That is, a VPN target cannot be 0:0. + (2)32-bit IP address:16-bit user-defined number + For example, 192.168.122.15:1. The IP address ranges from + 0.0.0.0 to 255.255.255.255. The user-defined number ranges from + 0 to 65535. + (3)32-bit IP address:16-bit user-defined number + For example, 192.168.122.15:1. An IP address ranges from + 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 + to 65535."; + type string { + length "3..21"; + } + } + + leaf vrfRTType { + description + "Specifies the vpn target type, export-extcommunity: + specifies the extended community attributes carried in routing + information to be sent. import-extcommunity: receives routing + information carrying specified extended community attributes."; + + type enumeration { + enum export_extcommunity { + value "0"; + description "export-extcommunity:"; + } + enum import_extcommunity { + value "1"; + description "import-extcommunity:"; + } + enum both { + value "2"; + description "export-extcommunity & import-extcommunity:"; + } + } + } + } + } + leaf vpn-state { + description + "Represents a stage in this VpnInstance's lifecycle."; + type enumeration { + enum created { + value "0"; + description + "VPNInstance is successfully created"; + } + enum pending_delete { + value "3"; + description + "VpnInstance marked for deletion."; + } + } + default "created"; + } + leaf-list rd { + type string; + } + } + } + + + typedef task-state { + type enumeration { + enum idle { + value "0"; + description "Task in idle state"; + } + enum pending_advertise { + value "1"; + description "Task is pending advertisement state"; + } + enum pending_withdraw { + value "2"; + description "Task is pending withdrawal state"; + } + enum advertised { + value "3"; + description "Task is in advertised state"; + } + enum withdrawn { + value "4"; + description "Task is in withdrawn state"; + } + } + description + "This value the status of any task. + The possible values are IDLE, PENDING_ADVERTISE, PENDING_WITHDRAW, ADVERTISED, WITHDRAWN."; + } + + + container subnet-op-data { + config false; + list subnet-op-data-entry { + key subnet-id; + leaf subnet-id { + type yang:uuid; + description "UUID representing the subnet "; + } + leaf nh-dpnId { + type uint64; + description "DpnId for the DPN used as nexthop for this subnet"; + } + leaf vpn-name { + type string; + description "VPN Instance name"; + } + leaf vrf-id { + type string; + } + leaf subnet-cidr { + type string; + description "Subnet in cidr notation"; + } + leaf route-adv-state { + type task-state; + description "The status of the subnet route advertisement/withdrawal"; + } + leaf last-adv-state { + type task-state; + description "The previous status of the subnet route advertisement/withdrawal."; + } + leaf elan-tag { + type uint32; + } + list subnet-to-dpn { + key dpnId; + leaf dpnId { + type uint64; + } + list vpn-interfaces { + key interface-name; + leaf interface-name { + type string; + } + } + } + leaf label { + type uint32; + } + leaf l3vni { + type uint32; + } + uses nvpn:network-attributes; + + } + } + + container port-op-data { + config false; + list port-op-data-entry { + key port-id; + leaf port-id { + type string; + description "UUID in string format representing the port "; + } + leaf-list subnet-ids { + type yang:uuid; + description "Back reference to obtain the subnet for a port "; + } + leaf dpnId { + type uint64; + } + } + } + + + grouping dpn-in-vpn-event { + leaf dpn-id { type uint64; } + leaf vpn-name { type string; } + leaf rd { type string; } + } + + notification add-dpn-event { + container add-event-data { + uses dpn-in-vpn-event; + } + } + + notification remove-dpn-event { + container remove-event-data { + uses dpn-in-vpn-event; + } + } + + notification add-interface-to-dpn-on-vpn-event { + container add-interface-event-data { + uses dpn-in-vpn-event; + leaf interface-name { type string; } + leaf vpn-id { type uint32; } + } + } + + notification remove-interface-from-dpn-on-vpn-event { + container remove-interface-event-data { + uses dpn-in-vpn-event; + leaf interface-name { type string; } + leaf vpn-id { type uint32; } + } + } + + /* + * Configured Transport Type for l3vpn service. + */ + container conf-transport-type-l3vpn { + leaf transport-type { + mandatory "true"; + type identityref { + base odlif:tunnel-type-base; + } + description + "L3VPN service will use this config to setup + the transport type for tunnels between DPNs."; + } + } + + /* container to maintain mapping between neutron router and DPN(s) on which vpn-interfaces for router are present */ + container neutron-router-dpns { + config false; + list router-dpn-list { + key router-id; + leaf router-id { type string;} + list dpn-vpninterfaces-list { + key dpn-id; + leaf dpn-id { type uint64;} + list router-interfaces { + key interface; + leaf interface { type string; } + } + } + } + } + + /* container to maintain mapping between DPN(s) and the routers */ + container dpn-routers { + config false; + list dpn-routers-list { + key dpn-id; + leaf dpn-id { type uint64;} + list routers-list { + key router; + leaf router { type string;} + } + } + } + + container router-interfaces { + list router-interface { + key interface-name; + leaf interface-name { type string; } + leaf router-name { type string; } + } + } + + container learnt-vpn-vip-to-port-data { + config false; + list learnt-vpn-vip-to-port { + key "vpn-name port-fixedip"; + leaf vpn-name { type string; } + leaf port-fixedip { type string; } + leaf port-name { type string; } + leaf mac-address { type string; } + leaf creation-time { type string; } + } + } + + container evpn-config { + config true; + leaf multi-homing-mode { + type enumeration { + enum "none"; + enum "all-active"; + enum "single-active"; + } + default "none"; + } + leaf irb-mode { + type enumeration { + enum "symmetric"; + enum "asymmetric"; + } + default "symmetric"; + } + } + + container l3vpn-lb-nexthops { + config false; + list nexthops { + key "nexthop-key"; + leaf nexthop-key { type string; } + leaf group-id { type string; } + leaf-list target-device-id { type string; } //dpId or ip-address + } + } + + container dpid-l3vpn-lb-nexthops { + config false; + list dpn-lb-nexthops { + key "src-dp-id dst-device-id"; + leaf src-dp-id { type uint64; } + leaf dst-device-id { type string; } //dpId or ip-address + leaf-list nexthop-key { type string; } + } + } + + typedef learnt-vpn-vip-to-port-event-action { + type enumeration { + enum add { + value "0"; + description + "Event to add a learnt vip to CSC FIB"; + } + enum delete { + value "1"; + description + "Event to remove a learnt vip from CSC FIB"; + } + } + description + "This value represents the action of an event on learnt-vpn-vip-to-port. + The possible actions supported are only ADD, DELETE"; + } + + container learnt-vpn-vip-to-port-event-data { + config false; + list learnt-vpn-vip-to-port-event { + key "learnt-vpn-vip-event-id"; + leaf vpn-name { type string; } + leaf src-fixedip { type string; } + leaf dest-fixedip { type string; } + leaf port-name { type string; } + leaf mac-address { type string; } + leaf event-action { type learnt-vpn-vip-to-port-event-action; } + leaf learnt-vpn-vip-event-id { type string; } + } + } + + /* rt to subnets map */ + container subnets-associated-to-route-targets { + config false; + list route-target { + key "rt rt-type"; + leaf rt { type string; } + leaf rt-type { + type enumeration { + enum iRT { + value "0"; + } + enum eRT { + value "1"; + } + } + } + list associated-subnet { + key cidr; + leaf cidr { type string; } + list associated-vpn { + key "name"; + leaf name { type string; } + } + } + } + } +} diff --git a/experimental/odp/odl-lisp-address-types.yang b/experimental/odp/odl-lisp-address-types.yang new file mode 100644 index 000000000..e03a6595b --- /dev/null +++ b/experimental/odp/odl-lisp-address-types.yang @@ -0,0 +1,117 @@ +module odl-lisp-address-types { + + yang-version 1; + namespace "urn:opendaylight:lfm:lisp-binary-address-types"; + prefix "lisp-binary"; + + import ietf-lisp-address-types { prefix laddr; revision-date 2015-11-05; } + import odl-inet-binary-types { prefix bin; revision-date 2016-03-03; } + + contact + "Lori Jakab "; + + description + "Augments for ietf-lisp-address-types to support binary IPv4 and IPv6 + addresses and prefixes internally in OpenDaylight"; + + revision "2016-05-04" { + description "Initial revision."; + } + + identity ipv4-binary-afi { + base laddr:lisp-address-family; + description + "IANA IPv4 address family (binary representation)."; + } + + identity ipv6-binary-afi { + base laddr:lisp-address-family; + description + "IANA IPv6 address family (binary representation)."; + } + + identity ipv4-prefix-binary-afi { + base laddr:lisp-address-family; + description + "IANA IPv4 address family prefix (binary representation)."; + } + + identity ipv6-prefix-binary-afi { + base laddr:lisp-address-family; + description + "IANA IPv6 address family prefix (binary representation)."; + } + + grouping augmented-lisp-address { + uses laddr:lisp-address { + augment "address" { + case ipv4-binary { + leaf ipv4-binary { + when "../address-type = 'ipv4-binary-afi'" { + description + "When AFI is IPv4 (binary)."; + } + type bin:ipv4-address-binary; + description + "IPv4 (binary) address."; + } + } + case ipv6-binary { + leaf ipv6-binary { + when "../address-type = 'ipv6-binary-afi'" { + description + "When AFI is IPv6 (binary)."; + } + type bin:ipv6-address-binary; + description + "IPv6 (binary) address."; + } + } + case ipv4-prefix-binary { + leaf ipv4-address-binary { + when "../address-type = 'ipv4-prefix-binary-afi'" { + description + "When AFI is IPv4 (binary)."; + } + type bin:ipv4-address-binary; + description + "IPv4 (binary) address."; + } + leaf ipv4-mask-length { + when "../address-type = 'ipv4-prefix-binary-afi'" { + description + "When AFI is IPv4 (binary)."; + } + type uint8 { + range "0..32"; + } + description + "IPv4 mask length."; + } + } + case ipv6-prefix-binary { + leaf ipv6-address-binary { + when "../address-type = 'ipv6-prefix-binary-afi'" { + description + "When AFI is IPv6 (binary)."; + } + type bin:ipv6-address-binary; + description + "IPv6 (binary) address."; + } + leaf ipv6-mask-length { + when "../address-type = 'ipv6-prefix-binary-afi'" { + description + "When AFI is IPv6 (binary)."; + } + type uint8 { + range "0..128"; + } + description + "IPv6 mask length."; + } + } + } + } + } +} diff --git a/experimental/odp/odl-lisp-proto.yang b/experimental/odp/odl-lisp-proto.yang new file mode 100644 index 000000000..de88a6956 --- /dev/null +++ b/experimental/odp/odl-lisp-proto.yang @@ -0,0 +1,538 @@ +module odl-lisp-proto { + + yang-version 1; + namespace "urn:opendaylight:lfm:lisp-proto"; + prefix "lisp-proto"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import odl-inet-binary-types { prefix inet-bin; revision-date 2016-03-03; } + import odl-lisp-address-types { prefix odl-lisp-address; revision-date 2016-05-04; } + + organization "LISP Flow Mapping"; + + contact + "David Goldberg + Vina Ermagan "; + + description + "YANG representation of LISP (RFC6830) protocol."; + + revision "2015-11-05" { + description "Renamed the module to lisp-proto."; + reference "https://tools.ietf.org/html/rfc6830"; + } + + typedef xtr-id { + type binary { + length "16"; + } + description + "128 bit xTR identifier."; + } + + typedef site-id { + type binary { + length "8"; + } + description + "64 bit site identifier."; + } + + grouping transport-address { + container transport-address { + leaf ipAddress { + type inet-bin:ip-address-binary; + reference "http://www.iana.org/assignments/safi-namespace/safi-namespace.xhtml"; + } + leaf port { + type inet:port-number; + } + } + } + + grouping mapping-authkey-container { + container mapping-authkey { + leaf key-string { + type string; + } + leaf key-type { + type uint16; + } + } + } + + grouping eid-container { + container eid { + uses odl-lisp-address:augmented-lisp-address; + } + } + + grouping rloc-container { + container rloc { + uses odl-lisp-address:augmented-lisp-address; + } + } + + grouping eid-list { + list eid-item { + key "eid-item-id"; + leaf eid-item-id { + type string; + } + uses eid-container; + } + } + + grouping LocatorRecords { + list LocatorRecord { + key "locator-id"; + leaf locator-id { + type string; + } + leaf priority { + type uint8; + } + leaf weight { + type uint8; + } + leaf multicastPriority { + type uint8; + } + leaf multicastWeight { + type uint8; + } + leaf localLocator { + type boolean; + } + leaf rlocProbed { + type boolean; + } + leaf routed { + type boolean; + } + + //locator address + uses rloc-container; + } + } + + grouping map-request-metadata { + leaf source-rloc { + type inet-bin:ip-address-binary; + description + "The Source IP address used for sending the enclosing control + packet in RLOC space."; + } + description + "This is a collection of fields which are not present in the actual + mapping record defined in RFC 6830, but are used internally in + OpenDaylight"; + } + + grouping mapping-record-metadata { + leaf xtr-id { + type xtr-id; + description + "128 bit xTR identifier."; + } + leaf site-id { + type site-id; + description + "64 bit site identifier."; + } + leaf source-rloc { + type inet-bin:ip-address-binary; + description + "The Source IP address used for sending the enclosing control + packet in RLOC space."; + } + leaf timestamp { + type int64; + description + "Milliseconds since January 1, 1970, 00:00:00 GMT"; + } + description + "This is a collection of fields which are not present in the actual + mapping record defined in RFC 6830, but are used internally in + OpenDaylight"; + } + + grouping mapping-record-container { + container mapping-record { + leaf recordTtl { + type int32; + description + "A mapping record's time to live in Minute(s)"; + } + leaf mapVersion { + type int16; + } + leaf action { + type enumeration { + enum NoAction; + enum NativelyForward; + enum SendMapRequest; + enum Drop; + } + } + leaf authoritative { + type boolean; + } + // EID prefix + uses eid-container; + + // locator record list + uses LocatorRecords; + + // metadata + uses mapping-record-metadata; + } + } + + grouping mapping-record-list { + list mapping-record-item { + key "mapping-record-item-id"; + leaf mapping-record-item-id { + type string; + } + uses mapping-record-container; + } + } + + grouping xtrSiteId { + leaf xtrId { + type xtr-id; + } + leaf siteId { + type site-id; + } + } + + grouping MapRegister { + reference "http://tools.ietf.org/html/rfc6830#section-6.1.6 , http://tools.ietf.org/html/draft-ermagan-lisp-nat-traversal-05#section-4.3"; + leaf proxyMapReply { + type boolean; + } + leaf xtrSiteIdPresent { + type boolean; + } + leaf wantMapNotify { + type boolean; + } + leaf nonce { + type int64; + } + leaf keyId { + type int16; + } + leaf authenticationData { + type binary; + } + leaf mergeEnabled { + type boolean; + } + uses mapping-record-list; + uses xtrSiteId; + } + + grouping MapNotify { + reference "http://tools.ietf.org/html/rfc6830#section-6.1.7 , http://tools.ietf.org/html/draft-ermagan-lisp-nat-traversal-05#section-4.3"; + leaf xtrSiteIdPresent { + type boolean; + } + leaf nonce { + type int64; + } + leaf keyId { + type int16; + } + leaf authenticationData { + type binary; + } + leaf mergeEnabled { + type boolean; + } + uses mapping-record-list; + uses xtrSiteId; + } + + grouping MapRequest { + reference "http://tools.ietf.org/html/rfc6830#section-6.1.2"; + leaf authoritative { + type boolean; + } + leaf mapDataPresent { + type boolean; + } + leaf probe { + type boolean; + } + leaf smr { + type boolean; + } + leaf pitr { + type boolean; + } + leaf smrInvoked { + type boolean; + } + leaf nonce { + type int64; + } + container SourceEid { + uses eid-container; + } + list itrRloc { + key "itr-rloc-id"; + leaf itr-rloc-id { + type string; + } + uses rloc-container; + } + uses eid-list; + container MapReply { + uses mapping-record-container; + } + uses map-request-metadata; + } + + grouping MapReply { + reference "http://tools.ietf.org/html/rfc6830#section-6.1.4"; + leaf probe { + type boolean; + } + leaf nonce { + type int64; + } + leaf echoNonceEnabled { + type boolean; + } + leaf securityEnabled { + type boolean; + } + uses mapping-record-list; + } + + grouping map-register-cache-key-container { + container map-register-cache-key { + leaf eid-prefix { + type binary; + description + "The EID prefix stored as binary data"; + } + leaf xtr-id { + type binary; + description + "128 bit xTR identifier."; + } + leaf site-id { + type binary; + description + "64 bit site identifier."; + } + description + "The lookup key in the Map-Register fast path."; + } + } + + grouping map-register-cache-metadata-container { + container map-register-cache-metadata { + list eid-lisp-address { + key "eid-lisp-address-id"; + leaf eid-lisp-address-id { + type string; + } + uses eid-container; + description "List of EID-Prefixes from Map-Register message."; + } + leaf xtr-id { + type xtr-id; + description + "128 bit xTR identifier."; + } + leaf site-id { + type site-id; + description + "64 bit site identifier."; + } + leaf timestamp { + type int64; + description + "Milliseconds since January 1, 1970, 00:00:00 GMT"; + } + leaf want-map-notify { + type boolean; + description + "xTR askes for Map-Register acknowledgement in form of + a Map-Notify control message."; + } + leaf merge-enabled { + type boolean; + description "Value of 22th bit in map register message."; + } + description + "The Map-Register cache metadata is information for a mapping + database about mapping update event, without the full Map-Register + packet data. The metadata and the packet data together will form + the Map-Register cache value."; + } + } + + grouping map-register-cache-value-grouping { + container map-register-cache-value { + uses map-register-cache-metadata-container; + uses mapping-authkey-container; + leaf packet-data { + type binary; + description + "Map-Register packet contents"; + } + } + } + + grouping subscriber-data-grouping { + container subscriber-data { + description + "A network element which subscribed to notifications about mapping changes."; + uses rloc-container; + uses eid-container; + leaf ttl { + type int32; + description + "The time to live for the subscriber entry in minutes"; + } + } + } + + typedef message-type { + type enumeration { + enum reserved { + value 0; + description + "Reserved"; + } + enum map-request { + value 1; + description + "Map-Request control packet"; + } + enum map-reply { + value 2; + description + "Map-Reply control packet"; + } + enum map-register { + value 3; + description + "Map-Register control packet"; + } + enum map-notify { + value 4; + description + "Map-Notify control packet"; + } + enum map-referral { + value 6; + description + "Map-Referral control packet"; + } + enum info { + value 7; + description + "Info control packet"; + } + enum encapsulated-control-message { + value 8; + description + "Encapsulated control packet"; + } + } + description + "Defines the LISP control message types"; + reference "https://tools.ietf.org/html/rfc6830#section-6.1.1"; + } + + grouping MapRegisterMessage { + container MapRegister { + uses MapRegister; + } + uses transport-address; + } + + grouping MapRegisterNotification { + container MapRegister { + uses MapRegister; + } + uses transport-address; + } + + grouping MapNotifyMessage { + container MapNotify { + uses MapNotify; + } + uses transport-address; + } + + grouping MapNotifyNotification { + container MapNotify { + uses MapNotify; + } + uses transport-address; + } + + grouping MapRequestMessage { + container MapRequest { + uses MapRequest; + } + uses transport-address; + } + + grouping MapRequestNotification { + container MapRequest { + uses MapRequest; + } + uses transport-address; + } + + grouping MapReplyMessage { + container MapReply { + uses MapReply; + } + uses transport-address; + } + + grouping MapReplyNotification { + container MapReply { + uses MapReply; + } + uses transport-address; + } + + notification addMapping { + uses MapRegisterNotification; + } + + notification gotMapNotify { + uses MapNotifyNotification; + } + + notification requestMapping { + uses MapRequestNotification; + } + + notification gotMapReply { + uses MapReplyNotification; + } + + notification xtrRequestMapping { + uses MapRequestNotification; + } + + notification xtrReplyMapping { + uses MapReplyNotification; + } + + notification mappingKeepAlive { + uses map-register-cache-metadata-container; + } +} diff --git a/experimental/odp/odl-lisp-sb.yang b/experimental/odp/odl-lisp-sb.yang new file mode 100644 index 000000000..202ff6919 --- /dev/null +++ b/experimental/odp/odl-lisp-sb.yang @@ -0,0 +1,85 @@ +module odl-lisp-sb { + + yang-version 1; + namespace "urn:opendaylight:lfm:lisp-sb"; + prefix "lisp-sb"; + + import odl-lisp-proto { prefix lisp-proto; revision-date 2015-11-05; } + + contact "Lorand Jakab "; + + description + "Augments IETF network topology model to define routing RPC + extensions. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2014-01-13" { + description + "Initial revision."; + reference ""; + } + + identity network-topology-context { + description + "Identity used to mark the network topology context. + This is useful for example binding RPCs to a particular + network topology instance."; + } + + typedef network-topology-ref { + type instance-identifier; + ext:context-reference "network-topology-context"; + } + + grouping network-topology-reference { + leaf network-topology-ref { + type network-topology-ref; + mandatory true; + // Workaround for yangtools + ext:context-reference "network-topology-context"; + } + } + + augment "/nt:network-topology/nt:topology" { + ext:context-instance "network-topology-context"; + } +} + diff --git a/experimental/odp/odl-pcep-auto-bandwidth.yang b/experimental/odp/odl-pcep-auto-bandwidth.yang new file mode 100644 index 000000000..f20de8e72 --- /dev/null +++ b/experimental/odp/odl-pcep-auto-bandwidth.yang @@ -0,0 +1,65 @@ +module odl-pcep-auto-bandwidth { + namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:auto:bandwidth"; + prefix "auto-bw"; + + import pcep-types { prefix pcep; revision-date 2018-11-09; } + import pcep-message { prefix msg; revision-date 2018-11-09; } + import network-topology { prefix nt; revision-date 2013-10-21; } + import network-topology-pcep { prefix topo; revision-date 2018-11-09; } + import odl-pcep-ietf-stateful07 { prefix stateful; revision-date 2018-11-09; } + import network-concepts { prefix netc; revision-date 2013-11-25; } + + organization "Cisco Systems, Inc."; + contact "Milos Fabian "; + + description + "This module contains the data model of PCEP extensions defined + in draft-dhody-pce-stateful-pce-auto-bandwidth-06. + + Copyright (c)2016 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision 2017-10-25 { + description "Update network-topology-pcep revision"; + } + + revision 2016-01-09 { + description "Initial revision"; + reference "https://tools.ietf.org/html/draft-dhody-pce-stateful-pce-auto-bandwidth-06"; + } + + grouping bw-samples { + leaf-list bw-sample { + type netc:bandwidth; + ordered-by user; + } + } + + grouping bandwidth-usage-object { + description "Bandwidth-Usage Report Object"; + reference "https://tools.ietf.org/html/draft-dhody-pce-stateful-pce-auto-bandwidth-06#section-8.4"; + container bandwidth-usage { + uses pcep:object; + uses bw-samples; + } + } + + augment "/stateful:pcrpt/stateful:pcrpt-message/stateful:reports/stateful:path/stateful:bandwidth" { + uses bw-samples; + } + + augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:reported-lsp/topo:path/topo:bandwidth" { + uses bw-samples; + } + +} \ No newline at end of file diff --git a/experimental/odp/odl-pcep-ietf-initiated00.yang b/experimental/odp/odl-pcep-ietf-initiated00.yang new file mode 100644 index 000000000..a9b56c720 --- /dev/null +++ b/experimental/odp/odl-pcep-ietf-initiated00.yang @@ -0,0 +1,124 @@ +module odl-pcep-ietf-initiated00 { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:pcep:crabbe:initiated"; + prefix "crabbe"; + + import pcep-types { prefix pcep; revision-date 2018-11-09; } + import pcep-message { prefix msg; revision-date 2018-11-09; } + import network-topology { prefix nt; revision-date 2013-10-21; } + import network-topology-pcep { prefix topo; revision-date 2018-11-09; } + import odl-pcep-ietf-stateful07 { prefix stateful; revision-date 2018-11-09; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the data model of PCEP extensions defined + in draft-ietf-pce-pce-initiated-lsp. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision 2017-10-25 { + description "Update network-topology-pcep revision"; + } + + revision "2013-11-26" { + description + "Initial revision."; + reference "http://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp-00"; + } + + grouping pcinitiate-message { + uses pcep:message; + + container pcinitiate-message { + description "LSP Initiate Message"; + reference "http://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp-00#section-5.1"; + + uses pcep:message-header; + + list requests { + uses stateful:srp-object; + + uses stateful:lsp-object; + + uses pcep:endpoints-object; + + uses pcep:explicit-route-object; + + uses pcep:lsp-attributes; + } + } + } + + grouping initiated-capability-tlv { + reference "http://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp-00#section-4.1"; + leaf initiation { + type boolean; + default false; + } + } + + augment "/stateful:pcupd/stateful:pcupd-message/stateful:updates/stateful:srp" { + reference "http://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp-00#section-5.2"; + leaf remove { + type boolean; + default false; + } + } + + augment "/stateful:pcrpt/stateful:pcrpt-message/stateful:reports/stateful:srp" { + reference "http://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp-00#section-5.2"; + leaf remove { + type boolean; + default false; + } + } + + augment "/stateful:pcupd/stateful:pcupd-message/stateful:updates/stateful:lsp" { + reference "http://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp-00#section-5.3.1"; + leaf create { + type boolean; + default false; + } + } + + augment "/stateful:pcrpt/stateful:pcrpt-message/stateful:reports/stateful:lsp" { + reference "http://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp-00#section-5.3.1"; + leaf create { + type boolean; + default false; + } + } + + augment "/msg:open/msg:open-message/msg:open/msg:tlvs/stateful:stateful" { + uses initiated-capability-tlv; + } + + notification pcinitiate { + uses pcinitiate-message; + } + + augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:stateful-tlv/stateful:stateful" { + uses initiated-capability-tlv; + } + + augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:reported-lsp/topo:path/stateful:lsp" { + reference "http://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp-00#section-5.3.1"; + leaf create { + type boolean; + default false; + } + } +} diff --git a/experimental/odp/odl-pcep-ietf-stateful07-app-config.yang b/experimental/odp/odl-pcep-ietf-stateful07-app-config.yang new file mode 100644 index 000000000..747c7dd81 --- /dev/null +++ b/experimental/odp/odl-pcep-ietf-stateful07-app-config.yang @@ -0,0 +1,61 @@ +module pcep-ietf-stateful07-app-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:ietf-stateful07-app-config"; + prefix "pcep-ietf-stateful07-app-config"; + + description + "Configuration for the PCEP IETF stateful07 extension."; + + revision "2016-07-07" { + description + "Initial revision. + + Copyright (c) 2016 Brocade Communications Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + } + + grouping stateful-capabilities { + leaf initiated { + type boolean; + default true; + } + + leaf stateful { + type boolean; + default true; + } + + leaf active { + type boolean; + default true; + } + + leaf triggered-initial-sync { + type boolean; + default true; + } + + leaf delta-lsp-sync-capability { + type boolean; + default true; + } + + leaf triggered-resync { + type boolean; + default true; + } + + leaf include-db-version { + type boolean; + default true; + } + } + + container pcep-ietf-stateful07-config { + uses stateful-capabilities; + } +} \ No newline at end of file diff --git a/experimental/odp/odl-pcep-ietf-stateful07.yang b/experimental/odp/odl-pcep-ietf-stateful07.yang new file mode 100644 index 000000000..fa7c9dcbb --- /dev/null +++ b/experimental/odp/odl-pcep-ietf-stateful07.yang @@ -0,0 +1,448 @@ +module odl-pcep-ietf-stateful07 { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful"; + prefix "stateful"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import network-topology { prefix nt; revision-date 2013-10-21; } + import network-topology-pcep { prefix topo; revision-date 2018-11-09; } + import pcep-types { prefix pcep; revision-date 2018-11-09; } + import pcep-message { prefix msg; revision-date 2018-11-09; } + import rsvp { prefix rsvp; revision-date 2015-08-20; } + import topology-tunnel { prefix tt; revision-date 2013-08-19; } + import topology-tunnel-pcep { prefix tun; revision-date 2018-11-09; } + import topology-tunnel-pcep-programming { prefix ttpp; revision-date 2018-11-09; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + import network-concepts { prefix netc; revision-date 2013-11-25; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the data model of PCEP extensions defined + in draft-ietf-pce-stateful-pce. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision 2017-10-25 { + description "Update network-topology-pcep revision"; + } + + revision "2013-12-22" { + description + "Initial revision."; + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07"; + } + + typedef operational-status { + type enumeration { + enum down { + value 0; + } + enum up { + value 1; + } + enum active { + value 2; + } + enum going-down { + value 3; + } + enum going-up { + value 4; + } + } + } + + typedef plsp-id { + type uint32 { + range 0..1048576; + } + } + + typedef srp-id-number { + type uint32 { + range 0..4294967294; + } + } + + typedef symbolic-path-name { + type binary { + length 1..65535; + } + } + + grouping path-binding-tlv { + reference "https://tools.ietf.org/html/draft-sivabalan-pce-binding-label-sid-01#section-3"; + container path-binding { + uses pcep:tlv; + choice binding-type-value { + case mpls-label { + leaf mpls-label { + type netc:mpls-label; + } + } + case mpls-label-entry { + leaf label { + type netc:mpls-label; + } + leaf traffic-class { + type uint8 { + range 0..7; + } + } + leaf bottom-of-stack { + type boolean; + } + leaf time-to-live { + type uint8; + } + } + } + } + } + + grouping lsp-identifiers-tlv { + description "LSP Identifiers TLV"; + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07#section-7.3.1"; + container lsp-identifiers { + uses pcep:tlv; + leaf lsp-id { + type rsvp:lsp-id; + } + + leaf tunnel-id { + type rsvp:tunnel-id; + } + + choice address-family { + case ipv4-case { + container ipv4 { + leaf ipv4-tunnel-sender-address { + type inet:ipv4-address-no-zone; + mandatory true; + } + leaf ipv4-extended-tunnel-id { + type rsvp:ipv4-extended-tunnel-id; + mandatory true; + } + leaf ipv4-tunnel-endpoint-address { + type inet:ipv4-address-no-zone; + mandatory true; + } + } + } + case ipv6-case { + container ipv6 { + leaf ipv6-tunnel-sender-address { + type inet:ipv6-address-no-zone; + mandatory true; + } + leaf ipv6-extended-tunnel-id { + type rsvp:ipv6-extended-tunnel-id; + mandatory true; + } + leaf ipv6-tunnel-endpoint-address { + type inet:ipv6-address-no-zone; + mandatory true; + } + } + } + } + } + } + + grouping lsp-error-code-tlv { + description "LSP Error Code TLV"; + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07#section-7.3.3"; + container lsp-error-code { + uses pcep:tlv; + leaf error-code { + type uint32; + } + } + } + + grouping rsvp-error-spec-tlv { + description "RSVP Error Spec TLV"; + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07#section-7.3.4"; + container rsvp-error-spec { + uses pcep:tlv; + choice error-type { + case rsvp-case { + container rsvp-error { + uses rsvp:error-spec; + } + } + case user-case { + container user-error { + uses rsvp:user-error-spec; + } + } + } + } + } + + grouping stateful-capability-tlv { + description "Stateful PCE Capability TLV"; + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07#section-7.1.1"; + + container stateful { + uses pcep:tlv; + + leaf lsp-update-capability { + type boolean; + default false; + } + } + } + + grouping symbolic-path-name-tlv { + description "Symbolic Path Name TLV"; + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07#section-7.3.2"; + container symbolic-path-name { + uses pcep:tlv; + leaf path-name { + type symbolic-path-name; + } + } + } + + grouping lsp-object { + description "LSP Object"; + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07#section-7.3"; + + container lsp { + uses pcep:object; + container "tlvs" { + uses lsp-error-code-tlv; + + uses lsp-identifiers-tlv; + + uses rsvp-error-spec-tlv; + + uses symbolic-path-name-tlv; + + uses pcep:vs-tlv; + + uses pcep:vendor-information-tlvs; + + uses path-binding-tlv; + } + + leaf plsp-id { + type plsp-id; + } + + leaf delegate { + type boolean; + default false; + } + + leaf sync { + type boolean; + default false; + } + + leaf remove { + type boolean; + default false; + } + + leaf administrative { + type boolean; + default false; + } + + leaf operational { + type operational-status; + } + } + } + + grouping srp-object { + description "SRP Object"; + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07#section-7.2"; + + container srp { + uses pcep:object; + + container "tlvs" { + uses symbolic-path-name-tlv; + + uses pcep:vendor-information-tlvs; + + uses pcep:path-setup-type-tlv; + } + + leaf operation-id { + type srp-id-number; + mandatory true; + } + } + } + + grouping pcupd-message { + uses pcep:message; + + container pcupd-message { + description "State Update Request Message"; + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07#section-6.2"; + + uses pcep:message-header; + + list updates { + uses srp-object; + + uses lsp-object; + + container path { + uses pcep:path-definition; + } + } + } + } + + grouping pcrpt-message { + uses pcep:message; + + container pcrpt-message { + description "State Report Message"; + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07#section-6.1"; + + uses pcep:message-header; + + list reports { + uses srp-object; + + uses lsp-object; + + container path { + uses pcep:path-definition; + } + } + } + } + + notification pcupd { + uses pcupd-message; + } + + notification pcrpt { + uses pcrpt-message; + } + + augment "/msg:open/msg:open-message/msg:open/msg:tlvs" { + uses stateful-capability-tlv; + ext:augment-identifier tlvs-1; + } + + augment "/msg:pcrep/msg:pcrep-message/msg:replies/msg:result/msg:failure-case/msg:lspa/msg:tlvs" { + uses symbolic-path-name-tlv; + ext:augment-identifier tlvs-4; + } + + augment "/msg:pcerr/msg:pcerr-message/msg:error-type" { + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07#section-6.3"; + case stateful-case { + container stateful { + list srps { + uses srp-object; + } + } + } + } + + augment "/msg:pcreq/msg:pcreq-message/msg:requests/msg:segment-computation/msg:p2p/msg:lspa/msg:tlvs" { + uses symbolic-path-name-tlv; + ext:augment-identifier tlvs-2; + } + + augment "/msg:pcerr/msg:pcerr-message/msg:error-type/msg:session-case/msg:session/msg:open/msg:tlvs" { + uses stateful-capability-tlv; + ext:augment-identifier tlvs-3; + } + + augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:reported-lsp/topo:path" { + uses lsp-object; + uses pcep:path-setup-type-tlv; + } + + augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:stateful-tlv" { + uses stateful-capability-tlv; + } + + augment "/topo:ensure-lsp-operational/topo:input/topo:arguments" { + ext:augment-identifier arguments-1; + leaf operational { + type operational-status; + } + } + + augment "/topo:add-lsp/topo:input/topo:arguments" { + ext:augment-identifier arguments-2; + uses lsp-object; + uses pcep:path-setup-type-tlv; + } + + augment "/topo:update-lsp/topo:input/topo:arguments" { + ext:augment-identifier arguments-3; + uses lsp-object; + uses pcep:path-setup-type-tlv; + } + + typedef administrative-status { + type enumeration { + enum active; + enum inactive; + } + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-07#section-7.3"; + } + + grouping cfg-attributes { + leaf administrative-status { + type administrative-status; + } + } + + grouping oper-attributes { + leaf operational-status { + type operational-status; + config false; + } + } + + augment "/nt:network-topology/nt:topology/nt:link" { + when "../../tunnel-types/pcep-tunnel"; + + uses cfg-attributes; + uses oper-attributes; + } + + augment "/nt:network-topology/nt:topology/tt:paths" { + when "../../tunnel-types/pcep-tunnel"; + + uses cfg-attributes; + uses oper-attributes; + } + + augment "/ttpp:pcep-create-p2p-tunnel/ttpp:input" { + uses cfg-attributes; + } + + augment "/ttpp:pcep-update-tunnel/ttpp:input" { + uses cfg-attributes; + } +} + diff --git a/experimental/odp/odl-pcep-p2mp-te-lsp.yang b/experimental/odp/odl-pcep-p2mp-te-lsp.yang new file mode 100644 index 000000000..4f7810285 --- /dev/null +++ b/experimental/odp/odl-pcep-p2mp-te-lsp.yang @@ -0,0 +1,49 @@ +module odl-pcep-p2mp-te-lsp { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:pcep:p2mp:te:lsp"; + prefix "pcep-p2mp"; + + import pcep-types { prefix pcep; revision-date 2018-11-09; } + import pcep-message { prefix msg; revision-date 2018-11-09; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + + description + "This module contains the data model of PCEP extensions defined + in rfc8306. + Copyright (c)2018 AT&T Services, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + organization "AT&T Services, Inc."; + contact "Claudio D. Gasparini "; + + revision "2018-11-09" { + description "Initial revision"; + } + + grouping p2mp-pce-capability-tlv { + description "P2MP-PCE-CAPABILITY TLV"; + reference "https://tools.ietf.org/html/rfc8306#section-3.1.2"; + + container p2mp-pce-capability { + uses pcep:tlv; + presence + "Capability indicates that the sender can perform P2MP path computations"; + } + } + + augment "/msg:open/msg:open-message/msg:open/msg:tlvs" { + reference "https://tools.ietf.org/html/rfc8306#section-3.1.2"; + uses p2mp-pce-capability-tlv; + ext:augment-identifier tlvs-p2mp-capability-aug; + } + + augment "/msg:pcerr/msg:pcerr-message/msg:error-type/msg:session-case/msg:session/msg:open/msg:tlvs" { + reference "https://tools.ietf.org/html/rfc8306#section-3.1.2"; + uses p2mp-pce-capability-tlv; + ext:augment-identifier tlvs-p2mp-capability-error-aug; + } +} \ No newline at end of file diff --git a/experimental/odp/odl-pcep-segment-routing.yang b/experimental/odp/odl-pcep-segment-routing.yang new file mode 100644 index 000000000..2783b43e8 --- /dev/null +++ b/experimental/odp/odl-pcep-segment-routing.yang @@ -0,0 +1,270 @@ +module odl-pcep-segment-routing { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:pcep:segment:routing"; + prefix "pcep-sr"; + + import pcep-types { prefix pcep; revision-date 2018-11-09; } + import pcep-message { prefix msg; revision-date 2018-11-09; } + import odl-pcep-ietf-stateful07 { prefix stateful; revision-date 2018-11-09; } + import odl-pcep-ietf-initiated00 { prefix crabbe; revision-date 2018-11-09; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import network-topology { prefix nt; revision-date 2013-10-21; } + import network-topology-pcep { prefix pn; revision-date 2018-11-09; } + + organization "Cisco Systems, Inc."; + contact "Milos Fabian "; + + description + "This module contains the data model of PCEP Extensions for Segment Routing, + draft-ietf-pce-segment-routing-01. + + Copyright (c)2015 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision 2017-10-25 { + description "Update network-topology-pcep revision"; + } + + revision "2015-01-12" { + description + "Upgrade from draft-sivabalan-pce-segment-routing-02."; + reference "http://tools.ietf.org/html/draft-ietf-pce-segment-routing-01"; + } + + grouping sr-pce-capability-tlv { + description "SR-PCE-CAPABILITY TLV"; + reference "http://tools.ietf.org/html/draft-ietf-pce-segment-routing-01#section-5.1.1"; + + container sr-pce-capability { + uses pcep:tlv; + leaf msd { + description "Maximum SID Depth"; + type uint8; + default 0; + } + } + } + + augment "/msg:open/msg:open-message/msg:open/msg:tlvs" { + reference "http://tools.ietf.org/html/draft-ietf-pce-segment-routing-01#section-5.1"; + uses sr-pce-capability-tlv; + } + + augment "/msg:pcerr/msg:pcerr-message/msg:error-type/msg:session-case/msg:session/msg:open/msg:tlvs" { + reference "http://tools.ietf.org/html/draft-ietf-pce-segment-routing-01#section-5.1"; + uses sr-pce-capability-tlv; + } + + typedef sid-type { + reference "http://tools.ietf.org/html/draft-ietf-pce-segment-routing-01#section-5.3.1"; + type enumeration { + enum ipv4-node-id { + value 1; + } + enum ipv6-node-id { + value 2; + } + enum ipv4-adjacency { + value 3; + } + enum ipv6-adjacency { + value 4; + } + enum unnumbered { + value 5; + } + } + } + + grouping sr-subobject { + description "Common grouping for both SR-ERO and SR-RRO subobjects as they share the same content representation."; + leaf c-flag { + type boolean; + default false; + } + leaf m-flag { + type boolean; + default false; + } + leaf sid-type { + type sid-type; + } + leaf sid { + description "Segment Identifier"; + type uint32; + } + choice nai { + reference "http://tools.ietf.org/html/draft-ietf-pce-segment-routing-01#section-5.3.2"; + description "Node or Adjacency Identifier"; + case ip-node-id { + when "../sid-type = 'ipv4-node-id' or ../sid-type = 'ipv6-node-id'"; + description "IP Node ID"; + leaf ip-address { + type inet:ip-address-no-zone; + mandatory true; + } + } + case ip-adjacency { + when "../sid-type = 'ipv4-adjacency' or ../sid-type = 'ipv6-adjacency'"; + description "IP Adjacency"; + leaf local-ip-address { + type inet:ip-address-no-zone; + mandatory true; + } + leaf remote-ip-address { + type inet:ip-address-no-zone; + mandatory true; + } + } + case unnumbered-adjacency { + when "../sid-type = 'unnumbered'"; + description "Unnumbered Adjacency with IPv4 NodeIDs"; + leaf local-node-id { + type uint32; + mandatory true; + } + leaf local-interface-id { + type uint32; + mandatory true; + } + leaf remote-node-id { + type uint32; + mandatory true; + } + leaf remote-interface-id { + type uint32; + mandatory true; + } + } + } + } + + // kept both groupings in case draft changes and they won't be equal + grouping sr-ero-subobject { + reference "http://tools.ietf.org/html/draft-ietf-pce-segment-routing-01#section-5.3.1"; + uses sr-subobject; + } + + grouping sr-rro-subobject { + reference "http://tools.ietf.org/html/draft-ietf-pce-segment-routing-01#section-5.4"; + uses sr-subobject; + } + + //ERO augmentations + augment "/msg:pcrep/msg:pcrep-message/msg:replies/msg:result/msg:success-case/msg:success/msg:paths/msg:ero/msg:subobject/msg:subobject-type" { + case sr-ero-type { + uses sr-ero-subobject; + } + } + + //stateful07 + augment "/crabbe:pcinitiate/crabbe:pcinitiate-message/crabbe:requests/crabbe:ero/crabbe:subobject/crabbe:subobject-type" { + case sr-ero-type { + uses sr-ero-subobject; + } + } + + augment "/stateful:pcrpt/stateful:pcrpt-message/stateful:reports/stateful:path/stateful:ero/stateful:subobject/stateful:subobject-type" { + case sr-ero-type { + uses sr-ero-subobject; + } + } + + augment "/stateful:pcupd/stateful:pcupd-message/stateful:updates/stateful:path/stateful:ero/stateful:subobject/stateful:subobject-type" { + case sr-ero-type { + uses sr-ero-subobject; + } + } + + //nt-pcep + augment "/pn:add-lsp/pn:input/pn:arguments/pn:ero/pn:subobject/pn:subobject-type" { + case sr-ero-type { + uses sr-ero-subobject; + } + } + + augment "/pn:update-lsp/pn:input/pn:arguments/pn:ero/pn:subobject/pn:subobject-type" { + case sr-ero-type { + uses sr-ero-subobject; + } + } + + augment "/nt:network-topology/nt:topology/nt:node/pn:path-computation-client/pn:reported-lsp/pn:path/pn:ero/pn:subobject/pn:subobject-type" { + case sr-ero-type { + uses sr-ero-subobject; + } + } + + //RRO augmentations + augment "/msg:pcreq/msg:pcreq-message/msg:requests/msg:segment-computation/msg:p2p/msg:reported-route/msg:rro/msg:subobject/msg:subobject-type" { + case sr-rro-type { + uses sr-rro-subobject; + } + } + + augment "/msg:pcreq/msg:pcreq-message/msg:requests/msg:segment-computation/msg:p2p/msg:rro/msg:subobject/msg:subobject-type" { + case sr-rro-type { + uses sr-rro-subobject; + } + } + + augment "/msg:pcrep/msg:pcrep-message/msg:replies/msg:result/msg:failure-case/msg:rro/msg:subobject/msg:subobject-type" { + case sr-rro-type { + uses sr-rro-subobject; + } + } + + augment "/msg:pcrep/msg:pcrep-message/msg:replies/msg:result/msg:success-case/msg:success/msg:paths/msg:rro/msg:subobject/msg:subobject-type" { + case sr-rro-type { + uses sr-rro-subobject; + } + } + + //stateful07 + augment "/crabbe:pcinitiate/crabbe:pcinitiate-message/crabbe:requests/crabbe:rro/crabbe:subobject/crabbe:subobject-type" { + case sr-rro-type { + uses sr-rro-subobject; + } + } + + augment "/stateful:pcrpt/stateful:pcrpt-message/stateful:reports/stateful:path/stateful:rro/stateful:subobject/stateful:subobject-type" { + case sr-rro-type { + uses sr-rro-subobject; + } + } + + augment "/stateful:pcupd/stateful:pcupd-message/stateful:updates/stateful:path/stateful:rro/stateful:subobject/stateful:subobject-type" { + case sr-rro-type { + uses sr-rro-subobject; + } + } + + //nt-pcep + augment "/pn:add-lsp/pn:input/pn:arguments/pn:rro/pn:subobject/pn:subobject-type" { + case sr-rro-type { + uses sr-rro-subobject; + } + } + + augment "/pn:update-lsp/pn:input/pn:arguments/pn:rro/pn:subobject/pn:subobject-type" { + case sr-rro-type { + uses sr-rro-subobject; + } + } + + augment "/nt:network-topology/nt:topology/nt:node/pn:path-computation-client/pn:reported-lsp/pn:path/pn:rro/pn:subobject/pn:subobject-type" { + case sr-rro-type { + uses sr-rro-subobject; + } + } +} diff --git a/experimental/odp/odl-pcep-stateful-stats.yang b/experimental/odp/odl-pcep-stateful-stats.yang new file mode 100644 index 000000000..026fb3a15 --- /dev/null +++ b/experimental/odp/odl-pcep-stateful-stats.yang @@ -0,0 +1,108 @@ +// vi: set smarttab et sw=4 tabstop=4: +module odl-pcep-stateful-stats { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:pcep:stateful:stats"; + prefix pspc; + + import network-topology { prefix nt; revision-date 2013-10-21; } + import network-topology-pcep { prefix pn; revision-date 2018-11-09; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + import pcep-session-stats { prefix pss; revision-date 2017-11-13; } + import network-pcep-topology-stats { prefix npts; revision-date 2018-11-09; } + import odl-pcep-sync-optimizations { prefix opso; revision-date 2018-11-09; } + + description + "This module contains the PCEP Stateful stats YANG definitions for + PCEP Topology Node Stats. + Copyright (c)2017 AT&T Services, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + organization "AT&T Services, Inc."; + contact "Claudio D. Gasparini "; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision "2017-11-13" { + description + "Initial revision."; + } + + grouping stateful-messages-grouping { + description "The statistics of sent/received PCEP stateful messages."; + leaf last-received-rpt-msg-timestamp { + description "The timestamp of last received PCRpt message."; + type uint32; + default 0; + } + + leaf received-rpt-msg-count { + description "The number of received PcRpt messages."; + type uint32; + default 0; + } + + leaf sent-upd-msg-count { + description "The number of sent PCUpd messages."; + type uint32; + default 0; + } + + leaf sent-init-msg-count { + description "The number of sent PCInitiate messages."; + type uint32; + default 0; + } + } + + augment "/nt:network-topology/nt:topology/nt:node/npts:pcep-session-state/npts:messages" { + when "../../../nt:topology-types/pn:topology-pcep"; + ext:augment-identifier stateful-messages-stats-aug; + description "Augment Pcep topology node with Stateful session stats"; + + uses stateful-messages-grouping; + } + + grouping stateful-preferences { + leaf instantiation { + description "Represents peer's instantiation capability."; + type boolean; + default "false"; + } + + leaf stateful { + description "Represents peer's stateful/stateless capability."; + type boolean; + default "false"; + } + + leaf active { + description "Represents peer's LSP update capability."; + type boolean; + default "false"; + } + } + + augment "/nt:network-topology/nt:topology/nt:node/npts:pcep-session-state/npts:peer-capabilities" { + when "../../../nt:topology-types/pn:topology-pcep"; + ext:augment-identifier stateful-capabilities-stats-aug; + description "Remote peer's (PCC) advertised stateful capabilities."; + + uses stateful-preferences; + } + + augment "/nt:network-topology/nt:topology/nt:node/npts:pcep-session-state/npts:local-pref" { + when "../../../nt:topology-types/pn:topology-pcep"; + ext:augment-identifier pcep-entity-id-stats-aug; + description "PCEP Entity Identifier"; + + uses opso:speaker-entity-id; + } +} \ No newline at end of file diff --git a/experimental/odp/odl-pcep-stats-provider.yang b/experimental/odp/odl-pcep-stats-provider.yang new file mode 100644 index 000000000..fc6914493 --- /dev/null +++ b/experimental/odp/odl-pcep-stats-provider.yang @@ -0,0 +1,34 @@ +// vi: set smarttab et sw=4 tabstop=4: +module odl-pcep-stats-provider { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:odl:pcep:stats:provider:config"; + prefix pspc; + + description + "This module contains the base YANG definitions for + PCEP Stats Provider Configuration. + Copyright (c)2017 AT&T Services, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2017-11-13" { + description + "Initial revision."; + } + + container pcep-provider { + leaf config-name { + type string; + mandatory true; + } + + leaf timer { + type uint16; + default 5; + units "seconds"; + } + } +} \ No newline at end of file diff --git a/experimental/odp/odl-pcep-sync-optimizations.yang b/experimental/odp/odl-pcep-sync-optimizations.yang new file mode 100644 index 000000000..0a755c837 --- /dev/null +++ b/experimental/odp/odl-pcep-sync-optimizations.yang @@ -0,0 +1,125 @@ +module odl-pcep-sync-optimizations { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:sync:optimizations"; + prefix "sync-optimizations"; + + import pcep-types { prefix pcep; revision-date 2018-11-09; } + import pcep-message { prefix msg; revision-date 2018-11-09; } + import network-topology { prefix nt; revision-date 2013-10-21; } + import network-topology-pcep { prefix topo; revision-date 2018-11-09; } + import odl-pcep-ietf-stateful07 { prefix stateful; revision-date 2018-11-09; } + + organization "Pantheon Technologies"; + contact "Iveta Halanova "; + + description + "This module contains the data model of PCEP extensions defined + in draft-ietf-pce-stateful-sync-optimizations-02. + + Copyright (c)2015 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision 2017-10-25 { + description "Update network-topology-pcep revision"; + } + + revision "2015-07-14" { + description + "Initial revision."; + reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-sync-optimizations-02"; + } + + grouping sync-optimizations-capability-tlv { + reference "http://tools.ietf.org/html/draft-ietf-pce-pce-initiated-lsp-00#section-4.1"; + leaf triggered-initial-sync { + type boolean; + default false; + } + leaf delta-lsp-sync-capability { + type boolean; + default false; + } + leaf triggered-resync { + type boolean; + default false; + } + leaf include-db-version { + type boolean; + default false; + } + } + + grouping lsp-db-version-tlv { + container lsp-db-version { + uses pcep:tlv; + leaf lsp-db-version-value { + type uint64; + } + } + } + + grouping speaker-entity-id { + leaf speaker-entity-id-value { + type binary; + } + } + + grouping speaker-entity-id-tlv { + container speaker-entity-id { + uses pcep:tlv; + uses speaker-entity-id; + } + } + + augment "/msg:open/msg:open-message/msg:open/msg:tlvs/stateful:stateful" { + uses sync-optimizations-capability-tlv; + } + + augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:stateful-tlv/stateful:stateful" { + uses sync-optimizations-capability-tlv; + } + + augment "/msg:open/msg:open-message/msg:open/msg:tlvs" { + uses lsp-db-version-tlv; + uses speaker-entity-id-tlv; + } + + augment "/stateful:pcupd/stateful:pcupd-message/stateful:updates/stateful:lsp/stateful:tlvs" { + uses lsp-db-version-tlv; + } + + augment "/stateful:pcrpt/stateful:pcrpt-message/stateful:reports/stateful:lsp/stateful:tlvs" { + uses lsp-db-version-tlv; + } + + augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client/topo:reported-lsp/topo:path/stateful:lsp/stateful:tlvs" { + uses lsp-db-version-tlv; + } + + augment "/topo:add-lsp/topo:input/topo:arguments/stateful:lsp/stateful:tlvs" { + uses lsp-db-version-tlv; + } + + augment "/topo:update-lsp/topo:input/topo:arguments/stateful:lsp/stateful:tlvs" { + uses lsp-db-version-tlv; + } + + augment "/msg:pcerr/msg:pcerr-message/msg:error-type/msg:session-case/msg:session/msg:open/msg:tlvs" { + uses lsp-db-version-tlv; + uses speaker-entity-id-tlv; + } + + augment "/nt:network-topology/nt:topology/nt:node/topo:path-computation-client" { + uses lsp-db-version-tlv; + } +} \ No newline at end of file diff --git a/experimental/odp/odl-pcep-topology-sync-optimizations-config.yang b/experimental/odp/odl-pcep-topology-sync-optimizations-config.yang new file mode 100644 index 000000000..4db0b4dc2 --- /dev/null +++ b/experimental/odp/odl-pcep-topology-sync-optimizations-config.yang @@ -0,0 +1,44 @@ +// vi: set smarttab et sw=4 tabstop=4: +module odl-pcep-topology-sync-optimizations-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:pcep:sync:optimizations:config"; + prefix pnc; + + import network-topology { prefix nt; revision-date 2013-10-21; } + import network-topology-pcep { prefix pn; revision-date 2018-11-09; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + import pcep-config { prefix pc; revision-date 2017-10-25; } + import odl-pcep-sync-optimizations { prefix opso; revision-date 2018-11-09; } + import network-pcep-topology-config { prefix nptc; revision-date 2018-11-09; } + + description + "This module contains the PCEP config extensions to base topology model. + Copyright (c)2017 AT&T Services, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + organization "AT&T Services, Inc."; + contact "Claudio D. Gasparini "; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision "2017-10-25" { + description + "Initial revision."; + } + + augment "/nt:network-topology/nt:topology/nt:node/nptc:session-config" { + when "../nt:topology-types/pn:topology-pcep"; + ext:augment-identifier pcep-node-sync-config; + description "Augment Pcep topology node with synchronization config"; + + uses opso:speaker-entity-id; + } +} \ No newline at end of file diff --git a/experimental/odp/onf-extensions.yang b/experimental/odp/onf-extensions.yang new file mode 100644 index 000000000..9f27cfcad --- /dev/null +++ b/experimental/odp/onf-extensions.yang @@ -0,0 +1,219 @@ +module onf-extensions { + namespace "urn:opendaylight:openflowplugin:extension:onf"; + prefix "onf-ext"; + + import openflow-types {prefix oft; revision-date "2013-07-31";} + import openflow-protocol {prefix ofproto; revision-date "2013-07-31";} + + revision "2017-01-24" { + description "Open networking foundation approved extensions definition."; + } + + // ONF experimenter error codes + typedef onf-experimenter-error-code { + description "Error codes for experimenter error type."; + type enumeration { + enum ONFERR_ET_UNKNOWN { + description "Unspecified error."; + value 2300; + } + enum ONFERR_ET_EPERM { + description "Permissions error."; + value 2301; + } + enum ONFERR_ET_BAD_ID { + description "Bundle ID doesn’t exist."; + value 2302; + } + enum ONFERR_ET_BUNDLE_EXIST { + description "Bundle ID already exist."; + value 2303; + } + enum ONFERR_ET_BUNDLE_CLOSED { + description "Bundle ID is closed."; + value 2304; + } + enum ONFERR_ET_OUT_OF_BUNDLES { + description "Too many bundles IDs."; + value 2305; + } + enum ONFERR_ET_BAD_TYPE { + description "Unsupported or unknown message control type."; + value 2306; + } + enum ONFERR_ET_BAD_FLAGS { + description "Unsupported, unknown, or inconsistent flags."; + value 2307; + } + enum ONFERR_ET_MSG_BAD_LEN { + description "Length problem in included message."; + value 2308; + } + enum ONFERR_ET_MSG_BAD_XID { + description "Inconsistent or duplicate XID."; + value 2309; + } + enum ONFERR_ET_MSG_UNSUP { + description "Unsupported message in this bundle."; + value 2310; + } + enum ONFERR_ET_MSG_CONFLICT { + description "Unsupported message combination in this bundle."; + value 2311; + } + enum ONFERR_ET_MSG_TOO_MANY { + description "Can not handle this many messages in bundle."; + value 2312; + } + enum ONFERR_ET_MSG_FAILED { + description "One message in bundle failed."; + value 2313; + } + enum ONFERR_ET_TIMEOUT { + description "Bundle is taking too long."; + value 2314; + } + enum ONFERR_ET_BUNDLE_IN_PROGRESS { + description "Bundle is locking the resource."; + value 2315; + } + } + } + + // Extension 230 - Bundle Extension + typedef bundle-id { + description "Identify the bundle."; + type uint32; + } + + typedef bundle-control-type { + description "Bundle control message type."; + type enumeration { + enum ONF_BCT_OPEN_REQUEST { + value 0; + } + enum ONF_BCT_OPEN_REPLY { + value 1; + } + enum ONF_BCT_CLOSE_REQUEST { + value 2; + } + enum ONF_BCT_CLOSE_REPLY { + value 3; + } + enum ONF_BCT_COMMIT_REQUEST { + value 4; + } + enum ONF_BCT_COMMIT_REPLY { + value 5; + } + enum ONF_BCT_DISCARD_REQUEST { + value 6; + } + enum ONF_BCT_DISCARD_REPLY { + value 7; + } + } + } + + typedef bundle-flags { + description "Bundle configuration flags."; + type bits { + bit atomic { + description "Execute atomically."; + position 0; + } + bit ordered { + description "Execute in specified order."; + position 1; + } + } + } + + typedef bundle-property-type { + description "Bundle property types."; + type enumeration { + enum ONF_ET_BPT_EXPERIMENTER { + description "Experimenter property."; + value 65535; //0xFFFF + } + } + } + + grouping bundle-property-grouping { + description "Container for bundle property."; + leaf type { + type bundle-property-type; + } + choice bundle-property-entry { + case bundle-property-experimenter { + leaf experimenter { + type oft:experimenter-id; + } + leaf exp-type { + type uint32; + } + choice bundle-property-experimenter-data { + // to be augmented by vendors + } + } + } + } + + grouping bundle-common-grouping { + description "Common fields of bundle messages."; + leaf bundle-id { + type bundle-id; + } + leaf flags { + type bundle-flags; + } + list bundle-property { + uses bundle-property-grouping; + } + } + + grouping bundle-control-grouping { + description "ONF_ET_BUNDLE_CONTROL message in OpenFlow Switch Extension 230."; + uses bundle-common-grouping; + leaf type { + type bundle-control-type; + } + } + + grouping bundle-add-message-grouping { + description "ONF_ET_BUNDLE_ADD_MESSAGE in OpenFlow Switch Extension 230."; + uses bundle-common-grouping; + choice bundle-inner-message { + description "Message added to the bundle."; + case bundle-flow-mod-case { + container flow-mod-case-data { + uses ofproto:flow-mod; + } + } + case bundle-group-mod-case { + container group-mod-case-data { + uses ofproto:group-mod; + } + } + case bundle-port-mod-case { + container port-mod-case-data { + uses ofproto:port-mod; + } + } + } + } + + augment "/ofproto:experimenter/ofproto:input/ofproto:experimenter-data-of-choice" { + case bundle-control-onf { + container onf-control-grouping-data { + uses bundle-control-grouping; + } + } + case bundle-add-message-onf { + container onf-add-message-grouping-data { + uses bundle-add-message-grouping; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/openconfig-bgp-multiprotocol.yang b/experimental/odp/openconfig-bgp-multiprotocol.yang new file mode 100644 index 000000000..d20539ab7 --- /dev/null +++ b/experimental/odp/openconfig-bgp-multiprotocol.yang @@ -0,0 +1,730 @@ +module openconfig-bgp-multiprotocol { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/bgp-multiprotocol"; + + prefix "bgp-mp"; + + // import some basic inet types + import openconfig-routing-policy { prefix rpol; } + import openconfig-bgp-types { prefix bgp-types; } + import openconfig-bgp-operational { prefix bgp-op; } + import openconfig-types { prefix oc-types; } + import openconfig-extensions { prefix oc-ext; } + + // meta + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module is part of a YANG model for BGP protocol + configuration, focusing on configuration of multiprotocol + BGP, in particular various relevant address families (AFI) and + sub-address families (SAFI). + + Identities (rather than enumerated types) are used to identify + each AFI / SAFI type to make it easier for users to extend to + pre-standard or custom AFI/SAFI types. This module is only + intended to capture the most"; + + oc-ext:openconfig-version "1.1.0"; + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "1.1.0"; + } + + revision "2015-05-15" { + description + "Refactored multiprotocol module"; + reference "Pre-release"; + } + + grouping ipv4-unicast-group { + description + "Group for IPv4 Unicast configuration options"; + + container ipv4-unicast { + when "../afi-safi-name = 'bgp-mp:ipv4-unicast'" { + description + "Include this container for IPv4 Unicast specific + configuration"; + } + + description "IPv4 unicast configuration options"; + + // include common IPv[46] unicast options + uses ipv4-ipv6-unicast-common; + + // placeholder for IPv4 unicast specific configuration + } + } + + grouping ipv6-unicast-group { + description + "Group for IPv6 Unicast configuration options"; + + container ipv6-unicast { + when "../afi-safi-name = 'bgp-mp:ipv6-unicast'" { + description + "Include this container for IPv6 Unicast specific + configuration"; + } + + description "IPv6 unicast configuration options"; + + // include common IPv[46] unicast options + uses ipv4-ipv6-unicast-common; + + // placeholder for IPv6 unicast specific configuration + // options + } + } + + grouping ipv4-labelled-unicast-group { + description + "Group for IPv4 Labelled Unicast configuration options"; + + container ipv4-labelled-unicast { + when "../afi-safi-name = 'bgp-mp:ipv4-labelled-unicast'" { + description + "Include this container for IPv4 Labelled Unicast specific + configuration"; + } + + description "IPv4 Labelled Unicast configuration options"; + + uses all-afi-safi-common; + + // placeholder for IPv4 Labelled Unicast specific config + // options + } + } + + grouping ipv6-labelled-unicast-group { + description + "Group for IPv6 Labelled Unicast configuration options"; + + container ipv6-labelled-unicast { + when "../afi-safi-name = 'bgp-mp:ipv6-labelled-unicast'" { + description + "Include this container for IPv6 Labelled Unicast specific + configuration"; + } + + description "IPv6 Labelled Unicast configuration options"; + + uses all-afi-safi-common; + + // placeholder for IPv6 Labelled Unicast specific config + // options. + } + } + + grouping l3vpn-ipv4-unicast-group { + description + "Group for IPv4 Unicast L3VPN configuration options"; + + container l3vpn-ipv4-unicast { + when "../afi-safi-name = 'bgp-mp:l3vpn-ipv4-unicast'" { + description + "Include this container for IPv4 Unicast L3VPN specific + configuration"; + } + + description "Unicast IPv4 L3VPN configuration options"; + + // include common L3VPN configuration options + uses l3vpn-ipv4-ipv6-unicast-common; + + // placeholder for IPv4 Unicast L3VPN specific config options. + } + } + + grouping l3vpn-ipv6-unicast-group { + description + "Group for IPv6 Unicast L3VPN configuration options"; + + container l3vpn-ipv6-unicast { + when "../afi-safi-name = 'bgp-mp:l3vpn-ipv6-unicast'" { + description + "Include this container for unicast IPv6 L3VPN specific + configuration"; + } + + description "Unicast IPv6 L3VPN configuration options"; + + // include common L3VPN configuration options + uses l3vpn-ipv4-ipv6-unicast-common; + + // placeholder for IPv6 Unicast L3VPN specific configuration + // options + } + } + + grouping l3vpn-ipv4-multicast-group { + description + "Group for IPv4 L3VPN multicast configuration options"; + + container l3vpn-ipv4-multicast { + when "../afi-safi-name = 'bgp-mp:l3vpn-ipv4-multicast'" { + description + "Include this container for multicast IPv6 L3VPN specific + configuration"; + } + + description "Multicast IPv4 L3VPN configuration options"; + + // include common L3VPN multicast options + uses l3vpn-ipv4-ipv6-multicast-common; + + // placeholder for IPv4 Multicast L3VPN specific configuration + // options + } + } + + grouping l3vpn-ipv6-multicast-group { + description + "Group for IPv6 L3VPN multicast configuration options"; + + container l3vpn-ipv6-multicast { + when "../afi-safi-name = 'bgp-mp:l3vpn-ipv6-multicast'" { + description + "Include this container for multicast IPv6 L3VPN specific + configuration"; + } + + description "Multicast IPv6 L3VPN configuration options"; + + // include common L3VPN multicast options + uses l3vpn-ipv4-ipv6-multicast-common; + + // placeholder for IPv6 Multicast L3VPN specific configuration + // options + } + } + + grouping l2vpn-vpls-group { + description + "Group for BGP-signalled VPLS configuration options"; + + container l2vpn-vpls { + when "../afi-safi-name = 'bgp-mp:l2vpn-vpls'" { + description + "Include this container for BGP-signalled VPLS specific + configuration"; + } + + description "BGP-signalled VPLS configuration options"; + + // include common L2VPN options + uses l2vpn-common; + + // placeholder for BGP-signalled VPLS specific configuration + // options + } + } + + grouping l2vpn-evpn-group { + description + "Group for BGP EVPN configuration options"; + + container l2vpn-evpn { + when "../afi-safi-name = 'bgp-mp:l2vpn-evpn'" { + description + "Include this container for BGP EVPN specific + configuration"; + } + + description "BGP EVPN configuration options"; + + // include common L2VPN options + uses l2vpn-common; + + // placeholder for BGP EVPN specific configuration options + } + } + + + + grouping bgp-route-selection-options_config { + description + "Set of configuration options that govern best + path selection."; + + leaf always-compare-med { + type boolean; + default "false"; + description + "Compare multi-exit discriminator (MED) value from + different ASes when selecting the best route. The + default behavior is to only compare MEDs for paths + received from the same AS."; + } + + leaf ignore-as-path-length { + type boolean; + default "false"; + description + "Ignore the AS path length when selecting the best path. + The default is to use the AS path length and prefer paths + with shorter length."; + } + + leaf external-compare-router-id { + type boolean; + default "true"; + description + "When comparing similar routes received from external + BGP peers, use the router-id as a criterion to select + the active path."; + } + + leaf advertise-inactive-routes { + type boolean; + default "false"; + description + "Advertise inactive routes to external peers. The + default is to only advertise active routes."; + } + + leaf enable-aigp { + type boolean; + default false; + description + "Flag to enable sending / receiving accumulated IGP + attribute in routing updates"; + } + + leaf ignore-next-hop-igp-metric { + type boolean; + default "false"; + description + "Ignore the IGP metric to the next-hop when calculating + BGP best-path. The default is to select the route for + which the metric to the next-hop is lowest"; + } + } + + grouping bgp-use-multiple-paths-ebgp-as-options_config { + description + "Configuration parameters specific to eBGP multipath applicable + to all contexts"; + + leaf allow-multiple-as { + type boolean; + default "false"; + description + "Allow multipath to use paths from different neighbouring + ASes. The default is to only consider multiple paths from + the same neighbouring AS."; + } + } + + grouping bgp-use-multiple-paths-ebgp_config { + description + "Configuration parameters relating to multipath for eBGP"; + + uses bgp-use-multiple-paths-ebgp-as-options_config; + + leaf maximum-paths { + type uint32; + default 1; + description + "Maximum number of parallel paths to consider when using + BGP multipath. The default is use a single path."; + } + } + + grouping bgp-use-multiple-paths-ibgp_config { + description + "Configuration parmaeters relating to multipath for iBGP"; + + leaf maximum-paths { + type uint32; + default 1; + description + "Maximum number of parallel paths to consider when using + iBGP multipath. The default is to use a single path"; + } + } + + grouping bgp-use-multiple-paths { + description + "Configuration parameters relating to multipath for BGP - both + iBGP and eBGP"; + + container use-multiple-paths { + description + "Parameters related to the use of multiple paths for the + same NLRI"; + + container config { + description + "Configuration parameters relating to multipath"; + uses bgp-use-multiple-paths_config; + } + container state { + description + "State parameters relating to multipath"; + uses bgp-use-multiple-paths_config; + } + + container ebgp { + description + "Multipath parameters for eBGP"; + container config { + description + "Configuration parameters relating to eBGP multipath"; + uses bgp-use-multiple-paths-ebgp_config; + } + container state { + config false; + description + "State information relating to eBGP multipath"; + uses bgp-use-multiple-paths-ebgp_config; + } + } + + container ibgp { + description + "Multipath parameters for iBGP"; + container config { + description + "Configuration parameters relating to iBGP multipath"; + uses bgp-use-multiple-paths-ibgp_config; + } + container state { + config false; + description + "State information relating to iBGP multipath"; + uses bgp-use-multiple-paths-ibgp_config; + } + } + } + } + + grouping bgp-use-multiple-paths-neighbor { + description + "Per-neighbor configuration for multipath for BGP"; + + container use-multiple-paths { + description + "Parameters related to the use of multiple-paths for the same + NLRI when they are received only from this neighbor"; + + container config { + description + "Configuration parameters relating to multipath"; + uses bgp-use-multiple-paths_config; + } + container state { + description + "State parameters relating to multipath"; + uses bgp-use-multiple-paths_config; + } + + container ebgp { + description + "Multipath configuration for eBGP"; + container config { + description + "Configuration parameters relating to eBGP multipath"; + uses bgp-use-multiple-paths-ebgp-as-options_config; + } + container state { + config false; + description + "State information relating to eBGP multipath"; + uses bgp-use-multiple-paths-ebgp-as-options_config; + } + } + } + } + + grouping bgp-use-multiple-paths_config { + description + "Generic configuration options relating to use of multiple + paths for a referenced AFI-SAFI, group or neighbor"; + + leaf enabled { + type boolean; + default false; + description + "Whether the use of multiple paths for the same NLRI is + enabled for the neighbor. This value is overridden by + any more specific configuration value."; + } + } + + grouping bgp-afi-safi-graceful-restart_config { + description + "BGP graceful restart parameters that apply on a per-AFI-SAFI + basis"; + + leaf enabled { + type boolean; + default false; + description + "This leaf indicates whether graceful-restart is enabled for + this AFI-SAFI"; + } + } + + grouping bgp-afi-safi_config { + description + "Configuration parameters used for all BGP AFI-SAFIs"; + + leaf afi-safi-name { + type identityref { + base bgp-types:afi-safi-type; + } + description "AFI,SAFI"; + } + + leaf enabled { + type boolean; + default false; + description + "This leaf indicates whether the IPv4 Unicast AFI,SAFI is + enabled for the neighbour or group"; + } + } + + grouping all-afi-safi-common-prefix-limit_config { + description + "Configuration parameters relating to prefix-limits for an + AFI-SAFI"; + + leaf max-prefixes { + type uint32; + description + "Maximum number of prefixes that will be accepted + from the neighbour"; + } + + leaf shutdown-threshold-pct { + type oc-types:percentage; + description + "Threshold on number of prefixes that can be received + from a neighbour before generation of warning messages + or log entries. Expressed as a percentage of + max-prefixes"; + } + + leaf restart-timer { + type decimal64 { + fraction-digits 2; + } + units "seconds"; + description + "Time interval in seconds after which the BGP session + is re-established after being torn down due to exceeding + the max-prefix limit."; + } + } + + grouping ipv4-ipv6-unicast-common_config { + description + "Common configuration parameters for IPv4 and IPv6 Unicast + address families"; + + leaf send-default-route { + type boolean; + default "false"; + description + "If set to true, send the default-route to the neighbour(s)"; + } + } + + grouping all-afi-safi-common { + description + "Grouping for configuration common to all AFI,SAFI"; + + container prefix-limit { + description + "Configure the maximum number of prefixes that will be + accepted from a peer"; + + container config { + description + "Configuration parameters relating to the prefix + limit for the AFI-SAFI"; + uses all-afi-safi-common-prefix-limit_config; + } + container state { + config false; + description + "State information relating to the prefix-limit for the + AFI-SAFI"; + uses all-afi-safi-common-prefix-limit_config; + } + } + } + + grouping ipv4-ipv6-unicast-common { + description + "Common configuration that is applicable for IPv4 and IPv6 + unicast"; + + // include common afi-safi options. + uses all-afi-safi-common; + + // configuration options that are specific to IPv[46] unicast + container config { + description + "Configuration parameters for common IPv4 and IPv6 unicast + AFI-SAFI options"; + uses ipv4-ipv6-unicast-common_config; + } + container state { + config false; + description + "State information for common IPv4 and IPv6 unicast + parameters"; + uses ipv4-ipv6-unicast-common_config; + } + } + + grouping l3vpn-ipv4-ipv6-unicast-common { + description + "Common configuration applied across L3VPN for IPv4 + and IPv6"; + + // placeholder -- specific configuration options that are generic + // across IPv[46] unicast address families. + uses all-afi-safi-common; + } + + grouping l3vpn-ipv4-ipv6-multicast-common { + description + "Common configuration applied across L3VPN for IPv4 + and IPv6"; + + // placeholder -- specific configuration options that are + // generic across IPv[46] multicast address families. + uses all-afi-safi-common; + } + + grouping l2vpn-common { + description + "Common configuration applied across L2VPN address + families"; + + // placeholder -- specific configuration options that are + // generic across L2VPN address families + uses all-afi-safi-common; + } + + grouping bgp-route-selection-options { + description + "Parameters relating to the BGP route selection process"; + + container route-selection-options { + description + "Parameters relating to options for route selection"; + container config { + description + "Configuration parameters relating to route selection + options"; + uses bgp-route-selection-options_config; + } + container state { + config false; + description + "State information for the route selection options"; + uses bgp-route-selection-options_config; + } + } + } + + // *********** STRUCTURE GROUPINGS ********************** + + grouping bgp-global-afi-safi { + description + "Parameters and route selection options for MP-BGP + specific to the Global AFI-SAFI"; + uses bgp-route-selection-options; + } + + grouping bgp-group-afi-safi { + description + "Parameters and route selection options for MP-BGP + specific to peer groups"; + uses bgp-route-selection-options; + } + + grouping bgp-common-afi-safi-list { + description + "List of address-families associated with the BGP instance, + a peer-group or neighbor"; + + list afi-safi { + key "afi-safi-name"; + + description + "AFI,SAFI configuration available for the + neighbour or group"; + + + leaf afi-safi-name { + type leafref { + path "../config/afi-safi-name"; + } + description + "Reference to the AFI-SAFI name used as a key + for the AFI-SAFI list"; + } + + container graceful-restart { + description + "Parameters relating to BGP graceful-restart"; + container config { + description + "Configuration options for BGP graceful-restart"; + uses bgp-afi-safi-graceful-restart_config; + } + container state { + config false; + description + "State information for BGP graceful-restart"; + uses bgp-afi-safi-graceful-restart_config; + } + } + + container config { + description + "Configuration parameters for the AFI-SAFI"; + uses bgp-afi-safi_config; + } + container state { + config false; + description + "State information relating to the AFI-SAFI"; + uses bgp-afi-safi_config; + uses bgp-op:bgp-afi-safi_state; + } + + // import and export policy included for the afi/safi + uses rpol:apply-policy-group; + + uses ipv4-unicast-group; + uses ipv6-unicast-group; + uses ipv4-labelled-unicast-group; + uses ipv6-labelled-unicast-group; + uses l3vpn-ipv4-unicast-group; + uses l3vpn-ipv6-unicast-group; + uses l3vpn-ipv4-multicast-group; + uses l3vpn-ipv6-multicast-group; + uses l2vpn-vpls-group; + uses l2vpn-evpn-group; + } + } +} diff --git a/experimental/odp/openconfig-bgp-operational.yang b/experimental/odp/openconfig-bgp-operational.yang new file mode 100644 index 000000000..edda6a824 --- /dev/null +++ b/experimental/odp/openconfig-bgp-operational.yang @@ -0,0 +1,400 @@ +module openconfig-bgp-operational { + + yang-version "1"; + + // namespace + // TODO: change to an ietf or other more generic namespace + namespace "http://openconfig.net/yang/bgp-operational"; + + prefix "bgp-op"; + + // import some basic inet types + import ietf-inet-types { prefix inet; } + import ietf-yang-types { prefix yang; } + import openconfig-bgp-types { prefix bgp-types; } + import openconfig-extensions { prefix oc-ext; } + + // meta + + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module is part of a YANG model for BGP protocol + configuration, focusing on operational data (i.e., state + variables) related to BGP operations"; + + oc-ext:openconfig-version "1.1.0"; + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "1.1.0"; + } + + revision "2015-05-15" { + description + "Initial revision"; + reference "Pre-release"; + } + + // extension statements + + // feature statements + + // identity statements + + // typedef statements + + // grouping statements + + grouping bgp-counters-message-types_common { + description + "Grouping of BGP message types, included for re-use + across counters"; + + leaf UPDATE { + type uint64; + description + "Number of BGP UPDATE messages announcing, withdrawing + or modifying paths exchanged."; + } + + leaf NOTIFICATION { + type uint64; + description + "Number of BGP NOTIFICATION messages indicating an + error condition has occurred exchanged."; + } + } + + + grouping bgp-context-pfx-path-counters_common { + description + "Grouping containing common counters relating to prefixes and + paths"; + + leaf total-paths { + type uint32; + description + "Total number of BGP paths within the context"; + } + + leaf total-prefixes { + type uint32; + description + ""; + } + } + + grouping bgp-global_state { + description + "Grouping containing operational parameters relating to the + global BGP instance"; + uses bgp-context-pfx-path-counters_common; + } + + grouping bgp-global-afi-safi_state { + description + "Grouping containing operational parameters relating to each + AFI-SAFI within the BGP global instance"; + uses bgp-context-pfx-path-counters_common; + } + + grouping bgp-peer-group_state { + description + "Grouping containing operational parameters relating to a BGP + peer group"; + uses bgp-context-pfx-path-counters_common; + } + + grouping bgp-neighbor_state { + description + "Grouping containing operational state variables relating to a + BGP neighbor"; + + leaf session-state { + type enumeration { + enum IDLE { + description + "neighbor is down, and in the Idle state of the + FSM"; + } + enum CONNECT { + description + "neighbor is down, and the session is waiting for + the underlying transport session to be established"; + } + enum ACTIVE { + description + "neighbor is down, and the local system is awaiting + a conncetion from the remote peer"; + } + enum OPENSENT { + description + "neighbor is in the process of being established. + The local system has sent an OPEN message"; + } + enum OPENCONFIRM { + description + "neighbor is in the process of being established. + The local system is awaiting a NOTIFICATION or + KEEPALIVE message"; + } + enum ESTABLISHED { + description + "neighbor is up - the BGP session with the peer is + established"; + } + } + description + "Operational state of the BGP peer"; + } + + leaf-list supported-capabilities { + type identityref { + base bgp-types:bgp-capability; + } + description + "BGP capabilities negotiated as supported with the peer"; + } + } + + grouping bgp-neighbor-afi-safi_state { + description + "Operational state on a per-AFI-SAFI basis for a BGP + neighbor"; + + leaf active { + type boolean; + description + "This value indicates whether a particular AFI-SAFI has + been succesfully negotiated with the peer. An AFI-SAFI + may be enabled in the current running configuration, but a + session restart may be required in order to negotiate the new + capability."; + } + + uses bgp-neighbor-prefix-counters_state; + } + + grouping bgp-neighbor-prefix-counters_state { + description + "Counters for BGP neighbor sessions"; + + container prefixes { + description "Prefix counters for the BGP session"; + leaf received { + type uint32; + description + "The number of prefixes received from the neighbor"; + } + + leaf sent { + type uint32; + description + "The number of prefixes advertised to the neighbor"; + } + + leaf installed { + type uint32; + description + "The number of advertised prefixes installed in the + Loc-RIB"; + } + } + } + + grouping bgp-neighbor-message-counters-sent_state { + description + "Counters relating to messages sent to a BGP neighbor"; + uses bgp-counters-message-types_common; + } + + grouping bgp-neighbor-message-counters-received_state { + description + "Counters relating to the mesages received from a BGP + neighbor"; + uses bgp-counters-message-types_common; + } + + grouping bgp-neighbor-queue-counters_state { + description + "Counters relating to the message queues associated with the + BGP peer"; + leaf input { + type uint32; + description + "The number of messages received from the peer currently + queued"; + } + + leaf output { + type uint32; + description + "The number of messages queued to be sent to the peer"; + } + } + + grouping bgp-neighbor-transport_state { + description + "Operational state parameters relating to the transport session + used for the BGP session"; + + leaf local-port { + type inet:port-number; + description + "Local TCP port being used for the TCP session supporting + the BGP session"; + } + + leaf remote-address { + type inet:ip-address; + description + "Remote address to which the BGP session has been + established"; + } + + leaf remote-port { + type inet:port-number; + description + "Remote port being used by the peer for the TCP session + supporting the BGP session"; + } + } + + grouping bgp-neighbor-error-handling_state { + description + "Operational state parameters relating to enhanced error + error handling for BGP"; + + leaf erroneous-update-messages { + type uint32; + description + "The number of BGP UPDATE messages for which the + treat-as-withdraw mechanism has been applied based + on erroneous message contents"; + } + } + + grouping bgp-neighbor-timers_state { + description + "Operational state parameters relating to BGP timers associated + with the BGP session"; + + leaf uptime { + type yang:timeticks; + description + "This timer determines the amount of time since the + BGP last transitioned in or out of the Established + state"; + } + + leaf negotiated-hold-time { + type decimal64 { + fraction-digits 2; + } + description + "The negotiated hold-time for the BGP session"; + } + } + + grouping bgp-afi-safi_state { + description + "Operational state information relevant to all address + families that may be carried by the BGP session"; + + // placeholder - options in this container are + // valid in both the global and per-neighbor + // paths + + } + + grouping bgp-afi-safi-graceful-restart_state { + description + "Operational state information relevant to graceful restart + for BGP"; + + leaf peer-restart-time { + type uint16 { + range 0..4096; + } + description + "The period of time (advertised by the peer) that + the peer expects a restart of a BGP session to + take"; + } + + leaf peer-restarting { + type boolean; + description + "This flag indicates whether the remote neighbor is currently + in the process of restarting, and hence received routes are + currently stale"; + } + + leaf local-restarting { + type boolean; + description + "This flag indicates whether the local neighbor is currently + restarting. The flag is unset after all NLRI have been + advertised to the peer, and the End-of-RIB (EOR) marker has + been unset"; + } + + leaf mode { + type enumeration { + enum HELPER-ONLY { + description + "The local router is operating in helper-only mode, and + hence will not retain forwarding state during a local + session restart, but will do so during a restart of the + remote peer"; + } + enum BILATERAL { + description + "The local router is operating in both helper mode, and + hence retains forwarding state during a remote restart, + and also maintains forwarding state during local session + restart"; + } + enum REMOTE-HELPER { + description + "The local system is able to retain routes during restart + but the remote system is only able to act as a helper"; + } + } + description + "Ths leaf indicates the mode of operation of BGP graceful + restart with the peer"; + } + } + + grouping bgp-neighbor-afi-safi-graceful-restart_state { + description + "Operational state variables relating to the graceful-restart + mechanism on a per-AFI-SAFI basis"; + + leaf received { + type boolean; + description + "This leaf indicates whether the neighbor advertised the + ability to support graceful-restart for this AFI-SAFI"; + } + + leaf advertised { + type boolean; + description + "This leaf indicates whether the ability to support + graceful-restart has been advertised to the peer"; + } + } + + +} + + diff --git a/experimental/odp/openconfig-bgp-policy.yang b/experimental/odp/openconfig-bgp-policy.yang new file mode 100644 index 000000000..ad88e05b4 --- /dev/null +++ b/experimental/odp/openconfig-bgp-policy.yang @@ -0,0 +1,523 @@ +module openconfig-bgp-policy { + + yang-version "1.1"; + + // namespace + namespace "http://openconfig.net/yang/bgp-policy"; + + prefix "bgp-pol"; + + // import some basic types + import ietf-inet-types { prefix inet; } + import openconfig-routing-policy {prefix rpol; } + import openconfig-policy-types { prefix pt; } + import openconfig-bgp-types { prefix bgp-types; } + import openconfig-extensions { prefix oc-ext; } + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + + + // meta + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module contains data definitions for BGP routing policy. + It augments the base routing-policy module with BGP-specific + options for conditions and actions."; + + oc-ext:openconfig-version "1.1.0"; + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "1.1.0"; + } + + revision "2015-05-15" { + description + "Updated model to augment base routing-policy module"; + reference "Pre-release"; + } + + // extension statements + + // feature statements + + // identity statements + + // typedef statements + + typedef bgp-as-path-prepend-repeat { + type uint8; + description + "Option for the BGP as-prepend policy action. Prepends the + local AS number repeated n times"; + } + + typedef bgp-set-community-option-type { + type enumeration { + enum ADD { + description + "add the specified communities to the existing + community attribute"; + } + enum REMOVE { + description + "remove the specified communities from the + existing community attribute"; + } + enum REPLACE { + description + "replace the existing community attribute with + the specified communities. If an empty set is + specified, this removes the community attribute + from the route."; + } + } + description + "Type definition for options when setting the community + attribute in a policy action"; + } + + typedef bgp-next-hop-type { + type union { + type inet:ip-address; + type enumeration { + enum SELF { + description "special designation for local router's own + address, i.e., next-hop-self"; + } + } + } + description + "type definition for specifying next-hop in policy actions"; + } + + typedef bgp-set-med-type { + type union { + type uint32; + type string { + pattern "^[+-][0-9]+"; + } + type enumeration { + enum IGP { + description "set the MED value to the IGP cost toward the + next hop for the route"; + } + } + } + description + "Type definition for specifying how the BGP MED can + be set in BGP policy actions. The three choices are to set + the MED directly, increment/decrement using +/- notation, + and setting it to the IGP cost (predefined value)."; + } + + // grouping statements + + grouping bgp-match-conditions { + description + "Condition statement definitions for checking membership in a + defined set"; + + container match-community-set { + presence + "The presence of this container indicates that the routes + should match the referenced community-set"; + + description + "Match a referenced community-set according to the logic + defined in the match-set-options leaf"; + + leaf community-set { + type leafref { + path "/rpol:routing-policy/rpol:defined-sets/" + + "bgp-pol:bgp-defined-sets/bgp-pol:community-sets/" + + "bgp-pol:community-set/bgp-pol:community-set-name"; + require-instance true; + } + description + "References a defined community set"; + } + uses rpol:match-set-options-group; + } + + container match-ext-community-set { + presence + "The presence of this container indicates that the routes + should match the referenced extended community set"; + + description + "Match a referenced extended community-set according to the + logic defined in the match-set-options leaf"; + + leaf ext-community-set { + type leafref { + path "/rpol:routing-policy/rpol:defined-sets/" + + "bgp-pol:bgp-defined-sets/bgp-pol:ext-community-sets/" + + "bgp-pol:ext-community-set/" + + "bgp-pol:ext-community-set-name"; + require-instance true; + } + description "References a defined extended community set"; + } + uses rpol:match-set-options-group; + } + + container match-as-path-set { + presence + "The presence of this container indicates that the route + should match the referenced as-path set"; + + description + "Match a referenced as-path set according to the logic + defined in the match-set-options leaf"; + + leaf as-path-set { + type leafref { + path "/rpol:routing-policy/rpol:defined-sets/" + + "bgp-pol:bgp-defined-sets/bgp-pol:as-path-sets/" + + "bgp-pol:as-path-set/bgp-pol:as-path-set-name"; + require-instance true; + } + description "References a defined AS path set"; + } + uses rpol:match-set-options-group; + } + } + + grouping bgp-attribute-conditions { + description + "Condition statement definitions for comparing a BGP route + attribute to a specified value"; + + leaf med-eq { + type uint32; + description + "Condition to check if the received MED value is equal to + the specified value"; + } + + leaf origin-eq { + type bgp-types:bgp-origin-attr-type; + description + "Condition to check if the route origin is equal to the + specified value"; + } + + leaf-list next-hop-in { + type inet:ip-address; + description + "List of next hop addresses to check for in the route + update"; + } + + leaf-list afi-safi-in { + type identityref { + base "bgp-types:afi-safi-type"; + } + description + "List of address families which the NLRI may be + within"; + } + + leaf local-pref-eq { + type uint32; + // TODO: add support for other comparisons if needed + description + "Condition to check if the local pref attribute is equal to + the specified value"; + } + + container community-count { + + presence "node is present in the config data to indicate a + community-count condition"; + + description + "Value and comparison operations for conditions based on the + number of communities in the route update"; + + uses pt:attribute-compare-operators; + + } + + container as-path-length { + + presence "node is present in the config data to indicate a + as-path-length condition"; + + description + "Value and comparison operations for conditions based on the + length of the AS path in the route update"; + + uses pt:attribute-compare-operators; + } + + leaf route-type { + // TODO: verify extent of vendor support for this comparison + type enumeration { + enum INTERNAL { + description "route type is internal"; + } + enum EXTERNAL { + description "route type is external"; + } + } + description + "Condition to check the route type in the route update"; + } + } + + + // augment statements + + augment "/rpol:routing-policy/rpol:defined-sets" { + description "adds BGP defined sets container to routing policy + model"; + + container bgp-defined-sets { + description + "BGP-related set definitions for policy match conditions"; + + container community-sets { + description + "Enclosing container for community sets"; + + list community-set { + key community-set-name; + description + "Definitions for community sets"; + + leaf community-set-name { + type string; + mandatory true; + description + "name / label of the community set -- this is used to + reference the set in match conditions"; + } + + list communities { + uses bgp-t:community; + description + "members of the community set"; + } + } + } + + container ext-community-sets { + description + "Enclosing container for extended community sets"; + + list ext-community-set { + key ext-community-set-name; + description + "Definitions for extended community sets"; + + leaf ext-community-set-name { + type string; + description + "name / label of the extended community set -- this is + used to reference the set in match conditions"; + } + + list ext-community-member { + uses bgp-t:extended-community; + description + "members of the extended community set"; + } + } + } + + container as-path-sets { + description + "Enclosing container for AS path sets"; + + list as-path-set { + key as-path-set-name; + description + "Definitions for AS path sets"; + + leaf as-path-set-name { + type string; + description + "name of the AS path set -- this is used to reference + the set in match conditions"; + } + + leaf-list as-path-set-member { + type inet:as-number; + description + "AS path expression -- list of ASes in the set"; + } + } + } + } + } + + augment "/rpol:routing-policy/rpol:policy-definitions/" + + "rpol:policy-definition/rpol:statements/rpol:statement/" + + "rpol:conditions" { + description "BGP policy conditions added to routing policy + module"; + + container bgp-conditions { + description "Policy conditions for matching + BGP-specific defined sets or comparing BGP-specific + attributes"; + + uses bgp-match-conditions; + uses bgp-attribute-conditions; + } + } + + augment "/rpol:routing-policy/rpol:policy-definitions/" + + "rpol:policy-definition/rpol:statements/rpol:statement/" + + "rpol:actions" { + description "BGP policy actions added to routing policy + module"; + + container bgp-actions { + description + "Definitions for policy action statements that + change BGP-specific attributes of the route"; + + container set-as-path-prepend { + + presence "node is present in the config data to use the AS + prepend action"; + description + "action to prepend local AS number to the AS-path a + specified number of times"; + + leaf repeat-n { + type uint8; + description "number of times to prepend the local AS + number"; + } + } + + container set-community { + presence "node is present in the config data when + set-community action is used"; + description + "action to set the community attributes of the route, along + with options to modify how the community is modified"; + + choice set-community-method { + description + "Option to set communities using an inline list or + reference to an existing defined set."; + + case inline { + list communities { + uses bgp-t:community; + description + "Set the community values for the update inline with + a list."; + } + } + case reference { + leaf community-set-ref { + type leafref { + path "/rpol:routing-policy/rpol:defined-sets/" + + "bgp-pol:bgp-defined-sets/" + + "bgp-pol:community-sets/bgp-pol:community-set/" + + "bgp-pol:community-set-name"; + require-instance true; + } + description + "References a defined community set by name"; + } + } + } + leaf options { + type bgp-set-community-option-type; + description + "Options for modifying the community attribute with + the specified values. These options apply to both + methods of setting the community attribute."; + } + } + + container set-ext-community { + + presence "node is present in the config data when + set-community action is used"; + description + "Action to set the extended community attributes of the + route, along with options to modify how the community is + modified"; + + choice set-ext-community-method { + description + "Option to set communities using an inline list or + reference to an existing defined set."; + + case inline { + list ext-community-member { + uses bgp-t:extended-community; + description + "Set the community values for the update inline with + a list."; + } + } + case reference { + leaf ext-community-set-ref { + type leafref { + path "/rpol:routing-policy/rpol:defined-sets/" + + "bgp-pol:bgp-defined-sets/" + + "bgp-pol:ext-community-sets/" + + "bgp-pol:ext-community-set/" + + "bgp-pol:ext-community-set-name"; + require-instance true; + } + description + "References a defined extended community set by + name"; + } + } + } + leaf options { + type bgp-set-community-option-type; + description + "options for modifying the extended community + attribute with the specified values. These options + apply to both methods of setting the community + attribute."; + } + } + + leaf set-route-origin { + type bgp-types:bgp-origin-attr-type; + description "set the origin attribute to the specified + value"; + } + + leaf set-local-pref { + type uint32; + description "set the local pref attribute on the route + update"; + } + + leaf set-next-hop { + type bgp-next-hop-type; + description "set the next-hop attribute in the route update"; + } + + leaf set-med { + type bgp-set-med-type; + description "set the med metric attribute in the route + update"; + } + } + } + + // rpc statements + + // notification statements +} diff --git a/experimental/odp/openconfig-bgp-types.yang b/experimental/odp/openconfig-bgp-types.yang new file mode 100644 index 000000000..5f5d23d13 --- /dev/null +++ b/experimental/odp/openconfig-bgp-types.yang @@ -0,0 +1,410 @@ +module openconfig-bgp-types { + yang-version "1"; + + namespace "http://openconfig.net/yang/bgp-types"; + + prefix "bgp-types"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15;} + import openconfig-types { prefix oc-types; } + import openconfig-extensions { prefix oc-ext; } + + // meta + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module contains general data definitions for use in BGP + policy. It can be imported by modules that make use of BGP + attributes"; + + oc-ext:openconfig-version "1.1.0"; + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "1.1.0"; + } + + revision "2015-05-15" { + description "Initial revision"; + reference "Pre-release"; + } + + + identity bgp-capability { + description "Base identity for a BGP capability"; + } + + identity MPBGP { + base "bgp-capability"; + description + "Multi-protocol extensions to BGP"; + reference "RFC2858"; + } + + identity ROUTE-REFRESH { + base "bgp-capability"; + description + "The BGP route-refresh functionality"; + reference "RFC2918"; + } + + identity ASN32 { + base "bgp-capability"; + description + "4-byte (32-bit) AS number functionality"; + reference "RFC6793"; + } + + identity GRACEFUL-RESTART { + base "bgp-capability"; + description + "Graceful restart functionality"; + reference "RFC4724"; + } + + identity ADD-PATHS { + base "bgp-capability"; + description + "BGP add-paths"; + reference "draft-ietf-idr-add-paths"; + } + + identity afi-safi-type { + description + "Base identity type for AFI,SAFI tuples for BGP-4"; + reference "RFC4760 - multiprotocol extensions for BGP-4"; + } + + identity IPV4-UNICAST { + base afi-safi-type; + description + "IPv4 unicast (AFI,SAFI = 1,1)"; + reference "RFC4760"; + } + + identity IPV6-UNICAST { + base afi-safi-type; + description + "IPv6 unicast (AFI,SAFI = 2,1)"; + reference "RFC4760"; + } + + identity IPV4-LABELLED-UNICAST { + base afi-safi-type; + description + "Labelled IPv4 unicast (AFI,SAFI = 1,4)"; + reference "RFC3107"; + } + + identity IPV6-LABELLED-UNICAST { + base afi-safi-type; + description + "Labelled IPv6 unicast (AFI,SAFI = 2,4)"; + reference "RFC3107"; + } + + identity L3VPN-IPV4-UNICAST { + base afi-safi-type; + description + "Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)"; + reference "RFC4364"; + } + + identity L3VPN-IPV6-UNICAST { + base afi-safi-type; + description + "Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)"; + reference "RFC4659"; + } + + identity L3VPN-IPV4-MULTICAST { + base afi-safi-type; + description + "Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)"; + reference "RFC6514"; + } + + identity L3VPN-IPV6-MULTICAST { + base afi-safi-type; + description + "Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)"; + reference "RFC6514"; + } + + identity L2VPN-VPLS { + base afi-safi-type; + description + "BGP-signalled VPLS (AFI,SAFI = 25,65)"; + reference "RFC4761"; + } + + identity L2VPN-EVPN { + base afi-safi-type; + description + "BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)"; + } + + identity bgp-well-known-std-community { + description + "Reserved communities within the standard community space + defined by RFC1997. These communities must fall within the + range 0x00000000 to 0xFFFFFFFF"; + reference "RFC1997"; + } + + identity NO_EXPORT { + base bgp-well-known-std-community; + description + "Do not export NLRI received carrying this community outside + the bounds of this autonomous system, or this confederation if + the local autonomous system is a confederation member AS. This + community has a value of 0xFFFFFF01."; + reference "RFC1997"; + } + + identity NO_ADVERTISE { + base bgp-well-known-std-community; + description + "All NLRI received carrying this community must not be + advertised to other BGP peers. This community has a value of + 0xFFFFFF02."; + reference "RFC1997"; + } + + identity NO_EXPORT_SUBCONFED { + base bgp-well-known-std-community; + description + "All NLRI received carrying this community must not be + advertised to external BGP peers - including over confederation + sub-AS boundaries. This community has a value of 0xFFFFFF03."; + reference "RFC1997"; + } + + identity NOPEER { + base bgp-well-known-std-community; + description + "An autonomous system receiving NLRI tagged with this community + is advised not to readvertise the NLRI to external bi-lateral + peer autonomous systems. An AS may also filter received NLRI + from bilateral peer sessions when they are tagged with this + community value"; + reference "RFC3765"; + } + + typedef bgp-session-direction { + type enumeration { + enum INBOUND { + description + "Refers to all NLRI received from the BGP peer"; + } + enum OUTBOUND { + description + "Refers to all NLRI advertised to the BGP peer"; + } + } + description + "Type to describe the direction of NLRI transmission"; + } + + typedef bgp-well-known-community-type { + type identityref { + base bgp-well-known-std-community; + } + description + "Type definition for well-known IETF community attribute + values"; + reference + "IANA Border Gateway Protocol (BGP) Well Known Communities"; + } + + + typedef bgp-std-community-type { + // TODO: further refine restrictions and allowed patterns + // 4-octet value: + // 2 octets + // 2 octets + type union { + type uint32 { + // per RFC 1997, 0x00000000 - 0x0000FFFF and 0xFFFF0000 - + // 0xFFFFFFFF are reserved + range "65536..4294901759"; // 0x00010000..0xFFFEFFFF + } + type string { + pattern '([0-9]+:[0-9]+)'; + } + } + description + "Type definition for standard commmunity attributes"; + reference "RFC 1997 - BGP Communities Attribute"; + } + + typedef bgp-ext-community-type { + // TODO: needs more work to make this more precise given the + // variability of extended community attribute specifications + // 8-octet value: + // 2 octects + // 6 octets + + type union { + type string { + // Type 1: 2-octet global and 4-octet local + // (AS number) (Integer) + pattern '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + + '[1-9][0-9]{1,4}|[0-9]):' + + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + + '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; + } + type string { + // Type 2: 4-octet global and 2-octet local + // (ipv4-address) (integer) + pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + + '2[0-4][0-9]|25[0-5]):' + + '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + + '[1-9][0-9]{1,4}|[0-9])'; + } + type string { + // route-target with Type 1 + // route-target:(ASN):(local-part) + pattern 'route\-target:(6[0-5][0-5][0-3][0-5]|' + + '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' + + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + + '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; + } + type string { + // route-target with Type 2 + // route-target:(IPv4):(local-part) + pattern 'route\-target:' + + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + + '2[0-4][0-9]|25[0-5]):' + + '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + + '[1-9][0-9]{1,4}|[0-9])'; + } + type string { + // route-origin with Type 1 + pattern 'route\-origin:(6[0-5][0-5][0-3][0-5]|' + + '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' + + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + + '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; + } + type string { + // route-origin with Type 2 + pattern 'route\-origin:' + + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + + '2[0-4][0-9]|25[0-5]):' + + '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + + '[1-9][0-9]{1,4}|[0-9])'; + } + } + description + "Type definition for extended community attributes"; + reference "RFC 4360 - BGP Extended Communities Attribute"; + } + + typedef bgp-community-regexp-type { + // TODO: needs more work to decide what format these regexps can + // take. + type oc-types:std-regexp; + description + "Type definition for communities specified as regular + expression patterns"; + } + + typedef bgp-origin-attr-type { + type enumeration { + enum IGP { + description "Origin of the NLRI is internal"; + } + enum EGP { + description "Origin of the NLRI is EGP"; + } + enum INCOMPLETE { + description "Origin of the NLRI is neither IGP or EGP"; + } + } + description + "Type definition for standard BGP origin attribute"; + reference "RFC 4271 - A Border Gateway Protocol 4 (BGP-4), + Sec 4.3"; + } + + typedef peer-type { + type enumeration { + enum INTERNAL { + description "internal (iBGP) peer"; + } + enum EXTERNAL { + description "external (eBGP) peer"; + } + } + description + "labels a peer or peer group as explicitly internal or + external"; + } + + + typedef remove-private-as-option { + type enumeration { + enum ALL { + description "remove all private ASes in the path"; + } + enum REPLACE { + description "replace private ASes with local AS"; + } + } + description + "set of options for configuring how private AS path numbers + are removed from advertisements"; + } + + typedef percentage { + type uint8 { + range "0..100"; + } + description + "Integer indicating a percentage value"; + } + + typedef rr-cluster-id-type { + type union { + type uint32; + type inet:ipv4-address; + } + description + "union type for route reflector cluster ids: + option 1: 4-byte number + option 2: IP address"; + } + + typedef community-type { + type enumeration { + enum STANDARD { + description "send only standard communities"; + } + enum EXTENDED { + description "send only extended communities"; + } + enum BOTH { + description "send both standard and extended communities"; + } + enum NONE { + description "do not send any community attribute"; + } + } + description + "type describing variations of community attributes: + STANDARD: standard BGP community [rfc1997] + EXTENDED: extended BGP community [rfc4360] + BOTH: both standard and extended community"; + } + + +} diff --git a/experimental/odp/openconfig-bgp.yang b/experimental/odp/openconfig-bgp.yang new file mode 100644 index 000000000..64303eb13 --- /dev/null +++ b/experimental/odp/openconfig-bgp.yang @@ -0,0 +1,1050 @@ +module openconfig-bgp { + + yang-version "1.1"; + + // namespace + namespace "http://openconfig.net/yang/bgp"; + + prefix "bgp"; + + // import some basic inet types + import ietf-inet-types { prefix inet; } + import openconfig-bgp-multiprotocol { prefix bgp-mp; } + import openconfig-routing-policy { prefix rpol; } + import openconfig-bgp-types { prefix bgp-types; } + import openconfig-bgp-operational { prefix bgp-op; } + import openconfig-extensions { prefix oc-ext; } + + // meta + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module describes a YANG model for BGP protocol + configuration.It is a limited subset of all of the configuration + parameters available in the variety of vendor implementations, + hence it is expected that it would be augmented with vendor- + specific configuration data as needed. Additional modules or + submodules to handle other aspects of BGP configuration, + including policy, VRFs, VPNs, and additional address families + are also expected. + + This model supports the following BGP configuration level + hierarchy: + + BGP + | + +-> [ global BGP configuration ] + +-> AFI / SAFI global + +-> peer group + +-> [ peer group config ] + +-> AFI / SAFI [ per-AFI overrides ] + +-> neighbor + +-> [ neighbor config ] + +-> [ optional pointer to peer-group ] + +-> AFI / SAFI [ per-AFI overrides ]"; + + oc-ext:openconfig-version "1.1.0"; + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "1.1.0"; + } + + revision "2015-05-15" { + description + "Refactored BGP module"; + reference "Pre-release"; + } + + grouping bgp-global_config { + description + "Global configuration options for the BGP router."; + + leaf as { + type inet:as-number; + mandatory "true"; + description + "Local autonomous system number of the router. Uses + the 32-bit as-number type from the model in RFC 6991."; + } + leaf router-id { + type inet:ipv4-address; + description + "Router id of the router, expressed as an + 32-bit value, IPv4 address."; + } + } + + grouping bgp-default-route-distance_config { + description + "Configuration options relating to the administrative distance + (or preference) assigned to routes received from different + sources (external, internal, and local)."; + + leaf external-route-distance { + type uint8 { + range "1..255"; + } + description + "Administrative distance for routes learned from external + BGP (eBGP)."; + } + leaf internal-route-distance { + type uint8 { + range "1..255"; + } + description + "Administrative distance for routes learned from internal + BGP (iBGP)."; + } + } + + grouping bgp-confederation_config { + description + "Configuration options specifying parameters when the local + router is within an autonomous system which is part of a BGP + confederation."; + + leaf enabled { + type boolean; + description + "When this leaf is set to true it indicates that + the local-AS is part of a BGP confederation"; + } + + leaf identifier { + type inet:as-number; + description + "Confederation identifier for the autonomous system."; + } + + leaf-list member-as { + type inet:as-number; + description + "Remote autonomous systems that are to be treated + as part of the local confederation."; + } + } + + grouping bgp-neighbor_config { + description + "Neighbor level configuration items."; + + leaf peer-as { + type inet:as-number; + description + "AS number of the peer."; + } + + leaf local-as { + type inet:as-number; + description + "The local autonomous system number that is to be used + when establishing sessions with the remote peer or peer + group, if this differs from the global BGP router + autonomous system number."; + } + + leaf peer-type { + type bgp-types:peer-type; + description + "Explicitly designate the peer or peer group as internal + (iBGP) or external (eBGP)."; + } + + leaf auth-password { + type string; + description + "Configures an MD5 authentication password for use with + neighboring devices."; + } + + leaf remove-private-as { + // could also make this a container with a flag to enable + // remove-private and separate option. here, option implies + // remove-private is enabled. + type bgp-types:remove-private-as-option; + description + "Remove private AS numbers from updates sent to peers."; + } + + leaf route-flap-damping { + type boolean; + default false; + description + "Enable route flap damping."; + } + + leaf send-community { + type bgp-types:community-type; + default "NONE"; + description + "Specify which types of community should be sent to the + neighbor or group. The default is to not send the + community attribute"; + } + + leaf description { + type string; + description + "An optional textual description (intended primarily for use + with a peer or group"; + } + } + + grouping bgp-neighbor-timers_config { + description + "Config parameters related to timers associated with the BGP + peer"; + + leaf connect-retry { + type decimal64 { + fraction-digits 2; + } + default 30; + description + "Time interval in seconds between attempts to establish a + session with the peer."; + } + + leaf hold-time { + type decimal64 { + fraction-digits 2; + } + default 90; + description + "Time interval in seconds that a BGP session will be + considered active in the absence of keepalive or other + messages from the peer. The hold-time is typically + set to 3x the keepalive-interval."; + reference + "RFC 4271 - A Border Gateway Protocol 4, Sec. 10"; + } + + leaf keepalive-interval { + type decimal64 { + fraction-digits 2; + } + default 30; + description + "Time interval in seconds between transmission of keepalive + messages to the neighbor. Typically set to 1/3 the + hold-time."; + } + + leaf minimum-advertisement-interval { + type decimal64 { + fraction-digits 2; + } + default 30; + description + "Minimum time which must elapse between subsequent UPDATE + messages relating to a common set of NLRI being transmitted + to a peer. This timer is referred to as + MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to + reduce the number of UPDATE messages transmitted when a + particular set of NLRI exhibit instability."; + reference + "RFC 4271 - A Border Gateway Protocol 4, Sec 9.2.1.1"; + } + } + + grouping bgp-neighbor-transport_config { + description + "Configuration parameters relating to the transport protocol + used by the BGP session to the peer"; + + leaf tcp-mss { + type uint16; + description + "Sets the max segment size for BGP TCP sessions."; + } + + leaf mtu-discovery { + type boolean; + default false; + description + "Turns path mtu discovery for BGP TCP sessions on (true) + or off (false)"; + } + + leaf passive-mode { + type boolean; + default false; + description + "Wait for peers to issue requests to open a BGP session, + rather than initiating sessions from the local router."; + } + + leaf local-address { + type union { + type inet:ip-address; + type string; + } + //TODO: the string should be converted to a leafref type + //to point to an interface when YANG 1.1 is available with + //leafrefs in union types. + description + "Set the local IP (either IPv4 or IPv6) address to use + for the session when sending BGP update messages. This + may be expressed as either an IP address or reference + to the name of an interface."; + } + } + + grouping bgp-neighbor-error-handling_config { + description + "Configuration parameters relating to enhanced error handling + behaviours for BGP"; + + leaf treat-as-withdraw { + type boolean; + default "false"; + description + "Specify whether erroneous UPDATE messages for which the + NLRI can be extracted are treated as though the NLRI is + withdrawn - avoiding session reset"; + reference "https://tools.ietf.org/html/rfc7606"; + } + } + + grouping bgp-neighbor-logging-options_config { + description + "Configuration parameters specifying the logging behaviour for + BGP sessions to the peer"; + + leaf log-neighbor-state-changes { + type boolean; + default "true"; + description + "Configure logging of peer state changes. Default is + to enable logging of peer state changes."; + } + } + + grouping bgp-neighbor-multihop_config { + description + "Configuration parameters specifying the multihop behaviour for + BGP sessions to the peer"; + + leaf enabled { + type boolean; + default "false"; + description + "When enabled the referenced group or neighbors are permitted + to be indirectly connected - including cases where the TTL + can be decremented between the BGP peers"; + } + + leaf multihop-ttl { + type uint8; + description + "Time-to-live value to use when packets are sent to the + referenced group or neighbors and ebgp-multihop is enabled"; + } + } + + grouping bgp-neighbor-route-reflector_config { + description + "Configuration parameters determining whether the behaviour of + the local system when acting as a route-reflector"; + + leaf route-reflector-cluster-id { + type bgp-types:rr-cluster-id-type; + description + "route-reflector cluster id to use when local router is + configured as a route reflector. Commonly set at the group + level, but allows a different cluster + id to be set for each neighbor."; + } + + leaf route-reflector-client { + type boolean; + default "false"; + description + "Configure the neighbor as a route reflector client."; + } + } + + grouping bgp-neighbor-as-path-options_config { + description + "Configuration parameters allowing manipulation of the AS_PATH + attribute"; + + leaf allow-own-as { + type uint8; + default 0; + description + "Specify the number of occurrences of the local BGP speaker's + AS that can occur within the AS_PATH before it is rejected."; + } + + leaf replace-peer-as { + type boolean; + default "false"; + description + "Replace occurrences of the peer's AS in the AS_PATH + with the local autonomous system number"; + } + } + + grouping bgp-neighbor-add-paths_config { + description + "Configuration parameters specfying whether the local system + will send or receive multiple paths using ADD_PATHS"; + + leaf receive { + type boolean; + default false; + description + "Enable ability to receive multiple path advertisements + for an NLRI from the neighbor or group"; + } + + leaf send-max { + type uint8; + description + "The maximum number of paths to advertise to neighbors + for a single NLRI"; + } + } + + grouping bgp-neighbor-peer-group_config { + description + "Configuration parameters indicating whether the specified peer + is to be considered as part of a peer-group - and therefore + inherit its configuration"; + + leaf peer-group { + type leafref { + path "/bgp/peer-groups/peer-group/peer-group-name"; + require-instance true; + } + description + "The peer-group with which this neighbor is associated"; + } + } + + grouping bgp-graceful-restart { + description + "Configures BGP graceful restart, which is a negotiated + option that indicates that a BGP speaker is able to retain + forwarding state when a BGP session restarts"; + + reference "RFC 4724: Graceful Restart Mechanism for BGP"; + container graceful-restart { + description + "Parameters relating the graceful restart mechanism for BGP"; + container config { + description + "Configuration parameters relating to graceful-restart"; + uses bgp-neighbor-graceful-restart_config; + } + container state { + config false; + description + "State information associated with graceful-restart"; + uses bgp-neighbor-graceful-restart_config; + } + } + } + + grouping bgp-neighbor-graceful-restart_config { + description + "Configuration parameters relating to BGP graceful restart."; + + leaf enabled { + type boolean; + description + "Enable or disable the graceful-restart capability."; + } + + leaf restart-time { + type uint16 { + range 0..4096; + } + description + "Estimated time (in seconds) for the local BGP speaker to + restart a session. This value is advertise in the graceful + restart BGP capability. This is a 12-bit value, referred to + as Restart Time in RFC4724. Per RFC4724, the suggested + default value is <= the hold-time value."; + } + + leaf stale-routes-time { + type decimal64 { + fraction-digits 2; + } + description + "An upper-bound on the time thate stale routes will be + retained by a router after a session is restarted. If an + End-of-RIB (EOR) marker is received prior to this timer + expiring stale-routes will be flushed upon its receipt - if + no EOR is received, then when this timer expires stale paths + will be purged. This timer is referred to as the + Selection_Deferral_Timer in RFC4724"; + } + + leaf helper-only { + type boolean; + description + "Enable graceful-restart in helper mode only. When this + leaf is set, the local system does not retain forwarding + its own state during a restart, but supports procedures + for the receiving speaker, as defined in RFC4724."; + } + } + + // ************************************************************ + // * configuration context containers * + // ************************************************************ + + grouping bgp-global-base { + description + "Global configuration parameters for the BGP router"; + + container config { + description + "Configuration parameters relating to the global BGP router"; + uses bgp-global_config; + /* + Presence is added as a workaround for BUG-6069 and it lacks + of presence meaning therefore is left empty. + */ + presence ""; + } + container state { + config false; + description + "State information relating to the global BGP router"; + uses bgp-global_config; + uses bgp-op:bgp-global_state; + } + + uses bgp-mp:bgp-route-selection-options; + + container default-route-distance { + description + "Administrative distance (or preference) assigned to + routes received from different sources + (external, internal, and local)."; + + container config { + description + "Configuration parameters relating to the default route + distance"; + uses bgp-default-route-distance_config; + } + container state { + config false; + description + "State information relating to the default route distance"; + uses bgp-default-route-distance_config; + } + } + + container confederation { + description + "Parameters indicating whether the local system acts as part + of a BGP confederation"; + + container config { + description + "Configuration parameters relating to BGP confederations"; + uses bgp-confederation_config; + } + container state { + config false; + description + "State information relating to the BGP confederations"; + uses bgp-confederation_config; + } + } + + uses bgp-mp:bgp-use-multiple-paths; + + uses bgp-graceful-restart; + + container afi-safis { + description + "Address family specific configuration"; + uses bgp-mp:bgp-common-afi-safi-list; + } + } + + grouping bgp-neighbors { + description + "BGP neighbors configured on the local system"; + list neighbor { + key "neighbor-address"; + description + "List of BGP neighbors configured on the local system, + uniquely identified by peer IPv[46] address"; + + leaf neighbor-address { +// FIXME: BUG-4625: DTO generation cannot handle this case in Binding Spec v1 +// type leafref { +// path "../config/neighbor-address"; +// } + type inet:ip-address; + + description + "Reference to the address of the BGP neighbor used as + a key in the neighbor list"; + } + + uses bgp-neighbor-group; + } + } + + grouping bgp-peer-group { + description + "BGP peer-groups configured on the local system"; + list peer-group { + key "peer-group-name"; + description + "List of BGP peer-groups configured on the local system - + uniquely identified by peer-group name"; + + leaf peer-group-name { +// FIXME: BUG-4625: DTO generation cannot handle this case in Binding Spec v1 +// type leafref { +// path "../config/peer-group-name"; +// } + type string; + description + "Reference to the name of the BGP peer-group used as a + key in the peer-group list"; + } + + uses bgp-neighbor-group; + } + } + + grouping bgp-neighbor-group { + description + "Parameters related to a BGP neighbor or group"; + + container config { + description + "Configuration parameters relating to the BGP neighbor or + group"; + uses bgp-neighbor_config; + } + container state { + config false; + description + "State information relating to the BGP neighbor or group"; + uses bgp-neighbor_config; + } + + container timers { + description + "Timers related to a BGP neighbor or group"; + container config { + description + "Configuration parameters relating to timers used for the + BGP neighbor or group"; + uses bgp-neighbor-timers_config; + } + container state { + config false; + description + "State information relating to the timers used for the BGP + neighbor or group"; + uses bgp-neighbor-timers_config; + } + } + + container transport { + description + "Transport session parameters for the BGP neighbor or group"; + container config { + description + "Configuration parameters relating to the transport + session(s) used for the BGP neighbor or group"; + uses bgp-neighbor-transport_config; + } + container state { + config false; + description + "State information relating to the transport session(s) + used for the BGP neighbor or group"; + uses bgp-neighbor-transport_config; + } + } + + container error-handling { + description + "Error handling parameters used for the BGP neighbor or + group"; + container config { + description + "Configuration parameters enabling or modifying the + behavior or enhanced error handling mechanisms for the BGP + neighbor or group"; + uses bgp-neighbor-error-handling_config; + } + container state { + config false; + description + "State information relating to enhanced error handling + mechanisms for the BGP neighbor or group"; + uses bgp-neighbor-error-handling_config; + } + } + + container logging-options { + description + "Logging options for events related to the BGP neighbor or + group"; + container config { + description + "Configuration parameters enabling or modifying logging + for events relating to the BGP neighbor or group"; + uses bgp-neighbor-logging-options_config; + } + container state { + config false; + description + "State information relating to logging for the BGP neighbor + or group"; + uses bgp-neighbor-logging-options_config; + } + } + + container ebgp-multihop { + description + "eBGP multi-hop parameters for the BGP neighbor or group"; + container config { + description + "Configuration parameters relating to eBGP multihop for the + BGP neighbor or group"; + uses bgp-neighbor-multihop_config; + } + container state { + config false; + description + "State information for eBGP multihop, for the BGP neighbor + or group"; + uses bgp-neighbor-multihop_config; + } + } + + container route-reflector { + description + "Route reflector parameters for the BGP neighbor or group"; + container config { + description + "Configuraton parameters relating to route reflection + for the BGP neighbor or group"; + uses bgp-neighbor-route-reflector_config; + } + container state { + config false; + description + "State information relating to route reflection for the + BGP neighbor or group"; + uses bgp-neighbor-route-reflector_config; + } + } + + container as-path-options { + description + "AS_PATH manipulation parameters for the BGP neighbor or + group"; + container config { + description + "Configuration parameters relating to AS_PATH manipulation + for the BGP peer or group"; + uses bgp-neighbor-as-path-options_config; + } + container state { + config false; + description + "State information relating to the AS_PATH manipulation + mechanisms for the BGP peer or group"; + uses bgp-neighbor-as-path-options_config; + } + } + + container add-paths { + description + "Parameters relating to the advertisement and receipt of + multiple paths for a single NLRI (add-paths)"; + container config { + description + "Configuration parameters relating to ADD_PATHS"; + uses bgp-neighbor-add-paths_config; + } + container state { + config false; + description + "State information associated with ADD_PATHS"; + uses bgp-neighbor-add-paths_config; + } + } + + container afi-safis { + description + "Per-address-family configuration parameters associated with + the neighbor or group"; + uses bgp-mp:bgp-common-afi-safi-list; + } + + uses bgp-graceful-restart; + + uses rpol:apply-policy-group; + } + + grouping bgp-neighbor-neighbor-address_config { + description + "Configuration options relating to the BGP neighbor address"; + + leaf neighbor-address { + type inet:ip-address; + description + "Address of the BGP peer, either in IPv4 or IPv6"; + } + } + + grouping bgp-peer-group-peer-group-name_config { + description + "Configuration options relating to the BGP peer-group name"; + + leaf peer-group-name { + type string; + description + "Name of the BGP peer-group"; + } + } + + // add peer-group pointer only for the neighbor list + augment /bgp/neighbors/neighbor/config { + description + "Augmentation to allow association of a neighbor with a + peer-group"; + uses bgp-neighbor-peer-group_config; + } + + augment /bgp/neighbors/neighbor/state { + description + "Augmentation to reflect the association of a neighbor with a + peer-group"; + uses bgp-neighbor-peer-group_config; + } + + augment /bgp/peer-groups/peer-group { + description + "Augmentation to add multipath configuration to a peer-group"; + uses bgp-mp:bgp-use-multiple-paths; + } + + augment /bgp/neighbors/neighbor { + description + "Augmentation to add the multipath configuration to a + neighbor"; + uses bgp-mp:bgp-use-multiple-paths-neighbor; + } + + augment /bgp/peer-groups/peer-group/afi-safis/afi-safi { + description + "Augmentation to add multipath configuration to a peer-group + on a per-AFI-SAFI basis"; + uses bgp-mp:bgp-use-multiple-paths; + } + + augment /bgp/neighbors/neighbor/afi-safis/afi-safi { + description + "Augmentation to add multipath configuration to a neighbor + on a per-AFI-SAFI basis"; + uses bgp-mp:bgp-use-multiple-paths-neighbor; + } + + augment /bgp/global/afi-safis/afi-safi { + description + "Augmentation to add global instance specific AFI-SAFI + configuration information"; + uses bgp-mp:bgp-global-afi-safi; + uses bgp-mp:bgp-use-multiple-paths; + } + + augment /bgp/peer-groups/peer-group/afi-safis/afi-safi { + description + "Augmentation that adds peer-group instance specific + AFI-SAFI configuration information"; + uses bgp-mp:bgp-group-afi-safi; + } + + augment /bgp/neighbors/neighbor/config { + description + "Augmentation adding the neighbor address to the + neighbor configuration container"; + uses bgp-neighbor-neighbor-address_config; + } + + augment /bgp/neighbors/neighbor/state { + description + "Augmentation adding the neighbor address to the + neighbor state container"; + uses bgp-neighbor-neighbor-address_config; + } + + augment /bgp/peer-groups/peer-group/config { + description + "Augmentation adding the peer-group name to the + peer-group configuration container"; + uses bgp-peer-group-peer-group-name_config; + } + + augment /bgp/peer-groups/peer-group/state { + description + "Augmentation adding the peer-group name to the + peer-group state container"; + uses bgp-peer-group-peer-group-name_config; + } + + // ************************************************************ + // * Augmentations to add state * + // * (rjs: cleaner to have these in the base module to avoid * + // needing to specify which module - e.g. augment of * + // /bgp:bgp/bgp:neighbors/bgp:neighbor...) * + // ************************************************************ + augment /bgp/neighbors/neighbor/state { + description + "Augmentation to add operational state related to a particular + BGP neighbor"; + uses bgp-op:bgp-neighbor_state; + } + + augment /bgp/neighbors/bgp:neighbor/state { + description + "Augmentation to add operational state related to a particular + BGP neighbor"; + + container messages { + description + "Counters for BGP messages sent and received from the + neighbor"; + container sent { + description + "Counters relating to BGP messages sent to the neighbor"; + uses bgp-op:bgp-neighbor-message-counters-sent_state; + } + + container received { + description + "Counters for BGP messages received from the neighbor"; + uses bgp-op:bgp-neighbor-message-counters-received_state; + } + } + + container queues { + description + "Counters related to queued messages associated with the + BGP neighbor"; + uses bgp-op:bgp-neighbor-queue-counters_state; + } + } + + augment /bgp:bgp/bgp:neighbors/neighbor/timers/state { + description + "Augmentation to add the operational state of timers associated + with the BGP neighbor"; + uses bgp-op:bgp-neighbor-timers_state; + } + + augment /bgp/neighbors/neighbor/transport/state { + description + "Augmentation to add the operational state of the transport + session associated with the BGP neighbor"; + uses bgp-op:bgp-neighbor-transport_state; + } + + augment /bgp/neighbors/neighbor/error-handling/state { + description + "Augmentation to add the operational state of the error + handling associated with the BGP neighbor"; + uses bgp-op:bgp-neighbor-error-handling_state; + } + + augment /bgp/neighbors/neighbor/graceful-restart/state { + description + "Augmentation to add the operational state of graceful-restart + associated with a BGP neighbor"; + uses bgp-op:bgp-afi-safi-graceful-restart_state; + } + + augment /bgp/peer-groups/peer-group/state { + description + "Augmentation to add the operational state and counters + relating to a BGP peer-group"; + uses bgp-op:bgp-peer-group_state; + } + + augment /bgp/global/afi-safis/afi-safi/state { + description + "Augmentation to add operational state and counters + on a per-AFI-SAFI basis to the global BGP router"; + uses bgp-op:bgp-global-afi-safi_state; + } + + augment /bgp/neighbors/neighbor/afi-safis/afi-safi/state { + description + "Augmentation to add per-AFI-SAFI operational state + and counters to the BGP neighbor"; + uses bgp-op:bgp-neighbor-afi-safi_state; + } + + augment "/bgp/neighbors/neighbor/afi-safis/afi-safi/" + + "graceful-restart/state" { + description + "Augmentation to add per-AFI-SAFI operational state for BGP + graceful-restart"; + uses bgp-op:bgp-neighbor-afi-safi-graceful-restart_state; + } + + grouping bgp-top { + description + "Top-level grouping for the BGP model data"; + + container bgp { + presence "Container for BGP protocol hierarchy"; + description + "Top-level configuration and state for the BGP router"; + + container global { + description + "Global configuration for the BGP router"; + uses bgp-global-base; + uses rpol:apply-policy-group; + } + + container neighbors { + description + "Configuration for BGP neighbors"; + uses bgp-neighbors; + } + + container peer-groups { + description + "Configuration for BGP peer-groups"; + uses bgp-peer-group; + } + } + } + + // ************************************************************ + // * module structure containers * + // ************************************************************ + + uses bgp-top; + +} + diff --git a/experimental/odp/openconfig-extensions.yang b/experimental/odp/openconfig-extensions.yang new file mode 100644 index 000000000..d5e9442a8 --- /dev/null +++ b/experimental/odp/openconfig-extensions.yang @@ -0,0 +1,69 @@ +module openconfig-extensions { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/openconfig-ext"; + + prefix "ocext"; + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + // extension statements + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } +} \ No newline at end of file diff --git a/experimental/odp/openconfig-interfaces.yang b/experimental/odp/openconfig-interfaces.yang new file mode 100644 index 000000000..f324e1e3d --- /dev/null +++ b/experimental/odp/openconfig-interfaces.yang @@ -0,0 +1,933 @@ +module openconfig-interfaces { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/interfaces"; + + prefix "oc-if"; + + // import some basic types + import ietf-interfaces { prefix ietf-if; } + import ietf-yang-types { prefix yang; } + import openconfig-extensions { prefix oc-ext; } + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "Model for managing network interfaces and subinterfaces. This + module also defines convenience types / groupings for other + models to create references to interfaces: + + base-interface-ref (type) - reference to a base interface + interface-ref (grouping) - container for reference to a + interface + subinterface + interface-ref-state (grouping) - container for read-only + (opstate) reference to interface + subinterface + + This model reuses data items defined in the IETF YANG model for + interfaces described by RFC 7223 with an alternate structure + (particularly for operational state data) and and with + additional configuration items."; + + oc-ext:openconfig-version "1.0.1"; + + revision "2016-04-12" { + description + "OpenConfig public release"; + reference "1.0.1"; + } + + + // typedef statements + + typedef base-interface-ref { + type leafref { + path "/oc-if:interfaces/oc-if:interface/oc-if:name"; + } + description + "Reusable type for by-name reference to a base interface. + This type may be used in cases where ability to reference + a subinterface is not required."; + } + + typedef interface-id { + type string; + description + "User-defined identifier for an interface, generally used to + name a interface reference. The id can be arbitrary but a + useful convention is to use a combination of base interface + name and subinterface index."; + } + + // grouping statements + + grouping interface-ref-common { + description + "Reference leafrefs to interface / subinterface"; + + leaf interface { + type leafref { + path "/oc-if:interfaces/oc-if:interface/oc-if:name"; + } + description + "Reference to a base interface. If a reference to a + subinterface is required, this leaf must be specified + to indicate the base interface."; + } + + leaf subinterface { + type leafref { + path "/oc-if:interfaces/" + + "oc-if:interface[oc-if:name=current()/../interface]/" + + "oc-if:subinterfaces/oc-if:subinterface/oc-if:index"; + } + description + "Reference to a subinterface -- this requires the base + interface to be specified using the interface leaf in + this container. If only a reference to a base interface + is requuired, this leaf should not be set."; + } + } + + grouping interface-ref-state-container { + description + "Reusable opstate w/container for a reference to an + interface or subinterface"; + + container state { + config false; + description + "Operational state for interface-ref"; + + uses interface-ref-common; + } + } + + grouping interface-ref { + description + "Reusable definition for a reference to an interface or + subinterface"; + + container interface-ref { + description + "Reference to an interface or subinterface"; + + container config { + description + "Configured reference to interface / subinterface"; + + uses interface-ref-common; + } + + uses interface-ref-state-container; + } + } + + grouping interface-ref-state { + description + "Reusable opstate w/container for a reference to an + interface or subinterface"; + + container interface-ref { + description + "Reference to an interface or subinterface"; + + uses interface-ref-state-container; + } + } + + + grouping interface-common-config { + description + "Configuration data data nodes common to physical interfaces + and subinterfaces"; + + leaf name { + type string; + description + "[adapted from IETF interfaces model (RFC 7223)] + + The name of the interface. + + A device MAY restrict the allowed values for this leaf, + possibly depending on the type of the interface. + For system-controlled interfaces, this leaf is the + device-specific name of the interface. The 'config false' + list interfaces/interface[name]/state contains the currently + existing interfaces on the device. + + If a client tries to create configuration for a + system-controlled interface that is not present in the + corresponding state list, the server MAY reject + the request if the implementation does not support + pre-provisioning of interfaces or if the name refers to + an interface that can never exist in the system. A + NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case. + + The IETF model in RFC 7223 provides YANG features for the + following (i.e., pre-provisioning and arbitrary-names), + however they are omitted here: + + If the device supports pre-provisioning of interface + configuration, the 'pre-provisioning' feature is + advertised. + + If the device allows arbitrarily named user-controlled + interfaces, the 'arbitrary-names' feature is advertised. + + When a configured user-controlled interface is created by + the system, it is instantiated with the same name in the + /interfaces/interface[name]/state list."; + reference + "RFC 7223: A YANG Data Model for Interface Management"; + } + + leaf description { + type string; + description + "[adapted from IETF interfaces model (RFC 7223)] + + A textual description of the interface. + + A server implementation MAY map this leaf to the ifAlias + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifAlias. The definition of + such a mechanism is outside the scope of this document. + + Since ifAlias is defined to be stored in non-volatile + storage, the MIB implementation MUST map ifAlias to the + value of 'description' in the persistently stored + datastore. + + Specifically, if the device supports ':startup', when + ifAlias is read the device MUST return the value of + 'description' in the 'startup' datastore, and when it is + written, it MUST be written to the 'running' and 'startup' + datastores. Note that it is up to the implementation to + + decide whether to modify this single leaf in 'startup' or + perform an implicit copy-config from 'running' to + 'startup'. + + If the device does not support ':startup', ifAlias MUST + be mapped to the 'description' leaf in the 'running' + datastore."; + reference + "RFC 2863: The Interfaces Group MIB - ifAlias"; + } + + leaf enabled { + type boolean; + default "true"; + description + "[adapted from IETF interfaces model (RFC 7223)] + + This leaf contains the configured, desired state of the + interface. + + Systems that implement the IF-MIB use the value of this + leaf in the 'running' datastore to set + IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry + has been initialized, as described in RFC 2863. + + Changes in this leaf in the 'running' datastore are + reflected in ifAdminStatus, but if ifAdminStatus is + changed over SNMP, this leaf is not affected."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + } + + grouping interface-phys-config { + description + "Configuration data for physical interfaces"; + + leaf type { + type identityref { + base ietf-if:interface-type; + } + mandatory true; + description + "[adapted from IETF interfaces model (RFC 7223)] + + The type of the interface. + + When an interface entry is created, a server MAY + initialize the type leaf with a valid value, e.g., if it + is possible to derive the type from the name of the + interface. + + If a client tries to set the type of an interface to a + value that can never be used by the system, e.g., if the + type is not supported or if the type does not match the + name of the interface, the server MUST reject the request. + A NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf mtu { + type uint16; + description + "Set the max transmission unit size in octets + for the physical interface. If this is not set, the mtu is + set to the operational default -- e.g., 1514 bytes on an + Ethernet interface."; + } + + uses interface-common-config; + } + + grouping interface-phys-holdtime-config { + description + "Configuration data for interface hold-time settings -- + applies to physical interfaces."; + + leaf up { + type uint32; + units milliseconds; + default 0; + description + "Dampens advertisement when the interface + transitions from down to up. A zero value means dampening + is turned off, i.e., immediate notification."; + } + + leaf down { + type uint32; + units milliseconds; + default 0; + description + "Dampens advertisement when the interface transitions from + up to down. A zero value means dampening is turned off, + i.e., immediate notification."; + } + } + + grouping interface-phys-holdtime-state { + description + "Operational state data for interface hold-time."; + } + + grouping interface-phys-holdtime-top { + description + "Top-level grouping for setting link transition + dampening on physical and other types of interfaces."; + + container hold-time { + description + "Top-level container for hold-time settings to enable + dampening advertisements of interface transitions."; + + container config { + description + "Configuration data for interface hold-time settings."; + + uses interface-phys-holdtime-config; + } + + container state { + + config false; + + description + "Operational state data for interface hold-time."; + + uses interface-phys-holdtime-config; + uses interface-phys-holdtime-state; + } + } + } + + grouping interface-common-state { + description + "Operational state data (in addition to intended configuration) + at the global level for this interface"; + + leaf ifindex { + type uint32; + description + "System assigned number for each interface. Corresponds to + ifIndex object in SNMP Interface MIB"; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + + leaf admin-status { + type enumeration { + enum UP { + description + "Ready to pass packets."; + } + enum DOWN { + description + "Not ready to pass packets and not in some test mode."; + } + enum TESTING { + //TODO: This is generally not supported as a configured + //admin state, though it's in the standard interfaces MIB. + //Consider removing it. + description + "In some test mode."; + } + } + //TODO:consider converting to an identity to have the + //flexibility to remove some values defined by RFC 7223 that + //are not used or not implemented consistently. + mandatory true; + description + "[adapted from IETF interfaces model (RFC 7223)] + + The desired state of the interface. In RFC 7223 this leaf + has the same read semantics as ifAdminStatus. Here, it + reflects the administrative state as set by enabling or + disabling the interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum UP { + value 1; + description + "Ready to pass packets."; + } + enum DOWN { + value 2; + description + "The interface does not pass any packets."; + } + enum TESTING { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum UNKNOWN { + value 4; + description + "Status cannot be determined for some reason."; + } + enum DORMANT { + value 5; + description + "Waiting for some external event."; + } + enum NOT_PRESENT { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum LOWER_LAYER_DOWN { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + //TODO:consider converting to an identity to have the + //flexibility to remove some values defined by RFC 7223 that + //are not used or not implemented consistently. + mandatory true; + description + "[adapted from IETF interfaces model (RFC 7223)] + + The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:timeticks; + description + "Date and time of the last state change of the interface + (e.g., up-to-down transition). This corresponds to the + ifLastChange object in the standard interface MIB."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + } + + + grouping interface-counters-state { + description + "Operational state representing interface counters + and statistics. Some of these are adapted from RFC 7223"; + + //TODO: we may need to break this list of counters into those + //that would appear for physical vs. subinterface or logical + //interfaces. For now, just replicating the full stats + //grouping to both interface and subinterface. + + container counters { + description + "A collection of interface-related statistics objects."; + + reference + "RFC 7223 - A YANG Data Model for Interface + Management"; + + leaf in-octets { + type yang:counter64; + description + "[adapted from IETF interfaces model (RFC 7223)] + + The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + description + "[adapted from IETF interfaces model (RFC 7223)] + + The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + description + "[adapted from IETF interfaces model (RFC 7223)] + + The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + description + "[adapted from IETF interfaces model (RFC 7223)] + + + The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter64; + description + "[adapted from IETF interfaces model (RFC 7223)] + Changed the counter type to counter64. + + The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + + + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter64; + description + "[adapted from IETF interfaces model (RFC 7223)] + Changed the counter type to counter64. + + For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + description + "[adapted from IETF interfaces model (RFC 7223)] + Changed the counter type to counter64. + + For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + description + "[adapted from IETF interfaces model (RFC 7223)] + Changed the counter type to counter64. + + The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + description + "[adapted from IETF interfaces model (RFC 7223)] + + The total number of packets that higher-level protocols + requested be transmitted, and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + description + "[adapted from IETF interfaces model (RFC 7223)] + + The total number of packets that higher-level protocols + requested be transmitted, and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + + leaf out-multicast-pkts { + type yang:counter64; + description + "[adapted from IETF interfaces model (RFC 7223)] + Changed the counter type to counter64. + + The total number of packets that higher-level protocols + requested be transmitted, and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter64; + description + "[adapted from IETF interfaces model (RFC 7223)] + Changed the counter type to counter64. + + The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter64; + description + "[adapted from IETF interfaces model (RFC 7223)] + Changed the counter type to counter64. + + For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + + leaf last-clear { + type yang:date-and-time; + description + "Indicates the last time the interface counters were + cleared."; + } + } + } + + // data definition statements + + grouping sub-unnumbered-config { + description + "Configuration data for unnumbered subinterfaces"; + + leaf enabled { + type boolean; + default false; + description + "Indicates that the subinterface is unnumbered. By default + the subinterface is numbered, i.e., expected to have an + IP address configuration."; + } + } + + grouping sub-unnumbered-state { + description + "Operational state data unnumbered subinterfaces"; + } + + grouping sub-unnumbered-top { + description + "Top-level grouping unnumbered subinterfaces"; + + container unnumbered { + description + "Top-level container for setting unnumbered interfaces. + Includes reference the interface that provides the + address information"; + + container config { + description + "Configuration data for unnumbered interface"; + + uses sub-unnumbered-config; + } + + container state { + + config false; + + description + "Operational state data for unnumbered interfaces"; + + uses sub-unnumbered-config; + uses sub-unnumbered-state; + } + + uses oc-if:interface-ref; + } + } + + grouping subinterfaces-config { + description + "Configuration data for subinterfaces"; + + leaf index { + type uint32; + default 0; + description + "The index of the subinterface, or logical interface number. + On systems with no support for subinterfaces, or not using + subinterfaces, this value should default to 0, i.e., the + default subinterface."; + } + + uses interface-common-config; + + } + + grouping subinterfaces-state { + description + "Operational state data for subinterfaces"; + + uses interface-common-state; + uses interface-counters-state; + } + + grouping subinterfaces-top { + description + "Subinterface data for logical interfaces associated with a + given interface"; + + container subinterfaces { + description + "Enclosing container for the list of subinterfaces associated + with a physical interface"; + + list subinterface { + key index; + + description + "The list of subinterfaces (logical interfaces) associated + with a physical interface"; + + leaf index { + type leafref { + path "../oc-if:config/oc-if:index"; + } + description + "The index number of the subinterface -- used to address + the logical interface"; + } + + container config { + description + "Configurable items at the subinterface level"; + + uses subinterfaces-config; + } + + container state { + + config false; + description + "Operational state data for logical interfaces"; + + uses subinterfaces-config; + uses subinterfaces-state; + } + } + } + } + + grouping interfaces-top { + description + "Top-level grouping for interface configuration and + operational state data"; + + container interfaces { + description + "Top level container for interfaces, including configuration + and state data."; + + + list interface { + key name; + + description + "The list of named interfaces on the device."; + + leaf name { + type leafref { + path "../oc-if:config/oc-if:name"; + } + description + "References the configured name of the interface"; + //TODO: need to consider whether this should actually + //reference the name in the state subtree, which + //presumably would be the system-assigned name, or the + //configured name. Points to the config/name now + //because of YANG 1.0 limitation that the list + //key must have the same "config" as the list, and + //also can't point to a non-config node. + } + + container config { + description + "Configurable items at the global, physical interface + level"; + + uses interface-phys-config; + } + + container state { + + config false; + description + "Operational state data at the global interface level"; + + uses interface-phys-config; + uses interface-common-state; + uses interface-counters-state; + } + + uses interface-phys-holdtime-top; + uses subinterfaces-top; + } + } + } + + uses interfaces-top; + + +} diff --git a/experimental/odp/openconfig-local-routing.yang b/experimental/odp/openconfig-local-routing.yang new file mode 100644 index 000000000..1c4666144 --- /dev/null +++ b/experimental/odp/openconfig-local-routing.yang @@ -0,0 +1,292 @@ +module openconfig-local-routing { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/local-routing"; + + prefix "loc-rt"; + + // import some basic types + import ietf-inet-types { prefix inet; } + import openconfig-policy-types { prefix pt; } + import openconfig-extensions { prefix oc-ext; } + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module describes configuration and operational state data + for routes that are locally generated, i.e., not created by + dynamic routing protocols. These include static routes, locally + created aggregate routes for reducing the number of constituent + routes that must be advertised, summary routes for IGPs, etc. + + This model expresses locally generated routes as generically as + possible, avoiding configuration of protocol-specific attributes + at the time of route creation. This is primarily to avoid + assumptions about how underlying router implementations handle + route attributes in various routing table data structures they + maintain. Hence, the definition of locally generated routes + essentially creates 'bare' routes that do not have any protocol- + specific attributes. + + When protocol-specific attributes must be attached to a route + (e.g., communities on a locally defined route meant to be + advertised via BGP), the attributes should be attached via a + protocol-specific policy after importing the route into the + protocol for distribution (again via routing policy)."; + + oc-ext:openconfig-version "0.1.3"; + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "0.1.3"; + } + + revision "2015-05-01" { + description + "Initial revision"; + reference "Pre-release"; + } + + // extension statements + + // feature statements + + // identity statements + + // typedef statements + + typedef local-defined-next-hop { + type enumeration { + enum DROP { + description + "Discard or black-hole traffic for the corresponding + destination"; + } + } + description + "Pre-defined next-hop designation for locally generated + routes"; + } + + // grouping statements + + grouping local-generic-settings { + description + "Generic options that can be set on local routes When + they are defined"; + + leaf set-tag { + type pt:tag-type; + description + "Set a generic tag value on the route. This tag can be + used for filtering routes that are distributed to other + routing protocols."; + } + } + + grouping local-static-config { + description + "Configuration data for static routes."; + + leaf prefix { + type inet:ip-prefix; + description + "Destination prefix for the static route, either IPv4 or + IPv6."; + } + + leaf-list next-hop { + type union { + type inet:ip-address; + type local-defined-next-hop; + type string; + //TODO: this should be a leafref pointing to a configured + //interface, but YANG 1.0 does not support leafrefs in a + //union type. It should be updated when YANG 1.1 is + //released. + } + description + "Specify a set of next hops. Each entry may be an IP + address, interface, or a single pre-defined next-hop can be + used, e.g., drop"; + } + + uses local-generic-settings; + } + + grouping local-static-state { + description + "Operational state data for static routes"; + } + + grouping local-static-top { + description + "Top-level grouping for the list of static route definitions"; + + container static-routes { + description + "Enclosing container for the list of static routes"; + + list static { + key prefix; + description + "List of locally configured static routes"; + + leaf prefix { + type leafref { + path "../config/prefix"; + } + description + "Reference to the destination prefix for the static + route"; + } + + container config { + description + "Configuration data for static routes"; + + uses local-static-config; + } + + container state { + + config false; + + description + "Operational state data for static routes"; + + uses local-static-config; + uses local-static-state; + } + } + } + } + + grouping local-aggregate-config { + description + "Configuration data for aggregate routes"; + + leaf prefix { + type inet:ip-prefix; + description + "Aggregate prefix to be advertised"; + } + + leaf discard { + type boolean; + default false; + description + "When true, install the aggregate route with a discard + next-hop -- traffic destined to the aggregate will be + discarded with no ICMP message generated. When false, + traffic destined to an aggregate address when no + constituent routes are present will generate an ICMP + unreachable message."; + } + + uses local-generic-settings; + + } + + grouping local-aggregate-state { + description + "Operational state data for local aggregate advertisement + definitions"; + } + + grouping local-aggregate-top { + description + "Top-level grouping for local aggregates"; + + container local-aggregates { + description + "Enclosing container for locally-defined aggregate + routes"; + + list aggregate { + key prefix; + description + "List of aggregates"; + + leaf prefix { + type leafref { + path "../config/prefix"; + } + description + "Reference to the configured prefix for this aggregate"; + } + + container config { + description + "Configuration data for aggregate advertisements"; + + uses local-aggregate-config; + } + + container state { + + config false; + + description + "Operational state data for aggregate + advertisements"; + + uses local-aggregate-config; + uses local-aggregate-state; + } + } + } + } + + grouping local-routes-config { + description + "Configuration data for locally defined routes"; + } + + grouping local-routes-state { + description + "Operational state data for locally defined routes"; + } + + grouping local-routes-top { + description + "Top-level grouping for local routes"; + + container local-routes { + description + "Top-level container for local routes"; + + container config { + description + "Configuration data for locally defined routes"; + + uses local-routes-config; + } + + container state { + + config false; + + description + "Operational state data for locally defined routes"; + + uses local-routes-config; + uses local-routes-state; + } + + uses local-static-top; + uses local-aggregate-top; + } + } + + uses local-routes-top; + +} diff --git a/experimental/odp/openconfig-network-instance-types.yang b/experimental/odp/openconfig-network-instance-types.yang new file mode 100644 index 000000000..06165f18e --- /dev/null +++ b/experimental/odp/openconfig-network-instance-types.yang @@ -0,0 +1,98 @@ +module openconfig-network-instance-types { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/network-instance-types"; + + prefix "nit"; + + import openconfig-extensions { prefix "ocext"; } + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "Types associated with a network instance"; + + ocext:openconfig-version "0.1.0"; + + revision "2015-10-18" { + description + "Initial revision"; + reference "0.1.0"; + } + + // identity statements + identity network-instance-type { + description + "A base identity which can be extended to indicate different + types of network instance supported by a device."; + } + + identity DEFAULT-INSTANCE { + base network-instance-type; + description + "A special routing instance which acts as the 'default' or + 'global' routing instance for a network device."; + } + + identity L3VRF { + base network-instance-type; + description + "A private Layer 3 only routing instance which is formed of + one or more RIBs"; + } + + identity L2VSI { + base network-instance-type; + description + "A private Layer 2 only switch instance which is formed of + one or more L2 forwarding tables"; + } + + identity L2P2P { + base network-instance-type; + description + "A private Layer 2 only forwarding instance which acts as + a point to point connection between two endpoints"; + } + + + // rjs note: + // this should move to openconfig-types when merged + typedef route-distinguisher { + type union { + // type 0: <2-byte administrator>:<4-byte assigned number> + type string { + pattern "(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|" + + "[1-9]?[1-9]?[0-9][0-9]|[1-9]):" + + "(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|" + + "[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])"; + } + // type 1: :<2-byte assigned number> + type string { + pattern + "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}" + + "([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):" + + "(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|" + + "[1-9]?[1-9]?[0-9][0-9]|[1-9])"; + } + // type 2: <4-byte as-number>:<2-byte assigned number> + type string { + pattern + "(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|" + + "[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):" + + "65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|" + + "[1-9]{0,2}[0-9][0-9]|[1-9])"; + } + } + description "A route distinguisher value"; + reference "RFC4364"; + } + +} \ No newline at end of file diff --git a/experimental/odp/openconfig-network-instance.yang b/experimental/odp/openconfig-network-instance.yang new file mode 100644 index 000000000..f87c573a1 --- /dev/null +++ b/experimental/odp/openconfig-network-instance.yang @@ -0,0 +1,657 @@ +module openconfig-network-instance { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/network-instance"; + + prefix "netinst"; + + // import some basic types + //import ietf-inet-types { prefix inet; } + import ietf-yang-types { prefix "yang"; } + import ietf-inet-types { prefix "inet"; } + import openconfig-network-instance-types { prefix "nit"; } + import openconfig-policy-types { prefix "pt"; } + import openconfig-routing-policy { prefix "rpol"; } + import openconfig-local-routing { prefix "lroute"; } + import openconfig-interfaces { prefix "ocif"; } + import openconfig-extensions { prefix "ocext"; } + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "An OpenConfig description of a network-instance. This may be + a Layer 3 forwarding construct such as a virtual routing and + forwarding (VRF) instance, or a Layer 2 instance such as a + virtual switch instance (VSI). Mixed Layer 2 and Layer 3 + instances are also supported."; + + ocext:openconfig-version "0.1.0"; + + revision "2015-10-18" { + description + "Initial revision"; + reference "0.1.0"; + } + + grouping network-instance-top { + description + "Top-level grouping containing a list of network instances."; + + container network-instances { + description + "The L2, L3, or L2+L3 forwarding instances that are + configured on the local system"; + + list network-instance { + key "name"; + + description + "Network instances configured on the local system"; + + leaf name { + type leafref { + path "../config/name"; + } + description + "A unique name identifying the network instance"; + } + + container config { + description + "Configuration parameters relating to a network + instance"; + uses network-instance-config; + uses network-instance-l3vrf-config { + when "../type = 'L3VRF'" { + description + "Layer 3 VRF configuration parameters included when a + network instance is of type L3VRF"; + } + } + } + container state { + config false; + description + "Operational state parameters relating to a network + instance"; + uses network-instance-config; + uses network-instance-l3vrf-config { + when "../type = 'L3VRF'" { + description + "Layer 3 VRF configuration parameters included when a + network instance is of type L3VRF"; + } + } + uses network-instance-state; + } + + container inter-instance-policies { + description + "Policies dictating how RIB or FIB entries are imported + to and exported from this instance"; + + uses rpol:apply-policy-group; + } + + container table-connections { + description + "Policies dictating how RIB or FIB entries are propagated + between tables"; + + list table-connection { + key "src-table dst-table"; + + description + "A list of connections between pairs of routing or + forwarding tables, the leaking of entries between + which is specified by the import and export policy"; + + leaf src-table { + type leafref { + path "../config/src-table"; + } + description + "The name of the table which should be utilised + as the source of forwarding or routing information"; + } + + leaf dst-table { + type leafref { + path "../config/dst-table"; + } + description + "The table to which routing entries should be + exported"; + } + + container config { + description + "Configuration parameters relating to the connection + between tables"; + uses inter-table-policies-config; + } + container state { + config false; + description + "State parameters relating to the connection between + tables"; + uses inter-table-policies-config; + } + + uses rpol:apply-policy-group; + } + } + + container tables { + description + "The routing tables that are managed by this network + instance"; + + list table { + key "table-name"; + + description + "A network instance manages one or more forwarding or + routing tables. These may reflect the Layer 2 + forwarding information base, the Layer 3 routing + information base of the MPLS LFIB. Protocols may be + explictly associated with a particular table into + which they populate entries. Multiple protocols may + install entries into a single table, or there may be a + 1:1 relationship between a routing protocol and a + table .The import-policy and export-policy lists are + used to specify how routes leak between different + tables within the same forwarding instance."; + + leaf table-name { + type leafref { + path "../config/table-name"; + } + description + "A name for the table"; + } + + container config { + description + "Configuration parameters related to the table"; + uses table-config; + } + + container state { + config false; + description + "State parameters related to the table"; + uses table-config; + } + } + } + + container interfaces { + description + "Interfaces associated with this network intance"; + + container config { + description + "Configuration parameters relating to interfaces + associated with the instance"; + uses instance-interfaces-config; + } + container state { + config false; + description + "State parameters relating to interfaces associated + with the instance"; + uses instance-interfaces-config; + uses instance-interfaces-state; + } + } + + container connection-points { + description + "The set of connection points within a forwarding + instance"; + + list connection-point { + key "connection-point-id"; + + description + "A connection point within a Layer 2 network instance. + Each connection-point consists of a set of interfaces + only one of which is active at any one time. Other than + the specification of whether an interface is local + (i.e., exists within this network-instance), or remote, + all configuration and state parameters are common"; + + leaf connection-point-id { + type leafref { + path "../config/connection-point-id"; + } + description + "A locally significant reference for the + connection-point"; + } + + container config { + description + "Configuration parameters relating to a Layer 2 + network instance connection point"; + uses instance-connection-point-config; + } + container state { + config false; + description + "Operational state parameters relating to a Layer 2 + network instance connection point"; + + uses instance-connection-point-config; + uses instance-connection-point-state; + } + + container endpoints { + when "../config/type = 'L2P2P' " + + "or ../config/type = 'L2VSI'" { + description + "Configuration parameters to associate interfaces + into a common group for use in Layer 2 network + instances"; + } + + description + "The set of endpoints which are grouped within the + connection point"; + + list endpoint { + key "endpoint-id"; + + description + "A list of the endpoints (interfaces or remote + connection points that can be used for this + connection point). The active endpoint is selected + based on the precedence that it is configured + with"; + + leaf endpoint-id { + type leafref { + path "../config/endpoint-id"; + } + description + "A pointer to the configured identifier for the + endpoint"; + } + + container config { + description + "Configuration parameters relating to the + endpoint"; + uses instance-endpoint-config; + } + container state { + config false; + description + "Operational state parameters relating to the + endpoint"; + uses instance-endpoint-config; + uses instance-endpoint-state; + } + } + } + } + } + + container protocols { + description + "The routing protocols that are enabled for this + network-instance."; + + list protocol { + key "identifier name"; + + description + "A process (instance) of a routing protocol. Some + systems may not support more than one instance of + a particular routing protocol"; + + leaf identifier { + type leafref { + path "../config/identifier"; + } + description + "The protocol name for the routing or forwarding + protocol to be instantiated"; + } + + leaf name { + type leafref { + path "../config/name"; + } + description + "An operator-assigned identifier for the routing + or forwarding protocol. For some processes this + leaf may be system defined."; + } + + container config { + description + "Configuration parameters relating to the routing + protocol instance"; + + uses protocols-config; + } + + container state { + config false; + description + "State parameters relating to the routing protocol + instance"; + + uses protocols-config; + uses protocols-state; + } + + container static { + when "../config/identifier = 'STATIC'" { + description + "Include static route parameters only when the + protocol is set to static"; + } + description + "Configuration and state parameters relating to + static routes"; + uses lroute:local-static-top; + } + + container aggregate { + when "../config/identifier = 'LOCAL-AGGREGATE'" { + description + "Include aggregate route parameters only when the + protocol is set to aggregate"; + } + description + "Configuration and state parameters relating to + locally generated aggregate routes"; + uses lroute:local-aggregate-top; + } + } + } + } + } + } + + grouping instance-endpoint-config { + description + "Configuration data relating to an forwarding-instance + endpoint"; + + leaf endpoint-id { + type string; + description + "An identifier for the endpoint"; + } + + uses instance-endpoint-local-remote; + + leaf precedence { + type uint16; + description + "The precedence of the endpoint - the lowest precendence + viable endpoint will be utilised as the active endpoint + within a connection"; + } + } + + grouping instance-endpoint-local-remote { + description + "A generic specification of a local or remote endpoint"; + + choice local-remote { + case local { + leaf interface { + type leafref { + path "/network-instances/network-instance" + + "/interfaces/config/interface"; + } + description + "Reference to the local interface that is a member of + the forwarding-instance"; + } + } + case remote { + leaf neighbor { + type inet:ip-address; + description + "The IP address of the device which hosts the + remote end-point"; + } + + leaf virtual-circuit-identifier { + type uint32; + description + "The virtual-circuit identifier that identifies the + connection at the remote end-point"; + } + } + description + "Configuration relating to an endpoint which can either be + local (an interface), or remote. In the case where it is + remote a neighbor IP address and virtual-circuit identifier + must be specified"; + } + } + + grouping instance-endpoint-state { + description + "Operational state data relating to a forwarding-instance + endpoint"; + leaf active { + type boolean; + description + "When the backup endpoint is active, the value of this + parameter is set to true"; + } + } + + grouping instance-connection-point-config { + description + "Configuration data relating to a forwarding-instance + connection point"; + + leaf connection-point-id { + type string; + description + "An identifier for a connection point"; + } + } + + grouping instance-connection-point-state { + description + "Operational state data relating to a forwarding-instance + connection point"; + } + + grouping table-config { + description + "Configuration parameters relating to a L2/L2.5/L3 table that + exists within the network instance"; + + leaf table-name { + type string; + description + "A human-readable name for the table"; + } + + } + + grouping table-state { + description + "State parameters relating to a table - this may be + utilised to store generic structure for retrieving the contents + of a RIB, FIB or LFIB"; + // placeholder + } + + grouping inter-table-policies-config { + description + "Configuration entries that relate to how RIB or FIB entries + are propagated between tables within the same network + instance"; + + leaf src-table { +// FIXME: BUG-4625: DTO generation cannot handle this case in Binding Spec v1 +// type leafref { +// path "../../../../tables/table/table-name"; +// } + type string; + description + "The source protocol for the table connection"; + } + + leaf dst-table { +// FIXME: BUG-4625: DTO generation cannot handle this case in Binding Spec v1 +// type leafref { +// path "../../../../tables/table/table-name"; +// } + type string; + description + "The destination protocol for the table connection"; + } + + + } + + grouping network-instance-config { + description + "Configuration parameters relating to a top-level network + instance"; + + leaf name { + type string; + description + "An operator-assigned unique name for the forwarding + instance"; + } + + leaf type { + type identityref { + base "nit:network-instance-type"; + } + description + "The type of network instance. The value of this leaf + indicates the type of forwarding entries that should be + supported by this network instance"; + } + + leaf enabled { + type boolean; + description + "Whether the network instance should be configured to be + active on the network element"; + } + + leaf description { + type string; + description + "A free-form string to be used by the network operator to + describe the function of this network instance"; + } + + leaf router-id { + type yang:dotted-quad; + description + "A identifier for the local network instance - typically + used within associated routing protocols or signalling + routing information in another network instance"; + } + + leaf route-distinguisher { + type nit:route-distinguisher; + description + "The route distinguisher that should be used for the local + VRF or VSI instance when it is signalled via BGP."; + } + } + + grouping network-instance-state { + description + "Operational state parameters relating to a network instance"; + } + + grouping network-instance-l3vrf-config { + description + "Configuration parameters for a network instance of type + l3vrf"; + + } + + grouping protocols-config { + description + "Configuration parameters relating to a generic protocol + instance within a network instance"; + + leaf identifier { + type identityref { + base "pt:install-protocol-type"; + } + description + "The protocol identifier for the instance"; + } + + leaf name { + type string; + description + "A unique name for the protocol instance"; + } + + leaf enabled { + type boolean; + description + "A boolean value indicating whether the local protocol + instance is enabled."; + } + + leaf target-table { +// FIXME: BUG-4625: DTO generation cannot handle this case in Binding Spec v1 +// type leafref { +// path "../../../../tables/table/table-name"; +// } + type string; + description + "The table (RIB, FIB, or LFIB) that the protocol should + populate its entries in."; + } + } + + grouping protocols-state { + description + "Operational state parameters relating to a protocol instance"; + } + + grouping instance-interfaces-config { + description + "Base configuration parameters relating to the interfaces + associated with a network instance"; + + leaf-list interface { + type leafref { + path "/ocif:interfaces/ocif:interface/ocif:name"; + } + description + "Interfaces that are associated with the network instance"; + } + } + + grouping instance-interfaces-state { + description + "State parameters relating to the interfaces associated with a + network instance"; + } + + uses network-instance-top; + +} diff --git a/experimental/odp/openconfig-policy-types.yang b/experimental/odp/openconfig-policy-types.yang new file mode 100644 index 000000000..c4db11222 --- /dev/null +++ b/experimental/odp/openconfig-policy-types.yang @@ -0,0 +1,184 @@ +module openconfig-policy-types { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/policy-types"; + + prefix "ptypes"; + + // import some basic types + import ietf-yang-types { prefix yang; } + import openconfig-extensions { prefix oc-ext; } + + // meta + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module contains general data definitions for use in routing + policy. It can be imported by modules that contain protocol- + specific policy conditions and actions."; + + oc-ext:openconfig-version "1.1.0"; + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "1.1.0"; + } + + revision "2015-05-15" { + description + "Initial revision"; + reference "Pre-release"; + } + + // identity statements + + identity attribute-comparison { + description + "base type for supported comparison operators on route + attributes"; + } + + identity attribute-eq { + base attribute-comparison; + description "== comparison"; + } + + identity attribute-ge { + base attribute-comparison; + description ">= comparison"; + } + + identity attribute-le { + base attribute-comparison; + description "<= comparison"; + } + + typedef match-set-options-type { + type enumeration { + enum ANY { + description "match is true if given value matches any member + of the defined set"; + } + enum ALL { + description "match is true if given value matches all + members of the defined set"; + } + enum INVERT { + description "match is true if given value does not match any + member of the defined set"; + } + } + default ANY; + description + "Options that govern the behavior of a match statement. The + default behavior is ANY, i.e., the given value matches any + of the members of the defined set"; + } + + typedef match-set-options-restricted-type { + type enumeration { + enum ANY { + description "match is true if given value matches any member + of the defined set"; + } + enum INVERT { + description "match is true if given value does not match any + member of the defined set"; + } + } + default ANY; + description + "Options that govern the behavior of a match statement. The + default behavior is ANY, i.e., the given value matches any + of the members of the defined set. Note this type is a + restricted version of the match-set-options-type."; + //TODO: restriction on enumerated types is only allowed in + //YANG 1.1. Until then, we will require this additional type + } + + grouping attribute-compare-operators { + description "common definitions for comparison operations in + condition statements"; + + leaf operator { + type identityref { + base attribute-comparison; + } + description + "type of comparison to be performed"; + } + + leaf value { + type uint32; + description + "value to compare with the community count"; + } + } + + typedef tag-type { + type union { + type uint32; + type yang:hex-string; + } + description "type for expressing route tags on a local system, + including IS-IS and OSPF; may be expressed as either decimal or + hexidecimal integer"; + reference + "RFC 2178 OSPF Version 2 + RFC 5130 A Policy Control Mechanism in IS-IS Using + Administrative Tags"; + } + + identity install-protocol-type { + description + "Base type for protocols which can install prefixes into the + RIB"; + } + + identity BGP { + base install-protocol-type; + description "BGP"; + reference "RFC 4271"; + } + + identity ISIS { + base install-protocol-type; + description "IS-IS"; + reference "ISO/IEC 10589"; + } + + identity OSPF { + base install-protocol-type; + description "OSPFv2"; + reference "RFC 2328"; + } + + identity OSPF3 { + base install-protocol-type; + description "OSPFv3"; + reference "RFC 5340"; + } + + identity STATIC { + base install-protocol-type; + description "Locally-installed static route"; + } + + identity DIRECTLY-CONNECTED { + base install-protocol-type; + description "A directly connected route"; + } + + identity LOCAL-AGGREGATE { + base install-protocol-type; + description "Locally defined aggregate route"; + } +} diff --git a/experimental/odp/openconfig-routing-policy.yang b/experimental/odp/openconfig-routing-policy.yang new file mode 100644 index 000000000..97fa87fbb --- /dev/null +++ b/experimental/odp/openconfig-routing-policy.yang @@ -0,0 +1,629 @@ +module openconfig-routing-policy { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/routing-policy"; + + prefix "rpol"; + + // import some basic types + import ietf-inet-types { prefix inet; } + import openconfig-policy-types { prefix pt; } + import openconfig-extensions { prefix oc-ext; } + + // meta + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module describes a YANG model for routing policy + configuration. It is a limited subset of all of the policy + configuration parameters available in the variety of vendor + implementations, but supports widely used constructs for managing + how routes are imported, exported, and modified across different + routing protocols. This module is intended to be used in + conjunction with routing protocol configuration models (e.g., + BGP) defined in other modules. + + Route policy expression: + + Policies are expressed as a set of top-level policy definitions, + each of which consists of a sequence of policy statements. Policy + statements consist of simple condition-action tuples. Conditions + may include mutiple match or comparison operations, and similarly + actions may be multitude of changes to route attributes or a + final disposition of accepting or rejecting the route. + + Route policy evaluation: + + Policy definitions are referenced in routing protocol + configurations using import and export configuration statements. + The arguments are members of an ordered list of named policy + definitions which comprise a policy chain, and optionally, an + explicit default policy action (i.e., reject or accept). + + Evaluation of each policy definition proceeds by evaluating its + corresponding individual policy statements in order. When a + condition statement in a policy statement is satisfied, the + corresponding action statement is executed. If the action + statement has either accept-route or reject-route actions, policy + evaluation of the current policy definition stops, and no further + policy definitions in the chain are evaluated. + + If the condition is not satisfied, then evaluation proceeds to + the next policy statement. If none of the policy statement + conditions are satisfied, then evaluation of the current policy + definition stops, and the next policy definition in the chain is + evaluated. When the end of the policy chain is reached, the + default route disposition action is performed (i.e., reject-route + unless an an alternate default action is specified for the + chain). + + Policy 'subroutines' (or nested policies) are supported by + allowing policy statement conditions to reference another policy + definition which applies conditions and actions from the + referenced policy before returning to the calling policy + statement and resuming evaluation. If the called policy + results in an accept-route (either explicit or by default), then + the subroutine returns an effective true value to the calling + policy. Similarly, a reject-route action returns false. If the + subroutine returns true, the calling policy continues to evaluate + the remaining conditions (using a modified route if the + subroutine performed any changes to the route)."; + + oc-ext:openconfig-version "1.1.0"; + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "1.1.0"; + } + + revision "2015-05-15" { + description + "Initial revision"; + reference "Pre-release"; + } + + // typedef statements + + typedef default-policy-type { + type enumeration { + enum ACCEPT-ROUTE { + description "default policy to accept the route"; + } + enum REJECT-ROUTE { + description "default policy to reject the route"; + } + } + description "type used to specify default route disposition in + a policy chain"; + } + + + // grouping statements + + grouping prefix-set { + description + "Data definition for a list of IPv4 or IPv6 prefixes which + are matched as part of a policy"; + + list prefix-set { + key prefix-set-name; + description + "List of the defined prefix sets"; + + leaf prefix-set-name { + type string; + description + "name / label of the prefix set -- this is used to + reference the set in match conditions"; + } + + list prefix { + key "ip-prefix masklength-range"; + description + "List of prefix expressions that are part of the set"; + + leaf ip-prefix { + type inet:ip-prefix; + mandatory true; + description + "The prefix member in CIDR notation -- while the + prefix may be either IPv4 or IPv6, most + implementations require all members of the prefix set + to be the same address family. Mixing address types in + the same prefix set is likely to cause an error."; + } + + leaf masklength-range { + type string { + pattern '([0-9]+\.\.[0-9]+)|exact'; + } + description + "Defines a range for the masklength, or 'exact' if + the prefix has an exact length. + + Example: 10.3.192.0/21 through 10.3.192.0/24 would be + expressed as prefix: 10.3.192.0/21, + masklength-range: 21..24. + + Example: 10.3.192.0/21 would be expressed as + prefix: 10.3.192.0/21, + masklength-range: exact"; + } + } + } + } + + grouping neighbor-set { + description + "Data definition for a list of IPv4 or IPv6 neighbors which can + be matched in a routing policy"; + + list neighbor-set { + key neighbor-set-name; + description + "Definitions for neighbor sets"; + + leaf neighbor-set-name { + type string; + description + "name / label of the neighbor set -- this is used to + reference the set in match conditions"; + } + + list neighbor { + key "address"; + description + "list of addresses that are part of the neighbor set"; + + leaf address { + type inet:ip-address; + description + "IP address of the neighbor set member"; + } + } + } + } + + grouping tag-set { + description + "Data definitions for a list of tags which can be matched + in policies"; + + list tag-set { + key tag-set-name; + description + "Definitions for tag sets"; + + leaf tag-set-name { + type string; + description + "name / label of the tag set -- this is used to reference + the set in match conditions"; + } + + list tag { + key "value"; + description + "list of tags that are part of the tag set"; + + leaf value { + type pt:tag-type; + description + "Value of the tag set member"; + } + } + } + } + + grouping generic-defined-sets { + description + "Data definitions for pre-defined sets of attributes used in + policy match conditions. These sets are generic and can + be used in matching conditions in different routing + protocols."; + + container prefix-sets { + description + "Enclosing container for defined prefix sets for matching"; + + uses prefix-set; + } + + container neighbor-sets { + description + "Enclosing container for defined neighbor sets for matching"; + + uses neighbor-set; + } + + container tag-sets { + description + "Enclosing container for defined tag sets for matching"; + + uses tag-set; + } + } + + grouping local-generic-conditions { + description + "Condition statement definitions for consideration of a local + characteristic of a route"; + + leaf install-protocol-eq { + type identityref { + base pt:install-protocol-type; + } + description + "Condition to check the protocol / method used to install + which installed the route into the local routing table"; + } + } + + grouping match-set-options-group { + description + "Grouping containing options relating to how a particular set + should be matched"; + + leaf match-set-options { + type pt:match-set-options-type; + description + "Optional parameter that governs the behaviour of the + match operation"; + } + } + + grouping match-set-options-restricted-group { + description + "Grouping for a restricted set of match operation modifiers"; + + leaf match-set-options { + type pt:match-set-options-restricted-type; + description + "Optional parameter that governs the behaviour of the + match operation. This leaf only supports matching on ANY + member of the set or inverting the match. Matching on ALL is + not supported)"; + } + } + + grouping generic-conditions { + description "Condition statement definitions for checking + membership in a generic defined set"; + + container match-prefix-set { + presence + "The presence of this container indicates that the routes + should match the prefix-set referenced."; + + description + "Match a referenced prefix-set according to the logic + defined in the match-set-options leaf"; + + leaf prefix-set { + type leafref { + path "/routing-policy/defined-sets/prefix-sets/" + + "prefix-set/prefix-set-name"; + //TODO: require-instance should be added when it's + //supported in YANG 1.1 + //require-instance true; + } + description "References a defined prefix set"; + } + uses match-set-options-restricted-group; + } + + container match-neighbor-set { + presence + "The presence of this container indicates that the routes + should match the neighbour set referenced"; + + description + "Match a referenced neighbor set according to the logic + defined in the match-set-options-leaf"; + + leaf neighbor-set { + type leafref { + path "/routing-policy/defined-sets/neighbor-sets/" + + "neighbor-set/neighbor-set-name"; + //TODO: require-instance should be added when it's + //supported in YANG 1.1 + //require-instance true; + } + description "References a defined neighbor set"; + } + uses match-set-options-restricted-group; + } + + container match-tag-set { + presence + "The presence of this container indicates that the routes + should match the tag-set referenced"; + + description + "Match a referenced tag set according to the logic defined + in the match-options-set leaf"; + + leaf tag-set { + type leafref { + path "/routing-policy/defined-sets/tag-sets/tag-set" + + "/tag-set-name"; + //TODO: require-instance should be added when it's + //supported in YANG 1.1 + //require-instance true; + } + description "References a defined tag set"; + } + uses match-set-options-restricted-group; + } + + uses local-generic-conditions; + } + + grouping igp-generic-conditions { + description "grouping for IGP policy conditions"; + + } + + + grouping igp-conditions { + description "grouping for IGP-specific policy conditions"; + + container igp-conditions { + description "Policy conditions for IGP attributes"; + + uses igp-generic-conditions; + + } + } + + grouping generic-actions { + description + "Definitions for common set of policy action statements that + manage the disposition or control flow of the policy"; + + choice route-disposition { + description + "Select the final disposition for the route, either + accept or reject."; + leaf accept-route { + type empty; + description "accepts the route into the routing table"; + } + + leaf reject-route { + type empty; + description "rejects the route"; + } + } + } + + + grouping igp-actions { + description "grouping for IGP-specific policy actions"; + + container igp-actions { + description "Actions to set IGP route attributes; these actions + apply to multiple IGPs"; + + leaf set-tag { + type pt:tag-type; + description + "Set the tag value for OSPF or IS-IS routes."; + } + } + } + + grouping routing-policy-top { + description + "Top level container for OpenConfig routing policy"; + + container routing-policy { + description + "top-level container for all routing policy configuration"; + + container defined-sets { + description + "Predefined sets of attributes used in policy match + statements"; + + uses generic-defined-sets; + // uses bgp-defined-sets; + // don't see a need for IGP-specific defined sets at this + // point e.g., for OSPF, IS-IS, etc. + } + + container policy-definitions { + description + "Enclosing container for the list of top-level policy + definitions"; + + list policy-definition { + + key name; + description + "List of top-level policy definitions, keyed by unique + name. These policy definitions are expected to be + referenced (by name) in policy chains specified in import + or export configuration statements."; + + + leaf name { + type string; + description + "Name of the top-level policy definition -- this name + is used in references to the current policy"; + } + + container statements { + description + "Enclosing container for policy statements"; + + list statement { + key name; + // TODO: names of policy statements within a policy + // definition should be optional, however, YANG + // requires a unique id for lists; not sure that a + // compound key works either -- need to investigate + // further. + ordered-by user; + description + "Policy statements group conditions and actions + within a policy definition. They are evaluated in + the order specified (see the description of policy + evaluation at the top of this module."; + + leaf name { + type string; + description "name of the policy statement"; + } + + container conditions { + + description "Condition statements for this + policy statement"; + + leaf call-policy { + type leafref { + path "/rpol:routing-policy/" + + "rpol:policy-definitions/" + + "rpol:policy-definition/rpol:name"; + //TODO: require-instance should be added when + //it is supported in YANG 1.1 + //require-instance true; + } + description + "Applies the statements from the specified policy + definition and then returns control the current + policy statement. Note that the called policy may + itself call other policies (subject to + implementation limitations). This is intended to + provide a policy 'subroutine' capability. The + called policy should contain an explicit or a + default route disposition that returns an + effective true (accept-route) or false + (reject-route), otherwise the behavior may be + ambiguous and implementation dependent"; + } + uses generic-conditions; + uses igp-conditions; + } + + container actions { + + description "Action statements for this policy + statement"; + + uses generic-actions; + uses igp-actions; + } + } + } + } + } + } + } + + grouping apply-policy-config { + description + "Configuration data for routing policies"; + + leaf-list import-policy { + type leafref { + path "/rpol:routing-policy/rpol:policy-definitions/" + + "rpol:policy-definition/rpol:name"; + //TODO: require-instance should be added when it's + //supported in YANG 1.1 + //require-instance true; + } + ordered-by user; + description + "list of policy names in sequence to be applied on + receiving a routing update in the current context, e.g., + for the current peer group, neighbor, address family, + etc."; + } + + leaf default-import-policy { + type default-policy-type; + default REJECT-ROUTE; + description + "explicitly set a default policy if no policy definition + in the import policy chain is satisfied."; + } + + leaf-list export-policy { + type leafref { + path "/rpol:routing-policy/rpol:policy-definitions/" + + "rpol:policy-definition/rpol:name"; + //TODO: require-instance should be added when it's + //supported in YANG 1.1 + //require-instance true; + } + ordered-by user; + description + "list of policy names in sequence to be applied on + sending a routing update in the current context, e.g., + for the current peer group, neighbor, address family, + etc."; + } + + leaf default-export-policy { + type default-policy-type; + default REJECT-ROUTE; + description + "explicitly set a default policy if no policy definition + in the export policy chain is satisfied."; + } + } + + grouping apply-policy-state { + description + "Operational state associated with routing policy"; + + //TODO: identify additional state data beyond the intended + //policy configuration. + } + + grouping apply-policy-group { + description + "Top level container for routing policy applications. This + grouping is intended to be used in routing models where + needed."; + + container apply-policy { + description + "Anchor point for routing policies in the model. + Import and export policies are with respect to the local + routing table, i.e., export (send) and import (receive), + depending on the context."; + + container config { + description + "Policy configuration data."; + + uses apply-policy-config; + } + + container state { + + config false; + description + "Operational state for routing policy"; + + uses apply-policy-config; + uses apply-policy-state; + } + } + } + + uses routing-policy-top; + +} diff --git a/experimental/odp/openconfig-types.yang b/experimental/odp/openconfig-types.yang new file mode 100644 index 000000000..913052570 --- /dev/null +++ b/experimental/odp/openconfig-types.yang @@ -0,0 +1,88 @@ +module openconfig-types { + yang-version "1"; + + namespace "http://openconfig.net/yang/openconfig-types"; + + prefix "openconfig-types"; + + // import statements + import openconfig-extensions { prefix oc-ext; } + + // meta + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module contains a set of general type definitions that + are used across OpenConfig models. It can be imported by modules + that make use of these types."; + + oc-ext:openconfig-version "0.1.0"; + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "0.1.0"; + } + + revision "2015-08-14" { + description "Initial revision"; + reference "TBD"; + } + + typedef percentage { + type uint8 { + range "0..100"; + } + description + "Integer indicating a percentage value"; + } + + typedef std-regexp { + type string; + description + "This type definition is a placeholder for a standard + definition of a regular expression that can be utilised in + OpenConfig models. Further discussion is required to + consider the type of regular expressions that are to be + supported. An initial straw-man proposal is POSIX compatible."; + } + + grouping avg-min-max-stats-precision1 { + description + "Common nodes for recording average, minimum, and + maximum values for a statistic. These values all have + fraction-digits set to 1."; + + leaf avg { + type decimal64 { + fraction-digits 1; + } + description + "The arithmetic mean value of the statistic over the + sampling period."; + } + + leaf min { + type decimal64 { + fraction-digits 1; + } + description + "The minimum value of the statistic over the sampling + period"; + } + + leaf max { + type decimal64 { + fraction-digits 1; + } + description + "The maximum value of the statitic over the sampling + period"; + } + } +} diff --git a/experimental/odp/opendaylight-action-types.yang b/experimental/odp/opendaylight-action-types.yang index 3cc490f01..efc8616ac 100644 --- a/experimental/odp/opendaylight-action-types.yang +++ b/experimental/odp/opendaylight-action-types.yang @@ -2,17 +2,17 @@ module opendaylight-action-types { namespace "urn:opendaylight:action:types"; prefix action; - import ietf-inet-types {prefix inet; revision-date "2010-09-24";} - import ietf-yang-types {prefix yang; revision-date "2010-09-24";} + import ietf-inet-types {prefix inet; revision-date "2013-07-15";} + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} import opendaylight-l2-types {prefix l2t; revision-date "2013-08-27";} import opendaylight-match-types {prefix match; revision-date "2013-10-26";} - + revision "2013-11-12" { description "Initial revision of action service"; } - + typedef vlan-cfi { - type int32; + type int32; } grouping address { @@ -28,18 +28,26 @@ module opendaylight-action-types { } } } - } - + } + + container action-types { + uses action-list; + } + + grouping ordered { + leaf order { + type int32; + } + } + grouping action-list { list action { key "order"; - leaf order { - type int32; - } + uses ordered; uses action; } } - + grouping action { choice action { case output-action-case { @@ -47,7 +55,7 @@ module opendaylight-action-types { leaf output-node-connector { type inet:uri; } - + leaf max-length { type uint16; } @@ -61,7 +69,7 @@ module opendaylight-action-types { } } } - + case set-field-case { @@ -69,15 +77,15 @@ module opendaylight-action-types { uses match:match; } } - + case set-queue-action-case { container set-queue-action { leaf queue { - type string; + type string; } leaf queue-id { - type uint32; + type uint32; } } } @@ -89,7 +97,7 @@ module opendaylight-action-types { } } } - + case set-mpls-ttl-action-case { container set-mpls-ttl-action { @@ -98,7 +106,7 @@ module opendaylight-action-types { } } } - + case set-nw-ttl-action-case { container set-nw-ttl-action { @@ -107,7 +115,7 @@ module opendaylight-action-types { } } } - + case push-pbb-action-case { container push-pbb-action { @@ -116,14 +124,14 @@ module opendaylight-action-types { } } } - + case pop-pbb-action-case { container pop-pbb-action { - - } + presence "no content action"; + } } - + case push-mpls-action-case { container push-mpls-action { @@ -132,57 +140,65 @@ module opendaylight-action-types { } } } - + case dec-mpls-ttl-case { container dec-mpls-ttl { + presence "no content action"; } } - + case dec-nw-ttl-case { container dec-nw-ttl { + presence "no content action"; } } - + case drop-action-case { container drop-action { + presence "no content action"; } } - + case flood-action-case { container flood-action { + presence "no content action"; } } - + case flood-all-action-case { container flood-all-action { + presence "no content action"; } } - + case hw-path-action-case { container hw-path-action { + presence "no content action"; } } - + case loopback-action-case { container loopback-action { + presence "no content action"; } } - + case pop-vlan-action-case { container pop-vlan-action { + presence "no content action"; } } - - - + + + case push-vlan-action-case { container push-vlan-action { leaf ethernet-type { @@ -190,7 +206,7 @@ module opendaylight-action-types { } leaf tag { // TPID - 16 bits type int32; - } + } leaf pcp { // PCP - 3 bits type int32; } @@ -202,22 +218,24 @@ module opendaylight-action-types { } // leaf tci { //TCI = [PCP + CFI + VID] // } -// leaf header { //header = [TPID + TCI] +// leaf header { //header = [TPID + TCI] // } } } - + case copy-ttl-out-case { container copy-ttl-out { + presence "no content action"; } } - + case copy-ttl-in-case { container copy-ttl-in { + presence "no content action"; } } - + case set-dl-dst-action-case { container set-dl-dst-action { @@ -226,7 +244,7 @@ module opendaylight-action-types { } } } - + case set-dl-src-action-case { container set-dl-src-action { @@ -241,13 +259,13 @@ module opendaylight-action-types { leaf group { type string; } - + leaf group-id { type uint32; } } } - + case set-dl-type-action-case { container set-dl-type-action { leaf dl-type { @@ -255,28 +273,28 @@ module opendaylight-action-types { } } } - + case set-next-hop-action-case { container set-next-hop-action { uses address; } } - + case set-nw-dst-action-case { container set-nw-dst-action { - uses address; + uses address; } } - + case set-nw-src-action-case { container set-nw-src-action { - uses address; + uses address; } } - + case set-nw-tos-action-case { container set-nw-tos-action { @@ -285,13 +303,18 @@ module opendaylight-action-types { } } } - + case set-tp-dst-action-case { container set-tp-dst-action { leaf port { type inet:port-number; - } + } + leaf ip-protocol { + description "IP protocol."; + type uint8; + default 0; + } } } @@ -299,7 +322,12 @@ module opendaylight-action-types { container set-tp-src-action { leaf port { type inet:port-number; - } + } + leaf ip-protocol { + description "IP protocol."; + type uint8; + default 0; + } } } @@ -310,34 +338,36 @@ module opendaylight-action-types { } } } - + case set-vlan-id-action-case { container set-vlan-id-action { leaf vlan-id { type l2t:vlan-id; - } + } } } - + case set-vlan-pcp-action-case { container set-vlan-pcp-action { leaf vlan-pcp { type l2t:vlan-pcp; - } + } } } case strip-vlan-action-case { container strip-vlan-action { + presence "no content action"; } } - case sw-path-action-case { + case sw-path-action-case { container sw-path-action { - } - } + presence "no content action"; + } + } } } } diff --git a/experimental/odp/opendaylight-arbitrary-bitmask-fields.yang b/experimental/odp/opendaylight-arbitrary-bitmask-fields.yang new file mode 100644 index 000000000..4f1692d08 --- /dev/null +++ b/experimental/odp/opendaylight-arbitrary-bitmask-fields.yang @@ -0,0 +1,34 @@ +module opendaylight-arbitrary-bitmask-fields { + namespace "urn:opendaylight:arbitrary:bitmask:fields"; + prefix "mask"; + + import ietf-inet-types {prefix inet; revision-date "2013-07-15";} + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} + + revision "2016-01-30" { + description "Initial revision of match types"; + } + + grouping "ipv4-match-arbitrary-bitmask-fields" { + + leaf ipv4-source-address-no-mask { + description "IPv4 source address with no mask."; + type inet:ipv4-address; + } + + leaf ipv4-destination-address-no-mask { + description "IPv4 destination address with no mask."; + type inet:ipv4-address; + } + + leaf ipv4-source-arbitrary-bitmask { + description "Arbitrary bit mask of IPv4 source address."; + type yang:dotted-quad; + } + + leaf ipv4-destination-arbitrary-bitmask { + description "Arbitrary bit mask of IPv4 destination address."; + type yang:dotted-quad; + } + } +} diff --git a/experimental/odp/opendaylight-direct-statistics.yang b/experimental/odp/opendaylight-direct-statistics.yang new file mode 100644 index 000000000..1025692fe --- /dev/null +++ b/experimental/odp/opendaylight-direct-statistics.yang @@ -0,0 +1,123 @@ +module opendaylight-direct-statistics { + namespace "urn:opendaylight:direct:statistics"; + prefix directstat; + + import yang-ext { prefix ext; revision-date "2013-07-09"; } + import ietf-inet-types { prefix inet; revision-date "2013-07-15"; } + import opendaylight-inventory { prefix inv; revision-date "2013-08-19"; } + import opendaylight-statistics-types { prefix stat-types; revision-date "2013-09-25"; } + + import opendaylight-flow-types { prefix flow-types; revision-date "2013-10-26"; } + import opendaylight-group-types { prefix group-types; revision-date "2013-10-18"; } + import opendaylight-meter-types { prefix meter-types; revision-date "2013-09-18"; } + import opendaylight-queue-types { prefix queue-types; revision-date "2013-09-25"; } + import opendaylight-table-types { prefix table-types; revision-date "2013-10-26"; } + + import opendaylight-flow-statistics { prefix flowstat; revision-date "2013-08-19"; } + import opendaylight-port-statistics { prefix portstat; revision-date "2013-12-14"; } + import opendaylight-queue-statistics { prefix queuestat; revision-date "2013-12-16"; } + + description "Openflow direct statistics polling."; + + revision "2016-05-11" { + description "Initial revision of direct statistics service"; + } + + grouping store-stats-grouping { + description "Store collected statistics to DS/operational"; + + leaf store-stats { + type boolean; + default false; + } + } + + grouping stats-input-common-grouping { + description "Shared input parameters for all rpc statistics (routing context and datastore flag)"; + + uses inv:node-context-ref; + uses store-stats-grouping; + } + + rpc get-flow-statistics { + description "Get statistics for given flow"; + + input { + uses stats-input-common-grouping; + uses flow-types:flow; + } + + output { + uses flowstat:flow-and-statistics-map-list; + } + } + + rpc get-group-statistics { + description "Get statistics for given group"; + + input { + uses stats-input-common-grouping; + + leaf group-id { + type group-types:group-id; + } + } + + output { + uses group-types:group-statistics-reply; + } + } + + rpc get-meter-statistics { + description "Get statistics for given meter"; + + input { + uses stats-input-common-grouping; + + leaf meter-id { + type meter-types:meter-id; + } + } + + output { + uses meter-types:meter-statistics-reply; + } + } + + rpc get-node-connector-statistics { + description "Get statistics for given node connector from the node"; + + input { + uses stats-input-common-grouping; + + leaf node-connector-id { + description "Optional, if omitted, returns statistics for all ports"; + type inv:node-connector-id; + } + } + + output { + uses portstat:node-connector-statistics-and-port-number-map; + } + } + + rpc get-queue-statistics { + description "Get statistics for given queues from given port of the node"; + + input { + uses stats-input-common-grouping; + + leaf node-connector-id { + type inv:node-connector-id; + } + + leaf queue-id { + type queue-types:queue-id; + } + } + + output { + uses queuestat:queue-id-and-statistics-map; + } + } +} diff --git a/experimental/odp/opendaylight-flow-statistics.yang b/experimental/odp/opendaylight-flow-statistics.yang index e0df924a0..68ab1b2d4 100644 --- a/experimental/odp/opendaylight-flow-statistics.yang +++ b/experimental/odp/opendaylight-flow-statistics.yang @@ -9,29 +9,30 @@ module opendaylight-flow-statistics { import opendaylight-table-types {prefix table-types;revision-date "2013-10-26";} import flow-node-inventory {prefix flow-node;revision-date "2013-08-19";} import flow-capable-transaction {prefix tr;} - import ietf-inet-types {prefix inet; revision-date "2010-09-24";} + import ietf-inet-types {prefix inet; revision-date "2013-07-15";} + import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; } + description "Openflow statistics polling."; revision "2013-08-19" { description "Initial revision of flow statistics service"; } - //Augment flow statistics data to the flow-capable-node->table->flow augment "/inv:nodes/inv:node/flow-node:table/flow-node:flow" { ext:augment-identifier "flow-statistics-data"; + description "Openflow flow statistics data into the flow-capable-node->table->flow"; + uses flow-statistics; } grouping flow-statistics { container flow-statistics { - //config "false"; - uses flow-types:flow; uses stat-types:generic-statistics; } } typedef flow-id { - description "flow id"; + description "flow id, TODO:: replace with inv:flow-id."; type inet:uri; } @@ -54,6 +55,7 @@ module opendaylight-flow-statistics { // RPC calls to fetch flow statistics rpc get-all-flows-statistics-from-all-flow-tables { + status deprecated; description "Fetch statistics of all the flow present in all the flow tables of the switch"; input { uses inv:node-context-ref; @@ -66,6 +68,7 @@ module opendaylight-flow-statistics { } rpc get-all-flow-statistics-from-flow-table { + status deprecated; description "Fetch statistics of all the flow present in the specific flow table of the switch"; input { uses inv:node-context-ref; @@ -80,6 +83,7 @@ module opendaylight-flow-statistics { } rpc get-flow-statistics-from-flow-table { + status deprecated; description "Fetch statistics of the specific flow present in the specific flow table of the switch"; input { uses inv:node-context-ref; @@ -92,6 +96,7 @@ module opendaylight-flow-statistics { } notification flows-statistics-update { + status deprecated; description "Flows statistics sent by switch"; leaf moreReplies { type boolean; @@ -103,20 +108,22 @@ module opendaylight-flow-statistics { //Models for aggregate flow statistics collection augment "/inv:nodes/inv:node/flow-node:table" { + status deprecated; ext:augment-identifier "aggregate-flow-statistics-data"; uses aggregate-flow-statistics; } grouping aggregate-flow-statistics { container aggregate-flow-statistics { - //config "false"; uses stat-types:aggregate-flow-statistics; } } // RPC calls to fetch aggregate flow statistics rpc get-aggregate-flow-statistics-from-flow-table-for-all-flows { + status deprecated; description "Fetch aggregate statistics for all the flows present in the specific flow table of the switch"; + input { uses inv:node-context-ref; leaf table-id { @@ -128,22 +135,45 @@ module opendaylight-flow-statistics { uses tr:transaction-aware; } } + rpc get-aggregate-flow-statistics-from-flow-table-for-given-match { - description "Fetch aggregate statistics for all the flow matches to the given match from the given table of the switch"; + description "Fetch aggregate statistics for flows filtered by + - table (eventually all tables) + - match + - port + - group + - cookie + This values are contained in flow (among others). + TODO:: filter values should be modeled more exact - omitting unusable fields."; + input { uses inv:node-context-ref; uses flow-types:flow; } output { - uses stat-types:aggregate-flow-statistics; + list aggregated-flow-statistics { + uses stat-types:aggregate-flow-statistics; + } uses tr:transaction-aware; } } notification aggregate-flow-statistics-update { + status deprecated; + description "Aggregate flow statistics for a table, sent by switch"; uses inv:node; uses stat-types:aggregate-flow-statistics; uses tr:multipart-transaction-aware; } + + augment "/multipart:multipart-reply/multipart:multipart-reply-body" { + case multipart-reply-flow-stats { + uses flow-and-statistics-map-list; + } + + case multipart-reply-flow-aggregate-stats { + uses stat-types:aggregate-flow-statistics; + } + } } diff --git a/experimental/odp/opendaylight-flow-table-statistics.yang b/experimental/odp/opendaylight-flow-table-statistics.yang index 431ef5062..4c069c891 100644 --- a/experimental/odp/opendaylight-flow-table-statistics.yang +++ b/experimental/odp/opendaylight-flow-table-statistics.yang @@ -2,13 +2,15 @@ module opendaylight-flow-table-statistics { namespace "urn:opendaylight:flow:table:statistics"; prefix flowtablestat; - import flow-capable-transaction {prefix tr;} + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} import yang-ext {prefix ext; revision-date "2013-07-09";} import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} import flow-node-inventory {prefix flow-node;revision-date "2013-08-19";} import opendaylight-table-types {prefix table-types;revision-date "2013-10-26";} import opendaylight-statistics-types {prefix stat-types;revision-date "2013-09-25";} - + import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; } + + description "Openflow flow table statistics structures."; contact "Anilkumar Vishnoi @@ -17,22 +19,23 @@ module opendaylight-flow-table-statistics { revision "2013-12-15" { description "Initial revision of flow table statistics model"; } - - //Augment flow table statistics data to the table + augment "/inv:nodes/inv:node/flow-node:table" { + description "Openflow flow table statistics data into the table node."; ext:augment-identifier "flow-table-statistics-data"; uses flow-table-statistics; } - + grouping flow-table-statistics { + description "TODO:: simplify."; container flow-table-statistics { - //config "false"; uses stat-types:generic-table-statistics; } - } - - //RPC calls to fetch flow table statistics + } + grouping flow-table-and-statistics-map { + description "List of flow table and statistic map."; + list flow-table-and-statistics-map { key "table-id"; leaf table-id { @@ -41,9 +44,11 @@ module opendaylight-flow-table-statistics { uses stat-types:generic-table-statistics; } } - + rpc get-flow-tables-statistics { + status deprecated; description "Fetch statistics of all the flow tables present on the tarnet node"; + input { uses inv:node-context-ref; } @@ -52,14 +57,27 @@ module opendaylight-flow-table-statistics { uses tr:transaction-aware; } } - + //Notification to receive table statistics update - + notification flow-table-statistics-update { + status deprecated; description "Receive flow table statistics update"; - + uses inv:node; uses flow-table-and-statistics-map; uses tr:multipart-transaction-aware; } + + augment "/multipart:multipart-reply/multipart:multipart-reply-body" { + case multipart-reply-flow-table-stats { + uses flow-table-and-statistics-map; + } + } + + augment "/multipart:multipart-request/multipart:multipart-request-body" { + case multipart-request-flow-table-stats { + // Empty request case + } + } } diff --git a/experimental/odp/opendaylight-flow-types.yang b/experimental/odp/opendaylight-flow-types.yang index 0d8a0b6f5..a1b0701a8 100644 --- a/experimental/odp/opendaylight-flow-types.yang +++ b/experimental/odp/opendaylight-flow-types.yang @@ -2,24 +2,27 @@ module opendaylight-flow-types { namespace "urn:opendaylight:flow:types"; prefix flow; - import ietf-yang-types {prefix yang; revision-date "2010-09-24";} + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} import opendaylight-match-types {prefix match; revision-date "2013-10-26";} import opendaylight-action-types {prefix action;} import opendaylight-meter-types {prefix meter; revision-date "2013-09-18";} + import openflow-protocol { prefix ofproto; revision-date "2013-07-31"; } + import openflow-types { prefix oft; revision-date "2013-07-31"; } + import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; } revision "2013-10-26" { description "Initial revision of flow service"; } - + typedef flow-ref { type instance-identifier; } - + typedef flow-cookie { description "openflow specific type - flow cookie / flow cookie mask"; type uint64; } - + typedef output-port-values { type enumeration { enum MAX { @@ -58,9 +61,7 @@ module opendaylight-flow-types { grouping instruction-list { list instruction { key "order"; - leaf order { - type int32; - } + uses action:ordered; uses instruction; } } @@ -74,47 +75,47 @@ module opendaylight-flow-types { } } } - + case write-metadata-case { container write-metadata { leaf metadata { type uint64; } - + leaf metadata-mask { type uint64; } } } - + case write-actions-case { container write-actions { uses action:action-list; } } - + case apply-actions-case { container apply-actions { uses action:action-list; } } - + case clear-actions-case { container clear-actions { uses action:action-list; } } - + case meter-case { container meter { leaf meter-id { type meter:meter-id; - } + } } } } } - + typedef flow-mod-flags { type bits { bit CHECK_OVERLAP; @@ -124,77 +125,89 @@ module opendaylight-flow-types { bit SEND_FLOW_REM; } } + typedef removed-flow-reason { + type enumeration { + enum OFPRR_IDLE_TIMEOUT{ + value 0; + description "Flow idle time exceeded idle_timeout."; + } + enum OFPRR_HARD_TIMEOUT { + value 1; + description "Time exceeded hard_timeout."; + } + enum OFPRR_DELETE { + value 2; + description "Evicted by a DELETE flow mod."; + } + enum OFPRR_GROUP_DELETE { + value 3; + description "Group was removed."; + } + + } + } - typedef removed_reason_flags { - type bits { - bit IDLE_TIMEOUT; - bit HARD_TIMEOUT; - bit DELETE; - bit GROUP_DELETE; - } - } - grouping generic_flow_attributes { leaf priority { type uint16; } - + leaf idle-timeout { type uint16; } - + leaf hard-timeout { type uint16; } - + leaf cookie { type flow-cookie; } - + leaf table_id { type uint8; } } - + grouping flow { container match { uses match:match; } - + container instructions { uses instruction-list; - } - + } + uses generic_flow_attributes; - + leaf container-name { - type string; + type string; } - + leaf cookie_mask { type flow-cookie; } - + leaf buffer_id { type uint32; } - + leaf out_port { type uint64; } - + leaf out_group { type uint32; } - + leaf flags { type flow-mod-flags; } - + leaf flow-name { type string; } - + leaf installHw { type boolean; } @@ -232,28 +245,28 @@ module opendaylight-flow-types { grouping flow-table-statistics { leaf active { type yang:counter64; - } + } leaf lookup { type yang:counter64; } leaf matched { - type yang:counter64; + type yang:counter64; } } - + grouping flow-mod-removed { uses generic_flow_attributes; - + leaf removed_reason { - type removed_reason_flags; + type removed-flow-reason; } leaf duration_nsec { type uint32; } - + leaf duration_sec { type uint32; } @@ -265,9 +278,31 @@ module opendaylight-flow-types { leaf byte_count { type uint64; } - + container match { uses match:match; } } + + container flow-message { + uses flow; + uses ofproto:ofHeader; + + leaf command { + type oft:flow-mod-command; + } + } + + augment "/multipart:multipart-request/multipart:multipart-request-body" { + case multipart-request-flow-stats { + container flow-stats { + uses flow; + } + } + case multipart-request-flow-aggregate-stats { + container flow-aggregate-stats { + uses flow; + } + } + } } diff --git a/experimental/odp/opendaylight-group-statistics.yang b/experimental/odp/opendaylight-group-statistics.yang index 777981991..ee3bc86fd 100644 --- a/experimental/odp/opendaylight-group-statistics.yang +++ b/experimental/odp/opendaylight-group-statistics.yang @@ -5,55 +5,62 @@ module opendaylight-group-statistics { import yang-ext {prefix ext; revision-date "2013-07-09";} import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} import opendaylight-group-types {prefix group-types;revision-date "2013-10-18";} - import flow-capable-transaction {prefix tr;} - import flow-node-inventory {prefix fni;} - + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} + import flow-node-inventory {prefix fni; revision-date "2013-08-19";} + import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; } + + description "Openflow group statistics structures."; + contact "Anilkumar Vishnoi Email: avishnoi@in.ibm.com"; - + revision "2013-11-11" { description "Initial revision of group statistics service"; } - + grouping group-statistics { + description "TODO:: simplify"; container group-statistics { - //config "false"; uses group-types:group-statistics; } - } - + } + augment "/inv:nodes/inv:node/fni:group" { + description "Openflow group statistics into group node."; ext:augment-identifier "node-group-statistics"; uses group-statistics; } grouping group-desc { + description "TODO:: simplify"; container group-desc { - //config "false"; uses group-types:group; } } - + augment "/inv:nodes/inv:node/fni:group" { + description "Openflow group description into group node."; ext:augment-identifier "node-group-desc-stats"; uses group-desc; } grouping group-features { - container group-features { - //config "false"; + description "TODO:: simplify"; + container group-features { uses group-types:group-features-reply; } } - + augment "/inv:nodes/inv:node" { + description "Openflow group features into group node."; ext:augment-identifier "node-group-features"; uses group-features; } // RPC calls rpc get-all-group-statistics { + status deprecated; input { uses inv:node-context-ref; } @@ -61,25 +68,24 @@ module opendaylight-group-statistics { uses group-types:group-statistics-reply; uses tr:transaction-aware; } - } - + rpc get-group-statistics { + status deprecated; input { uses inv:node-context-ref; leaf group-id{ type group-types:group-id; } - } output { uses group-types:group-statistics-reply; uses tr:transaction-aware; } - } - + rpc get-group-description { + status deprecated; input { uses inv:node-context-ref; } @@ -88,8 +94,9 @@ module opendaylight-group-statistics { uses tr:transaction-aware; } } - + rpc get-group-features { + status deprecated; input { uses inv:node-context-ref; } @@ -98,25 +105,59 @@ module opendaylight-group-statistics { uses tr:transaction-aware; } } - + //Notification calls - + notification group-statistics-updated { + status deprecated; + uses inv:node; uses group-types:group-statistics-reply; uses tr:multipart-transaction-aware; } - + notification group-desc-stats-updated { + status deprecated; + uses inv:node; uses group-types:group-desc-stats-reply; uses tr:multipart-transaction-aware; } notification group-features-updated { + status deprecated; + uses inv:node; uses group-types:group-features-reply; uses tr:multipart-transaction-aware; } + + augment "/multipart:multipart-reply/multipart:multipart-reply-body" { + case multipart-reply-group-stats { + uses group-types:group-statistics-reply; + } + + case multipart-reply-group-desc { + uses group-types:group-desc-stats-reply; + } + + case multipart-reply-group-features { + uses group-types:group-features-reply; + } + } + + augment "/multipart:multipart-request/multipart:multipart-request-body" { + case multipart-request-group-desc { + // Empty request case + } + case multipart-request-group-features { + // Empty request case + } + case multipart-request-group-stats { + leaf group-id { + type group-types:group-id; + } + } + } } diff --git a/experimental/odp/opendaylight-group-types.yang b/experimental/odp/opendaylight-group-types.yang index ca64ae3d3..e012172a1 100644 --- a/experimental/odp/opendaylight-group-types.yang +++ b/experimental/odp/opendaylight-group-types.yang @@ -2,8 +2,10 @@ module opendaylight-group-types { namespace "urn:opendaylight:group:types"; prefix group; - import ietf-yang-types {prefix yang; revision-date "2010-09-24";} + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} import opendaylight-action-types {prefix action;} + import openflow-protocol { prefix ofproto; revision-date "2013-07-31"; } + import openflow-types { prefix oft; revision-date "2013-07-31"; } revision "2013-10-18" { description "Initial revision of group service"; @@ -214,7 +216,7 @@ module opendaylight-group-types { } } - + grouping group-statistics-reply { list group-stats { @@ -241,6 +243,21 @@ module opendaylight-group-types { uses group; } + + // BE-RECON: Modification for including stale-group for Reconciliation + list stale-group { + key "group-id"; + + uses group; + } + } + + container group-message { + uses group; + uses ofproto:ofHeader; + + leaf command { + type oft:group-mod-command; + } } - } diff --git a/experimental/odp/opendaylight-inventory-config.yang b/experimental/odp/opendaylight-inventory-config.yang deleted file mode 100644 index 1ccdfe874..000000000 --- a/experimental/odp/opendaylight-inventory-config.yang +++ /dev/null @@ -1,21 +0,0 @@ -module opendaylight-inventory-config { - namespace "urn:opendaylight:inventory:config"; - prefix inv-config; - - import yang-ext {prefix ext; revision-date "2013-07-09";} - import opendaylight-inventory {prefix inv; revision-date "2013-08-19";} - - - revision "2013-08-19" { - description "Initial revision of Inventory model"; - } - /** Base structure **/ - container nodes { - list node { - key "id"; - ext:context-instance "node-context"; - - uses inv:node; - } - } -} diff --git a/experimental/odp/opendaylight-inventory.yang b/experimental/odp/opendaylight-inventory.yang index 396206e28..bf025f415 100644 --- a/experimental/odp/opendaylight-inventory.yang +++ b/experimental/odp/opendaylight-inventory.yang @@ -3,15 +3,16 @@ module opendaylight-inventory { prefix inv; import yang-ext {prefix ext; revision-date "2013-07-09";} - import ietf-inet-types {prefix inet; revision-date "2010-09-24";} + import ietf-inet-types {prefix inet; revision-date "2013-07-15";} revision "2013-08-19" { description "Initial revision of Inventory model"; } - - + + typedef support-type { + status deprecated; type enumeration { enum native; enum emulated; @@ -20,44 +21,88 @@ module opendaylight-inventory { } typedef node-id { + status deprecated; type inet:uri; + description "Identifier for a particular node. For example: + + myprotocol: + + myprotocol:12 + + It is a good practice to always lead with a scoping identifier. + In the example above the scoping was 'myprotocol'. In your app you + could use 'myapp' etc."; } typedef node-connector-id { + status deprecated; type inet:uri; + description "Identifier for a particular node-connector. For example: + + myprotocol: + myprotocol:3 + + It is a good practice to always lead with a scoping identifier. + In the example above the scoping was 'myprotocol'. In your app you + could use 'myapp' etc."; + } + //YANG does not have a statement which limits the scope of an instance-identifier to a particular subtree, + //which is why we are using a type capture and not an instance-identifier to define a node-ref and a node-connector-ref. typedef node-ref { + status deprecated; type instance-identifier; + description "A reference that points to an opendaylight-light:nodes/node in the data tree."; } typedef node-connector-ref { + status deprecated; type instance-identifier; + description "A reference that points to an opendaylight-list:nodes/node/{node-id}/node-connector in the data tree."; } identity node-context { - description "Identity used to mark node context"; + status deprecated; + description "A node-context is a classifier for node elements which allows an RPC to provide a service on behalf of a particular element in the data tree."; } identity node-connector-context { - description "Identity used to mark node connector context"; + status deprecated; + description "A node-connector-context is a classifier for node-connector elements which allows an RPC to provide a service on behalf of a particular element in the data tree."; } + //We are defining a base identity here because there are limitations with yang enums. Yang doesn't allow you to extend enumeratations. + //Therefore by defining a base identity we allow other yang files to extend this identity to define additional "enumerations". By + //using node-type as their base they are able to pass their object to fields that accept "node-types" while uniquely describing their + //type of node, such as "router-node" or "switch-node" etc. + //See https://wiki.opendaylight.org/view/YANG_Tools:YANG_to_Java_Mapping#Identity for more information. identity node-type { - description "Base identity for node types"; + status deprecated; + description "A base identity definition which represents a generic node type and can be extended in other yang files."; } identity node-connector-type { - description "Base identity for node connectors type"; + status deprecated; + description "A base identity definition which represents a generic node connector type and can be extended in other yang files."; } grouping node { + status deprecated; + description "Describes the contents of a generic node - + essentially an ID and a list of node-connectors. + Acts as an augmentation point where other yang files + can add additional information."; + leaf id { type node-id; + description "The unique identifier for the node."; } list "node-connector" { key "id"; + + description "A list of node connectors that belong this node."; ext:context-instance "node-connector-context"; uses node-connector; @@ -65,55 +110,117 @@ module opendaylight-inventory { } grouping node-connector { + status deprecated; + description "Describes a generic node connector which consists of an ID. + Acts as an augmentation point where other yang files can + add additional information."; + leaf id { type node-connector-id; + description "The unique identifier for the node-connector."; } } grouping node-context-ref { - description - "Helper grouping which contains a reference to node context."; + status deprecated; + description + "A helper grouping which contains a reference to a node classified with a node-context. This allows RPCs in other yang files to refine their input to a particular node instance."; + leaf node { ext:context-reference "node-context"; type node-ref; + description "A reference to a particular node."; } } /** Base structure **/ container nodes { + status deprecated; + description "The root container of all nodes."; + list node { key "id"; ext:context-instance "node-context"; - - uses node; + description "A list of nodes (as defined by the 'grouping node')."; + uses node; //this refers to the 'grouping node' defined above. } } + //The following notifications should really be replaced by direct writes to the data tree with data change listeners listening to those changes. + //Notifications should be reserved for one time events which do not require persistence to the data tree. notification node-updated { + status deprecated; + + description "A notification sent by someone who realized there was a modification to a node, but did not modify the data tree. + Describes that something on the node has been updated (including addition of a new node), but is for + whatever reason is not modifying the data tree. + + Deprecated: If a process determines that a node was updated, then that + logic should update the node using the DataBroker directly. Listeners interested + update changes should register a data change listener for notifications on removals."; + leaf node-ref { ext:context-reference "node-context"; + description "A reference to the node which changed."; + type node-ref; } uses node; } notification node-connector-updated { + + status deprecated; + + description "A notification sent by someone who realized there was a modification to a node-connector, but did not modify the data tree. + Describes that something on the node-connector has been updated (including addition of a new node-connector), but is for + whatever reason is not modifying the data tree. + + Deprecated: If a process determines that a node-connector was updated, then that + logic should update the node-connector using the DataBroker directly. Listeners interested + update changes should register a data change listener for notifications on removals."; + leaf node-connector-ref { ext:context-reference "node-connector-context"; type node-connector-ref; + description "A reference to the node-connector which changed."; } uses node-connector; } notification node-removed { + + status deprecated; + + description "A notification sent by someone who realized there was a node was removed, but did not modify the data tree. + Describes that a node has been removed but is for + whatever reason is not modifying the data tree. + + Deprecated: If a process determines that a node was removed, then that + logic should remove the node from the DataBroker directly. Listeners interested + in changes should register a data change listener for notifications on removals."; + leaf node-ref { + description "A reference to the node that was removed."; ext:context-reference "node-context"; type node-ref; } } notification node-connector-removed { + + status deprecated; + + description "A notification sent by someone who realized there was a node-connector was removed, but did not modify the data tree. + Describes that a node-connector has been removed but is for + whatever reason is not modifying the data tree. + + Deprecated: If a process determines that a node-connector was removed, then that + logic should remove the node-connector from the DataBroker directly. Listeners interested + in changes should register a data change listener for notifications on removals."; + leaf node-connector-ref { + description "A reference to the node-connector that was removed."; ext:context-reference "node-connector-context"; type node-connector-ref; } diff --git a/experimental/odp/opendaylight-ipv6-arbitrary-bitmask-fields.yang b/experimental/odp/opendaylight-ipv6-arbitrary-bitmask-fields.yang new file mode 100644 index 000000000..a2f182073 --- /dev/null +++ b/experimental/odp/opendaylight-ipv6-arbitrary-bitmask-fields.yang @@ -0,0 +1,50 @@ +module opendaylight-ipv6-arbitrary-bitmask-fields { + namespace "urn:opendaylight:opendaylight-ipv6-arbitrary-bitmask-fields"; + prefix "ipv6-arbitrary-bitmask"; + + import ietf-inet-types {prefix inet; revision-date "2013-07-15";} + + + revision 2016-02-24 { + description "Initial revision"; + } + + typedef ipv6-arbitrary-mask { + type string { + pattern + '(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,7}:|' + + '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' + + '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' + + '([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|' + + '([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|' + + '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' + + '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' + + ':((:[0-9a-fA-F]{1,4}){1,7}|:))'; + } + } + + grouping "ipv6-match-arbitrary-bitmask-fields" { + + leaf ipv6-source-address-no-mask { + description "IPv6 source address with no mask."; + type inet:ipv6-address; + } + + leaf ipv6-source-arbitrary-bitmask { + description "Arbitrary bit mask of IPv6 source address."; + type ipv6-arbitrary-mask; + } + + leaf ipv6-destination-address-no-mask { + description "IPv6 destination address with no mask."; + type inet:ipv6-address; + } + + leaf ipv6-destination-arbitrary-bitmask { + description "Arbitrary bit mask of IPv6 destination address."; + type ipv6-arbitrary-mask; + } + } + +} \ No newline at end of file diff --git a/experimental/odp/opendaylight-match-types.yang b/experimental/odp/opendaylight-match-types.yang index 591202bb6..86a5d13df 100644 --- a/experimental/odp/opendaylight-match-types.yang +++ b/experimental/odp/opendaylight-match-types.yang @@ -2,10 +2,12 @@ module opendaylight-match-types { namespace "urn:opendaylight:model:match:types"; prefix "match"; - import ietf-inet-types {prefix inet; revision-date "2010-09-24";} - import ietf-yang-types {prefix yang; revision-date "2010-09-24";} + import ietf-inet-types {prefix inet; revision-date "2013-07-15";} + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} import opendaylight-l2-types {prefix l2t;revision-date "2013-08-27";} import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + import opendaylight-arbitrary-bitmask-fields {prefix mask; revision-date "2016-01-30";} + import opendaylight-ipv6-arbitrary-bitmask-fields {prefix ipv6-arbitrary-mask; revision-date "2016-02-24";} revision "2013-10-26" { description "Initial revision of match types"; @@ -31,6 +33,16 @@ module opendaylight-match-types { } } + grouping packet-type-fields { + leaf packet-type { + description + "Outermost header type of a packet. It's a 4 byte + value, the 2 most significant bytes are the + namespace and the next 2 bytes are the type."; + type uint32; + } + } + /** Match Groupings **/ grouping "ethernet-match-fields" { container ethernet-source { @@ -269,6 +281,28 @@ module opendaylight-match-types { } } + grouping "tcp-flags-match-fields" { + leaf tcp-flags { + description "Tcp flags for match"; + type uint16; + } + leaf tcp-flags-mask { + description "Mask for tcp flags"; + type uint16; + } + } + + grouping "tunnel-ipv4-match-fields" { + leaf tunnel-ipv4-source { + description "IPv4 source tunnel endpoint address."; + type inet:ipv4-prefix; + } + leaf tunnel-ipv4-destination { + description "IPv4 destination tunnel endpoint address."; + type inet:ipv4-prefix; + } + } + grouping match { leaf in-port { type inv:node-connector-id; @@ -278,6 +312,10 @@ module opendaylight-match-types { type inv:node-connector-id; } + container packet-type-match { + uses packet-type-fields; + } + container "metadata" { uses of-metadata; } @@ -309,12 +347,21 @@ module opendaylight-match-types { case "ipv4-match" { uses "ipv4-match-fields"; } + case "ipv4-match-arbitrary-bit-mask"{ + uses "mask:ipv4-match-arbitrary-bitmask-fields"; + } case "ipv6-match" { uses "ipv6-match-fields"; } + case "ipv6-match-arbitrary-bit-mask"{ + uses ipv6-arbitrary-mask:ipv6-match-arbitrary-bitmask-fields; + } case "arp-match" { uses "arp-match-fields"; } + case "tunnel-ipv4-match" { + uses "tunnel-ipv4-match-fields"; + } } choice layer-4-match { @@ -340,5 +387,9 @@ module opendaylight-match-types { container "protocol-match-fields" { uses "protocol-match-fields"; } + + container tcp-flags-match { + uses "tcp-flags-match-fields"; + } } } diff --git a/experimental/odp/opendaylight-md-sal-binding.yang b/experimental/odp/opendaylight-md-sal-binding.yang deleted file mode 100644 index 1dee3662f..000000000 --- a/experimental/odp/opendaylight-md-sal-binding.yang +++ /dev/null @@ -1,46 +0,0 @@ -module opendaylight-md-sal-binding { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding"; - prefix "md-sal-binding"; - - import config { prefix config; revision-date 2013-04-05; } - - description - "Service definition for Binding Aware MD-SAL."; - - revision "2013-10-28" { - description - "Initial revision"; - } - - identity binding-broker-osgi-registry { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.binding.api.BindingAwareBroker"; - } - - identity binding-data-broker { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.binding.api.data.DataProviderService"; - } - - identity binding-data-consumer-broker { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.binding.api.data.DataBrokerService"; - } - - identity binding-rpc-registry { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"; - } - - identity binding-notification-service { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.binding.api.NotificationProviderService"; - } - - identity binding-notification-subscription-service { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.binding.api.NotificationService"; - } - -} diff --git a/experimental/odp/opendaylight-md-sal-common.yang b/experimental/odp/opendaylight-md-sal-common.yang deleted file mode 100644 index 020b6ef47..000000000 --- a/experimental/odp/opendaylight-md-sal-common.yang +++ /dev/null @@ -1,71 +0,0 @@ -module opendaylight-md-sal-common { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:common"; - prefix "md-sal-common"; - - description - "Common definition for MD-SAL."; - - revision "2013-10-28" { - description - "Initial revision"; - } - - grouping rpc-routing-table { - - leaf routing-context { - type string; - } - list routes { - leaf path { - type string; - } - leaf destination { - type string; - } - } - - } - - grouping rpc-router { - leaf module { - type string; - } - container routing-tables { - list routing-table { - uses rpc-routing-table; - } - } - } - - grouping rpc-state { - list rpc-router { - uses rpc-router; - } - } - - grouping notification-state { - container notifications { - leaf published { - type uint32; - } - } - } - - grouping data-state { - container transactions { - leaf created { - type uint32; - } - leaf submitted { - type uint32; - } - leaf successful { - type uint32; - } - leaf failed { - type uint32; - } - } - } -} diff --git a/experimental/odp/opendaylight-md-sal-dom.yang b/experimental/odp/opendaylight-md-sal-dom.yang deleted file mode 100644 index ee2fb8b0b..000000000 --- a/experimental/odp/opendaylight-md-sal-dom.yang +++ /dev/null @@ -1,40 +0,0 @@ -module opendaylight-md-sal-dom { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom"; - prefix "md-sal-dom"; - - import config { prefix config; revision-date 2013-04-05; } - - description - "Service definition for Binding Aware MD-SAL."; - - revision "2013-10-28" { - description - "Initial revision"; - } - - identity dom-broker-osgi-registry { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.core.api.Broker"; - } - - identity dom-data-broker { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.core.api.data.DataProviderService"; - } - - identity dom-async-data-broker { - base "config:service-type"; - config:java-class "org.opendaylight.controller.md.sal.dom.api.DOMDataBroker"; - } - - identity dom-data-store { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.core.api.data.DataStore"; - } - - identity schema-service { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.core.api.model.SchemaService"; - } -} diff --git a/experimental/odp/opendaylight-md-sal-remote.yang b/experimental/odp/opendaylight-md-sal-remote.yang index f475a86a5..994e07003 100644 --- a/experimental/odp/opendaylight-md-sal-remote.yang +++ b/experimental/odp/opendaylight-md-sal-remote.yang @@ -1,9 +1,8 @@ module sal-remote { - yang-version 1; + yang-version 1; namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote"; prefix "sal-remote"; - organization "Cisco Systems, Inc."; contact "Martin Bobak "; @@ -87,12 +86,12 @@ module sal-remote { } } - rpc begin-transaction{ - output{ + rpc begin-transaction { + output { anyxml data-modification-transaction{ description "DataModificationTransaction xml"; } } } -} +} \ No newline at end of file diff --git a/experimental/odp/opendaylight-meter-statistics.yang b/experimental/odp/opendaylight-meter-statistics.yang index 0055dc39b..a41176e7d 100644 --- a/experimental/odp/opendaylight-meter-statistics.yang +++ b/experimental/odp/opendaylight-meter-statistics.yang @@ -5,9 +5,12 @@ module opendaylight-meter-statistics { import yang-ext {prefix ext; revision-date "2013-07-09";} import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} import flow-node-inventory {prefix flow-node;revision-date "2013-08-19";} - import opendaylight-meter-types {prefix meter-types;revision-date "2013-09-18";} - import flow-capable-transaction {prefix tr;} - + import opendaylight-meter-types {prefix meter-types; revision-date "2013-09-18";} + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} + import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; } + + description "Openflowplugin meter statistics structures."; + contact "Anilkumar Vishnoi Email: avishnoi@in.ibm.com"; @@ -17,31 +20,33 @@ module opendaylight-meter-statistics { } augment "/inv:nodes/inv:node/flow-node:meter" { + description "Openflow meter statistics data into the meter node."; ext:augment-identifier "node-meter-statistics"; container meter-statistics { - //config "false"; uses meter-types:meter-statistics; } } augment "/inv:nodes/inv:node/flow-node:meter" { + description "Openflow meter config statistics data into the meter node."; ext:augment-identifier "node-meter-config-stats"; container meter-config-stats { - //config "false"; uses meter-types:meter; } } - + augment "/inv:nodes/inv:node" { + description "Openflow meter features data into the inventory node node."; ext:augment-identifier "node-meter-features"; container meter-features { - //config "false"; uses meter-types:meter-features-reply; } } // RPC calls rpc get-all-meter-statistics { + status deprecated; + input { uses inv:node-context-ref; } @@ -49,10 +54,12 @@ module opendaylight-meter-statistics { uses meter-types:meter-statistics-reply; uses tr:transaction-aware; } - + } - + rpc get-meter-statistics { + status deprecated; + input { uses inv:node-context-ref; leaf meter-id{ @@ -63,10 +70,12 @@ module opendaylight-meter-statistics { uses meter-types:meter-statistics-reply; uses tr:transaction-aware; } - + } - + rpc get-all-meter-config-statistics { + status deprecated; + input { uses inv:node-context-ref; } @@ -75,8 +84,10 @@ module opendaylight-meter-statistics { uses tr:transaction-aware; } } - + rpc get-meter-features { + status deprecated; + input { uses inv:node-context-ref; } @@ -85,25 +96,61 @@ module opendaylight-meter-statistics { uses tr:transaction-aware; } } - + //Notification calls - + notification meter-statistics-updated { + status deprecated; + uses inv:node; uses meter-types:meter-statistics-reply; uses tr:multipart-transaction-aware; } - + notification meter-config-stats-updated { + status deprecated; + uses inv:node; uses meter-types:meter-config-stats-reply; uses tr:multipart-transaction-aware; } notification meter-features-updated { + status deprecated; + uses inv:node; uses meter-types:meter-features-reply; uses tr:multipart-transaction-aware; } + + augment "/multipart:multipart-reply/multipart:multipart-reply-body" { + case multipart-reply-meter-stats { + uses meter-types:meter-statistics-reply; + } + + case multipart-reply-meter-config { + uses meter-types:meter-config-stats-reply; + } + + case multipart-reply-meter-features { + uses meter-types:meter-features-reply; + } + } + + augment "/multipart:multipart-request/multipart:multipart-request-body" { + case multipart-request-meter-config { + leaf meter-id { + type meter-types:meter-id; + } + } + case multipart-request-meter-features { + // Empty request case + } + case multipart-request-meter-stats { + leaf meter-id { + type meter-types:meter-id; + } + } + } } diff --git a/experimental/odp/opendaylight-meter-types.yang b/experimental/odp/opendaylight-meter-types.yang index 6d1405019..7845c43df 100644 --- a/experimental/odp/opendaylight-meter-types.yang +++ b/experimental/odp/opendaylight-meter-types.yang @@ -2,7 +2,9 @@ module opendaylight-meter-types { namespace "urn:opendaylight:meter:types"; prefix meter; - import ietf-yang-types {prefix yang; revision-date "2010-09-24";} + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} + import openflow-protocol { prefix ofproto; revision-date "2013-07-31"; } + import openflow-types { prefix oft; revision-date "2013-07-31"; } revision "2013-09-18" { @@ -94,13 +96,18 @@ module opendaylight-meter-types { type uint32; } - leaf perc_level { + leaf prec_level { description "Number of drop precedence level to add"; type uint8; } } case experimenter { + leaf experimenter-type { + description "Meter band type"; + type meter-band-type; + } + leaf experimenter-rate { description "Rate for remarking packets"; type uint32; @@ -277,5 +284,14 @@ module opendaylight-meter-types { grouping meter-features-reply { uses meter-features; } + + container meter-message { + uses meter; + uses ofproto:ofHeader; + + leaf command { + type oft:meter-mod-command; + } + } } diff --git a/experimental/odp/opendaylight-multipart-types.yang b/experimental/odp/opendaylight-multipart-types.yang new file mode 100644 index 000000000..5696ae5b5 --- /dev/null +++ b/experimental/odp/opendaylight-multipart-types.yang @@ -0,0 +1,33 @@ +module opendaylight-multipart-types { + namespace "urn:opendaylight:multipart:types"; + prefix multipart; + + import openflow-protocol { prefix ofproto; revision-date "2013-07-31"; } + + revision "2017-01-12" { + description "Initial revision"; + } + + grouping multipart-header { + uses ofproto:ofHeader; + + leaf request-more { + type boolean; + default false; + } + } + + container multipart-reply { + uses multipart-header; + + choice multipart-reply-body { + } + } + + container multipart-request { + uses multipart-header; + + choice multipart-request-body { + } + } +} diff --git a/experimental/odp/opendaylight-port-statistics.yang b/experimental/odp/opendaylight-port-statistics.yang index e711877a0..16cf660c2 100644 --- a/experimental/odp/opendaylight-port-statistics.yang +++ b/experimental/odp/opendaylight-port-statistics.yang @@ -2,10 +2,13 @@ module opendaylight-port-statistics { namespace "urn:opendaylight:port:statistics"; prefix portstat; - import flow-capable-transaction {prefix tr;} + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} import yang-ext {prefix ext; revision-date "2013-07-09";} import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} import opendaylight-statistics-types {prefix stat-types;revision-date "2013-09-25";} + import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; } + + description "Openflow port statistics structures."; contact "Anilkumar Vishnoi @@ -17,19 +20,22 @@ module opendaylight-port-statistics { //Augment port statistics data to the flow-capable-node-connector augment "/inv:nodes/inv:node/inv:node-connector" { + description "Openflow port statistics data into the node connector node."; ext:augment-identifier "flow-capable-node-connector-statistics-data"; uses flow-capable-node-connector-statistics; } - + grouping flow-capable-node-connector-statistics { + description "TODO:: simplify"; container flow-capable-node-connector-statistics { - //config "false"; uses stat-types:node-connector-statistics; } } - + // RPC calls rpc get-all-node-connectors-statistics { + status deprecated; + description "Get statistics for all node connectors from the node"; input { uses inv:node-context-ref; @@ -41,6 +47,8 @@ module opendaylight-port-statistics { } rpc get-node-connector-statistics { + status deprecated; + description "Get statistics for given node connector from the node"; input { uses inv:node-context-ref; @@ -67,8 +75,24 @@ module opendaylight-port-statistics { } notification node-connector-statistics-update { + status deprecated; + uses inv:node; uses node-connector-statistics-and-port-number-map; uses tr:multipart-transaction-aware; } + + augment "/multipart:multipart-reply/multipart:multipart-reply-body" { + case multipart-reply-port-stats { + uses node-connector-statistics-and-port-number-map; + } + } + + augment "/multipart:multipart-request/multipart:multipart-request-body" { + case multipart-request-port-stats { + leaf node-connector-id { + type inv:node-connector-id; + } + } + } } diff --git a/experimental/odp/opendaylight-port-types.yang b/experimental/odp/opendaylight-port-types.yang index f1cbd8dc2..fa6e1fcdf 100644 --- a/experimental/odp/opendaylight-port-types.yang +++ b/experimental/odp/opendaylight-port-types.yang @@ -2,13 +2,15 @@ module opendaylight-port-types { namespace "urn:opendaylight:flow:types:port"; prefix port-types; - import ietf-yang-types {prefix yang; revision-date "2010-09-24";} + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} import opendaylight-queue-types {prefix queue-types; revision-date "2013-09-25";} - + import openflow-protocol { prefix ofproto; revision-date "2013-07-31"; } + import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; } + revision "2013-09-25" { description "Initial revision of Port Inventory model"; } - + typedef port-reason { type enumeration { enum add; @@ -16,7 +18,7 @@ module opendaylight-port-types { enum update; } } - + typedef port-config { type bits { bit PORT-DOWN; @@ -25,19 +27,19 @@ module opendaylight-port-types { bit NO-PACKET-IN; } } - + grouping port-state { leaf link-down { type boolean; } leaf blocked { type boolean; - } + } leaf live { type boolean; } } - + typedef port-features { type bits { bit ten-mb-hd; @@ -58,116 +60,148 @@ module opendaylight-port-types { bit pause-asym; } } - + + typedef port-number-uni { + description "Union port number: 4B number / string (reserved port name)"; + type union { + type uint32; + type string; + } + } + grouping common-port { leaf port-number { - type uint32; + type port-number-uni; } - + leaf hardware-address { type yang:mac-address; description "MAC Address of the port"; - + } - + leaf configuration { type port-config; - description "Bit map of OFPPC-* flags"; + description "Bit map of OFPPC-* flags"; } - + leaf advertised-features { type port-features; - description "Features being advertised by the port"; + description "Features being advertised by the port"; + } + } + + grouping common-port-with-mask { + uses common-port; + + leaf mask { + type port-config; + description "Bitmap of OFPPC-* flags to be changed"; } } - + grouping flow-port-status { leaf reason { type port-reason; } - + uses flow-capable-port; } - + grouping queues { list queue { key "queue-id"; uses queue-types:queue-packet; } } - - grouping flow-capable-port { - + + grouping flow-capable-port { + uses common-port; - + leaf name { type string; - description "Human readable name of the port"; + description "Human readable name of the port"; } - + container state { uses port-state; - description "Description of state of port"; + description "Description of state of port"; } - + leaf current-feature { type port-features; - description "Bit map of OFPPF-* flags"; - } - + description "Bit map of OFPPF-* flags"; + } + leaf supported { type port-features; - description "Features supported by the port"; + description "Features supported by the port"; } - + leaf peer-features { type port-features; - description "Features advertised by peer"; + description "Features advertised by peer"; } - + leaf current-speed { type uint32; units "kbps"; - description "Current port bit rate in kbps"; + description "Current port bit rate in kbps"; } - + leaf maximum-speed { type uint32; units "kbps"; - description "Max port bit rate in kbps"; + description "Max port bit rate in kbps"; } - + uses queues; - } - + } + grouping port-mod { container port { list port { key "port-mod-order"; leaf port-mod-order { type uint32; - } - - uses common-port; - - leaf mask { - type port-config; - description "Bitmap of OFPPC-* flags to be changed"; - } - + } + + uses common-port-with-mask; + leaf container-name { - type string; + type string; } - + leaf port-name { - type string; - } + type string; + } leaf barrier { - type boolean; - } - } - } + type boolean; + } + } + } + } + + container port-message { + uses common-port-with-mask; + uses ofproto:ofHeader; + } + + augment "/multipart:multipart-reply/multipart:multipart-reply-body" { + case multipart-reply-port-desc { + list ports { + uses flow-capable-port; + } + } + } + + + augment "/multipart:multipart-request/multipart:multipart-request-body" { + case multipart-request-port-desc { + // Empty case + } } } diff --git a/experimental/odp/opendaylight-queue-statistics.yang b/experimental/odp/opendaylight-queue-statistics.yang index caf52aa9e..aaf3bd9fa 100644 --- a/experimental/odp/opendaylight-queue-statistics.yang +++ b/experimental/odp/opendaylight-queue-statistics.yang @@ -2,12 +2,15 @@ module opendaylight-queue-statistics { namespace "urn:opendaylight:queue:statistics"; prefix queuestat; - import flow-capable-transaction {prefix tr;} + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} import yang-ext {prefix ext; revision-date "2013-07-09";} import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} import flow-node-inventory {prefix flow-node;revision-date "2013-08-19";} import opendaylight-queue-types {prefix queue-types;revision-date "2013-09-25";} import opendaylight-statistics-types {prefix stat-types;revision-date "2013-09-25";} + import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; } + + description "Openflowplugin queue statistics structures."; contact "Anilkumar Vishnoi @@ -16,20 +19,21 @@ module opendaylight-queue-statistics { revision "2013-12-16" { description "Initial revision of queue statistics model"; } - + //Augment queue statistics data to the flow-capable-node-connector augment "/inv:nodes/inv:node/inv:node-connector/flow-node:queue" { + description "Openflow queue statistics data into the queue node."; ext:augment-identifier "flow-capable-node-connector-queue-statistics-data"; uses flow-capable-node-connector-queue-statistics; } - + grouping flow-capable-node-connector-queue-statistics { + description "TODO::simplify;"; container flow-capable-node-connector-queue-statistics { - //config "false"; uses stat-types:generic-queue-statistics; } - } - + } + //RPC calls to fetch queue statistics grouping queue-id-and-statistics-map { list queue-id-and-statistics-map { @@ -40,13 +44,15 @@ module opendaylight-queue-statistics { leaf node-connector-id { type inv:node-connector-id; } - + uses stat-types:generic-queue-statistics; } } - + rpc get-all-queues-statistics-from-all-ports { + status deprecated; description "Get statistics for all the queues attached to all the ports from the node"; + input { uses inv:node-context-ref; } @@ -55,9 +61,11 @@ module opendaylight-queue-statistics { uses tr:transaction-aware; } } - + rpc get-all-queues-statistics-from-given-port { + status deprecated; description "Get statistics for all queues for given port of the node"; + input { uses inv:node-context-ref; leaf node-connector-id { @@ -69,9 +77,11 @@ module opendaylight-queue-statistics { uses tr:transaction-aware; } } - + rpc get-queue-statistics-from-given-port { + status deprecated; description "Get statistics for given queues from given port of the node"; + input { uses inv:node-context-ref; leaf node-connector-id { @@ -90,8 +100,28 @@ module opendaylight-queue-statistics { //Notification for port statistics update notification queue-statistics-update { + status deprecated; + uses inv:node; uses queue-id-and-statistics-map; uses tr:multipart-transaction-aware; } + + augment "/multipart:multipart-reply/multipart:multipart-reply-body" { + case multipart-reply-queue-stats { + uses queue-id-and-statistics-map; + } + } + + augment "/multipart:multipart-request/multipart:multipart-request-body" { + case multipart-request-queue-stats { + leaf queue-id { + type queue-types:queue-id; + } + + leaf node-connector-id { + type inv:node-connector-id; + } + } + } } diff --git a/experimental/odp/opendaylight-queue-types.yang b/experimental/odp/opendaylight-queue-types.yang index cdcf0ecf1..dce8bfddb 100644 --- a/experimental/odp/opendaylight-queue-types.yang +++ b/experimental/odp/opendaylight-queue-types.yang @@ -2,77 +2,84 @@ module opendaylight-queue-types { namespace "urn:opendaylight:flow:types:queue"; prefix queue-types; - import ietf-yang-types {prefix yang; revision-date "2010-09-24";} - + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} + revision "2013-09-25" { description "Initial revision of Queue Inventory model"; } - + typedef queue-id { type yang:counter32; - description "id for the specific queue."; + description "id for the specific queue."; } - + typedef queue-properties { + description "Content of OFPQT_*."; type enumeration { - enum min_rate; - enum max_rate; + enum min_rate { + description "OFPQT_MIN_RATE"; + } + enum max_rate { + description "OFPQT_MAX_RATE"; + } + enum experimenter { + description "OFPQT_EXPERIMENTER"; + } } } - - - grouping common-queue { + + grouping common-queue { leaf property { type uint16; - description "One of OFPQT_."; + description "One of OFPQT_. TODO:: use queue-properties type."; } - } - - - grouping queue-prop-min-rate { - - uses common-queue; - + + + grouping queue-prop-min-rate { + status deprecated; + + uses common-queue; + leaf rate { type uint16; - description "OFPQT_MIN, len: 16"; + description "OFPQT_MIN, len: 16"; } - } - - grouping queue-prop-max-rate { - - uses common-queue; - + + grouping queue-prop-max-rate { + status deprecated; + + uses common-queue; + leaf rate { type uint16; - description "OFPQT_MAX, len: 16"; + description "OFPQT_MAX, len: 16"; } - } - grouping queue-packet { - - + + grouping queue-packet { + description "Openflow queue description structure."; + leaf queue-id { type queue-id; - description "id for the specific queue."; + description "id for the specific queue."; } leaf port { type uint32; - description "Port this queue is attached to."; + description "Port this queue is attached to."; } uses common-queue; } - - grouping queue-config-request - { - leaf port { + + grouping queue-config-request { + status deprecated; + + leaf port { type uint32; - description "Port to be queried."; + description "Port to be queried."; } - } } diff --git a/experimental/odp/opendaylight-statistics-types.yang b/experimental/odp/opendaylight-statistics-types.yang index 19d6eafa7..d3e8d39db 100644 --- a/experimental/odp/opendaylight-statistics-types.yang +++ b/experimental/odp/opendaylight-statistics-types.yang @@ -2,13 +2,17 @@ module opendaylight-statistics-types { namespace "urn:opendaylight:model:statistics:types"; prefix stat-types; - import ietf-yang-types {prefix yang; revision-date "2010-09-24";} - + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} + + description "Openflowplugin statistics common types."; + revision "2013-09-25" { description "Initial revision of flow service"; } - + grouping duration { + description "Duration, contains seconds and nanoseconds."; + container duration { leaf second { type yang:counter32; @@ -20,7 +24,9 @@ module opendaylight-statistics-types { } grouping node-connector-statistics { - container packets { + description "Openflow node connector (port) statistics structure."; + + container packets { leaf received { type uint64; } @@ -62,9 +68,10 @@ module opendaylight-statistics-types { } uses duration; } - + grouping generic-statistics { - description "Generic grouping for statistics"; + description "Generic grouping for statistics"; + leaf packet-count { type yang:counter64; } @@ -72,24 +79,26 @@ module opendaylight-statistics-types { leaf byte-count { type yang:counter64; } - uses duration; - } - + uses duration; + } + grouping generic-table-statistics { - description "Generic grouping holding generic statistics related to switch table"; - leaf active-flows { + description "Generic grouping holding generic statistics related to switch table"; + + leaf active-flows { type yang:counter32; - } - leaf packets-looked-up { - type yang:counter64; - } - leaf packets-matched { - type yang:counter64; - } + } + leaf packets-looked-up { + type yang:counter64; + } + leaf packets-matched { + type yang:counter64; + } } - + grouping aggregate-flow-statistics { - description "Aggregate flow statistics"; + description "Aggregate flow statistics"; + leaf packet-count { type yang:counter64; } @@ -101,21 +110,21 @@ module opendaylight-statistics-types { type yang:counter32; } } - + grouping generic-queue-statistics { - description "Generic statistics of switch port attached queues."; - leaf transmitted-bytes { - type yang:counter64; - } - - leaf transmitted-packets { - type yang:counter64; - } - - leaf transmission-errors { - type yang:counter64; - } - uses duration; + description "Generic statistics of switch port attached queues."; + + leaf transmitted-bytes { + type yang:counter64; + } + + leaf transmitted-packets { + type yang:counter64; + } + + leaf transmission-errors { + type yang:counter64; + } + uses duration; } - } diff --git a/experimental/odp/opendaylight-table-types.yang b/experimental/odp/opendaylight-table-types.yang index e74b54834..f67159bfb 100644 --- a/experimental/odp/opendaylight-table-types.yang +++ b/experimental/odp/opendaylight-table-types.yang @@ -4,6 +4,7 @@ module opendaylight-table-types { import opendaylight-flow-types {prefix flow;revision-date "2013-10-26";} import opendaylight-action-types {prefix action;} + import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; } revision "2013-10-26" { description "Initial revision of table service"; @@ -16,7 +17,7 @@ module opendaylight-table-types { typedef table-ref { type instance-identifier; } - + typedef table-config { type bits { bit DEPRECATED-MASK; @@ -188,7 +189,19 @@ module opendaylight-table-types { base match-field; description "Match for IPv6 Extension Header pseudo-field"; } - + identity tcp_flags { + base match-field; + description "TCP Flags Match"; + } + identity tunnel_ipv4_dst { + base match-field; + description "IPv4 destination tunnel endpoint address."; + } + identity tunnel_ipv4_src { + base match-field; + description "IPv4 source tunnel endpoint address."; + } + grouping set-field-match { list set-field-match { key "match-type"; @@ -199,144 +212,154 @@ module opendaylight-table-types { } leaf has-mask { type boolean; - } + } } } - + grouping table-feature-prop-type { choice table-feature-prop-type { - case instructions { + case instructions { container instructions { uses flow:instruction-list; - } + } } - - case instructions-miss { + + case instructions-miss { container instructions-miss { uses flow:instruction-list; - } + } } - case next-table { + case next-table { container tables { leaf-list table-ids { type uint8; } - } + } } - - case next-table-miss { + + case next-table-miss { container tables-miss { leaf-list table-ids { type uint8; } - } + } } - - case write-actions { + + case write-actions { container write-actions { uses action:action-list; - } + } } - - case write-actions-miss { + + case write-actions-miss { container write-actions-miss { uses action:action-list; - } + } } - - case apply-actions { + + case apply-actions { container apply-actions { uses action:action-list; - } + } } - - case apply-actions-miss { + + case apply-actions-miss { container apply-actions-miss { uses action:action-list; - } + } } - + case match { container match-setfield { - uses set-field-match; + uses set-field-match; } } - - case wildcards { + + case wildcards { container wildcard-setfield { uses set-field-match; } } - - case write-setfield { + + case write-setfield { container write-setfield { uses set-field-match; } } - - case write-setfield-miss { + + case write-setfield-miss { container write-setfield-miss { uses set-field-match; } } - - case apply-setfield { + + case apply-setfield { container apply-setfield { - uses set-field-match; + uses set-field-match; } } - - case apply-setfield-miss { + + case apply-setfield-miss { container apply-setfield-miss { - uses set-field-match; + uses set-field-match; } } } - } - + } + grouping table-features { list table-features { key "table-id"; - + leaf table-id { type uint8; - } - + } + leaf name { description "Name of the table"; - type string; + type string; } - + leaf metadata-match { description "Bits of metadata table can match"; - type uint64; + type uint64; } - + leaf metadata-write { description "Bits of metadata table can write"; - type uint64; + type uint64; } - + leaf max-entries { description "Max number of entries supported"; - type uint32; + type uint32; } - + leaf config { description "Bitmap of OFPTC_ values"; type table-config; } - + container table-properties { list table-feature-properties { key "order"; - leaf order { - type int32; - } + uses action:ordered; uses table-feature-prop-type; } } } - } + } + + augment "/multipart:multipart-reply/multipart:multipart-reply-body" { + case multipart-reply-table-features { + uses table-features; + } + } + + augment "/multipart:multipart-request/multipart:multipart-request-body" { + case multipart-request-table-features { + uses table-features; + } + } } diff --git a/experimental/odp/openflow-action.yang b/experimental/odp/openflow-action.yang new file mode 100644 index 000000000..d2ae42f68 --- /dev/null +++ b/experimental/odp/openflow-action.yang @@ -0,0 +1,211 @@ +/* + * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + + module openflow-action { + namespace "urn:opendaylight:openflow:common:action"; + prefix "ofaction"; + + import ietf-inet-types {prefix inet;} + import ietf-yang-types {prefix yang;} + + import openflow-types { prefix oft; } + import openflow-extensible-match { prefix oxm;} + + revision "2015-02-03" { + description "#NOT_PUBLISHED# OpenFlow 1.3 - action model"; + } + + identity experimenter-action-sub-type { + description "The base identity for vendor's actions."; + } + + container action-container { + uses action-grouping; + } + + grouping actions-grouping { + list action { + uses action-grouping; + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + + grouping action-grouping { + choice action-choice { + case output-action-case { + container output-action { + leaf port { + type oft:port-number; + } + leaf max-length { + type uint16; + } + } + } + case copy-ttl-out-case { + // empty action + } + case copy-ttl-in-case { + // empty action + } + case set-mpls-ttl-case { + container set-mpls-ttl-action { + leaf mpls-ttl { + type uint8; + } + } + } + case dec-mpls-ttl-case { + // empty action + } + case push-vlan-case { + container push-vlan-action { + leaf ethertype { + type oft:ether-type; + } + } + } + case pop-vlan-case { + // empty action + } + case push-mpls-case { + container push-mpls-action { + leaf ethertype { + type oft:ether-type; + } + } + } + case pop-mpls-case { + container pop-mpls-action { + leaf ethertype { + type oft:ether-type; + } + } + } + case set-queue-case { + container set-queue-action { + leaf queue-id { + type uint32; + } + } + } + case group-case { + container group-action { + leaf group-id { + type uint32; + } + } + } + case set-nw-ttl-case { + container set-nw-ttl-action { + leaf nw-ttl { + type uint8; + } + } + } + case dec-nw-ttl-case { + // empty action + } + case set-field-case { + container set-field-action { + uses oxm:match-entries-grouping; + } + } + case push-pbb-case { + container push-pbb-action { + leaf ethertype { + type oft:ether-type; + } + } + } + case pop-pbb-case { + // empty action + } + // OF1.0 structures + case set-vlan-vid-case { + container set-vlan-vid-action { + leaf vlan-vid { + type uint16; + } + } + } + case set-vlan-pcp-case { + container set-vlan-pcp-action { + leaf vlan-pcp { + type uint8; + } + } + } + case strip-vlan-case { + // empty action + } + case set-dl-src-case { + container set-dl-src-action { + leaf dl-src-address { + type yang:mac-address; + } + } + } + case set-dl-dst-case { + container set-dl-dst-action { + leaf dl-dst-address { + type yang:mac-address; + } + } + } + case set-nw-src-case { + container set-nw-src-action { + leaf ip-address { + type inet:ipv4-address; + } + } + } + case set-nw-dst-case { + container set-nw-dst-action { + leaf ip-address { + type inet:ipv4-address; + } + } + } + case set-nw-tos-case { + container set-nw-tos-action { + leaf nw-tos { + type uint8; + } + } + } + case set-tp-src-case { + container set-tp-src-action { + leaf port { + type oft:port-number; + } + } + } + case set-tp-dst-case { + container set-tp-dst-action { + leaf port { + type oft:port-number; + } + } + } + case enqueue-case { + container enqueue-action { + leaf port { + type oft:port-number; + } + leaf queue-id { + type oft:queue-id; + } + } + } + } + } + +} diff --git a/experimental/odp/openflow-approved-extensions.yang b/experimental/odp/openflow-approved-extensions.yang new file mode 100644 index 000000000..29a203511 --- /dev/null +++ b/experimental/odp/openflow-approved-extensions.yang @@ -0,0 +1,32 @@ +module openflow-approved-extensions { + namespace "urn:opendaylight:openflow:approved:extensions"; + prefix "ofext"; + + import yang-ext {prefix ext;} + import openflow-extensible-match {prefix oxm;} + import openflow-augments {prefix aug;} + + revision "2016-08-02" { + description "Openflow approved extensions definition"; + } + + //ONF Approved OpenFlow Extensions + // Extension 109 - TCP FLAGS + identity tcp_flags { + base oxm:match-field; + description "TCP flags from the TCP header"; + } + + augment "/oxm:oxm-container/oxm:match-entry-value/aug:experimenter-id-case" { + ext:augment-identifier "tcp-flags-container"; + container tcp-flags { + leaf flags { + type uint16; + } + leaf mask { + type binary; + } + } + } + +} \ No newline at end of file diff --git a/experimental/odp/openflow-augments.yang b/experimental/odp/openflow-augments.yang new file mode 100755 index 000000000..4a60c37e3 --- /dev/null +++ b/experimental/odp/openflow-augments.yang @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + + module openflow-augments { + namespace "urn:opendaylight:openflow:augments"; + prefix "aug"; + + import yang-ext {prefix ext;} + import ietf-inet-types {prefix inet;} + import ietf-yang-types {prefix yang;} + + import openflow-types {prefix oft;} + import openflow-protocol {prefix ofproto;} + import openflow-action {prefix ofaction;} + import openflow-instruction {prefix ofinstruction;} + import openflow-extensible-match {prefix oxm;} + + revision "2015-02-25" { + description "#NOT_PUBLISHED# OpenFlow 1.3 - augments model. + Please visit + https://wiki.opendaylight.org/view/File:OpenFlow_Protocol_Library_-_Project_documentation.pdf + - Augmentation Tables chapter"; + } + +// OFP_MATCH AUGMENTS + augment "/oxm:oxm-container/oxm:match-entry-value" { + ext:augment-identifier "experimenter-id-match-entry"; + case experimenter-id-case { + container experimenter { + leaf experimenter { + type oft:experimenter-id; + } + } + } + } + +// OFP_ACTION AUGMENTS + augment "/ofaction:action-container/ofaction:action-choice" { + ext:augment-identifier "experimenter-id-action"; + case experimenter-id-case { + container experimenter { + leaf experimenter { + type oft:experimenter-id; + } + leaf sub-type { + type identityref { + base ofaction:experimenter-action-sub-type; + } + } + } + } + } + +// OFP_TABLE_FEATURES_PROPERTIES AUGMENTS + augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" { + ext:augment-identifier "instruction-related-table-feature-property"; + uses ofinstruction:instructions-grouping; + } + augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" { + ext:augment-identifier "next-table-related-table-feature-property"; + list next-table-ids { + config false; + leaf table-id { + type uint8; + } + } + } + augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" { + ext:augment-identifier "action-related-table-feature-property"; + uses ofaction:actions-grouping; + } + augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" { + ext:augment-identifier "oxm-related-table-feature-property"; + uses oxm:match-entries-grouping; + } + augment "/ofproto:table-features-properties-container/ofproto:table-feature-properties" { + ext:augment-identifier "experimenter-id-table-feature-property"; + leaf experimenter { + type oft:experimenter-id; + } + leaf exp-type { + type uint32; + } + } + +// OFP_INSTRUCTION AUGMENTS + augment "/ofinstruction:instruction-container/ofinstruction:instruction-choice" { + case experimenter-id-case { + container experimenter { + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + } + +// OFP_QUEUE_PROP AUGMENTS + augment "/ofproto:queue-prop-container/ofproto:queue-property" { + ext:augment-identifier "rate-queue-property"; + leaf rate { + type uint16; + } + } + augment "/ofproto:queue-prop-container/ofproto:queue-property" { + ext:augment-identifier "experimenter-id-queue-property"; + leaf experimenter { + type oft:experimenter-id; + } + } + +// OFP_ERROR_AUGMENTS (only experimenter till OpenFlow v1.3) + augment "/ofproto:error-message" { + ext:augment-identifier "experimenter-id-error"; + leaf experimenter { + type oft:experimenter-id; + } + } + +// OFP_METER_BAND AUGMENTS + augment "/ofproto:meter-band-container/ofproto:meter-band/ofproto:meter-band-experimenter-case/ofproto:meter-band-experimenter" { + ext:augment-identifier "experimenter-id-meter-band"; + leaf experimenter { + type oft:experimenter-id; + } + leaf sub-type { + type identityref { + base oft:experimenter-meter-band-sub-type; + } + } + } +} diff --git a/experimental/odp/openflow-configuration.yang b/experimental/odp/openflow-configuration.yang new file mode 100644 index 000000000..790a151b6 --- /dev/null +++ b/experimental/odp/openflow-configuration.yang @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + + module openflow-configuration { + namespace "urn:opendaylight:openflow:config"; + prefix "of-config"; + + revision "2014-06-30" { + description "Library configuration classes"; + } + + typedef path-type { + type enumeration { + enum CLASSPATH { + value 0; + description "Keystore file is located on classpath."; + } + enum PATH { + value 1; + description "Keystore file is located on absolute or relative path."; + } + } + } + + typedef keystore-type { + type enumeration { + enum JKS { + value 0; + description "Keystore type - JKS."; + } + enum PKCS12 { + value 1; + description "Keystore type - PKCS12."; + } + } + } + + typedef transport-protocol { + type enumeration { + enum TCP { + value 0; + description "Communication over TCP protocol."; + } + enum TLS { + value 1; + description "Communication over TLS protocol."; + } + enum UDP { + value 2; + description "Communication over UDP protocol."; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/openflow-extensible-match.yang b/experimental/odp/openflow-extensible-match.yang new file mode 100644 index 000000000..a093a56e0 --- /dev/null +++ b/experimental/odp/openflow-extensible-match.yang @@ -0,0 +1,673 @@ +/* + * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + + module openflow-extensible-match { + namespace "urn:opendaylight:openflow:oxm"; + prefix "oxm"; + + import ietf-yang-types {prefix yang;} + import ietf-inet-types {prefix inet;} + import openflow-types {prefix oft;} + + revision "2015-02-25" { + description "#NOT_PUBLISHED# OpenFlow 1.3 - match model"; + } + + identity oxm-match-type { + description + "The OpenFlow Extensible Match type must be supported by all OpenFlow + switches."; + base oft:match-type-base; + } + + // oxm classes + identity oxm-class-base { + description "Base identity for OXM classes"; + } + + identity nxm-0-class { + description "Match class for backward compatibility with NXM"; + base oxm-class-base; + } + identity nxm-1-class { + description "Match class for backward compatibility with NXM"; + base oxm-class-base; + } + identity openflow-basic-class { + description "Basic class for OpenFlow"; + base oxm-class-base; + } + identity experimenter-class { + description + "Marks Experimenter match type class. + All experimenter match classes MUST use this class as a base."; + base oxm-class-base; + } + + // match-field types + identity match-field { + description "Base identity for OXM Fields"; + } + + identity in_port { + base match-field; + description "OXM field for Switch input port."; + } + identity in_phy_port { + base match-field; + description "OXM field for Switch physical input port."; + } + identity metadata { + base match-field; + description "OXM field for Metadata passed between tables."; + } + identity packet_type { + base match-field; + description "OXM field for Packet type."; + } + identity eth_dst { + base match-field; + description "OXM field for Ethernet destination address."; + } + identity eth_src { + base match-field; + description "OXM field for Ethernet source address."; + } + identity eth_type { + base match-field; + description "OXM field for Ethernet frame type."; + } + identity vlan_vid { + base match-field; + description "OXM field for VLAN id."; + } + identity vlan_pcp { + base match-field; + description "OXM field for VLAN priority."; + } + identity ip_dscp { + base match-field; + description "OXM field for IP DSCP (6 bits in ToS field)."; + } + identity ip_ecn { + base match-field; + description "OXM field for IP ECN (2 bits in ToS field)."; + } + identity ip_proto { + base match-field; + description "OXM field for IP protocol."; + } + identity ipv4_src { + base match-field; + description "OXM field for IPv4 source address."; + } + identity ipv4_dst { + base match-field; + description "OXM field for IPv4 destination address."; + } + identity tcp_src { + base match-field; + description "OXM field for TCP source port."; + } + identity tcp_dst { + base match-field; + description "OXM field for TCP destination port."; + } + identity udp_src { + base match-field; + description "OXM field for UDP source port."; + } + identity udp_dst { + base match-field; + description "OXM field for UDP destination port."; + } + identity sctp_src { + base match-field; + description "OXM field for SCTP source port."; + } + identity sctp_dst { + base match-field; + description "OXM field for SCTP destination port."; + } + identity icmpv4_type { + base match-field; + description "OXM field for ICMP type."; + } + identity icmpv4_code { + base match-field; + description "OXM field for ICMP code."; + } + identity arp_op { + base match-field; + description "OXM field for ARP opcode."; + } + identity arp_spa { + base match-field; + description "OXM field for ARP source IPv4 address."; + } + identity arp_tpa { + base match-field; + description "OXM field for ARP target IPv4 address."; + } + identity arp_sha { + base match-field; + description "OXM field for ARP source hardware address."; + } + identity arp_tha { + base match-field; + description "OXM field for ARP target hardware address."; + } + identity ipv6_src { + base match-field; + description "OXM field for IPv6 source address."; + } + identity ipv6_dst { + base match-field; + description "OXM field for IPv6 destination address."; + } + identity ipv6_flabel { + base match-field; + description "OXM field for IPv6 Flow Label"; + } + identity icmpv6_type { + base match-field; + description "OXM field for ICMPv6 type."; + } + identity icmpv6_code { + base match-field; + description "OXM field for ICMPv6 code."; + } + identity ipv6_nd_target { + base match-field; + description "OXM field for Target address for ND."; + } + identity ipv6_nd_sll { + base match-field; + description "OXM field for Source link-layer for ND."; + } + identity ipv6_nd_tll { + base match-field; + description "OXM field for Target link-layer for ND."; + } + identity mpls_label { + base match-field; + description "OXM field for MPLS label."; + } + identity mpls_tc { + base match-field; + description "OXM field for MPLS TC."; + } + identity mpls_bos { + base match-field; + description "OXM field for MPLS BoS bit."; + } + identity pbb_isid { + base match-field; + description "OXM field for PBB I-SID."; + } + identity tunnel_id { + base match-field; + description "OXM field for Logical Port Metadata"; + } + identity ipv6_exthdr { + base match-field; + description "OXM field for IPv6 Extension Header pseudo-field"; + } + + grouping match-grouping { + container match { + description "Match structure (OF v1.3)"; + leaf type { + type identityref { + base oft:match-type-base; + } + } + uses match-entries-grouping; + } + } + + grouping match-entries-grouping { + list match-entry { + config false; + uses match-entry-fields-grouping; + uses match-entry-value-grouping; + } + } + + grouping match-entry-fields-grouping { + leaf oxm-class { + type identityref { + base oxm-class-base; + } + } + leaf oxm-match-field { + type identityref { + base match-field; + } + } + leaf has-mask { + type boolean; + } + } + + container oxm-container { + uses match-entry-value-grouping; + } + + grouping match-entry-value-grouping { + choice match-entry-value { + case in-port-case { + container in-port { + leaf port-number { + type oft:port-number; + } + } + } + case in-phy-port-case { + container in-phy-port { + leaf port-number { + type oft:port-number; + } + } + } + case metadata-case { + container metadata { + leaf metadata { + type binary; + } + leaf mask { + type binary; + } + } + } + case packet-type-case { + container packet-type { + leaf packet-type { + type uint32; + } + } + } + case eth-src-case { + container eth-src { + leaf mac-address { + type yang:mac-address; + } + leaf mask { + type binary; + } + } + } + case eth-dst-case { + container eth-dst { + leaf mac-address { + type yang:mac-address; + } + leaf mask { + type binary; + } + } + } + case eth-type-case { + container eth-type { + leaf eth-type { + type oft:ether-type; + } + } + } + case vlan-vid-case { + container vlan-vid { + leaf vlan-vid { + type uint16; + } + leaf cfi-bit { + type boolean; + } + leaf mask { + type binary; + } + } + } + case vlan-pcp-case { + container vlan-pcp { + leaf vlan-pcp { + type uint8; + } + } + } + case ip-dscp-case { + container ip-dscp { + leaf dscp { + type inet:dscp; + } + } + } + case ip-ecn-case { + container ip-ecn { + leaf ecn { + type uint8; + } + } + } + case ip-proto-case { + container ip-proto { + leaf protocol-number { + type uint8; + } + } + } + case ipv4-src-case { + container ipv4-src { + leaf ipv4-address { + type inet:ipv4-address; + } + leaf mask { + type binary; + } + } + } + case ipv4-dst-case { + container ipv4-dst { + leaf ipv4-address { + type inet:ipv4-address; + } + leaf mask { + type binary; + } + } + } + case tcp-src-case { + container tcp-src { + leaf port { + type inet:port-number; + } + } + } + case tcp-dst-case { + container tcp-dst { + leaf port { + type inet:port-number; + } + } + } + case udp-src-case { + container udp-src { + leaf port { + type inet:port-number; + } + } + } + case udp-dst-case { + container udp-dst { + leaf port { + type inet:port-number; + } + } + } + case sctp-src-case { + container sctp-src { + leaf port { + type inet:port-number; + } + } + } + case sctp-dst-case { + container sctp-dst { + leaf port { + type inet:port-number; + } + } + } + case icmpv4-type-case { + container icmpv4-type { + leaf icmpv4-type { + type uint8; + } + } + } + case icmpv4-code-case { + container icmpv4-code { + leaf icmpv4-code { + type uint8; + } + } + } + case arp-op-case { + container arp-op { + leaf op-code { + type uint16; + } + } + } + case arp-spa-case { + container arp-spa { + leaf ipv4-address { + type inet:ipv4-address; + } + leaf mask { + type binary; + } + } + } + case arp-tpa-case { + container arp-tpa { + leaf ipv4-address { + type inet:ipv4-address; + } + leaf mask { + type binary; + } + } + } + case arp-sha-case { + container arp-sha { + leaf mac-address { + type yang:mac-address; + } + leaf mask { + type binary; + } + } + } + case arp-tha-case { + container arp-tha { + leaf mac-address { + type yang:mac-address; + } + leaf mask { + type binary; + } + } + } + case ipv6-src-case { + container ipv6-src { + leaf ipv6-address { + type inet:ipv6-address; + } + leaf mask { + type binary; + } + } + } + case ipv6-dst-case { + container ipv6-dst { + leaf ipv6-address { + type inet:ipv6-address; + } + leaf mask { + type binary; + } + } + } + case ipv6-flabel-case { + container ipv6-flabel { + leaf ipv6-flabel { + type inet:ipv6-flow-label; + } + leaf mask { + type binary; + } + } + } + case icmpv6-type-case { + container icmpv6-type { + leaf icmpv6-type { + type uint8; + } + } + } + case icmpv6-code-case { + container icmpv6-code { + leaf icmpv6-code { + type uint8; + } + } + } + case ipv6-nd-target-case { + container ipv6-nd-target { + leaf ipv6-address { + type inet:ipv6-address; + } + } + } + case ipv6-nd-sll-case { + container ipv6-nd-sll { + leaf mac-address { + type yang:mac-address; + } + } + } + case ipv6-nd-tll-case { + container ipv6-nd-tll { + leaf mac-address { + type yang:mac-address; + } + } + } + case mpls-label-case { + container mpls-label { + leaf mpls-label { + type uint32; + } + } + } + case mpls-tc-case { + container mpls-tc { + leaf tc { + type uint8; + } + } + } + case mpls-bos-case { + container mpls-bos { + leaf bos { + type boolean; + } + } + } + case pbb-isid-case { + container pbb-isid { + leaf isid { + type uint32; + } + leaf mask { + type binary; + } + } + } + case tunnel-id-case { + container tunnel-id { + leaf tunnel-id { + type binary; + } + leaf mask { + type binary; + } + } + } + case ipv6-exthdr-case { + container ipv6-exthdr { + leaf pseudo-field { + type oft:ipv6-exthdr-flags; + } + leaf mask { + type binary; + } + } + } + } + } + + // OF1.0 structures + grouping match-v10-grouping { + container match-v10 { + description "OF v1.0 match structure"; + leaf wildcards { + description "Wildcard fields (only flags)."; + type oft:flow-wildcards-v10; + } + leaf nw-src-mask { + description "IP source address mask (definition differs from OF v1.0.0 spec to ease + understanding, library does the transformation into OF v1.0 spec correct data)"; + type uint8; + } + leaf nw-dst-mask { + description "IP destination address mask (definition differs from OF v1.0.0 spec to ease + understanding, library does the transformation into OF v1.0 spec correct data)"; + type uint8; + } + leaf in-port { + description "Input switch port."; + type uint16; + } + leaf dl-src { + description "Ethernet source address."; + type yang:mac-address; + } + leaf dl-dst { + description "Ethernet destination address."; + type yang:mac-address; + } + leaf dl-vlan { + description "Input VLAN id."; + type uint16; + } + leaf dl-vlan-pcp { + description "Input VLAN priority."; + type uint8; + } + leaf dl-type { + description "Ethernet frame type."; + type uint16; + } + leaf nw-tos { + description "IP ToS (actually DSCP field, 6 bits)."; + type uint8; + } + leaf nw-proto { + description "IP protocol or lower 8 bits of ARP opcode."; + type uint8; + } + leaf nw-src { + description "IP source address."; + type inet:ipv4-address; + } + leaf nw-dst { + description "IP destination address."; + type inet:ipv4-address; + } + leaf tp-src { + description "TCP/UDP source port."; + type uint16; + } + leaf tp-dst { + description "TCP/UDP destination port."; + type uint16; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/openflow-instruction.yang b/experimental/odp/openflow-instruction.yang new file mode 100644 index 000000000..b9e515b3a --- /dev/null +++ b/experimental/odp/openflow-instruction.yang @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + + module openflow-instruction { + namespace "urn:opendaylight:openflow:common:instruction"; + prefix "ofinstruction"; + + import openflow-types { prefix oft; } + import openflow-action {prefix ofaction;} + + revision "2013-07-31" { + description "#NOT_PUBLISHED# OpenFlow 1.3 - instruction model"; + } + + container instruction-container { + uses instruction-grouping; + } + + grouping instructions-grouping { + list instruction { + config false; + uses instruction-grouping; + leaf experimenter-id { + type oft:experimenter-id; + } + } + } + + grouping instruction-grouping { + choice instruction-choice { + case goto-table-case { + container goto-table { + leaf table-id { + type uint8; + } + } + } + case write-metadata-case { + container write-metadata { + leaf metadata { + type binary; + } + leaf metadata-mask { + type binary; + } + } + } + case write-actions-case { + container write-actions { + uses ofaction:actions-grouping; + } + } + case apply-actions-case { + container apply-actions { + uses ofaction:actions-grouping; + } + } + case clear-actions-case { + // empty instruction + } + case meter-case { + container meter { + leaf meter-id { + type uint32; + } + } + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/openflow-protocol.yang b/experimental/odp/openflow-protocol.yang new file mode 100644 index 000000000..7e42a2b9b --- /dev/null +++ b/experimental/odp/openflow-protocol.yang @@ -0,0 +1,1438 @@ +/* + * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + + module openflow-protocol { + namespace "urn:opendaylight:openflow:protocol"; + prefix "ofproto"; + + import ietf-yang-types {prefix yang;} + + import openflow-types {prefix oft;} + import openflow-extensible-match { prefix oxm;} + import openflow-instruction { prefix ofinstruction;} + import openflow-action {prefix ofaction;} + + revision "2013-07-31" { + description "#NOT_PUBLISHED# OpenFlow 1.3 - protocol objects model"; + } + + // Generic Structures + grouping port-grouping { + reference "ofp_port"; + leaf port-no { + type uint32; + } + leaf hw-addr { + type yang:mac-address; + } + leaf name { + type string; + } + leaf config { + description "Bitmap of OFPPC_* flags."; + type oft:port-config; + } + leaf state { + description "Bitmap of OFPPS_* flags."; + type oft:port-state; + } + leaf current-features { + description "Current features."; + type oft:port-features; + } + leaf advertised-features { + description "Features being advertised by the port."; + type oft:port-features; + } + leaf supported-features { + description "Features supported by the port."; + type oft:port-features; + } + leaf peer-features { + description "Features advertised by peer."; + type oft:port-features; + } + leaf curr-speed { + description "Current port bitrate in kbps."; + type uint32; + units "kbps"; + } + leaf max-speed { + description "Max port bitrate in kbps"; + type uint32; + units "kbps"; + } + + // OF1.0 structures + leaf config-v10 { + type oft:port-config-v10; + } + leaf state-v10 { + type oft:port-state-v10; + } + leaf current-features-v10 { + description "Current features."; + type oft:port-features-v10; + } + leaf advertised-features-v10 { + description "Features being advertised by the port."; + type oft:port-features-v10; + } + leaf supported-features-v10 { + description "Features supported by the port."; + type oft:port-features-v10; + } + leaf peer-features-v10 { + description "Features advertised by peer."; + type oft:port-features-v10; + } + } + + grouping buckets-grouping { + list buckets-list { + uses bucket-grouping; + } + } + + grouping bucket-grouping { + description "Bucket for use in groups."; + leaf weight { + description "Relative weight of bucket. Only + defined for select groups."; + type uint16; + } + leaf watch-port { + description "Port whose state affects whether this + bucket is live. Only required for fast + failover groups."; + type oft:port-number; + } + leaf watch-group { + description "Group whose state affects whether this + bucket is live. Only required for fast + failover groups."; + type uint32; + } + + uses ofaction:actions-grouping; + } + + container table-features-properties-container { + uses table-features-properties-grouping; + } + + grouping table-features-properties-grouping { + list table-feature-properties { + config false; + leaf type { + type oft:table-features-prop-type; + } + } + } + + // # MESSAGE Structures + /* Immutable messages. */ + grouping ofHeader { + reference "ofp_header struct in Openflow Switch 1.3 Spec"; + leaf version { + type uint8; + description "OpenFlow version"; + } + leaf xid { + type uint32; + description "Transaction ID"; + } + } + grouping ofHelloElementHeader { + reference "ofpt_hello_elem_header struct in Openflow Switch 1.3 Spec"; + leaf type { + type oft:hello-element-type; + //reference "OpenFlow Header element type - OFPHET_*"; + } + } + grouping hello { + reference "OFPT_HELLO message in Openflow Switch 1.3 Spec"; + /* Symmetric message */ + uses ofHeader; + + list elements { + uses ofHelloElementHeader; + + leaf-list version-bitmap { + type boolean; + } + } + } + grouping error { + reference "OFPT_ERROR message in Openflow Switch 1.3 Spec"; + /* Symmetric message */ + uses ofHeader; + + leaf type { + type uint16; + } + leaf code { + type uint16; + } + leaf type-string { + type string; + } + leaf code-string { + type string; + } + leaf data { + type binary; + } + } + grouping echo-request { + reference "OFPT_ECHO_REQUEST message in Openflow Switch 1.3 Spec"; + /* Symmetric message */ + uses ofHeader; + + leaf data { + type binary; + } + } + grouping echo-reply { + reference "OFPT_ECHO_REPLY message in Openflow Switch 1.3 Spec"; + /* Symmetric message */ + uses ofHeader; + + leaf data { + type binary; + } + } + + grouping experimenter-core { + description "General experimenter message content suitable for symmetric and multipart message"; + leaf experimenter { + type oft:experimenter-id; + } + leaf exp_type { + type uint32; + } + choice experimenter-data-of-choice { + // to be augmented by vendors + } + } + grouping experimenter-of-message { + reference "OFPT_EXPERIMENTER message in Openflow Switch 1.3 Spec"; + /* Symmetric message */ + uses ofHeader; + uses experimenter-core; + } + + /* Switch configuration messages. */ + grouping features-request { + reference "OFPT_FEATURES_REQUEST message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + uses ofHeader; + } + grouping features-reply { + reference "OFPT_FEATURES_REPLY message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + uses ofHeader; + + leaf datapathId { + type uint64; + } + leaf buffers { + type uint32; + } + leaf tables { + type uint8; + } + leaf auxiliaryId { + type uint8; + } + leaf capabilities { + type oft:capabilities; + } + leaf reserved { + type uint32; + } + // OF1.0 structures + leaf capabilities-v10 { + type oft:capabilities-v10; + } + leaf actions-v10 { + type oft:action-type-v10; + } + list phy-port { + uses port-grouping; + } + } + grouping get-config-request { + reference "OFPT_GET_CONFIG_REQUEST message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + uses ofHeader; + } + grouping get-config-reply { + reference "OFPT_GET_CONFIG_REPLY message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + uses ofHeader; + + leaf flags { + type oft:switch-config-flag; + } + leaf miss-send-len { + type uint16; + } + } + grouping set-config { + reference "OFPT_SET_CONFIG message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + leaf flags { + type oft:switch-config-flag; + } + leaf miss-send-len { + type uint16; + } + } + /* Asynchronous messages. */ + grouping packet-in { + reference "OFPT_PACKET_IN message in Openflow Switch 1.3 Spec"; + /* Async message */ + + uses ofHeader; + + leaf buffer-id { + // ID assigned by datapath. + type uint32; + } + leaf total-len { + // Full length of frame. + type uint16; + } + leaf reason { + // Reason packet is being sent (one of OFPR_*) + type oft:packet-in-reason; + } + leaf table-id { + // ID of the table that was looked up + type oft:table-id; + } + leaf cookie { + // Cookie of the flow entry that was looked up. + type uint64; + } + uses oxm:match-grouping; + + leaf data { + type binary; + } + + // OF1.0 structures + leaf in-port { + type uint16; + } + } + grouping flow-removed { + reference "OFPT_FLOW_REMOVED message in Openflow Switch 1.3 Spec"; + /* Async message */ + uses ofHeader; + + leaf cookie { + type uint64; + } + leaf priority { + type uint16; + } + leaf reason { + type oft:flow-removed-reason; + } + leaf table-id { + type oft:table-id; + } + leaf duration-sec { + type uint32; + } + leaf duration-nsec { + type uint32; + } + leaf idle-timeout { + type uint16; + } + leaf hard-timeout { + type uint16; + } + leaf packet-count { + type uint64; + } + leaf byte-count { + type uint64; + } + uses oxm:match-grouping; + + // OF1.0 structures + uses oxm:match-v10-grouping; + } + grouping port-status { + reference "OFPT_PORT_STATUS message in Openflow Switch 1.3 Spec"; + + uses ofHeader; + + uses port-grouping; + + leaf reason { + type oft:port-reason; + } + } + /* Controller command messages. */ + grouping packet-out { + reference "OFPT_PACKET_OUT message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + uses ofaction:actions-grouping; + leaf data { + type binary; + } + leaf buffer-id { + type uint32; + } + leaf in-port { + type oft:port-number; + } + } + grouping flow-mod { + reference "OFPT_FLOW_MOD message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + leaf cookie { + type uint64; + } + leaf cookie-mask { + type uint64; + } + leaf table-id { + type oft:table-id; + } + leaf command { + type oft:flow-mod-command; + } + leaf idle-timeout { + type uint16; + } + leaf hard-timeout { + type uint16; + } + leaf priority { + type uint16; + } + leaf buffer-id { + type uint32; + } + leaf out-port { + type oft:port-number; + } + leaf out-group { + type uint32; + } + leaf flags { + type oft:flow-mod-flags; + } + uses oxm:match-grouping; + + uses ofinstruction:instructions-grouping; + + // OF1.0 structures + leaf flags-v10 { + type oft:flow-mod-flags-v10; + } + uses oxm:match-v10-grouping; + uses ofaction:actions-grouping; + } + grouping group-mod { + reference "OFPT_GROUP_MOD message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + leaf command { + type oft:group-mod-command; + } + leaf type { + type oft:group-type; + } + leaf group-id { + type oft:group-id; + } + + uses buckets-grouping; + } + + grouping port-mod { + reference "OFPT_PORT_MOD message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + leaf port-no { + type oft:port-number; + } + leaf hw-address { + type yang:mac-address; + } + leaf config { + type oft:port-config; + } + leaf mask { + type oft:port-config; + } + leaf advertise { + type oft:port-features; + } + // OF1.0 structures + leaf config-v10 { + type oft:port-config-v10; + } + leaf mask-v10 { + type oft:port-config-v10; + } + leaf advertise-v10 { + type oft:port-features-v10; + } + } + grouping table-mod { + reference "OFPT_TABLE_MOD message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + leaf table-id { + type oft:table-id; + } + leaf config { + type oft:table-config; + } + } + + /* Multipart messages. */ + grouping multipart-request { + reference "OFPT_MULTIPART_REQUEST message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + leaf type { + type oft:multipart-type; + } + leaf flags { + type oft:multipart-request-flags; + } + choice multipart-request-body { + case multipart-request-desc-case { + container multipart-request-desc { + leaf empty { + type empty; + } + } + } + case multipart-request-flow-case { + container multipart-request-flow { + leaf table-id { + type uint8; + } + leaf out-port { + type uint32; + } + leaf out-group { + type uint32; + } + leaf cookie { + type uint64; + } + leaf cookie-mask { + type uint64; + } + uses oxm:match-grouping; + + // OF1.0 structures + uses oxm:match-v10-grouping; + } + } + case multipart-request-aggregate-case { + container multipart-request-aggregate { + leaf table-id { + type uint8; + } + leaf out-port { + type uint32; + } + leaf out-group { + type uint32; + } + leaf cookie { + type uint64; + } + leaf cookie-mask { + type uint64; + } + uses oxm:match-grouping; + + // OF1.0 structures + uses oxm:match-v10-grouping; + } + } + case multipart-request-table-case { + container multipart-request-table { + leaf empty { + type empty; + } + } + } + case multipart-request-port-stats-case { + container multipart-request-port-stats { + leaf port-no { + type uint32; + } + } + } + case multipart-request-queue-case { + container multipart-request-queue { + leaf port-no { + type uint32; + } + leaf queue-id { + type uint32; + } + } + } + case multipart-request-group-case { + container multipart-request-group { + leaf group-id { + type oft:group-id; + } + } + } + case multipart-request-group-desc-case { + container multipart-request-group-desc { + leaf empty { + type empty; + } + } + } + case multipart-request-group-features-case { + container multipart-request-group-features { + leaf empty { + type empty; + } + } + } + case multipart-request-meter-case { + container multipart-request-meter { + leaf meter-id { + type oft:meter-id; + } + } + } + case multipart-request-meter-config-case { + container multipart-request-meter-config { + leaf meter-id { + type oft:meter-id; + } + } + } + case multipart-request-meter-features-case { + container multipart-request-meter-features { + leaf empty { + type empty; + } + } + } + case multipart-request-table-features-case { + container multipart-request-table-features { + list table-features { + leaf table-id { + type uint8; + } + leaf name { + type string; + } + leaf metadata-match { + type uint64; + } + leaf metadata-write { + type uint64; + } + leaf config { + type oft:table-config; + } + leaf max-entries { + type uint32; + } + uses table-features-properties-grouping; + } + } + } + case multipart-request-port-desc-case { + container multipart-request-port-desc { + leaf empty { + type empty; + } + } + } + case multipart-request-experimenter-case { + container multipart-request-experimenter { + uses experimenter-core; + } + } + } + } + grouping multipart-reply { + reference "OFPT_MULTIPART_REPLY message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + leaf type { + type oft:multipart-type; + } + leaf flags { + type oft:multipart-request-flags; + } + choice multipart-reply-body { + case multipart-reply-desc-case { + container multipart-reply-desc { + leaf mfr_desc { + type string; + } + leaf hw_desc { + type string; + } + leaf sw_desc { + type string; + } + leaf serial_num { + type string; + } + leaf dp_desc { + type string; + } + } + } + case multipart-reply-flow-case { + container multipart-reply-flow { + list flow-stats { + leaf table-id { + type uint8; + } + leaf duration-sec { + type uint32; + } + leaf duration-nsec { + type uint32; + } + leaf priority { + type uint16; + } + leaf idle-timeout { + type uint16; + } + leaf hard-timeout { + type uint16; + } + leaf flags { + type oft:flow-mod-flags; + } + leaf cookie { + type uint64; + } + leaf packet-count { + type uint64; + } + leaf byte-count { + type uint64; + } + uses oxm:match-grouping; + + uses ofinstruction:instructions-grouping; + + // OF1.0 structures + uses oxm:match-v10-grouping; + uses ofaction:actions-grouping; + } + } + } + case multipart-reply-aggregate-case { + container multipart-reply-aggregate { + leaf packet-count { + type uint64; + } + leaf byte-count { + type uint64; + } + leaf flow-count { + type uint32; + } + } + } + case multipart-reply-table-case { + container multipart-reply-table { + list table-stats { + leaf table-id { + type uint8; + } + leaf active-count { + type uint32; + } + leaf lookup-count { + type uint64; + } + leaf matched-count { + type uint64; + } + + // OF1.0 structures + leaf name { + type string; + } + leaf wildcards { + type oft:flow-wildcards-v10; + } + leaf nw-src-mask { + type uint8; + } + leaf nw-dst-mask { + type uint8; + } + leaf max-entries { + type uint32; + } + } + } + } + case multipart-reply-port-stats-case { + container multipart-reply-port-stats { + list port-stats { + leaf port-no { + type uint32; + } + leaf rx-packets { + type uint64; + } + leaf tx-packets { + type uint64; + } + leaf rx-bytes { + type uint64; + } + leaf tx-bytes { + type uint64; + } + leaf rx-dropped { + type uint64; + } + leaf tx-dropped { + type uint64; + } + leaf rx-errors { + type uint64; + } + leaf tx-errors { + type uint64; + } + leaf rx-frame-err { + type uint64; + } + leaf rx-over-err { + type uint64; + } + leaf rx-crc-err { + type uint64; + } + leaf collisions { + type uint64; + } + leaf duration-sec { + type uint32; + } + leaf duration-nsec { + type uint32; + } + } + } + } + case multipart-reply-queue-case { + container multipart-reply-queue { + list queue-stats { + leaf port-no { + type uint32; + } + leaf queue-id { + type uint32; + } + leaf tx-bytes { + type uint64; + } + leaf tx-packets { + type uint64; + } + leaf tx-errors { + type uint64; + } + leaf duration-sec { + type uint32; + } + leaf duration-nsec { + type uint32; + } + } + } + } + case multipart-reply-group-case { + container multipart-reply-group { + list group-stats { + leaf group-id { + type oft:group-id; + } + leaf ref-count { + type uint32; + } + leaf packet-count { + type uint64; + } + leaf byte-count { + type uint64; + } + leaf duration-sec { + type uint32; + } + leaf duration-nsec { + type uint32; + } + list bucket-stats { + leaf packet-count { + type uint64; + } + leaf byte-count { + type uint64; + } + } + } + } + } + case multipart-reply-group-desc-case { + container multipart-reply-group-desc { + list group-desc { + leaf type { + type oft:group-type; + } + leaf group-id { + type oft:group-id; + } + uses buckets-grouping; + } + } + } + case multipart-reply-group-features-case { + container multipart-reply-group-features { + leaf types { + type oft:group-types; + } + leaf capabilities { + type oft:group-capabilities; + } + leaf-list max_groups { + type uint32; + } + leaf-list actions-bitmap { + type oft:action-type; + } + } + } + case multipart-reply-meter-case { + container multipart-reply-meter { + list meter-stats { + leaf meter-id { + type oft:meter-id; + } + leaf flow-count { + type uint32; + } + leaf packet-in-count { + type uint64; + } + leaf byte-in-count { + type uint64; + } + leaf duration-sec { + type uint32; + } + leaf duration-nsec { + type uint32; + } + list meter-band-stats { + leaf packet-band-count { + type uint64; + } + leaf byte-band-count { + type uint64; + } + } + } + } + } + case multipart-reply-meter-config-case { + container multipart-reply-meter-config { + list meter-config { + leaf flags { + type oft:meter-flags; + } + leaf meter-id { + type oft:meter-id; + } + list bands { + uses meter-band-header; + } + } + } + } + case multipart-reply-meter-features-case { + container multipart-reply-meter-features { + leaf max-meter { + type uint32; + } + leaf band-types { + type oft:meter-band-type-bitmap; + } + leaf capabilities { + type oft:meter-flags; + } + leaf max-bands { + type uint8; + } + leaf max-color { + type uint8; + } + } + } + case multipart-reply-table-features-case { + container multipart-reply-table-features { + list table-features { + leaf table-id { + type uint8; + } + leaf name { + type string; + } + leaf metadata-match { + type binary; + } + leaf metadata-write { + type binary; + } + leaf config { + type oft:table-config; + } + leaf max-entries { + type uint32; + } + uses table-features-properties-grouping; + } + } + } + case multipart-reply-port-desc-case { + container multipart-reply-port-desc { + list ports { + uses port-grouping; + } + } + } + case multipart-reply-experimenter-case { + container multipart-reply-experimenter { + uses experimenter-core; + } + } + } + } + /* Barrier messages. */ + grouping barrier-request { + reference "OFPT_BARRIER_REQUEST message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + uses ofHeader; + } + grouping barrier-reply { + reference "OFPT_BARRIER_REPLY message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + uses ofHeader; + } + /* Queue Configuration messages. */ + grouping queue-get-config-request { + reference "OFPT_QUEUE_GET_CONFIG_REQUEST message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + leaf port { + type oft:port-number; + } + } + grouping queue-get-config-reply { + reference "OFPT_QUEUE_GET_CONFIG_REPLY message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + leaf port { + type oft:port-number; + } + list queues { + uses packet-queue; + } + } + grouping packet-queue { + leaf queue-id { + type oft:queue-id; + } + leaf port { + type oft:port-number; + } + uses queue-property-header; + } + container queue-prop-container { + uses queue-property-header; + } + grouping queue-property-header { + list queue-property { + config false; + leaf property { + type oft:queue-properties; + } + } + } + /* Controller role change request messages. */ + grouping role-request { + reference "OFPT_ROLE_REQUEST message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + leaf role { + type oft:controller-role; + } + leaf generation-id { + type uint64; + } + } + grouping role-reply { + reference "OFPT_ROLE_REPLY message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + leaf role { + type oft:controller-role; + } + leaf generation-id { + type uint64; + } + } + /* Asynchronous message configuration. */ + grouping get-async-request { + reference "OFPT_GET_ASYNC_REQUEST message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + } + grouping get-async-reply { + reference "OFPT_GET_ASYNC_REPLY message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + uses async-body-grouping; + } + grouping set-async { + reference "OFPT_SET_ASYNC message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + uses async-body-grouping; + } + + grouping async-body-grouping { + list packet-in-mask { + leaf-list mask { + type oft:packet-in-reason; + } + } + list port-status-mask { + leaf-list mask { + type oft:port-reason; + } + } + list flow-removed-mask { + leaf-list mask { + type oft:flow-removed-reason; + } + } + } + /* Meters and rate limiters configuration messages. */ + grouping meter-mod { + reference "OFPT_METER_MOD message in Openflow Switch 1.3 Spec"; + /* Controller/switch message */ + + uses ofHeader; + + leaf command { + type oft:meter-mod-command; + } + leaf flags { + type oft:meter-flags; + } + leaf meter-id { + type oft:meter-id; + } + list bands { + uses meter-band-header; + } + } + + container meter-band-container { + uses meter-band-header; + } + grouping meter-band-header { + choice meter-band { + case meter-band-drop-case { + container meter-band-drop { + uses meter-band-commons; + } + } + case meter-band-dscp-remark-case { + container meter-band-dscp-remark { + uses meter-band-commons; + leaf prec-level { + type uint8; + } + } + } + case meter-band-experimenter-case { + container meter-band-experimenter { + uses meter-band-commons; + } + } + } + } + + grouping meter-band-commons { + leaf type { + type oft:meter-band-type; + } + leaf rate { + type uint32; + } + leaf burst-size { + type uint32; + } + } + + /* Immutable messages. */ + notification hello-message { + uses hello; + reference "OFPT_HELLO message in Openflow Switch 1.3 Spec"; + + /* Symmetric message */ + } + notification error-message { + uses error; + reference "OFPT_ERROR message in Openflow Switch 1.3 Spec"; + + /* Symmetric message */ + } + notification echo-request-message { + uses echo-request; + reference "OFPT_ECHO_REQUEST message in Openflow Switch 1.3 Spec"; + + /* Symmetric message */ + } + notification experimenter-message { + description "Experimenter request message from device."; + uses experimenter-of-message; + reference "OFPT_EXPERIMENTER message in Openflow Switch 1.3 Spec"; + // TODO:: does switch send this when understood experimenter msg from lib? + /* Symmetric message */ + } + // # Notification and RPCs + /* Symmetric RPC. */ + rpc echo { + input { + uses echo-request; + } + /* Controller/switch message */ + output { + uses echo-reply; + } + } + + rpc echo-reply { + input { + uses echo-reply; + } + } + + rpc hello { + input { + uses hello; + } + } + + rpc experimenter { + description "Send experimenter message to device, reply is not solicitated."; + input { + uses experimenter-of-message; + } + } + + /* Switch configuration messages. */ + rpc get-features { + input { + uses features-request; + } + /* Controller/switch message */ + output { + uses features-reply; + } + } + + rpc get-config { + input { + uses get-config-request; + } + output { + uses get-config-reply; + } + /* Controller/switch message */ + } + + rpc set-config { + input { + uses set-config; + } + /* Controller/switch message */ + } + /* Asynchronous messages. */ + notification packet-in-message { + uses packet-in; + + /* Async message */ + } + notification flow-removed-message { + uses flow-removed; + + /* Async message */ + } + notification port-status-message { + uses port-status; + + } /* Async message */ + + /* Controller command messages. */ + rpc packet-out { + input { + uses packet-out; + } + /* Controller/switch message */ + } + rpc flow-mod { + input { + uses flow-mod; + } + /* Controller/switch message */ + } + rpc group-mod { + input { + uses group-mod; + } + /* Controller/switch message */ + } + rpc port-mod { + input { + uses port-mod; + } + } /* Controller/switch message */ + + rpc table-mod { + input { + uses table-mod; + } + } /* Controller/switch message */ + + /* Multipart messages. */ + + rpc multipart-request { + input { + uses multipart-request; + } + } + + /* Controller/switch message */ + notification multipart-reply-message { + uses multipart-reply; + // notification because of multiple following responses + } /* Controller/switch message */ + + + /* Barrier messages. */ + rpc barrier { + input { + uses barrier-request; + } + output { + uses barrier-reply; + } + } + /* Queue Configuration messages. */ + rpc get-queue-config { + input { + uses queue-get-config-request; + } + output { + uses queue-get-config-reply; + } + } + + /* Controller role change request messages. */ + rpc role-request { + input { + uses role-request; + } + output { + uses role-reply; + } + } /* Controller/switch message */ + + /* Asynchronous message configuration. */ + rpc get-async { + input { + uses get-async-request; + } + output { + uses get-async-reply; + } + } + /* Controller/switch message */ + rpc set-async { + input { + uses set-async; + } + + } + /* Meters and rate limiters configuration messages. */ + rpc meter-mod { + input { + uses meter-mod; + } + } /* Controller/switch message */ +} \ No newline at end of file diff --git a/experimental/odp/openflow-provider-config.yang b/experimental/odp/openflow-provider-config.yang new file mode 100644 index 000000000..21bd71276 --- /dev/null +++ b/experimental/odp/openflow-provider-config.yang @@ -0,0 +1,206 @@ +module openflow-provider-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:openflow:provider:config"; + prefix "openflow-provider-config"; + + description + "Configuration for an Openflow provider."; + + revision "2016-05-10" { + description + "Initial revision"; + } + + typedef non-zero-uint32-type { + type uint32 { + range "1..max"; + } + } + + typedef non-zero-uint16-type { + type uint16 { + range "1..max"; + } + } + + container openflow-provider-config { + leaf rpc-requests-quota { + description "Quota for maximum number of RPC requests"; + type non-zero-uint16-type; + default 20000; + } + + leaf switch-features-mandatory { + description "This parameter indicates whether it is mandatory for + switch to support OF1.3 features : table, flow, meter,group. If this + is set to true and switch doesn't support these features its + connection will be denied."; + type boolean; + default false; + } + + leaf global-notification-quota { + description "Global notification quota"; + type uint32; + default 64000; + } + + leaf is-statistics-polling-on { + description "If enabled, periodic statistics gathering will be + turned on. If false takes precedence over the per-capability configuration."; + type boolean; + default "true"; + } + + leaf is-table-statistics-polling-on { + description "If enabled, periodic table statistics gathering will be + turned on"; + type boolean; + default "true"; + } + + leaf is-flow-statistics-polling-on { + description "If enabled, periodic flow statistics gathering will be + turned on"; + type boolean; + default "true"; + } + + leaf is-group-statistics-polling-on { + description "If enabled, periodic group statistics gathering will be + turned on"; + type boolean; + default "true"; + } + + leaf is-meter-statistics-polling-on { + description "If enabled, periodic meter statistics gathering will be + turned on"; + type boolean; + default "true"; + } + + leaf is-port-statistics-polling-on { + description "If enabled, periodic port statistics gathering will be + turned on"; + type boolean; + default "true"; + } + + leaf is-queue-statistics-polling-on { + description "If enabled, periodic queue statistics gathering will be + turned on"; + type boolean; + default "true"; + } + + leaf is-statistics-rpc-enabled { + status deprecated; + description "Expose backward compatible statistics rpcs providing + result in form of async notification. This is deprecated, use direct + statistics instead."; + type boolean; + default "false"; + } + + leaf barrier-interval-timeout-limit { + description "Barrier timeout"; + type non-zero-uint32-type; + default 500; + } + + leaf barrier-count-limit { + description "Barrier limit"; + type non-zero-uint16-type; + default 25600; + } + + leaf echo-reply-timeout { + description "How long we should wait for echo reply (value is in + milliseconds"; + type non-zero-uint32-type; + default 2000; + } + + leaf thread-pool-min-threads { + description "Mininum (starting) number of threads in thread pool"; + type uint16; + default 1; + } + + leaf thread-pool-max-threads { + description "Maximum number of threads in thread pool"; + type non-zero-uint16-type; + default 32000; + } + + leaf thread-pool-timeout { + description "After how much time (in seconds) of inactivity will be + threads in pool terminated"; + type uint32; + default 60; + } + + leaf enable-flow-removed-notification { + description "Turning on flow removed notification"; + type boolean; + default "true"; + } + + leaf skip-table-features { + description "Ability to skip pulling and storing of large table + features. These features are still available via rpc but if set to + true then maintenance in DS will be omitted"; + type boolean; + default "true"; + } + + leaf basic-timer-delay { + description "Initial delay used in polling the statistics, value is + in milliseconds"; + type non-zero-uint32-type; + default 3000; + } + + leaf maximum-timer-delay { + description "Maximum timer delay is the wait time to collect next + statistics used in polling the statistics, value is in + milliseconds"; + type non-zero-uint32-type; + default 900000; + } + + leaf use-single-layer-serialization { + description "When true, Yang models are serialized and deserialized + directly to and from format supported by device, so serialization + and deserialization is faster. Otherwise, models are first + serialized to Openflow specification models and then to format + supported by device, and reversed when deserializing."; + type boolean; + default "true"; + } + + leaf enable-equal-role { + description "When true, openflowplugin won't send any specific role + request down to the switch after plugin internally decides the + ownership of the device using Entity Ownership Service. In this + scenario, controller connection for the device will be in equal + role. The behavior will be same for single node setup and clustered + setup. In clustered scenario, all the controller will be in equal + role for the device. In this case device will send all asynchronous + event messages (e.g packet_in) to all the controllers, but openflowplugin + will drop these events for the controller instances that is internally + not owning the device."; + type boolean; + default "false"; + } + + leaf device-connection-rate-limit-per-min { + description "To limit the number of datapath nodes connecting to odl controller + instance per minute. Default value 0 indicates that the device connection rate + limiter will be disabled."; + type uint16; + default 0; + } + } +} diff --git a/experimental/odp/openflow-switch-connection-config.yang b/experimental/odp/openflow-switch-connection-config.yang new file mode 100644 index 000000000..3e742fcfb --- /dev/null +++ b/experimental/odp/openflow-switch-connection-config.yang @@ -0,0 +1,128 @@ +module openflow-switch-connection-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:config"; + prefix "openflow-switch-connection-config"; + + import ietf-inet-types {prefix ietf-inet; revision-date 2013-07-15; } + import openflow-configuration {prefix of-config; revision-date 2014-06-30; } + + description + "Configuration for an Openflow switch connection."; + + revision "2016-05-06" { + description + "Initial revision"; + } + + list switch-connection-config { + key "instance-name"; + + leaf instance-name { + description "Name of the switch connection instance."; + type string; + } + + leaf port { + description "local listening port"; + type uint16; + mandatory true; + } + + leaf transport-protocol { + description "Transport protocol used for communication."; + type of-config:transport-protocol; + mandatory true; + } + + leaf channel-outbound-queue-size { + description "Channel outbound queue size"; + type uint16; + default 1024; + } + + leaf address { + description "address of local listening interface"; + type ietf-inet:ip-address; + } + + leaf use-barrier { + description "Enable barrier in Openflow java"; + type boolean; + default true; + } + + leaf group-add-mod-enabled { + description "Group Add Mod Enabled"; + type boolean; + default false; + } + + leaf switch-idle-timeout { + description "idle timeout in [ms]"; + type uint32; + default 15000; + } + + container tls { + leaf keystore { + description "keystore location"; + type string; + } + + leaf keystore-type { + description "keystore type (JKS or PKCS12)"; + type of-config:keystore-type; + } + + leaf keystore-path-type { + description "keystore path type (CLASSPATH or PATH)"; + type of-config:path-type; + } + + leaf keystore-password { + description "password protecting keystore"; + type string; + } + + leaf certificate-password { + description "password protecting certificate"; + type string; + } + + leaf truststore { + description "truststore location"; + type string; + } + + leaf truststore-type { + description "truststore type (JKS or PKCS12)"; + type of-config:keystore-type; + } + + leaf truststore-path-type { + description "truststore path type (CLASSPATH or PATH)"; + type of-config:path-type; + } + + leaf truststore-password { + description "password protecting truststore"; + type string; + } + + leaf-list cipher-suites { + description "combination of cryptographic algorithms used by TLS connection"; + type string; + } + } + + container threads { + leaf boss-threads { + type uint16; + } + + leaf worker-threads { + type uint16; + } + } + } +} diff --git a/experimental/odp/openflow-types.yang b/experimental/odp/openflow-types.yang new file mode 100755 index 000000000..7d11bafa8 --- /dev/null +++ b/experimental/odp/openflow-types.yang @@ -0,0 +1,1933 @@ +/* + * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + + module openflow-types { + namespace "urn:opendaylight:openflow:common:types"; + prefix "oft"; + + revision "2013-07-31" { + description "#NOT_PUBLISHED# OpenFlow 1.3 - common types model"; + } + + typedef port-number { + description "Port numbering. Ports are numbered starting from 1 - + supports special / reserved values (in OF v1.3)"; + type uint32; + } + + typedef port-number-values { + description "Reserved OpenFlow Port (fake output \"ports\") (OF v1.3)."; + type enumeration { + enum MAX { + description "Maximum number of physical and logical switch ports."; + value -256; // 0xffffff00 + } + enum IN_PORT { + description "Send the packet out the input port. This + reserved port must be explicitly used + in order to send back out of the input + port."; + value -8; // 0xfffffff8 + } + enum TABLE { + description "Submit the packet to the first flow table + NB: This destination port can only be + used in packet-out messages."; + value -7; // 0xfffffff9 + } + enum NORMAL { + description "Process with normal L2/L3 switching."; + value -6; // 0xfffffffa + } + enum FLOOD { + description "All physical ports in VLAN, except input + port and those blocked or link down."; + value -5; // 0xfffffffb + } + enum ALL { + description "All physical ports except input port."; + value -4; // 0xfffffffc + } + enum CONTROLLER { + description "Send to controller."; + value -3; // 0xfffffffd + } + enum LOCAL { + description "Local openflow \"port\"."; + value -2; // 0xfffffffe + } + enum ANY { + description "Wildcard port used only for flow mod + (delete) and flow stats requests. Selects + all flows regardless of output port + (including flows with no output port)."; + value -1; // 0xffffffff + } + } + } + + typedef port-features { + description "Features of ports available in datapath."; + type bits { + bit _10mb_hd { + position 0; + description "10 Mb half-duplex rate support."; + } + bit _10mb-fd { + position 1; + description "10 Mb full-duplex rate support."; + } + bit _100mb-hd { + position 2; + description "100 Mb half-duplex rate support."; + } + bit _100mb-fd { + position 3; + description "100 Mb full-duplex rate support."; + } + bit _1gb-hd { + position 4; + description "1 Gb half-duplex rate support."; + } + bit _1gb-fd { + position 5; + description "1 Gb full-duplex rate support."; + } + bit _10gb-fd { + position 6; + description "10 Gb full-duplex rate support."; + } + bit _40gb-fd { + position 7; + description "40 Gb full-duplex rate support."; + } + bit _100gb-fd { + position 8; + description "100 Gb full-duplex rate support."; + } + bit _1tb-fd { + position 9; + description "1 Tb full-duplex rate support."; + } + bit other { + position 10; + description "Other rate, not in the list."; + } + bit copper { + position 11; + description "Copper medium."; + } + bit fiber { + position 12; + description "Fiber medium."; + } + bit autoneg { + position 13; + description "Auto-negotiation."; + } + bit pause { + position 14; + description "Pause."; + } + bit pause-asym { + position 15; + description "Asymmetric pause."; + } + } + } + + typedef port-config { + description + "Flags to indicate behavior of the physical port. These flags are + describe the current configuration and used port_mod message + to configure the port's behavior."; + type bits { + bit port-down { + //description " Port is administratively down."; + position 0; + } + bit no-recv { + //description " Drop all packets received by port."; + position 2; + } + bit no-fwd { + //description " Drop packets forwarded to port."; + position 5; + } + bit no-packet-in { + //description "Do not send packet-in msgs for port."; + position 6; + } + } + } + + typedef port-state { + description + "Current state of the physical port. These are not configurable from + the controller."; + type bits { + bit link_down { + //description "No physical link present."; + position 0; + } + bit blocked { + //description "Port is blocked"; + position 1; + } + bit live { + //description "Live for Fast Failover Group."; + position 2; + } + } + } + + identity match-type-base { + description + "The match type indicates the match structure (set of fields that compose the + match) in use. The match type is placed in the type field at the beginning + of all match structures.Extensions that define match types may be + published on the ONF wiki. Support for extensions is optional."; + } + + identity standard-match-type { + base oft:match-type-base; + } + + identity instruction-base { + description "Base identity for instruction types"; + } + + identity action-base { + description "Base identity for action types"; + } + + identity experimenter-meter-band-sub-type { + description "The base identity for vendor's meter bands."; + } + + typedef metadata { + type binary; + } + + typedef table-id { + type uint32; + } + typedef meter-id { + type uint32; + } + typedef queue-id { + type uint32; + } + typedef group-id { + type uint32; + } + + typedef ether-type { + type uint16; + } + typedef experimenter-id { + description "This type represents experimenter ID used in experimenter messages. + It also represents vendor ID - as it is the same for OF version 1.3+. + (VENDOR naming convention has been changed in OF v1.3 specification + to EXPERIMENTER)"; + type uint32; + } + typedef error-type { + type enumeration { + enum HELLO_FAILED { + value 0; + description "Hello Protocol failed."; + } + enum BAD_REQUEST { + value 1; + description "Request was not understood."; + } + enum BAD_ACTION { + value 2; + description "Error in action description."; + } + enum BAD_INSTRUCTION { + value 3; + description "Error in instruction list."; + } + enum BAD_MATCH { + value 4; + description "Error in match."; + } + enum FLOW_MOD_FAILED { + value 5; + description "Problem modifying flow entry."; + } + enum GROUP_MOD_FAILED { + value 6; + description "Problem modifying group entry."; + } + enum PORT_MOD_FAILED { + value 7; + description "Port mod request failed."; + } + enum TABLE_MOD_FAILED { + value 8; + description "Table mod request failed."; + } + enum QUEUE_OP_FAILED { + value 9; + description "Queue operation failed."; + } + enum SWITCH_CONFIG_FAILED { + value 10; + description "Switch config request failed."; + } + enum ROLE_REQUEST_FAILED { + value 11; + description "Controller Role request failed."; + } + enum METER_MOD_FAILED { + value 12; + description "Error in meter."; + } + enum TABLE_FEATURES_FAILED { + value 13; + description "Setting table features failed."; + } + enum EXPERIMENTER { + value 65535; //0xffff + description "Experimenter error messages."; + } + } + } + + typedef hello-failed-code { + type enumeration { + enum INCOMPATIBLE { + value 0; + description "Hello Protocol failed."; + } + enum EPERM { + value 1; + description "Request was not understood."; + } + } + } + + typedef bad-request-code { + type enumeration { + enum BAD_VERSION { + value 0; + } + enum BAD_TYPE { + value 1; + } + enum BAD_MULTIPART { + value 2; + } + enum BAD_EXPERIMENTER { + value 3; + } + enum BAD_EXP_TYPE { + value 4; + } + enum EPERM { + value 5; + } + enum BAD_LEN { + value 6; + } + enum BUFFER_EMPTY { + value 7; + } + enum BUFFER_UNKNOWN { + value 8; + } + enum BAD_TABLE_ID { + value 9; + } + enum IS_SLAVE { + value 10; + } + enum BAD_PORT { + value 11; + } + enum BAD_PACKET { + value 12; + } + enum MULTIPART_BUFFER_OVERFLOW { + value 13; + } + } + } + + typedef bad-action-code { + type enumeration { + enum BAD_TYPE { + value 0; + } + enum BAD_LEN { + value 1; + } + enum BAD_EXPERIMENTER { + value 2; + } + enum BAD_EXP_TYPE { + value 3; + } + enum BAD_OUT_PORT { + value 4; + } + enum BAD_ARGUMENT { + value 5; + } + enum EPERM { + value 6; + } + enum TOO_MANY { + value 7; + } + enum BAD_QUEUE { + value 8; + } + enum BAD_OUT_GROUP { + value 9; + } + enum MATCH_INCONSISTENT { + value 10; + } + enum UNSUPPORTED_ORDER { + value 11; + } + enum BAD_TAG { + value 12; + } + enum BAD_SET_TYPE { + value 13; + } + enum BAD_SET_LEN { + value 14; + } + enum BAD_SET_ARGUMENT { + value 15; + } + } + } + + typedef bad-instruction-code { + type enumeration { + enum UNKNOWN_INST { + value 0; + } + enum UNSUP_INST { + value 1; + } + enum BAD_TABLE_ID { + value 2; + } + enum UNSUP_METADATA { + value 3; + } + enum UNSUP_METADATA_MASK { + value 4; + } + enum BAD_EXPERIMENTER { + value 5; + } + enum BAD_EXP_TYPE { + value 6; + } + enum BAD_LEN { + value 7; + } + enum EPERM { + value 8; + } + } + } + + typedef bad-match-code { + type enumeration { + enum BAD_TYPE { + value 0; + } + enum BAD_LEN { + value 1; + } + enum BAD_TAG { + value 2; + } + enum BAD_DL_ADDR_MASK { + value 3; + } + enum BAD_NW_ADDR_MASK { + value 4; + } + enum BAD_WILDCARDS { + value 5; + } + enum BAD_FIELD { + value 6; + } + enum BAD_VALUE { + value 7; + } + enum BAD_MASK { + value 8; + } + enum BAD_PREREQ { + value 9; + } + enum DUP_FIELD { + value 10; + } + enum EPERM { + value 11; + } + } + } + + typedef flow-mod-failed-code { + type enumeration { + enum UNKNOWN { + value 0; + } + enum TABLE_FULL { + value 1; + } + enum BAD_TABLE_ID { + value 2; + } + enum OVERLAP { + value 3; + } + enum EPERM { + value 4; + } + enum BAD_TIMEOUT { + value 5; + } + enum BAD_COMMAND { + value 6; + } + enum BAD_FLAGS { + value 7; + } + } + } + + typedef group-mod-failed-code { + type enumeration { + enum GROUP_EXISTS { + value 0; + } + enum INVALID_GROUP { + value 1; + } + enum WEIGHT_UNSUPPORTED { + value 2; + } + enum OUT_OF_GROUPS { + value 3; + } + enum OUT_OF_BUCKETS { + value 4; + } + enum CHAINING_UNSUPPORTED { + value 5; + } + enum WATCH_UNSUPPORTED { + value 6; + } + enum LOOP { + value 7; + } + enum UNKNOWN_GROUP { + value 8; + } + enum CHAINED_GROUP { + value 9; + } + enum BAD_TYPE { + value 10; + } + enum BAD_COMMAND { + value 11; + } + enum BAD_BUCKET { + value 12; + } + enum BAD_WATCH { + value 13; + } + enum EPERM { + value 14; + } + } + } + + typedef port-mod-failed-code { + type enumeration { + enum BAD_PORT { + value 0; + } + enum BAD_HW_ADDR { + value 1; + } + enum BAD_CONFIG { + value 2; + } + enum BAD_ADVERTISE { + value 3; + } + enum EPERM { + value 4; + } + } + } + + typedef table-mod-failed-code { + type enumeration { + enum BAD_TABLE { + value 0; + } + enum BAD_CONFIG { + value 1; + } + enum EPERM { + value 2; + } + } + } + + typedef queue-op-failed-code { + type enumeration { + enum BAD_PORT { + value 0; + } + enum BAD_QUEUE { + value 1; + } + enum EPERM { + value 2; + } + } + } + + typedef switch-config-failed-code { + type enumeration { + enum BAD_FLAGS { + value 0; + } + enum BAD_LEN { + value 1; + } + enum EPERM { + value 2; + } + } + } + + typedef role-request-failed-code { + type enumeration { + enum STALE { + value 0; + } + enum UNSUP { + value 1; + } + enum BAD_ROLE { + value 2; + } + } + } + + typedef meter-mod-failed-code { + type enumeration { + enum UNKNOWN { + value 0; + } + enum METER_EXISTS { + value 1; + } + enum INVALID_METER { + value 2; + } + enum UNKNOWN_METER { + value 3; + } + enum BAD_COMMAND { + value 4; + } + enum BAD_FLAGS { + value 5; + } + enum BAD_RATE { + value 6; + } + enum BAD_BURST { + value 7; + } + enum BAD_BAND { + value 8; + } + enum BAD_BAND_VALUE { + value 9; + } + enum OUT_OF_METERS { + value 10; + } + enum OUT_OF_BANDS { + value 11; + } + } + } + + typedef table-features-failed-code { + type enumeration { + enum BAD_TABLE { + value 0; + } + enum BAD_METADATA { + value 1; + } + enum BAD_TYPE { + value 2; + } + enum BAD_LEN { + value 3; + } + enum BAD_ARGUMENT { + value 4; + } + enum EPERM { + value 5; + } + } + } + + typedef hello-element-type { + type enumeration { + enum VERSIONBITMAP { + value 1; + description "Bitmap of version supported."; + } + } + } + + typedef capabilities { + description "Capabilities supported by the datapath."; + type bits { + bit OFPC_FLOW_STATS { + position 0; + /* Flow statistics. */ + } + bit OFPC_TABLE_STATS { + position 1; + /* Table statistics. */ + } + bit OFPC_PORT_STATS { + position 2; + /* Port statistics. */ + } + bit OFPC_GROUP_STATS { + position 3; + /* Group statistics. */ + } + bit OFPC_IP_REASM { + position 5; + /* Can reassemble IP fragments. */ + } + bit OFPC_QUEUE_STATS { + position 6; + /* Queue statistics. */ + } + bit OFPC_PORT_BLOCKED { + position 8; + /* Switch will block looping ports. */ + } + } + } + + typedef switch-config-flag { + description " Handling of IP fragments. "; + type enumeration { + enum FRAG_NORMAL { + value 0; + description "No special handling for fragments."; + } + enum OFPC_FRAG_DROP { + value 1; + description "Drop fragments."; + } + enum OFPC_FRAG_REASM { + value 2; + description "Reassemble (only if OFPC_IP_REASM set)."; + } + enum OFPC_FRAG_MASK { + value 3; + } + } + } + + typedef flow-removed-reason { + description "Why was this flow removed?"; + type enumeration { + enum OFPRR_IDLE_TIMEOUT { + value 0; + description "Flow idle time exceeded idle_timeout."; + } + enum OFPRR_HARD_TIMEOUT { + value 1; + description "Time exceeded hard_timeout."; + } + enum OFPRR_DELETE { + value 2; + description "Evicted by a DELETE flow mod."; + } + enum OFPRR_GROUP_DELETE { + value 3; + description "Group was removed."; + } + } + } + + typedef port-reason { + description "What changed about the physical port"; + type enumeration { + enum OFPPR_ADD { + value 0; + description "The port was added."; + } + enum OFPPR_DELETE { + value 1; + description "he port was removed."; + } + enum OFPPR_MODIFY { + value 2; + description "Some attribute of the port has changed."; + } + } + } + + typedef flow-mod-command { + /* ofp_flow_mod_command */ + type enumeration { + enum OFPFC_ADD { + value 0; + description "New flow."; + } + enum OFPFC_MODIFY { + value 1; + description "Modify all matching flows."; + } + enum OFPFC_MODIFY_STRICT { + value 2; + description "Modify entry strictly matching wildcards and priority."; + } + enum OFPFC_DELETE { + value 3; + description "Delete all matching flows."; + } + enum OFPFC_DELETE_STRICT { + value 4; + description "Delete entry strictly matching wildcards and priority."; + } + } + } + + typedef flow-mod-flags { + /* ofp_flow_mod_flags */ + type bits { + bit OFPFF_SEND_FLOW_REM { + position 0; + description "Send flow removed message when flow expires or is deleted."; + } + bit OFPFF_CHECK_OVERLAP { + position 1; + description "Check for overlapping entries first."; + } + bit OFPFF_RESET_COUNTS { + position 2; + description "Reset flow packet and byte counts."; + } + bit OFPFF_NO_PKT_COUNTS { + position 3; + description "Don't keep track of packet count."; + } + bit OFPFF_NO_BYT_COUNTS { + position 4; + description "Don't keep track of byte count."; + } + } + } + + typedef group-mod-command { + /* ofp_group_mod_command */ + type enumeration { + enum OFPGC_ADD { + value 0; + description "New group."; + } + enum OFPGC_MODIFY { + value 1; + description "Modify all matching groups."; + } + enum OFPGC_DELETE { + value 2; + description "Delete all matching groups."; + } + } + } + + typedef group-type { + /* ofp_group_type */ + type enumeration { + enum OFPGT_ALL { + value 0; + description "All (multicast/broadcast) group."; + } + enum OFPGT_SELECT { + value 1; + description "Select group."; + } + enum OFPGT_INDIRECT { + value 2; + description "Indirect group."; + } + enum OFPGT_FF { + value 3; + description "Fast failover group."; + } + } + } + + typedef table-values { + /* ofp_table */ + type enumeration { + enum OFPTT_MAX { + value 254; // 0xfe + description "Last usable table number."; + } + enum OFPTT_ALL { + value 255; // 0xff + description "Wildcard table used for table config, + flow stats and flow deletes."; + } + } + } + + typedef group { + /* ofp_group - Group numbering. Groups can use any number up to OFPG_MAX.*/ + type enumeration { + enum OFPG_MAX { + value -256; //0xffffff00 + description "Last usable group number"; + } + /* Fake groups. */ + enum OFPG_ALL { + value -4; //0xfffffffc + description "Represents all groups for group delete commands"; + } + enum OFPG_ANY { + value -1; //0xffffffff + description "Wildcard group used only for flow stats requests. + Selects all flows regardless of group (including flows with no group)"; + } + } + } + + typedef multipart-request-flags { + description "enum ofp_multipart_request_flags "; + type bits { + bit OFPMPF_REQ_MORE { + description "More requests to follow."; + position 0; + } + } + } + + typedef multipart-type { + type enumeration { + enum OFPMP_DESC { + value 0; + description "Description of this OpenFlow switch. + The request body is empty. + The reply body is struct ofp_desc."; + } + enum OFPMP_FLOW { + value 1; + description "Individual flow statistics. + The request body is struct ofp_flow_stats_request. + The reply body is an array of struct ofp_flow_stats."; + } + enum OFPMP_AGGREGATE { + value 2; + description "Aggregate flow statistics. + The request body is struct ofp_aggregate_stats_request. + The reply body is struct ofp_aggregate_stats_reply."; + } + enum OFPMP_TABLE { + value 3; + description "Flow table statistics. + The request body is empty. + The reply body is an array of struct ofp_table_stats."; + } + enum OFPMP_PORT_STATS { + value 4; + description "Port statistics. + The request body is struct ofp_port_stats_request. + The reply body is an array of struct ofp_port_stats."; + } + enum OFPMP_QUEUE { + value 5; + description "Queue statistics for a port + The request body is struct ofp_queue_stats_request. + The reply body is an array of struct ofp_queue_stats"; + } + enum OFPMP_GROUP { + value 6; + description "Group counter statistics. + The request body is struct ofp_group_stats_request. + The reply is an array of struct ofp_group_stats."; + } + enum OFPMP_GROUP_DESC { + value 7; + description "Group description. + The request body is empty. + The reply body is an array of struct ofp_group_desc."; + } + enum OFPMP_GROUP_FEATURES { + value 8; + description "Group features. + The request body is empty. + The reply body is struct ofp_group_features."; + } + enum OFPMP_METER { + value 9; + description "Meter statistics. + The request body is struct ofp_meter_multipart_requests. + The reply body is an array of struct ofp_meter_stats."; + } + enum OFPMP_METER_CONFIG { + value 10; + description "Meter configuration. + The request body is struct ofp_meter_multipart_requests. + The reply body is an array of struct ofp_meter_config."; + } + enum OFPMP_METER_FEATURES { + value 11; + description "Meter features. + The request body is empty. + The reply body is struct ofp_meter_features."; + } + enum OFPMP_TABLE_FEATURES { + value 12; + description "Table features. + The request body is either empty or contains an array of + struct ofp_table_features containing the controller’s + desired view of the switch. If the switch is unable to + set the specified view an error is returned. + The reply body is an array of struct ofp_table_features."; + } + enum OFPMP_PORT_DESC { + value 13; + description "Port description. + The request body is empty. + The reply body is an array of struct ofp_port."; + } + enum OFPMP_EXPERIMENTER { + value 65535; //0xffff + description "Experimenter extension. + The request and reply bodies begin with + struct ofp_experimenter_multipart_header. + The request and reply bodies are otherwise experimenter-defined."; + } + } + } + + typedef queue-properties { + /* ofp_queue_properties */ + type enumeration { + enum OFPQT_NONE { + value 0; + description "No property defined for queue (default)."; + } + enum OFPQT_MIN_RATE { + value 1; + description "Minimum datarate guaranteed."; + } + enum OFPQT_MAX_RATE { + value 2; + description "Maximum datarate."; + } + enum OFPQT_EXPERIMENTER { + value 65535; // 0xffff + description "Experimenter defined property."; + } + } + } + + typedef controller-role { + /* ofp_controller_role */ + type enumeration { + enum OFPCR_ROLE_NOCHANGE { + value 0; + description "Don’t change current role."; + } + enum OFPCR_ROLE_EQUAL { + value 1; + description "Default role, full access."; + } + enum OFPCR_ROLE_MASTER { + value 2; + description "Full access, at most one master."; + } + enum OFPCR_ROLE_SLAVE { + value 3; + description "Read-only access."; + } + } + } + + typedef packet-in-reason { + /* ofp_packet_in_reason */ + type enumeration { + enum OFPR_NO_MATCH { + value 0; + description "No matching flow (table-miss flow entry). "; + } + enum OFPR_ACTION { + value 1; + description "Action explicitly output to controller. "; + } + enum OFPR_INVALID_TTL { + value 2; + description "Packet has invalid TTL "; + } + } + } + + typedef action-type { + /* ofp_action_type */ + type bits { + bit OFPAT_OUTPUT { + position 0; + /* Output to switch port. */ + } + bit OFPAT_COPY_TTL_OUT { + position 1; + /* Copy TTL "outwards" -- from next-to-outermost to outermost */ + } + bit OFPAT_COPY_TTL_IN { + position 2; + /* Copy TTL "inwards" -- from outermost to next-to-outermost */ + } + bit OFPAT_SET_MPLS_TTL { + position 3; + /* MPLS TTL */ + } + bit OFPAT_DEC_MPLS_TTL { + position 4; + /* Decrement MPLS TTL */ + } + bit OFPAT_PUSH_VLAN { + position 5; + /* Push a new VLAN tag */ + } + bit OFPAT_POP_VLAN { + position 6; + /* Pop the outer VLAN tag */ + } + bit OFPAT_PUSH_MPLS { + position 7; + /* Push a new MPLS tag */ + } + bit OFPAT_POP_MPLS { + position 8; + /* Pop the outer MPLS tag */ + } + bit OFPAT_SET_QUEUE { + position 9; + /* Set queue id when outputting to a port */ + } + bit OFPAT_GROUP { + position 10; + /* Apply group. */ + } + bit OFPAT_SET_NW_TTL { + position 11; + /* IP TTL. */ + } + bit OFPAT_DEC_NW_TTL { + position 12; + /* Decrement IP TTL. */ + } + bit OFPAT_SET_FIELD { + position 13; + /* Set a header field using OXM TLV format. */ + } + bit OFPAT_PUSH_PBB { + position 14; + /* Push a new PBB service tag (I-TAG) */ + } + bit OFPAT_POP_PBB { + position 15; + /* Pop the outer PBB service tag (I-TAG) */ + } + bit OFPAT_EXPERIMENTER { + position 16; + } + } + } + + typedef meter-mod-command { + /* ofp_meter_mod_command */ + type enumeration { + enum OFPMC_ADD { + description "New meter. "; + } + enum OFPMC_MODIFY { + description "Modify specified meter. "; + } + enum OFPMC_DELETE { + description "Delete specified meter. "; + } + } + } + + typedef meter-flags { + /* ofp_meter_flags */ + type bits { + bit OFPMF_KBPS { + position 0; + /* Rate value in kb/s (kilo-bit per second). */ + } + bit OFPMF_PKTPS { + position 1; + /* Rate value in packet/sec. */ + } + bit OFPMF_BURST { + position 2; + /* Do burst size. */ + } + bit OFPMF_STATS { + position 3; + /* Collect statistics. */ + } + } + } + + typedef meter-band-type { + /* ofp_meter_band_type */ + type enumeration { + enum OFPMBT_DROP { + value 1; + description "Drop packet. "; + } + enum OFPMBT_DSCP_REMARK { + value 2; + description "Remark DSCP in the IP header. "; + } + enum OFPMBT_EXPERIMENTER { + value 65535; //0xFFFF + description "Experimenter meter band. "; + } + } + } + + typedef meter-band-type-bitmap { + /* ofp_meter_band_type */ + type bits { + bit OFPMBT_DROP { + position 1; + description "Drop packet. "; + } + bit OFPMBT_DSCP_REMARK { + position 2; + description "Remark DSCP in the IP header. "; + } + } + } + + typedef meter { + description "Meter numbering. Flow meters can use any number up to OFPM_MAX"; + type enumeration { + enum OFPM_MAX { + value -65536; //0xffff0000 + description "Last usable meter number"; + } + /* Virtual meters. */ + enum OFPM_SLOWPATH { + value -3; //0xfffffffd + description "Meter for slow datapath"; + } + enum OFPM_CONTROLLER { + value -2; //0xfffffffe + description "Meter for controller connection"; + } + enum OFPM_ALL { + value -1; //0xffffffff + description "Represents all meters for stat requests commands"; + } + } + } + + typedef table-config { + /* ofp_table_config */ + type bits { + bit OFPTC_DEPRECATED_MASK { + /* Deprecated bits */ + position 3; + } + } + } + + typedef table-features-prop-type { + type enumeration { + enum OFPTFPT_INSTRUCTIONS { + value 0; + description "Instructions property."; + } + enum OFPTFPT_INSTRUCTIONS_MISS { + value 1; + description "Instructions for table-miss."; + } + enum OFPTFPT_NEXT_TABLES { + value 2; + description "Next Table property."; + } + enum OFPTFPT_NEXT_TABLES_MISS { + value 3; + description "Next Table for table-miss."; + } + enum OFPTFPT_WRITE_ACTIONS { + value 4; + description "Write Actions property."; + } + enum OFPTFPT_WRITE_ACTIONS_MISS { + value 5; + description "Write Actions for table-miss."; + } + enum OFPTFPT_APPLY_ACTIONS { + value 6; + description "Apply Actions property."; + } + enum OFPTFPT_APPLY_ACTIONS_MISS { + value 7; + description "Apply Actions for table-miss."; + } + enum OFPTFPT_MATCH { + value 8; + description "Match property."; + } + enum OFPTFPT_WILDCARDS { + value 10; + description "Wildcards property."; + } + enum OFPTFPT_WRITE_SETFIELD { + value 12; + description "Write Set-Field property."; + } + enum OFPTFPT_WRITE_SETFIELD_MISS { + value 13; + description "Write Set-Field for table-miss."; + } + enum OFPTFPT_APPLY_SETFIELD { + value 14; + description "Apply Set-Field property."; + } + enum OFPTFPT_APPLY_SETFIELD_MISS { + value 15; + description "Apply Set-Field for table-miss."; + } + enum OFPTFPT_EXPERIMENTER { + value 65534; + description "Experimenter property."; + } + enum OFPTFPT_EXPERIMENTER_MISS { + value 65535; //0xffff + description "Experimenter for table-miss."; + } + } + } + + typedef group-types { + /* ofp_group_type */ + type bits { + bit OFPGT_ALL { + description "All (multicast/broadcast) group."; + position 0; + } + bit OFPGT_SELECT { + description "Select group."; + position 1; + } + bit OFPGT_INDIRECT { + description "Indirect group."; + position 2; + } + bit OFPGT_FF { + description "Fast failover group."; + position 3; + } + } + } + + typedef group-capabilities { + /* ofp_group_capabilities */ + type bits { + bit OFPGFC_SELECT_WEIGHT { + description "Support weight for select groups"; + position 0; + } + bit OFPGFC_SELECT_LIVENESS { + description "Support liveness for select groups"; + position 1; + } + bit OFPGFC_CHAINING { + description "Support chaining group"; + position 2; + } + bit OFPGFC_CHAINING_CHECKS { + description "Check chaining for loops and delete"; + position 3; + } + } + } + + typedef ipv6-exthdr-flags { + description "Bit definitions for IPv6 Extension Header pseudo-field."; + type bits { + bit nonext { + description " encountered."; + position 0; + } + bit esp { + description "Encrypted Sec Payload header present."; + position 1; + } + bit auth { + description "Authentication header present."; + position 2; + } + bit dest { + description "1 or 2 dest headers present."; + position 3; + } + bit frag { + description "Fragment header present."; + position 4; + } + bit router { + description "Router header present."; + position 5; + } + bit hop { + description "Hop-by-hop header present."; + position 6; + } + bit unrep { + description "Unexpected repeats encountered."; + position 7; + } + bit unseq { + description "Unexpected sequencing encountered."; + position 8; + } + } + } + +// OPENFLOW v1.0 STRUCTURES + // Structures under this line are needed to support OpenFlow version 1.0 + // wire protocol 0x01; + + typedef error-type-v10 { + type enumeration { + enum HELLO_FAILED { + value 0; + description "Hello Protocol failed."; + } + enum BAD_REQUEST { + value 1; + description "Request was not understood."; + } + enum BAD_ACTION { + value 2; + description "Error in action description."; + } + enum FLOW_MOD_FAILED { + value 3; + description "Problem modifying flow entry."; + } + enum PORT_MOD_FAILED { + value 4; + description "Port mod request failed."; + } + enum QUEUE_OP_FAILED { + value 5; + description "Queue operation failed."; + } + } + } + + typedef hello-failed-code-v10 { + type enumeration { + enum INCOMPATIBLE { + value 0; + description "Hello Protocol failed."; + } + enum EPERM { + value 1; + description "Request was not understood."; + } + } + } + + typedef bad-request-code-v10 { + type enumeration { + enum BAD_VERSION { + value 0; + } + enum BAD_TYPE { + value 1; + } + enum BAD_STAT { + value 2; + } + enum BAD_VENDOR { + value 3; + } + enum BAD_SUBTYPE { + value 4; + } + enum EPERM { + value 5; + } + enum BAD_LEN { + value 6; + } + enum BUFFER_EMPTY { + value 7; + } + enum BUFFER_UNKNOWN { + value 8; + } + } + } + + typedef bad-action-code-v10 { + type enumeration { + enum BAD_TYPE { + value 0; + } + enum BAD_LEN { + value 1; + } + enum VENDOR { + value 2; + } + enum BAD_VENDOR_TYPE { + value 3; + } + enum BAD_OUT_PORT { + value 4; + } + enum BAD_ARGUMENT { + value 5; + } + enum EPERM { + value 6; + } + enum TOO_MANY { + value 7; + } + enum BAD_QUEUE { + value 8; + } + } + } + + typedef flow-mod-failed-code-v10 { + type enumeration { + enum ALL_TABLES_FULL { + value 0; + } + enum OVERLAP { + value 1; + } + enum EPERM { + value 2; + } + enum BAD_EMERG_TIMEOUT { + value 3; + } + enum BAD_COMMAND { + value 4; + } + enum UNSUPPORTED { + value 5; + } + } + } + + typedef port-mod-failed-code-v10 { + type enumeration { + enum BAD_PORT { + value 0; + } + enum BAD_HW_ADDR { + value 1; + } + } + } + + typedef queue-op-failed-code-v10 { + type enumeration { + enum BAD_PORT { + value 0; + } + enum BAD_QUEUE { + value 1; + } + enum EPERM { + value 2; + } + } + } + + typedef port-number-values-v10 { + description "Port numbering. Physical ports are numbered starting from 1."; + type enumeration { + enum MAX { + value 65280; // 0xff00 + } + enum IN_PORT { + description "Send the packet out the input port. This + virtual port must be explicitly used + in order to send back out of the input + port."; + value 65528; // 0xfff8 + } + enum TABLE { + description "Perform actions in flow table. + NB: This can only be the destination + port for packet-out messages."; + value 65529; // 0xfff9 + } + enum NORMAL { + description "Process with normal L2/L3 switching."; + value 65530; // 0xfffa + } + enum FLOOD { + description "All physical ports except input port and + those disabled by STP."; + value 65531; // 0xfffb + } + enum ALL { + description "All physical ports except input port."; + value 65532; // 0xfffc + } + enum CONTROLLER { + description "Send to controller."; + value 65533; // 0xfffd + } + enum LOCAL { + description "Local openflow \"port\"."; + value 65534; // 0xfffe + } + enum NONE { + description "Not associated with a physical port."; + value 65535; // 0xffff + } + } + } + + typedef port-config-v10 { + description + "Flags to indicate behavior of the physical port. These flags are + describe the current configuration and used port_mod message + to configure the port's behavior."; + type bits { + bit port-down { + description " Port is administratively down."; + position 0; + } + bit no-stp { + description "Disable 802.1D spanning tree on port."; + position 1; + } + bit no-recv { + description " Drop all packets received by port."; + position 2; + } + bit no-recv-stp { + description " Drop received 802.1D STP packets."; + position 3; + } + bit no-flood { + description " Do not include this port when flooding."; + position 4; + } + bit no-fwd { + description " Drop packets forwarded to port."; + position 5; + } + bit no-packet-in { + description "Do not send packet-in msgs for port."; + position 6; + } + } + } + + typedef port-state-v10 { + description "Current state of the physical port. These are not configurable from + the controller."; + type bits { + bit link_down { + description "No physical link present."; + position 0; + } + bit blocked { + description "Port is blocked"; + position 1; + } + bit live { + description "Live for Fast Failover Group."; + position 2; + } + bit stp_listen { + description "Not learning or relaying frames."; + } + bit stp_learn { + description "Learning but not relaying frames."; + } + bit stp_forward { + description "Learning and relaying frames."; + } + bit stp_block { + description "Not part of spanning tree."; + } + bit stp_mask { + description "Bit mask for OFPPS_STP_* values."; + } + } + } + + typedef port-features-v10 { + description "Features of ports available in datapath."; + reference "ofp_port_features"; + type bits { + bit _10mb-hd { + position 0; + description "10 Mb half-duplex rate support."; + } + bit _10mb-fd { + position 1; + description "10 Mb full-duplex rate support."; + } + bit _100mb-hd { + position 2; + description "100 Mb half-duplex rate support."; + } + bit _100mb-fd { + position 3; + description "100 Mb full-duplex rate support."; + } + bit _1gb-hd { + position 4; + description "1 Gb half-duplex rate support."; + } + bit _1gb-fd { + position 5; + description "1 Gb full-duplex rate support."; + } + bit _10gb-fd { + position 6; + description "10 Gb full-duplex rate support."; + } + bit copper { + position 7; + description "Copper medium."; + } + bit fiber { + position 8; + description "Fiber medium."; + } + bit autoneg { + position 9; + description "Auto-negotiation."; + } + bit pause { + position 10; + description "Pause."; + } + bit pause-asym { + position 11; + description "Asymmetric pause."; + } + } + } + + typedef capabilities-v10 { + type bits { + bit OFPC_FLOW_STATS { + position 0; + description "Flow statistics."; + } + bit OFPC_TABLE_STATS { + position 1; + description "Table statistics."; + } + bit OFPC_PORT_STATS { + position 2; + description "Port statistics."; + } + bit OFPC_STP { + position 3; + description "802.1d spanning tree."; + } + bit OFPC_RESERVED { + position 4; + description "Reserved, must be zero."; + } + bit OFPC_IP_REASM { + position 5; + description "Can reassemble IP fragments."; + } + bit OFPC_QUEUE_STATS { + position 6; + description "Queue statistics."; + } + bit OFPC_ARP_MATCH_IP { + position 8; + description "Match IP addresses in ARP pkts."; + } + } + } + + typedef flow-mod-flags-v10 { + /* ofp_flow_mod_flags */ + type bits { + bit OFPFF_SEND_FLOW_REM { + position 0; + description "Send flow removed message when flow expires or is deleted."; + } + bit OFPFF_CHECK_OVERLAP { + position 1; + description "Check for overlapping entries first."; + } + bit OFPFF_EMERG { + position 2; + description "Reset flow packet and byte counts."; + } + } + } + + typedef action-type-v10 { + /* ofp_action_type */ + type bits { + bit OFPAT_OUTPUT { + position 0; + description "Output to switch port."; + } + bit OFPAT_SET_VLAN_VID { + position 1; + description "Set the 802.1q VLAN id."; + } + bit OFPAT_SET_VLAN_PCP { + position 2; + description "Set the 802.1q priority."; + } + bit OFPAT_STRIP_VLAN { + position 3; + description "Strip the 802.1q header."; + } + bit OFPAT_SET_DL_SRC { + position 4; + description "Ethernet source address."; + } + bit OFPAT_SET_DL_DST { + position 5; + description "Ethernet destination address."; + } + bit OFPAT_SET_NW_SRC { + position 6; + description "IP source address."; + } + bit OFPAT_SET_NW_DST { + position 7; + description "IP destination address."; + } + bit OFPAT_SET_NW_TOS { + position 8; + description "IP ToS (DSCP field, 6 bits)."; + } + bit OFPAT_SET_TP_SRC { + position 9; + description "TCP/UDP source port."; + } + bit OFPAT_SET_TP_DST { + position 10; + description "TCP/UDP destination port."; + } + bit OFPAT_ENQUEUE { + position 11; + description "Output to queue."; + } + bit OFPAT_VENDOR { + position 12; + description "Experimenter in later versions."; + } + } + } + + typedef flow-wildcards-v10 { + /* ofp_flow_wildcards */ + description "Flow wildcards - NW_SRC_MASK & NW_DST_MASK are handled separately"; + type bits { + bit IN_PORT { + description "Switch input port."; + position 0; + } + bit DL_VLAN { + description "VLAN id."; + position 1; + } + bit DL_SRC { + description "Ethernet source address."; + position 2; + } + bit DL_DST { + description "Ethernet destination address."; + position 3; + } + bit DL_TYPE { + description "Ethernet frame type."; + position 4; + } + bit NW_PROTO { + description "IP protocol."; + position 5; + } + bit TP_SRC { + description "TCP/UDP source port."; + position 6; + } + bit TP_DST { + description "TCP/UDP destination port."; + position 7; + } + bit DL_VLAN_PCP { + description "VLAN priority."; + position 20; + } + bit NW_TOS { + description "IP ToS (DSCP field, 6 bits)."; + position 21; + } + } + } + +} diff --git a/experimental/odp/openflowplugin-experimenter-types.yang b/experimental/odp/openflowplugin-experimenter-types.yang new file mode 100644 index 000000000..f8c0d80a9 --- /dev/null +++ b/experimental/odp/openflowplugin-experimenter-types.yang @@ -0,0 +1,28 @@ +module openflowplugin-experimenter-types { + namespace "urn:opendaylight:openflowplugin:experimenter:types"; + prefix exp-type; + + import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; } + + revision "2015-10-20" { + description "Initial revision of experimenter basic types"; + } + + grouping experimenter-core-message { + choice experimenter-message-of-choice { + // to be augmented by vendors + } + } + + augment "/multipart:multipart-reply/multipart:multipart-reply-body" { + case multipart-reply-experimenter { + uses experimenter-core-message; + } + } + + augment "/multipart:multipart-request/multipart:multipart-request-body" { + case multipart-request-experimenter { + uses experimenter-core-message; + } + } +} diff --git a/experimental/odp/openflowplugin-extension-general.yang b/experimental/odp/openflowplugin-extension-general.yang new file mode 100755 index 000000000..187f06b1c --- /dev/null +++ b/experimental/odp/openflowplugin-extension-general.yang @@ -0,0 +1,213 @@ +module openflowplugin-extension-general { + yang-version 1; + + namespace "urn:opendaylight:openflowplugin:extension:general"; + prefix "openflowplugin-extension-general"; + + import yang-ext {prefix ext; revision-date "2013-07-09";} + import flow-node-inventory {prefix fni; revision-date 2013-08-19; } + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + import sal-flow {prefix sal-flow;revision-date "2013-08-19";} + import sal-group {prefix sal-group;revision-date "2013-09-18";} + import packet-processing {prefix sal-packet;revision-date "2013-07-09";} + import opendaylight-flow-statistics {prefix odl-flow-stats;revision-date "2013-08-19";} + import opendaylight-group-statistics {prefix odl-group-stats;revision-date "2013-11-11";} + import opendaylight-direct-statistics {prefix odl-direct-stats;revision-date "2016-05-11";} + + + description + "Everything for a vendor who want to implement openflow extensions."; + + revision "2014-07-14" { + description "Initial revision"; + } + + identity extension-key { + description "Base identity for all extension keys."; + } + + grouping general-extension-grouping { + leaf extension-key { + type identityref { + base extension-key; + } + } + container extension { + description "A vendor has to augment this container."; + } + } + + grouping general-extension-list-grouping { + list extension-list { + key extension-key; + uses general-extension-grouping; + } + } + + + + + // MATCH augmentations + // RPCS + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:match" { + ext:augment-identifier "general-aug-match-rpc-add-flow"; + uses general-extension-list-grouping; + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:match" { + ext:augment-identifier "general-aug-match-rpc-remove-flow"; + uses general-extension-list-grouping; + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:match" { + ext:augment-identifier "general-aug-match-rpc-update-flow-original"; + uses general-extension-list-grouping; + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:match" { + ext:augment-identifier "general-aug-match-rpc-update-flow-updated"; + uses general-extension-list-grouping; + } + + // DATA + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:match" { + ext:augment-identifier "general-aug-match-nodes-node-table-flow"; + uses general-extension-list-grouping; + } + augment "/sal-packet:packet-in-message/sal-packet:match" { + ext:augment-identifier "general-aug-match-packet-in-message"; + uses general-extension-list-grouping; + } + + // NOTIFICATIONS + augment "/sal-flow:switch-flow-removed/sal-flow:match" { + ext:augment-identifier "general-aug-match-notif-switch-flow-removed"; + uses general-extension-list-grouping; + } + augment "/sal-packet:packet-received/sal-packet:match" { + ext:augment-identifier "general-aug-match-notif-packet-in"; + uses general-extension-list-grouping; + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:match" { + ext:augment-identifier "general-aug-match-notif-update-flow-stats"; + uses general-extension-list-grouping; + } + + augment "/odl-direct-stats:get-flow-statistics/odl-direct-stats:output/odl-direct-stats:flow-and-statistics-map-list/odl-direct-stats:match" { + ext:augment-identifier "general-aug-match-rpc-output-flow-stats"; + uses general-extension-list-grouping; + } + + // VENDOR EXAMPLE -- testing purposes -> remove later! + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:match/extension-list/extension" { + ext:augment-identifier "vendor-xxx1"; + uses vendor-xxx-grouping; + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:match/extension-list/extension" { + ext:augment-identifier "vendor-xxx2"; + uses vendor-xxx-grouping; + } + grouping vendor-xxx-grouping { + leaf dos-ekis { + type string; + } + } + // -----^^^^----- + + + // SetField augmentations + // RPCS + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action/sal-flow:set-field-case/sal-flow:set-field" { + ext:augment-identifier "general-aug-match-rpc-add-flow-write-actions-set-field"; + uses general-extension-list-grouping; + } + + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action/sal-flow:set-field-case/sal-flow:set-field" { + ext:augment-identifier "general-aug-match-rpc-add-flow-apply-actions-set-field"; + uses general-extension-list-grouping; + } + + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action/sal-flow:set-field-case/sal-flow:set-field" { + ext:augment-identifier "general-aug-match-rpc-remove-flow-write-actions-set-field"; + uses general-extension-list-grouping; + } + + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action/sal-flow:set-field-case/sal-flow:set-field" { + ext:augment-identifier "general-aug-match-rpc-remove-flow-apply-actions-set-field"; + uses general-extension-list-grouping; + } + + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action/sal-flow:set-field-case/sal-flow:set-field" { + ext:augment-identifier "general-aug-match-rpc-update-flow-original-write-actions-set-field"; + uses general-extension-list-grouping; + } + + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action/sal-flow:set-field-case/sal-flow:set-field" { + ext:augment-identifier "general-aug-match-rpc-update-flow-original-apply-actions-set-field"; + uses general-extension-list-grouping; + } + + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action/sal-flow:set-field-case/sal-flow:set-field" { + ext:augment-identifier "general-aug-match-rpc-update-flow-updated-write-actions-set-field"; + uses general-extension-list-grouping; + } + + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action/sal-flow:set-field-case/sal-flow:set-field" { + ext:augment-identifier "general-aug-match-rpc-update-flow-updated-apply-actions-set-field"; + uses general-extension-list-grouping; + } + + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action/sal-group:set-field-case/sal-group:set-field" { + ext:augment-identifier "general-aug-match-rpc-add-group-set-field"; + uses general-extension-list-grouping; + } + + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action/sal-group:set-field-case/sal-group:set-field" { + ext:augment-identifier "general-aug-match-rpc-remove-group-set-field"; + uses general-extension-list-grouping; + } + + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action/sal-group:set-field-case/sal-group:set-field" { + ext:augment-identifier "general-aug-match-rpc-update-group-original-set-field"; + uses general-extension-list-grouping; + } + + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action/sal-group:set-field-case/sal-group:set-field" { + ext:augment-identifier "general-aug-match-rpc-update-group-updated-set-field"; + uses general-extension-list-grouping; + } + + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action/sal-packet:set-field-case/sal-packet:set-field" { + ext:augment-identifier "general-aug-match-rpc-transmit-packet-set-field"; + uses general-extension-list-grouping; + } + + // DATA + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action/fni:set-field-case/fni:set-field" { + ext:augment-identifier "general-aug-match-nodes-node-table-flow-write-actions-set-field"; + uses general-extension-list-grouping; + } + + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action/fni:set-field-case/fni:set-field" { + ext:augment-identifier "general-aug-match-nodes-node-table-flow-apply-actions-set-field"; + uses general-extension-list-grouping; + } + + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action/fni:set-field-case/fni:set-field" { + ext:augment-identifier "general-aug-match-nodes-node-group-buckets-bucket-actions-set-field"; + uses general-extension-list-grouping; + } + + // NOTIFICATIONS + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action/odl-flow-stats:set-field-case/odl-flow-stats:set-field" { + ext:augment-identifier "general-aug-match-notif-flows-statistics-update-write-actions-set-field"; + uses general-extension-list-grouping; + } + + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action/odl-flow-stats:set-field-case/odl-flow-stats:set-field" { + ext:augment-identifier "general-aug-match-notif-flows-statistics-update-apply-actions-set-field"; + uses general-extension-list-grouping; + } + + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action/odl-group-stats:set-field-case/odl-group-stats:set-field" { + ext:augment-identifier "general-aug-match-notif-group-desc-stats-updated-set-field"; + uses general-extension-list-grouping; + } +} diff --git a/experimental/odp/openflowplugin-extension-nicira-action.yang b/experimental/odp/openflowplugin-extension-nicira-action.yang new file mode 100644 index 000000000..83c168653 --- /dev/null +++ b/experimental/odp/openflowplugin-extension-nicira-action.yang @@ -0,0 +1,1948 @@ +module openflowplugin-extension-nicira-action { + yang-version 1; + + namespace "urn:opendaylight:openflowplugin:extension:nicira:action"; + prefix "openflowplugin-nicira-action"; + + import yang-ext {prefix ext; revision-date "2013-07-09";} + import flow-node-inventory {prefix fni; revision-date 2013-08-19; } + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + import sal-flow {prefix sal-flow;revision-date "2013-08-19";} + import sal-group {prefix sal-group;revision-date "2013-09-18";} + import packet-processing {prefix sal-packet;revision-date "2013-07-09";} + import opendaylight-flow-statistics {prefix odl-flow-stats;revision-date "2013-08-19";} + import opendaylight-group-statistics {prefix odl-group-stats;revision-date "2013-11-11";} + import nicira-match {prefix nicira-match;revision-date "2014-04-21";} + import openflowplugin-extension-general {prefix ext-gen;revision-date "2014-07-14";} + import openflow-action {prefix ofaction;revision-date "2015-02-03";} + import nicira-action {prefix nicira-action;revision-date "2014-04-21";} + import opendaylight-direct-statistics {prefix directstat;revision-date "2016-05-11";} + import ietf-inet-types { prefix "inet"; revision-date "2013-07-15"; } + import opendaylight-match-types {prefix match; revision-date "2013-10-26";} + + description + "Nicira openflow action extensions."; + + revision "2014-07-14" { + description "Initial revision"; + } + + identity nx-action-reg-load-key { + base ext-gen:extension-key; + } + identity nx-action-reg-move-key { + base ext-gen:extension-key; + } + + grouping nxm-nx-reg-grouping { + leaf nx-reg { + type identityref { + base nicira-match:nxm-nx-reg; + } + } + } + grouping nxm-nx-tun-id-grouping { + leaf nx-tun-id { + type empty; + } + } + grouping nxm-nx-arp-sha-grouping { + leaf nx-arp-sha { + type empty; + } + } + grouping nxm-nx-arp-tha-grouping { + leaf nx-arp-tha { + type empty; + } + } + grouping oxm-of-mpls-label-grouping { + leaf of-mpls-label { + type empty; + } + } + grouping oxm-of-metadata-grouping { + leaf of-metadata { + type empty; + } + } + grouping nxm-of-arp-op-grouping { + leaf of-arp-op { + type empty; + } + } + grouping nxm-of-arp-spa-grouping { + leaf of-arp-spa { + type empty; + } + } + grouping nxm-of-arp-tpa-grouping { + leaf of-arp-tpa { + type empty; + } + } + grouping nxm-of-in-port-grouping { + leaf of-in-port { + type empty; + } + } + grouping nxm-nx-tun-ipv4-dst-grouping { + leaf nx-tun-ipv4-dst { + type empty; + } + } + grouping nxm-nx-tun-ipv4-src-grouping { + leaf nx-tun-ipv4-src { + type empty; + } + } + grouping nxm-of-eth-src-grouping { + leaf of-eth-src { + type empty; + } + } + grouping nxm-of-eth-dst-grouping { + leaf of-eth-dst { + type empty; + } + } + grouping nxm-of-eth-type-grouping { + leaf of-eth-type { + type empty; + } + } + grouping nxm-nx-nsp-grouping { + leaf nx-nsp-dst { + type empty; + } + } + grouping nxm-nx-nsi-grouping { + leaf nx-nsi-dst { + type empty; + } + } + grouping nxm-nx-nshc-1-grouping { + leaf nx-nshc-1-dst { + type empty; + } + } + grouping nxm-nx-nshc-2-grouping { + leaf nx-nshc-2-dst { + type empty; + } + } + grouping nxm-nx-nshc-3-grouping { + leaf nx-nshc-3-dst { + type empty; + } + } + grouping nxm-nx-nshc-4-grouping { + leaf nx-nshc-4-dst { + type empty; + } + } + grouping nxm-of-ip-src-grouping { + leaf of-ip-src { + type empty; + } + } + grouping nxm-of-ip-dst-grouping { + leaf of-ip-dst { + type empty; + } + } + grouping nxm-nx-ipv6-src-grouping { + leaf nx-ipv6-src { + type empty; + } + } + grouping nxm-nx-ipv6-dst-grouping { + leaf nx-ipv6-dst { + type empty; + } + } + grouping nxm-of-icmp-type-grouping { + leaf of-icmp-type { + type empty; + } + } + grouping nxm-nx-nsh-flags-grouping { + leaf nx-nsh-flags { + type empty; + } + } + grouping nxm-nx-nsh-mdtype-grouping { + leaf nx-nsh-mdtype { + type empty; + } + } + grouping nxm-nx-nsh-np-grouping { + leaf nx-nsh-np { + type empty; + } + } + grouping nxm-nx-nsh-ttl-grouping { + leaf nx-nsh-ttl { + type empty; + } + } + + grouping dst-choice-grouping { + choice dst-choice { + case dst-nx-reg-case { + uses nxm-nx-reg-grouping; + } + case dst-nx-tun-id-case { + uses nxm-nx-tun-id-grouping; + } + case dst-of-mpls-label-case { + uses oxm-of-mpls-label-grouping; + } + case dst-of-metadata-case { + uses oxm-of-metadata-grouping; + } + case dst-nx-arp-sha-case { + uses nxm-nx-arp-sha-grouping; + } + case dst-nx-arp-tha-case { + uses nxm-nx-arp-tha-grouping; + } + case dst-of-arp-op-case { + uses nxm-of-arp-op-grouping; + } + case dst-of-arp-spa-case { + uses nxm-of-arp-spa-grouping; + } + case dst-of-arp-tpa-case { + uses nxm-of-arp-tpa-grouping; + } + case dst-nx-of-in-port-case { + uses nxm-of-in-port-grouping; + } + case dst-nx-tun-ipv4-dst-case { + uses nxm-nx-tun-ipv4-dst-grouping; + } + case dst-nx-tun-ipv4-src-case { + uses nxm-nx-tun-ipv4-src-grouping; + } + case dst-of-eth-src-case { + uses nxm-of-eth-src-grouping; + } + case dst-of-eth-dst-case { + uses nxm-of-eth-dst-grouping; + } + case dst-nx-nsp-case { + uses nxm-nx-nsp-grouping; + } + case dst-nx-nsi-case { + uses nxm-nx-nsi-grouping; + } + case dst-nx-nshc-1-case { + uses nxm-nx-nshc-1-grouping; + } + case dst-nx-nshc-2-case { + uses nxm-nx-nshc-2-grouping; + } + case dst-nx-nshc-3-case { + uses nxm-nx-nshc-3-grouping; + } + case dst-nx-nshc-4-case { + uses nxm-nx-nshc-4-grouping; + } + case dst-of-ip-src-case { + uses nxm-of-ip-src-grouping; + } + case dst-of-ip-dst-case { + uses nxm-of-ip-dst-grouping; + } + case dst-nx-ipv6-src-case { + uses nxm-nx-ipv6-src-grouping; + } + case dst-nx-ipv6-dst-case { + uses nxm-nx-ipv6-dst-grouping; + } + case dst-of-icmp-type-case { + uses nxm-of-icmp-type-grouping; + } + case dst-nx-nsh-flags-case { + uses nxm-nx-nsh-flags-grouping; + } + case dst-nx-nsh-ttl-case { + uses nxm-nx-nsh-ttl-grouping; + } + } + } + + grouping src-choice-grouping { + choice src-choice { + case src-nx-reg-case { + uses nxm-nx-reg-grouping; + } + case src-nx-tun-id-case { + uses nxm-nx-tun-id-grouping; + } + case src-nx-of-mpls-label-case { + uses oxm-of-mpls-label-grouping; + } + case src-nx-of-metadata-case { + uses oxm-of-metadata-grouping; + } + case src-nx-arp-sha-case { + uses nxm-nx-arp-sha-grouping; + } + case src-nx-arp-tha-case { + uses nxm-nx-arp-tha-grouping; + } + case src-of-arp-op-case { + uses nxm-of-arp-op-grouping; + } + case src-of-arp-spa-case { + uses nxm-of-arp-spa-grouping; + } + case src-of-arp-tpa-case { + uses nxm-of-arp-tpa-grouping; + } + case src-nx-of-in-port-case { + uses nxm-of-in-port-grouping; + } + case src-nx-tun-ipv4-dst-case { + uses nxm-nx-tun-ipv4-dst-grouping; + } + case src-nx-tun-ipv4-src-case { + uses nxm-nx-tun-ipv4-src-grouping; + } + case src-of-eth-src-case { + uses nxm-of-eth-src-grouping; + } + case src-of-eth-dst-case { + uses nxm-of-eth-dst-grouping; + } + case src-of-eth-type-case { + uses nxm-of-eth-type-grouping; + } + case src-nx-nsp-case { + uses nxm-nx-nsp-grouping; + } + case src-nx-nsi-case { + uses nxm-nx-nsi-grouping; + } + case src-nx-nshc-1-case { + uses nxm-nx-nshc-1-grouping; + } + case src-nx-nshc-2-case { + uses nxm-nx-nshc-2-grouping; + } + case src-nx-nshc-3-case { + uses nxm-nx-nshc-3-grouping; + } + case src-nx-nshc-4-case { + uses nxm-nx-nshc-4-grouping; + } + case src-of-ip-src-case { + uses nxm-of-ip-src-grouping; + } + case src-of-ip-dst-case { + uses nxm-of-ip-dst-grouping; + } + case src-nx-ipv6-src-case { + uses nxm-nx-ipv6-src-grouping; + } + case src-nx-ipv6-dst-case { + uses nxm-nx-ipv6-dst-grouping; + } + case src-nx-nsh-flags-case { + uses nxm-nx-nsh-flags-grouping; + } + case src-nx-nsh-mdtype-case { + uses nxm-nx-nsh-mdtype-grouping; + } + case src-nx-nsh-np-case { + uses nxm-nx-nsh-np-grouping; + } + case src-nx-nsh-ttl-case { + uses nxm-nx-nsh-ttl-grouping; + } + } + } + + grouping range-grouping { + leaf start { + description "Include value."; + type uint16; + } + leaf end { + description "Include value."; + type uint16; + } + } + + grouping nx-action-reg-load-grouping { + container nx-reg-load { + container dst { + description "Writes value to bits start through end, inclusive, in field dst."; + uses dst-choice-grouping; + uses range-grouping; + } + leaf value { + type uint64; + } + } + } + + grouping nx-action-reg-move-grouping { + container nx-reg-move { + container src { + description "Writes value to bits start through end, inclusive, in field src."; + uses src-choice-grouping; + uses range-grouping; + } + container dst { + description "Writes value to bits start through end, inclusive, in field dst."; + uses dst-choice-grouping; + uses range-grouping; + } + } + } + grouping nx-action-output-reg-grouping { + container nx-output-reg { + container src { + description "Choose the register with the OpenFlow output port, using the number of +bits specified from the register."; + uses src-choice-grouping; + leaf ofs_nbits { + type uint16; + } + } + leaf max_len { + description "The number of bytes to send when the chosen port is OFPP_CONTROLLER"; + type uint16; + } + } + } + + grouping nx-action-resubmit-grouping { + container nx-resubmit { + description "Re-searches OpenFlow flow table (or the table whose number is specified by table) + with the in-port field replaced by port (if port is specified) and executes the actions found"; + leaf in-port { + type uint16; + default 0xfff8; // OFPP_INPORT + } + leaf table { + type uint8 { + range "0 .. 255"; + } + default 255; // Current Table + } + } + } + + grouping nx-action-fin-timeout-grouping { + container nx-action-fin-timeout { + leaf fin-idle-timeout { + type uint16; + } + leaf fin-hard-timeout { + type uint16; + } + } + } + + grouping nx-action-multipath-grouping { + container nx-multipath { + leaf fields { + type nicira-action:ofj-nx-hash-fields; + } + leaf basis { + type uint16; + default 0x400; + } + leaf algorithm { + type nicira-action:ofj-nx-mp-algorithm; + } + leaf max-link { + type uint16; + } + leaf arg { + type uint32; + } + container dst { + description "Writes value to bits start through end, inclusive, in field dst."; + uses dst-choice-grouping; + uses range-grouping; + } + } + } + + grouping nx-action-conntrack-grouping { + container nx-conntrack { + leaf flags { + type uint16; + } + leaf zone-src { + type uint32; + } + leaf conntrack-zone { + type uint16; + } + leaf recirc-table { + type uint8; + } + list ct-actions{ + uses ofpact-actions; + } + } + } + + grouping nx-action-ct-clear-grouping { + container nx-ct-clear { + presence "no content action"; + description "Clear Ct states from the flow"; + } + } + + grouping ofpact-actions { + description + "Actions to be performed with conntrack."; + choice ofpact-actions { + case nx-action-nat-case { + container nx-action-nat { + leaf flags { + type uint16; + } + leaf range_present { + type uint16; + } + leaf ip-address-min { + type inet:ip-address; + } + leaf ip-address-max { + type inet:ip-address; + } + leaf port-min { + type uint16; + } + leaf port-max { + type uint16; + } + } + } + case nx-action-ct-mark-case { + container nx-action-ct-mark { + leaf ct-mark { + type uint32; + } + // TODO: ct_mark mask is not supported yet + } + } + } + } + + grouping flow-mod-spec { + description + "flow mod spec indicates the actions that should be performed to create a new flow which was learned from learn action."; + choice flow-mod-spec{ + case flow-mod-add-match-from-field-case{ + container flow-mod-add-match-from-field{ + leaf flow-mod-num-bits{ + type uint16; + } + + leaf src-field{ + type uint32; + } + + leaf src-ofs{ + type uint16; + } + + leaf dst-field{ + type uint32; + } + + leaf dst-ofs{ + type uint16; + } + } + } + case flow-mod-add-match-from-value-case{ + container flow-mod-add-match-from-value{ + leaf flow-mod-num-bits{ + type uint16; + } + + leaf value{ + type uint16; + } + + leaf src-field{ + type uint32; + } + + leaf src-ofs{ + type uint16; + } + } + } + case flow-mod-copy-field-into-field-case{ + container flow-mod-copy-field-into-field{ + leaf flow-mod-num-bits{ + type uint16; + } + + leaf src-field{ + type uint32; + } + + leaf src-ofs{ + type uint16; + } + + leaf dst-field{ + type uint32; + } + + leaf dst-ofs{ + type uint16; + } + } + } + case flow-mod-copy-value-into-field-case{ + container flow-mod-copy-value-into-field{ + leaf flow-mod-num-bits{ + type uint16; + } + + leaf value{ + type uint16; + } + + leaf dst-field{ + type uint32; + } + + leaf dst-ofs{ + type uint16; + } + } + } + case flow-mod-output-to-port-case{ + container flow-mod-output-to-port{ + leaf flow-mod-num-bits{ + type uint16; + } + + leaf src-field{ + type uint32; + } + + leaf src-ofs{ + type uint16; + } + } + } + } + } + + grouping nx-action-learn-grouping { + container nx-learn { + leaf idle-timeout { + type uint16; + } + leaf hard-timeout { + type uint16; + } + leaf priority { + type uint16; + } + leaf cookie { + type uint64; + } + leaf flags { + type uint16; + } + leaf table-id { + type uint8; + } + leaf fin-idle-timeout { + type uint16; + } + leaf fin-hard-timeout { + type uint16; + } + + list flow-mods{ + uses flow-mod-spec; + } + } + } + + grouping nx-action-encap-grouping { + container nx-encap { + uses match:packet-type-fields { + refine packet-type { + mandatory true; + } + } + } + } + + grouping nx-action-decap-grouping { + container nx-decap { + uses match:packet-type-fields { + refine packet-type { + default "0xFFFE"; // USE NEXT PROTO + } + } + } + } + + grouping nx-action-dec-nsh-ttl-grouping { + container nx-dec-nsh-ttl { + presence "no content action"; + description "Decrease NSH TTL"; + } + } + + + // ACTION augmentations + // RPCS + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-reg-load-rpc-add-flow-write-actions-case { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-reg-move-rpc-add-flow-write-actions-case { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-output-reg-rpc-add-flow-write-actions-case { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-resubmit-rpc-add-flow-write-actions-case { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-fin-timeout-rpc-add-flow-write-actions-case { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-multipath-rpc-add-flow-write-actions-case { + uses nx-action-multipath-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-conntrack-rpc-add-flow-write-actions-case { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-ct-clear-rpc-add-flow-write-actions-case { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-learn-rpc-add-flow-write-actions-case { + uses nx-action-learn-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-encap-rpc-add-flow-write-actions-case { + uses nx-action-encap-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-decap-rpc-add-flow-write-actions-case { + uses nx-action-decap-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-dec-nsh-ttl-rpc-add-flow-write-actions-case { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-reg-load-rpc-add-flow-apply-actions-case { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-reg-move-rpc-add-flow-apply-actions-case { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-output-reg-rpc-add-flow-apply-actions-case { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-resubmit-rpc-add-flow-apply-actions-case { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-fin-timeout-rpc-add-flow-apply-actions-case { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-multipath-rpc-add-flow-apply-actions-case { + uses nx-action-multipath-grouping; + } + } + + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-conntrack-rpc-add-flow-apply-actions-case { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-ct-clear-rpc-add-flow-apply-actions-case { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-learn-rpc-add-flow-apply-actions-case { + uses nx-action-learn-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-encap-rpc-add-flow-apply-actions-case { + uses nx-action-encap-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-decap-rpc-add-flow-apply-actions-case { + uses nx-action-decap-grouping; + } + } + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-dec-nsh-ttl-rpc-add-flow-apply-actions-case { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-reg-load-rpc-remove-flow-write-actions-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-reg-move-rpc-remove-flow-write-actions-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-output-reg-rpc-remove-flow-write-actions-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-resubmit-rpc-remove-flow-write-actions-case { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-fin-timeout-rpc-remove-flow-write-actions-case { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-multipath-rpc-remove-flow-write-actions-case { + uses nx-action-multipath-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-conntrack-rpc-remove-flow-write-actions-case { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-ct-clear-rpc-remove-flow-write-actions-case { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-learn-rpc-remove-flow-write-actions-case { + uses nx-action-learn-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-encap-rpc-remove-flow-write-actions-case { + uses nx-action-encap-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-decap-rpc-remove-flow-write-actions-case { + uses nx-action-decap-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case nx-action-dec-nsh-ttl-rpc-remove-flow-write-actions-case { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-reg-load-rpc-remove-flow-apply-actions-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-reg-move-rpc-remove-flow-apply-actions-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-output-reg-rpc-remove-flow-apply-actions-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-resubmit-rpc-remove-flow-apply-actions-case { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-fin-timeout-rpc-remove-flow-apply-actions-case { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-multipath-rpc-remove-flow-apply-actions-case { + uses nx-action-multipath-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-conntrack-rpc-remove-flow-apply-actions-case { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-ct-clear-rpc-remove-flow-apply-actions-case { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-learn-rpc-remove-flow-apply-actions-case { + uses nx-action-learn-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-encap-rpc-remove-flow-apply-actions-case { + uses nx-action-encap-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-decap-rpc-remove-flow-apply-actions-case { + uses nx-action-decap-grouping; + } + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case nx-action-dec-nsh-ttl-rpc-remove-flow-apply-actions-case { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-reg-load-rpc-update-flow-original-write-actions-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-reg-move-rpc-update-flow-original-write-actions-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-output-reg-rpc-update-flow-original-write-actions-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-resubmit-rpc-update-flow-original-write-actions-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-fin-timeout-rpc-update-flow-original-write-actions-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-multipath-rpc-update-flow-original-write-actions-case" { + uses nx-action-multipath-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-conntrack-rpc-update-flow-original-write-actions-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-ct-clear-rpc-update-flow-original-write-actions-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-learn-rpc-update-flow-original-write-actions-case" { + uses nx-action-learn-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-encap-rpc-update-flow-original-write-actions-case" { + uses nx-action-encap-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-decap-rpc-update-flow-original-write-actions-case" { + uses nx-action-decap-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-dec-nsh-ttl-rpc-update-flow-original-write-actions-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-reg-load-rpc-update-flow-original-apply-actions-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-reg-move-rpc-update-flow-original-apply-actions-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-output-reg-rpc-update-flow-original-apply-actions-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-resubmit-rpc-update-flow-original-apply-actions-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-fin-timeout-rpc-update-flow-original-apply-actions-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-multipath-rpc-update-flow-original-apply-actions-case" { + uses nx-action-multipath-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-conntrack-rpc-update-flow-original-apply-actions-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-ct-clear-rpc-update-flow-original-apply-actions-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-learn-rpc-update-flow-original-apply-actions-case" { + uses nx-action-learn-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-encap-rpc-update-flow-original-apply-actions-case" { + uses nx-action-encap-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-decap-rpc-update-flow-original-apply-actions-case" { + uses nx-action-decap-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-dec-nsh-ttl-rpc-update-flow-original-apply-actions-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-reg-load-rpc-update-flow-updated-write-actions-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-reg-move-rpc-update-flow-updated-write-actions-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-output-reg-rpc-update-flow-updated-write-actions-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-resubmit-rpc-update-flow-updated-write-actions-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-fin-timeout-rpc-update-flow-updated-write-actions-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-multipath-rpc-update-flow-updated-write-actions-case" { + uses nx-action-multipath-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-conntrack-rpc-update-flow-updated-write-actions-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-ct-clear-rpc-update-flow-updated-write-actions-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-learn-rpc-update-flow-updated-write-actions-case" { + uses nx-action-learn-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-encap-rpc-update-flow-updated-write-actions-case" { + uses nx-action-encap-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-decap-rpc-update-flow-updated-write-actions-case" { + uses nx-action-decap-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:write-actions-case/sal-flow:write-actions/sal-flow:action/sal-flow:action" { + case "nx-action-dec-nsh-ttl-rpc-update-flow-updated-write-actions-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-reg-load-rpc-update-flow-updated-apply-actions-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-reg-move-rpc-update-flow-updated-apply-actions-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-output-reg-rpc-update-flow-updated-apply-actions-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-resubmit-rpc-update-flow-updated-apply-actions-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-fin-timeout-rpc-update-flow-updated-apply-actions-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-multipath-rpc-update-flow-updated-apply-actions-case" { + uses nx-action-multipath-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-conntrack-rpc-update-flow-updated-apply-actions-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-ct-clear-rpc-update-flow-updated-apply-actions-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-learn-rpc-update-flow-updated-apply-actions-case" { + uses nx-action-learn-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-encap-rpc-update-flow-updated-apply-actions-case" { + uses nx-action-encap-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-decap-rpc-update-flow-updated-apply-actions-case" { + uses nx-action-decap-grouping; + } + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:instructions/sal-flow:instruction/sal-flow:instruction/sal-flow:apply-actions-case/sal-flow:apply-actions/sal-flow:action/sal-flow:action" { + case "nx-action-dec-nsh-ttl-rpc-update-flow-updated-apply-actions-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-reg-load-rpc-add-group-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-reg-move-rpc-add-group-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-output-reg-rpc-add-group-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-resubmit-rpc-add-group-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-fin-timeout-rpc-add-group-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-multipath-rpc-add-group-case" { + uses nx-action-multipath-grouping; + } + } + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-conntrack-rpc-add-group-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-ct-clear-rpc-add-group-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-learn-rpc-add-group-case" { + uses nx-action-learn-grouping; + } + } + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-encap-rpc-add-group-case" { + uses nx-action-encap-grouping; + } + } + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-decap-rpc-add-group-case" { + uses nx-action-decap-grouping; + } + } + augment "/sal-group:add-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-dec-nsh-ttl-rpc-add-group-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-reg-load-rpc-remove-group-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-reg-move-rpc-remove-group-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-output-reg-rpc-remove-group-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-resubmit-rpc-remove-group-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-fin-timeout-rpc-remove-group-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-multipath-rpc-remove-group-case" { + uses nx-action-multipath-grouping; + } + } + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-conntrack-rpc-remove-group-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-ct-clear-rpc-remove-group-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-learn-rpc-remove-group-case" { + uses nx-action-learn-grouping; + } + } + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-encap-rpc-remove-group-case" { + uses nx-action-encap-grouping; + } + } + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-decap-rpc-remove-group-case" { + uses nx-action-decap-grouping; + } + } + augment "/sal-group:remove-group/sal-group:input/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-dec-nsh-ttl-rpc-remove-group-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-reg-load-rpc-update-group-original-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-reg-move-rpc-update-group-original-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-output-reg-rpc-update-group-original-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-resubmit-rpc-update-group-original-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-fin-timeout-rpc-update-group-original-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-multipath-rpc-update-group-original-case" { + uses nx-action-multipath-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-conntrack-rpc-update-group-original-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-ct-clear-rpc-update-group-original-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-learn-rpc-update-group-original-case" { + uses nx-action-learn-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-encap-rpc-update-group-original-case" { + uses nx-action-encap-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-decap-rpc-update-group-original-case" { + uses nx-action-decap-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:original-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-dec-nsh-ttl-rpc-update-group-original-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-reg-load-rpc-update-group-updated-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-reg-move-rpc-update-group-updated-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-output-reg-rpc-update-group-updated-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-resubmit-rpc-update-group-updated-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-fin-timeout-rpc-update-group-updated-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-multipath-rpc-update-group-updated-case" { + uses nx-action-multipath-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-conntrack-rpc-update-group-updated-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-ct-clear-rpc-update-group-updated-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-learn-rpc-update-group-updated-case" { + uses nx-action-learn-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-encap-rpc-update-group-updated-case" { + uses nx-action-encap-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-decap-rpc-update-group-updated-case" { + uses nx-action-decap-grouping; + } + } + augment "/sal-group:update-group/sal-group:input/sal-group:updated-group/sal-group:buckets/sal-group:bucket/sal-group:action/sal-group:action" { + case "nx-action-dec-nsh-ttl-rpc-update-group-updated-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action" { + case "nx-action-reg-load-rpc-transmit-packet-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action" { + case "nx-action-reg-move-rpc-transmit-packet-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action" { + case "nx-action-output-reg-rpc-transmit-packet-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action" { + case "nx-action-resubmit-rpc-transmit-packet-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action" { + case "nx-action-fin-timeout-rpc-transmit-packet-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action" { + case "nx-action-multipath-rpc-transmit-packet-case" { + uses nx-action-multipath-grouping; + } + } + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action" { + case "nx-action-conntrack-rpc-transmit-packet-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action" { + case "nx-action-ct-clear-rpc-transmit-packet-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action" { + case "nx-action-learn-rpc-transmit-packet-case" { + uses nx-action-learn-grouping; + } + } + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action" { + case "nx-action-encap-rpc-transmit-packet-case" { + uses nx-action-encap-grouping; + } + } + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action" { + case "nx-action-decap-rpc-transmit-packet-case" { + uses nx-action-decap-grouping; + } + } + augment "/sal-packet:transmit-packet/sal-packet:input/sal-packet:action/sal-packet:action" { + case "nx-action-dec-nsh-ttl-rpc-transmit-packet-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + // DATA + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action" { + case "nx-action-reg-load-nodes-node-table-flow-write-actions-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action" { + case "nx-action-reg-move-nodes-node-table-flow-write-actions-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action" { + case "nx-action-output-reg-nodes-node-table-flow-write-actions-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action" { + case "nx-action-resubmit-nodes-node-table-flow-write-actions-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action" { + case "nx-action-fin-timeout-nodes-node-table-flow-write-actions-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action" { + case "nx-action-multipath-nodes-node-table-flow-write-actions-case" { + uses nx-action-multipath-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action" { + case "nx-action-conntrack-nodes-node-table-flow-write-actions-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action" { + case "nx-action-ct-clear-nodes-node-table-flow-write-actions-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action" { + case "nx-action-learn-nodes-node-table-flow-write-actions-case" { + uses nx-action-learn-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action" { + case "nx-action-encap-nodes-node-table-flow-write-actions-case" { + uses nx-action-encap-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action" { + case "nx-action-decap-nodes-node-table-flow-write-actions-case" { + uses nx-action-decap-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:write-actions-case/fni:write-actions/fni:action/fni:action" { + case "nx-action-dec-nsh-ttl-nodes-node-table-flow-write-actions-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action" { + case "nx-action-reg-load-nodes-node-table-flow-apply-actions-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action" { + case "nx-action-reg-move-nodes-node-table-flow-apply-actions-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action" { + case "nx-action-output-reg-nodes-node-table-flow-apply-actions-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action" { + case "nx-action-resubmit-nodes-node-table-flow-apply-actions-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action" { + case "nx-action-fin-timeout-nodes-node-table-flow-apply-actions-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action" { + case "nx-action-multipath-nodes-node-table-flow-apply-actions-case" { + uses nx-action-multipath-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action" { + case "nx-action-conntrack-nodes-node-table-flow-apply-actions-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action" { + case "nx-action-ct-clear-nodes-node-table-flow-apply-actions-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action" { + case "nx-action-learn-nodes-node-table-flow-apply-actions-case" { + uses nx-action-learn-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action" { + case "nx-action-encap-nodes-node-table-flow-apply-actions-case" { + uses nx-action-encap-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action" { + case "nx-action-decap-nodes-node-table-flow-apply-actions-case" { + uses nx-action-decap-grouping; + } + } + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:instructions/fni:instruction/fni:instruction/fni:apply-actions-case/fni:apply-actions/fni:action/fni:action" { + case "nx-action-dec-nsh-ttl-nodes-node-table-flow-apply-actions-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action" { + case "nx-action-reg-load-nodes-node-group-buckets-bucket-actions-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action" { + case "nx-action-reg-move-nodes-node-group-buckets-bucket-actions-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action" { + case "nx-action-output-reg-nodes-node-group-buckets-bucket-actions-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action" { + case "nx-action-resubmit-nodes-node-group-buckets-bucket-actions-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action" { + case "nx-action-fin-timeout-nodes-node-group-buckets-bucket-actions-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action" { + case "nx-action-multipath-nodes-node-group-buckets-bucket-actions-case" { + uses nx-action-multipath-grouping; + } + } + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action" { + case "nx-action-conntrack-nodes-node-group-buckets-bucket-actions-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action" { + case "nx-action-ct-clear-nodes-node-group-buckets-bucket-actions-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action" { + case "nx-action-learn-nodes-node-group-buckets-bucket-actions-case" { + uses nx-action-learn-grouping; + } + } + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action" { + case "nx-action-encap-nodes-node-group-buckets-bucket-actions-case" { + uses nx-action-encap-grouping; + } + } + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action" { + case "nx-action-decap-nodes-node-group-buckets-bucket-actions-case" { + uses nx-action-decap-grouping; + } + } + augment "/inv:nodes/inv:node/fni:group/fni:buckets/fni:bucket/fni:action/fni:action" { + case "nx-action-dec-nsh-ttl-nodes-node-group-buckets-bucket-actions-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + // NOTIFICATIONS + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-reg-load-notif-flows-statistics-update-write-actions-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-reg-move-notif-flows-statistics-update-write-actions-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-output-reg-notif-flows-statistics-update-write-actions-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-resubmit-notif-flows-statistics-update-write-actions-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-fin-timeout-notif-flows-statistics-update-write-actions-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-multipath-notif-flows-statistics-update-write-actions-case" { + uses nx-action-multipath-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-conntrack-notif-flows-statistics-update-write-actions-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-ct-clear-notif-flows-statistics-update-write-actions-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-learn-notif-flows-statistics-update-write-actions-case" { + uses nx-action-learn-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-encap-notif-flows-statistics-update-write-actions-case" { + uses nx-action-encap-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-decap-notif-flows-statistics-update-write-actions-case" { + uses nx-action-decap-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:write-actions-case/odl-flow-stats:write-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-dec-nsh-ttl-notif-flows-statistics-update-write-actions-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-reg-load-notif-flows-statistics-update-apply-actions-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-reg-move-notif-flows-statistics-update-apply-actions-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-output-reg-notif-flows-statistics-update-apply-actions-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-resubmit-notif-flows-statistics-update-apply-actions-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-fin-timeout-notif-flows-statistics-update-apply-actions-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-multipath-notif-flows-statistics-update-apply-actions-case" { + uses nx-action-multipath-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-conntrack-notif-flows-statistics-update-apply-actions-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-ct-clear-notif-flows-statistics-update-apply-actions-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-learn-notif-flows-statistics-update-apply-actions-case" { + uses nx-action-learn-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-encap-notif-flows-statistics-update-apply-actions-case" { + uses nx-action-encap-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-decap-notif-flows-statistics-update-apply-actions-case" { + uses nx-action-decap-grouping; + } + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:instructions/odl-flow-stats:instruction/odl-flow-stats:instruction/odl-flow-stats:apply-actions-case/odl-flow-stats:apply-actions/odl-flow-stats:action/odl-flow-stats:action" { + case "nx-action-dec-nsh-ttl-notif-flows-statistics-update-apply-actions-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action" { + case "nx-action-reg-load-notif-group-desc-stats-updated-case" { + uses nx-action-reg-load-grouping; + } + } + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action" { + case "nx-action-reg-move-notif-group-desc-stats-updated-case" { + uses nx-action-reg-move-grouping; + } + } + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action" { + case "nx-action-output-reg-notif-group-desc-stats-updated-case" { + uses nx-action-output-reg-grouping; + } + } + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action" { + case "nx-action-resubmit-notif-group-desc-stats-updated-case" { + uses nx-action-resubmit-grouping; + } + } + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action" { + case "nx-action-fin-timeout-notif-group-desc-stats-updated-case" { + uses nx-action-fin-timeout-grouping; + } + } + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action" { + case "nx-action-multipath-notif-group-desc-stats-updated-case" { + uses nx-action-multipath-grouping; + } + } + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action" { + case "nx-action-conntrack-notif-group-desc-stats-updated-case" { + uses nx-action-conntrack-grouping; + } + } + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action" { + case "nx-action-ct-clear-notif-group-desc-stats-updated-case" { + uses nx-action-ct-clear-grouping; + } + } + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action" { + case "nx-action-learn-notif-group-desc-stats-updated-case" { + uses nx-action-learn-grouping; + } + } + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action" { + case "nx-action-encap-notif-group-desc-stats-updated-case" { + uses nx-action-encap-grouping; + } + } + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action" { + case "nx-action-decap-notif-group-desc-stats-updated-case" { + uses nx-action-decap-grouping; + } + } + augment "/odl-group-stats:group-desc-stats-updated/odl-group-stats:group-desc-stats/odl-group-stats:buckets/odl-group-stats:bucket/odl-group-stats:action/odl-group-stats:action" { + case "nx-action-dec-nsh-ttl-notif-group-desc-stats-updated-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + augment "/directstat:get-flow-statistics/directstat:output/directstat:flow-and-statistics-map-list/directstat:instructions/directstat:instruction/directstat:instruction/directstat:apply-actions-case/directstat:apply-actions/directstat:action/directstat:action" { + case "nx-action-reg-load-notif-direct-statistics-update-apply-actions-case" { + uses nx-action-reg-load-grouping; + } + case "nx-action-reg-move-notif-direct-statistics-update-apply-actions-case" { + uses nx-action-reg-move-grouping; + } + case "nx-action-output-reg-notif-direct-statistics-update-apply-actions-case" { + uses nx-action-output-reg-grouping; + } + case "nx-action-resubmit-notif-direct-statistics-update-apply-actions-case" { + uses nx-action-resubmit-grouping; + } + case "nx-action-fin-timeout-notif-direct-statistics-update-apply-actions-case" { + uses nx-action-fin-timeout-grouping; + } + case "nx-action-multipath-notif-direct-statistics-update-apply-actions-case" { + uses nx-action-multipath-grouping; + } + case "nx-action-conntrack-notif-direct-statistics-update-apply-actions-case" { + uses nx-action-conntrack-grouping; + } + case "nx-action-ct-clear-notif-direct-statistics-update-apply-actions-case" { + uses nx-action-ct-clear-grouping; + } + case "nx-action-learn-notif-direct-statistics-update-apply-actions-case" { + uses nx-action-learn-grouping; + } + case "nx-action-encap-notif-direct-statistics-update-apply-actions-case" { + uses nx-action-encap-grouping; + } + case "nx-action-decap-notif-direct-statistics-update-apply-actions-case" { + uses nx-action-decap-grouping; + } + case "nx-action-dec-nsh-ttl-notif-direct-statistics-update-apply-actions-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } + + augment "/directstat:get-flow-statistics/directstat:output/directstat:flow-and-statistics-map-list/directstat:instructions/directstat:instruction/directstat:instruction/directstat:write-actions-case/directstat:write-actions/directstat:action/directstat:action" { + case "nx-action-reg-load-notif-direct-statistics-update-write-actions-case" { + uses nx-action-reg-load-grouping; + } + case "nx-action-reg-move-notif-direct-statistics-update-write-actions-case" { + uses nx-action-reg-move-grouping; + } + case "nx-action-output-reg-notif-direct-statistics-update-write-actions-case" { + uses nx-action-output-reg-grouping; + } + case "nx-action-resubmit-notif-direct-statistics-update-write-actions-case" { + uses nx-action-resubmit-grouping; + } + case "nx-action-fin-timeout-notif-direct-statistics-update-write-actions-case" { + uses nx-action-fin-timeout-grouping; + } + case "nx-action-multipath-notif-direct-statistics-update-write-actions-case" { + uses nx-action-multipath-grouping; + } + case "nx-action-conntrack-notif-direct-statistics-update-write-actions-case" { + uses nx-action-conntrack-grouping; + } + case "nx-action-ct-clear-notif-direct-statistics-update-write-actions-case" { + uses nx-action-ct-clear-grouping; + } + case "nx-action-learn-notif-direct-statistics-update-write-actions-case" { + uses nx-action-learn-grouping; + } + case "nx-action-encap-notif-direct-statistics-update-write-actions-case" { + uses nx-action-encap-grouping; + } + case "nx-action-decap-notif-direct-statistics-update-write-actions-case" { + uses nx-action-decap-grouping; + } + case "nx-action-dec-nsh-ttl-notif-direct-statistics-update-write-actions-case" { + uses nx-action-dec-nsh-ttl-grouping; + } + } +} diff --git a/experimental/odp/openflowplugin-extension-nicira-match.yang b/experimental/odp/openflowplugin-extension-nicira-match.yang new file mode 100644 index 000000000..a8b2187b2 --- /dev/null +++ b/experimental/odp/openflowplugin-extension-nicira-match.yang @@ -0,0 +1,538 @@ +module openflowplugin-extension-nicira-match { + yang-version 1; + + namespace "urn:opendaylight:openflowplugin:extension:nicira:match"; + prefix "openflowplugin-nicira-match"; + + import yang-ext {prefix ext; revision-date "2013-07-09";} + import flow-node-inventory {prefix fni; revision-date 2013-08-19; } + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + import sal-flow {prefix sal-flow;revision-date "2013-08-19";} + import packet-processing {prefix sal-packet;revision-date "2013-07-09";} + import openflowplugin-extension-general {prefix ext-gen;revision-date "2014-07-14";} + import opendaylight-flow-statistics {prefix odl-flow-stats;revision-date "2013-08-19";} + import opendaylight-direct-statistics {prefix odl-direct-stats;revision-date "2016-05-11";} + import nicira-match {prefix nicira-match;revision-date "2014-04-21";} + import ietf-inet-types {prefix inet; revision-date "2013-07-15";} + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} + + description + "Nicira openflow match extensions."; + + revision "2014-07-14" { + description "Initial revision"; + } + + identity nxm-nx-reg0-key { + base ext-gen:extension-key; + } + identity nxm-nx-reg1-key { + base ext-gen:extension-key; + } + identity nxm-nx-reg2-key { + base ext-gen:extension-key; + } + identity nxm-nx-reg3-key { + base ext-gen:extension-key; + } + identity nxm-nx-reg4-key { + base ext-gen:extension-key; + } + identity nxm-nx-reg5-key { + base ext-gen:extension-key; + } + identity nxm-nx-reg6-key { + base ext-gen:extension-key; + } + identity nxm-nx-reg7-key { + base ext-gen:extension-key; + } + identity nxm-nx-tun-id-key { + base ext-gen:extension-key; + } + identity nxm-nx-arp-sha-key { + base ext-gen:extension-key; + } + identity nxm-nx-arp-tha-key { + base ext-gen:extension-key; + } + identity nxm-of-arp-op-key { + base ext-gen:extension-key; + } + identity nxm-of-arp-spa-key { + base ext-gen:extension-key; + } + identity nxm-of-arp-tpa-key { + base ext-gen:extension-key; + } + identity nxm-of-in-port-key { + base ext-gen:extension-key; + } + identity nxm-nx-tun-ipv4-dst-key { + base ext-gen:extension-key; + } + identity nxm-nx-tun-ipv4-src-key { + base ext-gen:extension-key; + } + identity nxm-of-eth-src-key { + base ext-gen:extension-key; + } + identity nxm-of-eth-dst-key { + base ext-gen:extension-key; + } + identity nxm-of-eth-type-key { + base ext-gen:extension-key; + } + identity nxm-nx-nsp-key { + base ext-gen:extension-key; + } + identity nxm-nx-nsi-key { + base ext-gen:extension-key; + } + identity nxm-nx-nshc-1-key { + base ext-gen:extension-key; + } + identity nxm-nx-nshc-2-key { + base ext-gen:extension-key; + } + identity nxm-nx-nshc-3-key { + base ext-gen:extension-key; + } + identity nxm-nx-nshc-4-key { + base ext-gen:extension-key; + } + identity nxm-of-tcp-src-key { + base ext-gen:extension-key; + } + identity nxm-of-tcp-dst-key { + base ext-gen:extension-key; + } + identity nxm-of-udp-src-key { + base ext-gen:extension-key; + } + identity nxm-of-udp-dst-key { + base ext-gen:extension-key; + } + identity nxm-nx-ct-mark-key { + base ext-gen:extension-key; + } + identity nxm-nx-ct-state-key { + base ext-gen:extension-key; + } + identity nxm-nx-ct-zone-key { + base ext-gen:extension-key; + } + identity nxm-nx-ct-tp-src-key { + base ext-gen:extension-key; + } + identity nxm-nx-ct-tp-dst-key { + base ext-gen:extension-key; + } + identity nxm-nx-pkt-mark-key { + base ext-gen:extension-key; + } + identity nxm-of-ip-dst-key { + base ext-gen:extension-key; + } + identity nxm-of-ip-src-key { + base ext-gen:extension-key; + } + identity nxm-of-icmp-type-key { + base ext-gen:extension-key; + } + identity nxm-nx-nsh-flags-key { + base ext-gen:extension-key; + } + identity nxm-nx-nsh-mdtype-key { + base ext-gen:extension-key; + } + identity nxm-nx-nsh-np-key { + base ext-gen:extension-key; + } + identity nxm-nx-nsh-ttl-key { + base ext-gen:extension-key; + } + grouping ipv4-address-grouping { + leaf ipv4-address { + type inet:ipv4-address; + } + } + grouping mac-address-grouping { + leaf mac-address { + type yang:mac-address; + } + } + + grouping nxm-nx-reg-grouping { + container nxm-nx-reg { + leaf reg { + type identityref { + base nicira-match:nxm-nx-reg; + } + } + leaf value { + type uint32; + } + leaf mask { + type uint32; + } + } + } + grouping nxm-nx-tun-id-grouping { + container nxm-nx-tun-id { + leaf value { + type uint64; + } + } + } + grouping nxm-nx-arp-sha-grouping { + container nxm-nx-arp-sha { + uses mac-address-grouping; + } + } + grouping nxm-nx-arp-tha-grouping { + container nxm-nx-arp-tha { + uses mac-address-grouping; + } + } + grouping nxm-of-arp-op-grouping { + container nxm-of-arp-op { + description "Prereqs: NXM_OF_ETH_TYPE must match either 0x0806 or 0x8035."; + leaf value { + type uint16; + } + } + } + grouping nxm-of-arp-spa-grouping { + container nxm-of-arp-spa { + description "Prereqs: NXM_OF_ETH_TYPE must match either 0x0806 or 0x8035."; + uses ipv4-address-grouping; + } + } + grouping nxm-of-in-port-grouping { + container of-in-port { + leaf value { + type uint16; + } + } + } + grouping nxm-of-tcp-src-grouping { + container nxm-of-tcp-src { + leaf port { + type inet:port-number; + } + leaf mask { + type uint16; + } + } + } + grouping nxm-of-tcp-dst-grouping { + container nxm-of-tcp-dst { + leaf port { + type inet:port-number; + } + leaf mask { + type uint16; + } + } + } + grouping nxm-of-udp-src-grouping { + container nxm-of-udp-src { + leaf port { + type inet:port-number; + } + leaf mask { + type uint16; + } + } + } + grouping nxm-of-udp-dst-grouping { + container nxm-of-udp-dst { + leaf port { + type inet:port-number; + } + leaf mask { + type uint16; + } + } + } + grouping nxm-of-arp-tpa-grouping { + container nxm-of-arp-tpa { + description "Prereqs: NXM_OF_ETH_TYPE must match either 0x0806 or 0x8035."; + uses ipv4-address-grouping; + } + } + grouping nxm-nx-tun-ipv4-dst-grouping { + container nxm-nx-tun-ipv4-dst { + uses ipv4-address-grouping; + } + } + grouping nxm-nx-tun-ipv4-src-grouping { + container nxm-nx-tun-ipv4-src { + uses ipv4-address-grouping; + } + } + grouping nxm-of-eth-src-grouping { + container nxm-of-eth-src { + uses mac-address-grouping; + } + } + grouping nxm-of-eth-dst-grouping { + container nxm-of-eth-dst { + uses mac-address-grouping; + } + } + grouping nxm-of-eth-type-grouping { + container nxm-of-eth-type { + leaf value { + type uint16; + } + } + } + grouping nxm-nx-nsp-grouping { + container nxm-nx-nsp { + leaf value { + type uint32; + } + } + } + grouping nxm-nx-nsi-grouping { + container nxm-nx-nsi { + leaf nsi { + type uint8; + } + } + } + grouping nxm-nx-nshc-1-grouping { + container nxm-nx-nshc-1 { + leaf value { + type uint32; + } + leaf mask { + type uint32; + } + } + } + grouping nxm-nx-nshc-2-grouping { + container nxm-nx-nshc-2 { + leaf value { + type uint32; + } + leaf mask { + type uint32; + } + } + } + grouping nxm-nx-nshc-3-grouping { + container nxm-nx-nshc-3 { + leaf value { + type uint32; + } + leaf mask { + type uint32; + } + } + } + grouping nxm-nx-nshc-4-grouping { + container nxm-nx-nshc-4 { + leaf value { + type uint32; + } + leaf mask { + type uint32; + } + } + } + grouping nxm-nx-ct-state-grouping { + container nxm-nx-ct-state { + leaf ct-state { + type uint32; + } + leaf mask { + type uint32; + } + } + } + grouping nxm-nx-ct-zone-grouping { + container nxm-nx-ct-zone { + leaf ct-zone { + type uint16; + } + } + } + grouping nxm-of-ip-dst-grouping { + container nxm-of-ip-dst { + uses ipv4-address-grouping; + } + } + grouping nxm-of-ip-src-grouping { + container nxm-of-ip-src { + uses ipv4-address-grouping; + } + } + grouping nxm-of-icmp-type-grouping { + container nxm-of-icmp-type { + leaf value { + type uint8; + } + } + } + grouping nxm-nx-nsh-flags-grouping { + container nxm-nx-nsh-flags { + leaf nsh-flags { + type uint8; + } + leaf mask { + type uint8; + } + } + } + grouping nxm-nx-nsh-mdtype-grouping { + container nxm-nx-nsh-mdtype { + leaf value { + type uint8; + } + } + } + grouping nxm-nx-nsh-np-grouping { + container nxm-nx-nsh-np { + leaf value { + type uint8; + } + } + } + grouping nxm-nx-nsh-ttl-grouping { + container nxm-nx-nsh-ttl { + leaf nsh-ttl { + type uint8; + } + } + } + grouping nxm-nx-ct-mark-grouping { + container nxm-nx-ct-mark { + leaf ct-mark { + type uint32; + } + leaf mask { + type uint32; + } + } + } + grouping nxm-nx-ct-tp-src-grouping { + container nxm-nx-ct-tp-src { + leaf ct-tp-src { + type uint16; + } + leaf mask { + type uint16; + } + } + } + grouping nxm-nx-ct-tp-dst-grouping { + container nxm-nx-ct-tp-dst { + leaf ct-tp-dst { + type uint16; + } + leaf mask { + type uint16; + } + } + } + grouping nxm-nx-pkt-mark-grouping { + container nxm-nx-pkt-mark { + leaf pkt-mark { + type uint32; + } + leaf mask { + type uint32; + } + } + } + + grouping all-matches-grouping { + uses nxm-nx-reg-grouping; + uses nxm-nx-tun-id-grouping; + uses nxm-nx-arp-sha-grouping; + uses nxm-nx-arp-tha-grouping; + uses nxm-of-arp-op-grouping; + uses nxm-of-arp-spa-grouping; + uses nxm-of-arp-tpa-grouping; + uses nxm-of-in-port-grouping; + uses nxm-nx-tun-ipv4-dst-grouping; + uses nxm-nx-tun-ipv4-src-grouping; + uses nxm-of-eth-src-grouping; + uses nxm-of-eth-dst-grouping; + uses nxm-of-eth-type-grouping; + uses nxm-nx-nsp-grouping; + uses nxm-nx-nsi-grouping; + uses nxm-nx-nshc-1-grouping; + uses nxm-nx-nshc-2-grouping; + uses nxm-nx-nshc-3-grouping; + uses nxm-nx-nshc-4-grouping; + uses nxm-nx-nsh-flags-grouping; + uses nxm-nx-nsh-mdtype-grouping; + uses nxm-nx-nsh-np-grouping; + uses nxm-nx-nsh-ttl-grouping; + uses nxm-of-tcp-src-grouping; + uses nxm-of-tcp-dst-grouping; + uses nxm-of-udp-src-grouping; + uses nxm-of-udp-dst-grouping; + uses nxm-nx-ct-state-grouping; + uses nxm-nx-ct-zone-grouping; + uses nxm-of-ip-dst-grouping; + uses nxm-of-ip-src-grouping; + uses nxm-of-icmp-type-grouping; + uses nxm-nx-ct-mark-grouping; + uses nxm-nx-ct-tp-src-grouping; + uses nxm-nx-ct-tp-dst-grouping; + uses nxm-nx-pkt-mark-grouping; + } + + // MATCH augmentations + // RPCS + augment "/sal-flow:add-flow/sal-flow:input/sal-flow:match/ext-gen:extension-list/ext-gen:extension" { + ext:augment-identifier "nx-aug-match-rpc-add-flow"; + uses all-matches-grouping; + } + augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:match/ext-gen:extension-list/ext-gen:extension" { + ext:augment-identifier "nx-aug-match-rpc-remove-flow"; + uses all-matches-grouping; + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:match/ext-gen:extension-list/ext-gen:extension" { + ext:augment-identifier "nx-aug-match-rpc-update-flow-original"; + uses all-matches-grouping; + } + augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:match/ext-gen:extension-list/ext-gen:extension" { + ext:augment-identifier "nx-aug-match-rpc-update-flow-updated"; + uses all-matches-grouping; + } + + // DATA + augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:match/ext-gen:extension-list/ext-gen:extension" { + ext:augment-identifier "nx-aug-match-nodes-node-table-flow"; + uses all-matches-grouping; + } + augment "/sal-packet:packet-in-message/sal-packet:match/ext-gen:extension-list/ext-gen:extension" { + ext:augment-identifier "nx-aug-match-packet-in-message"; + uses all-matches-grouping; + } + + // NOTIFICATIONS + augment "/sal-flow:switch-flow-removed/sal-flow:match/ext-gen:extension-list/ext-gen:extension" { + ext:augment-identifier "nx-aug-match-notif-switch-flow-removed"; + uses all-matches-grouping; + } + augment "/sal-packet:packet-received/sal-packet:match/ext-gen:extension-list/ext-gen:extension" { + ext:augment-identifier "nx-aug-match-notif-packet-in"; + uses all-matches-grouping; + } + augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:match/ext-gen:extension-list/ext-gen:extension" { + ext:augment-identifier "nx-aug-match-nodes-node-table-flow"; + uses all-matches-grouping; + } + augment "/odl-direct-stats:get-flow-statistics/odl-direct-stats:output/odl-direct-stats:flow-and-statistics-map-list/odl-direct-stats:match/ext-gen:extension-list/ext-gen:extension" { + ext:augment-identifier "nx-aug-match-rpc-get-flow-stats"; + uses all-matches-grouping; + } + +} diff --git a/experimental/odp/ospf-topology@2013-10-21.yang b/experimental/odp/ospf-topology@2013-10-21.yang new file mode 100644 index 000000000..925250a5b --- /dev/null +++ b/experimental/odp/ospf-topology@2013-10-21.yang @@ -0,0 +1,178 @@ +module ospf-topology { + yang-version 1; + namespace "urn:TBD:params:xml:ns:yang:ospf-topology"; + // replace with IANA namespace when assigned + + prefix "ospf"; + + import network-topology { + prefix "nt"; + revision-date 2013-10-21; + } + + import l3-unicast-igp-topology { + prefix "l3t"; + revision-date 2013-10-21; + } + import ietf-inet-types { + prefix "inet"; + revision-date 2013-07-15; + } + import ted { + prefix "ted"; + revision-date 2013-10-21; + } + + organization "TBD"; + contact "TBD"; + description "OSPF Topology model"; + + revision "2013-10-21" { + description "Initial revision"; + reference "TBD"; + } + + typedef area-id { + description "OSPF Area ID"; + type uint32; + } + + grouping ospf-topology-type { + container ospf { + presence "indiates OSPF Topology"; + } + } + + augment "/nt:network-topology/nt:topology/nt:topology-types/l3t:l3-unicast-igp-topology" { + uses ospf-topology-type; + } + + augment "/nt:network-topology/nt:topology/l3t:igp-topology-attributes" { + when "../nt:topology-types/l3t:l3-unicast-igp-topology/ospf"; + container ospf-topology-attributes { + leaf area-id { + type area-id; + } + } + } + + augment "/nt:network-topology/nt:topology/nt:node/l3t:igp-node-attributes" { + when "../../nt:topology-types/l3t:l3-unicast-igp-topology/ospf"; + uses ospf-node-attributes; + } + + augment "/nt:network-topology/nt:topology/nt:link/l3t:igp-link-attributes" { + when "../../nt:topology-types/l3t:l3-unicast-igp-topology/ospf"; + uses ospf-link-attributes; + } + + augment "/nt:network-topology/nt:topology/nt:node/l3t:igp-node-attributes/l3t:prefix" { + when "../../../nt:topology-types/l3t:l3-unicast-igp-topology/ospf"; + uses ospf-prefix-attributes; + } + + grouping ospf-node-attributes { + container ospf-node-attributes { + choice router-type { + case abr { + leaf abr { + type empty; + } + } + case asbr { + leaf asbr { + type empty; + } + } + case internal { + leaf internal { + type empty; + } + } + case pseudonode { + leaf pseudonode { + type empty; + } + } + } + leaf dr-interface-id { + when "../router-type/pseudonode"; + description "For pseudonodes, DR interface-id"; + default "0"; + type uint32; + } + leaf-list multi-topology-id { + description "List of Multi-Topology Identifier up-to 128 (0-127). RFC 4915"; + max-elements "128"; + + type uint8 { + range "0..127"; + } + } + leaf capabilities { + description "OSPF capabilities as bit vector. RFC 4970"; + type bits { + bit graceful-restart-capable { + position 0; + } + bit graceful-restart-helper { + position 1; + } + bit stub-router-support { + position 2; + } + bit traffic-engineering-support { + position 3; + } + bit point-to-point-over-lan { + position 4; + } + bit experimental-te { + position 5; + } + } + } + container ted { + uses ted:ted-node-attributes; + } + } // ospf + } // ospf-node-attributes + + grouping ospf-link-attributes { + container ospf-link-attributes { + leaf multi-topology-id { + type uint8 { + range "0..127"; + } + } + container ted { + uses ted:ted-link-attributes; + } + } + } // ospf-link-attributes + + grouping ospf-prefix-attributes { + container ospf-prefix-attributes { + + leaf forwarding-address { + when "../../l3t:l3-unicast-igp-topology/l3t:ospf/l3t:router-type/l3t:asbr"; + type inet:ipv4-address; + } + } + } + + augment "/l3t:igp-node-event" { + uses ospf-topology-type; + uses ospf:ospf-node-attributes; + } + + augment "/l3t:igp-link-event" { + uses ospf-topology-type; + uses ospf:ospf-link-attributes; + } + + augment "/l3t:igp-prefix-event" { + uses ospf-topology-type; + uses ospf:ospf-prefix-attributes; + } +} diff --git a/experimental/odp/overlay.yang b/experimental/odp/overlay.yang new file mode 100644 index 000000000..75a0a15a4 --- /dev/null +++ b/experimental/odp/overlay.yang @@ -0,0 +1,128 @@ +module overlay { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:overlay"; + prefix "southbound"; + + import network-topology {prefix "topo"; revision-date "2013-10-21"; } + import yang-ext { prefix "ext"; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + + revision "2015-01-05" { + description "Initial revision of overlay model"; + } + + + identity tunnel-type-base { + description "Base identity for all tunnel-types"; + } + + identity tunnel-type-vxlan { + description "Tunnel type for vxlan tunnels"; + base tunnel-type-base; + } + + identity tunnel-type-vxlan-gpe { + description "Tunnel type for vxlan tunnels"; + base tunnel-type-base; + } + + identity tunnel-type-gre { + description "Tunnel type for gre tunnels"; + base tunnel-type-base; + } + + grouping ip-port-locator { + description + "Data plane-locator: IP address and L4 port"; + leaf ip { + type inet:ip-address; + description "Data-plane IP address"; + } + leaf port { + type inet:port-number; + description "Data-plane port number"; + } + } + + grouping tunnel-type-attributes { + description "Common leaf for expressing tunnel-type"; + leaf tunnel-type { + type identityref { + base tunnel-type-base; + } + } + } + + augment "/topo:network-topology/topo:topology/topo:node" { + description "Augment topology node with a list of supported-tunnel-entries"; + ext:augment-identifier "supported-tunnels"; + list supported-tunnel-entry { + uses tunnel-type-attributes; + } + } + + augment "/topo:network-topology/topo:topology/topo:node/supported-tunnel-entry" { + description "Augment additional tunnel-parameters into the supported-tunnel-entry list"; + ext:augment-identifier "supported-tunnels-parameters"; + when "./tunnel-type = 'tunnel-type-gre' or + ./tunnel-type = 'tunnel-type-vxlan' or + ./tunnel-type = 'tunnel-type-vxlan-gre'" { + description "Augment tunnel types that use ip-port as tunnnel parameters"; + } + list ip-port-locator-entry { + uses ip-port-locator; + } + } + + augment "/topo:network-topology/topo:topology/topo:link" { + description "Type of link tunnel"; + ext:augment-identifier "tunnel"; + uses tunnel-type-attributes; + } + + augment "/topo:network-topology/topo:topology/topo:link/topo:source" { + description "ip-port-locator for the source end of a tunnel link"; + ext:augment-identifier "tunnel-source-parameters"; + when "../tunnel-type = 'tunnel-type-gre' or + ../tunnel-type = 'tunnel-type-vxlan' or + ../tunnel-type = 'tunnel-type-vxlan-gre'" { + description "Augment tunnel types that use ip-port as tunnnel parameters"; + } + uses ip-port-locator; + } + + augment "/topo:network-topology/topo:topology/topo:link/topo:destination" { + description "ip-port-locator for the source end of a tunnel link"; + ext:augment-identifier "tunnel-dest-parameters"; + when "../tunnel-type = 'tunnel-type-gre' or + ../tunnel-type = 'tunnel-type-vxlan' or + ../tunnel-type = 'tunnel-type-vxlan-gre'" { + description "Augment tunnel types that use ip-port as tunnnel parameters"; + } + uses ip-port-locator; + } + + identity topology-type-base { + description "Base identity for all topology-types"; + } + + identity topology-type-overlay { + description "Marker to indicate a topology is of type overlay"; + base topology-type-base; + } + + grouping topology-type-attributes { + description "Attributed to indicate the topology type"; + leaf topology-type { + type identityref { + base topology-type-base; + } + } + } + + augment "/topo:network-topology/topo:topology/" { + description "Mark type of topology"; + ext:augment-identifier "topology-type"; + uses topology-type-attributes; + } +} diff --git a/experimental/odp/ovsdb.yang b/experimental/odp/ovsdb.yang new file mode 100755 index 000000000..e37a1c72d --- /dev/null +++ b/experimental/odp/ovsdb.yang @@ -0,0 +1,1366 @@ +module ovsdb { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:ovsdb"; + prefix "southbound"; + + import network-topology {prefix "topo"; revision-date "2013-10-21"; } + import yang-ext { prefix "ext"; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import overlay { prefix overlay; } + import ietf-yang-types { prefix yang; revision-date "2013-07-15";} + import opendaylight-l2-types { prefix ethertype; revision-date "2013-08-27";} + + revision "2015-01-05" { + description "Initial revision of southbound model"; + } + + typedef ovsdb-termination-point-ref { + description "A reference to an ovsdb termination point"; + type instance-identifier; + } + + typedef ovsdb-bridge-ref { + description "A reference to an ovsdb bridge"; + type instance-identifier; + } + + typedef ovsdb-node-ref { + description "A reference to an ovsdb node"; + type instance-identifier; + } + + typedef flow-node-ref { + description "A reference to a flow node"; + type instance-identifier; + } + + typedef ovsdb-qos-ref { + description "A reference to a ovsdb QoS entry"; + type instance-identifier; + } + + typedef ovsdb-queue-ref { + description "A reference to an ovsdb queue entry"; + type instance-identifier; + } + + typedef ovsdb-bridge-name { + type string; + } + + typedef datapath-id { + type string { + pattern + '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){7}'; + } + description + "The datapath-d type represents OpenFlow datapath-id . + The canonical representation uses lowercase characters. + + In the value set and its semantics, this type is similar + to the MacAddress textual convention of the SMIv2, but with + 16 extra bits"; + reference + "Openflow 1.3.0 Spec + IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + identity datapath-type-base { + description "Base identity for all OVSDB datapath types"; + } + + identity datapath-type-system { + description "Datapath type for the kernel datapath"; + base datapath-type-base; + } + + identity datapath-type-netdev { + description "Datapath type for the userspace datapath"; + base datapath-type-base; + } + + identity ovsdb-bridge-protocol-base { + description "Base identity for all ovsdb-bridge-protocols"; + } + + identity ovsdb-bridge-protocol-openflow-10 { + description "Ovsdb bridge protocol OpenFlow 1.0"; + base ovsdb-bridge-protocol-base; + } + + identity ovsdb-bridge-protocol-openflow-11 { + description "Ovsdb bridge protocol OpenFlow 1.1"; + base ovsdb-bridge-protocol-base; + } + + identity ovsdb-bridge-protocol-openflow-12 { + description "Ovsdb bridge protocol OpenFlow 1.2"; + base ovsdb-bridge-protocol-base; + } + + identity ovsdb-bridge-protocol-openflow-13 { + description "Ovsdb bridge protocol OpenFlow 1.3"; + base ovsdb-bridge-protocol-base; + } + + identity ovsdb-bridge-protocol-openflow-14 { + description "Ovsdb bridge protocol OpenFlow 1.4"; + base ovsdb-bridge-protocol-base; + } + + identity ovsdb-bridge-protocol-openflow-15 { + description "Ovsdb bridge protocol OpenFlow 1.5"; + base ovsdb-bridge-protocol-base; + } + + identity ovsdb-fail-mode-base { + description "Base identity for ovsdb-failmode"; + } + + identity ovsdb-fail-mode-standalone { + description "Identity for ovsdb-failmode standalone"; + base ovsdb-fail-mode-base; + } + + identity ovsdb-fail-mode-secure { + description "Identity for ovsdb-failmode standalone"; + base ovsdb-fail-mode-base; + } + + grouping ovsdb-bridge-attributes { + leaf bridge-uuid { + description "The unique identifier of the bridge"; + type yang:uuid; + } + leaf bridge-openflow-node-ref { + description "A reference to the openflow node"; + type instance-identifier; + } + + leaf bridge-name { + description "The name of the bridge"; + type ovsdb-bridge-name; + } + list protocol-entry { + key "protocol"; + leaf protocol { + description "Protocol bridge should seek to speak to its controller"; + type identityref { + base ovsdb-bridge-protocol-base; + } + } + } + + list controller-entry { + description "Bridge controller info"; + key "target"; + leaf target { + description "Uri telling bridge how to connect to controller"; + type inet:uri; + } + leaf controller-uuid { + description "The unique identifier of the controller"; + type yang:uuid; + } + leaf is-connected { + type boolean; + } + leaf max_backoff { + description + "Maximum number of milliseconds to wait between + connection attempts"; + type uint32 { + range "1000..max"; + } + } + leaf inactivity_probe { + description + "Maximum number of milliseconds of idle time on connection + to controller before sending an inactivity probe message. + A value of 0 disables inactivity probes."; + type uint32; + } + + } + + leaf datapath-id { + description "Datapath-id of the bridge"; + type datapath-id; + } + + leaf datapath-type { + description "The datapath type of the bridge"; + type identityref { + base datapath-type-base; + } + } + + leaf fail-mode { + description "Failmode of the bridge"; + type identityref { + base ovsdb-fail-mode-base; + } + } + + leaf flow-node { + description "Flow node corresponding to this bridge"; + type flow-node-ref; + } + + leaf managed-by { + description "The OVSDB which this bridge belongs to"; + type ovsdb-node-ref; + } + + leaf stp_enable { + description + "Enable spanning tree on the bridge. By default, STP is + disabled on bridges"; + type boolean; + } + + list bridge-external-ids { + description + "Key-value pairs for use by external frameworks that integrate + with Open vSwitch. + + external_ids : bridge-id: optional string + + A unique identifier of the bridge. On Citrix XenServer this + will commonly be the same as external_ids:xs-network-uuids. + + external_ids : xs-network-uuids: optional string + + Semicolon-delimited set of universally unique identifier(s) + for the network with which this bridge is associated on a + Citrix XenServer host. The network identifiers are RFC 4122 + UUIDs as displayed by, e.g., xe network-list."; + + key "bridge-external-id-key"; + leaf bridge-external-id-key { + description "external-id name/key"; + type string; + mandatory true; + } + leaf bridge-external-id-value { + description "bridge-external-id value"; + type string; + mandatory true; + } + } + + list bridge-other-configs { + description + "Key-value pairs for configuring rarely used features. + + other_config : hwaddr: optional string + An Ethernet address in the form xx:xx:xx:xx:xx:xx to set the + hardware address of the local port and influence the datapath + ID. + + other_config : forward-bpdu: optional string + either true or false. Option to allow forwarding of BPDU frames when NORMAL + action is invoked. Frames with reserved Ethernet + addresses (e.g. STP BPDU) will be forwarded when this option + is enabled and the switch is not providing that functionality. + + other_config : mac-aging-time: optional string + containing an integer, at least 1 The maximum number of seconds to retain a + MAC learning entry for which no packets have been seen. The + default is currently 300 seconds (5 minutes). The value, if + specified, is forced into a reasonable range, currently 15 + to 3600 seconds. + + other_config : mac-table-size: optional string + containing an integer, at least 1 The maximum number of MAC addresses to + learn. The default is currently 2048. The value, if + specified, is forced into a reasonable range, currently 10 + to 1,000,000. + + other_config : datapath-id: optional string + Exactly 16 hex digits to set the OpenFlow datapath ID to a + specific value. May not be all-zero. + + other_config : dp-desc: optional string + Human readable description of datapath. It it a maximum + 256 byte-long free-form string to describe the datapath for + debugging purposes. + + other_config : disable-in-band: optional string + either true or false + If set to true, disable in-band control on the bridge + regardless of controller and manager settings. + + other_config : in-band-queue: optional string + containing an integer, in range 0 to 4,294,967,295 A queue ID as a + nonnegative integer. + + other_config : stp-system-id: optional string + The bridge's STP identifier (the lower 48 bits of the + bridge-id) in the form xx:xx:xx:xx:xx:xx. By default, the + identifier is the MAC address of the bridge. + + other_config : stp-priority: optional string + containing an integer, in range 0 to 65,535 The bridge's relative priority + value for determining the root bridge (the upper 16 bits of + the bridgeid). A bridge with the lowest bridge-id is elected + the root. By default, the priority is 0x8000. + + other_config : stp-hello-time: optional string + containing an integer, in range 1 to 10 The interval between transmissions + of hello messages by designated ports, in seconds. By default + the hello interval is 2 seconds. + + other_config : stp-max-age: optional string + containing an integer, in range 6 to 40 The maximum age of the information + transmitted by the bridge when it is the root bridge, in + seconds. By default, the maximum age is 20 seconds. + + other_config : stp-forward-delay: optional string + containing an integer, in range 4 to 30 The delay to wait between + transitioning root and designated ports to forwarding, in + seconds. By default, the forwarding delay is 15 seconds. + + other_config : mcast-snooping-aging-time: optional string, + containing an integer, at least 1 The maximum number of + seconds to retain a multicast snooping entry for which no + packets have been seen. The default is currently 300 + seconds (5 minutes). The value, if specified, is forced into + a reasonable range, currently 15 to 3600 seconds. + + other_config : mcast-snooping-table-size: optional string, + containing an integer, at least 1 The maximum number of + multicast snooping addresses to learn. The default is + currently 2048. The value, if specified, is forced into a + reasonable range, currently 10 to 1,000,000. + + other_config : mcast-snooping-disable-flood-unregistered: + optional string, either true or false If set to false, + unregistered multicast packets are forwarded to all ports. + If set to true, unregistered multicast packets are forwarded + to ports connected to multicast routers."; + + key "bridge-other-config-key"; + leaf bridge-other-config-key { + description "bridge-other-config name/key"; + type string; + } + leaf bridge-other-config-value { + description "bridge-other-config value"; + type string; + } + } + + leaf auto-attach { + description "The unique identifier of the auto_attach entry for this bridge."; + type yang:uuid; + } + } + + grouping ovsdb-connection-info-attributes { + leaf remote-ip { + type inet:ip-address; + description "Ovsdb Connection Remote IP"; + } + leaf remote-port { + type inet:port-number; + description "Ovsdb Connection Remote Port Number"; + } + leaf local-ip { + type inet:ip-address; + description "Ovsdb Connection Local IP"; + } + leaf local-port { + type inet:port-number; + description "Ovsdb Connection Local Port Number IP"; + } + } + + grouping ovsdb-node-attributes { + description "Plugin will not allow multiple connections to the same device. + If an application attempts to make more than one connection to the device by + putting multiple entries in the config data store, then it is the responsibility + of the application to clean the config data store"; + container connection-info{ + uses ovsdb-connection-info-attributes; + } + + leaf db-version { + description "The database schema version"; + type string; + } + + leaf ovs-version { + description "The Open_vSwitch version number"; + type string; + } + + list managed-node-entry { + key "bridge-ref"; + leaf bridge-ref { + type ovsdb-bridge-ref; + } + } + + list datapath-type-entry { + key "datapath-type"; + leaf datapath-type { + description "Datapath types supported by OVSDB node"; + type identityref { + base datapath-type-base; + } + } + } + + list interface-type-entry { + key "interface-type"; + leaf interface-type { + description "Interface types supported by OVSDB node"; + type identityref { + base interface-type-base; + } + } + } + + list openvswitch-external-ids { + description "Key-value pairs for use by external frameworks that integrate + with Open vSwitch. + + external_ids : system-id: optional string + A unique identifier for the Open vSwitch's physical host. + The form of the identifier depends on the type of the host. + On a Citrix XenServer, this will likely be the same as + external_ids:xs-system-uuid. + + external_ids : xs-system-uuid: optional string + The Citrix XenServer universally unique identifier for the + physical host as displayed by xe-host-list."; + + key "external-id-key"; + leaf external-id-key { + description "external-id name/key"; + type string; + mandatory true; + } + leaf external-id-value { + description "external-id value"; + type string; + mandatory true; + } + } + + list openvswitch-other-configs { + description "Key-value pairs for configuring rarely used features. + + other_config : stats-update-interval: optional string + This option will affect the update of the statistics column + in the following tables: Port, Interface , Mirror. + + other_config : flow-restore-wait: optional string + either true or false When ovs-vswitchd starts up, it has an empty flow + table and therefore it handles all arriving packets in its + default fashion according to its configuration, by + dropping them or sending them to an OpenFlow controller or + switching them as a standalone switch. + + other_config : flow-limit: optional string + containing an integer, at least 0. The maximum number of flows allowed in + the datapath flow table. + + other_config : n-dpdk-rxqs: optional string + containing an integer, at least 1 Specifies the number of rx queues to be + created for each dpdk interface. If not specified or + specified to 0, one rx queue will be created for each dpdk + interface by default. + + other_config : pmd-cpu-mask: optional string + Specifies CPU mask for setting the cpu affinity of + PMD (Poll Mode Driver) threads. Value should be in the form + of hex string, similar to the dpdk EAL '-c COREMASK' option + input or the 'taskset' mask input. + + other_config : n-handler-threads: optional string + containing an integer, at least 1 Specifies the number of threads for + software datapaths to use for handling new flows. The default + the number of online CPU cores minus the number of + revalidators. + + other_config : n-revalidator-threads: optional string, + containing an integer, at least 1 Specifies the number of + threads for software datapaths to use for revalidating flows + in the datapath. + + other_config : enable-statistics: optional string + either ture or false. Set this value to true to enable populating the + statistics column or to false to explicitly disable it."; + + key "other-config-key"; + leaf other-config-key { + description "other-config name/key"; + type string; + } + leaf other-config-value { + description "other-config value"; + type string; + } + } + + list manager-entry { + description "Node managers info"; + config false; + key "target"; + leaf target { + description "Uri that user set to connect to the controller"; + type inet:uri; + } + leaf connected { + type boolean; + } + leaf number_of_connections { + type uint32; + } + } + + list qos-entries { + key "qos-id"; + leaf qos-id { + description "An identifier used for QoS entries in the MD-SAL."; + type inet:uri; + } + leaf qos-uuid { + description "The unique identifier of the QoS."; + type yang:uuid; + } + leaf qos-type { + type identityref { + base qos-type-base; + } + } + list queue-list { + description "The list of queues used by the QoS"; + key "queue-number"; + leaf queue-number { + description "The queue number of the record in the QoS entry"; + type uint32; + } + + leaf queue-ref { + description "Instance identifier to a Queue in the MD-SAL."; + type ovsdb-queue-ref; + } + + } + list qos-external-ids { + key "qos-external-id-key"; + leaf qos-external-id-key { + description "qos external-id name/key"; + type string; + mandatory true; + } + leaf qos-external-id-value { + description "qos-external-id value"; + type string; + mandatory true; + } + } + list qos-other-config { + description " + other_config : max-rate + optional string, containing an integer."; + + key "other-config-key"; + leaf other-config-key { + description "qos-other-config name/key"; + type string; + } + leaf other-config-value { + description "qos-other-config value"; + type string; + } + } + } + + list queues { + key "queue-id"; + leaf queue-id { + description "An identifier used for Queue entries in the MD-SAL."; + type inet:uri; + } + leaf queue-uuid { + description "The unique identifier of the queue."; + type yang:uuid; + } + leaf dscp { + type uint8; + } + list queues-external-ids { + key "queues-external-id-key"; + leaf queues-external-id-key { + description "queues external-id name/key"; + type string; + mandatory true; + } + leaf queues-external-id-value { + description "queues-external-id value"; + type string; + mandatory true; + } + } + list queues-other-config { + description " + Configuration for linux-htb QoS: + + other_config : min-rate optional string + containing an integer, at least 1. + Minimum guaranteed bandwidth, in bit/s. + + other_config : max-rate optional string + containing an integer, at least 1. + Maximum allowed bandwidth, in bit/s. Optional. If specified, the queue's rate will not be allowed + to exceed the specified value, even if excess bandwidth is available. If unspecified, defaults to no + limit. + + other_config : burst optional string + containing an integer, at least 1. + Burst size, in bits. This is the maximum amount of ''credits'' that a queue can accumulate while it + is idle. Optional. Details of the linux-htb implementation require a minimum burst size, so a + too-small burst will be silently ignored. + + other_config : priority optional string. + containing an integer, in range 0 to 4,294,967,295. + A queue with a smaller priority will receive all the excess bandwidth that it can use before a + queue with a larger value receives any. Specific priority values are unimportant; only relative + ordering matters. Defaults to 0 if unspecified. + + Configuration for linux-htb QoS: + + other_config : min-rate optional string + containing an integer, at least 1. + Minimum guaranteed bandwidth, in bit/s. + + other_config : max-rate optional string + containing an integer, at least 1. + Maximum allowed bandwidth, in bit/s. Optional. If specified, the queue's rate will not be allowed + to exceed the specified value, even if excess bandwidth is available. If unspecified, defaults to no + limit.."; + + key "queue-other-config-key"; + leaf queue-other-config-key { + type string; + } + leaf queue-other-config-value { + type string; + } + } + } + + list autoattach { + key "autoattach-id"; + leaf autoattach-id { + description "An identifier used for AutoAttach table in the MD-SAL."; + type inet:uri; + } + leaf bridge-id { + description "Node-id of the Bridge table from where Autoattach table can be referenced."; + type inet:uri; + } + leaf autoattach-uuid { + description "The unique identifier of the autoattach table."; + type yang:uuid; + } + leaf system-name { + type string; + description "The system_name string is exported in LLDP messages. + It should uniquely identify the bridge in the network."; + } + leaf system-description { + type string; + description "The system_description string is exported in LLDP messages. + It should describe the type of software and hardware."; + } + list mappings { + description "Map of integer-integer pairs, key in range 0 to 16,777,215, + value in range 0 to 4,095. A mapping from SPB network Individual Service + Identifier (ISID) to VLAN id."; + key "mappings-key"; + leaf mappings-key { + type uint32 { + range "0..16777215"; + } + } + leaf mappings-value { + type uint16 { + range "0..4095"; + } + } + } + list autoattach-external-ids { + description + "Key-value pairs for use by external frameworks that integrate with + Open vSwitch, rather than by Open vSwitch itself."; + + key "autoattach-external-id-key"; + leaf autoattach-external-id-key { + description "external-id name/key"; + type string; + mandatory true; + } + leaf autoattach-external-id-value { + description "autoattach-external-id value"; + type string; + mandatory true; + } + } + } + } + + identity interface-type-base { + description "Base identity for all OVSDB interface types"; + } + + identity interface-type-system { + description "Interface type for system interfaces"; + base interface-type-base; + } + + identity interface-type-internal { + description "Interface type for internal interfaces"; + base interface-type-base; + } + + identity interface-type-vxlan { + description "Interface type for vxlan interfaces"; + base interface-type-base; + } + + identity interface-type-vxlan-gpe { + description "Interface type for vxlan gpe interfaces"; + base interface-type-base; + } + + identity interface-type-patch { + description "Interface type for patch interfaces"; + base interface-type-base; + } + + identity interface-type-tap { + description "Interface type for tun/tap interfaces"; + base interface-type-base; + } + + identity interface-type-geneve { + description "Interface type for geneve interfaces"; + base interface-type-base; + } + + identity interface-type-gre { + description "Interface type for gre interfaces"; + base interface-type-base; + } + + identity interface-type-ipsec-gre { + description "Interface type for ipsec-gre interfaces"; + base interface-type-base; + } + + identity interface-type-gre64 { + description "Interface type for gre64 interfaces"; + base interface-type-base; + } + + identity interface-type-ipsec-gre64 { + description "Interface type for ipsec-gre64 interfaces"; + base interface-type-base; + } + + identity interface-type-lisp { + description "Interface type for lisp interfaces"; + base interface-type-base; + } + + identity interface-type-dpdk { + description "Interface type for dpdk interfaces"; + base interface-type-base; + } + + identity interface-type-dpdkr { + description "Interface type for dpdk ring interfaces"; + base interface-type-base; + } + + identity interface-type-dpdkvhost { + description "Interface type for dpdkvhost interfaces"; + base interface-type-base; + } + + identity interface-type-dpdkvhostuser { + description "Interface type for dpdkvhostuser interfaces"; + base interface-type-base; + } + + identity interface-type-dpdkvhostuserclient { + description "Interface type for dpdkvhostuserclient interfaces"; + base interface-type-base; + } + + identity interface-type-stt { + description "Interface type for stt interfaces"; + base interface-type-base; + } + + identity qos-type-base { + description "the base identity for qos"; + } + + identity qos-type-linux-htb { + description "linux hierarchy token bucket classifier"; + base qos-type-base; + } + + identity qos-type-linux-hfsc { + description "linux hierarchical fair service curve classifier"; + base qos-type-base; + } + + identity qos-type-linux-sfq { + description "linux stochastic fairness queueing classifier"; + base qos-type-base; + } + + identity qos-type-linux-codel { + description "linux controlled delay classifier"; + base qos-type-base; + } + + identity qos-type-linux-fq-codel { + description "linux fair queueing controlled delay classifier"; + base qos-type-base; + } + + identity qos-type-egress-policer { + description "DPDK user space egress policer"; + base qos-type-base; + } + + grouping ovsdb-port-interface-attributes { + leaf port-uuid { + description "The unique identifier of the OVSDB port"; + type yang:uuid; + } + + leaf interface-uuid { + description "The unique identifier of the OVSDB interface"; + type yang:uuid; + } + + leaf name { + description "The name of the OVSDB port/interface"; + type string; + } + + leaf ifindex { + description "The ifindex is useful for seamless integration with protocols such as SNMP and sFlow. + It is a positive interface index as defined for SNMP MIB-II in RFCs 1213 and 2863 if the interface + has one, otherwise 0. It is a read-only column and an integer in the range 0 to 4,294,967,295"; + type uint32; + config false; + } + + leaf mac { + description "Ethernet address to use for this interface. If unset, the default is used"; + type yang:mac-address; + } + + leaf mac-in-use { + description "The MAC address in use by this interface"; + type yang:mac-address; + config false; + } + + leaf interface-type { + description "The type of the OVSDB interface"; + type identityref { + base interface-type-base; + } + } + + list options { + description "Port/Interface related optional input values"; + key "option"; + leaf option { + description "Option name"; + type string; + } + leaf value { + description "Option value"; + type string; + } + } + + leaf ofport { + description "Port/Interface related optional ofport"; + type uint32; + } + + leaf ofport_request { + description "Port/Interface related optional ofport_request, in range 1 to 65279"; + type uint16 { + range "1..65279"; + } + } + + leaf vlan-tag { + description "The VLAN tag of the termination point."; + type ethertype:vlan-id; + } + + list trunks { + description "Represents the trunks of a termination point."; + leaf trunk { + type ethertype:vlan-id; + } + } + + leaf vlan-mode { + description "The VLAN mode of the termination point."; + type enumeration { + enum "access" { + value 1; + description + "The VLAN mode access."; + } + enum "native-tagged" { + value 2; + description + "The VLAN mode native-tagged."; + } + enum "native-untagged" { + value 3; + description + "The VLAN mode native-untagged."; + } + enum "trunk" { + value 4; + description + "The VLAN mode trunk."; + } + } + } + + list port-other-configs { + description "Other config attributes for Ports + + other_config : priority-tags: optional string + either true or false An 802.1Q header contains two important pieces of + information: a VLAN ID and a priority. + + other_config : bond-hash-basis: optional string + containing an integer An integer hashed along with flows when choosing output + slaves in load balanced bonds. When changed, all flows will be + assigned different hash values possibly causing slave selection + decisions to change. + + other_config : bond-detect-mode: optional string + either miimon or carrier The means used to detect link failures. Defaults to + carrier which uses each interface's carrier to detect failures. + When set to miimon, will check for failures by polling each + interface's MII. + + other_config : bond-miimon-interval: optional string + containing an integer The interval, in milliseconds, between successive + attempts to poll each interface's MII. Relevant only when + other_config:bond-detect-mode is miimon + + other_config : lacp-system-id: optional string + The LACP system ID of this Port. The system ID of a LACP bond + is used to identify itself to its partners. Must be a nonzero + MAC address. Defaults to the bridge Ethernet address if unset. + + other_config : lacp-system-priority: optional string + containing an integer, in range 1 to 65,535 The LACP system priority of this + Port. In LACP negotiations, link status decisions are made by + the system with the numerically lower priority. + + other_config : lacp-time: optional string + either slow or fast. The LACP timing which should be used on this Port. By default + slow is used. When configured to be fast LACP heartbeats are + requested at a rate of once per second causing connectivity + problems to be detected more quickly. In slow mode, heartbeats + are requested at a rate of once every 30 seconds. + + other_config : lacp-fallback-ab: optional string + either true or false Determines the behavior of openvswitch bond in LACP mode. + If the partner switch does not support LACP, setting this + option to true allows openvswitch to fallback to active-backup. + If the option is set to false, the bond will be disabled. + In both the cases, once the partner switch is configured + to LACP mode, the bond will use LACP. + + other_config : bond-rebalance-interval: optional string, + containing an integer, in range 0 to 10,000 For a load + balanced bonded port, the number of milliseconds between + successive attempts to rebalance the bond, that is, to move + flows from one interface on the bond to another in an attempt + to keep usage of each interface roughly equal. If zero, load + balancing is disabled on the bond (link failure still cause + flows to move). If less than 1000ms, the rebalance interval + will be 1000ms. + + other_config : stp-enable: optional string + either true or false. If spanning tree is enabled on the bridge, member ports are + enabled by default (with the exception of bond, internal, and + mirror ports which do not work with STP). If this column's + value is false spanning tree is disabled on the port. + + other_config : stp-port-num: optional string + containing an integer, in range 1 to 255 The port number used for the lower 8 + bits of the port-id. By default, the numbers will be assigned + automatically. If any port's number is manually configured on + a bridge, then they must all be. + + other_config : stp-port-priority: optional string + containing an integer, in range 0 to 255 The port's relative priority value + for determining the root port (the upper 8 bits of the port-id). + + other_config : stp-path-cost: optional string + containing an integer, in range 0 to 65,535 Spanning tree path cost for the + port. A lower number indicates a faster link. By default, the + cost is based on the maximum speed of the link. + + other_config : rstp-enable: optional string + either true or false + If rapid spanning tree is enabled on the bridge, member ports + are enabled by default (with the exception of bond, internal, + and mirror ports which do not work with RSTP). If this + column's value is false rapid spanning tree is disabled on + the port. + + other_config : rstp-port-priority: optional string + containing an integer, in range 0 to 240 The port's relative priority value + for determining the root port, in multiples of 16. By default, + the port priority is 0x80 (128). + + other_config : rstp-port-num: optional string + containing an integer, in range 1 to 4,095 The local RSTP port number, used + as the lower 12 bits of the port-id. + + other_config : rstp-port-path-cost: optional string + containing an integer The port path cost. The Port's contribution, when it + is the Root Port, to the Root Path Cost for the Bridge. + + other_config : rstp-port-admin-edge: optional string + either true or false + + other_config : rstp-port-auto-edge: optional string + either true or false The auto edge port parameter for the Port. Default + is true. + + other_config : rstp-port-mcheck: optional string + either true or false The mcheck port parameter for the Port. Default is false. + + other_config : mcast-snooping-flood: optional string + either true or false If set to true, multicast packets are + unconditionally forwarded to the specific port"; + + key "other-config-key"; + leaf other-config-key { + description "port-other-config name/key"; + type string; + } + leaf other-config-value { + description "port-other-config value"; + type string; + } + } + + list interface-other-configs { + description "Other config attributes for Interfaces + + other_config : enable-vlan-splinters: optional string + either true or false. Set to true to enable VLAN splinters on this + interface. Defaults to false."; + + key "other-config-key"; + leaf other-config-key { + description "interface-other-config name/key"; + type string; + } + leaf other-config-value { + description "interface-other-config value"; + type string; + } + } + + list port-external-ids { + description "Port external ids + + external_ids : fake-bridge-id-*: optional string + External IDs for a fake bridge (see the fake_bridge column) are defined by + prefixing a Bridge external_ids key with + fake-bridge-, e.g. fake-bridge-xs-network-uuids."; + + key "external-id-key"; + leaf external-id-key { + description "external-id name/key"; + type string; + mandatory true; + } + leaf external-id-value { + description "external-id value"; + type string; + mandatory true; + } + } + + list interface-external-ids { + description "Interface external ids + + external_ids : attached-mac: optional string. + The MAC address programmed into the ''virtual hardware'' for this interface, in + the form xx:xx:xx:xx:xx:xx. For Citrix XenServer, this is the + value of the MAC field in the VIF record for this interface. + + external_ids : iface-id: optional string. + A system-unique identifier for the interface. On XenServer, this will commonly + be the same as external_ids:xs-vif-uuid. + + external_ids : iface-status: optional string + either active or inactive Hypervisors may sometimes have more than one interface + associated with a given external_ids:iface-id, only one of + which is actually in use at a given time. + + external_ids : xs-vif-uuid: optional string. + The virtual interface associated with this interface. + + external_ids : xs-network-uuid: optional string. + The virtual network to which this interface is attached. + + external_ids : vm-id: optional string. + The VM to which this interface belongs. On XenServer, this will be the same as + external_ids:xsvm-uuid. + + external_ids : xs-vm-uuid: optional string. + The VM to which this interface belongs"; + + key "external-id-key"; + leaf external-id-key { + description "external-id name/key"; + type string; + mandatory true; + } + leaf external-id-value { + description "external-id value"; + type string; + mandatory true; + } + } + + list interface-lldp { + description "Auto Attach configuration for a particular interface. + If LLDP is enabled on an interface, the interface processes received + LLDP packets and never passes them to OpenFlow or forwards them. + + lldp : enable: optional string, either true or false + True to enable LLDP on this Interface. If not specified, LLDP + will be disabled by default."; + + key "lldp-key"; + leaf lldp-key { + description "lldp name/key"; + type string; + } + leaf lldp-value { + description "lldp value"; + type string; + } + } + + list interface-bfd { + description "BFD configuration for a particular interface. + BFD, defined in RFC 5880 and RFC 5881, allows point-to-point + detection of connectivity failures by occasional transmission of + BFD control messages. + + bfd : enable: optional string, either true or false + True to enable BFD on this Interface. If not specified, BFD + will be disabled by default. + + bfd : min_rx: optional string + containing an integer, at least 1. + The shortest interval, in milliseconds, at which this BFD session + offers to receive BFD control messages. The remote endpoint may + choose to send messages at a slower rate. Defaults to 1000. + + bfd : min_tx: optional string + containing an integer, at least 1. + The shortest interval, in milliseconds, at which this BFD session is + willing to transmit BFD control messages. Messages will actually be + transmitted at a slower rate if the remote endpoint is not willing to + receive as quickly as specified. Defaults to 100. + + bfd : decay_min_rx: optional string + containing an integer + An alternate receive interval, in milliseconds, that must be greater + than or equal to bfd:min_rx. The implementation switches from + bfd:min_rx to bfd:decay_min_rx when there is no obvious incoming + data traffic at the interface, to reduce the CPU and bandwidth cost + of monitoring an idle interface. This feature may be disabled by + setting a value of 0. This feature is reset whenever bfd:decay_min_rx + bfd:min_rx changes. + + bfd : forwarding_if_rx: optional string, either true or false + When true, traffic received on the Interface is used to + indicate the capability of packet I/O. BFD control packets are + still transmitted and received. At least one BFD control + packet must be received every 100 * bfd:min_rx amount of time. + Otherwise, even if traffic are received, the bfd-status:forwarding + will be false. + + bfd : cpath_down: optional string, either true or false + Set to true to notify the remote endpoint that traffic should not be + forwarded to this system for some reason other than a connectivity + failure on the interface being monitored. The typical underlying + reason is concatenated path down, that is, that connectivity + beyond the local system is down. Defaults to false. + + bfd : cpath_down: optional string, either true or false + Set to true to notify the remote endpoint that traffic should not be + forwarded to this system for some reason other than a connectivity + failure on the interface being monitored. The typical underlying + reason is concatenated path down, that is, that connectivity + beyond the local system is down. Defaults to false. + + bfd : check_tnl_key: optional string, either true or false + Set to true to make BFD accept only control messages with a tunnel + key of zero. By default, BFD accepts control messages with any + tunnel key. + + bfd : bfd_local_dst_mac: optional string, mac address + Set to an Ethernet address in the form xx:xx:xx:xx:xx:xx + to set the MAC used as destination for transmitted BFD packets. The + default is 00:23:20:00:00:01 + + bfd : bfd_remote_dst_mac: optional string, mac address + Set to an Ethernet address in the form xx:xx:xx:xx:xx:xx + to set the MAC used for checking the destination of received BFD packets. + Packets with different destination MAC will not be considered as BFD packets. + If not specified the destination MAC address of received BFD packets + are not checked. + + bfd : bfd_src_ip: optional string, ip address + Set to an IPv4 address to set the IP address used as source + for transmitted BFD packets. The default is 169.254.1.1 + + bfd : bfd_dst_ip: optional string, ip address + Set to an IPv4 address to set the IP address used as destination + for transmitted BFD packets. The default is 169.254.1.0"; + + key "bfd-key"; + leaf bfd-key { + description "bfd name/key"; + type string; + } + leaf bfd-value { + description "bfd value"; + type string; + } + } + + list interface-bfd-status { + description "BFD status for a particular interface. + The switch sets key-value pairs in the bfd_status column to + report the status of BFD on this interface. When BFD is not + enabled, with bfd:enable, the switch clears all key-value + pairs from bfd_status. + + bfd_status : state: optional string, one of [admin_down, down, init, up] + Reports the state of the BFD session. The BFD session is fully + healthy and negotiated if UP. + + bfd_status : forwarding: optional string, true or false + Reports whether the BFD session believes this Interface + may be used to forward traffic. Typically this means + the local session is signaling UP, and the remote + system isn't signaling a problem such as concatenated path down. + + bfd_status : diagnostic: optional string + A diagnostic code specifying the local system's reason for the + last change in session state. The error messages are defined in + section 4.1 of [RFC 5880]. + + bfd_status : remote_state: optional string, one of [admin_down, down, init, up] + Reports the state of the remote endpoint's BFD session. + + bfd_status : remote_diagnostic: optional string + A diagnostic code specifying the remote system's reason for the + last change in session state. The error messages are defined in + section 4.1 of [RFC 5880]. + + bfd_status : flap_count: optional string, + containing an integer, minimum 0 + Counts the number of bfd_status:forwarding flaps since start. + A flap is considered as a change of the bfd_status:forwarding value."; + + key "bfd-status-key"; + leaf bfd-status-key { + description "bfd-status name/key"; + type string; + } + leaf bfd-status-value { + description "bfd-status value"; + type string; + } + } + + list qos-entry { + key "qos-key"; + max-elements 1; + leaf qos-key { + description "Fixed key to reference the QoS entry in MD-SAL."; + type uint32 { + range "1..1"; + } + mandatory true; + } + leaf qos-ref { + description "Instance identifier of a QoS entry in the MD-SAL."; + type ovsdb-qos-ref; + mandatory true; + } + } + + leaf ingress-policing-rate { + description "Maximum rate for data received on this interface in kbps. + Data received faster than this rate is dropped. Set to 0 (default) + to disable policing"; + type uint32; + } + + leaf ingress-policing-burst { + description "Maximum burst size for data received on this interface in kb. + The default burst size if set to 0 is 1000 kb. This value has no + effect if ingress-policing-rate is 0."; + type uint32; + } + } + + augment "/topo:network-topology/topo:topology/topo:node" { + description "Augmentation for bridge nodes managed by ovsdb"; + ext:augment-identifier "ovsdb-bridge-augmentation"; + uses ovsdb-bridge-attributes; + } + + augment "/topo:network-topology/topo:topology/topo:node" { + description "Augment topology node for an ovsdb node"; + ext:augment-identifier "ovsdb-node-augmentation"; + uses ovsdb-node-attributes; + } + + augment "/topo:network-topology/topo:topology/topo:node/topo:termination-point" { + description "Augment topology node termination-point for an ovsdb port/interface"; + ext:augment-identifier "ovsdb-termination-point-augmentation"; + uses ovsdb-port-interface-attributes; + } +} diff --git a/experimental/odp/packet-processing.yang b/experimental/odp/packet-processing.yang index 50368e46a..189339490 100644 --- a/experimental/odp/packet-processing.yang +++ b/experimental/odp/packet-processing.yang @@ -4,103 +4,123 @@ module packet-processing { import yang-ext {prefix ext; revision-date "2013-07-09";} import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} - import ietf-yang-types {prefix yang;revision-date "2010-09-24";} + import ietf-yang-types {prefix yang;revision-date "2013-07-15";} import opendaylight-l2-types {prefix types;revision-date "2013-08-27";} import opendaylight-match-types {prefix match-type;revision-date "2013-10-26";} import opendaylight-table-types {prefix table-type;revision-date "2013-10-26";} import opendaylight-action-types {prefix action-type;revision-date "2013-11-12";} import opendaylight-flow-types {prefix flow-type;revision-date "2013-10-26";} + import openflow-protocol { prefix ofproto; revision-date "2013-07-31"; } + + description "Packet processing - sending and receiving."; - revision "2013-07-09" { - description ""; + description "Initial."; } typedef connection-cookie { + description "Openflow connection identifier. Outgoing packets should use the same connection they came in."; type uint32; } grouping raw-packet { - leaf ingress { - type inv:node-connector-ref; - } + description "Basic packet structure."; + leaf ingress { + type inv:node-connector-ref; + } leaf payload { - type binary; - } + type binary; + } + } + + grouping packet-in { + leaf connection-cookie { + type connection-cookie; + } + + leaf flow-cookie { + type flow-type:flow-cookie; + } + + leaf table-id { + type table-type:table-id; + } + + leaf packet-in-reason { + type identityref { + base packet-in-reason; + } + } + + uses raw-packet; } grouping ethernet-packet { - leaf source { - type yang:mac-address; - } + description "Ethernet packet headers structure."; + leaf source { + type yang:mac-address; + } - leaf destination { - type yang:mac-address; - } + leaf destination { + type yang:mac-address; + } } identity packet-in-reason { - description "Base identity for all the available packet in reason"; + description "Base identity for all the available packet in reasons."; } - + identity no-match { - base packet-in-reason; - description "No matching flow in the classifier"; + base packet-in-reason; + description "No matching flow in the classifier"; } - + identity send-to-controller { - base packet-in-reason; - description "Explicit instruction to send packet to controller"; + base packet-in-reason; + description "Explicit instruction to send packet to controller"; } - + identity invalid-ttl { - base packet-in-reason; - description "Packet with invalid TTL"; + base packet-in-reason; + description "Packet with invalid TTL"; } notification packet-received { - leaf connection-cookie { - type connection-cookie; - } - - leaf flow-cookie { - type flow-type:flow-cookie; - } - - leaf table-id { - type table-type:table-id; - } - - leaf packet-in-reason { - type identityref { - base packet-in-reason; - } - } - + description "Delivery of incoming packet wrapped in openflow structure."; + uses packet-in; + container match { - uses match-type:match; + uses match-type:match; } - - uses raw-packet; } rpc transmit-packet { - input { + description "Sending packet out through openflow device."; + input { uses inv:node-context-ref; leaf connection-cookie { type connection-cookie; } - - leaf egress { - type inv:node-connector-ref; - } + + leaf egress { + type inv:node-connector-ref; + } leaf buffer-id { - type uint32; + type uint32; } - uses raw-packet; - uses action-type:action-list; - } + uses raw-packet; + uses action-type:action-list; + } + } + + container packet-in-message { + uses packet-in; + uses ofproto:ofHeader; + + container match { + uses match-type:match; + } } } diff --git a/experimental/odp/pcep-app-config.yang b/experimental/odp/pcep-app-config.yang new file mode 100644 index 000000000..e517bf299 --- /dev/null +++ b/experimental/odp/pcep-app-config.yang @@ -0,0 +1,104 @@ +module pcep-app-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:app-config"; + prefix "pcep-app-config"; + + description + "Configuration for the PCEP implementation."; + + revision "2016-07-07" { + description + "Initial revision. + + Copyright (c) 2016 Brocade Communications Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + } + + container pcep-session-config { + leaf dead-timer-value { + type uint16; + default 120; + } + + leaf keep-alive-timer-value { + type uint16; + default 30; + } + } + + typedef path-type { + type enumeration { + enum "PATH"; + enum "CLASSPATH"; + } + } + + typedef store-type { + type enumeration { + enum "JKS"; + enum "PKCS12"; + } + } + + container pcep-dispatcher-config { + leaf max-unknown-messages { + type uint16 { + range "1..max"; + } + default 5; + } + + container tls { + presence true; + leaf keystore { + description "keystore location"; + type string; + mandatory true; + } + leaf keystore-type { + description "keystore type (JKS or PKCS12)"; + type store-type; + mandatory true; + } + leaf keystore-path-type { + description "keystore path type (CLASSPATH or PATH)"; + type path-type; + mandatory true; + } + leaf keystore-password { + description "password protecting keystore"; + type string; + mandatory true; + } + leaf certificate-password { + description "password protecting certificate"; + type string; + mandatory true; + } + leaf truststore { + description "truststore location"; + type string; + mandatory true; + } + leaf truststore-type { + description "truststore type (JKS or PKCS12)"; + type store-type; + mandatory true; + } + leaf truststore-path-type { + description "truststore path type (CLASSPATH or PATH)"; + type path-type; + mandatory true; + } + leaf truststore-password { + description "password protecting truststore"; + type string; + mandatory true; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/pcep-auto-bandwidth-app-config.yang b/experimental/odp/pcep-auto-bandwidth-app-config.yang new file mode 100644 index 000000000..f15c0dc89 --- /dev/null +++ b/experimental/odp/pcep-auto-bandwidth-app-config.yang @@ -0,0 +1,30 @@ +module pcep-auto-bandwidth-app-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:auto-bandwidth-app-config"; + prefix "pcep-auto-bandwidth-app-config"; + + description + "Configuration for the PCEP auto bandwidth extension."; + + revision "2016-07-07" { + description + "Initial revision. + + Copyright (c) 2016 Brocade Communications Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + } + + container pcep-auto-bandwidth-app-config { + leaf bandwidth-usage-object-type { + type uint16 { + range "3..15"; + } + + default 5; + } + } +} \ No newline at end of file diff --git a/experimental/odp/pcep-config.yang b/experimental/odp/pcep-config.yang new file mode 100644 index 000000000..01b3bdd7a --- /dev/null +++ b/experimental/odp/pcep-config.yang @@ -0,0 +1,72 @@ +// vi: set smarttab et sw=4 tabstop=4: +module pcep-config { + yang-version 1.1; + namespace "urn:opendaylight:params:xml:ns:yang:pcep:config"; + prefix pd-config; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import rfc2385 { prefix rfc2385; revision-date 2016-03-24; } + + organization "AT&T Services, Inc."; + contact "Claudio D. Gasparini "; + + description + "This module contains the base YANG definitions for + PCEP Dispatcher service config. + Copyright (c)2017 AT&T Services, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2017-10-25" { + description + "Initial revision."; + } + + grouping pcep-config { + container session-config { + description "PCEP topology config"; + + leaf rpc-timeout { + type int16; + default 30; + units seconds; + } + + leaf listen-address { + type inet:ip-address; + default "0.0.0.0"; + } + + leaf listen-port { + type inet:port-number; + default 4189; + } + + leaf dead-timer-value { + type uint16; + default 120; + units seconds; + } + + leaf keep-alive-timer-value { + type uint16; + default 30; + units seconds; + } + } + } + + grouping pcep-node-config { + description "PCEP node config"; + + container session-config { + leaf password { + type rfc2385:rfc2385-key; + description "RFC2385 shared secret"; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/pcep-message.yang b/experimental/odp/pcep-message.yang new file mode 100644 index 000000000..14ebe02ef --- /dev/null +++ b/experimental/odp/pcep-message.yang @@ -0,0 +1,74 @@ +module pcep-message { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:pcep:message"; + prefix "pcep-msg"; + + import pcep-types { prefix pcep; revision-date 2018-11-09; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the base data model of a PCEP message. + It rolls up the definitions contained in RFC5440, RFC5520 + and RFC6006, RFC5886. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision "2013-10-07" { + description + "Initial revision."; + } + + notification open { + uses pcep:open-message; + } + + notification keepalive { + uses pcep:keepalive-message; + } + + notification pcreq { + uses pcep:pcreq-message; + } + + notification pcrep { + uses pcep:pcrep-message; + } + + notification pcntf { + uses pcep:pcntf-message; + } + + notification pcerr { + uses pcep:pcerr-message; + } + + notification close { + uses pcep:close-message; + } + + notification starttls { + uses pcep:start-tls-message; + } + + notification pcmonreq { + uses pcep:pcreq-message; + } + + notification pcmonrep { + uses pcep:pcmonrep-message; + } +} + diff --git a/experimental/odp/pcep-p2mp-te-lsp-config.yang b/experimental/odp/pcep-p2mp-te-lsp-config.yang new file mode 100644 index 000000000..0508bccc3 --- /dev/null +++ b/experimental/odp/pcep-p2mp-te-lsp-config.yang @@ -0,0 +1,29 @@ +module pcep-p2mp-te-lsp-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:p2mp:te:lsp:config"; + prefix "pcep-p2mp-config"; + + description + "Configuration for the PCEP p2mp te lsp extension. + Copyright (c)2018 AT&T Services, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + organization "AT&T Services, Inc."; + contact "Claudio D. Gasparini "; + + revision "2018-11-09" { + description "Initial revision"; + } + + container pcep-p2mp-te-lsp-config { + leaf path-computation-capable { + description "Advertize pcep-p2mp-te-lsp path computation capability"; + type boolean; + default false; + } + } +} \ No newline at end of file diff --git a/experimental/odp/pcep-segment-routing-app-config.yang b/experimental/odp/pcep-segment-routing-app-config.yang new file mode 100644 index 000000000..52e9451a7 --- /dev/null +++ b/experimental/odp/pcep-segment-routing-app-config.yang @@ -0,0 +1,35 @@ +module pcep-segment-routing-app-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:segment-routing-app-config"; + prefix "pcep-segment-routing-app-config"; + + description + "Configuration for the PCEP segment routing extension."; + + revision "2016-07-07" { + description + "Initial revision. + + Copyright (c) 2016 Brocade Communications Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + } + + container pcep-segment-routing-config { + leaf iana-sr-subobjects-type { + description "If false (default) SR-ERO type (=5) and SR-RRO type (=6) is used, + else proposed type (36) is used for parsing/serialization"; + type boolean; + default false; + } + + leaf sr-capable { + description "Advertize segment-routing capability"; + type boolean; + default true; + } + } +} \ No newline at end of file diff --git a/experimental/odp/pcep-session-stats.yang b/experimental/odp/pcep-session-stats.yang new file mode 100644 index 000000000..238da5b6f --- /dev/null +++ b/experimental/odp/pcep-session-stats.yang @@ -0,0 +1,194 @@ +// vi: set smarttab et sw=4 tabstop=4: +module pcep-session-stats { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:pcep:stats"; + prefix "pcep-stats"; + + organization "Cisco Systems, Inc."; + + contact "Milos Fabian "; + + description + "This module contains the base YANG definitions for + PCEP session statistics. + + Copyright (c)2014 Cisco Systems, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2017-11-13" { + description + "Update namespace and add default values"; + } + + revision "2014-10-06" { + description + "Initial revision"; + } + + grouping error { + description "PCEP Error-type/value."; + leaf error-type { + type uint8; + default 0; + } + leaf error-value { + type uint8; + default 0; + } + } + + grouping preferences { + leaf keepalive { + description "Advertised keep-alive value."; + type uint8; + default 0; + } + + leaf deadtimer { + description "Advertised deadtimer value."; + type uint8; + default 0; + } + + leaf ip-address { + description "Peer's IP address."; + type string; + default ""; + } + + leaf session-id { + description "Peer's session identifier."; + type uint16; + default 0; + } + } + + grouping error-messages-grouping { + container error-messages { + description "The message statistics of received/sent PCErr messages."; + leaf received-error-msg-count { + description "Total number of received PCErr messages."; + type uint32; + default 0; + } + + leaf sent-error-msg-count { + description "Total number of sent PCErr messages."; + type uint32; + default 0; + } + + container last-received-error { + description "Type/value tuple of last received error."; + uses error; + } + + container last-sent-error { + description "Type/value tuple of last sent error."; + uses error; + } + } + } + + grouping reply-time-grouping { + container reply-time { + description "Measures time elapsed from request's send to reply's received."; + + leaf average-time { + description "Average time (in milliseconds) of gauged values."; + type uint32; + default 0; + } + + leaf min-time { + description "Minimal measured time value (in milliseconds)."; + type uint32; + default 0; + } + + leaf max-time { + description "Maximal measured time value (in milliseconds)."; + type uint32; + default 0; + } + } + } + + grouping pcep-session-state { + description "PCEP session statistics."; + + leaf session-duration { + description "Elapsed time (in d:H:m:s) from session-up until now."; + type string; + } + + leaf synchronized { + description "Represents synchronization status."; + type boolean; + default false; + } + + container peer-capabilities { + description "Remote peer's (PCC) advertised capabilities."; + } + + container messages { + description "The statistics of PCEP received/sent messages from the PCE point of view."; + + uses reply-time-grouping; + + leaf received-msg-count { + description "Total number of received PCEP messages."; + type uint32; + default 0; + } + + leaf sent-msg-count { + description "Total number of sent PCEP messages."; + type uint32; + default 0; + } + + leaf last-sent-msg-timestamp { + description "The timestamp of last sent message."; + type uint32; + default 0; + } + + leaf unknown-msg-received { + description "The number of received unknown messages."; + type uint16; + default 0; + } + + uses error-messages-grouping; + } + + container local-pref { + description "The local (PCE) preferences."; + uses preferences; + } + + container peer-pref { + description "The remote peer (PCC) preferences."; + uses preferences; + } + + + leaf delegated-lsps-count { + description "The number of delegated LSPs (tunnels) from PCC."; + type uint16; + default 0; + } + } + + grouping pcep-session-state-grouping { + container pcep-session-state { + uses pcep-session-state; + } + } +} \ No newline at end of file diff --git a/experimental/odp/pcep-types.yang b/experimental/odp/pcep-types.yang new file mode 100644 index 000000000..778234f52 --- /dev/null +++ b/experimental/odp/pcep-types.yang @@ -0,0 +1,1412 @@ +module pcep-types { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:pcep:types"; + prefix "pcep-t"; + + import ieee754 { prefix ieee754; revision-date 2013-08-19; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import network-concepts { prefix netc; revision-date 2013-11-25; } + import rsvp { prefix rsvp; revision-date 2015-08-20; } + import iana { prefix iana; revision-date 2013-08-16; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the base data model of a PCEP message. + It rolls up the definitions contained in RFC5440, RFC7896, RFC5520 + and RFC8306, RFC5886. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision "2013-10-05" { + description + "Initial revision."; + reference "RFC5440"; + } + + // NOTE: this model uses counts bits in fields from left to right, + // just as IANA does for PCEP protocol. + + // Types + typedef protocol-version { + type uint8 { + range 1..7; + } + } + + typedef request-id { + type uint32 { + range 1..max; + } + } + + typedef of-id { + type uint16; + } + + grouping vendor-information { + description "VENDOR-INFORMATION format"; + reference "http://tools.ietf.org/html/draft-ietf-pce-rfc7150bis-00#section-4"; + + leaf enterprise-number { + type iana:enterprise-number; + } + + choice enterprise-specific-information { + } + } + + // TLVs + grouping tlv { + description "Marker grouping for TLV groupings."; + } + + grouping no-path-vector-tlv { + description "NO-PATH-VECTOR TLV"; + reference "https://tools.ietf.org/html/rfc5440#section-7.5"; + + uses tlv; + leaf flags { + type bits { + bit p2mp-unreachable { + position 24; + } + bit no-gco-solution { + position 25; + } + bit no-gco-migration { + position 26; + } + bit path-key { + reference "https://tools.ietf.org/html/rfc5520#section-7.4"; + position 27; + } + bit chain-unavailable { + position 28; + } + bit unknown-source { + position 29; + } + bit unknown-destination { + position 30; + } + bit pce-unavailable { + position 31; + } + } + mandatory true; + } + } + + grouping overload-duration-tlv { + description "OVERLOAD-DURATION TLV"; + reference "https://tools.ietf.org/html/rfc5440#section-7.14"; + container overload-duration { + uses tlv; + leaf duration { + type uint32; + units seconds; + } + } + } + + grouping req-missing-tlv { + description "REQ-MISSING TLV"; + reference "https://tools.ietf.org/html/rfc5440#section-7.5"; + container req-missing { + uses tlv; + leaf request-id { + type request-id; + } + } + } + + grouping of-list-tlv { + description "OF-List TLV"; + reference "https://tools.ietf.org/html/rfc5541#section-2.1"; + container of-list { + uses tlv; + leaf-list codes { + type of-id; + } + } + } + + grouping order-tlv { + description "Order TLV"; + reference "https://tools.ietf.org/html/rfc5557#section-5.4"; + container order { + uses tlv; + leaf delete { + type uint32; + mandatory true; + } + + leaf setup { + type uint32; + mandatory true; + } + } + } + + grouping vs-tlv { + description "Vendor-specific TLV."; + container vs-tlv { + status obsolete; + description "This model is obsolete, please use vendor-information-tlvs instead"; + + uses tlv; + + leaf enterprise-number { + type iana:enterprise-number; + } + + choice vendor-payload { + } + } + } + + grouping path-setup-type-tlv { + description "PATH-SETUP-TYPE TLV"; + reference "https://tools.ietf.org/html/draft-ietf-pce-lsp-setup-type-00#section-3"; + + container path-setup-type { + uses tlv; + leaf pst { + description "PST=0: Path is setup via RSVP-TE signaling protocol(default)."; + type uint8; + default 0; + } + } + } + + // Objects + grouping object-header { + description "Common Object Header"; + reference "https://tools.ietf.org/html/rfc5440#section-7.2"; + + leaf processing-rule { + type boolean; + default false; + } + + leaf ignore { + type boolean; + default false; + } + } + + grouping object { + description "Core object structure with optional TLVs"; + uses object-header; + } + + grouping vendor-information-tlvs { + list vendor-information-tlv { + description "VENDOR-INFORMATION-TLV"; + reference "http://tools.ietf.org/html/draft-ietf-pce-rfc7150bis-00#section-3"; + uses tlv; + uses vendor-information; + } + } + + grouping vendor-information-objects { + list vendor-information-object { + description "VENDOR-INFORMATION-OBJECT"; + reference "http://tools.ietf.org/html/draft-ietf-pce-rfc7150bis-00#section-2"; + uses object; + uses vendor-information; + } + } + + grouping open-object { + description "OPEN Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.3"; + + container open { + uses object; + container "tlvs" { + uses of-list-tlv; + uses vendor-information-tlvs; + } + + leaf version { + type protocol-version; + default 1; + } + + leaf keepalive { + type uint8 { + range 0..255; + } + mandatory true; + } + + leaf dead-timer { + type uint8 { + range 0..255; + } + mandatory true; + } + + leaf session-id { + type uint8; + } + } + } + + grouping rp-object { + description "RP Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.4"; + container rp { + uses object; + container "tlvs" { + uses order-tlv; + uses vendor-information-tlvs; + uses path-setup-type-tlv; + } + + leaf priority { + type uint8 { + range 1..7; + } + } + + leaf request-id { + type request-id; + mandatory true; + } + + leaf reoptimization { + type boolean; + default false; + } + + leaf bi-directional { + type boolean; + default false; + } + + leaf loose { + type boolean; + default false; + } + + leaf path-key { + type boolean; + default false; + reference "https://tools.ietf.org/html/rfc5520#section-3.2.1"; + } + + leaf fragmentation { + type boolean; + default false; + reference "https://tools.ietf.org/html/rfc8306#section-3.3.1"; + } + + leaf p2mp { + type boolean; + default false; + reference "https://tools.ietf.org/html/rfc8306#section-3.3.1"; + } + + leaf ero-compression { + type boolean; + default false; + reference "https://tools.ietf.org/html/rfc8306#section-3.3.1"; + } + + leaf supply-of { + type boolean; + default false; + reference "https://tools.ietf.org/html/rfc5541#section-3.3"; + } + + leaf order { + type boolean; + default false; + reference "https://tools.ietf.org/html/rfc5557#section-5.3"; + } + + leaf make-before-break { + type boolean; + default false; + reference "https://tools.ietf.org/html/rfc5557#section-5.3"; + } + } + } + + grouping no-path-object { + description "NO-PATH Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.5"; + + uses object; + + leaf nature-of-issue { + type uint8; + mandatory true; + } + + leaf unsatisfied-constraints { + when "nature-of-issue = 0" { + description + "The C flag has no meaning + and is ignored unless the NI + field is set to 0x00."; + } + type boolean; + default false; + } + } + + typedef p2mp-leaves { + reference "https://tools.ietf.org/html/rfc8306#section-3.3.2"; + description "Types of leaves in a P2MP request."; + type enumeration { + enum new-leaves-to-add { + value 1; + } + enum old-leaves-to-remove { + value 2; + } + enum old-leaves-path-modified-reoptimized { + value 3; + } + enum old-leaves-path-unchanged { + value 4; + } + } + } + + grouping p2mp-leaves-leaf { + leaf p2mp-leaves { + type p2mp-leaves; + mandatory true; + } + } + + grouping endpoints-ipv4-source { + leaf source-ipv4-address { + type inet:ipv4-address-no-zone; + mandatory true; + } + } + + grouping endpoints-ipv6-source { + leaf source-ipv6-address { + type inet:ipv6-address-no-zone; + mandatory true; + } + } + + grouping ipv6-destinations { + leaf-list destination-ipv6-address { + type inet:ipv6-address-no-zone; + min-elements 1; + } + } + + grouping ipv4-destinations { + leaf-list destination-ipv4-address { + type inet:ipv4-address-no-zone; + min-elements 1; + } + } + + grouping endpoints { + choice address-family { + mandatory true; + + case ipv4-case { + container ipv4 { + uses endpoints-ipv4-source; + leaf destination-ipv4-address { + type inet:ipv4-address-no-zone; + mandatory true; + } + } + } + case ipv6-case { + container ipv6 { + uses endpoints-ipv6-source; + leaf destination-ipv6-address { + type inet:ipv6-address-no-zone; + mandatory true; + } + } + } + case p2mp-ipv4-case { + container p2mp-ipv4 { + uses p2mp-leaves-leaf; + uses endpoints-ipv4-source; + uses ipv4-destinations; + } + } + case p2mp-ipv6-case { + container p2mp-ipv6 { + uses p2mp-leaves-leaf; + uses endpoints-ipv6-source; + uses ipv6-destinations; + } + } + } + } + + grouping endpoints-object { + description "END-POINTS Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.6"; + + container endpoints-obj { + uses object; + uses endpoints; + } + } + + grouping bnc { + uses object; + // No possibility of TLVs + list subobject { + leaf loose { + type boolean; + mandatory true; + } + + uses rsvp:ip-prefix-subobject; + ordered-by user; + } + } + + grouping branch-node-object { + description "Branch Node Object"; + reference "https://tools.ietf.org/html/rfc8306#section-3.11.1"; + + container branch-node-list { + uses bnc; + } + } + + grouping non-branch-node-object { + description "Branch Node Object"; + reference "https://tools.ietf.org/html/rfc8306#section-3.11.1"; + + container non-branch-node-list { + uses bnc; + } + } + + grouping bnc-object { + choice branch-node-type { + case branch-node-case { + uses branch-node-object; + } + case non-branch-node-case { + uses non-branch-node-object; + } + } + } + + grouping unreach-destination-object { + description "UNREACH-DESTINATION Object"; + reference "https://tools.ietf.org/html/rfc8306#section-3.14"; + + container unreach-destination-obj { + uses object; + + choice destination { + case ipv4-destination-case { + uses ipv4-destinations; + } + case ipv6-destination-case { + uses ipv6-destinations; + } + } + } + } + + grouping bandwidth { + // No possibility to carry TLVs + leaf bandwidth { + type netc:bandwidth; + } + } + + grouping bandwidth-object { + description "BANDWIDTH Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.7"; + container bandwidth { + uses object; + uses bandwidth; + } + } + + grouping reoptimization-bandwidth-object { + description "BANDWIDTH Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.7"; + container reoptimization-bandwidth { + uses object; + uses bandwidth; + } + } + + grouping metric-object { + description "METRIC Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.8"; + container metric { + uses object; + + leaf metric-type { + type uint8; + mandatory true; + } + + leaf bound { + type boolean; + default false; + } + + leaf computed { + type boolean; + default false; + } + + leaf value { + type ieee754:float32; + } + } + } + + grouping exclude-route-object { + description "Exclude Route Object"; + reference "https://tools.ietf.org/html/rfc5521#section-2.1.1"; + + container xro { + uses object; + + leaf flags { + type bits { + bit fail { + position 31; + } + } + mandatory true; + } + + list subobject { + uses rsvp:exclude-route-subobjects; + ordered-by user; + } + } + } + + grouping explicit-route-object { + description "Explicit Route Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.9"; + + container ero { + // No possibility of TLVs + uses object; + + list subobject { + leaf loose { + type boolean; + mandatory true; + } + + uses rsvp:explicit-route-subobjects; + ordered-by user; + } + } + } + + grouping secondary-explicit-route-object { + description "Secondary Explicit Route Object"; + reference "https://tools.ietf.org/html/rfc8306#section-3.2"; + container sero { + // No possibility of TLVs + uses object; + + list subobject { + leaf loose { + type boolean; + mandatory true; + } + + uses rsvp:secondary-explicit-route-subobjects; + ordered-by user; + } + } + } + + grouping include-route-object { + description "Include Route Object"; + reference "https://tools.ietf.org/html/rfc7896#section-2.1"; + + container iro { + // No possibility of TLVs + uses object; + + list subobject { + leaf loose { + type boolean; + mandatory true; + } + + uses rsvp:explicit-route-subobjects; + ordered-by user; + } + } + } + + grouping reported-route-object { + description "Reported Route Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.10"; + + container rro { + // No possibility of TLVs + uses object; + + list subobject { + uses rsvp:record-route-subobjects; + ordered-by user; + } + } + } + + grouping secondary-reported-route-object { + description "Reported Route Object"; + reference "https://tools.ietf.org/html/rfc8306#section-3.2"; + + container srro { + // No possibility of TLVs + uses object; + + list subobject { + uses rsvp:secondary-record-route-subobjects; + ordered-by user; + } + } + } + + grouping lspa-object { + description "LSPA Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.11"; + + container lspa { + uses object; + uses rsvp:tunnel-attributes; + container "tlvs" { + uses vendor-information-tlvs; + } + } + } + + grouping svec-object { + description "Synchronization Vector Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.13"; + + container svec { + // No possibility of TLVs + uses object; + + leaf link-diverse { + type boolean; + default false; + } + + leaf node-diverse { + type boolean; + default false; + } + + leaf srlg-diverse { + type boolean; + default false; + } + + leaf partial-path-diverse { + type boolean; + default false; + } + + leaf link-direction-diverse { + type boolean; + default false; + } + + leaf-list requests-ids { + type request-id; + } + } + } + + grouping notification-object { + description "NOTIFICATION Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.14"; + container c-notification { + uses object; + container "tlvs" { + when "../type = 2 and ../value = 1"; + + uses overload-duration-tlv; + uses vendor-information-tlvs; + } + + leaf type { + type uint8; + mandatory true; + } + + leaf value { + type uint8; + mandatory true; + } + } + } + + grouping pcep-error-object { + description "PCEP-ERROR Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.15"; + container error-object { + uses object; + container "tlvs" { + when "../type = 7"; + uses req-missing-tlv; + uses vendor-information-tlvs; + } + + leaf type { + type uint8; + mandatory true; + } + + leaf value { + type uint8; + mandatory true; + } + } + } + + grouping load-balancing-object { + description "LOAD-BALANCING Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.16"; + + container load-balancing { + // No possibility of TLVs + uses object; + + leaf max-lsp { + type uint8; + mandatory true; + } + + leaf min-bandwidth { + type netc:bandwidth; + } + } + } + + grouping close-object { + description "CLOSE Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.17"; + + container c-close { + uses object; + + leaf reason { + type uint8; + mandatory true; + } + + container tlvs { + uses vendor-information-tlvs; + } + } + } + + + + grouping path-key-object { + description "PATH-KEY Object"; + reference "https://tools.ietf.org/html/rfc5520#section-3.2.2"; + container path-key { + uses object; + + list path-keys { + min-elements 1; + + leaf loose { + type boolean; + default false; + } + + uses rsvp:path-key-subobject; + ordered-by user; + } + } + } + + grouping of-object { + description "OF Object"; + reference "https://tools.ietf.org/html/rfc5541#section-3.1"; + container of { + uses object; + + leaf code { + type of-id; + mandatory true; + } + + container tlvs { + uses vendor-information-tlvs; + } + } + } + + grouping monitoring-object { + description "The MONITORING object is used to specify the + set of requested PCEP state metrics."; + reference "https://tools.ietf.org/html/rfc5886#section-4.1"; + container monitoring { + uses object; + + leaf flags { + type bits { + bit incomplete { + description "Indicates that PCE cannot provide any of + the set of requested performance metrics for unspecified reasons."; + position 19; + } + bit overload { + description "Indicates that the overload status is + a metric of interest."; + position 20; + } + bit processing-time { + description "Indicates that the processing times is + a metric of interest."; + position 21; + } + bit general { + description "Indicates that the monitoring + request is a general monitoring request."; + position 22; + } + bit liveness { + description "Indicates that the state metric + of interest is the PCE's liveness."; + position 23; + } + } + } + + leaf monitoring-id { + description "The Monitoring-id-number combined with + the PCC-REQ-ID identifying the requesting PCC uniquely + identifies the monitoring request context."; + type uint32; + mandatory true; + } + + container tlvs { + description "Optional TLV(s)."; + uses vendor-information-tlvs; + } + } + } + + grouping pcc-id-req-object { + description "The PCC-ID-REQ object is used to specify the IP + address of the requesting PCC."; + reference "https://tools.ietf.org/html/rfc5886#section-4.2"; + container pcc-id-req { + uses object; + leaf ip-address { + type inet:ip-address-no-zone; + } + } + } + + grouping pce-id-object { + description "The PCE-ID object is used to specify a PCE's IP address."; + reference "https://tools.ietf.org/html/rfc5886#section-4.3"; + container pce-id { + uses object; + leaf ip-address { + type inet:ip-address-no-zone; + } + } + } + + grouping proc-time-object { + description "The PROC-TIME object is used to report various processing time + related metrics."; + reference "https://tools.ietf.org/html/rfc5886#section-4.4"; + container proc-time { + uses object; + + leaf estimated { + description "Indicates that the reported metric value is + based on estimated processing time as opposed to + actual computations."; + type boolean; + mandatory true; + } + + leaf current-proc-time { + description "Indicates, in milliseconds, the + processing time for the path computation of interest + characterized in the corresponding PCMonReq message."; + type uint32; + } + + leaf min-proc-time { + description "The minimum processing time in milliseconds"; + type uint32; + mandatory true; + } + + leaf max-proc-time { + description "The maximum processing time in milliseconds"; + type uint32; + mandatory true; + } + + leaf average-proc-time { + description "The average processing time in milliseconds"; + type uint32; + mandatory true; + } + + leaf variance-proc-time { + description "The variance of processing times in milliseconds"; + type uint32; + mandatory true; + } + } + } + + grouping overload-object { + description "The OVERLOAD object is used to report a PCE processing + congestion state."; + reference "https://tools.ietf.org/html/rfc5886#section-4.5"; + container overload { + uses object; + leaf duration { + description "This field indicates the amount of time, + in seconds, that the responding PCE expects that it may continue to + be overloaded from the time that the response message was generated."; + type uint16; + mandatory true; + } + } + } + + typedef class-type { + type uint8 { + range 1..7; + } + } + + grouping classtype-object { + description "CLASSTYPE Object"; + reference "https://tools.ietf.org/html/rfc5455#section-3"; + + container class-type { + uses object; + + leaf class-type { + type class-type; + mandatory true; + } + } + } + + grouping gc-object { + description "GLOBAL CONSTRAINTS (GC) Object"; + reference "https://tools.ietf.org/html/rfc5557#section-5.5"; + container gc { + uses object; + + leaf max-hop { + type uint8; + mandatory true; + } + + leaf max-utilization { + type uint8 { + range 0..100; + } + units percent; + mandatory true; + } + + leaf min-utilization { + type uint8 { + range 0..100; + } + units percent; + mandatory true; + } + + leaf over-booking-factor { + type uint8 { + range 0..100; + } + units percent; + mandatory true; + } + + container tlvs { + uses vendor-information-tlvs; + } + } + } + + // Messages + grouping message { + description "Marker grouping for message groupings."; + } + + grouping message-header { + description "Common Header"; + reference "https://tools.ietf.org/html/rfc5440#section-6.1"; + + leaf version { + type protocol-version; + default 1; + } + } + + grouping open-message { + uses message; + + container open-message { + description "Open Message"; + reference "https://tools.ietf.org/html/rfc5440#section-6.2"; + + uses message-header; + + uses open-object; + } + } + + grouping keepalive-message { + uses message; + + container keepalive-message { + description "Keepalive Message"; + reference "https://tools.ietf.org/html/rfc5440#section-6.3"; + + uses message-header; + } + } + + grouping lsp-attributes { + uses lspa-object; + + uses bandwidth-object; + uses reoptimization-bandwidth-object; + + list metrics { + uses metric-object; + } + uses include-route-object; + + uses reported-route-object; + + uses exclude-route-object; + + uses of-object; + + uses classtype-object; + } + + grouping pcreq-message { + uses message; + + container pcreq-message { + description "Path Computation Request Message"; + reference "https://tools.ietf.org/html/rfc5440#section-6.4"; + + uses message-header; + + list requests { + uses rp-object; + + container path-key-expansion { + when "rp/path-key = true"; + uses path-key-object; + } + + container segment-computation { + when "rp/path-key = false"; + + container p2p { + when "../rp/p2mp = false"; + + uses endpoints-object; + + container reported-route { + uses reported-route-object; + + uses reoptimization-bandwidth-object; + } + + uses vendor-information-objects; + + uses load-balancing-object; + + uses lsp-attributes; + } + + container p2mp { + when "../rp/p2mp = true"; + + reference "https://tools.ietf.org/html/rfc8306#section-3.4"; + + list endpoint-rro-pair { + uses endpoints-object; + + list rros { + choice route-object { + case reported-route-object-case { + uses reported-route-object; + } + case secondary-reported-route-object-case { + uses secondary-reported-route-object; + } + } + } + + uses reoptimization-bandwidth-object; + + min-elements 1; + } + + uses of-object; + + uses lspa-object; + + uses bandwidth-object; + + list metric { + uses metric-object; + } + + choice iro-bnc-choice { + case iro-case { + uses include-route-object; + } + case bnc-case { + uses bnc-object; + } + } + + uses load-balancing-object; + } + } + + uses vendor-information-objects; + } + + list svec { + uses svec-object; + + uses of-object; + + uses gc-object; + + uses exclude-route-object; + + list metric { + uses metric-object; + } + + uses vendor-information-objects; + } + + container monitoring-request { + uses monitoring; + + list pce-id-list { + uses pce-id-object; + } + } + } + } + + grouping path-definition { + uses explicit-route-object; + + uses lsp-attributes; + } + + grouping monitoring { + uses monitoring-object; + uses pcc-id-req-object; + } + + grouping monitoring-metrics { + list metric-pce { + uses pce-id-object; + uses proc-time-object; + uses overload-object; + } + } + + grouping monitoring-response { + uses monitoring; + choice monitoring-metrics-list { + case specific-metrics-list { + list specific-metrics { + uses rp-object; + uses monitoring-metrics; + } + } + + case general-metrics-list { + uses monitoring-metrics; + } + } + } + + grouping pcmonrep-message { + description "The PCMonRep message is used to provide PCE + state metrics back to the requester for out-of-band monitoring requests."; + reference "https://tools.ietf.org/html/rfc5886#section-9.2"; + + uses message; + container pcmonrep-message { + uses monitoring-response; + } + } + + grouping pcrep-message { + uses message; + + container pcrep-message { + description "Path Computation Reply Message"; + reference "https://tools.ietf.org/html/rfc5440#section-6.5"; + + uses message-header; + + list replies { + uses rp-object; + uses vendor-information-objects; + uses monitoring; + uses monitoring-metrics; + + choice result { + case success-case { + container success { + list paths { + uses path-definition; + } + uses vendor-information-objects; + } + } + case failure-case { + container no-path { + uses no-path-object; + container "tlvs" { + uses vendor-information-tlvs; + container no-path-vector { + uses no-path-vector-tlv; + } + } + } + uses lsp-attributes; + } + } + } + } + } + + grouping pcntf-message { + uses message; + + container pcntf-message { + description "Notification Message"; + reference "https://tools.ietf.org/html/rfc5440#section-6.6"; + + uses message-header; + + list notifications { + list rps { + uses rp-object; + } + + list notifications { + uses notification-object; + } + } + } + } + + grouping pcerr-message { + uses message; + + container pcerr-message { + description "Error Message"; + reference "https://tools.ietf.org/html/rfc5440#section-6.7"; + + uses message-header; + + list errors { + uses pcep-error-object; + } + + choice error-type { + case request-case { + container request { + list rps { + uses rp-object; + } + } + } + + case session-case { + container session { + uses open-object; + } + } + } + } + } + + grouping close-message { + uses message; + + container c-close-message { + description "Close Message"; + reference "https://tools.ietf.org/html/rfc5440#section-6.8"; + + uses message-header; + + uses close-object; + } + } + + grouping start-tls-message { + uses message; + + container start-tls-message { + description "StartTLS Message"; + reference "https://tools.ietf.org/html/draft-ietf-pce-pceps-02#section-3.3"; + + uses message-header; + } + } +} diff --git a/experimental/odp/pmsi-tunnel.yang b/experimental/odp/pmsi-tunnel.yang new file mode 100644 index 000000000..261c8145c --- /dev/null +++ b/experimental/odp/pmsi-tunnel.yang @@ -0,0 +1,187 @@ +// vi: set smarttab et sw=4 tabstop=4: +module pmsi-tunnel { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:pmsi-tunnel"; + prefix "pmsi-tunnel"; + + import bgp-types { prefix bgp-t; revision-date 2018-03-29; } + import bgp-message { prefix bgp-msg; revision-date 2018-03-29; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import network-concepts { prefix netc; revision-date 2013-11-25; } + import ietf-yang-types { prefix yang; } + import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + + organization "AT&T Services, Inc."; + + contact "Bruce Brandon "; + + description + "This module contains the data model of a BGP attribute called the + P-Multicast Service Interface Tunnel (PMSI Tunnel), defined + in RFC6514, Section 5. + + Copyright (c)2016 AT&T Services, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-03-29" { + description "Add RFC6514 Extended communities under bgp type."; + } + + revision "2016-08-12" { + description "Initial revision"; + reference "https://tools.ietf.org/html/rfc6514#section-5"; + } + + typedef pmsi-tunnel-type { + type enumeration { + enum rsvp-te-p2mp-lsp { + value 1; + } + enum mldp-p2mp-lsp { + value 2; + } + enum pim-ssm-tree { + value 3; + } + enum pim-sm-tree { + value 4; + } + enum bidir-pim-tree { + value 5; + } + enum ingress-replication { + value 6; + } + enum mldp-mp2mp-lsp { + value 7; + } + } + } + + grouping opaque { + leaf opaque-type { + mandatory true; + type uint8; + } + leaf opaque-extended-type { + type uint16; + } + leaf opaque { + mandatory true; + type yang:hex-string; + } + } + + grouping p-address-p-multicast-group { + leaf p-address { + mandatory true; + type inet:ip-address; + } + leaf p-multicast-group { + mandatory true; + type inet:ip-address; + } + } + + grouping pmsi-tunnel { + container pmsi-tunnel { + presence "PMSI Attribute"; + description "P-Multicast Service Interface Tunnel (PMSI Tunnel) attribute"; + reference "https://tools.ietf.org/html/rfc6514#section-5"; + + leaf leaf-information-required { + type boolean; + mandatory true; + } + leaf mpls-label { + type netc:mpls-label; + } + choice tunnel-identifier { + case rsvp-te-p2mp-lsp { + container rsvp-te-p2mp-lsp { + reference "https://tools.ietf.org/html/rfc4875#section-19.1.1"; + leaf p2mp-id { + mandatory true; + type uint32; + } + leaf tunnel-id { + mandatory true; + type uint16; + } + leaf extended-tunnel-id { + mandatory true; + type inet:ip-address; + } + } + } + case mldp-p2mp-lsp { + container mldp-p2mp-lsp { + reference "https://tools.ietf.org/html/rfc6388#section-2.2"; + leaf address-family { + mandatory true; + type identityref { + base bgp-t:address-family; + } + } + leaf root-node-address { + mandatory true; + type inet:ip-address; + } + list opaque-value { + uses opaque; + } + } + } + case pim-ssm-tree { + container pim-ssm-tree { + reference "https://tools.ietf.org/html/rfc6514#section-5"; + uses p-address-p-multicast-group; + } + } + case pim-sm-tree { + container pim-sm-tree { + reference "https://tools.ietf.org/html/rfc6514#section-5"; + uses p-address-p-multicast-group; + } + } + case bidir-pim-tree { + container bidir-pim-tree { + reference "https://tools.ietf.org/html/rfc6514#section-5"; + uses p-address-p-multicast-group; + } + } + case ingress-replication { + container ingress-replication { + leaf receiving-endpoint-address { + type inet:ip-address; + } + } + } + case mldp-mp2mp-lsp { + container mldp-mp2mp-lsp { + uses opaque; + } + } + } + } + } + + augment "/bgp-msg:update/bgp-msg:attributes" { + uses pmsi-tunnel; + } + + grouping bgp-rib-route { + uses bgp-rib:route { + augment "attributes" { + ext:augment-identifier pmsi-tunnel-augmentation; + uses pmsi-tunnel; + } + } + } +} + diff --git a/experimental/odp/pod-meta.yang b/experimental/odp/pod-meta.yang new file mode 100644 index 000000000..5c96b3c7a --- /dev/null +++ b/experimental/odp/pod-meta.yang @@ -0,0 +1,29 @@ +module pod-meta { + namespace "urn:opendaylight:netvirt:coe:meta"; + prefix "coemeta"; + + import ietf-yang-types { + prefix yang; + revision-date "2013-07-15"; + } + + revision "2018-01-18" { + description "Coe Meta Information"; + } + + container podidentifier-info { + description "Contains the list of podnames to poduuid mapping"; + + list pod-identifier { + key pod-name; + leaf pod-name { + type string; + } + + leaf pod-uuid { + type instance-identifier; + description "reference to a pod"; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/pod.yang b/experimental/odp/pod.yang new file mode 100644 index 000000000..d28155dcd --- /dev/null +++ b/experimental/odp/pod.yang @@ -0,0 +1,108 @@ +module pod { + yang-version 1; + namespace "urn:opendaylight:coe:northbound:pod"; + prefix "coe"; + + description + "This YANG module defines the generic configuration data for Container Orchestration Engine."; + + revision "2017-06-11" { + description "Initial revision."; + } + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + + import ietf-yang-types { + prefix yang; + revision-date "2013-07-15"; + } + + organization "OpenDaylight COE Group"; + + contact "COE Developers "; + + container coe { + description + "Container Configuration Parameters."; + + list pods { + key "uid"; + + description + "List of all configured pods in the network."; + + uses pod_attributes; + } + } + + grouping pod_attributes { + description "Kubernetes pod attributes needed by ODL Northbound."; + + leaf uid { + type yang:uuid; + description "UUID representing the pod."; + } + + leaf name { + type string; + description "The pod name as reported by Kubernetes."; + } + + leaf host-ip-address { + type inet:ip-address; + description "IP address of k8s node."; + } + + leaf cluster-id { + type yang:uuid; + description "UUID representing the K8s cluster."; + } + + leaf network-NS { + type string; + description "Network namespace defines the space for the pod. The empty namespace is + equivalent to the default namespace."; + status deprecated; + } + + leaf port-mac-address { + type string; + description "MAC address of the associated port."; + } + + list interface { + key uid; + + leaf uid { + type yang:uuid; + description "UUID representing the interface within a pod."; + } + + leaf ip-address { + type inet:ip-address; + description "IP address assigned by IPAM module."; + } + + uses network-attributes; + } + } + + grouping network-attributes { + leaf network-id { + type yang:uuid; + description "UUID representing the network."; + } + + leaf network-type { + type enumeration { + enum "FLAT"; + enum "VLAN"; + enum "VXLAN"; + enum "GRE"; + } + } + } +} diff --git a/experimental/odp/policy-service.yang b/experimental/odp/policy-service.yang new file mode 100644 index 000000000..95daa4d0a --- /dev/null +++ b/experimental/odp/policy-service.yang @@ -0,0 +1,280 @@ +module policy-service { + yang-version 1; + namespace "urn:opendaylight:netvirt:policy"; + prefix "policy"; + + import ietf-interfaces { prefix if; } + + import ietf-access-control-list { prefix ietf-acl; } + + import aclservice { prefix acl; } + + import yang-ext { prefix ext; } + + import opendaylight-l2-types { prefix ethertype; revision-date "2013-08-27"; } + + description + "Policy Service module"; + + revision "2017-02-07" { + description + "Initial revision"; + } + + identity policy-acl { + base ietf-acl:acl-base; + } + + augment "/ietf-acl:access-lists/ietf-acl:acl/" + + "ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:matches" { + ext:augment-identifier "ingress-interface"; + when "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:acl-type = 'policy:policy-acl'"; + leaf name { + type if:interface-ref; + } + + leaf vlan-id { + type ethertype:vlan-id; + } + } + + augment "/ietf-acl:access-lists/ietf-acl:acl/" + + "ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:matches" { + ext:augment-identifier "service"; + when "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:acl-type = 'policy:policy-acl'"; + leaf service-type { + type identityref { + base service-type-base; + } + } + + leaf service-name { + type string; + } + } + + augment "/ietf-acl:access-lists/ietf-acl:acl/" + + "ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:actions" { + ext:augment-identifier "set-policy-classifier"; + when "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:acl-type = 'policy:policy-acl'"; + leaf policy-classifier { + type leafref { + path "/policy-profiles/policy-profile/policy-classifier"; + } + } + + leaf direction { + type identityref { + base acl:direction-base; + } + } + } + + container underlay-networks { + list underlay-network { + key "network-name"; + leaf network-name { + type string; + } + + leaf network-access-type { + type identityref { + base access-network-base; + } + } + + leaf bandwidth { + type uint64; + description "Maximum bandwidth. Units in byte per second"; + } + + list dpn-to-interface { + config false; + key "dp-id"; + leaf dp-id { + type uint64; + } + + list tunnel-interface { + key "interface-name"; + leaf interface-name { + type string; + } + + leaf remote-dp-id { + type uint64; + } + } + } + + list policy-profile { + config false; + key "policy-classifier"; + leaf policy-classifier { + type string; + } + } + } + } + + container underlay-network-groups { + list underlay-network-group { + key "group-name"; + leaf group-name { + type string; + } + + list underlay-network { + key "network-name"; + leaf network-name { + type leafref { + path "/underlay-networks/underlay-network/network-name"; + } + } + + leaf weight { + type uint16; + default 1; + } + } + + leaf bandwidth { + type uint64; + description "Maximum bandwidth of the group. Units in byte per second"; + } + } + } + + container policy-profiles { + list policy-profile { + key "policy-classifier"; + leaf policy-classifier { + type string; + } + + list policy-route { + key "route-name"; + leaf route-name { + type string; + } + + choice route { + case basic-route { + leaf network-name { + type leafref { + path "/underlay-networks/underlay-network/network-name"; + } + } + } + + case route-group { + leaf group-name { + type leafref { + path "/underlay-network-groups/underlay-network-group/group-name"; + } + } + } + } + } + + list policy-acl-rule { + config false; + key "acl-name"; + leaf acl-name { + type leafref { + path "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:acl-name"; + } + } + + list ace-rule { + key "rule-name"; + leaf rule-name { + type leafref { + path "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:rule-name"; + } + } + } + } + } + } + + container policy-route-counters { + config false; + + list underlay-network-counters { + key "network-name"; + leaf network-name { + type leafref { + path "/underlay-networks/underlay-network/network-name"; + } + } + + list dpn-counters { + key "dp-id"; + leaf dp-id { + type uint64; + } + + leaf counter { + type uint32; + } + } + + list path-counters { + key "source-dp-id destination-dp-id"; + leaf source-dp-id { + type uint64; + } + + leaf destination-dp-id { + type uint64; + } + + leaf counter { + type uint32; + } + } + } + } + + identity service-type-base { + description "Base identity for service type"; + } + + identity l3vpn-service-type { + base service-type-base; + } + + identity l2vpn-service-type { + base service-type-base; + } + + identity access-network-base { + description "Base identity for access network type"; + } + + identity mpls-access-network { + base access-network-base; + } + + identity docsis-access-network { + base access-network-base; + } + + identity pon-access-network { + base access-network-base; + } + + identity dsl-access-network { + base access-network-base; + } + + identity umts-access-network { + base access-network-base; + } + + identity lte-access-network { + base access-network-base; + } +} + diff --git a/experimental/odp/port-management.yang b/experimental/odp/port-management.yang deleted file mode 100644 index 77483de14..000000000 --- a/experimental/odp/port-management.yang +++ /dev/null @@ -1,30 +0,0 @@ -module port-management { - namespace "urn:opendaylight:port:config"; - prefix port-cfg; - - import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} - import opendaylight-port-types {prefix port;} - - revision "2013-10-24" { - description "Initial revision of port service"; - } - - grouping port-entry { - leaf node { - type inv:node-ref; - } - uses port:port-mod; - } - - container ports { - list port { - key "id node"; - - leaf id { - type uint32; - } - - uses port-entry; - } - } -} diff --git a/experimental/odp/prefix-shard-configuration.yang b/experimental/odp/prefix-shard-configuration.yang new file mode 100644 index 000000000..02d5c304e --- /dev/null +++ b/experimental/odp/prefix-shard-configuration.yang @@ -0,0 +1,34 @@ +module prefix-shard-configuration { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:clustering:prefix-shard-configuration"; + prefix "prefix-config"; + + description + "This module contains the base YANG definitions for + shards based on prefix configuration"; + + revision "2017-01-10" { + description "Initial revision."; + } + + container prefix-shards { + + list shard { + key prefix; + leaf prefix { + type instance-identifier; + description "Prefix that this shard is rooted at."; + } + + container replicas { + leaf-list replica { + type string; + } + + description "List of cluster member nodes that this shard is replicated on"; + } + + description "List of prefix-based shards configured."; + } + } +} diff --git a/experimental/odp/programming.yang b/experimental/odp/programming.yang new file mode 100644 index 000000000..2618581e7 --- /dev/null +++ b/experimental/odp/programming.yang @@ -0,0 +1,379 @@ +module programming { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:programming"; + prefix "pgm"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the basic programming model. + + From the architecture perspective, the programming model is + used to drive the state of the controller and, by extension, + its underlying network from one state to another, usually + through some interim states. + + The core concept of this model is that of an instruction. An + instruction is always an atomic, undivisible amount of work, + resulting in a well-defined state transition. More complex + state transitions are always broken up to a set of such + instructions. As a general rule, instructions should be + designed such that their implementations can guarantee them + either happening completely or not happening at all. + + Instruction scheduling is governed by explicit dependencies, + where an instruction may only be a candidate for execution if + all of its dependencies have completed successfully. If there + are multiple candidate instructions, the scheduler is free + to decide on the order of execution, it may even execute them + in parallel. If two instructions become candidates and cannot + be executed in parallel, the scheduler should execute them in + the order in which they have been submitted. + + The programming model does not rely on rollback capability + being present in the network. Instead it recognizes that this + failure results in a new state, which needs to be picked up + by the entity driving the change and a new set of state + transitions needs to be devised. Technology-specific modules + should rely on this assumption and should not attempt complex + recovery schemes, which could result in more indeterminism + being introduced in the state. + + The final assumption of the model is that each instruction has + a specific deadline by which it needs to complete. The rationale + is that the entity driving the state has to make some progress + and not be stuck indefinitely on one transition. Furthermore + the model assumes the realization that there is a failure in + making progress in the scheduler, such that the instruction + stream can be predictably cut without introducing new race + windows in the recovery path. + + A summary of the model is the following: the scheduler operates + on a directed acyclic graph of instructions which places limits + on which interim states may be visited while the system + transitions from a state measured at a point in time into the + intended state. The graph may be expanded to include new nodes, + allowing for futher submissions in a manner consistent with + optimistic prediction of future state. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2015-07-20" { + description + "Introduce instruction queue id."; + } + + revision "2013-09-30" { + description + "Initial revision."; + reference ""; + } + + typedef nanotime { + description + "Absolute number of nanoseconds since the start of the + UNIX epoch."; + type uint64; + units nanoseconds; + } + + typedef instruction-id { + description + "Instruction identifier. It is assigned by the entity + generating the instruction and is required to be unique + during the lifetime of the instruction."; + type inet:uri; + } + + typedef instruction-status { + description + "Each instruction submitted to the scheduler undergoes + a lifecycle with the distinct states defined by this + enumeration. The instruction starts in queued state + and progresses from there to one of the terminal + states: cancelled, failed or successful."; + + type enumeration { + enum queued { + description + "Its immediate prerequisite intructions + have not been resolved. The instruction + can be cancelled. If any of its + prerequisites moves to Unknown, Failed or + Cancelled state, the instruction itself + moves into Cancelled state. Once all of + the dependencies move into Successful + state, this instruction moves into + Scheduled state. If this instruction's + deadline passes, it transitions into + Cancelled state."; + } + enum scheduled { + description + "All of instruction's prerequisites have + been successful and this instruction is + ready to be executed, but the resources + needed for its execution are not ready. + The instruction can be Cancelled. If this + instruction's deadline passes, it + transitions into Failed state."; + } + enum executing { + description + "The instruction is being executed. It + cannot be Cancelled on request. If the + execution does not complete within the + specified deadline, this instruction + moves into Unknown state. If the + instruction's execution completes within + the deadline, it moves into Successful, + Failed or Cancelled state, based on the + effects it has had on state."; + } + enum cancelled { + description + "The instruction has never executed, or + has been executing but all its effects + have been rolled back. System state is + such as if the instruction never + executed."; + } + enum failed { + description + "The instruciton has failed to execute + completely, but some of its effects may + have been recorded in the state. A full + state resynchronization is required to + recover from this failure, and even then + an operator intervention may be required + (if, for example the effect is not + representable in exposed abstractions)."; + } + enum successful { + description + "The instruction has executed competely + and its effects have been recorded in + state."; + } + enum unknown { + description + "The instruction has failed to execute + within the deadline allocated to it. + It's effects on the state are unknown + at this point, but can be assumed to + either atomically happen or not-happen. + This state is transient and the + instruction will eventually (at some + indeterminate point in the future) enter + either Successful, Failed or Cancelled + state."; + } + } + } + + grouping instruction-queue { + description + "The bare minimum run-time information which should be + exposed by an implementation of the instruction + scheduler defined in this model"; + + leaf instruction-queue-id { + type string; + } + + list instruction { + description + "List of all instructions known to the + scheduler."; + config false; + + leaf id { + type instruction-id; + } + key id; + + leaf status { + type instruction-status; + mandatory true; + } + + leaf deadline { + type nanotime; + mandatory true; + } + } + } + + identity cancel-failure { + description + "The base identity of various reasons for an + instruction cancellation to fail."; + } + + identity unknown-instruction { + description + "The specified instruction ID has not been found + in the queue."; + base cancel-failure; + } + + identity uncancellable-instruction { + description + "The specified instruction is in process of being + executed and cannot be cancelled. Wait for the + execution process to complete."; + base cancel-failure; + } + + rpc cancel-instruction { + input { + leaf id { + type instruction-id; + mandatory true; + } + } + + output { + leaf failure { + type identityref { + base cancel-failure; + } + } + } + } + + rpc clean-instructions { + description + "Attempt to clean out a certain set of instructions. + Instructions flushed this way need to be in a terminal + state, e.g. Successful, Failed or Cancelled. Instructions + which were not cleaned are reported in the output of + this RPC."; + input { + leaf-list id { + type instruction-id; + min-elements 1; + } + } + + output { + leaf-list unflushed { + type instruction-id; + } + } + } + + identity submit-failure { + description + "The base identity of various reasons for an + instruction submission to fail."; + } + + identity duplicate-instruction-id { + description + "Instruction ID clashes with an instruction with an + already-queued instruction. Assign a new identifier + or wait for the enqueued instruction to complete."; + base submit-failure; + } + + identity too-many-instructions { + description + "Instruction queue size exceeded."; + base submit-failure; + } + + identity unknown-precondition-id { + description + "One of the instruction IDs specified in the + precondition list is unknown."; + base submit-failure; + } + + identity dead-on-arrival { + description + "The instruction was submitted after its deadline has + passed, or one of its dependencies resolved as + non-sunccessful."; + base submit-failure; + } + + grouping submit-instruction-input { + description + "Minimum required arguments needed for submitting an + instruction into the scheduler. This grouping needs to + be used by concrete RPC definitions which are routed + to the scheduler."; + + leaf id { + type instruction-id; + mandatory true; + } + + leaf deadline { + type nanotime; + mandatory true; + } + + leaf-list preconditions { + type instruction-id; + } + } + + grouping submit-instruction-output { + choice result { + case failure-case { + container failure { + leaf type { + type identityref { + base submit-failure; + } + mandatory true; + } + + leaf-list failed-preconditions { + when "../type = dead-on-arrival"; + type instruction-id; + } + } + } + } + } + + list instructions-queue { + key "instruction-queue-id"; + uses instruction-queue; + } + + notification instruction-status-changed { + leaf id { + description "Instruction identifier."; + type instruction-id; + mandatory true; + } + + leaf status { + description "New status of the instruction."; + type instruction-status; + mandatory true; + } + + container details { + description + "More details about the instruction state."; + + leaf-list unmet-dependencies { + when "../../status = cancelled"; + type instruction-id; + } + } + } +} diff --git a/experimental/odp/qos-alert-config.yang b/experimental/odp/qos-alert-config.yang new file mode 100644 index 000000000..d9d640285 --- /dev/null +++ b/experimental/odp/qos-alert-config.yang @@ -0,0 +1,40 @@ +module qosalert-config { + yang-version 1; + namespace "urn:opendaylight:netvirt:qosalert:config"; + prefix "qosalert"; + + revision "2017-03-01" { + description "Initial revision of qosalert model"; + } + + description "This YANG module defines QoS alert configuration."; + + container qosalert-config { + + config true; + + leaf qos-alert-enabled { + description "QoS alert enable-disable config knob"; + type boolean; + default false; + } + + leaf qos-drop-packet-threshold { + description "QoS Packet drop threshold config. Specified as packet drop %"; + type uint8 { + range "1..100"; + } + default 5; + } + + leaf qos-alert-poll-interval { + description "Polling interval in minutes"; + type uint16 { + range "1..3600"; + } + default 2; + } + + } + +} diff --git a/experimental/odp/queue-management.yang b/experimental/odp/queue-management.yang deleted file mode 100644 index c8a7fbbaa..000000000 --- a/experimental/odp/queue-management.yang +++ /dev/null @@ -1,33 +0,0 @@ -module queue-management { - namespace "urn:opendaylight:queue:config"; - prefix queue-cfg; - - import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} - - import opendaylight-queue-types {prefix queue; revision-date "2013-09-25";} - - - revision "2013-10-24" { - description "Initial revision of queue service"; - } - - grouping queue-entry { - leaf node { - type inv:node-connector-ref; - - } - uses queue:queue-config-request; - } - - container queues { - list queue { - key "id node"; - - leaf id { - type uint32; - } - - uses queue-entry; - } - } -} diff --git a/experimental/odp/recinciliation-result-state.yang b/experimental/odp/recinciliation-result-state.yang new file mode 100644 index 000000000..84819c79c --- /dev/null +++ b/experimental/odp/recinciliation-result-state.yang @@ -0,0 +1,26 @@ +module reconciliation-result-state { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:openflowplugin:rf:state"; + prefix "rf-state"; + + description + "Reconciliation framework result state enumeration"; + + revision "2017-07-13" { + description + "Initial proposal."; + } + + + typedef result-state { + description "Reconciliation result state."; + type enumeration { + enum DO_NOTHING { + description "Reconciliation wasn't successful but not important."; + } + enum DISCONNECT { + description "Reconciliation wasn't successful but is mandatory, disconnect device."; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/reconciliation.yang b/experimental/odp/reconciliation.yang new file mode 100644 index 000000000..616e0a73a --- /dev/null +++ b/experimental/odp/reconciliation.yang @@ -0,0 +1,88 @@ +module reconciliation { + + namespace "urn:opendaylight:params:xml:ns:yang:openflowplugin:app:reconciliation:service"; + prefix reconciliation; + + import ietf-yang-types {prefix yang; revision-date "2013-07-15";} + revision "2018-02-27" { + description "Initial revision for reconciliation"; + } + + container reconciliation-counter { + description "Number of reconciliation triggered for openflow nodes"; + config false; + list reconcile-counter { + key node-id; + leaf node-id { + type uint64; + } + uses counter; + } + } + + grouping counter { + leaf success-count { + type uint32; + default 0; + } + leaf failure-count { + type uint32; + default 0; + } + leaf last-request-time { + description "Timestamp when reconciliation was last requested"; + type yang:date-and-time; + } + } + + container reconciliation-state { + description "Reconciliation state for the given openflow nodes"; + config false; + list reconciliation-state-list { + key node-id; + leaf node-id { + type uint64; + } + uses node-reconcile-state; + } + } + + grouping node-reconcile-state { + leaf state { + description "Current state of the node reconciliation"; + type enumeration { + enum IN_PROGRESS; + enum COMPLETED; + enum FAILED; + } + } + } + + rpc reconcile { + description "Request the reconciliation for given device or set of devices to the controller."; + input { + leaf-list nodes { + description "List of nodes to be reconciled"; + type uint64; + } + + leaf reconcile-all-nodes { + description "Flag to indicate that all nodes to be reconciled"; + type boolean; + mandatory false; + default false; + } + } + + output { + leaf result { + type boolean; + } + + leaf-list inprogress-nodes { + description "List of nodes currently reconciliation mode"; + type uint64; + } + } + } +} diff --git a/experimental/odp/rendered-service-path.yang b/experimental/odp/rendered-service-path.yang new file mode 100644 index 000000000..0a2c316da --- /dev/null +++ b/experimental/odp/rendered-service-path.yang @@ -0,0 +1,283 @@ +module rendered-service-path { + + namespace "urn:cisco:params:xml:ns:yang:sfc-rsp"; + + prefix sfc-rsp; + + import service-function-scheduler-type { + prefix sfc-sfst; + revision-date 2015-03-12; + } + import service-function-path-metadata { + prefix sfc-md; + revision-date 2014-07-01; + } + import service-locator { + prefix sfc-sl; + revision-date 2014-07-01; + } + import service-statistics { + prefix sfc-ss; + revision-date 2014-07-01; + } + import sfc-common { + prefix sfc-common; + } + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + + description + "This module contains a collection of YANG definitions to + manage Rendered Service Paths. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC + // publication and remove this note. + + revision 2014-07-01 { + description + "Changes based on Opendaylight Testing and IETF SFC ml."; + reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; + } + + // Rendered Service Path + + container rendered-service-paths { + description + "A container that holds the list of all Rendered Service Paths + in a SFC domain"; + list rendered-service-path { + key "name"; + description + "A list that holds operational data for all RSPs in the + domain"; + leaf name { + type sfc-common:rsp-name; + description + "The name of this rendered function path. This is the same + name as the associated SFP"; + } + leaf parent-service-function-path { + type sfc-common:sfp-name; + description + "Service Function Path from which this RSP was + instantiated"; + } + leaf transport-type { + type sfc-sl:sl-transport-type-def; + default "sfc-sl:vxlan-gpe"; + description + "Transport type as set in the Parent Service Function + Path"; + } + leaf context-metadata { + config false; + type sfc-md:context-metadata-ref; + description + "The name of the associated context metadata"; + } + leaf variable-metadata { + config false; + type sfc-md:variable-metadata-ref; + description + "The name of the associated variable metadata"; + } + leaf tenant-id { + type string; + description + "This RSP was created for a specific tenant-id"; + } + // Its not possible to mark a uses statement as "config false". + // The statistics will only be written to in operational. + uses sfc-ss:service-statistics-group { + description "Global Rendered Service Path statistics"; + } + list rendered-service-path-hop { + key "hop-number"; + leaf hop-number { + type uint8; + description + "A Monotonically increasing number"; + } + leaf service-function-name { + type sfc-common:sf-name; + description + "Service Function name"; + } + leaf service-function-group-name { + type string; + description + "Service Function group name"; + } + leaf service-function-forwarder { + type sfc-common:sff-name; + description + "Service Function Forwarder name"; + } + leaf service-function-forwarder-locator { + type sfc-common:sff-data-plane-locator-name; + description + "The name of the SFF data plane locator"; + } + leaf service-index { + type uint8; + description + "Provides location within the service path. + Service index MUST be decremented by service functions + or proxy nodes after performing required services. MAY + be used in conjunction with service path for path + selection. Service Index is also valuable when + troubleshooting/reporting service paths. In addition to + location within a path, SI can be used for loop + detection."; + } + ordered-by user; + description + "A list of service functions that compose the + service path"; + } + leaf service-chain-name { + type sfc-common:sfc-name; + description + "The Service Function Chain used as blueprint for this + path"; + } + leaf starting-index { + type uint8; + description + "Starting service index"; + } + leaf path-id { + type uint32 { + range "0..16777216"; + } + mandatory true; + description + "Identifies a service path. + Participating nodes MUST use this identifier for path + selection. An administrator can use the service path + value for reporting and troubleshooting packets along + a specific path."; + } + leaf symmetric-path-id { + type uint32 { + range "0..16777216"; + } + description + "Identifies the associated symmetric path, if any."; + } + leaf reverse-path { + type boolean; + mandatory true; + description + "True if this path is the reverse path of a symmetric + chain."; + } + leaf sfc-encapsulation { + type sfc-sl:sfc-encapsulation-type; + description + "The type of encapsulation used in this path for passing + SFC information along the chain"; + } + } + } + + rpc trace-rendered-service-path { + description + "Requests a NSH Traceroute through the specified + rendered service path"; + input { + leaf name { + type string; + description + "The name of the rendered function path."; + } + } + output { + leaf result { + type boolean; + description + "Whether NSH traceroute for the requested path was + successful"; + } + } + } + + grouping rendered-service-path-first-hop-info { + description + "This groups holds the the container that provides + information about the first hop in a rendered service + path"; + container rendered-service-path-first-hop { + description + "Provides all necessary information for a system to construct + a NSH header and associated overlay packet to target the + first service hop of a Rendered Service Path"; + leaf starting-index { + type uint8; + description + "Starting service index"; + } + leaf symmetric-path-id { + type uint32 { + range "0..16777216"; + } + description + "Identifies the associated symmetric path, if any."; + } + leaf path-id { + type uint32 { + range "0..16777216"; + } + description + "Identifies a service path. + Participating nodes MUST use this identifier for path + selection. An administrator can use the service path + value for reporting and troubleshooting packets along + a specific path."; + } + leaf transport-type { + type sfc-sl:sl-transport-type-def; + description + "Defines the data-plane protocol used by the first + Service Function Forwarder"; + } + + uses sfc-sl:ip-port-locator; + uses sfc-sl:mpls-locator; + } + } + + rpc read-rendered-service-path-first-hop { + description + "Read all the necessary information for the first hop of a + Rendered Service Path"; + input { + leaf name { + type string; + description + "The name of this rendered service path"; + } + } + output { + uses rendered-service-path-first-hop-info; + } + } +} diff --git a/experimental/odp/rfc2385.yang b/experimental/odp/rfc2385.yang new file mode 100644 index 000000000..9912144e6 --- /dev/null +++ b/experimental/odp/rfc2385.yang @@ -0,0 +1,35 @@ +// Contents of "rfc2385" +module rfc2385 { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:rfc2385:cfg"; + prefix "rfc2385"; + + organization "AT&T Services, Inc."; + + contact "Om Prakash "; + + description + "This module contains the base YANG definitions for + Netty Epoll Signature option. + + Copyright (c)2016 AT&T Services, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2016-03-24" { + description + "Initial revision"; + } + + + typedef rfc2385-key { + reference "https://tools.ietf.org/html/rfc2385#section-4.5"; + type string { + length 1..80; + } + } + +} diff --git a/experimental/odp/rpc-context.yang b/experimental/odp/rpc-context.yang deleted file mode 100644 index 5c8b11341..000000000 --- a/experimental/odp/rpc-context.yang +++ /dev/null @@ -1,32 +0,0 @@ -module rpc-context { - yang-version 1; - namespace "urn:ietf:params:xml:ns:yang:rpc-context"; - prefix "rpcx"; - - organization "TBD"; - - contact "TBD"; - - description ""; - - revision 2013-06-17 { - description "Initial mock"; - } - - - grouping rpc-context-ref { - description "A reference to RPC context."; - leaf context-instance { - type instance-identifier; - description "Pointer to the context. "; - } - } - - extension "rpc-context-instance" { - description - "Marks enclosing (parent) schema node as suitable RPC context. - The argument is identity which is used to identify RPC context - type."; - argument "context-type"; - } -} diff --git a/experimental/odp/rpcbench-payload.yang b/experimental/odp/rpcbench-payload.yang new file mode 100644 index 000000000..a054908da --- /dev/null +++ b/experimental/odp/rpcbench-payload.yang @@ -0,0 +1,64 @@ +module rpcbench-payload { + yang-version 1; + namespace "rpcbench-payload"; + prefix "rpcb"; + + import yang-ext { prefix ext; revision-date "2013-07-09"; } + + revision "2015-07-02" { + description "Initial revision of rpcbenchmark model"; + } + + identity node-context { + description "Identity used to mark node context for Routed RPCs (determines the type of routing)"; + } + + grouping payload { + list payload { + description + "The input and output payload for the RPC Benchmark's Global RPC Server (a list of integers)"; + key id; + leaf id { + type int32; + } + } + } + + rpc global-rpc-bench { + description + "Interface to the RPC Benchmark's Global RPC Server. In each RPC call, the input is copied on the output"; + input { + uses payload; + } + output { + uses payload; + } + } + + rpc routed-rpc-bench { + description + "Interface to RPC Benchmark's Routed RPC Servers. In each RPC call, the input is copied on the output"; + input { + leaf node { + ext:context-reference "node-context"; + type "instance-identifier"; + } + uses payload; + } + output { + uses payload; + } + } + + container rpcbench-rpc-routes { + list rpc-route { + description + "Routed RPC server context instances (i.e. instances to which RPC calls are routed)"; + key id; + ext:context-instance "node-context"; + leaf id { + type string; + } + } + } +} diff --git a/experimental/odp/rpcbenchmark.yang b/experimental/odp/rpcbenchmark.yang new file mode 100644 index 000000000..7ec13578b --- /dev/null +++ b/experimental/odp/rpcbenchmark.yang @@ -0,0 +1,112 @@ +module rpcbenchmark { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:rpcbenchmark"; + prefix "rpcbenchmark"; + + revision "2015-07-02" { + description "Initial revision of rpcbenchmark model"; + } + + rpc test-status { + description + "Get test status"; + output { + leaf execStatus { + type enumeration { + enum "idle" { + value 1; + } + enum "executing" { + value 2; + } + } + } + leaf global-server-cnt { + type uint32; + default 0; + description + "The number of times the Global RPC server was invoked"; + + } + } + } + + rpc start-test { + description + "Start a new RPC Benchmark test run"; + + input { + leaf operation { + mandatory true; + type enumeration { + enum "GLOBAL-RTC" { + value 1; + description + "Use Global RPC service and run-to-completion client"; + } + enum "ROUTED-RTC" { + value 2; + description + "Use routed RPC service and run-to-completion client. RPC server instances are + dynamically created when the test starts and deleted when the test finishes"; + } + } + description + "RPC type and client type to use in the test"; + } + leaf num-clients { + type uint32; + default 1; + description + "Number of clients (test client threads) to start"; + } + leaf num-servers { + type uint32; + default 1; + description + "Number of RPC server instances. Only valid for routed RPCs."; + } + + leaf payload-size { + type uint32; + default 1; + description + "Input/Output payload size: number of elements in the list of integers that is the input and output RPC payload"; + } + leaf iterations { + type uint32; + default 1; + description + "Number of calls to the specified RPC server that is to be made by each client"; + } + + } + + output { + leaf global-rtc-client-ok { + type uint32; + default 0; + description + "Number of successful calls to the Global RPC Server for all test threads"; + } + leaf global-rtc-client-error { + type uint32; + default 0; + description + "Number of failed calls to the Global RPC server from all test threads"; + } + leaf exec-time { + type uint32; + default 0; + description + "Test execution time, in milliseconds"; + } + leaf rate { + type uint32; + default 0; + description + "RPC rate (Number of RPCs/sec)"; + } + } + } +} diff --git a/experimental/odp/rsp-manager.yang b/experimental/odp/rsp-manager.yang new file mode 100644 index 000000000..9d49ee968 --- /dev/null +++ b/experimental/odp/rsp-manager.yang @@ -0,0 +1,176 @@ +module rendered-service-path-manager { + + namespace "urn.cisco.params:xml:ns:rsp-manager"; + + prefix "rsp-manager"; + + import sfc-common { + prefix sfc-common; + revision-date 2015-10-17; + } + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + + import service-function { + prefix sfc-sf; + revision-date 2014-07-01; + } + + import service-function-forwarder { + prefix sfc-sff; + revision-date 2014-07-01; + } + + description + "This module defines rendered service path manager capabilities"; + + revision "2016-04-21" { + description + "Initial revision."; + } + + typedef service-function-in-chain { + type string; + description + "Combination of service function name in concrete service + chain"; + } + + // rsp hop provided by rsp manager + grouping rsp-hop-info { + container service-function-data { + uses sfc-sf:service-function-base; + } + container service-function-forwarder-data { + uses sfc-sff:service-function-forwarder-base; + } + leaf service-index { + type uint8; + } + choice next-hop { + case local-sff-case { + leaf local-sff { + description + "Next hop is on the same node/service function forwarder + as the current hop. All necessary data for next hop are + alredy in the list of hops for specific rendered service + path."; + type empty; + } + } + case remote-sff-case { + container remote-sff { + description + "Next hop is on different node/service function forwarder"; + uses sfc-sff:service-function-forwarder-base; + } + } + case last-hop-case { + leaf last-hop { + description + "This is the last hop of chain"; + type empty; + } + } + } + } + + // RSP manager + container rsp-manager-data { + list renderer { + description + "Contains all available renderers with appropriate data. + Every renderer gets its own part (hops) of rendered service + path to resolve, configure devices and inform RSP manager + about result."; + key renderer-name; + leaf renderer-name { + type sfc-common:renderer-name; + } + list rendered-service-path { + description + "List of PARTIAL rendered service chains. Each RSP contains + another list of hops chosen for specific renderer to configure"; + key rsp-name; + leaf rsp-name { + type sfc-common:rsp-name; + } + leaf path-id { + type uint32; + } + list hop-to-configure { + description + "Contains all necessary data to identify service function + forwarder and other SFC entities, their place in rendered + service path and info about what to do in next hop"; + key hop-number; + leaf hop-number { + type uint8; + } + uses rsp-hop-info; + } + } + } + } + + // Responsible nodes + container managed-nodes-by-renderer { + config false; + description + "Contains list of all nodes/devices which particular renderer can manage + and configure."; + list renderer-nodes { + key renderer-name; + leaf renderer-name { + type sfc-common:renderer-name; + } + container nodes { + description + "List of nodes managed by renderer"; + list node { + key node-name; + leaf node-name { + type sfc-common:sn-name; + } + leaf ip-mgmt-address { + type inet:ip-address; + } + } + } + } + } + + // Renderer status + container renderer-path-states { + description + "When renderer's task provided by rendered service path manager is completed, + renderer reports back to rsp manager whether task was completed or not."; + config false; + list renderer-path-state { + key renderer-name; + leaf renderer-name { + type sfc-common:renderer-name; + } + container configured-rendered-paths { + description "trace all rendered service paths which renderer obtains + and tracks status info"; + list configured-rendered-path { + key rsp-name; + leaf rsp-name { + type sfc-common:rsp-name; + } + leaf path-status { + type enumeration { + enum in-progress; + enum success; + enum failure; + } + } + } + } + } + } +} diff --git a/experimental/odp/rsvp.yang b/experimental/odp/rsvp.yang new file mode 100644 index 000000000..117e31bbb --- /dev/null +++ b/experimental/odp/rsvp.yang @@ -0,0 +1,1001 @@ +module rsvp { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:rsvp"; + prefix "rsvp"; + + import iana { prefix iana; revision-date 2013-08-16; } + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import ieee754 { prefix ieee754; revision-date 2013-08-19; } + import network-concepts { prefix netc; revision-date 2013-11-25; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the definition of types related to + Resource Reservation Protocol (RSVP). + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2015-08-20" { + description + "Updated to extend RSVP Objects."; + reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-01#section-2.1"; + } + + revision "2013-08-20" { + description + "Initial revision."; + reference "https://tools.ietf.org/html/rfc2205"; + } + + typedef attribute-filter { + type uint32; + } + + grouping attribute-filters { + leaf include-any { + type attribute-filter; + } + + leaf exclude-any { + type attribute-filter; + } + + leaf include-all { + type attribute-filter; + } + } + + grouping rsvp-te-object { + description + "Common marker for all RSVP-TE Objects."; + } + + grouping priority { + leaf hold-priority { + type uint8; + default 0; + } + + leaf setup-priority { + type uint8; + default 0; + } + } + + grouping tunnel-attributes { + uses priority; + + leaf local-protection-desired { + type boolean; + default false; + } + + leaf label-recording-desired { + type boolean; + default false; + } + + leaf se-style-desired { + type boolean; + default false; + } + + leaf session-name { + type string; + } + + uses attribute-filters; + } + + typedef lsp-id { + type uint32; + reference "https://tools.ietf.org/html/rfc3209#section-4.6.2.1"; + } + + typedef tunnel-id { + type uint16; + reference "https://tools.ietf.org/html/rfc3209#section-4.6.1.1"; + } + + typedef ipv4-extended-tunnel-id { + type inet:ipv4-address-no-zone; + reference "https://tools.ietf.org/html/rfc3209#section-4.6.1.1"; + } + + typedef ipv6-extended-tunnel-id { + type inet:ipv6-address-no-zone; + reference "https://tools.ietf.org/html/rfc3209#section-4.6.1.2"; + } + + typedef srlg-id { + type uint32; + reference "http://tools.ietf.org/html/rfc4202#section-2.3"; + } + + typedef lsp-flag { + type enumeration { + enum unprotected { + value 0; + } + enum full-rerouting { + value 1; + } + enum rerouting-without-extra-traffic { + value 2; + } + enum protection-with-extra-traffic { + value 4; + } + enum unidirectional-protection { + value 8; + } + enum bidirectional-protection { + value 10; + } + } + } + + typedef link-flags { + type enumeration { + enum totally-unprotected { + value 0; + } + enum extra-traffic { + value 1; + } + enum unprotected { + value 2; + } + enum shared { + value 4; + } + enum dedicated-1to1{ + value 8; + } + enum dedicated-1plus1 { + value 10; + } + enum enhanced { + value 20; + } + } + } + + grouping error-spec { + reference "https://tools.ietf.org/html/rfc2205#page-81"; + + leaf node { + type inet:ip-address-no-zone; + mandatory true; + } + + leaf flags { + type bits { + bit in-place { + position 7; + } + bit not-guilty { + position 6; + } + } + } + + leaf code { + type uint8; + mandatory true; + } + + leaf value { + type uint16; + mandatory true; + } + } + + grouping user-error-spec { + reference "https://tools.ietf.org/html/rfc5284#section-3"; + + leaf enterprise { + type iana:enterprise-number; + mandatory true; + } + + leaf sub-org { + type uint8; + default 0; + } + + leaf value { + type uint16; + mandatory true; + } + + leaf description { + type string; + default ""; + } + + container subobjects { + // Filled by enterprise-specific augmentations + } + } + + // Marker + grouping c-label; + + grouping type1-label { + reference "https://tools.ietf.org/html/rfc3209#section-4.1"; + + uses c-label; + + leaf type1-label { + type uint32; + mandatory true; + } + } + + grouping generalized-label { + reference "https://tools.ietf.org/html/rfc3473#section-2.3"; + + uses c-label; + + leaf generalized-label { + type binary; + mandatory true; + } + } + + grouping waveband-switching-label { + reference "https://tools.ietf.org/html/rfc3473#section-2.4"; + + uses c-label; + + leaf end-label { + type uint32; + mandatory true; + } + leaf start-label { + type uint32; + mandatory true; + } + leaf waveband-id { + type uint32; + mandatory true; + } + } + + grouping label-set { + reference "https://tools.ietf.org/html/rfc3473#section-2.6"; + + leaf action { + type enumeration { + enum inclusive-list { + value 0; + } + enum exclusive-list { + value 1; + } + enum inclusive-range { + value 2; + } + enum exclusive-range { + value 3; + } + } + } + + container label-type { + // Technology-specific + } + + list subchannels { + + } + } + + //marker + grouping c-subobject { + + } + + grouping ip-prefix-subobject { + uses c-subobject; + leaf ip-prefix { + reference "http://tools.ietf.org/html/rfc3209#section-4.3.3.1"; + type inet:ip-prefix; + mandatory true; + } + } + + grouping as-number-subobject { + uses c-subobject; + leaf as-number { + reference "http://tools.ietf.org/html/rfc3209#section-4.3.3.4"; + type inet:as-number; + mandatory true; + } + } + + grouping label-subobject { + uses c-subobject; + + leaf uni-directional { + type boolean; + mandatory true; + } + + choice label-type { + case type1-label-case { + container type1-label { + uses type1-label; + } + } + case generalized-label-case { + container generalized-label { + uses generalized-label; + } + } + case waveband-switching-label-case { + container waveband-switching-label { + uses waveband-switching-label; + } + } + } + } + + grouping unnumbered-subobject { + uses c-subobject; + leaf router-id { + type uint32; + mandatory true; + } + + leaf interface-id { + type uint32; + mandatory true; + } + } + + grouping srlg-subobject { + uses c-subobject; + leaf srlg-id { + type srlg-id; + mandatory true; + } + } + + typedef path-key { + type uint16; + } + + typedef pce-id { + type binary { + length 4|16; + } + } + + grouping path-key-subobject { + reference "https://tools.ietf.org/html/rfc5520#section-3.1"; + uses c-subobject; + + leaf pce-id { + type pce-id; + mandatory true; + } + + leaf path-key { + type path-key; + mandatory true; + } + } + + grouping protection-subobject { + container protection-subobject { + leaf secondary { + type boolean; + default false; + } + leaf protecting { + type boolean; + default false; + } + leaf notification { + type boolean; + default false; + } + leaf operational { + type boolean; + default false; + } + leaf lsp-flag { + type lsp-flag; + mandatory true; + } + leaf link-flags { + type link-flags; + mandatory true; + } + leaf in-place { + type boolean; + default false; + } + leaf required { + type boolean; + default false; + } + leaf seg-flag { + type lsp-flag; + mandatory true; + } + } + } + + grouping record-route-subobjects { + leaf protection-available { + type boolean; + default false; + } + + leaf protection-in-use { + type boolean; + default false; + } + + choice subobject-type { + case ip-prefix-case { + container ip-prefix { + uses ip-prefix-subobject; + } + } + + case label-case { + container label { + uses label-subobject; + + leaf global { + type boolean; + default false; + } + } + } + + case unnumbered-case { + container unnumbered { + uses unnumbered-subobject; + } + } + + case path-key-case { + container path-key { + uses path-key-subobject; + } + } + } + } + + grouping basic-explicit-route-subobjects { + description "Subobjects shared between XRO and ERO"; + reference "https://tools.ietf.org/html/rfc4874#section-4.1"; + + choice subobject-type { + case as-number-case { + container as-number { + uses as-number-subobject; + } + } + case ip-prefix-case { + container ip-prefix { + uses ip-prefix-subobject; + } + } + case label-case { + container label { + uses label-subobject; + } + } + case srlg-case { + container srlg { + uses srlg-subobject; + } + } + case unnumbered-case { + container unnumbered { + uses unnumbered-subobject; + } + } + } + } + + grouping exclude-route-object { + container exclude-route-object { + uses rsvp-te-object; + list subobject-container { + uses exclude-route-subobjects; + ordered-by user; + } + } + } + + grouping record-route-subobjects-list { + list subobject-container { + uses record-route-subobjects; + ordered-by user; + } + } + + grouping explicit-route-subobjects-list { + + list subobject-container { + leaf loose { + type boolean; + mandatory true; + } + + uses explicit-route-subobjects; + ordered-by user; + } + } + + grouping record-route-object { + container record-route-object { + uses rsvp-te-object; + uses record-route-subobjects-list; + } + } + + grouping explicit-route-object { + container explicit-route-object { + description "Explicit Route Object"; + reference "http://tools.ietf.org/html/rfc3209#section-4.3"; + + uses rsvp-te-object; + uses explicit-route-subobjects-list; + } + } + + grouping secondary-explicit-route-object { + container secondary-explicit-route-object { + description "Explicit Route Object"; + reference "http://tools.ietf.org/html/rfc4873#section-4.1"; + + uses rsvp-te-object; + list subobject-container { + leaf loose { + type boolean; + mandatory true; + } + + uses secondary-explicit-route-subobjects; + ordered-by user; + } + } + } + + grouping secondary-explicit-route-subobjects { + uses explicit-route-subobjects { + augment "subobject-type" { + case basic-protection-case { + container basic-protection { + uses protection-subobject; + } + } + + case dynamic-control-protection-case { + container dynamic-control-protection { + uses protection-subobject; + } + } + } + } + } + + grouping secondary-record-route-object { + container secondary-record-route-object { + uses rsvp-te-object; + list subobject-container { + uses secondary-record-route-subobjects; + ordered-by user; + } + } + } + + grouping secondary-record-route-subobjects { + uses record-route-subobjects { + augment "subobject-type" { + case basic-protection-case { + container basic-protection { + uses protection-subobject; + } + } + + case dynamic-control-protection-case { + container dynamic-control-protection { + uses protection-subobject; + } + } + } + } + } + + grouping exclude-route-subobjects { + description "Subobject of an Exclude Route Object"; + reference "https://tools.ietf.org/html/rfc4874#section-3.1"; + + leaf mandatory { + type boolean; + default false; + } + + leaf attribute { + type enumeration { + enum interface { + value 0; + } + enum node { + value 1; + } + enum srlg { + value 2; + } + } + mandatory true; + } + + uses basic-explicit-route-subobjects; + } + + grouping explicit-route-subobjects { + description "Subobject of an Explicit Route Object"; + reference "https://tools.ietf.org/html/rfc4874#section-4.1"; + uses basic-explicit-route-subobjects { + augment "subobject-type" { + case exrs-case { + container exrs { + list exrs { + uses exclude-route-subobjects; + } + } + } + case path-key-case { + container path-key { + uses path-key-subobject; + } + } + } + } + } + + grouping tspec-object { + container tspec-object { + description "SENDER TSPEC Object"; + reference "https://tools.ietf.org/html/rfc2210"; + + uses rsvp-te-object; + leaf token-bucket-rate { + type ieee754:float32; + } + leaf token-bucket-size { + type ieee754:float32; + } + leaf peak-data-rate { + type ieee754:float32; + } + leaf minimum-policed-unit { + type uint32; + } + leaf maximum-packet-size { + type uint32; + } + } + } + + typedef service-number { + type enumeration { + enum guaranteed { + value 2; + } + enum controlled-load { + value 5; + } + } + } + + grouping flow-spec-object { + container flow-spec-object { + description "FLOW_SPEC"; + reference "https://tools.ietf.org/html/rfc2210"; + + uses rsvp-te-object; + leaf service-header { + type service-number; + } + + uses tspec-object; + + leaf rate { + type ieee754:float32; + } + leaf slack-term { + type uint32; + } + } + } + + typedef association-type { + type enumeration { + enum reserved { + value 0; + } + enum recovery { + value 1; + } + } + } + + grouping association-object { + container association-object { + description "Association Object"; + reference "http://tools.ietf.org/html/rfc4872#section-16"; + + uses rsvp-te-object; + leaf association-type { + type association-type; + } + leaf association-id { + type uint16; + } + leaf ip-address { + type inet:ip-address-no-zone; + mandatory true; + } + } + } + + grouping admin-status-object { + container admin-status-object { + description "Admin Status Object"; + reference "http://tools.ietf.org/html/rfc3473#section-7.1"; + + uses rsvp-te-object; + leaf reflect { + type boolean; + default false; + } + leaf testing { + type boolean; + default false; + } + leaf administratively-down { + type boolean; + default false; + } + leaf deletion-in-progress { + type boolean; + default false; + } + } + } + + grouping primary-path-route-object { + container primary-path-route-object { + description "Protection Subobject"; + reference "http://tools.ietf.org/html/rfc4872#section-15"; + + uses rsvp-te-object; + uses explicit-route-subobjects-list; + } + } + + grouping detour-object { + description "DETOUR Object"; + reference "http://tools.ietf.org/html/rfc4090#section-4.2"; + + choice detour-object { + case ipv4-detour-object { + uses rsvp-te-object; + list plr { + leaf plr-id { + type inet:ipv4-address-no-zone; + mandatory true; + } + leaf avoid-node { + type inet:ipv4-address-no-zone; + mandatory true; + } + } + } + case ipv6-detour-object { + uses rsvp-te-object; + list plr-id { + leaf plr-id { + type inet:ipv6-address-no-zone; + mandatory true; + } + } + list avoid-node { + leaf avoid-node { + type inet:ipv6-address-no-zone; + mandatory true; + } + } + } + } + + } + + typedef fast-reroute-flags { + type enumeration { + enum one-to-one-backup-desired { + value 1; + } + enum facility-backup-desired { + value 2; + } + } + } + + grouping common-fast-reroute-object { + uses rsvp-te-object; + uses priority; + uses attribute-filters; + leaf hop-limit { + type uint8; + default 0; + } + leaf flags { + type fast-reroute-flags; + mandatory true; + } + leaf bandwidth { + type netc:bandwidth; + } + } + + grouping fast-reroute-object { + choice fast-reroute-object { + description "FAST REROUTE Object"; + reference "http://tools.ietf.org/html/rfc4090#section-4.1"; + + case basic-fast-reroute-object { + uses common-fast-reroute-object; + } + case legacy-fast-reroute-object { + uses common-fast-reroute-object; + } + } + } + + grouping session-attribute-object { + choice session-attribute-object { + description "SESSION_ATTRIBUTE"; + reference "http://tools.ietf.org/html/rfc3209#section-4.7"; + + case basic-session-attribute-object { + uses rsvp-te-object; + uses tunnel-attributes; + } + case session-attribute-object-with-resources-affinities { + uses rsvp-te-object; + uses tunnel-attributes; + } + } + } + + grouping bandwidth-object { + choice bandwidth-object { + description "BANDWIDTH Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.7"; + + case basic-bandwidth-object { + uses rsvp-te-object; + // No possibility to carry TLVs + leaf bandwidth { + type netc:bandwidth; + } + } + case reoptimization-bandwidth-object { + uses rsvp-te-object; + // No possibility to carry TLVs + leaf bandwidth { + type netc:bandwidth; + } + } + } + } + + grouping metric-object { + description "METRIC Object"; + reference "https://tools.ietf.org/html/rfc5440#section-7.8"; + container metric-object { + uses rsvp-te-object; + + leaf metric-type { + type uint8; + mandatory true; + } + + leaf bound { + type boolean; + default false; + } + + leaf computed { + type boolean; + default false; + } + + leaf value { + type ieee754:float32; + } + } + } + + grouping protection-object { + choice protection-object { + description "Protection Subobject"; + reference "http://tools.ietf.org/html/rfc4873#section-6.1" + + " http://tools.ietf.org/html/rfc4872#section-14"; + + case basic-protection-object-case { + container basic-protection-object { + uses rsvp-te-object; + uses protection-subobject; + } + } + case dynamic-control-protection-object-case { + container dynamic-control-protection-object { + uses rsvp-te-object; + uses protection-subobject; + } + } + } + } + + grouping lsp-attributes-object { + container lsp-attributes-object { + description "Lsp Attributes Object"; + reference "http://tools.ietf.org/html/rfc5420#section-4"; + + uses rsvp-te-object; + list subobject-container { + uses lsp-att-subobject; + } + } + } + + grouping lsp-required-attributes-object { + container lsp-required-attributes-object { + description "Lsp Required Attributes Object"; + reference "http://tools.ietf.org/html/rfc5420#section-5"; + + uses rsvp-te-object; + uses lsp-attributes-object; + } + } + + grouping attribute-flags { + description "Attributes Flags"; + reference "http://tools.ietf.org/html/rfc5420#section-3.1"; + list flag-container { + leaf flags { + type binary { + length 4; + } + } + } + } + + grouping lsp-att-subobject { + choice lsp-subobject { + case flags-tlv { + uses attribute-flags; + } + } + } +} diff --git a/experimental/odp/sal-async-config.yang b/experimental/odp/sal-async-config.yang new file mode 100644 index 000000000..caf6ab8ba --- /dev/null +++ b/experimental/odp/sal-async-config.yang @@ -0,0 +1,102 @@ +module sal-async-config { + namespace "urn:opendaylight:async-config:service"; + prefix async-config; + + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + import opendaylight-port-types {prefix port-type;revision-date "2013-09-25";} + import opendaylight-flow-types { prefix flow-types; revision-date "2013-10-26"; } + import openflow-protocol { prefix ofproto; revision-date "2013-07-31"; } + import packet-processing { prefix packet-processing; revision-date "2013-07-09"; } + + description "Asynchronous configuration message."; + + revision "2017-06-19" { + description "Initial revision of asynchronous configuration service."; + } + + typedef packet-in-mask { + type bits { + bit NO_MATCH; + bit ACTION; + bit INVALID_TTL; + } + } + + typedef port-status-mask { + description "Be careful when modifying this configuration, as this can impact lldp-speaker"; + type bits { + bit ADD; + bit DELETE; + bit UPDATE; + } + } + + typedef flow-removed-mask { + description "Be careful when modifying this configuration, as this can impact FRM."; + type bits { + bit IDLE_TIMEOUT; + bit HARD_TIMEOUT; + bit DELETE; + bit GROUP_DELETE; + } + } + + grouping async-config { + container packet-in-mask { + leaf master-mask { + type packet-in-mask; + } + + leaf slave-mask { + type packet-in-mask; + } + } + + container port-status-mask { + leaf master-mask { + type port-status-mask; + } + + leaf slave-mask { + type port-status-mask; + } + } + + container flow-removed-mask { + leaf master-mask { + type flow-removed-mask; + } + + leaf slave-mask { + type flow-removed-mask; + } + } + } + + container async-config-message { + uses ofproto:ofHeader; + uses async-config; + } + + rpc set-async { + description "Controller to switch message set configuration."; + + input { + uses "inv:node-context-ref"; + uses async-config; + } + } + + rpc get-async { + description "Controller to switch message get configuration."; + + input { + uses "inv:node-context-ref"; + } + + output { + uses async-config; + } + } + +} \ No newline at end of file diff --git a/experimental/odp/sal-bulk-flow.yang b/experimental/odp/sal-bulk-flow.yang new file mode 100644 index 000000000..1915e8c76 --- /dev/null +++ b/experimental/odp/sal-bulk-flow.yang @@ -0,0 +1,261 @@ +module sal-bulk-flow { + namespace "urn:opendaylight:bulk-flow:service"; + prefix bflow; + + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + import opendaylight-flow-types {prefix types;revision-date "2013-10-26";} + import flow-node-inventory {prefix flow-inv; revision-date "2013-08-19";} + + description "Openflow bulk flow management."; + + revision "2015-06-08" { + description "Initial revision of bulk flow service"; + } + + grouping bulk-flow-base-content-grouping { + uses inv:node-context-ref; + uses types:flow; + } + + grouping bulk-flow-list-grouping { + description "Suitable for rpc way"; + list bulk-flow-item { + uses bulk-flow-base-content-grouping; + } + } + + grouping bulk-flow-ds-list-grouping { + description "Suitable for dataStore way - includes flowId"; + list bulk-flow-ds-item { + uses bulk-flow-base-content-grouping; + leaf flow-id { + mandatory true; + type flow-inv:flow-id; + } + } + } + + rpc register { + description "register mbean etc. via rpc invocation."; + } + + rpc add-flows-rpc { + description "Adding multiple flows to openflow device via direct rpc invocation."; + input { + uses bulk-flow-list-grouping; + } + } + + rpc remove-flows-rpc { + description "Removing multiple flows from openflow device via direct rpc invocation."; + input { + uses bulk-flow-list-grouping; + } + } + + rpc add-flows-ds { + description "Adding multiple flows to openflow device via dataStore."; + input { + leaf always-create-parents { + description "true if all items must take care of parent structure"; + type boolean; + default false; + } + uses bulk-flow-ds-list-grouping; + } + } + + rpc remove-flows-ds { + description "Removing multiple flows from openflow device via dataStore."; + input { + uses bulk-flow-ds-list-grouping; + } + } + + rpc flow-test { + input { + leaf create-parents { + type boolean; + mandatory true; + default true; + status current; + description "Create parents if doesn't exist"; + } + leaf is-add { + type boolean; + mandatory true; + status current; + description "Add or delete"; + } + leaf dpn-count { + type uint32; + mandatory true; + status current; + description "No of DPNs"; + } + leaf flows-per-dpn { + type uint32; + mandatory true; + status current; + description "Flows to be pushed per DPN"; + } + leaf start-table-id { + type uint32; + mandatory true; + status current; + description "Start adding flows from this table id"; + } + leaf end-table-id { + type uint32; + mandatory true; + status current; + description "The last table to add flows to and then wrap around"; + } + leaf batch-size { + type uint32; + mandatory true; + status current; + description "batch size"; + } + leaf seq { + type boolean; + mandatory true; + status current; + description "Whether to use sequential or concurrent writer"; + } + leaf tx-chain { + type boolean; + mandatory true; + status current; + description "Whether to use PingPong Broker or not. seq is ignored."; + } + leaf sleep-for { + type uint32; + mandatory true; + status current; + description "sleep for the given milliseconds"; + } + leaf sleep-after { + type uint32; + mandatory true; + status current; + description "Sleep after the given number of iterations. Will be used in the concurrent case only"; + } + } + } + + rpc read-flow-test { + input { + leaf verbose { + type boolean; + mandatory true; + status current; + description "Add or delete"; + } + leaf dpn-count { + type uint32; + mandatory true; + status current; + description "No of DPNs"; + } + leaf is-config-ds { + type boolean; + mandatory true; + status current; + description "true for Config DS and false for Operational DS"; + } + leaf flows-per-dpn { + type uint32; + mandatory true; + status current; + description "Flows to be pushed per DPN"; + } + leaf start-table-id { + type uint32; + mandatory true; + status current; + description "Start reading from this table id"; + } + leaf end-table-id { + type uint32; + mandatory true; + status current; + description "The last table id to read from and then wrap over"; + } + } + } + + rpc flow-rpc-add-test { + input { + leaf dpn-id { + type string; + mandatory true; + status current; + description "DPID to which flows are pushed"; + } + leaf flow-count { + type uint32; + mandatory true; + status current; + description "Flows to be pushed per DPN"; + } + leaf rpc-batch-size { + type uint32; + mandatory true; + status current; + description "Batch-size which would be sent continuously without any pause, If less than sal-bulk-flow:flow-count, a fixed pause of 40 ms would be introduced"; + } + } + } + + rpc flow-rpc-add-multiple { + input { + leaf flow-count { + type uint32; + mandatory true; + status current; + description "Flows to be pushed per DPN"; + } + leaf rpc-batch-size { + type uint32; + mandatory true; + status current; + description "Batch-size which would be sent continuously without any pause, If less than sal-bulk-flow:flow-count, a fixed pause of 40 ms would be introduced"; + } + } + } + + rpc table-test { + input { + leaf operation { + type enumeration { + enum add; + enum delete; + } + status current; + description "Type of operation, add or delete"; + } + + leaf dpn-count { + type uint32; + mandatory true; + status current; + description "Total number of dpns to add these tables"; + } + + leaf start-table-id { + type uint32; + mandatory true; + status current; + description "Starting table id"; + } + + leaf end-table-id { + type uint32; + mandatory true; + status current; + description "Last table id"; + } + } + } +} diff --git a/experimental/odp/sal-bundle.yang b/experimental/odp/sal-bundle.yang new file mode 100644 index 000000000..514f40770 --- /dev/null +++ b/experimental/odp/sal-bundle.yang @@ -0,0 +1,91 @@ +module sal-bundle { + namespace "urn:opendaylight:openflowplugin:extension:onf:bundle:service"; + prefix bundle-ext; + + import onf-extensions {prefix onf-ext; revision-date "2017-01-24";} + import opendaylight-inventory {prefix inv; revision-date "2013-08-19";} + import sal-experimenter-message {prefix exp-msg; revision-date "2015-10-20";} + import opendaylight-flow-types {prefix flow-types; revision-date "2013-10-26";} + import opendaylight-group-types {prefix group-types; revision-date "2013-10-18";} + import opendaylight-port-types {prefix port-types; revision-date "2013-09-25";} + + revision "2017-01-24" { + description "Initial revision of extension bundle service"; + } + + augment "/exp-msg:send-experimenter/exp-msg:input/exp-msg:experimenter-message-of-choice" { + case bundle-control-sal { + container sal-control-data { + uses onf-ext:bundle-control-grouping; + } + } + case bundle-add-message-sal { + container sal-add-message-data { + uses onf-ext:bundle-common-grouping; + uses bundle-inner-message-grouping; + } + } + } + + grouping bundle-inner-message-grouping { + uses inv:node-context-ref; + choice bundle-inner-message { + case bundle-add-flow-case { + container add-flow-case-data { + uses flow-types:flow; + } + } + case bundle-update-flow-case { + container update-flow-case-data { + uses flow-types:flow; + } + } + case bundle-remove-flow-case { + container remove-flow-case-data { + uses flow-types:flow; + } + } + case bundle-add-group-case { + container add-group-case-data { + uses group-types:group; + } + } + case bundle-update-group-case { + container update-group-case-data { + uses group-types:group; + } + } + case bundle-remove-group-case { + container remove-group-case-data { + uses group-types:group; + } + } + case bundle-update-port-case { + container update-port-case-data { + uses port-types:port-mod; + } + } + } + } + + rpc control-bundle { + description "Control bundles on openflow device."; + input { + uses inv:node-context-ref; + uses onf-ext:bundle-control-grouping; + } + } + + rpc add-bundle-messages { + description "Add messages into bundle on openflow device."; + input { + uses inv:node-context-ref; + uses onf-ext:bundle-common-grouping; + container messages { + list message { + uses bundle-inner-message-grouping; + } + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/sal-echo.yang b/experimental/odp/sal-echo.yang new file mode 100644 index 000000000..bd5fc4ef2 --- /dev/null +++ b/experimental/odp/sal-echo.yang @@ -0,0 +1,35 @@ +module sal-echo { + namespace "urn:opendaylight:echo:service"; + prefix echo; + + import opendaylight-inventory {prefix inv; revision-date "2013-08-19";} + + description "Openflow echo service."; + + revision "2015-03-05" { + description "Initial proposal, tentative API."; + } + + rpc send-echo { + description "Sending echo message to openflow device."; + + input { + uses "inv:node-context-ref"; + leaf data { + description "Openflow echo request payload (arbirary-length data field). The + data field might be a message timestamp to check latency, various lengths + to measure bandwidth, or zero-size to verify liveness between the switch + and controller."; + + type binary; + } + } + output { + leaf data { + description "Unmodified data field."; + + type binary; + } + } + } +} diff --git a/experimental/odp/sal-experimenter-message.yang b/experimental/odp/sal-experimenter-message.yang new file mode 100644 index 000000000..5025b741f --- /dev/null +++ b/experimental/odp/sal-experimenter-message.yang @@ -0,0 +1,33 @@ +module sal-experimenter-message { + namespace "urn:opendaylight:experimenter-message:service"; + prefix exp-msg; + + import opendaylight-inventory {prefix inv; revision-date "2013-08-19";} + import openflowplugin-experimenter-types {prefix exp-type; revision-date "2015-10-20";} + + description "Openflow experimenter (symmetric) message service and notification."; + + revision "2015-10-20" { + description "Initial revision of experimenter message service"; + } + + grouping experimenter-symmetric-message { + description "Experimenter message with node and xid reference included."; + uses "inv:node-context-ref"; + uses exp-type:experimenter-core-message; + } + + rpc send-experimenter { + description "Send experimenter request to device, expecting reply."; + input { + uses "inv:node-context-ref"; + uses exp-type:experimenter-core-message; + } + } + + notification experimenter-message-from-dev { + description "Upon experimenter request message received."; + uses experimenter-symmetric-message; + } + +} diff --git a/experimental/odp/sal-experimenter-mp-message.yang b/experimental/odp/sal-experimenter-mp-message.yang new file mode 100755 index 000000000..1d0363c2e --- /dev/null +++ b/experimental/odp/sal-experimenter-mp-message.yang @@ -0,0 +1,26 @@ +module sal-experimenter-mp-message { + namespace "urn:opendaylight:experimenter-mp-message:service"; + prefix exp-mp-msg; + + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + import openflowplugin-experimenter-types {prefix exp-type;revision-date "2015-10-20";} + + description "Openflow multipart experimenter message service."; + + revision "2015-10-20" { + description "Initial revision of experimenter multipart message service"; + } + + rpc send-experimenter-mp-request { + description "Send experimenter multipart request to device, expecting reply."; + input { + uses "inv:node-context-ref"; + uses exp-type:experimenter-core-message; + } + output { + list experimenter-core-message-item { + uses exp-type:experimenter-core-message; + } + } + } +} diff --git a/experimental/odp/sal-flat-batch.yang b/experimental/odp/sal-flat-batch.yang new file mode 100644 index 000000000..05925579e --- /dev/null +++ b/experimental/odp/sal-flat-batch.yang @@ -0,0 +1,166 @@ +module sal-flat-batch { + namespace "urn:opendaylight:flat-batch:service"; + prefix fbatch; + + import yang-ext {prefix ext; revision-date "2013-07-09";} + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + import batch-common {prefix batch;revision-date "2016-03-22";} + import sal-flows-batch {prefix f-batch;revision-date "2016-03-14";} + import flow-node-inventory {prefix flow-inv; revision-date "2013-08-19";} + import sal-groups-batch {prefix g-batch;revision-date "2016-03-15";} + import opendaylight-group-types {prefix group-type;revision-date "2013-10-18";} + import sal-meters-batch {prefix m-batch;revision-date "2016-03-16";} + import opendaylight-meter-types {prefix meter-type;revision-date "2013-09-18";} + + description "Openflow batch flow management."; + + revision "2016-03-21" { + description "Initial revision of batch flat service."; + } + + + rpc process-flat-batch { + description "Process add/update/remove of items in batch towards openflow device."; + input { + uses "inv:node-context-ref"; + + list batch { + key batch-order; + + uses batch:batch-order-grouping; + choice batch-choice { + // filled via augmentations + } + } + leaf exit-on-first-error { + description "If true then batch will execute all steps and report list of occurred errors, + otherwise there will be only first error reported and execution will be stop right there."; + type boolean; + } + } + output { + list batch-failure { + key batch-order; + + uses batch:batch-order-grouping; + choice batch-item-id-choice { + // filled via augmentations + } + } + } + } + + augment "/process-flat-batch/input/batch/batch-choice" { + ext:augment-identifier "flat-batch-flow-crud-case-aug"; + description "Openflow add/remove/update flow operation."; + + case flat-batch-add-flow-case { + list flat-batch-add-flow { + key batch-order; + + uses batch:batch-order-grouping; + uses f-batch:batch-flow-input-grouping; + } + } + case flat-batch-remove-flow-case { + list flat-batch-remove-flow { + key batch-order; + + uses batch:batch-order-grouping; + uses f-batch:batch-flow-input-grouping; + } + } + case flat-batch-update-flow-case { + list flat-batch-update-flow { + key batch-order; + + uses batch:batch-order-grouping; + uses f-batch:batch-flow-input-update-grouping; + } + } + } + + augment "/process-flat-batch/input/batch/batch-choice" { + ext:augment-identifier "flat-batch-group-crud-case-aug"; + description "Openflow add/remove/update group operation."; + + case flat-batch-add-group-case { + list flat-batch-add-group { + key batch-order; + + uses batch:batch-order-grouping; + uses group-type:group; + } + } + case flat-batch-remove-group-case { + list flat-batch-remove-group { + key batch-order; + + uses batch:batch-order-grouping; + uses group-type:group; + } + } + case flat-batch-update-group-case { + list flat-batch-update-group { + key batch-order; + + uses batch:batch-order-grouping; + uses g-batch:batch-group-input-update-grouping; + } + } + } + + augment "/process-flat-batch/input/batch/batch-choice" { + ext:augment-identifier "flat-batch-meter-crud-case-aug"; + description "Openflow add/remove/update meter operation."; + + case flat-batch-add-meter-case { + list flat-batch-add-meter { + key batch-order; + + uses batch:batch-order-grouping; + uses meter-type:meter; + } + } + case flat-batch-remove-meter-case { + list flat-batch-remove-meter { + key batch-order; + + uses batch:batch-order-grouping; + uses meter-type:meter; + } + } + case flat-batch-update-meter-case { + list flat-batch-update-meter { + key batch-order; + + uses batch:batch-order-grouping; + uses m-batch:batch-meter-input-update-grouping; + } + } + } + + augment "/process-flat-batch/output/batch-failure/batch-item-id-choice" { + ext:augment-identifier "flat-batch-failure-ids-aug"; + description "Openflow flat batch failures - corresponding item id."; + + case flat-batch-failure-flow-id-case { + description "case for flow-id"; + leaf flow-id { + type flow-inv:flow-id; + } + } + case flat-batch-failure-group-id-case { + description "case for group-id"; + leaf group-id { + type group-type:group-id; + } + } + case flat-batch-failure-meter-id-case { + description "case for meter-id"; + leaf meter-id { + type meter-type:meter-id; + } + } + } +} diff --git a/experimental/odp/sal-flow.yang b/experimental/odp/sal-flow.yang index 4cb1d0891..9acf23ffc 100644 --- a/experimental/odp/sal-flow.yang +++ b/experimental/odp/sal-flow.yang @@ -4,22 +4,27 @@ module sal-flow { import yang-ext {prefix ext; revision-date "2013-07-09";} import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} - import opendaylight-flow-types {prefix types;revision-date "2013-10-26";} - import opendaylight-group-types {prefix group-type;revision-date 2013-10-18;} + import opendaylight-flow-types {prefix types;revision-date "2013-10-26";} + import opendaylight-group-types {prefix group-type;revision-date "2013-10-18";} import opendaylight-meter-types {prefix meter-type;revision-date "2013-09-18";} - import flow-capable-transaction {prefix tr;} - import flow-errors {prefix error;} + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} + import flow-errors {prefix error; revision-date "2013-11-16";} + + description "Openflow flow management."; revision "2013-08-19" { description "Initial revision of flow service"; } typedef flow-table-ref { + description "Openflow table identifier"; type instance-identifier; } - + grouping node-flow-removed { + description "Flow removed message structure."; leaf node { + // TODO:: replace with inv:node-context-ref ext:context-reference "inv:node-context"; type inv:node-ref; } @@ -28,8 +33,9 @@ module sal-flow { } uses types:flow-mod-removed; } - + grouping node-flow { + description "Top openflow flow structure suitable for rpc input (contains node-context)."; uses "inv:node-context-ref"; leaf flow-table { @@ -39,6 +45,8 @@ module sal-flow { } grouping base-node-error-notification { + description "Openflow error message general structure."; + status deprecated; leaf node { ext:context-reference "inv:node-context"; type inv:node-ref; @@ -46,6 +54,7 @@ module sal-flow { } grouping node-error-reference { + description "Error message binding - to which source type the error belongs."; choice object-reference { case flow-ref{ leaf flow-ref { @@ -65,8 +74,8 @@ module sal-flow { } } - /** Base configuration structure **/ grouping flow-update { + description "DataStore aware flow update structure suitable for rpc input (contains node-context)."; uses "inv:node-context-ref"; container original-flow { @@ -78,12 +87,13 @@ module sal-flow { } rpc add-flow { + description "Adding flow to openflow device."; input { uses tr:transaction-metadata; leaf flow-ref { type types:flow-ref; } - uses node-flow; + uses node-flow; } output { uses tr:transaction-aware; @@ -91,12 +101,13 @@ module sal-flow { } rpc remove-flow { + description "Removing flow from openflow device."; input { uses tr:transaction-metadata; leaf flow-ref { type types:flow-ref; } - uses node-flow; + uses node-flow; } output { uses tr:transaction-aware; @@ -104,12 +115,13 @@ module sal-flow { } rpc update-flow { + description "Updating flow on openflow device."; input { uses tr:transaction-metadata; leaf flow-ref { type types:flow-ref; } - uses flow-update; + uses flow-update; } output { uses tr:transaction-aware; @@ -117,6 +129,8 @@ module sal-flow { } notification flow-added { + status deprecated; + uses tr:transaction-metadata; leaf flow-ref { type types:flow-ref; @@ -126,36 +140,49 @@ module sal-flow { } notification flow-updated { + status deprecated; + uses tr:transaction-metadata; leaf flow-ref { type types:flow-ref; } uses node-flow; - uses tr:transaction-aware; + uses tr:transaction-aware; } notification flow-removed { + status deprecated; + uses tr:transaction-metadata; leaf flow-ref { type types:flow-ref; } + leaf reason { + type types:removed-flow-reason; + } uses node-flow; uses tr:transaction-aware; } - + notification switch-flow-removed { + status deprecated; + uses node-flow-removed; } - + notification node-error-notification { + status deprecated; + uses error:error-message; uses tr:transaction-aware; uses tr:transaction-metadata; uses node-error-reference; uses base-node-error-notification; } - + notification node-experimenter-error-notification { + status deprecated; + uses error:experimenter-error-message; uses tr:transaction-aware; } diff --git a/experimental/odp/sal-flows-batch.yang b/experimental/odp/sal-flows-batch.yang new file mode 100644 index 000000000..b7e55550f --- /dev/null +++ b/experimental/odp/sal-flows-batch.yang @@ -0,0 +1,103 @@ +module sal-flows-batch { + namespace "urn:opendaylight:flows:service"; + prefix flows; + + import barrier-common {prefix bc;revision-date "2016-03-15";} + import batch-common {prefix batch;revision-date "2016-03-22";} + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + import opendaylight-flow-types {prefix types;revision-date "2013-10-26";} + import flow-node-inventory {prefix flow-inv; revision-date "2013-08-19";} + + description "Openflow batch flow management."; + + revision "2016-03-14" { + description "Initial revision of batch flow service"; + } + + grouping batch-flow-id-grouping { + description "General flow-id leaf."; + + leaf flow-id { + type flow-inv:flow-id; + } + } + + grouping batch-flow-input-grouping { + description "Openflow flow structure suitable for batch rpc input."; + + uses batch-flow-id-grouping; + uses types:flow; + } + + grouping batch-flow-input-update-grouping { + description "Openflow flow structure suitable for batch rpc input."; + + uses batch-flow-id-grouping; + container original-batched-flow { + uses types:flow; + } + container updated-batched-flow { + uses types:flow; + } + } + + grouping batch-flow-output-list-grouping { + description "Openflow flow list suitable for batch rpc output."; + + list batch-failed-flows-output { + key batch-order; + + uses batch:batch-order-grouping; + uses batch-flow-id-grouping; + } + } + + + rpc add-flows-batch { + description "Batch adding flows to openflow device."; + input { + uses "inv:node-context-ref"; + + list batch-add-flows { + key flow-id; + uses batch-flow-input-grouping; + } + uses bc:barrier-suffix; + } + output { + uses batch-flow-output-list-grouping; + } + } + + rpc remove-flows-batch { + description "Batch removing flows from openflow device."; + input { + uses "inv:node-context-ref"; + + list batch-remove-flows { + key flow-id; + uses batch-flow-input-grouping; + } + uses bc:barrier-suffix; + } + output { + uses batch-flow-output-list-grouping; + } + } + + rpc update-flows-batch { + description "Batch updating flows on openflow device."; + input { + uses "inv:node-context-ref"; + + list batch-update-flows { + key flow-id; + uses batch-flow-input-update-grouping; + } + uses bc:barrier-suffix; + } + output { + uses batch-flow-output-list-grouping; + } + } +} diff --git a/experimental/odp/sal-group.yang b/experimental/odp/sal-group.yang index 7543bf412..ce79772b6 100644 --- a/experimental/odp/sal-group.yang +++ b/experimental/odp/sal-group.yang @@ -3,20 +3,23 @@ module sal-group { prefix group; import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} - import opendaylight-group-types {prefix group-type;revision-date 2013-10-18;} - import flow-capable-transaction {prefix tr;} + import opendaylight-group-types {prefix group-type;revision-date "2013-10-18";} + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} + + description "Openflow group management."; revision "2013-09-18" { description "Initial revision of group service"; } grouping node-group { + description "Basic group structure suitable for rpc input (contains node-context)."; uses "inv:node-context-ref"; uses group-type:group; } - /** Base configuration structure **/ grouping group-update { + description "DataStore aware update group structure suitable for rpc input (contains node-context)."; uses "inv:node-context-ref"; container original-group { @@ -28,6 +31,7 @@ module sal-group { } rpc add-group { + description "Adding group to openflow device"; input { uses tr:transaction-metadata; leaf group-ref { @@ -41,6 +45,7 @@ module sal-group { } rpc remove-group { + description "Removing group from openflow device"; input { uses tr:transaction-metadata; leaf group-ref { @@ -54,6 +59,7 @@ module sal-group { } rpc update-group { + description "Updating group on openflow device"; input { uses tr:transaction-metadata; leaf group-ref { @@ -67,6 +73,8 @@ module sal-group { } notification group-added { + status deprecated; + uses tr:transaction-metadata; leaf group-ref { type group-type:group-ref; @@ -76,6 +84,8 @@ module sal-group { } notification group-updated { + status deprecated; + uses tr:transaction-metadata; leaf group-ref { type group-type:group-ref; @@ -85,6 +95,8 @@ module sal-group { } notification group-removed { + status deprecated; + uses tr:transaction-metadata; leaf group-ref { type group-type:group-ref; diff --git a/experimental/odp/sal-groups-batch.yang b/experimental/odp/sal-groups-batch.yang new file mode 100644 index 000000000..d85439864 --- /dev/null +++ b/experimental/odp/sal-groups-batch.yang @@ -0,0 +1,89 @@ +module sal-groups-batch { + namespace "urn:opendaylight:groups:service"; + prefix groups; + + import barrier-common {prefix bc;revision-date "2016-03-15";} + import batch-common {prefix batch;revision-date "2016-03-22";} + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + import opendaylight-group-types {prefix group-type;revision-date "2013-10-18";} + + description "Openflow batch group management."; + + revision "2016-03-15" { + description "Initial revision of batch group service"; + } + + grouping batch-group-input-update-grouping { + description "Openflow group structure for group batch update rpc."; + + // group-id is included in group-type:group + container original-batched-group { + uses group-type:group; + } + container updated-batched-group { + uses group-type:group; + } + } + + grouping batch-group-output-list-grouping { + description "Openflow group list suitable for batch rpc output."; + + list batch-failed-groups-output { + key batch-order; + + uses batch:batch-order-grouping; + leaf group-id { + type group-type:group-id; + } + } + } + + + rpc add-groups-batch { + description "Batch adding groups to openflow device."; + input { + uses "inv:node-context-ref"; + + list batch-add-groups { + key group-id; + uses group-type:group; + } + uses bc:barrier-suffix; + } + output { + uses batch-group-output-list-grouping; + } + } + + rpc remove-groups-batch { + description "Batch removing groups from openflow device."; + input { + uses "inv:node-context-ref"; + + list batch-remove-groups { + key group-id; + uses group-type:group; + } + uses bc:barrier-suffix; + } + output { + uses batch-group-output-list-grouping; + } + } + + rpc update-groups-batch { + description "Batch updating groups on openflow device."; + input { + uses "inv:node-context-ref"; + + list batch-update-groups { + // key group-id; + uses batch-group-input-update-grouping; + } + uses bc:barrier-suffix; + } + output { + uses batch-group-output-list-grouping; + } + } +} diff --git a/experimental/odp/sal-meter.yang b/experimental/odp/sal-meter.yang index 50f65df8e..ac02f331e 100644 --- a/experimental/odp/sal-meter.yang +++ b/experimental/odp/sal-meter.yang @@ -4,20 +4,24 @@ module sal-meter { import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} import opendaylight-meter-types {prefix meter-type;revision-date "2013-09-18";} - import flow-capable-transaction {prefix tr;} + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} + + description "Openflow meter management."; revision "2013-09-18" { description "Initial revision of meter service"; } grouping node-meter { - uses "inv:node-context-ref"; + description "Basic openflow meter structure suitable for rpc input (contains node-context-ref)"; + uses "inv:node-context-ref"; uses meter-type:meter; } /** Base configuration structure **/ grouping meter-update { + description "DataStore aware update openflow meter structure suitable for rpc input (contains node-context-ref)"; uses "inv:node-context-ref"; container original-meter { @@ -29,6 +33,7 @@ module sal-meter { } rpc add-meter { + description "Adding meter to openflow device."; input { uses tr:transaction-metadata; leaf meter-ref { @@ -42,6 +47,7 @@ module sal-meter { } rpc remove-meter { + description "Removing metere from openflow device."; input { uses tr:transaction-metadata; leaf meter-ref { @@ -56,6 +62,7 @@ module sal-meter { } rpc update-meter { + description "Updating meter on openflow device."; input { uses tr:transaction-metadata; leaf meter-ref { @@ -70,6 +77,8 @@ module sal-meter { } notification meter-added { + status deprecated; + uses tr:transaction-metadata; leaf meter-ref { type meter-type:meter-ref; @@ -79,6 +88,8 @@ module sal-meter { } notification meter-updated { + status deprecated; + uses tr:transaction-metadata; leaf meter-ref { type meter-type:meter-ref; @@ -88,6 +99,8 @@ module sal-meter { } notification meter-removed { + status deprecated; + uses tr:transaction-metadata; leaf meter-ref { type meter-type:meter-ref; diff --git a/experimental/odp/sal-meters-batch.yang b/experimental/odp/sal-meters-batch.yang new file mode 100644 index 000000000..a64a8644d --- /dev/null +++ b/experimental/odp/sal-meters-batch.yang @@ -0,0 +1,97 @@ +module sal-meters-batch { + namespace "urn:opendaylight:meters:service"; + prefix meters; + + import barrier-common {prefix bc;revision-date "2016-03-15";} + import batch-common {prefix batch;revision-date "2016-03-22";} + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + import opendaylight-meter-types {prefix meter-type;revision-date "2013-09-18";} + + description "Openflow batch meter management."; + + revision "2016-03-16" { + description "Initial revision of meter batch service"; + } + + grouping batch-meter-input-update-grouping { + description "Update openflow meter structure suitable for batch rpc input."; + + // meter-id is included in meter-type:meter + container original-batched-meter { + uses meter-type:meter; + } + container updated-batched-meter { + uses meter-type:meter; + } + } + + grouping batch-meter-output-list-grouping { + description "Openflow meter list suitable for batch rpc output."; + + list batch-failed-meters-output { + key batch-order; + + uses batch:batch-order-grouping; + leaf meter-id { + type meter-type:meter-id; + } + } + } + + rpc add-meters-batch { + description "Adding batch meters to openflow device."; + input { + uses "inv:node-context-ref"; + + list batch-add-meters { + key meter-id; + + leaf meter-ref { + type meter-type:meter-ref; + } + uses meter-type:meter; + } + uses bc:barrier-suffix; + } + output { + uses batch-meter-output-list-grouping; + } + } + + rpc remove-meters-batch { + description "Removing batch meter from openflow device."; + input { + uses "inv:node-context-ref"; + + list batch-remove-meters { + key meter-id; + + leaf meter-ref { + type meter-type:meter-ref; + } + uses meter-type:meter; + } + uses bc:barrier-suffix; + } + output { + uses batch-meter-output-list-grouping; + } + } + + rpc update-meters-batch { + description "Updating batch meter on openflow device."; + input { + uses "inv:node-context-ref"; + list batch-update-meters { + leaf meter-ref { + type meter-type:meter-ref; + } + uses batch-meter-input-update-grouping; + } + uses bc:barrier-suffix; + } + output { + uses batch-meter-output-list-grouping; + } + } +} diff --git a/experimental/odp/sal-port.yang b/experimental/odp/sal-port.yang index 047300a61..8742091f1 100644 --- a/experimental/odp/sal-port.yang +++ b/experimental/odp/sal-port.yang @@ -5,20 +5,25 @@ module sal-port { import yang-ext {prefix ext; revision-date "2013-07-09";} import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} import opendaylight-port-types {prefix port-type;revision-date "2013-09-25";} - import flow-capable-transaction {prefix tr;} + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} + + description "Openflow port management."; revision "2013-11-07" { description "Initial revision of port service"; } grouping node-port { + description "Openflow port configuration structure suitable for rpc (contains node-context-ref)."; + uses "inv:node-context-ref"; - uses port-type:flow-port-status; } /** Base configuration structure **/ grouping port-update { + description "DataStore aware openflow port configuration update structure suitable for rpc (contains node-context-ref)."; + uses "inv:node-context-ref"; container original-port { @@ -30,6 +35,7 @@ module sal-port { } rpc update-port { + description "Updating port on openflow device."; input { uses port-update; uses tr:transaction-aware; @@ -40,11 +46,15 @@ module sal-port { } notification port-updated { + status deprecated; + uses port-update; uses tr:transaction-aware; } notification port-removed { + status deprecated; + uses node-port; } } diff --git a/experimental/odp/sal-queue.yang b/experimental/odp/sal-queue.yang index 4fa9fb0e5..701aa372f 100644 --- a/experimental/odp/sal-queue.yang +++ b/experimental/odp/sal-queue.yang @@ -4,25 +4,38 @@ module sal-queue { import opendaylight-inventory {prefix inv; revision-date "2013-08-19";} import opendaylight-queue-types {prefix queue-type; revision-date "2013-09-25";} + import opendaylight-port-types {prefix port-type; revision-date "2013-09-25";} - revision "2013-11-07" { - description "Initial revision of queue service"; + description "Openflow queue exploration."; + + revision "2015-03-05" { + description "Removed notification, added input into routed queue exploration rpc."; } grouping node-queue { + description "Openflow queue identification struc"; + uses "inv:node-context-ref"; - uses queue-type:queue-packet; } rpc get-queue { + description "Exploring openflow device queues."; + + input { + uses "inv:node-context-ref"; + leaf port-number { + description "Port to be queried. + Should refer to a valid physical port (i.e. < OFPP_MAX), + or OFPP_ANY to request all configured queues."; + type port-type:port-number-uni; + } + } output { - uses queue-type:queue-packet; + list packet-queues { + uses queue-type:queue-packet; + } } } - - notification queue-get-config-reply { - uses node-queue; - } } diff --git a/experimental/odp/sal-remote-augment.yang b/experimental/odp/sal-remote-augment.yang new file mode 100644 index 000000000..7726a9d0b --- /dev/null +++ b/experimental/odp/sal-remote-augment.yang @@ -0,0 +1,47 @@ +module sal-remote-augment { + + yang-version 1; + namespace "urn:sal:restconf:event:subscription"; + prefix "salrmt-aug-ev-subscr"; + + import sal-remote {prefix salrmt; revision-date "2014-01-14";} + + description + "Added input parameters to rpc create-data-change-event-subscription and to create-notification-stream"; + + revision "2014-07-08" { + } + + grouping notification-output-type-grouping{ + leaf notification-output-type { + type enumeration { + enum JSON; + enum XML; + } + default "XML"; + description "Input parameter which type of output will be parsed on notification"; + } + } + + augment "/salrmt:create-data-change-event-subscription/salrmt:input" { + leaf datastore { + type enumeration { + enum OPERATIONAL; + enum CONFIGURATION; + } + } + leaf scope { + type enumeration { + enum BASE; + enum ONE; + enum SUBTREE; + } + } + uses notification-output-type-grouping; + } + + augment "/salrmt:create-notification-stream/salrmt:input" { + uses notification-output-type-grouping; + } + +} diff --git a/experimental/odp/sal-remote@2014-01-14.yang b/experimental/odp/sal-remote@2014-01-14.yang deleted file mode 100644 index f475a86a5..000000000 --- a/experimental/odp/sal-remote@2014-01-14.yang +++ /dev/null @@ -1,98 +0,0 @@ -module sal-remote { - - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote"; - prefix "sal-remote"; - - - organization "Cisco Systems, Inc."; - contact "Martin Bobak "; - - description - "This module contains the definition of methods related to - sal remote model. - - Copyright (c)2013 Cisco Systems, Inc. All rights reserved. - - This program and the accompanying materials are made available - under the terms of the Eclipse Public License v1.0 which - accompanies this distribution, and is available at - http://www.eclipse.org/legal/epl-v10.html"; - - revision "2014-01-14" { - description - "Initial revision"; - } - - - typedef q-name { - type string; - reference - "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#QName"; - } - - rpc create-data-change-event-subscription { - input { - leaf path { - type instance-identifier; - description "Subtree path. "; - } - } - output { - leaf stream-name { - type string; - description "Notification stream name."; - } - } - } - - notification data-changed-notification { - description "Data change notification."; - list data-change-event { - key path; - leaf path { - type instance-identifier; - } - leaf store { - type enumeration { - enum config; - enum operation; - } - } - leaf operation { - type enumeration { - enum created; - enum updated; - enum deleted; - } - } - anyxml data{ - description "DataObject "; - } - } - } - - rpc create-notification-stream { - input { - leaf-list notifications { - type q-name; - description "Notification QNames"; - } - } - output { - leaf notification-stream-identifier { - type string; - description "Unique notification stream identifier, in which notifications will be propagated"; - } - } - } - - rpc begin-transaction{ - output{ - anyxml data-modification-transaction{ - description "DataModificationTransaction xml"; - } - } - } - -} diff --git a/experimental/odp/sal-role.yang b/experimental/odp/sal-role.yang new file mode 100644 index 000000000..dceff0f7d --- /dev/null +++ b/experimental/odp/sal-role.yang @@ -0,0 +1,44 @@ +module sal-role { + namespace "urn:opendaylight:role:service"; + prefix role; + + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} + import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} + + description "Openflow role management."; + + revision "2015-07-27" { + description "Initial revision of role service"; + } + + typedef ofp-role { + description "role of OFPlugin instance"; + type enumeration { + enum NOCHANGE { + description "no change to role"; + } + + enum BECOMEMASTER { + description "promote current role to MASTER"; + } + + enum BECOMESLAVE { + description "demote current role to SLAVE"; + } + } + } + + rpc set-role { + description "Setting role to openflow device."; + input { + uses tr:transaction-metadata; + uses "inv:node-context-ref"; + leaf controller-role { + type ofp-role; + } + } + output { + uses tr:transaction-aware; + } + } +} \ No newline at end of file diff --git a/experimental/odp/sal-table.yang b/experimental/odp/sal-table.yang index b125116bb..cfbd6f030 100644 --- a/experimental/odp/sal-table.yang +++ b/experimental/odp/sal-table.yang @@ -4,14 +4,17 @@ module sal-table { import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} import opendaylight-table-types {prefix table-type;revision-date "2013-10-26";} - import flow-capable-transaction {prefix tr;} + import flow-capable-transaction {prefix tr; revision-date "2015-03-04";} + + description "Openflow table management."; revision "2013-10-26" { description "Initial revision of table service"; } - - /** Base configuration structure **/ + grouping table-update { + description "Openflow table configuration structure suitable for rpc (contains node-context-ref)"; + uses "inv:node-context-ref"; container original-table { uses table-type:table-features; @@ -20,9 +23,15 @@ module sal-table { uses table-type:table-features; } } - + rpc update-table { + description "Configuring openflow table."; + input { + uses tr:transaction-metadata; + leaf table-ref { + type table-type:table-ref; + } uses table-update; uses tr:transaction-aware; } @@ -30,8 +39,10 @@ module sal-table { uses tr:transaction-aware; } } - + notification table-updated { + status deprecated; + uses "inv:node-context-ref"; uses tr:multipart-transaction-aware; uses table-type:table-features; diff --git a/experimental/odp/scalein-rpc.yang b/experimental/odp/scalein-rpc.yang new file mode 100644 index 000000000..359f0097f --- /dev/null +++ b/experimental/odp/scalein-rpc.yang @@ -0,0 +1,35 @@ +module scalein-rpc { + namespace "urn:opendaylight:netvirt:scalein:rpcs"; + prefix "scaleinrpcs"; + + revision "2017-12-20" { + description "ODL Specific Scalein Rpcs Module"; + } + + rpc scalein-computes-start { + description "To trigger start of scale in the given dpns"; + input { + leaf-list scalein-node-ids { + type string; + } + } + } + + rpc scalein-computes-end { + description "To end the scale in of the given dpns"; + input { + leaf-list scalein-node-ids { + type string; + } + } + } + + rpc scalein-computes-recover { + description "To recover the dpns which are marked for scale in"; + input { + leaf-list recover-node-ids { + type string; + } + } + } +} diff --git a/experimental/odp/service-function-acl.yang b/experimental/odp/service-function-acl.yang new file mode 100644 index 000000000..1627d3547 --- /dev/null +++ b/experimental/odp/service-function-acl.yang @@ -0,0 +1,78 @@ +module service-function-acl { + yang-version 1; + + namespace "urn:cisco:params:xml:ns:yang:sfc-acl"; + + prefix sfc-acl; + + import ietf-access-control-list { + prefix ietf-acl; + revision-date 2016-02-18; + } + import ipfix-application-information { + prefix ipfix-application-information; + revision-date 2015-04-10; + } + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + revision 2015-10-01 { + description "creating Service Function Chaining extensions to ietf-acl model"; + } + + augment "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:actions" { + description "SFC simple filter actions"; + choice sfc-action { + case acl-rendered-service-path { + description "Determine the Service Function Path the packet the packet will + traverse"; + leaf rendered-service-path { + type string; + } + } + } + } + + augment "/ietf-acl:access-lists/ietf-acl:acl/ietf-acl:access-list-entries/ietf-acl:ace/ietf-acl:matches" { + description "Level 7 match criteria, based on IPFIX applicationIds"; + leaf-list application-id { + description "Application Identifier"; + type ipfix-application-information:application-id-ref; + } + } + + container access-lists-state { + description + "This container hold operational state for all access lists"; + config false; + + list access-list-state { + description + "This list holds operational data for all access lists + in the domain"; + key "acl-type acl-name"; + leaf acl-name { + type string; + description + "The name of the acl"; + } + leaf acl-type { + type ietf-acl:acl-type; + description + "Type of the acl"; + } + + list acl-service-function-classifier { + key "name"; + leaf name { + type string; + description + "The name of the classifier"; + } + description + "A list of all classifiers that use rules from this access list"; + } + } + } +} diff --git a/experimental/odp/service-function-chain.yang b/experimental/odp/service-function-chain.yang new file mode 100644 index 000000000..84d7669a7 --- /dev/null +++ b/experimental/odp/service-function-chain.yang @@ -0,0 +1,187 @@ +module service-function-chain { + + namespace "urn:cisco:params:xml:ns:yang:sfc-sfc"; + + prefix sfc-sfc; + + import sfc-common { + prefix sfc-common; + } + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + + description + "This module contains a collection of YANG definitions for + managing service function chains. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC + // publication and remove this note. + + revision 2014-07-01 { + description + "Revised based on Opendaylight Project feedback"; + reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; + } + + grouping service-function-chain-grouping { + list service-function-chain { + key "name"; + description + "A list that holds all service function chains in the + domain"; + leaf name { + type sfc-common:sfc-name; + description + "the name of the service function chain"; + } + leaf symmetric { + type boolean; + status deprecated; + default false; + description + "If the chain is symmetric we will create two service + paths, one ingress and another egress. Packets traverse + the egress service path in the reverse order of the + ingress path. This field is now deprecated: Use the + ServiceFunctionType bidirectionality field instead. + If at least one SF is of an SF-Type that sets the + flag to true, then the RSP will be symmetric."; + } + list sfc-service-function { + key "name"; + leaf name { + type string; + description + "A unique handle that describes the service function + that will be chosen for this type, such as + ingress-dpi. This is not the service function name"; + } + leaf type { + type sfc-common:sft-type-name; + mandatory true; + description + "Service Function Type from service-function-type.yang"; + } + leaf order { + type uint8; + description + "A number that denotes the order of a service function + type in a chain"; + } + ordered-by user; + description + "A list of service functions that compose the service + chain"; + } + } + description + "This group bundles together all service function chains in the + domain"; + } + + // Service Function Chains + + container service-function-chains { + uses service-function-chain-grouping; + description + "A service Function chain defines an + abstract set of service functions and their ordering + constraints that must be applied to packets and/or frames + selected as a result of classification. The implied order + may not be a linear progression as the architecture allows + for nodes that copy to more than one branch, and also allows + for cases where there is flexibility in the order in which + services need to be applied. The term service chain is often + used as shorthand for service function chain."; + } + + container service-function-chains-state { + config false; + list service-function-chain-state { + key "name"; + description + "A list that contains operational service function + chain state"; + leaf name { + type sfc-common:sfc-name; + description + "the name of the service function chain"; + } + list sfc-service-path { + key "name"; + leaf name { + type sfc-common:sfp-name; + description + "The name of the Service Path"; + } + description + "A list of all service function paths instantiated from + this chain"; + } + } + description + "This containers holds operational service function + chain state and their associated service path"; + } + +// Remote procedure calls + +// (main feature: instantiation of a SFC) + + rpc instantiate-service-function-chain { + description + "Instantiates a single service function"; + + // Deprecated in Fluorine, to be removed in Neon + status deprecated; + + input { + leaf name { + type string; + mandatory true; + description + "The name of the service function chain to be + instantiated."; + } + } + output { + leaf name { + type string; + description + "The name of the created service function path."; + } + } + } + + // (RPC for testing) + rpc put-service-function-chains { + description + "Creates Service-Functions"; + + // Deprecated in Fluorine, to be removed in Neon + status deprecated; + + input { + uses service-function-chain-grouping; + } + } +} + diff --git a/experimental/odp/service-function-classifier.yang b/experimental/odp/service-function-classifier.yang new file mode 100644 index 000000000..5a04c85a4 --- /dev/null +++ b/experimental/odp/service-function-classifier.yang @@ -0,0 +1,89 @@ +module service-function-classifier { + yang-version 1; + + namespace "urn:cisco:params:xml:ns:yang:sfc-scf"; + + prefix sfc-scf; + + import ietf-access-control-list { + prefix ietf-acl; + revision-date 2016-02-18; + } + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + description + "This module contains a collection of YANG definitions for + managing service classification functions."; + + revision 2014-07-01 { + description + "Revised based on Opendaylight Project feedback"; + reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; + } + + grouping attachment-point { + description + "Reusable group of all possible attachment point types"; + choice attachment-point-type { + description + "Provides a choice between access list + attachment point types"; + case bridge { + leaf bridge { + type string; + description + "OVS bridge as an attachment point"; + } + } + case interface { + leaf interface { + type string; + description + "interface name as attachment point"; + } + } + } + } + + container service-function-classifiers { + description + "Classifier container which represents the ACL being applied, + attachment point and the chain associated with that ACL."; + list service-function-classifier { + key "name"; + description + "A list that holds all service function classifiers"; + leaf name { + type string; + description + "Classification function name"; + } + container acl { + description + "The ACL associated with this classifier"; + leaf name { + type string; + } + leaf type { + type ietf-acl:acl-type; + } + } + + list scl-service-function-forwarder { + key "name"; + description + "The classifier will be attached to these SFFs"; + leaf name { + type string; + description + "The classifier will be attached to this SFF"; + } + uses attachment-point { + description "Classifier attachment point"; + } + } + } + } +} diff --git a/experimental/odp/service-function-description-monitor-report.yang b/experimental/odp/service-function-description-monitor-report.yang new file mode 100755 index 000000000..344776693 --- /dev/null +++ b/experimental/odp/service-function-description-monitor-report.yang @@ -0,0 +1,234 @@ +module service-function-description-monitor-report { + + namespace "urn.intel.params:xml:ns:sf-desc-mon-rpt"; + prefix sf-desc-mon-rpt; + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + + import ietf-yang-types { + prefix yang; + revision-date 2013-07-15; + } + + organization "Intel Inc."; + contact "honglix.chen@intel.com"; + description + "The module for entities implementing the network service + functions for Service Function Chaining"; + + revision 2014-11-05 { + description "Initial revision."; + } + + grouping SF-description { + leaf data-plane-ip { + type inet:ip-address; + description "Data-plane IP address"; + } + + leaf data-plane-port { + type inet:port-number; + description "Data-plane port number"; + } + + leaf type { + type string; + description "SF type"; + } + + leaf number-of-dataports { + type uint32; + description "Number of dataports"; + } + + container capabilities { + leaf supported-packet-rate { + type uint32; + description "Maximum Mpps supported"; + } + + leaf supported-bandwidth { + type uint32; + description "Maximum Mbps supported "; + } + + leaf supported-ACL-number { + type uint32; + description "ACL number of the service function"; + } + + leaf RIB-size { + type uint32; + description "Number of Routing Information Table's entries."; + } + + leaf FIB-size { + type uint32; + description "Number of Forwarding Information Table's entries."; + } + + container ports-bandwidth { + list port-bandwidth { + key port-id; + leaf port-id { + type uint32; + description "The id of the port "; + } + + leaf ipaddress { + type inet:ipv4-address; + description "IP address of the port"; + } + + leaf macaddress { + type yang:mac-address; + description "MAC address of the the port"; + } + + leaf supported-bandwidth { + type uint32; + description "Maximum Mbps supported by the port"; + } + } + } + } + } + + grouping SF-monitoring-info { + leaf liveness { + type boolean; + description "Liveness flag of the service function"; + } + + container resource-utilization { + leaf packet-rate-utilization { + type uint32; + description "Percentage of current package rate utilization."; + } + + leaf bandwidth-utilization { + type uint32; + description "Percentage of bandwidth utilization."; + } + + leaf CPU-utilization { + type uint32; + description "Percentage of CPU utilization."; + } + + leaf memory-utilization { + type uint32; + description "Percentage of memory utilization."; + } + + leaf available-memory { + type uint32; + description "Available memory size of the service function in MB."; + } + + leaf RIB-utilization { + type uint32; + description "Percentage of Routing Information Table utilization."; + } + + leaf FIB-utilization { + type uint32; + description "Percentage of Forwarding Information Table utilization."; + } + + leaf power-utilization { + type uint32; + description "power utilization in W."; + } + + container SF-ports-bandwidth-utilization { + list port-bandwidth-utilization { + key port-id; + leaf port-id { + type uint32; + description "The id of the port "; + } + + leaf bandwidth-utilization { + type uint32; + description "Percentage of the port's supported bandwidth utilization."; + } + + leaf rx-packet { + type yang:zero-based-counter64; + description "The number of received packets."; + } + + leaf tx-packet { + type yang:zero-based-counter64; + description "The number of transmitted packets."; + } + + leaf rx-bytes { + type yang:zero-based-counter64; + description "The number of received bytes."; + } + + leaf tx-bytes { + type yang:zero-based-counter64; + description "The number of transmitted bytes."; + } + + leaf rx-bytes-rate { + type uint32; + description "Bytes received rate."; + } + + leaf tx-bytes-rate { + type uint32; + description "Bytes transmitted rate."; + } + + leaf rx-packet-rate { + type uint32; + description "Packets received rate."; + } + + leaf tx-packet-rate { + type uint32; + description "Packets transmitted rate."; + } + } + } + } + } + + container service-function { + container description-info { + uses SF-description; + } + + container monitoring-info { + uses SF-monitoring-info; + } + } + + rpc get-SF-description { + description + "Get service function description information."; + output { + container description-info { + uses SF-description; + } + } + } + + rpc get-SF-monitoring-info { + description + "Get current service function monitoring information."; + output { + container monitoring-info { + uses SF-monitoring-info; + } + } + } +} + diff --git a/experimental/odp/service-function-description-monitor.yang b/experimental/odp/service-function-description-monitor.yang new file mode 100644 index 000000000..b5c439ec4 --- /dev/null +++ b/experimental/odp/service-function-description-monitor.yang @@ -0,0 +1,36 @@ +module service-function-description-monitor { + namespace "urn.intel.params:xml:ns:sf-desc-mon"; + prefix sf-desc-mon; + + import service-function { + prefix sfc-sf; + revision-date 2014-07-01; + } + + import service-function-description-monitor-report { + prefix sf-desc-mon-rpt; + revision-date 2014-11-05; + } + + + organization "Intel Inc."; + contact "honglix.chen@intel.com"; + description + "Create description and monitoring information of Service Function extensions to service-function model"; + + revision 2014-12-01 { + description "Initial revision."; + } + + augment "/sfc-sf:service-functions-state/sfc-sf:service-function-state" { + description "Service function description and monitoring information"; + container sfc-sf-desc-mon { + container description-info { + uses sf-desc-mon-rpt:SF-description; + } + container monitoring-info { + uses sf-desc-mon-rpt:SF-monitoring-info; + } + } + } +} diff --git a/experimental/odp/service-function-forwarder-logical.yang b/experimental/odp/service-function-forwarder-logical.yang new file mode 100644 index 000000000..56f17d684 --- /dev/null +++ b/experimental/odp/service-function-forwarder-logical.yang @@ -0,0 +1,117 @@ +module service-function-forwarder-logical { + + yang-version 1; + + namespace "urn:ericsson:params:xml:ns:yang:sfc-sff-logical"; + + prefix sfc-sff-logical; + + import ietf-yang-types { prefix yang; revision-date 2013-07-15; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + import sfc-common { prefix sfc-common; revision-date 2015-10-17; } + import service-function { prefix sfc-sf; revision-date 2014-07-01; } + import service-function-forwarder { prefix sfc-sff; revision-date 2014-07-01; } + import rendered-service-path { prefix rsp; revision-date 2014-07-01; } + + organization "Ericsson, Inc."; + contact "Diego Granados "; + + description "This module contains a collection of YANG definitions used to + augment Service Function Forwarder operational information to + contain logical-SFF specific information. Also, minor changes + (augmentations) in the rendered service path and in the service + function elements, in order to use the new logical interface + locator"; + + revision 2016-06-20 { + description + "Augmentations in sf, sff-state, rendered service paths to include support for + logical SFFs (based on Genius project support)"; + } + + grouping logical-interface-locator { + description "Interface name of the VM on which the SF is running"; + leaf interface-name { + type string; + description "Name of the interface"; + } + } + + //typedefs for dpn identifiers + typedef dpn-id-type { + type uint64; + description "Data-plane node id"; + } + + grouping dpn-grouping { + description + "Data plane id: dpn-id"; + leaf dpn-id { + type dpn-id-type; + } + } + + grouping dpnid-rsps { + description ""; + container dpn-rsps { + description "For each DPN id, the list contains all RSPs that + are using the data plane node"; + // uses dpn-grouping; + list dpn { + description + "List of all dpn ids part of this logical sff"; + uses dpn-grouping; + key dpn-id; + container rsps-for-dpnid { + list rsps { + key "name"; + leaf name { + type sfc-common:sfp-name; + description "The name of the Service Path"; + } + } + } + } + } + } + + augment "/sfc-sf:service-functions/" + + "sfc-sf:service-function/" + + "sfc-sf:sf-data-plane-locator/" + + "sfc-sf:locator-type/" { + description "augment the Service Function to allow the use of logical interface + locators"; + ext:augment-identifier "sf-logical-sff-augmentation"; + case logical-interface { + uses logical-interface-locator; + } + } + + augment "/sfc-sff:service-function-forwarders/" + + "sfc-sff:service-function-forwarder/" + + "sfc-sff:sff-data-plane-locator/" + + "sfc-sff:data-plane-locator/" + + "sfc-sff:locator-type/" { + description "Augments the Service Function Forwarder to allow the use of logical + interface locators"; + case logical-interface { + uses logical-interface-locator; + } + } + + augment "/sfc-sff:service-function-forwarders-state/" + + "sfc-sff:service-function-forwarder-state/" { + description "Augments the SFF state to hold logical SFF specific information"; + ext:augment-identifier "sff-logical-sff-augmentation"; + uses dpnid-rsps; + } + + augment "/rsp:rendered-service-paths/" + + "rsp:rendered-service-path/" + + "rsp:rendered-service-path-hop/" { + description "Augments the RSP hop information to allow to use dpn locators + instead of sff locators"; + ext:augment-identifier "rsp-logical-sff-augmentation"; + uses dpn-grouping; + } +} diff --git a/experimental/odp/service-function-forwarder-metadata-features.yang b/experimental/odp/service-function-forwarder-metadata-features.yang new file mode 100644 index 000000000..98ead79c7 --- /dev/null +++ b/experimental/odp/service-function-forwarder-metadata-features.yang @@ -0,0 +1,105 @@ +module service-function-forwarder-metadata-features { + + namespace "urn:cisco:params:xml:ns:yang:sfc-sff-md-features"; + + prefix sfc-sff-md-features; + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + + import yang-ext { + prefix ext; + revision-date 2013-07-09; + } + + import service-function-forwarder { + prefix "sfc-sff"; + revision-date 2014-07-01; + } + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + + description + "This module contains a collection of YANG definitions for + service function forwarder features. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC + // publication and remove this note. + + revision 2015-10-10 { + description + "Initial revision based on Opendaylight list discussions"; + reference "https://lists.opendaylight.org/pipermail/" + + "sfc-dev/2015-September/001886.html"; + } + + feature vxlan-classifier-type-1 { + description "Feature definition for C1: IPv4 tunnel dest and" + + "C2: VNID"; + } + + augment "/sfc-sff:service-function-forwarders" { + description + "Augments SFF module with definition of" + + "VXLAN overlay classifier feature"; + ext:augment-identifier "sff-vxlan-classifier-type-1-feature"; + } + + feature mobility-allocation-type-1 { + description "Feature definition for https://tools.ietf.org/html/" + + "draft-napper-sfc-nsh-mobility-allocation-01"; + } + + augment "/sfc-sff:service-function-forwarders" { + description + "Augments SFF module with definition of" + + "Mobility allocation feature"; + ext:augment-identifier "sff-mobility-allocation-type-1-feature"; + } + + feature dc-allocation-type-1 { + description "Feature definition for https://tools.ietf.org/" + + "html/draft-guichard-sfc-nsh-dc-allocation-02"; + } + + augment "/sfc-sff:service-function-forwarders" { + description + "Augments SFF module with definition of" + + "DC allocation feature"; + ext:augment-identifier "sff-dc-allocation-type-1-feature"; + } + + augment "/sfc-sff:service-function-forwarders/" + + "sfc-sff:service-function-forwarder" { + description + "Augments SFF definition with new vxlan overlay classifier " + + "configuration"; + container vxlan-classifier-type-1 { + if-feature "vxlan-classifier-type-1"; + presence "Enables VXLAN overlay classifier support"; + description + "Container holding VXLAN overlay classifier configuration"; + } + ext:augment-identifier "sff-vxlan-classifier-type-1"; + } +} diff --git a/experimental/odp/service-function-forwarder-ofs.yang b/experimental/odp/service-function-forwarder-ofs.yang new file mode 100644 index 000000000..1b2aa2e29 --- /dev/null +++ b/experimental/odp/service-function-forwarder-ofs.yang @@ -0,0 +1,44 @@ +module service-function-forwarder-ofs { + yang-version 1; + + namespace "urn:ericsson:params:xml:ns:yang:sfc-sff-ofs"; + + prefix sfc-sff-ofs; + + import service-function-forwarder { + prefix sfc-sff; + revision-date 2014-07-01; + } + import ietf-yang-types { + prefix yang; + revision-date 2013-07-15; + } + + organization "Ericsson, Inc."; + contact "Brady Johnson "; + + revision 2015-04-08 { + description "Augmentation of SFF for OFS"; + } + + grouping port-details { + container ofs-port { + leaf port-id { + description "Open Flow Switch port ID."; + type string; + } + leaf mac-address { + description "MAC address to use on this OFS port"; + type yang:mac-address; + } + } + } + + augment "/sfc-sff:service-function-forwarders/" + + "sfc-sff:service-function-forwarder/" + + "sfc-sff:sff-data-plane-locator" { + + uses port-details; + } + +} diff --git a/experimental/odp/service-function-forwarder-ovs.yang b/experimental/odp/service-function-forwarder-ovs.yang new file mode 100644 index 000000000..b9c98482a --- /dev/null +++ b/experimental/odp/service-function-forwarder-ovs.yang @@ -0,0 +1,289 @@ +module service-function-forwarder-ovs { + yang-version 1; + + namespace "urn:cisco:params:xml:ns:yang:sfc-sff-ovs"; + + prefix sfc-sff-ovs; + + import service-function-forwarder { + prefix sfc-sff; + revision-date 2014-07-01; + } + import sfc-common { + prefix sfc-common; + revision-date 2015-10-17; + } + import yang-ext { + prefix ext; + revision-date 2013-07-09; + } + import ietf-yang-types { + prefix yang; + revision-date 2013-07-15; + } + import ovsdb { + prefix ovsdb; + revision-date 2015-01-05; + } + import overlay { + prefix ovsdb-overlay; + revision-date 2015-01-05; + } + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + description + "This module contains a collection of YANG definitions used + to augment Service Function Forwarder configuration with + OpenvSwitch specific information. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC + // publication and remove this note. + + revision 2014-07-01 { + description "Augmentation of SFF for OVS"; + reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; + } + + grouping node { + description + "Groups that holds OVS node information"; + container ovs-node { + description + "This container holds OVS node information"; + leaf node-id { + type ovsdb:ovsdb-node-ref; + description "Open vSwitch node id."; + } + } + } + + grouping bridge { + description + "Groups OVS bridge information that is reused throughout + SFF augmentations"; + container ovs-bridge { + description + "This container holds OVS bridge information"; + leaf bridge-name { + type string; + description + "Open vSwitch bridge name. In Openstack it is usually" + + " br-tun or br-int depending if it is used in the" + + " overlay or facing virtual machines respectively"; + } + leaf uuid { + type yang:uuid; + description "Open vSwitch bridge UUID"; + } + leaf openflow-node-id { + type string; + description "Openflow node ID"; + } + list external-ids { + key "name"; + description + "The list of external ids associated with this + bridge"; + leaf name { + type string; + description + "A unique string that represents this external-id such + as attached-mac"; + } + leaf value { + type string; + description + "A unique string that represents the value of the + external-id such as fa:16:3e:56:47:10"; + } + } + } + } + + container sff-ovs-mappings { + + description "Container for keeping lists of mappings needed" + + "by the SFC-OVS renderer"; + + list ovs-node-to-sff-mapping { + key "uuid bridge-name"; + config false; + description "List to keep mappings of OVS UUIDs + Bridge Name" + + "to Service Function Fowarders (SFFs). This is used to" + + "correlate OVS bridge events to SFFs"; + leaf uuid { + type yang:uuid; + description "Open vSwitch bridge UUID"; + } + leaf bridge-name { + type string; + description + "Open vSwitch bridge name. In Openstack it is usually" + + " br-tun or br-int depending if it is used in the" + + " overlay or facing virtual machines respectively"; + } + leaf name { + type sfc-common:sff-name; + description + "The unique name of this service function forwarder, such + as SFF1"; + } + } + } + + grouping options { + description + "Groups all OVS specific configuration options that are reused + throughout many SFF augmentations"; + container ovs-options { + description "Port/Interface related optional input values"; + leaf local-ip { + type string; + description "Local interface IP address"; + } + leaf remote-ip { + type string; + description + "Remote IP address, e.g. the remote Vxlan tunnel endpoint + IP"; + } + leaf dst-port { + type string; + description + "Remote port, e.g. the remote Vxlan tunnel endpoint port"; + } + leaf nsp { + type string; + description "NSH Service Path ID"; + } + leaf nsi { + type string; + description "NSH Starting Index"; + } + leaf exts { + type string; + description "VxLAN extension type"; + } + leaf in-nsp { + type string; + description "Ingress NSH Service Path ID"; + } + leaf in-nsi { + type string; + description "Ingress NSH Service Index"; + } + leaf out-nsp { + type string; + description "Egress NSH Service Path ID"; + } + leaf out-nsi { + type string; + description "Egress NSH Service Index"; + } + leaf nshc1 { + type string; + description "NSH Context Header 1"; + } + leaf nshc2 { + type string; + description "NSH Context Header 2"; + } + leaf nshc3 { + type string; + description "NSH Context Header 3"; + } + leaf nshc4 { + type string; + description "NSH Context Header 4"; + } + leaf key { + type string; + description "Vxlan tunnel ID"; + } + } + } + + augment "/sfc-sff:service-function-forwarders/" + + "sfc-sff:service-function-forwarder" { + description + "Augments the SFF definition with + OVS node specific information"; + ext:augment-identifier "sff-ovs-node-augmentation"; + uses node; + } + + augment "/sfc-sff:service-function-forwarders/" + + "sfc-sff:service-function-forwarder" { + description + "Augments the SFF definition with + bridge specific information"; + ext:augment-identifier "sff-ovs-bridge-augmentation"; + uses bridge; + } + + augment "/sfc-sff:service-function-forwarders/" + + "sfc-sff:service-function-forwarder/" + + "sfc-sff:sff-data-plane-locator" { + description + "Augments the SFF data plane locator with + bridge specific information"; + ext:augment-identifier "sff-ovs-locator-bridge-augmentation"; + uses bridge; + } + + augment "/sfc-sff:service-function-forwarders/" + + "sfc-sff:service-function-forwarder/" + + "sfc-sff:sff-data-plane-locator" { + description + "Augments the SFF data plane locator with + options specific to OVS such as context headers"; + ext:augment-identifier "sff-ovs-locator-options-augmentation"; + uses options; + } + + rpc create-ovs-bridge { + description + "Creates OVS Bridge on specified OVS Node"; + input { + leaf name { + type string; + description + "The name of OVS Bridge to be created"; + } + + container ovs-node { + description + "Contains ip:port locator of the OVS Node, + on which OVS Bridge is going to be created"; + + uses ovsdb-overlay:ip-port-locator; + } + } + output { + leaf result { + type boolean; + description + "True if the OVS bridge was created, otherwise + false"; + } + } + } +} diff --git a/experimental/odp/service-function-forwarder-termination.yang b/experimental/odp/service-function-forwarder-termination.yang new file mode 100644 index 000000000..039122938 --- /dev/null +++ b/experimental/odp/service-function-forwarder-termination.yang @@ -0,0 +1,48 @@ +module service-function-forwarder-termination { + yang-version 1; + + namespace "urn:hpe:params:xml:ns:yang:sfc-sff-termination"; + + prefix sfc-sff-termination; + + import service-function-forwarder { + prefix sfc-sff; + revision-date 2014-07-01; + } + import ietf-yang-types { + prefix yang; + revision-date 2013-07-15; + } + import yang-ext { + prefix ext; + revision-date 2013-07-09; + } + + organization "HPE, Inc."; + contact "Rafael Eichelberger "; + + revision 2017-01-11 { + description "Augmentation of SFF to specify the chain termination point, e.g. gateway/router"; + } + + grouping termination { + container termination-point { + leaf port-id { + description "Switch port connected to the termination point element."; + type string; + } + leaf mac-address { + description "MAC address of the termination point element"; + type yang:mac-address; + } + } + } + + augment "/sfc-sff:service-function-forwarders/" + + "sfc-sff:service-function-forwarder/" + + "sfc-sff:sff-data-plane-locator" { + ext:augment-identifier "sff-dpl-chain-termination-augment"; + uses termination; + } + +} diff --git a/experimental/odp/service-function-forwarder-vpp.yang b/experimental/odp/service-function-forwarder-vpp.yang new file mode 100644 index 000000000..4b86647a7 --- /dev/null +++ b/experimental/odp/service-function-forwarder-vpp.yang @@ -0,0 +1,113 @@ +module service-function-forwarder-vpp { + namespace "urn:cisco:params:xml:ns:yang:sfc-sff-vpp"; + prefix "sfc-sff-vpp"; + + import service-function-forwarder { + prefix sfc-sff; + revision-date 2014-07-01; + } + import yang-ext { + prefix ext; + revision-date 2013-07-09; + } + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + + organization "Cisco Systems, Inc."; + contact "Ed Warnicke "; + + description + "This module contains a collection of YANG definitions used + to augment Service Function Forwarder configuration with + Honeycomb specific information."; + + revision 2016-07-06 { + description "Initial revision"; + } + + identity netconf-node-type-base { + description "base type for different types of netconf nodes"; + } + + identity netconf-node-type-honeycomb { + base netconf-node-type-base; + description "Type for honeycomb netconf nodes"; + } + + typedef netconf-node-type { + type identityref { + base "netconf-node-type-base"; + } + description "Netconf node-type"; + } + + typedef netconf-mount-point { + type instance-identifier; + description "A reference to a netconf mount point"; + } + + grouping sff-netconf-attributes { + description "Attributes to allow managing a netconf based sff."; + leaf sff-netconf-node-type { + type netconf-node-type; + description "Type of netconf node."; + } + leaf sff-netconf-mount-point { + type netconf-mount-point; + description "Pointer to netconf mount point."; + } + } + + augment "/sfc-sff:service-function-forwarders/" + + "sfc-sff:service-function-forwarder" { + description + "Augments the SFF definition with + netconf node specific information"; + ext:augment-identifier "sff-netconf-augmentation"; + uses sff-netconf-attributes; + } + + rpc connect-honeycomb-sff { + description + "Connect a netconf sff node. Note, if the netconf mount + already exists, it will be reused."; + input { + leaf address { + type inet:host; + description "IP address of honeycomb instance."; + } + + leaf port { + type inet:port-number; + description "Port number of honeycomb instance."; + } + + leaf tcp-only { + type boolean; + description "TCP only."; + } + + leaf username { + type string; + description "Username of honeycomb instance"; + } + + leaf password { + type string; + description "Password for honeycomb instance"; + } + } + output { + leaf result { + type boolean; + description + "True if the netconf bridge was connected, otherwise + false"; + } + uses sff-netconf-attributes; + } + } +} diff --git a/experimental/odp/service-function-forwarder.yang b/experimental/odp/service-function-forwarder.yang new file mode 100644 index 000000000..b2056ed1f --- /dev/null +++ b/experimental/odp/service-function-forwarder.yang @@ -0,0 +1,300 @@ +module service-function-forwarder { + + namespace "urn:cisco:params:xml:ns:yang:sfc-sff"; + + prefix sfc-sff; + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + import service-locator { + prefix sfc-sl; + revision-date 2014-07-01; + } + import service-statistics { + prefix sfc-ss; + revision-date 2014-07-01; + } + import sfc-common { + prefix sfc-common; + revision-date 2015-10-17; + } + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + + description + "This module contains a collection of YANG definitions for + managing service function forwarders. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC + // publication and remove this note. + + revision 2014-07-01 { + description + "Revision based on Opendaylight project feedback"; + reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; + } + + // Failmode type definitions + + identity failmode-type-identity { + description + "Base identity from which specific failmode + types are derived. Fail mode specifies the behavior + when the interface does not have connectivity to the + service node."; + } + + typedef failmode-type { + type identityref { + base "failmode-type-identity"; + } + description "This type is used to reference all + registered failmode types"; + } + + identity close { + base "failmode-type-identity"; + description "When service-function can not reach service + function, packets will be dropped"; + } + + identity open { + base "failmode-type-identity"; + description "When service-function can not reach service + function, packets will be forwarded"; + } + + grouping service-function-forwarder-base { + description + "A group with all base nodes to describe service function + forwarder"; + leaf name { + type sfc-common:sff-name; + description + "The unique name of this service function forwarder, such + as SFF1"; + } + + leaf service-node { + type sfc-common:sn-name; + description "The service node that hosts this SFF"; + } + + leaf ip-mgmt-address { + type inet:ip-address; + description + "The IP and port used to configure this + SffEpservice-function-forwarder"; + } + + list sff-data-plane-locator { + key "name"; + description + "A list of all data-plane-locators of this SFF."; + leaf name { + type sfc-common:sff-data-plane-locator-name; + description + "A unique name that represents this + data-plane-locator"; + } + + container data-plane-locator { + description + "This container holds configuration for the overlay data + plane locator used by this SFF. This could be VXLAN, + GRE, etc"; + + uses sfc-sl:data-plane-locator; + } + } + } + + container service-function-forwarders { + description + "A service function forwarder is + responsible for delivering traffic received from the SFC + network forwarder to one or more connected service + functions via information carried in the SFC encapsulation. + "; + list service-function-forwarder { + key "name"; + description + "A list that holds configuration of all SFFs in the domain"; + + uses service-function-forwarder-base; + + leaf rest-uri { + type inet:uri; + description "URI of REST based management"; + } + + list service-function-dictionary { + key "name"; + leaf name { + type sfc-common:sf-name; + description + "The name of the service function."; + } + container sff-sf-data-plane-locator { + description + "SFF and SF data plane locators to use when sending + packets from this SFF to the associated SF"; + leaf sf-dpl-name { + type sfc-common:sf-data-plane-locator-name; + description + "The SF data plane locator to use when sending + packets to the associated service function. + Used for both forward and reverse packets on + symmetric paths with Service Functions that + have just one locator."; + } + leaf sff-dpl-name { + type sfc-common:sff-data-plane-locator-name; + description + "The SFF data plane locator to use when sending + packets to the associated service function. + Used for both forward and reverse packets on + symmetric paths with Service Functions that + have just one locator."; + } + leaf sf-forward-dpl-name { + type sfc-common:sf-data-plane-locator-name; + description + "The SF data plane locator to use when sending + packets to the associated service function + on the forward path of a symmetric chain"; + } + leaf sf-reverse-dpl-name { + type sfc-common:sf-data-plane-locator-name; + description + "The SF data plane locator to use when sending + packets to the associated service function + on the reverse path of a symmetric chain"; + } + leaf sff-forward-dpl-name { + type sfc-common:sff-data-plane-locator-name; + description + "The SFF data plane locator to use when sending + packets to the associated service function + on the forward path of a symmetric chain."; + } + leaf sff-reverse-dpl-name { + type sfc-common:sff-data-plane-locator-name; + description + "The SFF data plane locator to use when sending + packets to the associated service function + on the reverse path of a symmetric chain."; + } + } + list sff-interfaces { + key "sff-interface"; + leaf sff-interface { + type string; + description + "An individual interface on the SFF connected to the + SF"; + } + description + "A list of interfaces on the SFF which are connected to + this SF, usually one 1 or 2 elements"; + } + leaf failmode { + type failmode-type; + description + "This leaf defines what should the SFF do if it can not + send packets to the SF"; + } + description + "A list of all Service Functions attached to this SFF."; + } + + list connected-sff-dictionary { + key "name"; + leaf name { + type sfc-common:sff-name; + description + "The name of the SFF connected to this SFF"; + } + container sff-sff-data-plane-locator { + description + "The SFF uses this data plane locator when sending + packets to the associated SFF"; + uses sfc-sl:data-plane-locator; + } + list sff-interfaces { + key "sff-interface"; + leaf sff-interface { + type string; + description + "An individual SFF interface connected to this SFF"; + } + description + "A list of SFF interfaces connected to this SFF"; + } + leaf failmode { + type failmode-type; + description + "This leaf defines what the SFF should do if it can not + send packets to a connected SFF"; + } + description + "A list of all Service Function Forwarders connected to + this SFF"; + } + } + } + + container service-function-forwarders-state { + config false; + description + "This container hold operational state for all service + function forwarders"; + list service-function-forwarder-state { + key "name"; + description + "This list holds operational data for all service functions + forwarders in the domain"; + leaf name { + type sfc-common:sff-name; + description + "the name of the service function forwarder"; + } + uses sfc-ss:service-statistics-group { + description "Global Service Function Forwarder statistics"; + } + + list sff-service-path { + key "name"; + leaf name { + type sfc-common:sfp-name; + description + "The name of the Service Path"; + } + uses sfc-ss:service-statistics-group; + description + "A list of all service function paths that use this + service function forwarder"; + } + } + } +} diff --git a/experimental/odp/service-function-group-algorithm.yang b/experimental/odp/service-function-group-algorithm.yang new file mode 100644 index 000000000..f4e02db40 --- /dev/null +++ b/experimental/odp/service-function-group-algorithm.yang @@ -0,0 +1,113 @@ +module service-function-group-algorithm { + + namespace "urn:cisco:params:xml:ns:yang:sfc-sfg-alg"; + + prefix sfc-sfg-alg; + + organization "Contextream, Inc."; + contact "Kfir Yeshayahu "; + + + description + "This module contains a collection of YANG definitions for + managing service function group algorithms. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC publication + // and remove this note. + + revision 2015-02-14 { + description + "Revised based on SFF Load Balance Feature Proposal"; + } + + grouping service-function-group-algorithm-entry { + description + "A list that holds all service function group algorithms in the domain"; + leaf name { + type string; + description + "The name of the service function group algorithm"; + } + leaf algorithm_type { + type enumeration { + enum ALL { + value 0; + description "Execute all buckets in the group. This group is used for multicast or broadcast +forwarding. The packet is effectively cloned for each bucket; one packet is processed for each +bucket of the group. If a bucket directs a packet explicitly out the ingress port, this packet clone +is dropped. If the controller writer wants to forward out the ingress port, the group must include +an extra bucket which includes an output action to the OFPP_IN_PORT reserved port"; + } + enum SELECT { + value 1; + description "Execute one bucket in the group. Packets are processed by a single bucket in +the group, based on a switch-computed selection algorithm (e.g. hash on some user-configured +tuple or simple round robin). All configuration and state for the selection algorithm is external +to OpenFlow. The selection algorithm should implement equal load sharing and can optionally +be based on bucket weights. When a port specified in a bucket in a select group goes down, the +switch may restrict bucket selection to the remaining set (those with forwarding actions to live +ports) instead of dropping packets destined to that port. This behavior may reduce the disruption +of a downed link or switch"; + } + enum INDIRECT { + value 2; + description "Execute the one defined bucket in this group. This group supports only +a single bucket. Allows multiple flow entries or groups to point to a common group identifier, +supporting faster, more efficient convergence (e.g. next hops for IP forwarding). This group type +is effectively identical to an all group with one bucket"; + } + enum FAST_FAILURE { + value 3; + description "Execute the first live bucket. Each action bucket is associated with +a specific port and/or group that controls its liveness. The buckets are evaluated in the order +defined by the group, and the first bucket which is associated with a live port/group is selected. +This group type enables the switch to change forwarding without requiring a round trip to the +controller. If no buckets are live, packets are dropped."; + } + } + } + } + + typedef service-function-group-algorithm-ref { + type leafref { + path "/sfc-sfg-alg:service-function-group-algorithms/sfc-sfg-alg:service-function-group-algorithm/" + + "sfc-sfg-alg:name"; + } + description + "This type is used by data models that need to reference + configured service functions."; + } + + // Service Function Group Algorithms + + container service-function-group-algorithms { + description + "All service function group algorithms"; + + list service-function-group-algorithm { + description + "This list holds configuration data for all service function group algorithms + in the domain"; + key "name"; + uses service-function-group-algorithm-entry; + } + } + +// Remote procedure calls +} diff --git a/experimental/odp/service-function-group.yang b/experimental/odp/service-function-group.yang new file mode 100644 index 000000000..f5570be29 --- /dev/null +++ b/experimental/odp/service-function-group.yang @@ -0,0 +1,110 @@ +module service-function-group { + + namespace "urn:cisco:params:xml:ns:yang:sfc-sfg"; + + prefix sfc-sfg; + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + import service-function-group-algorithm { + prefix sfc-sfg-alg; + revision-date 2015-02-14; + } + import sfc-common { + prefix sfc-common; + } + organization "Contextream, Inc."; + contact "Kfir Yeshayahu "; + + description + "This module contains a collection of YANG definitions for + managing service function group algorithms. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC publication + // and remove this note. + + revision 2015-02-14 { + description + "Revised based on SFF Load Balance Feature Proposal"; + } + + grouping service-function-group-entry { + description + "A list that holds all service function groups in the domain"; + leaf name { + type string; + description + "The name of the service function group"; + } + leaf groupId { + type uint32; + description + "The groupId of the service function group"; + } + leaf algorithm { + type sfc-sfg-alg:service-function-group-algorithm-ref; + description + "The name of the service-function-group-algorithm used by this group"; + } + leaf rest-uri { + description "URI of REST based management"; + type inet:uri; + } + leaf ip-mgmt-address { + type inet:ip-address; + description + "The IP and port used to configure this service-function"; + } + leaf type { + type sfc-common:sft-type-name; + description + "Service Function Type from service-function-type yang + model"; + } + list sfc-service-function { + key "name"; + leaf name { + type sfc-common:sf-name; + description + "The name of the Service Function"; + } + description + "A list of all service functions that are contained in this group"; + } + + } + // Service Function Groups + + container service-function-groups { + description + "All service function groups"; + + list service-function-group { + description + "This list holds configuration data for all service function groups + in the domain"; + key "name"; + uses service-function-group-entry; + } + } + +// Remote procedure calls +} diff --git a/experimental/odp/service-function-mapping.yang b/experimental/odp/service-function-mapping.yang new file mode 100644 index 000000000..0bdcb7724 --- /dev/null +++ b/experimental/odp/service-function-mapping.yang @@ -0,0 +1,95 @@ +module service-function-mapping { + + namespace "urn:ericsson:params:xml:ns:yang:sfc-sf-map"; + + prefix sfc-sf-map; + + import sfc-common { + prefix sfc-common; + revision-date 2015-10-17; + } + import service-locator { + prefix sfc-sl; + revision-date 2014-07-01; + } + + organization "Ericsson Inc."; + contact "Brady Johnson "; + + description + "The definitions herein allow for an SF and SFF to easily be + identified given the Service Locator transport type and the + SF type. These entities will be populated when the SFF and + SFs are populated, and cannot be configured via RESTConf. + Currently, there is no way of knowing if SFFs specified in + adjacent Service Chain hops are reachable, so later, when + SFC has something capable of determining the SFF topology, + the SFF list may be modified."; + + revision 2014-07-01 { + description + "First version."; + } + + container sff-dpl-by-sf-dpl-mappings { + description "A mapping of SF-DPL to SFF-DPL."; + list sff-dpl-by-sf-dpl-mapping { + key "sf-dpl"; + leaf sf-dpl { + type sfc-common:sf-data-plane-locator-name; + } + leaf sff-dpl { + type sfc-common:sff-data-plane-locator-name; + } + } + } + + container service-function-mapping { + config false; + description + "This container maps the transport type to service function types + that are reachable with the transport type. Each service function + type then maps to a list of service functions of that type. Each + service function then maps to a list of service function forwarders + that can reach the service fuction with the transport type."; + + list sl-transports { + key "transport"; + leaf transport { + type identityref { + base sfc-sl:sl-transport-type; + } + description + "the name of the locator transport"; + } + + list service-function-type-mapping { + key "sf-type"; + leaf sf-type { + type sfc-common:sft-type-name; + description + "The service function type"; + } + + list service-functions { + key "sf-name"; + leaf sf-name { + type sfc-common:sf-name; + description + "the name of the service function"; + } + + list service-function-forwarders { + key "sff-name"; + leaf sff-name { + type sfc-common:sff-name; + description + "the name of the service function forwarder"; + } + } + } + } + } + } +} + diff --git a/experimental/odp/service-function-ovs.yang b/experimental/odp/service-function-ovs.yang new file mode 100644 index 000000000..2762207ac --- /dev/null +++ b/experimental/odp/service-function-ovs.yang @@ -0,0 +1,55 @@ +module service-function-ovs { + yang-version 1; + + namespace "urn:ericsson:params:xml:ns:yang:sfc-sf-ovs"; + + prefix sfc-sf-ovs; + + import service-function { + prefix sfc-sf; + revision-date 2014-07-01; + } + import yang-ext { + prefix ext; + revision-date 2013-07-09; + } + + organization "Ericsson, Inc."; + contact "Brady Johnson "; + + description + "This module contains a collection of YANG definitions used + to augment Service Function configuration with OpenvSwitch + specific information."; + + revision 2016-01-07 { + description + "Augment SF to include OVS tap port in DPL."; + reference + "https://tools.ietf.org/html/draft-penno-sfc-yang-14"; + } + + grouping connected-port { + description + "Groups OVS connected port information"; + container ovs-port { + description + "Holds OVS port information"; + leaf port-id { + type string; + description "OVS port ID this SF is connected on"; + } + } + } + + augment "/sfc-sf:service-functions/" + + "sfc-sf:service-function/" + + "sfc-sf:sf-data-plane-locator" { + description + "Augments the SF Data Plane Locator definition + with OVS specific information"; + ext:augment-identifier "sf-dpl-ovs-augmentation"; + uses connected-port; + } + +} diff --git a/experimental/odp/service-function-path-metadata.yang b/experimental/odp/service-function-path-metadata.yang new file mode 100644 index 000000000..9d30fd78a --- /dev/null +++ b/experimental/odp/service-function-path-metadata.yang @@ -0,0 +1,140 @@ +module service-function-path-metadata { + + + namespace "urn:cisco:params:xml:ns:yang:sfc-md"; + + prefix sfc-md; + + organization "Cisco Systems, Inc."; + contact "Paul Quinn "; + + description + "This module contains a collection of YANG definitions metadata + used in a service function path between participating nodes"; + + + revision 2014-07-01 { + description + "Initial Version"; + reference + "RFC XXXX: Service Path Metadata"; + } + + // Service Function Path Metadata + + typedef context-metadata-ref { + type leafref { + path "/sfc-md:service-function-metadata/" + + "sfc-md:context-metadata/sfc-md:name"; + } + description + "This type is used by data models that need to reference + configured context metadata headers."; + } + + typedef variable-metadata-ref { + type leafref { + path "/sfc-md:service-function-metadata/" + + "sfc-md:variable-metadata/sfc-md:name"; + } + description + "This type is used by data models that need to reference + configured variable metadata headers."; + } + + //Another module would reference these headers like + //leaf name { + // type sfc-md:context-metadata-ref; + // description + // "A reference to the name of a configured context header"; + //} + + container service-function-metadata { + + description + "NSH provides a mechanism to carry shared metadata between + network devices and service function, and between service + functions. The semantics of the shared metadata is + communicated via a control plane to participating + nodes. Examples of metadata include classification + information used for policy enforcement and network context + for forwarding post service delivery."; + + list context-metadata { + key "name"; + leaf name { + type string; + description "A unique name for this set of context headers"; + } + leaf context-header1 { + type uint32; + description "network platform context, bytes 9-12"; + } + leaf context-header2 { + type uint32; + description "network platform context, bytes 13-16"; + } + leaf context-header3 { + type uint32; + description "network platform context, bytes 17-20"; + } + leaf context-header4 { + type uint32; + description "network platform context, bytes 21-24"; + } + description "Fixed Context metadata headers"; + } + list variable-metadata { + key "name"; + leaf name { + type string; + description "A unique name for this set of variable length + metadata"; + } + list tlv-metadata { + key "tlv-class tlv-type"; + leaf tlv-class { + type uint16; + description "Class of TLV being used, bytes 25-26"; + } + leaf tlv-type { + type uint8; + description "type of tlv for a given class"; + } + leaf flags { + type bits { + bit r1 { + position 24; + description "Reserved"; + } + bit r2 { + position 25; + description "Reserved"; + } + bit r3 { + position 26; + description "Reserved"; + } + } + description "reserved flag bits"; + } + + leaf length { + type uint8 { + range "0..32"; + } + description "Length of the variable metadata in 4-byte + words"; + } + leaf tlv-data { + type string; + description "Variable Data"; + } + description "A set of variable length metadata"; + } + description "A list that contain sets of variable length + metadata"; + } + } +} + diff --git a/experimental/odp/service-function-path.yang b/experimental/odp/service-function-path.yang new file mode 100644 index 000000000..2fea6b641 --- /dev/null +++ b/experimental/odp/service-function-path.yang @@ -0,0 +1,222 @@ +module service-function-path { + + namespace "urn:cisco:params:xml:ns:yang:sfc-sfp"; + + prefix sfc-sfp; + + import service-function-path-metadata { + prefix sfc-md; + revision-date 2014-07-01; + } + import service-locator { + prefix sfc-sl; + revision-date 2014-07-01; + } + import sfc-common { + prefix sfc-common; + revision-date 2015-10-17; + } + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + + description + "This module contains a collection of YANG definitions for + managing service function chains. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC + // publication and remove this note. + + revision 2014-07-01 { + description + "Changes based on Opendaylight Testing and IETF SFC ml."; + reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; + } + + // Service Function Path + + container service-function-paths { + description + "The SFP provides a level of indirection + between the fully abstract notion of service chain as an + abstract sequence of functions to be delivered, and the + fully specified notion of exactly what SFF/SFs the packet + will visit when it actually traverses the network. By + allowing the control components to specify the use of this + level of indirection, the deployment may choose the degree + of SFF/SF selection authority that is delegated to the + network"; + list service-function-path { + key "name"; + description + "A list that holds configuration data for all SFPs in the + domain"; + leaf name { + type sfc-common:sfp-name; + description + "The name of this service function path"; + } + + leaf transport-type { + type sfc-sl:sl-transport-type-def; + default "sfc-sl:vxlan-gpe"; + description + "Transport type between SFF from service-locator.yang."; + } + + leaf sfc-encapsulation { + type sfc-sl:sfc-encapsulation-type; + description + "The type of encapsulation used in this path for passing + SFC information along the chain"; + } + + leaf symmetric { + type boolean; + description + "If the chain is symmetric we will create two service + paths, one ingress and another egress. Packets traverse + the egress service path in the reverse order of the + ingress path. If present, this value will override the + setting in the SF-Type. If not present, if at least one + SF is of an SF-Type that sets the bidirectionality flag + to true, then the RSP will be symmetric."; + } + leaf classifier { + type string; + description "The classifier responsible for directing" + + "packets to this service path"; + } + leaf symmetric-classifier { + type string; + description "The classifier responsible for directing" + + "packets to this service path"; + } + leaf context-metadata { + type sfc-md:context-metadata-ref; + description + "The name of the associated context metadata"; + } + leaf variable-metadata { + type sfc-md:variable-metadata-ref; + description + "The name of the associated variable metadata"; + } + leaf tenant-id { + type string; + description + "This SFP was created for a specific tenant-id"; + } + list service-path-hop { + key "hop-number"; + leaf hop-number { + type uint8; + description + "A Monotonically increasing number"; + } + leaf service-function-name { + type sfc-common:sf-name; + description + "Service Function name"; + } + leaf service-function-group-name { + type string; + description + "Service Function group name"; + } + leaf service-function-forwarder { + type sfc-common:sff-name; + description + "Service Function Forwarder name"; + } + leaf service-index { + type uint8; + description + "Provides location within the service path. + Service index MUST be decremented by service functions + or proxy nodes after performing required services. MAY + be used in conjunction with service path for path + selection. Service Index is also valuable when + troubleshooting/reporting service paths. In addition to + location within a path, SI can be used for loop + detection."; + } + + ordered-by user; + description + "A list of service functions that compose the + service path"; + } + leaf service-chain-name { + type sfc-common:sfc-name; + mandatory true; + description + "The Service Function Chain used as blueprint for this + path"; + } + leaf starting-index { + type uint8; + description + "Starting service index"; + } + leaf path-id { + type uint32 { + range "0..16777216"; + } + description + "Identifies a service path. + Participating nodes MUST use this identifier for path + selection. An administrator can use the service path + value for reporting and troubleshooting packets along + a specific path."; + } + } + } + + container service-function-paths-state { + config false; + description + "This container hold operational state for all service + function paths"; + list service-function-path-state { + key "name"; + description + "This list holds operational data for all service function + paths in the domain"; + leaf name { + type sfc-common:sfp-name; + description + "The name of the service function path"; + } + list sfp-rendered-service-path { + key "name"; + leaf name { + type sfc-common:rsp-name; + description + "The name of the Rendered Service Path"; + } + description + "A list of all rendered service paths instantiated + from this service path"; + } + } + } + +} diff --git a/experimental/odp/service-function-proxy.yang b/experimental/odp/service-function-proxy.yang new file mode 100644 index 000000000..95a0cf6e9 --- /dev/null +++ b/experimental/odp/service-function-proxy.yang @@ -0,0 +1,71 @@ +module service-function-proxy{ + + namespace "urn:intel:params:xml:ns:yang:sfc-sf-proxy"; + + prefix sfc-sf-proxy; + + import service-locator { + prefix sfc-sl; + revision-date 2014-07-01; + } + + import service-function { + prefix sfc-sf; + revision-date 2014-07-01; + } + + import yang-ext { + prefix ext; + revision-date 2013-07-09; + } + + organization "Intel, Inc."; + contact "Hongjun Ni "; + + description + "This module contains a collection of YANG definitions used + to augment Service Function configuration with + proxy specific information. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC + // publication and remove this note. + + revision 2016-01-25 { + description "Augmentation of SF for proxy"; + reference "https://tools.ietf.org/html/draft-song-sfc-legacy-sf-mapping"; + } + + grouping proxy { + container proxy-data-plane-locator { + presence "Enables data plane locator for proxy"; + description "proxy's data-plane-locator"; + uses sfc-sl:data-plane-locator; + } + } + + augment "/sfc-sf:service-functions/" + + "sfc-sf:service-function/" + + "sfc-sf:sf-data-plane-locator" { + description + "Augments the SF data plane locator with + proxy's data plane locator"; + ext:augment-identifier "sf-locator-proxy-augmentation"; + uses proxy; + } +} diff --git a/experimental/odp/service-function-scheduler-type.yang b/experimental/odp/service-function-scheduler-type.yang new file mode 100644 index 000000000..1d9910df9 --- /dev/null +++ b/experimental/odp/service-function-scheduler-type.yang @@ -0,0 +1,108 @@ +module service-function-scheduler-type { + + namespace "urn:intel:params:xml:ns:yang:sfc-sfst"; + + prefix sfc-sfst; + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + import ietf-yang-types { + prefix yang; + revision-date 2013-07-15; + } + + organization "Intel, Inc."; + contact "Johnson Li "; + + + description + "This module contains a collection of YANG definitions for + managing service function scheduler types."; + + revision 2015-03-12 { + description + "Initial version."; + reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; + } + + // Service Function Scheduler Type + identity service-function-scheduler-type-identity { + description + "Base identity from which specific service function + scheduler types are derived."; + } + + identity random { + base "service-function-scheduler-type-identity"; + description "Random Scheduler."; + } + + identity round-robin { + base "service-function-scheduler-type-identity"; + description "Round Robin."; + } + + identity shortest-path { + base "service-function-scheduler-type-identity"; + description "Shortest Path."; + } + + identity load-balance { + base "service-function-scheduler-type-identity"; + description "Load Balance."; + } + + identity weighted-shortest-path { + base "service-function-scheduler-type-identity"; + description "Weighted Shortest Path."; + } + + identity load-path-aware { + base "service-function-scheduler-type-identity"; + description "Load Path Aware."; + } + + identity user-defined { + base "service-function-scheduler-type-identity"; + description "User Defined Scheduler Type."; + } + + typedef service-function-scheduler-type { + type identityref { + base "service-function-scheduler-type-identity"; + } + description "This type is used to reference all + registered service function scheduler types"; + } + + container service-function-scheduler-types { + description + "A list of Service function scheduler types. For each type we + keep a list of service function scheduler names. Each name may + indicate the vendor of the scheduler"; + + list service-function-scheduler-type { + key "type"; + leaf type { + type service-function-scheduler-type; + description + "The service function scheduler type"; + } + leaf enabled { + type boolean; + description + "The enabled status of this scheduler type."; + } + leaf name { + type string; + description + "The name of the service function schedule type."; + } + + description + "A list of all service function schedule types."; + } + } +} diff --git a/experimental/odp/service-function-type.yang b/experimental/odp/service-function-type.yang new file mode 100644 index 000000000..d14233d60 --- /dev/null +++ b/experimental/odp/service-function-type.yang @@ -0,0 +1,126 @@ +module service-function-type { + + namespace "urn:cisco:params:xml:ns:yang:sfc-sft"; + + prefix sfc-sft; + + import service-locator { + prefix sfc-sl; + revision-date 2014-07-01; + } + + import sfc-common { + prefix sfc-common; + revision-date 2015-10-17; + } + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + description + "This module contains a collection of YANG definitions for + managing service function types. + + It follows closely the constructs of + http://tools.ietf.org/html/draft-ietf-netmod-interfaces-cfg-12 + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC + // publication and remove this note. + + revision 2014-07-01 { + description + "Changes based on Opendaylight Testing."; + reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; + } + + // Service Function Type definitions + + grouping service-function-type-definition { + description + "List of parameters to define an abstract type + of Service Function"; + // TODO: Expand list to include metadata context + // template support. + // ie MD Type1 C3/C4 context, MD Type2 etc. + leaf type { + type sfc-common:sft-type-name; + description + "Service Function type names such as firewall, + dpi, tcp-proxy, etc"; + } + leaf bidirectional { + type boolean; + description "SF handles uplink and downlink traffic"; + } + leaf nsh-aware { + type boolean; + description + "Service Function can handle Network Service + Headers"; + } + leaf request-reclassification { + type boolean; + description "This leaf determines whether SF can request + reclassification by the SFF"; + } + leaf l2-transparent { + type boolean; + description "This leaf determines whether SF is L2 transparent i.e. do not change L2 addresses"; + } + list supported-dataplanelocator-types { + key "dataplanelocator-type"; + leaf dataplanelocator-type { + type sfc-sl:sl-transport-type-def; + description + "Unique data plane identifier"; + } + description + "Data Plane Locator types from the Service + Function"; + } + } + + container service-function-types { + description + "A list of Service function Types. For each type we keep + a list of Service Functions"; + + list service-function-type { + key "type"; + uses service-function-type-definition; + + list sft-service-function-name { + // TODO: should this be sf-name typedef? Also this should be + // kept in a separate map as an alternate index as it mirrors + // state. + key "name"; + leaf name { + type sfc-common:sf-name; + description + "The name of the service function."; + } + description + "The list of all service functions of a specific type"; + } + description + "A list of all service types. Each service-type entry holds + a list of all service functions of that type"; + } + } +} diff --git a/experimental/odp/service-function.yang b/experimental/odp/service-function.yang new file mode 100644 index 000000000..a0ee8b149 --- /dev/null +++ b/experimental/odp/service-function.yang @@ -0,0 +1,219 @@ +module service-function { + + namespace "urn:cisco:params:xml:ns:yang:sfc-sf"; + + prefix sfc-sf; + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + import service-locator { + prefix sfc-sl; + revision-date 2014-07-01; + } + import service-statistics { + prefix sfc-ss; + revision-date 2014-07-01; + } + import sfc-common { + prefix sfc-common; + revision-date 2015-10-17; + } + + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + + description + "This module contains a collection of YANG definitions for + managing service function."; + + revision 2014-07-01 { + description + "Changes based on Opendaylight Testing."; + reference + "https://tools.ietf.org/html/draft-penno-sfc-yang-14"; + } + + grouping service-function-base { + description + "A group with all base nodes to describe service function"; + leaf name { + type sfc-common:sf-name; + description + "The name of the service function."; + } + leaf type { + type sfc-common:sft-type-name; + mandatory true; + description + "Service Function Type from service-function-type yang + model"; + } + leaf ip-mgmt-address { + type inet:ip-address; + description + "The IP and port used to configure this service-function"; + } + leaf one-chain-only { + type boolean; + description + "This SF can only be used in one service chain"; + } + list sf-data-plane-locator { + key "name"; + description + "A network data-plane locator"; + leaf name { + type sfc-common:sf-data-plane-locator-name; + description + "A unique string that represents this + data-plane-locator"; + } + uses sfc-sl:data-plane-locator; + leaf service-function-forwarder { + type sfc-common:sff-name; + description + "The service function forwarder associated with this + locator"; + } + } + } + + grouping service-function-entry { + description + "This group bundles together all information related to a + single service function"; + leaf tenant-id { + type sfc-common:tenant-id; + description + "This SF was created for a specific tenant-id"; + } + leaf rest-uri { + type inet:uri; + description "URI of REST based management"; + } + uses service-function-base; + } + + container service-functions { + description + "A function that is responsible for specific + treatment of received packets. A Service Function can act at + various layers of a protocol stack (e.g., at the network layer + or other OSI layers). A Service Function can be a virtual + element or be embedded in a physical network element. One of + multiple Service Functions can be embedded in the same network + element. Multiple occurrences of the Service Function can be + enabled in the same administrative domain. + + One or more Service Functions can be involved in the delivery + of added-value services. A non-exhaustive list of Service + Functions includes: firewalls, WAN and application + acceleration, Deep Packet Inspection (DPI),a LI (Lawful + Intercept) module, server load balancers, NAT44 [RFC3022], + NAT64 [RFC6146], NPTv6 [RFC6296], HOST_ID injection, HTTP + Header Enrichment functions, TCP optimizer, etc. + + An SF may be SFC encapsulation aware, that is it receives, and + acts on information in the SFC encapsulation, or unaware in + which case data forwarded to the service does not contain the + SFC encapsulation."; + + list service-function { + key "name"; + description + "This list holds configuration data for all service functions + in the domain"; + uses service-function-entry; + } + } + + container service-functions-state { + config false; + description + "This container hold operational state for all service + functions"; + list service-function-state { + key "name"; + description + "This list holds operational data for all service functions + in the domain"; + leaf name { + type sfc-common:sf-name; + description + "the name of the service function"; + } + uses sfc-ss:service-statistics-group { + description "Global Service Function statistics"; + } + list sf-service-path { + key "name"; + leaf name { + type sfc-common:sfp-name; + description + "The name of the Service Path"; + } + uses sfc-ss:service-statistics-group; + description + "A list of all service function paths that contain this + service function"; + } + } + } + + rpc delete-all-service-function { + description + "Deletes all service functions"; + + // Deprecated in Fluorine, to be removed in Neon + status deprecated; + } + + rpc put-service-function { + description + "Creates a service function"; + + // Deprecated in Fluorine, to be removed in Neon + status deprecated; + + input { + uses service-function-entry; + } + } + rpc read-service-function { + description + "Reads a service function"; + + // Deprecated in Fluorine, to be removed in Neon + status deprecated; + + input { + leaf name { + type string; + mandatory true; + description "The name of the service function."; + } + } + output { + uses service-function-entry; + } + } + rpc delete-service-function { + description + "Deletes a service function"; + + // Deprecated in Fluorine, to be removed in Neon + status deprecated; + + input { + leaf name { + type string; + mandatory true; + description "The name of the service function."; + } + } + } +} diff --git a/experimental/odp/service-locator.yang b/experimental/odp/service-locator.yang new file mode 100644 index 000000000..b8d9034cc --- /dev/null +++ b/experimental/odp/service-locator.yang @@ -0,0 +1,238 @@ +module service-locator { + + namespace "urn:cisco:params:xml:ns:yang:sfc-sl"; + + prefix sfc-sl; + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + import ietf-yang-types { + prefix yang; + revision-date 2013-07-15; + } + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + + description + "This module contains a collection of YANG definitions for + managing service locators. Service locators are used as + data plane network destinations for Service Functions and + Service Function Forwarders + + It follows closely the constructs of + http://tools.ietf.org/html/draft-ietf-netmod-interfaces-cfg-12 + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC + // publication and remove this note. + + revision 2014-07-01 { + description + "Changes based on Opendaylight Testing."; + reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; + } + + // Locator definitions + + // Transport type definitions + identity transport-type { + description + "Base identity from which specific transport types are + derived."; + } + + identity mac { + base "sl-transport-type"; + description "Simple MAC with optional VLAN transport type"; + } + + identity vxlan-gpe { + base "sl-transport-type"; + description "Programmable vxlan GPE transport type"; + } + + identity vxlan { + base "sl-transport-type"; + description "Programmable vxlan transport type"; + } + + identity gre { + base "sl-transport-type"; + description "GRE transport type"; + } + + identity mpls { + base "sl-transport-type"; + description "Multi Protocol Label Switching transport type"; + } + + identity other { + base "sl-transport-type"; + description "unspecified transport type"; + } + + identity sl-transport-type { + base "transport-type"; + description + "This identity is used as a base for all transport + types"; + + } + + typedef sl-transport-type-def { + type identityref { + base "sl-transport-type"; + } + description "This type is used to reference all + registered transport types"; + } + + identity sfc-encapsulation-identity { + description + "Base identity from which the SFC encapsulation identities" + + " are derived"; + } + + identity nsh { + base "sfc-encapsulation-identity"; + description "SFC information is exchanged via NSH headers"; + } + + identity transport { + base "sfc-encapsulation-identity"; + description "SFC information exchange is achieved by means of the transport"; + } + identity mac-chaining { + base "sfc-encapsulation-identity"; + description "SFC information is exchanged via MAC Chaining"; + } + typedef sfc-encapsulation-type { + type identityref { + base "sfc-encapsulation-identity"; + } + description "This type is used to reference all + SFC encapsulation types"; + } + + grouping lisp-locator { + description + "Data plane-locator: Lisp Eid(IP)"; + leaf eid { + type inet:ip-address; + description "Data-plane IP address"; + } + } + + grouping ip-port-locator { + description + "Data plane-locator: IP address and L4 port"; + leaf ip { + type inet:ip-address; + description "Data-plane IP address"; + } + leaf port { + type inet:port-number; + description "Data-plane port number"; + } + } + + grouping mac-address-locator { + description + "Data plane-locator: mac address and optional vlan-id"; + leaf mac { + type yang:mac-address; + description "Data-plane MAC address"; + } + leaf vlan-id { + type uint16 { + range "1..4094"; + } + description "Data-plane VLAN ID address"; + } + } + + grouping mpls-locator { + description + "Data plane-locator: MPLS label"; + leaf mpls-label { + type uint32 { + range "1..1048575"; + } + description "MPLS Label, 20 bits"; + } + } + + grouping function-locator { + description + "When SF is co-located with SFF, this could be the name of a + function or method."; + leaf function-name { + type string; + description "Function or method name"; + } + } + + grouping other-locator { + description + "Other locator"; + leaf other-name { + type string; + description "A other or undefined locator"; + } + } + + grouping data-plane-locator { + description + "This group presents data-plane locator + information for service function elements in the domain"; + choice locator-type { + mandatory true; + case ip { + uses ip-port-locator; + } + case lisp { + uses lisp-locator; + } + case mac { + uses mac-address-locator; + } + case function { + uses function-locator; + } + case mpls { + uses mpls-locator; + } + case other { + uses other-locator; + } + description "The collection of all possible data-plane + locators. Only one can be chosen"; + } + leaf transport { + type identityref { + base sfc-sl:sl-transport-type; + } + description + "The encapsulation used to carry NSH packets"; + } + } +} diff --git a/experimental/odp/service-node.yang b/experimental/odp/service-node.yang new file mode 100644 index 000000000..7fb510d65 --- /dev/null +++ b/experimental/odp/service-node.yang @@ -0,0 +1,94 @@ +module service-node { + + namespace "urn:cisco:params:xml:ns:yang:sfc-sn"; + + prefix sfc-sn; + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + import ietf-yang-types { + prefix yang; + revision-date 2013-07-15; + } + + import sfc-common { + prefix sfc-common; + revision-date 2015-10-17; + } + + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + + description + "This module contains a collection of YANG definitions for + managing service function chains. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC publication + // and remove this note. + + revision 2014-07-01 { + description + "Revision based on Opendaylight project feedback"; + } + + grouping service-node-grouping { + description + "This group bundle together the information that comprises + a service-node"; + leaf name { + type sfc-common:sn-name; + description + "The name of the service node"; + } + leaf ip-mgmt-address { + type inet:ip-address; + description + "The IP and port used to configure this service-node"; + } + leaf-list service-function-forwarder { + type sfc-common:sff-name; + description + "A list of service function forwarders resident in this + service node"; + } + leaf-list service-function { + type sfc-common:sf-name; + description + "A list of service functions resident in this service + node"; + } + } + + container service-nodes { + description + "Physical or virtual element that hosts one or more service + function forwarders"; + list service-node { + key "name"; + uses service-node-grouping; + description + "The list that contains all service-nodes in the + domain"; + } + } +} diff --git a/experimental/odp/service-path-id.yang b/experimental/odp/service-path-id.yang new file mode 100644 index 000000000..33746d8c9 --- /dev/null +++ b/experimental/odp/service-path-id.yang @@ -0,0 +1,260 @@ +module service-path-id { + + namespace "urn:cisco:params:xml:ns:yang:service-path-id"; + + prefix sfc-spid; + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + + description + "This module contains a collection of YANG definitions to + manage Service Path Ids. + + It allows user to reserve bands of path-ids, associated + path-ids to tenants and the implementation of several + algorithms for symmetric path id generation. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC + // publication and remove this note. + + revision 2015-08-04 { + description + "Initial Revisions"; + reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; + } + + typedef path-id-ref { + type leafref { + path "/sfc-spid:service-path-ids/" + + "sfc-spid:service-path-id/sfc-spid:path-id-key"; + } + description + "This type is used by data models that need to reference + a specific service path id."; + } + + // Service Path Id + + typedef path-id-state { + type enumeration { + enum available { + value 1; + description + "Path-id is available"; + } + enum allocated { + value 2; + description + "Path-id has been allocated for use"; + } + enum reserved { + value 3; + description + "Path-d has been reserved"; + } + } + description + "Determines the state of the path-id"; + } + + // Generation algorithm + + typedef generation-algorithm-enum { + type enumeration { + enum random { + value 1; + description + "Random Path-id generation"; + } + enum sequential { + value 2; + description + "Sequential Path-id generation"; + } + } + description + "The path-id generation algorithm"; + } + + container service-path-ids { + config false; + description + "This container stores a bitarray of all used/free Path IDs + in the domain."; + leaf current-path-id { + type uint32 { + range "0..16777216"; + } + description "The last allocated path-id"; + } + leaf generation-algorithm { + type generation-algorithm-enum; + description + "The algorithm used to generate path-ids"; + } + list service-path-id { + key "path-id-key"; + description + "A list that holds bitarray entries covering + all service path ids"; + leaf path-id-key { + type int64; + description + "The key to a specific path-id bit array. The + same key covers 64 path-ids"; + } + leaf path-id-bitarray { + type int64; + description + "Holds a bitarray where each bit represents a path-id"; + } + } + } + + rpc delete-path-id { + description + "Delete a Path Id"; + input { + leaf path-id { + type uint32 { + range "0..16777216"; + } + description + "Identifies a service path. + Participating nodes MUST use this identifier for path + selection. An administrator can use the service path + value for reporting and troubleshooting packets along + a specific path."; + } + } + output { + leaf result { + type boolean; + description + "True if Rendered Service Path Id was deleted, otherwise + false"; + } + } + } + + rpc allocate-path-id { + description + "Allocate a path-id"; + input { + leaf path-id { + type uint32 { + range "0..16777216"; + } + description + "Identifies a service path. + Participating nodes MUST use this identifier for path + selection. An administrator can use the service path + value for reporting and troubleshooting packets along + a specific path."; + } + } + output { + leaf result { + type boolean; + description + "True if Rendered Service Path Id was deleted, otherwise + false"; + } + } + } + + rpc reserve-path-id-range { + description + "Reserve a path-id range"; + input { + leaf path-id-start { + type uint32 { + range "0..16777216"; + } + description + "Start of the path-id range"; + } + leaf path-id-end { + type uint32 { + range "0..16777216"; + } + description + "End of the path-id range"; + } + } + output { + leaf result { + type boolean; + description + "True if Rendered Service Path Id was deleted, otherwise + false"; + } + } + } + + rpc read-path-id { + description + "Read all the necessary information for the first hop of a + Rendered Service Path"; + input { + leaf path-id { + type uint32 { + range "0..16777216"; + } + description + "Identifies a service path. + Participating nodes MUST use this identifier for path + selection. An administrator can use the service path + value for reporting and troubleshooting packets along + a specific path."; + } + } + output { + leaf state { + type path-id-state; + description + "Defines whether the path-id is available, allocated + or reserved"; + } + } + } + + rpc set-generation-algorithm { + description + "Set the path-id generation algorithm to be used"; + input { + leaf generation-algorithm { + type generation-algorithm-enum; + description + "The algorithm used to generated path-ids"; + } + } + output { + leaf result { + type boolean; + description + "True if the generation-algorithm was set successfully, + otherwise false"; + } + } + } + +} diff --git a/experimental/odp/service-statistics.yang b/experimental/odp/service-statistics.yang new file mode 100644 index 000000000..4b1883a33 --- /dev/null +++ b/experimental/odp/service-statistics.yang @@ -0,0 +1,100 @@ +module service-statistics { + + namespace "urn:cisco:params:xml:ns:yang:sfc-ss"; + + prefix sfc-ss; + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + + import ietf-yang-types { + prefix yang; + revision-date 2013-07-15; + } + + organization "Cisco Systems, Inc."; + contact "Reinaldo Penno "; + + + description + "This module contains a collection of YANG definitions for + managing service statistics. Service statistics are used + to determine the load and efficiency of a service function + or service function forwarder device + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC XXXX; see + the RFC itself for full legal notices."; + + // RFC Ed.: replace XXXX with actual RFC number and remove this + // note. + + // RFC Ed.: update the date below with the date of RFC + // publication + // and remove this note. + + revision 2014-07-01 { + description + "Initial Revision"; + reference + "https://tools.ietf.org/html/draft-penno-sfc-yang-14"; + } + + grouping service-statistics-group { + description + "Group that holds the list that indexes statistics by timestamp"; + list statistic-by-timestamp { + key "timestamp"; + leaf timestamp { + type uint64; + description + "Date and time of record creation in milliseconds + counting from 1.1.1970 00:00:00 UTC (= 0)"; + } + uses statistic-fields; + description + "This list holds statistics indexed by timestamp"; + } + } + + grouping statistic-fields { + description + "Groups all statistics containers"; + container service-statistic { + config false; + leaf bytes-in { + type yang:zero-based-counter64; + description + "Received bytes"; + } + leaf bytes-out { + type yang:zero-based-counter64; + description + "Transmitted bytes"; + } + leaf packets-in { + type yang:zero-based-counter64; + description + "Received packets"; + } + leaf packets-out { + type yang:zero-based-counter64; + description + "Transmitted packets"; + } + description + "This container holds packets and bytes statistics"; + } + } +} diff --git a/experimental/odp/service.yang b/experimental/odp/service.yang new file mode 100644 index 000000000..ccfd2ac06 --- /dev/null +++ b/experimental/odp/service.yang @@ -0,0 +1,183 @@ +module service { + yang-version 1; + namespace "urn:opendaylight:coe:northbound:service"; + prefix "coe"; + + description + "This YANG module defines the generic configuration data for Container Orchestration Engine."; + + revision "2017-06-11" { + description "Initial revision."; + } + + import ietf-inet-types { + prefix inet; + revision-date "2013-07-15"; + } + + import ietf-yang-types { + prefix yang; + revision-date "2013-07-15"; + } + + organization "OpenDaylight COE Group"; + + contact "COE Developers "; + + container service-information { + description + "Service container configuration."; + + list services { + key "uid"; + + description + "List of all configured services."; + + leaf uid { + type yang:uuid; + description "UUID representing the service."; + } + + leaf name { + type string; + description "The service name as reported by Kubernetes."; + } + + leaf cluster-id { + type yang:uuid; + description "UUID representing the K8s cluster"; + } + + leaf cluster-ip-address { + type inet:ip-address; + description + "Front-end IP address for all the pods tagged under the service."; + } + + leaf network-NS { + type string; + description "Network namespace defines the space for the service. The empty namespace + is equivalent to the default namespace."; + status deprecated; + } + + leaf-list external-ip-address { + type inet:ip-address; + description + "list of external IP Addresses that route the traffic into and from the service."; + } + + leaf load-balancer-IP { + type inet:ip-address; + description + "Only applies to Service Type: LoadBalancer. A loadBalancer will get created with + the IP specified in this field."; + } + + leaf-list ingress-ip-address { + type inet:ip-address; + description + "List of ingress IP addresses that are assigned to the service."; + } + + list service-ports { + description "List of the associated ports."; + uses service-ports-info; + } + } + } + + grouping service-ports-info { + description "service ports info"; + + leaf name { + type string; + description "The name of this port within the service. This maps to + the 'Name' field in EndpointPort objects."; + } + + leaf port { + type int32; + description "The port that will be exposed by this service."; + } + + leaf target-port { + type string; + description "Number or name of the port to access on the pods targeted by the service."; + } + + leaf node-port { + type int32; + description "The port on each node on which this service is exposed when + type equal to NodePort or LoadBalancer."; + } + } + + container endpoints-info { + description "Endpoints container configuration."; + + list endpoints { + key "uid"; + + leaf uid { + type yang:uuid; + description "UUID representing the endpoint."; + } + + leaf name { + type string; + description "The endpoint name (should match service name)."; + } + + leaf network-NS { + type string; + description "Network namespace defines the space for the endpoint. The empty namespace + is equivalent to the default namespace."; + status deprecated; + } + + list endpoint-addresses { + uses endpoint-addresses-info; + } + + list endpoint-ports { + uses endpoint-ports-info; + } + } + } + + grouping endpoint-addresses-info { + description "Endpoint IP-Addresses information."; + + leaf ip-address { + type inet:ip-address; + description + "The IP address of this endpoint corresponding to the Pod IP-Address."; + } + + leaf host-name { + type string; + description "The host name of the endpoint."; + } + + leaf node-name { + type string; + description "Name of the node that host this endpoint."; + } + } + + grouping endpoint-ports-info { + description "Endpoint ports information."; + + leaf name { + type string; + description "Name of this port within the endpoint (should match ServicePort.Name)."; + } + + leaf port { + type int32; + description "The endpoint port number."; + } + } +} diff --git a/experimental/odp/sfc-common.yang b/experimental/odp/sfc-common.yang new file mode 100644 index 000000000..1719290b6 --- /dev/null +++ b/experimental/odp/sfc-common.yang @@ -0,0 +1,84 @@ +module sfc-common { + + namespace "urn:cisco:params:xml:ns:yang:sfc-common"; + + prefix sfc-common; + + organization "Cisco Systems, Inc."; + contact "Keith Burns "; + + description + "Common typedefs and leafrefs for project"; + + revision 2015-10-17 { + description + "Initial revision"; + reference "https://tools.ietf.org/html/draft-penno-sfc-yang"; + } + + // general typedefs + typedef tenant-id { + type string; + description "Tenant ID"; + } + // typedef for Service Node + typedef sn-name { + type string; + description "Service Node Name Type"; + } + + // typedefs for Service Function Chain + typedef sfc-name { + type string; + description "Service Function Chain Name"; + } + + // typedefs for Service Function Type + typedef sft-type-name { + type string; + description "Service function type name"; + } + + // typedefs for Service Function + typedef sf-name { + type string; + description "Service Function Name"; + } + + typedef sf-data-plane-locator-name { + type string; + description + "A unique name for SF data-plane-locator"; + } + + // typedefs for Rendererd Service Paths + typedef rsp-name { + type string; + description + "Rendererd Service Path Name Type"; + } + + // typedefs for Service Function Path + typedef sfp-name { + type string; + description "Service Function Path Name Type"; + } + + // typedefs for sff names + typedef sff-data-plane-locator-name { + type string; + description + "Service Function Forwarder data-plane-locator name type"; + } + + typedef sff-name { + type string; + description "Service Function Forwarder Name type"; + } + + // typedefs for renderer names + typedef renderer-name { + type string; + description "Renderer Name type"; + } +} diff --git a/experimental/odp/sfc-ioam-nb-pot.yang b/experimental/odp/sfc-ioam-nb-pot.yang new file mode 100644 index 000000000..dbcd1190c --- /dev/null +++ b/experimental/odp/sfc-ioam-nb-pot.yang @@ -0,0 +1,227 @@ +module sfc-ioam-nb-pot { + + yang-version 1; + + namespace "urn:cisco:params:xml:ns:yang:sfc-ioam-nb-pot"; + + prefix sfc-ioam-nb-pot; + + import yang-ext { prefix ext; } + + import rendered-service-path { prefix sfc-rsp; } + import sfc-common { prefix sfc-co; } + + organization "Cisco Systems, Inc."; + contact + "Srihari Raghavan "; + + description + "This module contains a collection of YANG definitions for + managing service function chain proof of transit related + configuration parameters (RPC) at the north-bound side towards + the controller and some internal configuration parameters."; + + revision 2016-11-22 { + description + "Initial revision."; + reference + ""; + } + + identity time-resolution{ + description + "Time interval resolution"; + } //base identity + + identity hours { + base time-resolution; + description + "Hours"; + } + + identity minutes { + base time-resolution; + description + "Minutes"; + } + + identity seconds { + base time-resolution; + description + "Seconds"; + } + + identity milliseconds { + base time-resolution; + description + "Milli-seconds"; + } + + identity microseconds { + base time-resolution; + description + "Micro-seconds"; + } + + identity nanoseconds { + base time-resolution; + description + "Nano-seconds"; + } + + grouping refresh-period-interval { + description + "Refresh period interval."; + leaf refresh-period-time-units { + type identityref { + base time-resolution; + } + description "Time units."; + } + + leaf refresh-period-value { + type uint32; + description "Time value."; + } + } + + typedef bit-mask-options { + type enumeration { + enum bits16 { + value 0; + description + "16-bits used for individual proof of transit metadata."; + } + enum bits32 { + value 1; + description + "32-bits used for individual proof of transit metadata."; + } + enum bits64 { + value 2; + description + "64-bits used for individual proof of transit metadata."; + } + enum bits128 { + value 3; + description + "128-bits used for individual proof of transit metadata."; + } + enum bits256 { + value 4; + description + "256-bits used for individual proof of transit metadata."; + } + enum bits512 { + value 5; + description + "512-bits used for individual proof of transit metadata."; + } + enum bits1024 { + value 6; + description + "1024-bits used for individual proof of transit metadata."; + } + } + description + "Defines the max number of bits used for individual + proof of transit metadata fields. For now, the max is 64-bits. + This handles the current scope of the proof of transit + domain."; + } + + grouping ioam-pot-params { + description "In-band OAM Proof of transit related parameters."; + + leaf ioam-pot-enable { + type boolean; + default false; + description + "Flag to enable iOAM Proof of Transit for this SFC."; + } + + leaf ioam-pot-num-profiles { + type uint32 { + range "2..16"; + } + default 2; + description + "Default number of profiles to be sent to nodes. + Currently, it defaults to two to handle an odd and + even profile per node."; + } + + leaf ioam-pot-bit-mask { + type bit-mask-options; + default bits64; + description "Default bit mask value for proof of transit + calculations."; + } + + uses refresh-period-interval; + } + + augment "/sfc-rsp:rendered-service-paths" + + "/sfc-rsp:rendered-service-path" { + description "Rendered service path's proof of transit + related augmentation."; + ext:augment-identifier "rsp-ioam-pot-augmentation"; + uses ioam-pot-params; + } + + + /*** RPCs ***/ + rpc enable-sfc-ioam-pot-rendered-path { + description + "Enable and Configure service function chain proof + of transit for a rendered service path."; + input { + leaf sfc-ioam-pot-rsp-name { + type sfc-co:rsp-name; + description + "Name of the Rendered Service Path to enable + proof of transit on. This should be an existing + rendered service path such as one created from + rendered-service-path:create-rendered-path RPC. + NOTE: by default, the last node of the SFC is + taken as the decap node for proof of transit."; + } + + uses ioam-pot-params; + } + + output { + leaf result { + type boolean; + description + "True if SFC proof of transit of the chosen + Rendered Service Path is enabled, otherwise false"; + } + } + } + + rpc disable-sfc-ioam-pot-rendered-path { + description + "Disable service function chain proof of transit + for a rendered service path."; + input { + leaf sfc-ioam-pot-rsp-name { + type sfc-co:rsp-name; + description + "Name of the Rendered Service Path to disable + proof of transit on. This should be an existing + rendered service path such as one created from + rendered-service-path:create-rendered-path RPC."; + } + } + + output { + leaf result { + type boolean; + description + "True if SFC proof of transit of the chosen + Rendered Service Path is disabled, otherwise false."; + } + } + } +} diff --git a/experimental/odp/sfc-ioam-sb-pot-hop-params.yang b/experimental/odp/sfc-ioam-sb-pot-hop-params.yang new file mode 100644 index 000000000..74c52910f --- /dev/null +++ b/experimental/odp/sfc-ioam-sb-pot-hop-params.yang @@ -0,0 +1,54 @@ +module sfc-ioam-sb-pot-hop-params { + + yang-version 1; + + namespace "urn:cisco:params:xml:ns:yang:sfc-ioam-sb-pot-hop-params"; + + prefix sfc-ioam-sb-pot-hop-params; + + organization "Cisco Systems, Inc."; + contact + "Srihari Raghavan "; + + description + "This module contains a collection of YANG definitions for + generated OAM proof of transit per-hop configuration + parameters."; + + revision 2016-12-05 { + description + "Initial revision."; + reference + ""; + } + + container poly-secrets { + description "Proof of transit algorithm per-hop parameters."; + list poly-secret { + key "pindex"; + ordered-by system; + description + "List of parameters ordered by the profile name + for a node to use."; + + leaf pindex { + type uint32; + description + "Profile index being referred to."; + } + + leaf secret-share { + type int64; + description + "Per-hop secret share of the profile."; + } + + leaf secret { + type int64; + description + "The overall secret of the profile being referred to. + Meant for the proof of transit verifier node."; + } + } + } +} diff --git a/experimental/odp/sfc-ioam-sb-pot-params.yang b/experimental/odp/sfc-ioam-sb-pot-params.yang new file mode 100644 index 000000000..fa4147cb4 --- /dev/null +++ b/experimental/odp/sfc-ioam-sb-pot-params.yang @@ -0,0 +1,97 @@ +module sfc-ioam-sb-pot-params { + + yang-version 1; + + namespace "urn:cisco:params:xml:ns:yang:sfc-ioam-sb-pot-params"; + + prefix sfc-ioam-sb-pot-params; + + import sfc-ioam-nb-pot { + prefix ioam-nb-pot; + revision-date 2016-11-22; + } + + import sfc-ioam-sb-pot { + prefix ioam-sb-pot; + revision-date 2017-01-12; + } + + organization "Cisco Systems, Inc."; + contact + "Srihari Raghavan "; + + description + "This module contains a collection of YANG definitions for + generated OAM proof of transit configuration + parameters."; + + revision 2016-12-05 { + description + "Initial revision."; + reference + ""; + } + + container poly-parameters { + config false; + description "Proof of transit parameters."; + + uses ioam-nb-pot:refresh-period-interval; + + leaf profile-bit-mask-value { + type ioam-nb-pot:bit-mask-options; + description + "Profile bit mask value used for proof of transit + metadata calculations."; + } + + leaf active-profile-index { + type ioam-sb-pot:profile-index-range; + description + "Proof of transit profile index that is active. + Will be set in the first hop of the path or chain. + Other nodes will not use this field."; + } + + list poly-parameter { + key "pindex"; + ordered-by system; + description + "List of multiple algorithm parameters ordered + by profile name for a node to use. For now, there are + two profiles per RSP."; + + leaf pindex { + type uint32; + description + "Profile index being referred to."; + } + + leaf prime { + type int64; + description + "Prime number value in the profile."; + } + + list coeffs { + ordered-by user; + leaf coeff { + type int64; + description "Coefficient value."; + } + description + "List of coefficients in the profile."; + } + + list lpcs { + ordered-by user; + leaf lpc { + type int64; + description "LPC value"; + } + description + "List of LPCs in the profile being referred to."; + } + } + } +} diff --git a/experimental/odp/sfc-ioam-sb-pot.yang b/experimental/odp/sfc-ioam-sb-pot.yang new file mode 100644 index 000000000..cb70020a8 --- /dev/null +++ b/experimental/odp/sfc-ioam-sb-pot.yang @@ -0,0 +1,169 @@ +module sfc-ioam-sb-pot { + + yang-version 1; + + namespace "urn:cisco:params:xml:ns:yang:sfc-ioam-sb-pot"; + + prefix sfc-ioam-sb-pot; + + organization "Cisco Systems, Inc."; + contact + "Shwetha Bhandari + Srihari Raghavan "; + + description + "This module contains a collection of YANG definitions for + managing in-band OAM based proof of transit configuration + parameters. (https://github.com/ciscodevnet/ioam). + + The model is meant for proof of transit + and is targetted for south-bound deployment nodes."; + + revision 2017-01-12 { + description + "Initial revision."; + reference + ""; + } + + typedef profile-index-range { + type int32 { + range "-1 .. 1"; + } + description + "Range used for the profile index. Currently restricted to + -1 to 1 to identify profiles."; + } + + identity path-identifier-identity { + description + "Base identity for path identifier type."; + } + + identity path-identifier-type-acl { + base "path-identifier-identity"; + description + "ACL path identifier type."; + } + + typedef path-identifier-type { + type identityref { + base path-identifier-identity; + } + description + "Path Identifier Identity type."; + } + + grouping pot-profile { + description "A grouping for proof of transit profiles."; + list pot-profile-list { + key "index"; + ordered-by user; + description "A set of pot profiles."; + + leaf index { + type profile-index-range; + mandatory true; + description + "Proof of transit profile index."; + } + + leaf prime-number { + type uint64; + mandatory true; + description + "Prime number used for module math computation"; + } + + leaf secret-share { + type uint64; + mandatory true; + description + "Share of the secret of polynomial 1 used in computation"; + } + + leaf public-polynomial { + type uint64; + mandatory true; + description + "Public polynomial"; + } + + leaf lpc { + type uint64; + mandatory true; + description + "Lagrange Polynomial Coefficient"; + } + + leaf validator { + type boolean; + default "false"; + description + "True if the node is a verifier node"; + } + + leaf validator-key { + type uint64; + description + "Secret key for validating the path, constant of poly 1"; + } + + leaf number-of-bits { + type uint8; + default 32; + description + "Number of bits as mask used in random value generation. + 32-bits of mask is default."; + } + } + } + + container pot-profiles { + description "A group of proof of transit profiles."; + + list pot-profile-set { + key "name"; + ordered-by user; + description + "Set of proof of transit profiles that group parameters + required to classify and compute proof of transit + metadata at a node"; + + leaf name { + type string; + mandatory true; + description + "Unique identifier for each proof of transit profile"; + } + + leaf path-identifier { + type string; + description + "The path identifier could be an ACL or others associated + to classify and apply this profile"; + } + + leaf path-identifier-type-value { + type path-identifier-type; + default path-identifier-type-acl; + description + "Defines how to interpret the path-identifier."; + } + + leaf active-profile-index { + type profile-index-range; + description + "Proof of transit profile index that is currently active. + Will be set in the first hop of the path or chain. + Other nodes will not use this field."; + } + + uses pot-profile; + + /*** list: end ***/ + } + /*** Container: end ***/ + } +/*** module: end ***/ +} diff --git a/experimental/odp/sfc-of-renderer.yang b/experimental/odp/sfc-of-renderer.yang new file mode 100644 index 000000000..7f8865375 --- /dev/null +++ b/experimental/odp/sfc-of-renderer.yang @@ -0,0 +1,85 @@ +module sfc-of-renderer { + yang-version 1; + + namespace "urn:ericsson:params:xml:ns:yang:sfc-of-renderer"; + prefix "sfcofrenderer"; + + organization "Ericsson, Inc."; + contact "Brady Johnson "; + + revision 2015-11-23 { + description + "This module defines the SFC OpenFlow renderer configuration model."; + } + + import sfc-common { + prefix sfc-common; + revision-date 2015-10-17; + } + + container sfc-of-renderer-config { + description + "Configuration values for the SFC OpenFlow Renderer that are set + in config subsystem"; + + leaf sfc-of-table-offset { + description + "Used to offset pipeline to start at offset+1. Table0 is required. + This allows the end-user to configure where the SFC pipeline starts."; + type uint8; + } + + leaf sfc-of-app-egress-table-offset { + description + "When SFC co-exists with other applications on the same OpenFlow + switch, and the packets should be handed-off to the application + instead of egressing them, this is the OpenFlow table to send the + packets to for further processing."; + type uint8; + } + } + + grouping sfc-of-tables-entry { + leaf sff-name { + type sfc-common:sff-name; + description + "The service function forwarder name these tables are on"; + } + + leaf base-table { + type uint32; + } + leaf transport-ingress-table { + type uint32; + } + leaf path-mapper-table { + type uint32; + } + leaf path-mapper-acl-table { + type uint32; + } + leaf next-hop-table { + type uint32; + } + leaf transport-egress-table { + type uint32; + } + } + + // Simple DataObject used internally to specify SFF OpenFlow table + // offsets. To be used primarily to pass information from the SFC + // OpenFlow renderer to the sfc-statistics module. Since an SFF + // may be logical, or have application coexistence, its not always + // straight forward to obtain the table offsets. + // This information will not be written to the data store. + container sfc-of-table-offsets { + description + "Stores a list of the sfc openflow table offsets"; + + list sfc-of-tables-by-base-table { + key "sff-name"; + uses sfc-of-tables-entry; + } + } + +} diff --git a/experimental/odp/sfc-statistics-operations.yang b/experimental/odp/sfc-statistics-operations.yang new file mode 100644 index 000000000..403c20dd6 --- /dev/null +++ b/experimental/odp/sfc-statistics-operations.yang @@ -0,0 +1,99 @@ +module sfc-statistics-operations { + + namespace "urn:inocybe:params:xml:ns:yang:sfc-stats-ops"; + + prefix sfc-stats-ops; + + import service-statistics { + prefix sfc-ss; + revision-date 2014-07-01; + } + + organization "Inocybe, Inc."; + contact "Brady Johnson "; + + description + "This module contains RPC operations to collect SFC statistics"; + + revision 2017-12-15 { + description + "Initial Revision"; + } + + rpc get-rsp-statistics { + description + "Requests statistics for the specified Rendered Service Path"; + input { + leaf name { + type string; + description + "The name of the Rendered Service Path. Specifying all + will return statistics for all Rendered Service Paths."; + } + } + output { + list statistics { + leaf name { + type string; + description + "The name of the Rendered Service Path."; + } + uses sfc-ss:service-statistics-group { + description "Rendered Service Path statistics"; + } + } + } + } + + rpc get-sff-statistics { + description + "Requests statistics for the specified Service Function Forwarder"; + input { + leaf name { + type string; + description + "The name of the Service Function Forwarder. Specifying + all will return statistics for all Service Function + Forwarders."; + } + } + output { + list statistics { + leaf name { + type string; + description + "The name of the Service Function Forwarder."; + } + uses sfc-ss:service-statistics-group { + description "Service Function Forwarder statistics"; + } + } + } + } + + rpc get-sf-statistics { + description + "Requests statistics for the specified Service Function"; + input { + leaf name { + type string; + description + "The name of the Service Function. Specifying all will + return statistics for all Service Functions."; + } + } + output { + list statistics { + leaf name { + type string; + description + "The name of the Service Function."; + } + uses sfc-ss:service-statistics-group { + description "Service Function statistics"; + } + } + } + } + +} diff --git a/experimental/odp/sfc-vnfm-tacker-config.yang b/experimental/odp/sfc-vnfm-tacker-config.yang new file mode 100644 index 000000000..4c3d8b099 --- /dev/null +++ b/experimental/odp/sfc-vnfm-tacker-config.yang @@ -0,0 +1,48 @@ +module sfc-vnfm-tacker-config { + yang-version 1; + namespace "urn:opendaylight:sfc:vnfm:tacker:config"; + prefix "vnfm-tacker-config"; + + description + "This module contains the YANG configuration definitions for the SFC VNF MANAGER TACKER module."; + + revision "2017-07-24" { + description "Initial revision"; + } + + container vnfm-tacker-config { + description + "Configuration for SFC Vnfm Tacker setup"; + + leaf sfc-vnfm-tacker-name { + description + "This is the username used for authentication with tacker service."; + type string; + } + leaf sfc-vnfm-tacker-password { + description + "This is the password used for authentication with tacker service."; + type string; + } + leaf sfc-vnfm-uri { + description + "This is the URI used for communication with services."; + type string; + } + leaf sfc-vnfm-tacker-port { + description + "This is the port that Tacker uses for communication."; + type int32; + } + leaf sfc-vnfm-keystone-port { + description + "This is the port that Keystone uses for communication."; + type int32; + } + leaf sfc-vnfm-tacker-tenant { + description + "This is the tenant name used for tacker."; + type string; + } + } +} diff --git a/experimental/odp/shutdown-impl.yang b/experimental/odp/shutdown-impl.yang deleted file mode 100644 index 883735c0c..000000000 --- a/experimental/odp/shutdown-impl.yang +++ /dev/null @@ -1,71 +0,0 @@ -module shutdown-impl { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:shutdown:impl"; - prefix "shutdown-impl"; - - import shutdown { prefix shutdown; revision-date 2013-12-18; } - import config { prefix config; revision-date 2013-04-05; } - import rpc-context { prefix rpcx; revision-date 2013-06-17; } - - organization "Cisco Systems, Inc."; - - description - "This module contains the base YANG definitions for - shutdown implementation. - - Copyright (c)2013 Cisco Systems, Inc. All rights reserved.; - - This program and the accompanying materials are made available - under the terms of the Eclipse Public License v1.0 which - accompanies this distribution, and is available at - http://www.eclipse.org/legal/epl-v10.html"; - - revision "2013-12-18" { - description - "Initial revision."; - } - - identity shutdown { - base config:module-type; - config:provided-service shutdown:shutdown; - } - - augment "/config:modules/config:module/config:configuration" { - case shutdown { - when "/config:modules/config:module/config:type = 'shutdown'"; - leaf secret { - type string; - default ""; - } - } - } - - augment "/config:modules/config:module/config:state" { - case shutdown { - when "/config:modules/config:module/config:type = 'shutdown'"; - rpcx:rpc-context-instance "shutdown-rpc"; - } - } - - identity shutdown-rpc; - - rpc shutdown { - input { - uses rpcx:rpc-context-ref { - refine context-instance { - rpcx:rpc-context-instance shutdown-rpc; - } - } - leaf input-secret { - type string; - } - leaf max-wait-time { - type uint32; - description "Maximum time in milliseconds before process is forcibly exited. Zero or null cancels this functionality."; - } - leaf reason { - type string; - } - } - } -} diff --git a/experimental/odp/shutdown.yang b/experimental/odp/shutdown.yang deleted file mode 100644 index eb0917884..000000000 --- a/experimental/odp/shutdown.yang +++ /dev/null @@ -1,29 +0,0 @@ -module shutdown { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:shutdown"; - prefix "shutdown"; - - import config { prefix config; revision-date 2013-04-05; } - - description - "This module contains the base YANG definitions for - shutdown service. - - Copyright (c)2013 Cisco Systems, Inc. All rights reserved.; - - This program and the accompanying materials are made available - under the terms of the Eclipse Public License v1.0 which - accompanies this distribution, and is available at - http://www.eclipse.org/legal/epl-v10.html"; - - revision "2013-12-18" { - description - "Initial revision."; - } - - identity shutdown { - base "config:service-type"; - config:java-class "org.opendaylight.controller.config.shutdown.ShutdownService"; - } - -} diff --git a/experimental/odp/southbound.yang b/experimental/odp/southbound.yang new file mode 100644 index 000000000..183cb2890 --- /dev/null +++ b/experimental/odp/southbound.yang @@ -0,0 +1,9 @@ +module southbound { + yang-version 1; + namespace "urn:opendaylight:coe:southbound"; + prefix "coe"; + + revision "2017-01-24" { + description "Initial revision of coe model"; + } +} diff --git a/experimental/odp/srm-ops.yang b/experimental/odp/srm-ops.yang new file mode 100644 index 000000000..83b23914f --- /dev/null +++ b/experimental/odp/srm-ops.yang @@ -0,0 +1,50 @@ +module odl-srm-ops { + namespace "urn:opendaylight:serviceutils:srm:ops"; + prefix "srmops"; + + import odl-srm-types { + prefix srmtype; + } + + revision "2018-06-26" { + description "ODL Services Recovery Manager Operations Model"; + } + + /* Operations */ + + container service-ops { + config false; + list services { + key service-name; + leaf service-name { + type identityref { + base srmtype:entity-name-base; + } + } + list operations { + key entity-name; + leaf entity-name { + type identityref { + base srmtype:entity-name-base; + } + } + leaf entity-type { + type identityref { + base srmtype:entity-type-base; + } + } + leaf entity-id { + description "Optional when entity-type is service. Actual + id depends on entity-type and entity-name"; + type string; + } + leaf trigger-operation { + type identityref { + base srmtype:service-op-base; + } + } + } + } + } + +} diff --git a/experimental/odp/srm-rpcs.yang b/experimental/odp/srm-rpcs.yang new file mode 100644 index 000000000..c47898c8d --- /dev/null +++ b/experimental/odp/srm-rpcs.yang @@ -0,0 +1,109 @@ +module odl-srm-rpcs { + namespace "urn:opendaylight:serviceutils:srm:rpc"; + prefix "srmrpc"; + + import odl-srm-types { + prefix srmtype; + } + + revision "2018-06-26" { + description "ODL Services Recovery Manager Rpcs Module"; + } + + /* RPCs */ + + rpc reinstall { + description "Reinstall a given service"; + input { + leaf entity-name { + type identityref { + base srmtype:entity-name-base; + } + } + leaf entity-type { + description "Currently supported entity-types: + service"; + type identityref { + base srmtype:entity-type-base; + } + } + } + output { + leaf successful { + type boolean; + } + leaf message { + type string; + } + } + } + + + rpc recover { + description "Recover a given service or instance"; + input { + leaf entity-name { + type identityref { + base srmtype:entity-name-base; + } + } + leaf entity-type { + description "Currently supported entity-types: + service, instance"; + type identityref { + base srmtype:entity-type-base; + } + } + leaf entity-id { + description "Optional when entity-type is service. Actual + id depends on entity-type and entity-name"; + type string; + } + } + output { + leaf response { + type identityref { + base rpc-result-base; + } + } + leaf message { + type string; + } + } + } + + /* RPC RESULTs */ + + identity rpc-result-base { + description "Base identity for all SRM RPC Results"; + } + identity rpc-success { + description "RPC result successful"; + base rpc-result-base; + } + identity rpc-fail-op-not-supported { + description "RPC failed: + operation not supported for given parameters"; + base rpc-result-base; + } + identity rpc-fail-entity-type { + description "RPC failed: + invalid entity type"; + base rpc-result-base; + } + identity rpc-fail-entity-name { + description "RPC failed: + invalid entity name"; + base rpc-result-base; + } + identity rpc-fail-entity-id { + description "RPC failed: + invalid entity id"; + base rpc-result-base; + } + identity rpc-fail-unknown { + description "RPC failed: + reason not known, check message string for details"; + base rpc-result-base; + } +} \ No newline at end of file diff --git a/experimental/odp/srm-types.yang b/experimental/odp/srm-types.yang new file mode 100644 index 000000000..afd1f6014 --- /dev/null +++ b/experimental/odp/srm-types.yang @@ -0,0 +1,134 @@ +module odl-srm-types { + namespace "urn:opendaylight:serviceutils:srm:types"; + prefix "srmtypes"; + + revision "2018-06-26" { + description "ODL Services Recovery Manager Types Module"; + } + + /* Entity TYPEs */ + + identity entity-type-base { + description "Base identity for all srm entity types"; + } + identity entity-type-service { + description "SRM Entity type service"; + base entity-type-base; + } + identity entity-type-instance { + description "SRM Entity type instance"; + base entity-type-base; + } + + + /* Entity NAMEs */ + + /* Entity Type SERVICE names */ + identity entity-name-base { + description "Base identity for all srm entity names"; + } + identity genius-ifm { + description "SRM Entity name for IFM service"; + base entity-name-base; + } + identity genius-itm { + description "SRM Entity name for ITM service"; + base entity-name-base; + } + identity netvirt-vpn { + description "SRM Entity name for VPN service"; + base entity-name-base; + } + identity netvirt-elan { + description "SRM Entity name for elan service"; + base entity-name-base; + } + identity netvirt-l2gw { + description "SRM Entity name for l2gw service"; + base entity-name-base; + } + identity netvirt-dhcp { + description "SRM Entity name for dhcp service"; + base entity-name-base; + } + identity netvirt-acl { + description "SRM Entity name for ACL service"; + base entity-name-base; + } + identity ofplugin { + description "SRM Entity name for openflowplugin service"; + base entity-name-base; + } + identity netvirt-qos { + description "SRM Entity name for QoS service"; + base entity-name-base; + } + + + /* Entity Type INSTANCE Names */ + + /* Entity names supported by GENIUS */ + identity genius-itm-tep { + description "SRM Entity name for ITM's tep instance"; + base entity-name-base; + } + identity genius-itm-tz { + description "SRM Entity name for ITM's transportzone instance"; + base entity-name-base; + } + + identity genius-ifm-interface { + description "SRM Entity name for IFM's interface instance"; + base entity-name-base; + } + + /* Entity names supported by NETVIRT */ + identity netvirt-vpn-instance { + description "SRM Entity name for VPN instance"; + base entity-name-base; + } + + identity netvirt-elan-interface { + description "SRM Entity name for ELAN interface"; + base entity-name-base; + } + + identity netvirt-l2gw-connection { + description "SRM Entity name for l2gw connection"; + base entity-name-base; + } + + identity netvirt-l2gw-node { + description "SRM Entity name for l2gw device name"; + base entity-name-base; + } + + identity netvirt-qos-policy-instance { + description "SRM Entity name for QoS Policy instance"; + base entity-name-base; + } + + identity netvirt-acl-interface { + description "SRM Entity name for ACL interface"; + base entity-name-base; + } + + identity netvirt-acl-instance { + description "SRM Entity name for ACL instance"; + base entity-name-base; + } + + /* Service operations */ + identity service-op-base { + description "Base identity for all srm operations"; + } + identity service-op-reinstall { + description "Reinstall a service"; + base service-op-base; + } + identity service-op-recover { + description "Recover a service or instance"; + base service-op-base; + } + +} \ No newline at end of file diff --git a/experimental/odp/statistics-config.yang b/experimental/odp/statistics-config.yang new file mode 100644 index 000000000..42723c15e --- /dev/null +++ b/experimental/odp/statistics-config.yang @@ -0,0 +1,22 @@ +module statistics-config { + yang-version 1; + namespace "urn:opendaylight:netvirt:statistics:config"; + prefix "statistics-config"; + + description + "Configuration for statistics bundle"; + + revision "2017-03-26" { + description + "Initial revision"; + } + + container statistics-config { + config true; + leaf node-counter-result-timeout { + description "Timout for all ports statistics - in seconds"; + type uint16; + default 5; + } + } +} diff --git a/experimental/odp/statistics-manager-control.yang b/experimental/odp/statistics-manager-control.yang new file mode 100644 index 000000000..8c3d6899a --- /dev/null +++ b/experimental/odp/statistics-manager-control.yang @@ -0,0 +1,44 @@ +module statistics-manager-control { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:openflowplugin:sm:control"; + prefix "sm-control"; + + description + "Statistics manager control API"; + + revision "2015-08-12" { + description + "Initial proposal."; + } + + + typedef statistics-work-mode { + description "Statistics manager work modes."; + type enumeration { + enum COLLECT_ALL { + description "Default mode - all available statistics are being polled and processed"; + } + enum FULLY_DISABLED { + description "No statistics are being polled at all"; + } + } + } + + rpc change-statistics-work-mode { + description "Set statistics manager work mode"; + input { + leaf mode { + type statistics-work-mode; + } + } + } + + rpc get-statistics-work-mode { + description "Get statistics manager work mode"; + output { + leaf mode { + type statistics-work-mode; + } + } + } +} diff --git a/experimental/odp/statistics.yang b/experimental/odp/statistics.yang new file mode 100644 index 000000000..cc13d5a6d --- /dev/null +++ b/experimental/odp/statistics.yang @@ -0,0 +1,205 @@ +module statistics { + yang-version 1; + namespace "urn:opendaylight:netvirt:statistics"; + prefix "statistics"; + + revision "2017-01-20" { + description "Initial revision of statistics model"; + } + + grouping result { + list counterResult { + key id; + leaf id { + type string; + } + list groups { + key name; + leaf name { + type string; + } + list counters { + key name; + leaf name { + type string; + } + leaf value { + type uint64; + } + } + } + } + } + + grouping filters { + leaf-list groupFilters { + type string; + } + leaf-list counterFilter { + type string; + } + } + + grouping elementRequestData { + container filters { + + container tcpFilter { + leaf on { + type boolean; + } + leaf srcPort { + type int32; + default -1; + } + leaf dstPort { + type int32; + default -1; + } + } + + container udpFilter { + leaf on { + type boolean; + } + leaf dstPort { + type int32; + default -1; + } + leaf srcPort { + type int32; + default -1; + } + } + + container ipFilter { + leaf ip { + type string; + default ""; + } + } + } + } + + grouping counterRequestsConfig { + list counterRequests { + key "requestId"; + leaf requestId { + type string; + } + leaf portId { + type string; + } + leaf lportTag { + type int32; + } + leaf dpn { + type uint64; + } + leaf trafficDirection { + type string; + } + leaf generatedUniqueId { + type string; + } + uses elementRequestData; + } + } + + container ingressElementCountersRequestConfig { + uses counterRequestsConfig; + } + + container egressElementCountersRequestConfig { + uses counterRequestsConfig; + } + + rpc getNodeConnectorCounters { + input { + leaf portId { + type string; + } + uses filters; + } + output { + uses result; + } + } + + rpc getNodeCounters { + input { + leaf nodeId { + type uint64; + } + } + output { + uses result; + } + } + + rpc getNodeAggregatedCounters { + input { + leaf nodeId { + type uint64; + } + uses filters; + } + output { + uses result; + } + } + + rpc acquireElementCountersRequestHandler { + input { + leaf portId { + type string; + } + container incomingTraffic { + uses elementRequestData; + } + container outgoingTraffic { + uses elementRequestData; + } + uses filters; + } + output { + leaf incomingTrafficHandler { + type string; + } + leaf outcoingTrafficHandler { + type string; + } + } + } + + rpc releaseElementCountersRequestHandler { + input { + leaf handler { + type string; + } + } + output { + } + } + + rpc getElementCountersByHandler { + input { + leaf handler { + type string; + } + } + output { + uses result; + } + } + + rpc cleanAllElementCounterRequests { + input { + leaf portId { + type string; + default ""; + } + } + output { + } + } +} diff --git a/experimental/odp/subscribe-to-notification.yang b/experimental/odp/subscribe-to-notification.yang new file mode 100644 index 000000000..5fe7df70a --- /dev/null +++ b/experimental/odp/subscribe-to-notification.yang @@ -0,0 +1,18 @@ +module subscribe-to-notification { + + yang-version 1; + namespace "subscribe:to:notification"; + prefix "subs-to-notifi"; + + description + "Added input parameters to rpc create-data-change-event-subscription and to create-notification-stream"; + + revision "2016-10-28" { + } + + container "notifi"{ + leaf "location"{ + type string; + } + } +} diff --git a/experimental/odp/system-notifications.yang b/experimental/odp/system-notifications.yang new file mode 100644 index 000000000..5bd805c37 --- /dev/null +++ b/experimental/odp/system-notifications.yang @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + + module system-notifications { + namespace "urn:opendaylight:openflow:system"; + prefix "ofs"; + + revision "2013-09-27" { + description "#NOT_PUBLISHED# Model of system messages used in OpenFlow Protocol Library"; + } + + notification disconnect-event { + description "Disconnect notification"; + leaf info { + type string; + } + } + + notification switch-idle-event { + description "Switch-idle notification"; + leaf info { + type string; + } + } + +} \ No newline at end of file diff --git a/experimental/odp/table-management.yang b/experimental/odp/table-management.yang deleted file mode 100644 index 06edb04a0..000000000 --- a/experimental/odp/table-management.yang +++ /dev/null @@ -1,32 +0,0 @@ -module table-management { - namespace "urn:opendaylight:table:config"; - prefix table-cfg; - - import opendaylight-inventory {prefix inv;revision-date "2013-08-19";} - import opendaylight-table-types {prefix table;} - - revision "2013-10-24" { - description "Initial revision of table service"; - } - - grouping table-entry { - - leaf node { - type inv:node-ref; - } - - uses table:table-features; - } - - container tables { - list table { - key "id node"; - - leaf id { - type uint32; - } - - uses table-entry; - } - } -} diff --git a/experimental/odp/tailf-cli-extensions.yang b/experimental/odp/tailf-cli-extensions.yang new file mode 100644 index 000000000..764f8c0d3 --- /dev/null +++ b/experimental/odp/tailf-cli-extensions.yang @@ -0,0 +1,2611 @@ +submodule tailf-cli-extensions { + + belongs-to tailf-common { + prefix tailf; + } + + include tailf-meta-extensions { + revision-date 2013-11-07; + } + + organization "Tail-f Systems"; + + description + "This module defines all Tail-f YANG extensions statements + related to CLI customization. + + See also the 'display-' statements and the 'alt-name' statement + in tailf-common.yang."; + + revision 2015-03-19; + + extension cli-show-no { + tailf:use-in "leaf"; + tailf:use-in "list"; + tailf:use-in "leaf-list"; + tailf:use-in "refine"; + tailf:use-in "tailf:symlink"; + tailf:use-in "container"; + description + "Specifies that an optional leaf node or presence container + should be displayed as 'no ' when it does not exist. + For example, if a leaf 'shutdown' has this property and + does not exist, 'no shutdown' is displayed. + + Used in I- and C-style CLIs."; + } + + extension cli-disallow-value { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "refine"; + tailf:use-in "tailf:symlink"; + description + "Specifies that a pattern for invalid values. + + Used in I- and C-style CLIs."; + } + + extension cli-boolean-no { + tailf:use-in "typedef"; + tailf:use-in "leaf"; + tailf:use-in "refine"; + tailf:use-in "tailf:symlink"; + tailf:substatement "tailf:cli-reversed"; + description + "Specifies that a leaf of type boolean should be displayed as + '' if set to true, and 'no ' if set to + false. + + Cannot be used in conjunction with tailf:cli-hide-in-submode + or tailf:cli-compact-syntax. + + Used in I- and C-style CLIs."; + } + + extension cli-reversed { + tailf:use-in "tailf:cli-boolean-no"; + description + "Specified that true should be displayed as 'no ' and + false as 'name'. + + Used in I- and C-style CLIs."; + } + + extension cli-autowizard { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies that the autowizard should include this leaf even + if the leaf is optional. + + One use case is when implementing pre-configuration of devices. + A config false node can be defined for showing if the + configuration is active or not (preconfigured). + + Used in J-, I- and C-style CLIs."; + } + + extension cli-show-config { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + tailf:use-in "tailf:symlink"; + description + "Specifies that the node will be included when doing a 'show + running-configuration', even if it is a non-config node. + + Used in I- and C-style CLIs."; + } + + + extension cli-display-empty-config { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies that the node will be included when doing a 'show + stats', even if it is a non-config node, provided + that the list contains at least one non-config node. + + Used in J-style CLI."; + } + + extension cli-mode-name { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies a custom mode name, instead of the default which is the + name of the list or container node. + + Can be used in config nodes only. If used in a container, the + container must also have a tailf:cli-add-mode statement, and if + used in a list, the list must not also have a + tailf:cli-suppress-mode statement. + + Variables for the list keys in the current mode are available. + For examples, 'config-foo-xx$(name)' (privided the key leaf + is called 'name'). + + Used in I- and C-style CLIs."; + } + + extension cli-show-order-taglist { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies a custom display order for nodes with the + tailf:cli-show-order-tag attribute. Nodes will be displayed + in the order indicated in the list. Nodes without a tag will + be displayed after all nodes with a tag have been displayed. + + The scope of a taglist is until a new taglist is encountered. + + Used in I- and C-style CLIs."; + } + + extension cli-show-order-tag { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies a custom display order for nodes with the + tailf:cli-show-order-tag attribute. Nodes will be displayed + in the order indicated by a cli-show-order-taglist attribute in + a parent node. + + The scope of a tag reaches until a new taglist is encountered. + + Used in I- and C-style CLIs."; + } + + extension cli-mode-name-actionpoint { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "refine"; + description + "Specifies that a custom function will be invoked to find out the mode + name, instead of using the default with is the name of the list + or container node. + + The argument is the name of an actionpoint, which must be + implemented by custom code. In the actionpoint, the command() + callback function will be invoked, and it must return a string + with the mode name. See confd_lib_dp(3) for details. + + Can be used in config nodes only. If used in a container, the + container must also have a tailf:cli-add-mode statement, and if + used in a list, the list must not also have a + tailf:cli-suppress-mode statement. + + Used in I- and C-style CLIs."; + } + + extension cli-add-mode { + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Creates a mode of the container. + + Can be used in config nodes only. + + Used in I- and C-style CLIs."; + } + + extension cli-flatten-container { + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Allows the CLI to exit the container and continue to input + from the parent container when all leaves in the current + container has been set. + + Can be used in config nodes only. + + Used in I- and C-style CLIs."; + } + + extension cli-suppress-mode { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Instructs the CLI engine to not make a mode of the list node. + + Can be used in config nodes only. + + Used in I- and C-style CLIs."; + } + + extension cli-delete-when-empty { + tailf:use-in "list"; + tailf:use-in "container"; + description + "Instructs the CLI engine to delete the list when the last list + instance is deleted'. Requires that cli-suppress-mode is set. + + The behavior is recursive. If all optional leafs in a list + instance are deleted the list instance itself is deleted. If + that list instance happens to be the last list instance in a + list it is also deleted. And so on. Used in I- and C-style + CLIs."; + } + + extension cli-remove-before-change { + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Instructs the CLI engine to generate a no-commnd before + modifying an existing instance. It only applies when + generating diffs, eg 'show configuration' in C-style."; + } + + extension cli-no-value-on-delete { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "When displaying the deleted version of this leaf do not + include the old value. + + Applies to C-style"; + } + + extension cli-no-name-on-delete { + tailf:use-in "leaf"; + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "When displaying the deleted version of this element do not + include the name. + + Applies to C-style"; + } + + extension cli-embed-no-on-delete { + tailf:use-in "leaf"; + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Embed no in front of the element name insead of at the + beginning of the line. + + Applies to C-style"; + } + + extension cli-recursive-delete { + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "When generating configuration diffs delete all contents + of a container or list before deleting the node. + + Applies to C-style"; + } + + + extension cli-diff-dependency { + argument path { + tailf:arg-type { + type string; + } + } + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:xpath-root"; + tailf:substatement "tailf:cli-trigger-on-set"; + tailf:substatement "tailf:cli-trigger-on-delete"; + tailf:substatement "tailf:cli-trigger-on-all"; + tailf:occurence "*"; + description + "Tells the 'show configuration' command, and the diff generator + that this node depends on another node. When removing the node + with this declaration, it should be removed before the node + it depends on is removed, ie the declaration controlls the ordering + of the commands in the 'show configuration' output. + + Applies to C-style"; + } + + extension cli-trigger-on-set { + tailf:use-in "tailf:cli-diff-dependency"; + description + 'Specify that the dependency should trigger on set/modify of + the target path, but deletion of the target will trigger the + current node to be placed in front of the target. + + The annotation can be used to get the diff behavior where + one leaf is first deleted before the other leaf is set. + For example, having the data model below: + + container X { + leaf A { + tailf:cli-diff-dependency "../B" { + tailf:cli-trigger-on-set; + } + type empty; + } + leaf B { + tailf:cli-diff-dependency "../A" { + tailf:cli-trigger-on-set; + } + type empty; + } + } + + produces the following diffs when setting one leaf + and deleting the other + + no X A + X B + + and + + no X B + X A + + this can also be done with list instances, for example + + list a { + key id; + + leaf id { + tailf:cli-diff-dependency "/c[id=current()/../id]" { + tailf:cli-trigger-on-set; + } + type string; + } + } + + list c { + key id; + leaf id { + tailf:cli-diff-dependency "/a[id=current()/../id]" { + tailf:cli-trigger-on-set; + } + type string; + } + } + + we get + + no a foo + c foo + ! + + and + + no c foo + a foo + ! + + In the above case if we have the same id in list "a" and "c" + and we delete the instance in one list, and add it in the other, + then the deletion will always preceed the create. + '; + } + + extension cli-trigger-on-delete { + tailf:use-in "tailf:cli-diff-dependency"; + description + "This annotation can be used togeter with tailf:cli-trigger-on-set + to also get the behavior that when deleting the target display + changes to this node first. For exmaple: + + container settings { + tailf:cli-add-mode; + + leaf opmode { + tailf:cli-no-value-on-delete; + + type enumeration { + enum nat; + enum transparent; + } + } + + leaf manageip { + when \"../opmode = 'transparent'\"; + mandatory true; + tailf:cli-no-value-on-delete; + tailf:cli-diff-dependency '../opmode' { + tailf:cli-trigger-on-set; + tailf:cli-trigger-on-delete; + } + + type string; + } + } + + What we are trying to achieve here is that if manageip is + deleted, it should be displayed before opmode, but if we + configure both opmode and manageip, we should display opmode + first, ie get the diffs: + + settings + opmode transparent + manageip 1.1.1.1 + ! + + and + + settings + no manageip + opmode nat + ! + + and + + settings + no manageip + no opmode + ! + + The cli-trigger-on-set annotation will cause the 'no manageip' + command to be displayed before setting opmode. The + tailf:cli-trigger-on-delete will cause 'no manageip' to be + placed before 'no opmode' when both are deleted. + + In the first diff where both are created, opmode will come first + due to the diff-dependency setting, regardless of the + cli-trigger-on-delete and cli-trigger-on-set. + "; + + } + + + extension cli-trigger-on-all { + tailf:use-in "tailf:cli-diff-dependency"; + description + "Specify that the dependency should always trigger. It is the + same as placing one element before another in the data model. + For example, given the data model: + + container X { + leaf A { + tailf:cli-diff-dependency '../B' { + tailf:cli-trigger-on-all; + } + type empty; + } + leaf B { + type empty; + } + } + + We get the diffs + + X B + X A + + and + + no X B + no X A + "; + } + + + extension cli-ignore-modified { + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Tells the cdb_cli_diff_iterate system call to not generate + a CLI string when this container is modified. The string will + instead be generated for the modified sub-element. + + Applies to C-style and I-style"; + } + + extension cli-show-long-obu-diffs { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Instructs the CLI engine to not generate 'insert' comments + when displaying configuration changes of ordered-by user + lists, but instead explicitly remove old instances with 'no' + and then add the instances following a newly inserted instance. + Should not be used together with tailf:cli-show-obu-comments"; + } + + extension cli-show-obu-comments { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Enforces the CLI engine to generate 'insert' comments + when displaying configuration changes of ordered-by user + lists. Should not be used together with tailf:cli-show-long-obu-diffs"; + } + + extension cli-allow-join-with-key { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-display-joined"; + description + "Indicates that the list name may be written together + with the first key, without requiring a whitespace + in between, ie allowing both + interface ethernet1/1 + and + interface ethernet 1/1 + + Used in I- and C-style CLIs."; + } + + extension cli-allow-join-with-value { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-display-joined"; + description + "Indicates that the leaf name may be written together + with the value, without requiring a whitespace + in between, ie allowing both + interface ethernet1/1 + and + interface ethernet 1/1 + + Used in I- and C-style CLIs."; + } + + + extension cli-display-joined { + tailf:use-in "tailf:cli-allow-join-with-key"; + tailf:use-in "tailf:cli-allow-join-with-value"; + description + "Specifies that the joined version should be used when displaying + the configuration in C- and I- mode."; + } + + extension cli-exit-command { + argument value { + yin-element true; + tailf:arg-type { + type string; + } + } + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + tailf:use-in "tailf:symlink"; + tailf:substatement "tailf:info"; + description + "Tells the CLI to add an explicit exit-from-submode command. + The tailf:info substatement can be used for adding a custom + info text for the command. + + Used in I- and C-style CLIs."; + } + + extension cli-explicit-exit { + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + tailf:use-in "tailf:symlink"; + description + "Tells the CLI to add an explicit exit command when displaying + the configuration. It will not be added if cli-exit-command + is defined as well. The annotation is inherited by all + sub-modes. + + Used in I- and C-style CLIs."; + } + + + extension cli-key-format { + argument value { + yin-element true; + tailf:arg-type { + type string; + } + } + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "The format string is used when parsing a key value and when + generating a key value for an existing configuration. The key + items are numbered from 1-N and the format string should + indicate how they are related by using $(X) (where X is the + key number). For example: + + tailf:cli-key-format '$(1)-$(2)' means that the first key + item is concatenated with the second key item by a '-'. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-suppress-key-sort { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Instructs the CLI engine to not sort the keys in alphabetical order + when presenting them to the user during TAB completion. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-suppress-table { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Instructs the CLI engine to not print the list as a table in + the 'show' command. + + Can be used in non-config nodes only. + + Used in I- and C-style CLIs."; + } + + extension cli-suppress-validation-warning-prompt { + tailf:use-in "list"; + tailf:use-in "leaf"; + tailf:use-in "container"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Instructs the CLI engine to not prompt the user whether to proceed + or not if a warning is generated for this node. + + Used in I- and C-style CLIs."; + } + + + extension cli-suppress-key-abbreviation { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Key values cannot be abbreviated. The user must always give + complete values for keys. + + In the J-style CLI this is relevant when using the commands + 'delete' and 'edit'. + + In the I- and C-style CLIs this is relevant when using the + commands 'no', 'show configuration' and for commands to enter + submodes. + + See also /confdConfig/cli/allowAbbrevKeys in confd.conf(5)."; + } + + extension cli-allow-key-abbreviation { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Key values can be abbreviated. + + In the J-style CLI this is relevant when using the commands + 'delete' and 'edit'. + + In the I- and C-style CLIs this is relevant when using the + commands 'no', 'show configuration' and for commands to enter + submodes. + + See also /confdConfig/cli/allowAbbrevKeys in confd.conf(5)."; + } + + extension cli-table-legend { + argument value { + yin-element true; + tailf:arg-type { + type string; + } + } + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies a template string to be printed before all list entries are + printed. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-table-footer { + argument value { + yin-element true; + tailf:arg-type { + type string; + } + } + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies a template string to be printed after all list entries are + printed. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-completion-actionpoint { + argument value { + tailf:arg-type { + type tailf:identifier; + } + } + tailf:use-in "leaf-list"; + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-completion-id"; + description + "Specifies that completion for the leaf values is done through a + callback function. + + The argument is the name of an actionpoint, which must be + implemented by custom code. In the actionpoint, the completion() + callback function will be invoked. See confd_lib_dp(3) for details. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-completion-id { + argument value { + tailf:arg-type { + type tailf:identifier; + } + } + tailf:use-in "tailf:cli-completion-actionpoint"; + tailf:use-in "tailf:cli-custom-range-actionpoint"; + description + "Specifies a string which is passed to the callback when invoked. + This makes it possible to use the same callback at several + locations and still keep track of which point it is invoked + from."; + } + + extension cli-allow-caching { + tailf:use-in "tailf:cli-custom-range-actionpoint"; + tailf:use-in "tailf:cli-custom-range-enumerator"; + description + "Allow caching of the evaluation results between different parent paths."; + } + + extension cli-multi-line-prompt { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Tells the CLI to automatically enter multi-line mode when prompting + the user for a value to this leaf. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-multi-word-key { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-max-words"; + description + "Specifies that the key should allow multiple tokens for the + value. Proper type restrictions needs to be used to limit + the range of the leaf value. + + Can be used in key leafs only. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-max-words { + argument value { + tailf:arg-type { + type uint32; + } + } + tailf:use-in "tailf:cli-multi-word-key"; + tailf:use-in "tailf:cli-multi-word"; + tailf:use-in "tailf:cli-multi-value"; + description + "Specifies the maximum number of allowed words for the key or value."; + } + + extension cli-allow-range { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Means that the non-integer key should allow range expressions. + + Can be used in key leafs only. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-range-delimiters { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Allows for custom delimiters to be defined for range expressions. + By default only / is considered a delimiter, ie when processing + a key like 1/2/3 then each of 1, 2 and 3 will be matched separately + agains range expressions, ie given the expression 1-3/5-6/7,8 + 1 will be matched with 1-3, 2 with 5-6, and 3 with 7,8. If, for + example, the delimiters value is set to '/.' then both '/' and + '.' will be considered delimiters and an key such as 1/2/3.4 will + consist of the enteties 1,2,3,4, all matched separately. + + Used in J-, I- and C-style CLIs."; + } + + + extension cli-suppress-range { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Means that the integer key should not allow range expressions. + + Can be used in key leafs only. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-custom-range { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-range-type" { + tailf:occurence "1"; + } + description + "Specifies that the key should support ranges. A type matching the + range expression must be supplied. + + Can be used in key leafs only. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-custom-range-actionpoint { + argument value { + tailf:arg-type { + type tailf:identifier; + } + } + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-completion-id"; + tailf:substatement "tailf:cli-allow-caching"; + description + "Specifies that the list supports range expressions and that a custom + function will be invoked to determine if an instance belong in + the range or not. At least one key element needs a + cli-custom-range statement. + + The argument is the name of an actionpoint, which must be + implemented by custom code. In the actionpoint, the + completion() callback function will be invoked. See + confd_lib_dp(3) for details. + + When a range expression value which matches the type is given in + the CLI, the CLI engine will invoke the callback with each + existing list entry instance. If the callback returns CONFD_OK, + it matches the range expression, and if it returns CONFD_ERR, it + doesn't match. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-custom-range-enumerator { + argument value { + tailf:arg-type { + type tailf:identifier; + } + } + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-completion-id"; + tailf:substatement "tailf:cli-allow-caching"; + description + "Specifies a callback to invoke to get an array of + instances matching a regular expression. This is used + when instances should be allowed to be created using + a range expression in set. + + The callback is not used for delete or show operations. + + The callback is allowed to return a superset of all matching + instances since the instances will be filtered using the + range expression afterwards. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-range-type { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "tailf:cli-custom-range"; + description + "This statement contains the name of a derived type, possibly + with a prefix. If no prefix is given, the type must be defined in + the local module. For example: + + cli-range-type p:my-range-type; + + All range expressions must match this type, and a valid key + value must not match this type."; + } + + extension cli-allow-wildcard { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Means that the list allows wildcard expressions in the 'show' pattern. + + See also /confdConfig/cli/allowWildcard in confd.conf(5). + + Used in J-, I- and C-style CLIs."; + } + + extension cli-suppress-wildcard { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Means that the list does not allow wildcard expressions in the 'show' + pattern. + + See also /confdConfig/cli/allowWildcard in confd.conf(5). + + Used in J-, I- and C-style CLIs."; + } + + extension cli-configure-mode { + tailf:use-in "tailf:action"; + tailf:use-in "rpc"; + description + "An action or rpc with this attribute will be available in + configure mode, but not in operational mode. + + The default is that the action or rpc is available in both + configure and operational mode. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-operational-mode { + tailf:use-in "tailf:action"; + tailf:use-in "rpc"; + description + "An action or rpc with this attribute will be available in + operational mode, but not in configure mode. + + The default is that the action or rpc is available in both + configure and operational mode. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-mount-point { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "tailf:action"; + tailf:use-in "rpc"; + description + "By default actions are mounted under the 'request' + command in the J-style CLI and at the top-level in + the I- and C-style CLIs. This annotation allowes + the action to be mounted under other top level commands"; + } + + extension cli-batch-confirm-default { + argument name { + tailf:arg-type { + type boolean; + } + } + tailf:use-in "tailf:confirm-text"; + description + "Specifies if the default is to proceed or abort the action during batch + processing in the CLI (e.g. non-interactive mode) when a confirm-text is + set. If this value is not specified, the default value may instead be + provdied by tailf:confirm-default or by the ConfD global default if + specified in a clispec(5)."; + } + + extension cli-delayed-auto-commit { + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Enables transactions while in a specific submode (or submode of that + mode). The modifications performed in that mode will not take effect + until the user exits that submode. + + Can be used in config nodes only. If used in a container, the + container must also have a tailf:cli-add-mode statement, and if + used in a list, the list must not also have a + tailf:cli-suppress-mode statement. + + Used in I- and C-style CLIs."; + } + + extension cli-preformatted { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Suppresses quoting of non-config elements when displaying them. + Newlines will be preserved in strings etc. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-disabled-info { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies an info string that will be used as a descriptive text for the + value 'disable' (false) of boolean-typed leafs when the confd.conf(5) + setting /confdConfig/cli/useShortEnabled is set to 'true'. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-suppress-shortenabled { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Suppresses the confd.conf(5) setting /confdConfig/cli/useShortEnabled. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-trim-default { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Do not display value if it is same as default. + + Used in I- and C-style CLIs."; + } + + extension cli-expose-key-name { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Force the user to enter the name of the key and display the + key name when displaying the running-configuration. + + Used in J-, I- and C-style CLIs."; + } + + + extension cli-enforce-table { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Forces the generation of a table for a list element node regardless of + whether the table will be too wide or not. This applies to the + tables generated by the auto-rendred show commands for non-config data. + + Used in I- and C-style CLIs."; + } + + extension cli-drop-node-name { + tailf:use-in "leaf"; + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies that the name of a node is not present in the CLI. + + If tailf:cli-drop-node-name is given on a child to a list node, + we recommend that you also use tailf:cli-suppress-mode on that + list node, otherwise the CLI will be very confusing. + + For example, consider this data model, from the tailf-aaa module: + + list alias { + key name; + leaf name { + type string; + } + leaf expansion { + type string; + mandatory true; + tailf:cli-drop-node-name; + } + } + + If you type 'alias foo' in the CLI, you would end up in the + 'alias' submode. But since the expansion is dropped, you would + end up specifying the expansion value without typing any command. + + If, on the other hand, the 'alias' list had a + tailf:cli-suppress-mode statement, you would set an expansion + 'bar' by typing 'alias foo bar'. + + tailf:cli-drop-node-name cannot be used inside tailf:action. + + Used in I- and C-style CLIs."; + } + + extension cli-no-keyword { + tailf:use-in "leaf"; + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies that the name of a node is not present in the CLI. + + + Note that is must be used with some care, just + like tailf:cli-drop-node-name. The resulting data model must still + be possible to parse deterministically. + For example, consider the data model + + container interfaces { + list traffic { + tailf:cli-no-keyword; + key id; + leaf id { type string; } + leaf mtu { type uint16; } + } + list management { + tailf:cli-no-keyword; + key id; + leaf id { type string; } + leaf mtu { type uint16; } + } + } + + In this case it is impossible to determine if the config + + interfaces { + eth0 { + mtu 1400; + } + } + + Means that there should be an traffic interface instance named + 'eth0' or a management interface instance maned 'eth0'. If, on + the other hand, a restriction on the type was used, for example + + container interfaces { + list traffic { + tailf:cli-no-keyword; + key id; + leaf id { type string; pattern 'eth.*'; } + leaf mtu { type uint16; } + } + list management { + tailf:cli-no-keyword; + key id; + leaf id { type string; pattern 'lo.*';} + leaf mtu { type uint16; } + } + } + + then the problem would disappear. + + Used in the J-style CLIs."; + } + + extension cli-compact-syntax { + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Instructs the CLI engine to use the compact representation for this + node in the 'show running-configuration' command. The compact + representation means that all leaf elements are shown on a + single line. + + Cannot be used in conjunction with tailf:cli-boolean-no. + + Used in I- and C-style CLIs."; + } + + extension cli-compact-stats { + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-wrap"; + tailf:substatement "tailf:cli-width"; + tailf:substatement "tailf:cli-delimiter"; + tailf:substatement "tailf:cli-prettify"; + tailf:substatement "tailf:cli-spacer"; + description + "Instructs the CLI engine to use the compact representation for this + node. The compact representation means that all leaf elements + are shown on a single line. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-wrap { + tailf:use-in "tailf:cli-compact-stats"; + description + "If present, the line will be wrapped at screen width."; + } + + extension cli-width { + argument value { + tailf:arg-type { + type uint32; + } + } + tailf:use-in "tailf:cli-compact-stats"; + description + "Specifies a fixed terminal width to use before wrapping line. It is + only used when tailf:cli-wrap is present. If a width is not + specified the line is wrapped when the terminal width is + reached."; + } + + extension cli-delimiter { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "tailf:cli-compact-stats"; + description + "Specifies a string to print between the leaf name and its value + when displaying leaf values."; + } + + extension cli-prettify { + tailf:use-in "tailf:cli-compact-stats"; + description + "If present, dashes (-) and underscores (_) in leaf names are replaced + with spaces."; + } + + extension cli-spacer { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "tailf:cli-compact-stats"; + description + "Specifies a string to print between the nodes."; + } + + + extension cli-column-stats { + tailf:use-in "container"; + tailf:use-in "refine"; + tailf:use-in "tailf:symlink"; + description + "Display leafs in the container as columns, i.e., do not repeat + the name of the container on each line, but instead indent each + leaf under the container. + + Used in I- and C-style CLIs."; + } + + extension cli-column-width { + argument value { + tailf:arg-type { + type uint32; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Set a fixed width for the column in the auto-rendered tables. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-min-column-width { + argument value { + tailf:arg-type { + type uint32; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Set a minimum width for the column in the auto-rendered tables. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-column-align { + argument value { + tailf:arg-type { + type enumeration { + enum left; + enum center; + enum right; + } + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies the alignment of the data in the column in the + auto-rendered tables. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-list-syntax { + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-multi-word"; + description + "Specifies that each entry in a leaf-list should be displayed as + a separate element. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-multi-word { + tailf:use-in "tailf:cli-list-syntax"; + tailf:substatement "tailf:cli-max-words"; + description + "Specifies that a multi-word value may be entered without quotes."; + } + + extension cli-flat-list-syntax { + tailf:use-in "leaf-list"; + tailf:substatement "tailf:cli-replace-all"; + tailf:use-in "refine"; + description + "Specifies that elements in a leaf-list should be entered without + surrounding brackets. Also, multiple elements can be added to a list + or deleted from a list. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-replace-all { + tailf:use-in "leaf-list"; + tailf:use-in "tailf:cli-flat-list-syntax"; + tailf:use-in "refine"; + description + "Specifies that the new leaf-list value(s) should replace the old, + as opposed to be added to the old leaf-list."; + } + + extension cli-range-list-syntax { + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "refine"; + description + "Specifies that elements in a leaf-list or a list should be entered + without surrounding brackets and presented as ranges. The + element in the list should be separated by a comma. For + example: + + vlan 1,3,10-20,30,32,300-310 + + When this statement is used for lists, the list must have a + single key. The elements are be presented as ranges as above. + + The type of the list key, or the leaf-list, must be integer based. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-incomplete-command { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "Specifies that an auto-rendered command should be considered + incomplete. Can be used to prevent from appearing in + the completion list for optional internal nodes, for example, or + to ensure that the user enters all leaf values in a container + (if used in combination with cli-sequence-commands). + + Used in I- and C-style CLIs."; + } + + extension cli-full-command { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "Specifies that an auto-rendered command should be considered complete, + ie, no additional leaves or containers can be entered on the same + command line. + + Used in I- and C-style CLIs."; + } + + extension cli-sequence-commands { + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-reset-siblings"; + tailf:substatement "tailf:cli-reset-all-siblings"; + description + "Specifies that an auto-rendered command should only accept arguments + in the same order as they are specified in the YANG model. + This, in combination with tailf:cli-drop-node-name, can be used + to create CLI commands for setting multiple leafs in a container + without having to specify the leaf names. + + In almost all cases this annotation should be accompanied by the + tailf:cli-compact-syntax annotation. Otherwise the output from + 'show running-config' will not be correct, and the sequence + 'save xx' 'load override xx' will not work. + + Used in I- and C-style CLIs."; + } + + extension cli-reset-siblings { + tailf:use-in "tailf:cli-sequence-commands"; + description + "Specifies that all sibling leaves in the sequence should be reset + whenever the first leaf in the sequence is set."; + } + + extension cli-reset-all-siblings { + tailf:use-in "tailf:cli-sequence-commands"; + description + "Specifies that all sibling leaves in the container should be reset + whenever the first leaf in the sequence is set."; + } + + extension cli-reset-container { + tailf:use-in "leaf"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies that all sibling leaves in the container should be + reset when this element is set. + + When used on a container its content is cleared when set."; + } + + extension cli-display-separated { + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Tells CLI engine to display this container as a separate + line item even when it has children. Only applies to + presence containers. + + Applicable for optional containers in the C- and I- style CLIs."; + } + + extension cli-delete-container-on-delete { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies that the parent container should be deleted when +. this leaf is deleted."; + } + + extension cli-break-sequence-commands { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "Specifies that previous cli-sequence-command declaration should + stop at this point. Only applicable when a cli-sequence-command + declaration has been used in the parent container. + + Used in I- and C-style CLIs."; + } + + extension cli-strict-leafref { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies that the leaf should only be allowed to be assigned + references to existing instances when the command is executed. + Without this annotation the requirement is that the instance + exists on commit time. + + Used in I- and C-style CLIs."; + } + + extension cli-optional-in-sequence { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "Specifies that this element is optional in the sequence. If it + is set it must be set in the right sequence but may be skipped. + + Used in I- and C-style CLIs."; + } + + extension cli-incomplete-show-path { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-min-keys"; + description + "Specifies that a path to the show command is considered incomplete, + i.e., it needs more elements added to the path. It can also be used + to specify a minimum number of keys to be given for lists. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-min-keys { + argument value { + tailf:arg-type { + type uint32; + } + } + tailf:use-in "tailf:cli-incomplete-show-path"; + description + "Specifies the minimum number of required keys for the show command."; + } + + extension cli-hide-in-submode { + tailf:use-in "leaf"; + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Hide leaf when submode has been entered. Mostly useful when + leaf has to be entered in order to enter a submode. Also works + for flattened containers. + + Cannot be used in conjunction with tailf:cli-boolean-no. + + Used in I- and C-style CLIs."; + } + + extension cli-expose-ns-prefix { + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "When used force the CLI to display namespace prefix of all children."; + } + + extension cli-prefix-key { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:use-in "leaf-list"; + tailf:substatement "tailf:cli-before-key"; + description + "This leaf has to be given as a prefix before entering the actual + list keys. Very backwards but a construct that exists in some + Cisco CLIs. + + The construct can be used also for leaf-lists but only when + then tailf:cli-range-list-syntax is also used. + + Used in I- and C-style CLIs."; + } + + extension cli-before-key { + argument value { + tailf:arg-type { + type uint32; + } + } + tailf:use-in "tailf:cli-prefix-key"; + description + "Specifies before which key the prefix element should be inserted. + The first key has number 1."; + } + + extension cli-show-with-default { + tailf:use-in "leaf"; + tailf:use-in "refine"; + tailf:use-in "tailf:symlink"; + description + "This leaf will be displayed even when it has its default value. + Note that this will somewhat result in a slightly different behaviour + when you save a config and then load it again. With this setting + in place a leaf that has not been configured will be configured + after the load. + + Used in I- and C-style CLIs."; + } + + extension cli-oper-info { + argument text { + yin-element true; + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "rpc"; + tailf:use-in "identity"; + tailf:use-in "tailf:action"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "This statement works exactly as tailf:info, with the exception + that it is used when displaying the element info in the context + of stats. + + Both tailf:info and tailf:cli-oper-info can be present at the same + time."; + } + + extension cli-case-sensitive { + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "leaf"; + description + "Specifies that this node is case-sensitive. + If applied to a container or a list, any nodes below will + also be case-sensitive. + + Note that this will override any case-sensitivity settings + configured in confd.conf"; + } + + extension cli-case-insensitive { + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "leaf"; + description + "Specifies that node is case-insensitive. + If applied to a container or a list, any nodes below will + also be case-insensitive. + + Note that this will override any case-insensitivity settings + configured in confd.conf"; + } + + extension cli-custom-error { + argument text { + yin-element true; + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "This statement specifies a custom error message to be displayed + when the user enters an invalid value."; + } + + extension cli-full-show-path { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-max-keys"; + description + "Specifies that a path to the show command is considered complete, i.e., + no more elements can be added to the path. It can also be used to + specify a maximum number of keys to be given for lists. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-max-keys { + argument value { + tailf:arg-type { + type uint32; + } + } + tailf:use-in "tailf:cli-full-show-path"; + description + "Specifies the maximum number of allowed keys for the show command."; + } + + extension cli-suppress-show-path { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "Specifies that the show command cannot be invoked with the path, + ie the path is suppressed when auto-rendering show commands for + config='false' data. + + Used in J-, I- and C-style CLIs."; + } + + + extension cli-suppress-show-match { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "Specifies that a specific completion match (i.e., a filter match that + appear at list nodes as an alternative to specifying a single + instance) to the show command should not be available. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-suppress-list-no { + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies that the CLI should not accept deletion of the entire list + or leaf-list. Only specific instances should be deletable not the + entire list in one command. ie, 'no foo ' should be allowed + but not 'no foo'. + + Used in I- and C-style CLIs."; + } + + extension cli-suppress-no { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "Specifies that the CLI should not auto-render 'no' commands for + this element. An element with this annotation will not appear in the + completion list to the 'no' command. + + Used in I- and C-style CLIs."; + } + + extension cli-suppress-silent-no { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "Specifies that the confd.cnof directive cSilentNo should be + suppressed for a leaf and that a custom error message should + be displayed when the user attempts to delete a non-existing + element. + + Used in I- and C-style CLIs."; + } + + + extension cli-full-no { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "Specifies that an auto-rendered 'no'-command should be considered complete, + ie, no additional leaves or containers can be entered on the same + command line. + + Used in I- and C-style CLIs."; + } + + extension cli-incomplete-no { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies that an auto-rendered 'no'-command should not be considered + complete, ie, additional leaves or containers must be entered on the same + command line. + + Used in I- and C-style CLIs."; + } + + extension cli-no-match-completion { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies that the CLI engine should not provide match completion + for the key leafs in the list. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-suppress-show-conf-path { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies that the show running-config command cannot be invoked with + the path, ie the path is suppressed when auto-rendering show running- + config commands for config='true' data. + + Used in J-, I- and C-style CLIs."; + } + + + extension cli-no-key-completion { + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies that the CLI engine should not perform completion for key + leafs in the list. This is to avoid querying the data provider + for all existing keys. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-instance-info-leafs { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "This statement is used to specifiy how list entries are displayed + when doing completion in the CLI. By default, a list entry is + displayed by listing its key values, and the value of a leaf + called 'description', if such a leaf exists in the list entry. + + The 'cli-instance-info-leafs' statement takes as its argument a + space separated string of leaf names. When a list entry is + displayed, the values of these leafs are concatenated with a + space character as separator and shown to the user. + + For example, when asked to specify an interface the CLI will + display a list of possible interface instances, say 1 2 3 4. If + the cli-instance-info-leafs property is set to 'description' then + the CLI might show: + + Possible completions: + 1 - internet + 2 - lab + 3 - dmz + 4 - wlan + + Used in J-, I- and C-style CLIs."; + } + + extension cli-multi-value { + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-max-words"; + description + "Specifies that all remaining tokens on the command line + should be considered a value for this leaf. This prevents + the need for quoting values containing spaces, but also + prevents multiple leaves from being set on the same command + line once a multi-value leaf has been given on a line. + + If the tailf:cli-max-words substatements is used then + additional leaves may be entered. + + Used in I- and C-style CLIs."; + } + + extension cli-value-display-template { + argument value { + yin-element true; + tailf:arg-type { + type tailf:cli-template-string; + } + } + tailf:use-in "leaf"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies a template string to be used when formating the + value of a leaf for display. Note that other leaves cannot + be referenced from a display template of one leaf. The only + value accessible is the leaf's own value, accessed through + $(.). + + See the defintion of cli-template-string for more info. + + Used in J-, I- and C-style CLIs."; + } + + + extension cli-show-template { + argument value { + yin-element true; + tailf:arg-type { + type tailf:cli-template-string; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "container"; + tailf:use-in "refine"; + tailf:substatement "tailf:cli-auto-legend"; + description + "Specifies a template string to be used by the 'show' command in + operational mode. It is primarily intended for displaying + non-config data but config data may be included in the template + as well. + + See the defintion of cli-template-string for more info. + + Some restrictions includes not applying templates on a leaf that + is the key in a list. It is recommended to use the template + directly on the list to format the whole list instead. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-auto-legend { + tailf:use-in "tailf:cli-show-template"; + description + "Specifies that the legend should be automatically rendered if not " + +"already displayed. Useful when using templates for rendering " + +"tables."; + } + + extension cli-show-template-legend { + argument value { + yin-element true; + tailf:arg-type { + type tailf:cli-template-string; + } + } + tailf:use-in "list"; + tailf:use-in "refine"; + description + + "Specifies a template string to be printed before all list entries are + printed. + + See the defintion of cli-template-string for more info. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-show-template-enter { + argument value { + yin-element true; + tailf:arg-type { + type tailf:cli-template-string; + } + } + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies a template string to be printed before each list entry is + printed. + + See the defintion of cli-template-string for more info. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-show-template-footer { + argument value { + yin-element true; + tailf:arg-type { + type tailf:cli-template-string; + } + } + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + + "Specifies a template string to be printed after all list entries are + printed. + + See the defintion of cli-template-string for more info. + + Used in J-, I- and C-style CLIs."; + } + + extension cli-run-template { + argument value { + yin-element true; + tailf:arg-type { + type tailf:cli-template-string; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies a template string to be used by the 'show running-config' + command in operational mode. It is primarily intended for displaying + config data but non-config data may be included in the template + as well. + + See the defintion of cli-template-string for more info. + + Used in I- and C-style CLIs."; + } + + extension cli-run-template-legend { + argument value { + yin-element true; + tailf:arg-type { + type tailf:cli-template-string; + } + } + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + + "Specifies a template string to be printed before all list entries are + printed. + + See the defintion of cli-template-string for more info. + + Used in I- and C-style CLIs."; + } + + extension cli-run-template-enter { + argument value { + yin-element true; + tailf:arg-type { + type tailf:cli-template-string; + } + } + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Specifies a template string to be printed before each list entry is + printed. + + When used on a container it only has effect when the container + also has a tailf:cli-add-mode, and when tailf:cli-show-no isn't + used on the container. + + See the defintion of cli-template-string for more info. + + The variable .reenter is set to 'true' when the 'show configuration' + command is executed and the list or container isn't created. This + allow, for example, to display + + create foo + + when an instance is created + + edit foo + + when something inside the instance is modified. + + Used in I- and C-style CLIs."; + } + + extension cli-run-template-footer { + argument value { + yin-element true; + tailf:arg-type { + type tailf:cli-template-string; + } + } + tailf:use-in "list"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + + "Specifies a template string to be printed after all list entries are + printed. + + See the defintion of cli-template-string for more info. + + Used in I- and C-style CLIs."; + } + + typedef cli-template-string { + type string; + description + "A template is a text string which is expanded by the CLI engine, + and then displayed to the user. + + The template may contain a mix of text and expandable entries. + Expandable entries all start with $( and end with a matching ). + Parentheses and dollar signs need to be quoted in plain text. + + The template is expanded as follows: + + A parameter is either a relative or absolute path to a leaf + element (eg /foo/bar, foo/bar), or one of the builtin variables: + .selected, .entered, .legend_shown, .user, .groups, .ip, + .display_groups, .path, .ipath or .licounter. In addition the + variables .spath and .ispath are available when a command + is executed from a show path. + + .selected + + The .selected variable contains the list of selected paths + to be shown. The show template can inspect this element to + determine if a given element should be displayed or + not. For example: + + $(.selected~=hwaddr?HW Address) + + .entered + + The .entered variable is true if the \"entered\" text has + been displayed (either the auto generated text or a + showTemplateEnter). This is useful when having a non-table + template where each instance should have a text. + + $(.entered?:host $(name)) + + .legend_shown + + The .legend_shown variable is true if the \"legend\" text has + been displayed (either the auto generated table header or + a showTemplateLegend). This is useful to inspect when + displaying a table row. If the user enteres the path to a + specific instance the builtin table header will not be + displayed and the showTemplateLegend will not be invoked + and it may be useful to render the legend specifically + for this instance. + + $(.legend_shown!=true?Address Interface) + + .user + + The .user variable contains the name of the current + user. This can be used for differentiating the content + displayed for a specific user, or in paths. For exapmle: + + $(user{$(.user)}/settings) + + .groups + + The .groups variable contains the a list of groups that the + user belongs to. + + .display_groups + + The .display_groups variable contains a list of selected + display groups. This can be used to display different + content depending on the selected display group. For + example: + + $(.display_groups~=details?details...) + + .ip + + The .ip variable contains the ip address that the user + connected from. + + .path + + The .path variable contains the path to the entry, + formated in CLI style. + + .ipath + + The .ipath variable contains the path to the entry, + formated in template style. + + .spath + + The .spath variable contains the show path, + formated in CLI style. + + .ispath + + The .ispath variable contains the show path, + formated in template style. + + .licounter + + The .licounter variable contains a counter that is + incremented for each instance in a list. This means that + it will be 0 in the legend, contain the total number of + list instances in the footer and something in between in + the basic show template. + + $(parameter) + + The value of 'parameter' is substituted. + + $(cond?word1:word2) + + The expansion of 'word1' is substituted if 'cond' + evaluates to true, otherwise the expansion of 'word2' is + substituted. + + 'cond' may be one of + + parameter + + Evaluates to true if the node exists. + + parameter == + + Evaluates to true if the value of the parameter equals + . + + parameter != + + Evalutes to true if the value of the parameter does not + equal + + parameter ~= + + Provided that the value of the parameter is a list + (i.e., the node that the parameter refers to is a + leaf-list), this expression evaluates to true if + is a member of the list. + + $(parameter|filter) + + The value of 'parameter' processed by 'filter' is + substituted. Filters may be either one of the + built-ins or a customized filter defined in a + callback. See /confdConfig/cli/templateFilter. + + A built-in 'filter' may be one of: + + capfirst + + Capitalizes the first character of the value. + + lower + + Converts the value into lowercase. + + upper + + Converts the value into uppercase. + + filesizeformat + + Formats the value in a human-readable format (e.g., + '13 KB', '4.10 MB', '102 bytes' etc), where K + means 1024, M means 1024*1024 etc. + + When used without argument the default number of + decimals displayed is 2. When used with a numeric + integer argument, filesizeformat will display the + given number of decimal places. + + humanreadable + + Similar to filesizeformat except no bytes suffix + is added (e.g., '13.00 k', '4.10 M' '102' etc), + where k means 1000, M means 1000*1000 etc. + + When used without argument the default number of + decimals displayed is 2. When used with a numeric + integer argument, humanreadable will display the + given number of decimal places. + + commasep + + Separate the numerical values into groups of three + digits using a comma (e.g., 1234567 -> 1,234,567) + + hex + + Display integer as hex number. An argument can be + used to indicate how many digits should be used in + the output. If the hex number is too long it will + be truncated at the front, if it is too short it will + be padded with zeros at the front. If the width is + a negative number then at most that number of digits + will be used, but short numbers will not be padded + with zeroes. Another argument can be given to indicate + if the hex numbers should be written with lower + or upper case. + + For example: + + value Template Output + 12345 {{ value|hex }} 3039 + 12345 {{ value|hex:2 }} 39 + 12345 {{ value|hex:8 }} 00003039 + 12345 {{ value|hex:-8 }} 3039 + 14911 {{ value|hex:-8:upper }} 3A3F + 14911 {{ value|hex:-8:lower }} 3a3f + + hexlist + + Display integer as hex number with : between pairs. An + argument can be used to indicate how many digits should + be used in the output. If the hex number is too long it + will be truncated at the front, if it is too short it will + be padded with zeros at the front. If the width is + a negative number then at most that number of digits + will be used, but short numbers will not be padded + with zeroes. Another argument can be given to indicate + if the hex numbers should be written with lower + or upper case. + + For example: + + value Template Output + 12345 {{ value|hexlist }} 30:39 + 12345 {{ value|hexlist:2 }} 39 + 12345 {{ value|hexlist:8 }} 00:00:30:39 + 12345 {{ value|hexlist:-8 }} 30:39 + 14911 {{ value|hexlist:-8:upper }} 3A:3F + 14911 {{ value|hexlist:-8:lower }} 3a:3f + + floatformat + + Used for type 'float' in tailf-xsd-types. We recommend + that the YANG built-in type 'decimal64' is used instead of + 'float'. + + When used without an argument, rounds a floating-point + number to one decimal place -- but only if there is a + decimal part to be displayed. + + For example: + + value Template Output + 34.23234 {{ value|floatformat }} 34.2 + 34.00000 {{ value|floatformat }} 34 + 34.26000 {{ value|floatformat }} 34.3 + + If used with a numeric integer argument, floatformat + rounds a number to that many decimal places. For example: + + value Template Output + 34.23234 {{ value|floatformat:3 }} 34.232 + 34.00000 {{ value|floatformat:3 }} 34.000 + 34.26000 {{ value|floatformat:3 }} 34.260 + + If the argument passed to floatformat is negative, it will + round a number to that many decimal places -- but only if + there's a decimal part to be displayed. For example: + + value Template Output + 34.23234 {{ value|floatformat:-3 }} 34.232 + 34.00000 {{ value|floatformat:-3 }} 34 + 34.26000 {{ value|floatformat:-3 }} 34.260 + + Using floatformat with no argument is equivalent to using + floatformat with an argument of -1. + + ljust:width + + Left-align the value given a width. + + rjust:width + + Right-align the value given a width. + + trunc:width + + Truncate value to a given width. + + lower + + Convert the value into lowercase. + + upper + + Convert the value into uppercase. + + show: + + Substitutes the result of invoking the default display + function for the parameter. The dictionary can be used + for introducing own variables that can be accessed in + the same manner as builtin variables. The user defined + variables overrides builtin variables. The dictionary + is specified as a string on the following form: + + (key=value)(:key=value)* + + For example, with the following expression: + + $(foo|show:myvar1=true:myvar2=Interface) + + the user defined variables can be accessed like this: + + $(.myvar1!=true?Address) $(.myvar2) + + A special case is the dict variable 'indent'. It + controls the indentation level of the displayed path. + The current indent level can be incremented and + decremented using =+ and =-. + + For example: + + $(foobar|show:indent=+2) + $(foobar|show:indent=-1) + $(foobar|show:indent=10) + + Another special case is he dict variable 'noalign'. + It may be used to suppress the default aligning that + may occur when displaying an element. + + For example: + + $(foobar|show:noalign) + + dict: + + Translates the value using the dictionary. Can for + example be used for displaying on/off instead of + true/false. The dictionary is specified as a string on + the following form: + + (key=value)(:key=value)* + + For example, with the following expression: + + $(foo|dict:true=on:false=off) + + if the leaf 'foo' has value 'true', it is displayed as 'on', and + if its value is 'false' it is displayed as 'off'. + + Nested invocations are allowed, ie it is possible to have expressions + like $((state|dict:yes=Yes:no=No)|rjust:14), or $(/foo{$(../bar)}) + + + For example: + + list interface { + key name; + leaf name { ... } + leaf status { ... } + container line { + leaf status { ... } + } + leaf mtu { ... } + leaf bw { ... } + leaf encapsulation { ... } + leaf loopback { ... } + tailf:cli-show-template + '$(name) is administratively $(status),' + + ' line protocol is $(line/status)\\n' + + 'MTU $(mtu) bytes, BW $(bw|humanreadable)bit, \\n' + + 'Encap $(encapsulation|upper), $(loopback?:loopback not set)\\n'; + }"; + } + +} \ No newline at end of file diff --git a/experimental/odp/tailf-common.yang b/experimental/odp/tailf-common.yang new file mode 100644 index 000000000..eb71e7e92 --- /dev/null +++ b/experimental/odp/tailf-common.yang @@ -0,0 +1,3219 @@ +module tailf-common { + namespace "http://tail-f.com/yang/common"; + prefix tailf; + + include tailf-meta-extensions { + revision-date 2013-11-07; + } + + include tailf-cli-extensions { + revision-date 2015-03-19; + } + + organization "Tail-f Systems"; + + description + "This module defines all Tail-f YANG extensions statements + and common YANG types."; + + revision 2015-05-22 { + description + "Released as part of ConfD-5.4.2 / NCS-3.4.2. + + Allow tailf:export and tailf:unique-selector in + tailf:annotate-module."; + } + + revision 2015-03-19 { + description + "Released as part of ConfD-5.4 / NCS-3.4. + + Added if-feature as substatement to tailf:annotate. + + Added tailf:no-dependency. + + Updated the description for tailf:dependency. + + Allow tailf:id-value as substatement to 'module', + tailf:annotate-module, 'choice', and 'case'."; + } + + revision 2014-11-13 { + description + "Released as part of ConfD-5.3 / NCS-3.3. + + Added tailf:export."; + } + + revision 2014-06-30 { + description + "Released as part of ConfD-5.2 / NCS-3.2. + + Added tailf:sha-256-digest-string and tailf:sha-512-digest-string."; + } + + revision 2014-03-27 { + description + "Released as part of ConfD-5.1 / NCS-3.1. + + Added tailf:actionpoint as substatement to refine. + Removed must as substatement to tailf:symlink."; + } + + revision 2014-02-20 { + description + "Released as part of ConfD-5.0.2 / NCS-3.0.2. + + Added tailf:snmp-ned-recreate-when-modified."; + } + + revision 2013-12-23 { + description + "Released as part of ConfD-5.0.1 / NCS-3.0.1. + + Allow 'unique' in tailf:annotate and tailf:annotate-statement. + + Added tailf:snmp-ned-delete-before-create."; + } + + revision 2013-11-07 { + description + "Released as part of ConfD-5.0 / NCS-3.0. + + Allow tailf:code-name as substatement to 'bit'. + + Disallow tailf:id-value as substatement to 'enum'. Use the + standard YANG 'value' statement instead. + + Deprecated tailf:hex-list. Use yang:hex-string instead. + There are no plans to remove tailf:hex-list. + + Added the types tailf:ipv4-address-and-prefix-length, + tailf:ipv6-address-and-prefix-length, and + tailf:ip-address-and-prefix-length,"; + } + + revision 2013-09-05 { + description + "Released as part of ConfD-4.3. + + Added tailf:auto-compact as substatement to tailf:indexed-view."; + } + + revision 2013-06-14 { + description + "Released as part of ConfD-4.3. + + Deprecated tailf:symlink. Use tailf:link instead. + + Allow tailf:alt-name as substatement to tailf:action and rpc. + + Allow status as substatement to tailf:action. + + Allow description in tailf:annotate and tailf:annotate-statement."; + } + + revision 2013-05-16 { + description + "Released as part of ConfD-4.2.2. + + Added tailf:link"; + } + + revision 2013-03-07 { + description + "Released as part of ConfD-4.2. + + Allow 'pattern' in tailf:annotate-statement."; + } + + revision 2012-11-08 { + description + "Released as part of ConfD-4.1. + + Added tailf:unique-selector and tailf:unique-leaf. + + Allow tailf:info in bit. + + Allow tailf:code-name as substatement to all statements that + define data nodes in the schema tree and the 'rpc', + 'notification', 'identity', and 'tailf:action' statements. + + Allow status in tailf:symlink"; + } + + revision 2012-08-23 { + description + "Released as part of ConfD-4.0.1. + + Allow tailf:cli-operational-mode and tailf:cli-configure-mode in + rpc."; + } + + revision 2012-06-14 { + description + "Released as part of ConfD-4.0. + + Added tailf:display-hint."; + } + + revision 2012-05-24 { + description + "Released as part of ConfD-3.9.2."; + } + + revision 2012-03-08 { + description + "Released as part of ConfD-3.9. + + Added tailf:timeout. + Added tailf:non-strict-leafref."; + } + + revision 2011-12-08 { + description + "Released as part of ConfD-3.8. + + Allow validation statements in tailf:annotate and + tailf:annotate-statement. + + Allow tailf:validate in must, in order to override the evaluation + of the must expression with a callback function. + + Disallow tailf:info in range, length and pattern. + + Added tailf:snmp-ned-* statements to control the SNMP NED + behavior in NCS."; + } + + revision 2011-10-20 { + description + "Released as part of ConfD-3.7.1. + + Added tailf:priority."; + } + + revision 2011-09-22 { + description + "Released as part of ConfD-3.7. + + Allow tailf:typepoint as substatement to leaf and leaf-list. + Allow tailf:id as substatement to tailf:annotate-module. + Allow tailf:sort-priority as substatement to tailf:symlink. + Added tailf:interruptibale. + Added tailf:error-info. + Added tailf:snmp-delete-value and tailf:snmp-send-delete-value. + Added tailf:step. + Added tailf:annotate-statement. + + Clarified how tailf:display-when is evaluated for lists."; + } + + revision 2011-08-25 { + description + "Released as part of ConfD-3.6.2. + + Included latest tailf-cli-extension submodule."; + } + + revision 2011-06-30 { + description + "Released as part of ConfD-3.6.1. + + Clarified what statements are allowed in tailf:annotate and + tailf:annotate-module. Specifically, that 'symlink' and 'action' + are not allowed."; + } + + revision 2011-05-26 { + description + "Released as part of ConfD-3.6. + + Allow multiple tailf:snmp-name on leafs that represent MIB scalars."; + } + + revision 2011-03-31 { + description + "Released as part of ConfD-3.5.1. + + Allow tailf:alt-name as substatement to tailf:symlink."; + } + + revision 2011-02-24 { + description + "Released as part of ConfD-3.5. + + Allow tailf:info as substatement to type. + Added tailf:writable. + Removed the deprecated tailf:cli-default-order statement. + Removed the deprecated tailf:instance-info-leafs statement."; + } + + revision 2010-11-04 { + description + "Released as part of ConfD-3.4. + + Added tailf:snmp-exclude-object. + Allow tailf:hidden as substatement to tailf:symlink. + Allow multiple tailf:hidden statements to be specified on a node. + Allow special value '*' ar argument to tailf:annotate."; + } + + + revision 2010-09-16 { + description + "Released as part of ConfD-3.3.2. + + Included latest tailf-cli-extension submodule."; + } + + revision 2010-08-19 { + description + "Released as part of ConfD-3.3.1. + + Allow multiple tailf:snmp-name statements, and expanded the + semantic meaning of this statement."; + } + + revision 2010-07-21 { + description + "Released as part of ConfD-3.3.0.3. + + Added tailf:sort-priority."; + } + + revision 2010-06-17 { + description + "Released as part of ConfD-3.3. + + Added tailf:value-length. + + Added tailf:info-html. + + Added tailf:display-default-order, and deprecated + tailf:cli-default-order. + + Added tailf:dependency as a substatement to when. + + Removed the deprecated statements tailf:constant-leaf and + tailf:constant-value."; + } + + revision 2010-04-22 { + description + "Released as part of ConfD-3.2.1. + + Added tailf:invocation-mode, + + Fixed bug in tailf:octet-list pattern."; + } + + revision 2010-03-18 { + description + "Released as part of ConfD-3.2. + + Split this module into the main module and two submodules, + tailf-meta-extensions, and tailf-cli-extensions. + + Added many tailf:cli- statements in the submodule + tailf-cli-extensions. + + Added tailf:info. + + Allow tailf:display-when in tailf:action. + + Added tailf:snmp-lax-type-check. + + Deprecated tailf:instance-info-leafs. Use + tailf:cli-instance-info-leafs instead. + + Removed the argument in tailf:cli-show-no to better match + all the other tailf:cli- statements."; + } + + revision 2010-01-28 { + description + "Released as part of ConfD-3.1.1. + + Allow tailf:snmp-oid and tailf:snmp-name in tailf:symlink. + + Added tailf:key-default. + + Allow tailf:suppress-echo in leaf and leaf-list."; + } + + revision 2009-12-17 { + description + "Released as part of ConfD-3.1. + + Added tailf:dependency as a substatement to must. + + Added must and tailf:display-when as children to tailf:symlink. + + Added tailf:interrupt to tailf:exec. + + Allow many tailf statement as substatements to 'refine'. + + Allow tailf:symlink statement in 'augment' and 'case'. + + Added tailf:internal to tailf:actionpoint. + + Deprecated tailf:constant-leaf and tailf:constant-value."; + } + + revision 2009-11-06 { + description + "Released as part of ConfD-3.0.1. + + Added tailf:annotate-module statement. + + Added tailf:code-name statement. + + Clarified the tailf:path-filters statement, and added + tailf:no-subtree-match."; + } + + revision 2009-10-01 { + description + "Released as part of ConfD-3.0. + + Clarified that tailf:annotate is applied on the expanded tree. + Bugfixes in some typedef patterns."; + } + + revision 2009-03-17 { + description + "Released as part of ConfD-2.8. + + Changed module name from tailf-extensions to reflect the content + better."; + } + + /* + * Common types, natively supported by ConfD. + */ + + typedef size { + type string { + pattern + "S(\d+G)?(\d+M)?(\d+K)?(\d+B)?"; + } + description + "A value that represents a number of bytes. An example could be + S1G8M7K956B; meaning 1GB + 8MB + 7KB + 956B = 1082138556 bytes. + The value must start with an S. Any byte magnifier can be left + out, e.g. S1K1B equals 1025 bytes. The order is significant + though, i.e. S1B56G is not a valid byte size. + + In ConfD, a 'size' value is represented as an uint64."; + } + + typedef octet-list { + type string { + pattern '(\d*(.\d*)*)?'; + } + description + "A list of dot-separated octets e.g. '192.168.255.1.0'. + + The statement tailf:value-length can be used to restrict the number + of octets. Note that using the 'length' restriction limits the + number of characters in the lexical representation."; + } + + typedef md5-digest-string { + type string; + description + "The md5-digest-string type automatically computes a MD5 digest for + a value adhering to this type. + + This is best explained using an example. Suppose we have a + leaf: + + leaf key { + type tailf:md5-digest-string; + } + + A valid configuration is: + + $0$In god we trust. + + The '$0$' prefix signals that this is plain text. When a plain + text value is received by the server, an MD5 digest is + calculated, and the string '$1$$' is prepended to the + result, where is a random eight character salt used to + generate the digest. This value is stored in the configuration + data store. + + When a value of this type is read, the computed MD5 value is + always returned. In the example above, the following value + could be returned: + + $1$fB$ndk2z/PIS0S1SvzWLqTJb. + + If a value starting with '$1$' is received, the server + knows that the value already represents an MD5 digest, and + stores it as is in the data store. + + A value adhering to this type must have a '$0$' or a + '$1$$' prefix. + + If a default value is specified, it must have a '$1$$' prefix. + + The digest algorithm used is the same as the md5 crypt function + used for encrypting passwords for various UNIX systems, see e.g. + http://www.freebsd.org/cgi/cvsweb.cgi/~checkout/~/src/lib/libcrypt/crypt.c + "; + reference + "IEEE Std 1003.1-2008 - crypt() function + RFC 1321 - The MD5 Message-Digest Algorithm"; + } + + typedef sha-256-digest-string { + type string { + pattern + '$0$.*' + + '|$5$(rounds=\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{43}'; + } + description + "The sha-256-digest-string type automatically computes a SHA-256 + digest for a value adhering to this type. + + A value of this type matches one of the forms: + + $0$ + $5$$ + $5$rounds=$$ + + The '$0$' prefix signals that this is plain text. When a plain + text value is received by the server, a SHA-256 digest is + calculated, and the string '$5$$' is prepended to the + result, where is a random 16 character salt used to + generate the digest. This value is stored in the configuration + data store. The algorithm can be tuned via the + /confdConfig/cryptHash/rounds parameter, which if set to a number + other than the default will cause '$5$rounds=$$' to + be prepended instead of only '$5$$'. + + If a value starting with '$5$' is received, the server + knows that the value already represents a SHA-256 digest, and + stores it as is in the data store. + + If a default value is specified, it must have a '$5$' prefix. + + The digest algorithm used is the same as the SHA-256 crypt function + used for encrypting passwords for various UNIX systems, see e.g. + http://www.akkadia.org/drepper/SHA-crypt.txt"; + reference + "IEEE Std 1003.1-2008 - crypt() function + FIPS.180-3.2008: Secure Hash Standard"; + } + + typedef sha-512-digest-string { + type string { + pattern + '$0$.*' + + '|$6$(rounds=\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{86}'; + } + + description + "The sha-512-digest-string type automatically computes a SHA-512 + digest for a value adhering to this type. + + A value of this type matches one of the forms: + + $0$ + $6$$ + $6$rounds=$$ + + The '$0$' prefix signals that this is plain text. When a plain + text value is received by the server, a SHA-512 digest is + calculated, and the string '$6$$' is prepended to the + result, where is a random 16 character salt used to + generate the digest. This value is stored in the configuration + data store. The algorithm can be tuned via the + /confdConfig/cryptHash/rounds parameter, which if set to a number + other than the default will cause '$6$rounds=$$' to + be prepended instead of only '$6$$'. + + If a value starting with '$6$' is received, the server + knows that the value already represents a SHA-512 digest, and + stores it as is in the data store. + + If a default value is specified, it must have a '$6$' prefix. + + The digest algorithm used is the same as the SHA-512 crypt function + used for encrypting passwords for various UNIX systems, see e.g. + http://www.akkadia.org/drepper/SHA-crypt.txt"; + reference + "IEEE Std 1003.1-2008 - crypt() function + FIPS.180-3.2008: Secure Hash Standard"; + } + + typedef des3-cbc-encrypted-string { + type string; + description + "The des3-cbc-encrypted-string type automatically encrypts a value + adhering to this type using DES in CBC mode followed by a base64 + conversion. If the value isn't encrypted already, that is. + + This is best explained using an example. Suppose we have a leaf: + + leaf enc { + type tailf:des3-cbc-encrypted-string; + } + + A valid configuration is: + + $0$In god we trust. + + The '$0$' prefix signals that this is plain text. When a plain + text value is received by the server, the value is DES3/Base64 + encrypted, and the string '$3$' is prepended. The resulting + string is stored in the configuration data store. + + When a value of this type is read, the encrypted value is always + returned. In the example above, the following value could be + returned: + + $3$lyPjszaQq4EVqK7OPOxybQ== + + If a value starting with '$3$' is received, the server knows + that the value is already encrypted, and stores it as is in the + data store. + + A value adhering to this type must have a '$0$' or a '$3$' prefix. + + ConfD uses a configurable set of encryption keys to encrypt the + string. For details, see 'encryptedStrings' in the + confd.conf(5) manual page."; + } + + typedef aes-cfb-128-encrypted-string { + type string; + description + "The aes-cfb-128-encrypted-string works exactly like + des3-cbc-encrypted-string but AES/128bits in CFB mode is used to + encrypt the string. The prefix for encrypted values is '$4$'."; + } + + typedef ipv4-address-and-prefix-length { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '/(([0-9])|([1-2][0-9])|(3[0-2]))'; + } + description + "The ipv4-address-and-prefix-length type represents a combination + of an IPv4 address and a prefix length. The prefix length is given + by the number following the slash character and must be less than + or equal to 32."; + } + + typedef ipv6-address-and-prefix-length { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(/.+)'; + } + description + "The ipv6-address-and-prefix-length type represents a combination + of an IPv6 address and a prefix length. The prefix length is given + by the number following the slash character and must be less than + or equal to 128."; + } + + typedef ip-address-and-prefix-length { + type union { + type tailf:ipv4-address-and-prefix-length; + type tailf:ipv6-address-and-prefix-length; + } + description + "The ip-address-and-prefix-length type represents a combination of + an IP address and a prefix length and is IP version neutral. The + format of the textual representations implies the IP version."; + } + + + /* + * Meta extensions + */ + + extension export { + argument agent { + tailf:arg-type { + type union { + type enumeration { + enum "none"; + enum "netconf"; + enum "rest"; + enum "cli"; + enum "snmp"; + enum "webui"; + } + type string; + } + } + } + tailf:use-in "module"; + tailf:occurence "*"; + + description + "Makes this data model visible in the northbound interface 'agent'. + + This statement makes it possible to have a data model visible + through some northbound interface but not others. For example, + if a MIB is used to generate a YANG module, the resulting YANG + module can be exposed through SNMP only. + + Use the special agent 'none' to make the data model completely + hidden to all notherbound interfaces. + + The agent can also be a free-form string. In this case, the data + model will be visible to maapi applications using this string as its + 'context'."; + } + + extension annotate { + argument target { + tailf:arg-type { + type string; + } + } + tailf:use-in "module"; + tailf:use-in "submodule"; + tailf:occurence "*"; + + tailf:substatement "tailf:annotate" { + tailf:occurence "*"; + } + tailf:substatement "if-feature" { + tailf:occurence "*"; + } + description + "Annotates an existing statement with a 'tailf' statement or a + validation statement. This is useful in order to add tailf + statements to a module without touching the module source. + Annotation statements can be put in a separate annotation + module, and then passed to 'confdc' (or 'pyang') when the + original module is compiled. + + Any 'tailf' statement, except 'symlink' and 'action' can be + annotated. The statements 'symlink' and 'action' modifies the + data model, and are thus not allowed. + + The validation statements 'must', 'min-elements', + 'max-elements', 'mandatory', 'unique', and 'when' can also be + annotated. + + A 'description' can also be annotated. + + 'tailf:annotate' can occur on the top-level in a module, or in + another 'tailf:annotate' statement. + + The argument is a 'schema-nodeid', i.e. the same as for + 'augment', or a '*'. It identifies a target node in the schema + tree to annotate with new statements. The special value '*' can + be used within another 'tailf:annotate' statetement, to select all + children for annotation. + + The target node is searched for after 'uses' and 'augment' + expansion. All substatements to 'tailf:annotate' are treated as + if they were written inline in the target node, with the + exception of any 'tailf:annotate' substatements. These are + treated recursively. For example, the following snippet adds + one callpoint to /x and one to /x/y: + + tailf:annotate /x { + tailf:callpoint xcp; + tailf:annotate y { + tailf:callpoint ycp; + } + } + "; + } + + extension annotate-module { + argument module-name { + tailf:arg-type { + type tailf:identifier; + } + } + tailf:use-in "module"; + tailf:occurence "*"; + + tailf:substatement "tailf:snmp-oid"; + tailf:substatement "tailf:snmp-mib-module-name"; + tailf:substatement "tailf:id"; + tailf:substatement "tailf:id-value"; + tailf:substatement "tailf:export"; + tailf:substatement "tailf:unique-selector"; + tailf:substatement "tailf:annotate-statement" { + tailf:occurence "*"; + } + description + "Annotates an existing module or submodule statement with a 'tailf' + statement. This is useful in order to add tailf statements to a + module without touching the module source. Annotation + statements can be put in a separate annotation module, and then + passed to 'confdc' (or 'pyang') when the original module is + compiled. + + 'tailf:annotate-module' can occur on the top-level in a module, + and is used to add 'tailf' statements to the module statement + itself. + + The argument is a name of the module or submodule to annotate."; + } + + extension annotate-statement { + argument statement-path { + tailf:arg-type { + type string; + } + } + tailf:use-in "tailf:annotate-module"; + tailf:use-in "tailf:annotate-statement"; + tailf:occurence "*"; + + tailf:substatement "tailf:annotate-statement" { + tailf:occurence "*"; + } + description + "Annotates an existing statement with a 'tailf' statement, a + validation statement, or a type restrcition statement. This is + useful in order to add tailf statements to a module without + touching the module source. Annotation statements can be put in + a separate annotation module, and then passed to 'confdc' (or + 'pyang') when the original module is compiled. + + Any 'tailf' statement, except 'symlink' and 'action' can be + annotated. The statements 'symlink' and 'action' modifies the + data model, and are thus not allowed. + + The validation statements 'must', 'min-elements', + 'max-elements', 'mandatory', 'unique', and 'when' can also be + annotated. + + The type restriction statement 'pattern' can also be annotated. + + A 'description' can also be annotated. + + The argument is an XPath-like expression that selects a + statement to annotate. The syntax is: + + ( '[' '=' ']' ) + + where is the name of the statement to annotate, + and if there are more than one such statement in the parent, + is the quoted value of the statement's argument. + + All substatements to 'tailf:annotate-statement' are treated as + if they were written inline in the target node, with the + exception of any 'tailf:annotate-statement' substatements. + These are treated recursively. + + For example, given the grouping: + + grouping foo { + leaf bar { + type string; + } + leaf baz { + type string; + } + } + + the following snippet adds a callpoint to the leaf 'baz': + + tailf:annotate-statement grouping[name='foo'] { + tailf:annotate-statement leaf[name='baz'] { + tailf:callpoint xcp; + } + } + "; + } + + /* + * Type restriction statements + */ + + extension value-length { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "type"; + tailf:substatement "error-message"; + tailf:substatement "error-app-tag"; + description + "Used only for the types: + yang:object-identifier + yang:object-identifier-128 + yang:phys-address + yang:hex-string + tailf:hex-list + tailf:octet-list + xs:hexBinary + + This type restriction is used to limit the length of the + value-space value of the type. Note that since all these types are + derived from 'string', the standard 'length' statement restricts the + lexical representation of the value. + + The argument is a length expression string, with the same syntax as + for the standard YANG 'length' statement."; + } + + extension path-filters { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "type"; + tailf:substatement "tailf:no-subtree-match"; + description + "Used for type 'instance-identifier' only. + + The argument is a space separated list of absolute or relative XPath + expressions. + + This statement declares that the instance-identifier value must match + one of the specified paths, according to the following rules: + + 1. each XPath expression is evaluated, and returns a node set. + + 2. if there is no 'tailf:no-subtree-match' statement, the + instance-identifier matches if it refers to a node in this + node set, or if it refers to any descendant node of this + node set. + + 3. if there is a 'tailf:no-subtree-match' statement, the + instance-identifier matches if it refers to a node in this + node set. + + For example: + + The value /a/b[key='k1']/c matches the XPath expression + /a/b[key='k1']/c. + + The value /a/b[key='k1']/c matches the XPath expression /a/b/c. + + The value /a/b[key='k1']/c matches the XPath expression /a/b, if + there is no 'tailf:no-subtree-match' statement. + + The value /a/b[key='k1'] matches the XPath expression /a/b, if + there is a 'tailf:no-subtree-match' statement. + "; + } + + extension step { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "range"; + description + "Used to further restrict the range of integer and decimal types. The + argument is a positive integer or decimal value greater than + zero. The allowed values for the type is further restricted to + only those values that matches the expression: + + 'low' + n * 'step' + + where 'low' is the lowest allowed value in the range, n is a + non-negative integer. + + For example, the following type: + + type int32 { + range '-2 .. 9' { + tailf:step 3; + } + } + + has the value space { -2, 1, 4, 7 }"; + } + + /* + * Data implementation statements + */ + + extension callpoint { + argument id { + tailf:arg-type { + type tailf:identifier; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + tailf:use-in "grouping"; + tailf:occurence "*"; + + tailf:substatement "description"; + tailf:substatement "tailf:config"; + tailf:substatement "tailf:transform"; + tailf:substatement "tailf:set-hook"; + tailf:substatement "tailf:transaction-hook"; + tailf:substatement "tailf:cache"; + tailf:substatement "tailf:opaque"; + tailf:substatement "tailf:internal"; + description + "Identifies a callback in a data provider. A data provider implements + access to external data, either configuration data in a database or + operational data. By default ConfD uses the embedded database + (CDB) to store all data. However, some or all of + the configuration data may be stored in an external source. In + order for ConfD to be able to manipulate external data, a data + provider registers itself using the callpoint id as described in + confd_lib_dp(3). + + A callpoint is inherited to all child nodes unless another + 'callpoint' or an 'cdb-oper' is defined."; + } + + extension config { + argument value { + tailf:arg-type { + type boolean; + } + } + tailf:use-in "tailf:callpoint"; + description + "If this statement is present, the callpoint is applied to nodes with a + matching value of their 'config' property."; + } + + extension transform { + argument value { + tailf:arg-type { + type boolean; + } + } + tailf:use-in "tailf:callpoint"; + description + "If set to 'true', the callpoint is a transformation callpoint. How + transformation callpoints are used is described in the + 'Transformations, Hooks, Hidden Data and Symlinks' chapter + in the User's Guide."; + } + + extension set-hook { + argument value { + tailf:arg-type { + type enumeration { + enum subtree; + enum object; + enum node; + } + } + } + tailf:use-in "tailf:callpoint"; + description + "Set hooks are a means to associate user code to the + transaction. Whenever an element gets written, created, or + deleted, user code gets invoked and can optionally write more + data into the same transaction. + + The difference between set- and transaction hooks are that set + hooks are invoked immediately when an element is modified, but + transaction hooks are invoked at commit time. + + The value 'subtree' means that all nodes in the configuration + below where the hook is defined are affected. + + The value 'object' means that the hook only applies to the list + where it is defined, i.e. it applies to all child nodes that + are not themselves lists. + + The value 'node' means that the hook only applies to + the node where it is defined and none of its children. + + For more details on hooks, + see the 'Transformations, Hooks, Hidden Data and Symlinks' + chapter in the User's Guide."; + } + + extension transaction-hook { + argument value { + tailf:arg-type { + type enumeration { + enum subtree; + enum object; + enum node; + } + } + } + tailf:use-in "tailf:callpoint"; + tailf:substatement "tailf:invocation-mode"; + description + "Transaction hooks are a means to associate user code to the + transaction. Whenever an element gets written, created, or + deleted, user code gets invoked and can optionally write more + data into the same transaction. + + The difference between set- and transaction hooks are that set + hooks are invoked immediately when an element is modified, but + transaction hooks are invoked at commit time. + + The value 'subtree' means that all nodes in the configuration + below where the hook is defined are affected. + + The value 'object' means that the hook only applies to the list + where it is defined, i.e. it applies to all child nodes that + are not themselves lists. + + The value 'node' means that the hook only applies to + the node where it is defined and none of its children. + + For more details on hooks, + see the 'Transformations, Hooks, Hidden Data and Symlinks' + chapter in the User's Guide."; + } + + extension invocation-mode { + argument value { + tailf:arg-type { + type enumeration { + enum per-operation; + enum per-transaction; + } + default per-operation; + } + } + tailf:use-in "tailf:transaction-hook"; + description + "By default, the node-specific write callbacks (create(), set_elem(), + etc) for a transaction hook are invoked for the invidual data nodes + that are modified in the transaction. If 'tailf:invocation-mode' is + set to 'per-transaction', there will instead be a single invocation + of a generic write callback (write_all())."; + } + + extension cache { + argument value { + tailf:arg-type { + type boolean; + } + } + tailf:use-in "tailf:callpoint"; + tailf:substatement "tailf:timeout"; + description + "If set to 'true', the operational data served by the callpoint will + be cached by ConfD. If set to 'true' in a node that represents + configuration data, the statement 'tailf:config' must be present + and set to 'false'. This feature is further described in the section + 'Caching operational data' in the 'Operational data' chapter in + the User's Guide."; + } + + extension timeout { + argument value { + tailf:arg-type { + type uint64; + } + } + tailf:use-in "tailf:cache"; + description + "Specifies how long the operational data will be cached, in seconds. + This value will override the global value specified via + /confdConfig/opcache/timeout in the confd.conf(5) file."; + } + + extension opaque { + argument value { + tailf:arg-type { + type string { + length "1..255"; + } + } + } + tailf:use-in "tailf:callpoint"; + tailf:use-in "tailf:validate"; + tailf:use-in "tailf:actionpoint"; + description + "Defines an opaque string which is passed to the callback function + in the context."; + } + + extension id { + argument name { + tailf:arg-type { + type string; + } + } + tailf:use-in "module"; + description + "This statement is used when old confspec models are translated to + YANG. It needs to be present if systems deployed with data + based on confspecs are updated to YANG based data models. + + In confspec, the 'id' of a data model was a string that never + would change, even if the namespace URI would change. It is not + needed in YANG, since the namespace URi cannot change as a module + is updated. + + This statement is typically present in YANG modules generated by + cs2yang. If no live upgrade needs to be done from a confspec + based system to a YANG based system, this statement can be + removed from such a generated module."; + } + + extension cdb-oper { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + tailf:substatement "description"; + tailf:substatement "tailf:persistent"; + description + "Indicates that operational data nodes below this node are stored in + CDB."; + } + + extension persistent { + argument value { + tailf:arg-type { + type boolean; + } + } + tailf:use-in "tailf:cdb-oper"; + description + "If it is set to 'true', the operational data is stored on disk. If + set to 'false', the operational data is not persistent across + ConfD restarts. The default is 'false'."; + } + + extension id-value { + argument value { + tailf:arg-type { + type uint32 { + range "1..4294967294"; + } + } + } + tailf:use-in "module"; + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "rpc"; + tailf:use-in "identity"; + tailf:use-in "notification"; + tailf:use-in "choice"; + tailf:use-in "case"; + tailf:use-in "tailf:action"; + description + "This statement lets you specify a hard wired numerical id value to + associate with the parent node. This id value is normally auto + generated by confdc and is used when working with the ConfD API + to refer to a tag name, to avoid expensive string comparison. + Under certain rare circumstances this auto generated hash value + may collide with a hash value generated for a node in another + data model. Whenever such a collision occurs the ConfD daemon + fails to start and instructs the developer to use the 'id-value' + statement to resolve the collision. + + + A thorough discussion on id-value can be found in the section Hash + Values and the id-value Statement in the YANG chapter in the User + Guide."; + } + + extension default-ref { + argument path { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "refine"; + description + "This statement defines a dynamic default value. It is a reference to + some other leaf in the datamodel. If no value has been set for + this leaf, it defaults to the value of the leaf that the + 'default-ref' argument points to. + + The textual format of a 'default-ref' is an XPath location path with + no predicates. + + The type of the leaf with a 'default-ref' will be set to the + type of the referred leaf. This means that the type statement in + the leaf with the 'default-ref' is ignored, but it SHOULD match the + type of the referred leaf. + + Here is an example, where a group without a 'hold-time' will get as + default the value of another leaf up in the hierarchy: + + leaf hold-time { + mandatory true; + type int32; + } + list group { + key 'name'; + leaf name { + type string; + } + leaf hold-time { + type int32; + tailf:default-ref '../../hold-time'; + } + } + "; + } + + extension sort-order { + argument how { + tailf:arg-type { + type enumeration { + enum normal { + description + "Entries are sorted on the key values."; + } + enum snmp { + description + "All string key values are considered to + start with a length byte for the purpose of sorting."; + } + enum snmp-implied { + description + "As 'snmp', but uses a length byte for all except the last key."; + } + enum unsorted { + description + "Entries do not have any special order. Note that it is + not possible to use the function 'find_next' on an + unsorted list. If an unsorted list is filtered (e.g., + in the CLI, the entire list must be traversed. + + If this value is given for a list stored in CDB, it + has no effect."; + } + } + default normal; + } + } + tailf:use-in "list"; + tailf:use-in "leaf-list"; + tailf:use-in "tailf:secondary-index"; + description + "This statement can be used for 'ordered-by system' lists and + leaf-lists only. It indicates in which way the list entries + are sorted."; + } + + extension link { + argument target { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:substatement "tailf:inherit-set-hook"; + description + "This statement specifies that the data node should be + implemented as a link to another data node, called the target + data node. This means that whenever the node is modified, the + system modifies the target data node instead, and whenever the + data node is read, the system returns the value of target data + node. + + Note that if the data node is a leaf, the target node MUST also + be a leaf, and if the data node is a leaf-list, the target node + MUST also be a leaf-list. + + Note that the type of the data node MUST be the same as the + target data node. Currently the compiler cannot check this. + + The argument is an XPath absolute location path. If + the target lies within lists, all keys must be specified. + A key either has a value, or is a reference to a key in the path of the + source node, using the function current() as starting + point for an XPath location path. For example: + + /a/b[k1='paul'][k2=current()/../k]/c"; + } + + extension lower-case { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + description + "Use for config false leafs and leaf-lists only. + + This extension serves as a hint to the system that the + leaf's type has the implict pattern '[^A-Z]*', i.e., all + strings returned by the data provider are lower case (in + the 7-bit ASCII range). + + The CLI uses this hint when it is run in case-insensitive mode + to optimize the lookup calls towards the data provider."; + } + + extension inherit-set-hook { + argument value { + tailf:arg-type { + type boolean; + default "false"; + } + } + tailf:use-in "tailf:symlink"; + tailf:use-in "tailf:link"; + description + "This statement specifies that a 'tailf:set-hook' statement should + survive through symlinks. If set to true a set hook gets called as + soon as the value is set via a symlink but also during commit. The + normal behaviour is to only call the set hook during commit time."; + } + + extension secondary-index { + argument name { + tailf:arg-type { + type string; + } + } + tailf:use-in "list"; + tailf:occurence "*"; + tailf:substatement "tailf:index-leafs" { + tailf:occurence "1"; + } + tailf:substatement "tailf:sort-order"; + tailf:substatement "tailf:display-default-order"; + description + "This statement creates a secondary index with a given name in the + parent list. The secondary index can be used to control the + displayed sort order of the instances of the list. + + Read more about sort order in 'The ConfD Command-Line Interface + (CLI)' chapters in the User Guide, confd_lib_dp(3), and + confd_lib_maapi(3). + + NOTE: Currently secondary-index is not supported for config false + data stored in CDB."; + } + + extension index-leafs { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "tailf:secondary-index"; + tailf:occurence "1"; + description + "This statement contains a space separated list of leaf names. Each + such leaf must be a direct child to the list. The secondary + index is kept sorted according to the values of these leafs."; + } + + extension typepoint { + argument id { + tailf:arg-type { + type tailf:identifier; + } + } + tailf:use-in "typedef"; + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:occurence "*"; + description + "If a typedef, leaf, or leaf-list has a 'typepoint' statement, a + user-defined type is specified, as opposed to a derivation or + specification of an existing type. The implementation of a + user-defined type must be provided in the form of a shared object + with C callback functions that is loaded into the ConfD daemon at + startup time. Read more about user-defined types in the + confd_types(3) manual page. + + The argument defines the ID associated with a typepoint. This + ID is provided by the shared object, and used by the ConfD + daemon to locate the implementation of a specific user-defined + type."; + } + + /* + * Validation related statements + */ + + extension unique-selector { + argument context-path { + tailf:arg-type { + type string; + } + } + tailf:use-in "module"; + tailf:use-in "submodule"; + tailf:use-in "grouping"; + tailf:use-in "augment"; + tailf:use-in "container"; + tailf:use-in "list"; + tailf:occurence "*"; + + tailf:substatement "tailf:unique-leaf" { + tailf:occurence "+"; + } + description + "The standard YANG statement 'unique' can be used to check for + uniqueness within a single list only. Specifically, it cannot + be used to check for uniqueness of leafs within a sublist. + + For example: + + container a { + list b { + ... + unique 'server/ip server/port'; + list server { + ... + leaf ip { ... }; + leaf port { ... }; + } + } + } + + The unique expression above is not legal. The intention is + that there must not be any two 'server' entries in any 'b' with + the same combination of ip and port. This would be illegal: + + + + b1 + + 10.0.0.1 + 80 + + + + b2 + + 10.0.0.1 + 80 + + + + + With 'tailf:unique-selector' and 'tailf:unique-leaf', this kind + of constraint can be defined. + + The argument to 'tailf:unique-selector' is an XPath descendant + location path (matches the rule 'descendant-schema-nodeid' in + RFC 6020). The first node in the path MUST be a list node, and + it MUST be defined in the same module as the + tailf:unique-selector. For example, the following is illegal: + + module y { + ... + import x { + prefix x; + } + tailf:unique-selector '/x:server' { // illegal + ... + } + } + + For each instance of the node where the selector is defined, it + is evaluated, and for each node selected by the selector, a + tuple is constructed by evaluating the 'tailf:unique-leaf' + expression. All such tuples must be unique. If a + 'tailf:unique-leaf' expression refers to a non-existing leaf, + the corresponding tuple is ignored. + + In the example above, the unique expression can be replaced by: + + container a { + tailf:unique-selector 'b/server' { + tailf:unique-leaf 'ip'; + tailf:unique-leaf 'port'; + } + list b { + ... + } + } + + For each container 'a', the XPath expression 'b/server' is + evaluated. For each such server, a 2-tuple is constructed with + the 'ip' and 'port' leafs. Each such 2-tuple is guaranteed to + be unique."; + } + + extension unique-leaf { + argument leaf-expr { + tailf:arg-type { + type string; + } + } + tailf:use-in "tailf:unique-selector"; + tailf:occurence "+"; + description + "See 'tailf:unique-selector' for a description of how this statement + is used. + + The argument is an XPath descendant location path (matches the + rule 'descendant-schema-nodeid' in RFC 6020), and it MUST refer to + a leaf."; + } + + extension validate { + argument id { + tailf:arg-type { + type tailf:identifier; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "grouping"; + tailf:use-in "refine"; + tailf:use-in "must"; + tailf:occurence "*"; + tailf:substatement "description"; + tailf:substatement "tailf:call-once"; + tailf:substatement "tailf:dependency" { + tailf:occurence "*"; + } + tailf:substatement "tailf:opaque"; + tailf:substatement "tailf:internal"; + tailf:substatement "tailf:priority"; + description + "Identifies a validation callback which is invoked when a configuration + value is to be validated. The callback validates a value and + typically checks it towards other values in the data store. + Validation callbacks are used when the YANG built-in validation + constructs ('must', 'unique') are not expressive enough. + + Callbacks use the API described in confd_lib_maapi(3) to + access whatever other configuration values needed to perform the + validation. + + Validation callbacks are typically assigned to individual nodes + in the data model, but it may be feasible to use a single + validation callback on a root node. In that case the callback + is responsible for validation of all values and their + relationships throughout the data store. + + The 'validate' statment should in almost all cases have a + 'tailf:dependency' substatement. If such a statement is not + given, the validate function is evaluated at every commit, + leading to overall performance degradation. + + If the 'validate' statement is defined in a 'must' statement, + validation callback is called instead of evaluating the must + expression. This is useful if the evaluation of the must statement + uses too much resources, and the condition expressed with the must + statement is easier to check with a validation callback function."; + } + + extension call-once { + argument value { + tailf:arg-type { + type boolean; + } + } + tailf:use-in "tailf:validate"; + description + "This optional statement can be used only if the parent statement is + a list. If 'call-once' is 'true'. the validation callback is + only called once even though there exists many list entries in + the data store. This is useful if we have a huge amount of + instances or if values assigned to each instance have to be + validated in comparison with its siblings."; + } + + extension dependency { + argument path { + tailf:arg-type { + type string; + } + } + tailf:use-in "must"; + tailf:use-in "when"; + tailf:use-in "tailf:validate"; + tailf:substatement "tailf:xpath-root"; + tailf:occurence "*"; + description + "This statement is used to specify that the must or when expression + or validation function depends on a set of subtrees in the data + store. Whenever a node in one of those subtrees are modified, + the must or when expression is evaluated, or validation code executed. + + The textual format of a 'dependency' is an XPath location path with + no predicates. + + If the node that declares the dependency is a leaf, there is an + implicit dependency to the leaf itself. + + For example, with the leafs below, the validation code for'vp' + will be called whenever 'a' or 'b' is modified. + + leaf a { + type int32; + tailf:validate vp { + tailf:dependency '../b'; + } + } + leaf b { + type int32; + } + + For 'when' and 'must' expressions, the compiler can derive the + dependencies automatically from the XPath expression in most + cases. The exception is if any wildcards are used in the expression. + + For 'when' expressions to work, a 'tailf:dependency' statement + must be given, unless the compiler can figure out the dependency + by itself. + + Note that having 'must' expressions or a 'tailf:validate' + statement without dependencies impacts the overall performance + of the system, since all such 'must' expressions or validation + functions are evaluated at every commit."; + } + + extension no-dependency { + tailf:use-in "must"; + tailf:use-in "tailf:validate"; + tailf:occurence "?"; + description + "This optional statements can be used to explicitly say that a 'must' + expression or a validation function is evaluated at every + commit. Use this with care, since the overall performance of + the system is impacted if this statement is used."; + } + + extension priority { + tailf:use-in "tailf:validate"; + argument value { + tailf:arg-type { + type uint32; + } + } + description + "This extension takes an integer parameter specifying the order + validation code will be evaluated, in order of increasing + priority. + + The default priority is 0."; + } + + extension no-subtree-match { + tailf:use-in "tailf:path-filters"; + description + "See tailf:path-filters."; + } + + + /* + * User interface related statements + */ + + extension info { + argument text { + yin-element true; + tailf:arg-type { + type string; + } + } + tailf:use-in "typedef"; + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "rpc"; + tailf:use-in "identity"; + tailf:use-in "type"; + tailf:use-in "enum"; + tailf:use-in "bit"; + tailf:use-in "length"; + tailf:use-in "pattern"; + tailf:use-in "range"; + tailf:use-in "refine"; + tailf:use-in "tailf:action"; + tailf:use-in "tailf:symlink"; + tailf:use-in "tailf:cli-exit-command"; + description + "Contains a textual description of the definition, suitable for + being presented to the CLI and WebUI users. + + The first sentence of this textual description is used in the + CLI as a summary, and displayed to the user when a short + explanation is presented. + + The 'description' statement is related, but targeted to the module + reader, rather than the CLI or WebUI user. + + The info string may contain a ';;' keyword. It is used in type + descriptions for leafs when the builtin type info needs to be + customized. A 'normal' info string describing a type is assumed + to contain a short textual description. When ';;' is present it + works as a delimiter where the text before the keyword is + assumed to contain a short description and the text after the + keyword a long(er) description. In the context of completion in + the CLI the text will be nicely presented in two columns where + both descriptions are aligned when displayed."; + } + + extension info-html { + argument text { + yin-element true; + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "rpc"; + tailf:use-in "identity"; + tailf:use-in "tailf:action"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "This statement works exactly as 'tailf:info', with the exception + that it can contain HTML markup. The WebUI will display the + string with the HTML markup, but the CLI will remove all HTML markup + before displaying the string to the user. In most cases, + using this statement avoids using special descriptions in webspecs + and clispecs. + + If this statement is present, 'tailf:info' cannot be given at the same + time."; + } + + extension sort-priority { + argument value { + tailf:arg-type { + type int32; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "This extension takes an integer parameter specifying the order and + can be placed on leafs, containers, lists and leaf-lists. + When showing, or getting configuration, leaf values will be returned + in order of increasing sort-priority. + + The default sort-priority is 0."; + } + + extension writable { + argument value { + tailf:arg-type { + type boolean; + } + } + tailf:use-in "leaf"; + description + "This extension makes operational data (i.e., config false data) + writable. Only valid for leafs."; + } + + extension suppress-echo { + argument value { + tailf:arg-type { + type boolean; + } + } + tailf:use-in "typedef"; + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + description + "If this statetement is set to 'true', leafs of this type will not have + their values echoed when input in the webui or when the CLI prompts + for the value. The value will also not be included in the audit + log in clear text but will appear as ***."; + } + + extension hidden { + argument tag { + tailf:arg-type { + type string { + pattern '[^\*].*|..+'; // must not be single '*' +// YANG 1.1: +// pattern '\*' { +// modifier invert-match; +// } + } + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "tailf:action"; + tailf:use-in "refine"; + tailf:use-in "tailf:symlink"; + tailf:use-in "rpc"; + tailf:occurence "*"; + + description + "This statement can be used to hide a node from some, or all, + northbound interfaces. All nodes with the same value are + considered a hide group and are treated the same with regards to + being visible or not in a northbound interface. + + A node with an hidden property is not shown in the northbound + user interfaces (CLI and Web UI) unless an 'unhide' operation has + been performed in the user interface. + + The hidden value 'full' indicates that the node should be hidden + from all northbound interfaces, including programmatical interfaces + such as NETCONF. + + The value '*' is not valid. + + A hide group can be unhidden only if this has been explicitly + allowed in the confd.conf(5) daemon configuration. + + Multiple hide groups can be specified by giving this statement + multiple times. The node is shown if any of the specified hide groups + has been given in the 'unhide' operation. + + Note that if a mandatory node is hidden, a hook callback + function (or similar) might be needed in order to set the + element."; + } + + extension display-when { + argument condition { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + tailf:substatement "tailf:xpath-root"; + description + "The argument contains an XPath expression which specifies when + the node should be displayed in the CLI and WebUI. For example, + when the CLI performs completion, and one of the candidates is + a node with a 'display-when' expression, the expression is + evaluated by the CLI. If the XPath expression evaluates to + true, the node is shown as a possible completion candidate, + otherwise not. + + For a list, the display-when expression is evaluated once for the + entire list. In this case, the XPath context node is the list's parent + node. + + This feature is further described in the 'Transformations, Hooks, + Hidden Data and Symlinks' chapter in the User Guide."; + } + + extension display-groups { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "This property is used in the CLI when 'enableDisplayGroups' has been + set to true in the confd.conf(5) file. Display groups are used + to control which elements should be displayed by the show command. + + The argument is a space-separated string of tags. + + In the J-style CLI the 'show status', 'show table' and 'show + all' commands use display groups. In the C- and I-style + CLIs the 'show ' command uses display groups. + + If no display groups are specified when running the commands, the + node will be displayed if it does not have the 'display-groups' + property, or if the property value includes the special value 'none'. + + If display groups are specified when running the command, then + the node will be displayed only if its 'display-group' + property contains one of the specified display groups."; + } + + extension display-default-order { + tailf:use-in "tailf:secondary-index"; + description + "Specifies that the list should be displayed sorted according + to this secondary index in the show command. + + If the list has more than one secondary index, + 'display-default-order' must be present in one index only. + + Used in J-, I- and C-style CLIs and WebUI."; + } + + extension alt-name { + argument name { + tailf:arg-type { + type string; + } + } + tailf:use-in "rpc"; + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "This property is used to specify an alternative name for the + node in the CLI. It is used instead of the node name in the CLI, + both for input and output."; + } + + extension display-status-name { + argument name { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "This property is used to specify an alternative name for the + element in the CLI. It is used when displaying status + information in the C- and I-style CLIs."; + } + + extension display-column-name { + argument name { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "refine"; + description + "This property is used to specify an alternative column name for the + leaf in the CLI. It is used when displaying the leaf in a + table in the CLI."; + } + + extension display-hint { + argument hint { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "typedef"; + description + "This statement can be used to add a display-hint to a leaf or + typedef of type binary. The display-hint is used in the CLI + and WebUI instead of displaying the binary as a base64-encoded + string. It is also used for input. + + The value of a 'display-hint' is defined in RFC 2579. + + For example, with the display-hint value '1x:', the value is + printed and inputted as a colon-separated hex list."; + } + + /* + * SNMP mapping statements + */ + + extension snmp-oid { + argument oid { + tailf:arg-type { + type tailf:tailf-oid; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "module"; + tailf:use-in "refine"; + description + "Used when the YANG module is mapped to an SNMP module. + + If this statement is present as a direct child to 'module', + it indicates the top level OID for the module. + + When the parent node is mapped to an SNMP object, this statement + specifies the OID of the SNMP object. It may be either a full + OID or just a suffix (a period, followed by an integer). In the + latter case, a full OID must be given for some ancestor element. + + NOTE: when this statement is set in a list, it refers to the OID of + the correspondig table, not the table entry."; + } + + extension snmp-name { + argument name { + tailf:arg-type { + type tailf:snmp-identifier; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "enum"; + tailf:use-in "refine"; + tailf:occurence "*"; + description + "Used when the YANG module is mapped to an SNMP module. + + When the parent node is mapped to an SNMP object, this statement + specifies the name of the SNMP object. + + If the parent node is mapped to multiple SNMP objects, this + statement can be given multiple times. The first statement + specifies the primary table. + + In a list, the argument is interpreted as: + + [MIB-MODULE-NAME:]TABLE-NAME + + For a leaf representing a table column, it is interpreted as: + + [[MIB-MODULE-NAME:]TABLE-NAME:]NAME + + For a leaf representing a scalar variable, it is interpreted as: + + [MIB-MODULE-NAME:]NAME + + If a YANG list is mapped to multiple SNMP tables, each such SNMP + table must be specified with a 'tailf:snmp-name' statement. If + the table is defined in another MIB than the MIB specified in + 'tailf:snmp-mib-module-name', the MIB name must be specified in this + argument. + + A leaf in a list that is mapped to multiple SNMP tables must specify + the name of the table it is mapped to if it is different from the + primary table. + + In the following example, a single YANG list 'interface' is mapped + to the MIB tables ifTable, ifXTable, and ipv4InterfaceTable: + + list interface { + key index; + tailf:snmp-name 'ifTable'; // primary table + tailf:snmp-name 'ifXTable'; + tailf:snmp-name 'IP-MIB:ipv4InterfaceTable'; + + leaf index { + type int32; + } + leaf description { + type string; + tailf:snmp-name 'ifDescr'; // mapped to primary table + } + leaf name { + type string; + tailf:snmp-name 'ifXTable:ifName'; + } + leaf ipv4-enable { + type boolean; + tailf:snmp-name + 'IP-MIB:ipv4InterfaceTable:ipv4InterfaceEnableStatus'; + } + ... + } + + When emitting a mib from yang, enum labels are used as-is if they + follow the SMI rules for labels (no '.' or '_' characters and beginning + with a lowercase letter). Any label that doesn't satisfy the SMI rules + will be converted as follows: + + An initial uppercase character will be downcased. + + If the initial character is not a letter it will be prepended with + an 'a'. + + Any '.' or '_' characters elsewhere in the label will be substituted + with '-' characters. + + In the resulting label, any multiple '-' character sequence will be + replaced with a single '-' character. + + If this automatic conversion is not suitable, snmp-name can be used + to specify the label to use when emitting a MIB."; + } + + extension snmp-mib-module-name { + argument name { + tailf:arg-type { + type tailf:identifier; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "module"; + tailf:use-in "refine"; + description + "Used when the YANG module is mapped to an SNMP module. + + Specifies the name of the SNMP MIB module where the SNMP objects + are defined. + + This property is inherited by all child nodes."; + } + + extension snmp-row-status-column { + argument value { + tailf:arg-type { + type uint32 { + range "1..max"; + } + } + } + tailf:use-in "list"; + tailf:use-in "refine"; + description + "Used when an SNMP module is generated from the YANG module. + + When the parent list node is mapped to an SNMP table, this + statement specifies the column number of the generated RowStatus + column. If it is not specified, the generated RowStatus column + will be the last in the table."; + } + + extension snmp-lax-type-check { + argument value { + tailf:arg-type { + type boolean; + } + } + tailf:use-in "leaf"; + description + "Normally, the ConfD MIB compiler checks that the data type of an SNMP + object matches the data type of the corresponding YANG leaf. If + both objects are writeble, the data types need to precisely + match, but if the SNMP object is read-only, or if + snmp-lax-type-check is set to 'true', the compiler accepts the + object if the SNMP type's value space is a superset of the YANG + type's value space. + + If snmp-lax-type-check is true and the MIB object is writable, the SNMP + agent will reject values outside the YANG data type range in runtime."; + } + + extension snmp-exclude-object { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "tailf:symlink"; + tailf:use-in "refine"; + description + "Used when an SNMP MIB is generated from a YANG module, using + the --generate-oids option to confdc. + + If this statement is present, confdc will exclude this object + from the resulting MIB."; + } + + extension snmp-delete-value { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:substatement "tailf:snmp-send-delete-value"; + description + "This statement is used to define a value to be used in SNMP + to delete an optional leaf. The argument to this statement is the + special value. This special value must not be part of the value + space for the YANG leaf. + + If the optional leaf does not exists, reading it over SNMP returns + 'noSuchInstance', unless the statement 'tailf:snmp-send-delete-value' + is used, in which case the same value as used to delete the node + is returned. + + For example, the YANG leaf: + + leaf opt-int { + type int32 { + range '1..255'; + } + tailf:snmp-delete-value 0 { + tailf:snmp-send-delete-value; + } + } + + can be mapped to a SMI object with syntax: + + SYNTAX Integer32 (0..255) + + Setting such an object to '0' over SNMP will delete the node + from the datastore. If the node does not exsist, reading it over + SNMP will return '0'."; + } + + extension snmp-send-delete-value { + tailf:use-in "tailf:snmp-delete-value"; + description + "See tailf:snmp-delete-value."; + } + + /* + * SNMP NED statements + */ + + extension snmp-ned-set-before-row-modification { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + description + "If this statement is present on a leaf, it tells the SNMP NED + that if a column in the row is modified, and it is marked with + 'tailf:snmp-ned-modification-dependent', then the column marked + with 'tailf:snmp-ned-set-before-modification' needs to be set to + before the other column is modified. After all such + columns have been modified, the column marked with + 'tailf:snmp-ned-set-before-modification' is reset to its initial + value."; + } + + extension snmp-ned-modification-dependent { + tailf:use-in "leaf"; + description + "This statement is used on all columns in a table that + require the usage of the column marked with + tailf:snmp-ned-set-before-row-modification. + + This statement can be used on any column in a table where one + leaf is marked with tailf:snmp-ned-set-before-row-modification, + or a table that AUGMENTS such a table, or a table with a + foreign index in such a table."; + } + + extension snmp-ned-accessible-column { + argument leaf-name { + tailf:arg-type { + type union { + type tailf:identifier; + type int32; + } + } + } + tailf:use-in "list"; + description + "The name or subid number of an accessible column that is + instantiated in all table entries in a table. The column does + not have to be writable. The SNMP NED will use this column + when it uses GET-NEXT to loop through the list entries, and + when doing existence tests. + + If this column is not given, the SNMP NED uses the following + algorithm: + + 1. If there is a RowStatus column, it will be used. + 2. If an INDEX leaf is accessible, it will be used. + 3. Otherwise, use the first accessible column returned + by the SNMP agent."; + } + + extension snmp-ned-delete-before-create { + tailf:use-in "list"; + description + "This statement is used in a list to make the SNMP NED always send + deletes before creates. Normally, creates are sent before deletes."; + } + + extension snmp-ned-recreate-when-modified { + tailf:use-in "list"; + description + "This statement is used in a list to make the SNMP NED delete + and recreate the row when a column in the row is modified."; + } + + /* + * Java code generation statements + */ + + extension java-class-name { + argument name { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "refine"; + description + "Used to give another name than the default name to generated Java + classes. This statemement is typically used to avoid name conflicts + in the Java classes."; + } + + /* + * Common code generation statemements + */ + + extension code-name { + argument name { + tailf:arg-type { + type string; + } + } + tailf:use-in "enum"; + tailf:use-in "bit"; + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "rpc"; + tailf:use-in "identity"; + tailf:use-in "notification"; + tailf:use-in "tailf:action"; + description + "Used to give another name to the enum or node name in generated + header files. This statement is typically used to avoid name + conflicts if there is a data node with the same name as the + enumeration, if there are multiple enumerations in different + types with the same name but different values, or if there are + multiple node names that are mapped to the same name in the + header file."; + } + + /* + * Data modeling extensions + */ + + extension action { + argument name { + tailf:arg-type { + type tailf:identifier; + } + } + tailf:use-in "augment"; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "grouping"; + tailf:occurence "*"; + + tailf:substatement "description"; + tailf:substatement "input"; + tailf:substatement "output"; + tailf:substatement "status"; + tailf:substatement "tailf:actionpoint"; + tailf:substatement "tailf:alt-name"; + tailf:substatement "tailf:cli-mount-point"; + tailf:substatement "tailf:cli-configure-mode"; + tailf:substatement "tailf:cli-operational-mode"; + tailf:substatement "tailf:cli-oper-info"; + tailf:substatement "tailf:code-name"; + tailf:substatement "tailf:confirm-text"; + tailf:substatement "tailf:display-when"; + tailf:substatement "tailf:exec"; + tailf:substatement "tailf:hidden"; + tailf:substatement "tailf:info"; + tailf:substatement "tailf:info-html"; + description + "Defines an action (method) in the data model. + + When the action is invoked, the instance on which the action is + invoked is explicitly identified by an hierarchy of + configuration or state data. + + The action statement can have either a 'tailf:actionpoint' or a + 'tailf:exec' substatement. If the action is implemented as a + callback in an application daemon, 'tailf:actionpoint' is used, + whereas 'tailf:exec' is used for an action implemented as a + standalone executable (program or script). Additionally, 'action' + can have the same substatements as the standard YANG 'rpc' + statement, e.g., 'description', 'input', and 'output'. + + For example: + + container sys { + list interface { + key name; + leaf name { + type string; + } + tailf:action reset { + tailf:actionpoint my-ap; + input { + leaf after-seconds { + mandatory false; + type int32; + } + } + } + } + } + + We can also add a 'tailf:confirm-text', which defines a string to + be used in the user interfaces to prompt the user for + confirmation before the action is executed. The optional + 'tailf:confirm-default' and 'tailf:cli-batch-confirm-default' can be set + to control if the default is to proceed or to abort. The latter will only + be used during batch processing in the CLI (e.g. non-interactive mode). + + tailf:action reset { + tailf:actionpoint my-ap; + input { + leaf after-seconds { + mandatory false; + type int32; + } + } + tailf:confirm-text 'Really want to do this?' { + tailf:confirm-default true; + } + } + + The 'tailf:actionpoint' statement can have a 'tailf:opaque' + substatement, to define an opaque string that is passed to the + callback function. + + tailf:action reset { + tailf:actionpoint my-ap { + tailf:opaque 'reset-interface'; + } + input { + leaf after-seconds { + mandatory false; + type int32; + } + } + } + + When we use the 'tailf:exec' substatement, the argument to exec + specifies the program or script that should be executed. For + example: + + tailf:action reboot { + tailf:exec '/opt/sys/reboot.sh' { + tailf:args '-c $(context) -p $(path)'; + } + input { + leaf when { + type enumeration { + enum now; + enum 10secs; + enum 1min; + } + } + } + }"; + } + + extension actionpoint { + argument name { + tailf:arg-type { + type tailf:identifier; + } + } + tailf:use-in "rpc"; + tailf:use-in "tailf:action"; + tailf:use-in "refine"; + tailf:substatement "tailf:opaque"; + tailf:substatement "tailf:internal"; + description + "Identifies the callback in a data provider that implements the + action. See confd_lib_dp(3) for details on the API."; + } + + extension confirm-text { + argument text { + yin-element true; + tailf:arg-type { + type string; + } + } + tailf:use-in "rpc"; + tailf:use-in "tailf:action"; + tailf:substatement "tailf:confirm-default"; + tailf:substatement "tailf:cli-batch-confirm-default"; + description + "A string which is used in the user interfaces to prompt the user for + confirmation before the action is executed. The optional + 'confirm-default' and 'cli-batch-confirm-default' can be set to control + if the default is to proceed or to abort. The latter will only + be used during batch processing in the CLI (e.g. non-interactive mode)."; + } + + extension confirm-default { + argument name { + tailf:arg-type { + type boolean; + } + } + tailf:use-in "tailf:confirm-text"; + description + "Specifies if the default is to proceed or abort the action when a + confirm-text is set. If this value is not specified, a ConfD + global default value can be set in clispec(5)."; + } + + extension indexed-view { + tailf:use-in "list"; + tailf:substatement "tailf:auto-compact"; + description + "This element can only be used if the list has a single key of + an integer type. + + It is used to signal that lists instances uses an indexed view, + i.e., making it possible to insert a new list entry at a certain + position. If a list entry is inserted at a certain position, list + entries following this position are automatically renumbered by the + system, if needed, to make room for the new entry. + + This statement is mainly provided for backwards compatibility with + confspecs. New data models should consider using YANG's ordered-by + user statement instead."; + } + + extension auto-compact { + tailf:use-in "tailf:indexed-view"; + description + "If an indexed-view list is marked with this statement, it means that + the server will automatically renumber entires after a delete + operation so that the list entries are strictly monotonically + increasing, starting from 1, with no holes. New list entries + can either be insterted anywhere in the list, or created at the + end; but it is an error to try to create a list entry with a + key that would result in a hole in the sequence. + + For example, if the list has entries 1,2,3 it is an error to + create entry 5, but correct to create 4."; + } + + extension key-default { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "leaf"; + description + "Must be used for key leafs only. + + Specifies a value that the CLI and WebUI will use when a list entry is + created, and this key leaf is not given a value. + + If one key leaf has a key-default value, all key leafs that + follow this key leaf must also have key-default values."; + } + + extension error-info { + tailf:use-in "module"; + tailf:use-in "submodule"; + tailf:occurence "?"; + + tailf:substatement "description"; + tailf:substatement "leaf" { + tailf:occurence "*"; + } + tailf:substatement "leaf-list" { + tailf:occurence "*"; + } + tailf:substatement "list" { + tailf:occurence "*"; + } + tailf:substatement "container" { + tailf:occurence "*"; + } + tailf:substatement "choice" { + tailf:occurence "*"; + } + tailf:substatement "uses" { + tailf:occurence "*"; + } + description + "Declares a set of data nodes to be used in the NETCONF + element. + + A data provider can use one of the + confd_*_seterr_extended_info() functions (see confd_lib_dp(3)) + to set these data nodes on errors. + + This statement may be used multiple times. + + For example: + + tailf:error-info { + leaf severity { + type enumeration { + enum info; + enum error; + enum critical; + } + } + container detail { + leaf class { + type uint8; + } + leaf code { + type uint8; + } + } + }"; + } + + extension non-strict-leafref { + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:substatement "path" { + tailf:occurence "1"; + } + description + "This statement can be used in leafs and leaf-lists similar + to 'leafref', but allows reference to non-existing leafs, + and allows reference from config to non-config. + + This statement takes no argument, but expects the core YANG + statement 'path' as a substatement. The function 'deref' cannot + be used in the path, since it works on nodes of type leafref + only. + + The type of the leaf or leaf-list must be exactly the same + as the type of the target. + + This statement can be viewed as a substitute for a standard + 'require-instance false' on leafrefs, which isn't allowed. + + The CLI uses this statement to provide completion with + existing values, and the WebUI uses it to provide a + drop-down box with existing values."; + } + + /* + * RPC and action implementation statements + */ + + extension exec { + argument cmd { + tailf:arg-type { + type string; + } + } + tailf:use-in "rpc"; + tailf:use-in "tailf:action"; + + tailf:substatement "tailf:args"; + tailf:substatement "tailf:uid"; + tailf:substatement "tailf:gid"; + tailf:substatement "tailf:wd"; + tailf:substatement "tailf:global-no-duplicate"; + tailf:substatement "tailf:raw-xml"; + tailf:substatement "tailf:interruptible"; + tailf:substatement "tailf:interrupt"; + description + "Specifies that the rpc or action is implemented as an OS executable. + The argument 'cmd' is the path to the executable file. If the + command is in the $PATH of ConfD, the 'cmd' can be just the name + of the executable."; + } + + extension args { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "tailf:exec"; + description + "Specifies arguments to send to the executable when it is invoked by + ConfD. The argument 'value' is a space separated list of + argument strings. It may contain variables on the form + $(variablename). These variables will be expanded before the + command is executed. The following variables are always available: + + $(user) The name of the user which runs the operation. + + $(groups) A comma separated string of the names of the groups + the user belongs to. + + $(ip) The source ip address of the user session. + + $(uid) The user id of the user. + + $(gid) The group id of the user. + + When the parent 'exec' statement is a substatement of 'action', the + following additional variablenames are available: + + $(keypath) The path that identifies the parent container of 'action' + in string keypath form, e.g., + '/sys:host{earth}/interface{eth0}'. + + $(path) The path that identifies the parent container of 'action' + in CLI path form, e.g., 'host earth interface eth0'. + + $(context) cli | webui | netconf | any string provided by MAAPI + + For example: + args '-user $(user) $(uid)'; + might expand to: + -user bob 500 + "; + } + + extension raw-xml { + tailf:use-in "tailf:exec"; + tailf:substatement "tailf:batch"; + description + "Specifies that ConfD should not convert the RPC XML parameters to + command line arguments. Instead, ConfD just passes the raw XML on + stdin to the program. + + This statement is not allowed in 'tailf:action'."; + } + + extension interruptible { + argument value { + tailf:arg-type { + type boolean; + default "true"; + } + } + tailf:use-in "tailf:exec"; + description + "Specifies whether the client can abort the + execution of the executable."; + } + + extension interrupt { + argument signal { + tailf:arg-type { + type enumeration { + enum sigkill; + enum sigint; + enum sigterm; + } + default "sigkill"; + } + } + tailf:use-in "tailf:exec"; + description + "This statement specifies which signal is sent to executable by ConfD + in case the client terminates or aborts the execution. + + If not specified, 'sigkill' is sent."; + } + + + extension uid { + argument value { + tailf:arg-type { + type union { + type enumeration { + enum confd { + description + "The command is run as the same user id as the ConfD daemon."; + } + enum user { + description + "The command is run as the same user id as the user logged + in to ConfD. This user id MUST exist as an actual user id + in the underlying operating system."; + } + enum root { + description + "The command is run as root."; + } + } + type uint32; + } + } + } + tailf:use-in "tailf:exec"; + description + "Specifies which user id to use when executing the command. + + If 'uid' is an integer value, the command is run as the user with + this user id. + + If 'uid' is set to either 'user', 'root' or an integer user id, the + ConfD daemon must have been started as root (or setuid), or the + ConfD executable program 'cmdwrapper' must have setuid root + permissions."; + } + + extension gid { + argument value { + tailf:arg-type { + type union { + type enumeration { + enum confd { + description + "The command is run as the same group id as the ConfD daemon."; + } + enum user { + description + "The command is run as the same group id as the user logged + in to ConfD. This group id MUST exist as an actual group id + in the underlying operating system."; + } + enum root { + description + "The command is run as root."; + } + } + type uint32; + } + } + } + tailf:use-in "tailf:exec"; + description + "Specifies which group id to use when executing the command. + + If 'gid' is an integer value, the command is run as the group with + this group id. + + If 'gid' is set to either 'user', 'root' or an integer group id, the + ConfD daemon must have been started as root (or setuid), or the + ConfD executable program 'cmdwrapper' must have setuid root + permissions."; + } + + extension wd { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "tailf:exec"; + description + "Specifies which working directory to use when executing the + command. If not given the command is executed from the homedir + of the user logged in to ConfD."; + } + + extension global-no-duplicate { + argument value { + tailf:arg-type { + type string; + } + } + tailf:use-in "tailf:exec"; + description + "Specifies that only one instance with the same name can be run at any + one time in the system. The command can be started either from + the CLI, the WebUI or through NETCONF. If a client tries to + execute this command while another operation with the same + 'global-no-duplicate' name is running, a 'resource-denied' error is + generated."; + } + + extension batch { + tailf:use-in "tailf:raw-xml"; + description + "Specifies that the command returns immediately, but still runs in the + background."; + } + + /* + * Deprecated types + */ + + typedef hex-list { + type string { + pattern '(([0-9a-fA-F]){2}(:([0-9a-fA-F]){2})*)?'; + } + status deprecated; + description + "DEPRECATED: Use yang:hex-string instead. There are no plans to remove + tailf:hex-list. + + A list of colon-separated hexa-decimal octets e.g. '4F:4C:41:71'. + + The statement tailf:value-length can be used to restrict the number + of octets. Note that using the 'length' restriction limits the + number of characters in the lexical representation."; + } + + /* + * Deprecated statements + */ + + extension symlink { + argument name { + tailf:arg-type { + type tailf:identifier; + } + } + status deprecated; + tailf:use-in "list"; + tailf:use-in "container"; + tailf:use-in "module"; + tailf:use-in "submodule"; + tailf:use-in "augment"; + tailf:use-in "case"; + tailf:occurence "*"; + + tailf:substatement "status"; + tailf:substatement "tailf:alt-name"; + tailf:substatement "tailf:cli-add-mode"; + tailf:substatement "tailf:cli-allow-join-with-key"; + tailf:substatement "tailf:cli-allow-join-with-value"; + tailf:substatement "tailf:cli-allow-key-abbreviation"; + tailf:substatement "tailf:cli-allow-range"; + tailf:substatement "tailf:cli-allow-wildcard"; + tailf:substatement "tailf:cli-autowizard"; + tailf:substatement "tailf:cli-boolean-no"; + tailf:substatement "tailf:cli-break-sequence-commands"; + tailf:substatement "tailf:cli-column-align"; + tailf:substatement "tailf:cli-column-stats"; + tailf:substatement "tailf:cli-column-width"; + tailf:substatement "tailf:cli-compact-stats"; + tailf:substatement "tailf:cli-compact-syntax"; + tailf:substatement "tailf:cli-completion-actionpoint"; + tailf:substatement "tailf:cli-custom-error"; + tailf:substatement "tailf:cli-custom-range"; + tailf:substatement "tailf:cli-custom-range-actionpoint"; + tailf:substatement "tailf:cli-custom-range-enumerator"; + tailf:substatement "tailf:cli-delayed-auto-commit"; + tailf:substatement "tailf:cli-delete-container-on-delete"; + tailf:substatement "tailf:cli-delete-when-empty"; + tailf:substatement "tailf:cli-diff-dependency" { + tailf:occurence "*"; + } + tailf:substatement "tailf:cli-disabled-info"; + tailf:substatement "tailf:cli-disallow-value"; + tailf:substatement "tailf:cli-display-empty-config"; + tailf:substatement "tailf:cli-display-separated"; + tailf:substatement "tailf:cli-drop-node-name"; + tailf:substatement "tailf:cli-no-keyword"; + tailf:substatement "tailf:cli-enforce-table"; + tailf:substatement "tailf:cli-embed-no-on-delete"; + tailf:substatement "tailf:cli-exit-command"; + tailf:substatement "tailf:cli-explicit-exit"; + tailf:substatement "tailf:cli-expose-key-name"; + tailf:substatement "tailf:cli-expose-ns-prefix"; + tailf:substatement "tailf:cli-flat-list-syntax"; + tailf:substatement "tailf:cli-flatten-container"; + tailf:substatement "tailf:cli-full-command"; + tailf:substatement "tailf:cli-full-no"; + tailf:substatement "tailf:cli-full-show-path"; + tailf:substatement "tailf:cli-hide-in-submode"; + tailf:substatement "tailf:cli-ignore-modified"; + tailf:substatement "tailf:cli-incomplete-command"; + tailf:substatement "tailf:cli-incomplete-no"; + tailf:substatement "tailf:cli-incomplete-show-path"; + tailf:substatement "tailf:cli-instance-info-leafs"; + tailf:substatement "tailf:cli-key-format"; + tailf:substatement "tailf:cli-list-syntax"; + tailf:substatement "tailf:cli-min-column-width"; + tailf:substatement "tailf:cli-mode-name"; + tailf:substatement "tailf:cli-mode-name-actionpoint"; + tailf:substatement "tailf:cli-multi-value"; + tailf:substatement "tailf:cli-multi-word-key"; + tailf:substatement "tailf:cli-multi-line-prompt"; + tailf:substatement "tailf:cli-no-key-completion"; + tailf:substatement "tailf:cli-no-match-completion"; + tailf:substatement "tailf:cli-no-name-on-delete"; + tailf:substatement "tailf:cli-no-value-on-delete"; + tailf:substatement "tailf:cli-oper-info"; + tailf:substatement "tailf:cli-optional-in-sequence"; + tailf:substatement "tailf:cli-prefix-key"; + tailf:substatement "tailf:cli-preformatted"; + tailf:substatement "tailf:cli-range-delimiters"; + tailf:substatement "tailf:cli-range-list-syntax"; + tailf:substatement "tailf:cli-recursive-delete"; + tailf:substatement "tailf:cli-remove-before-change"; + tailf:substatement "tailf:cli-reset-container"; + tailf:substatement "tailf:cli-run-template"; + tailf:substatement "tailf:cli-run-template-enter"; + tailf:substatement "tailf:cli-run-template-footer"; + tailf:substatement "tailf:cli-run-template-legend"; + tailf:substatement "tailf:cli-sequence-commands"; + tailf:substatement "tailf:cli-show-config"; + tailf:substatement "tailf:cli-show-no"; + tailf:substatement "tailf:cli-show-order-tag"; + tailf:substatement "tailf:cli-show-order-taglist"; + tailf:substatement "tailf:cli-show-template"; + tailf:substatement "tailf:cli-show-template-enter"; + tailf:substatement "tailf:cli-show-template-footer"; + tailf:substatement "tailf:cli-show-template-legend"; + tailf:substatement "tailf:cli-show-with-default"; + tailf:substatement "tailf:cli-strict-leafref"; + tailf:substatement "tailf:cli-suppress-key-abbreviation"; + tailf:substatement "tailf:cli-suppress-key-sort"; + tailf:substatement "tailf:cli-suppress-list-no"; + tailf:substatement "tailf:cli-suppress-mode"; + tailf:substatement "tailf:cli-suppress-no"; + tailf:substatement "tailf:cli-suppress-range"; + tailf:substatement "tailf:cli-suppress-shortenabled"; + tailf:substatement "tailf:cli-suppress-show-conf-path"; + tailf:substatement "tailf:cli-suppress-show-match"; + tailf:substatement "tailf:cli-suppress-show-path"; + tailf:substatement "tailf:cli-suppress-silent-no"; + tailf:substatement "tailf:cli-suppress-validation-warning-prompt"; + tailf:substatement "tailf:cli-suppress-wildcard"; + tailf:substatement "tailf:cli-table-footer"; + tailf:substatement "tailf:cli-table-legend"; + tailf:substatement "tailf:cli-trim-default"; + tailf:substatement "tailf:cli-value-display-template"; + tailf:substatement "tailf:display-when"; + tailf:substatement "tailf:hidden" { + tailf:occurence "*"; + } + tailf:substatement "tailf:inherit-set-hook"; + tailf:substatement "tailf:info"; + tailf:substatement "tailf:info-html"; + tailf:substatement "tailf:path" { + tailf:occurence "1"; + } + tailf:substatement "tailf:snmp-exclude-object"; + tailf:substatement "tailf:snmp-name" { + tailf:occurence "*"; + } + tailf:substatement "tailf:snmp-oid"; + tailf:substatement "tailf:sort-priority"; + description + "DEPRECATED: Use tailf:link instead. There are no plans to remove + tailf:symlink. + + This statement defines a 'symbolic link' from a node to some other node. + The argument is the name of the new node, and the mandatory substatement + 'tailf:path' points to the node which is linked to."; + } + + extension path { + argument path { + tailf:arg-type { + type string; + } + } + status deprecated; + tailf:occurence "1"; + tailf:use-in "tailf:symlink"; + description + "This statement specifies which node a symlink points to. + + The textual format of a symlink is an XPath absolute location path. If + the target lies within lists, all keys must be specified. + A key either has a value, or is a reference to a key in the path of the + source node, using the function current() as starting + point for an XPath location path. For example: + + /a/b[k1='paul'][k2=current()/../k]/c + "; + } + + /* + * Tail-f internal statements + */ + + extension internal { + tailf:use-in "tailf:callpoint"; + tailf:use-in "tailf:validate"; + tailf:use-in "tailf:actionpoint"; + description + "For internal ConfD / NCS use only."; + } + + extension junos-val-as-xml-tag { + tailf:use-in "leaf"; + description + "Internal extension to handle non-YANG JUNOS data models. + Use only for key enumeration leafs."; + } + + extension junos-val-with-prev-xml-tag { + tailf:use-in "leaf"; + description + "Internal extension to handle non-YANG JUNOS data models. + Use only for keys where previous key is marked with + 'tailf:junos-val-as-xml-tag'."; + } + + extension xpath-root { + argument value { + tailf:arg-type { + type uint8; + } + } + tailf:use-in "must"; + tailf:use-in "when"; + tailf:use-in "path"; + tailf:use-in "tailf:display-when"; + tailf:use-in "tailf:cli-diff-dependency"; + description + "Internal extension to 'chroot' XPath expressions"; + } + + extension ncs-device-type { + argument type { + tailf:arg-type { + type string; + } + } + tailf:use-in "container"; + tailf:use-in "list"; + tailf:use-in "leaf"; + tailf:use-in "leaf-list"; + tailf:use-in "refine"; + description + "Internal extension to tell NCS what type of device the data model + is used for."; + } + + extension structure { + argument name { + tailf:arg-type { + type tailf:identifier; + } + } + tailf:use-in "module"; + tailf:use-in "submodule"; + tailf:occurence "*"; + + tailf:substatement "description"; + tailf:substatement "leaf" { + tailf:occurence "*"; + } + tailf:substatement "leaf-list" { + tailf:occurence "*"; + } + tailf:substatement "list" { + tailf:occurence "*"; + } + tailf:substatement "container" { + tailf:occurence "*"; + } + tailf:substatement "choice" { + tailf:occurence "*"; + } + tailf:substatement "uses" { + tailf:occurence "*"; + } + description + "Internal extension to define a data structure without any semantics + attached."; + } + +} \ No newline at end of file diff --git a/experimental/odp/tailf-meta-extensions.yang b/experimental/odp/tailf-meta-extensions.yang new file mode 100644 index 000000000..1581d52bc --- /dev/null +++ b/experimental/odp/tailf-meta-extensions.yang @@ -0,0 +1,133 @@ +submodule tailf-meta-extensions { + + belongs-to tailf-common { + prefix tailf; + } + + organization "Tail-f Systems"; + + description + "This submodule defines Tail-f YANG meta extensions statements."; + + revision 2013-11-07 { + description + "Released as part of ConfD-5.0. + + Added tailf:occurrence."; + } + + revision 2010-08-19 { + description + "Released as part of ConfD-3.3.1. + + Added tailf:snmp-identifier."; + } + + revision 2010-03-18 { + description + "Released as part of ConfD-3.2."; + } + + /* + * Types used to describe the extension statements' arguments. + */ + + typedef identifier { + type string { + pattern "[A-Za-z_][A-Za-z0-9_-]*"; + } + } + + typedef snmp-identifier { + type string { + pattern "[A-Za-z_][A-Za-z0-9_-]*(:[A-Za-z_][A-Za-z0-9_-]*)*"; + } + } + + typedef tailf-oid { + type string { + pattern "(([0-1](\.[1-3]?[0-9]))" + + "|(2.(0|([1-9]\d*)))" + + "|([A-Za-z_][A-Za-z0-9_-]*))?" + + "(\.(0|([1-9]\d*)))+"; + } + } + + /* + * Descriptive meta extensions + */ + + extension use-in { + argument name { + tailf:arg-type { + type string; + } + } + tailf:use-in "extension"; + tailf:occurence "*"; + description + "Specifies in which statements a particular extension statement can be + used."; + } + + extension substatement { + argument name { + tailf:arg-type { + type string; + } + } + tailf:use-in "extension"; + tailf:occurence "*"; + + tailf:substatement "tailf:occurence"; + description + "Specifies which statements can occur as substatement to the + given statement."; + } + + extension arg-type { + tailf:use-in "argument"; + tailf:substatement "type" { + tailf:occurence "1"; + } + tailf:substatement "default"; + description + "Specifies the type of the argument."; + } + + extension occurence { + argument value { + tailf:arg-type { + type enumeration { + enum "QuestionMark" { + description + "The extenstion may be given zero or one time. + This is the default."; + } + enum "*" { + description + "The extenstion may be given zero or multiple times."; + } + enum "+" { + description + "The extenstion must be given at least once."; + } + enum "1" { + description + "The extenstion must be given exactly once."; + } + } + } + } + tailf:use-in "extension"; + description + "Specifices how an extension statement may be used. + + If this statement is given as a substatement to 'extension', + it applies to all 'use-in' statements. + + If this statement is given as a substatement to 'tailf:substatement', + it applies to this substatement."; + } + +} \ No newline at end of file diff --git a/experimental/odp/ted@2013-10-21.yang b/experimental/odp/ted@2013-10-21.yang new file mode 100644 index 000000000..91d835908 --- /dev/null +++ b/experimental/odp/ted@2013-10-21.yang @@ -0,0 +1,306 @@ +module ted { + yang-version 1; + namespace "urn:TBD:params:xml:ns:yang:network:ted"; + // replace with IANA namespace when assigned + prefix ted; + + import ietf-inet-types { + prefix inet; + revision-date 2013-07-15; + } + + organization "TBD"; + contact + "TBD"; + description + "Helper module to hold TED attributes for OSPF/ISIS"; + + revision 2013-10-21 { + + description + "Initial revision"; + } + + typedef switching-capabilities { + description + "Switching Capabilities of an interface."; + reference + "RFC 5307: IS-IS Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS)"; + type enumeration { + enum "PSC-1" { + description + "Packet-Switch Capable-1 (PSC-1)"; + value 1; + } + enum "PSC-2" { + description + "Packet-Switch Capable-2 (PSC-2)"; + value 2; + } + enum "PSC-3" { + description + "Packet-Switch Capable-3 (PSC-3)"; + value 3; + } + enum "PSC-4" { + description + "Packet-Switch Capable-4 (PSC-4)"; + value 4; + } + enum "L2SC" { + description + "Layer-2 Switch Capable (L2SC)"; + value 51; + } + enum "TDM" { + description + "Time-Division-Multiplex Capable (TDM)"; + value 100; + } + enum "LSC" { + description + "Lambda-Switch Capable (LSC)"; + value 150; + } + enum "FSC" { + description + + "Fiber-Switch Capable (FSC)"; + value 200; + } + } + } + + typedef pcc-capabilities { + description + "Path Computation Capabilities."; + reference + "RFC 5088, draft-ietf-pce-disco-protoc-isis-07.txt + OSPF/ISIS Protocol Extensions for Path Computation Element (PCE) Discovery."; + type bits { + bit path-computation-with-gmpls-link-constraints { + position 0; + } + bit bidirectional-path-computation { + position 1; + } + bit diverse-path-computation { + position 2; + } + bit load-balanced-path-computation { + position 3; + } + bit synchronized-path-computation { + position 4; + } + bit support-for-multiple-objective-functions { + position 5; + } + bit support-for-additive-path-constraints { + position 6; + } + bit support-for-request-prioritization { + position 7; + } + bit support-for-multiple-requests-per-message { + position 8; + } + } + } + + grouping ted-node-attributes { + description + "Identifier to uniquely identify a node in TED"; + reference "RFC 5305, RFC 6119: IPv6 Traffic Engineering in IS-IS/OSPF"; + leaf te-router-id-ipv4 { + + description + "Globally unique IPv4 Traffic Engineering Router ID."; + type inet:ipv4-address; + } + leaf te-router-id-ipv6 { + description + "Globally unique IPv6 Traffic Engineering Router ID"; + type inet:ipv6-address; + } + list ipv4-local-address { + description + "List of IPv4 Local Address(OSPF). RFC 5786"; + key "ipv4-prefix"; + leaf ipv4-prefix { + description + "Local IPv4 address for the node"; + type inet:ipv4-prefix; + } + } + list ipv6-local-address { + description + "List of IPv6 Local Address."; + reference + "RFC 5786: Advertising a Router's Local Addresses + in OSPF Traffic Engineering (TE) Extensions"; + key "ipv6-prefix"; + leaf ipv6-prefix { + description + "Local IPv6 address for the node"; + type inet:ipv6-prefix; + } + leaf prefix-option { + description + "IPv6 prefix option."; + type uint8; + } + } + leaf pcc-capabilities { + description + "OSPF/ISIS PCC capabilities"; + type pcc-capabilities; + } + } + + grouping ted-link-attributes { + description + "TED Attributes associated with the link."; + reference "RFC 3630, RFC 3784: IS-IS / OSPF Traffic Engineering (TE)"; + + leaf color { + description + "Administrative group or color of the link"; + type uint32; + } + leaf max-link-bandwidth { + description + "Maximum bandwidth that can be see on this link in this direction. Units in bytes per second"; + type decimal64 { + fraction-digits 2; + } + } + leaf max-resv-link-bandwidth { + description + "Maximum amount of bandwidth that can be reserved in this direction in this link. Units in bytes per second"; + type decimal64 { + fraction-digits 2; + } + } + list unreserved-bandwidth { + description + "Unreserved bandwidth for 0-7 priority levels. Units in bytes per second"; + max-elements "8"; + key "priority"; + leaf priority { + type uint8 { + range "0..7"; + } + } + leaf bandwidth { + description + "Unreserved bandwidth for this level"; + type decimal64 { + fraction-digits 2; + } + } + } + leaf te-default-metric { + description + "Traffic Engineering Metric"; + type uint32; + } + container srlg { + description + "Shared Risk Link Group Attributes"; + uses srlg-attributes; + } + } + + grouping srlg-attributes { + description + "Shared Risk Link Group Attributes"; + reference + "RFC 5307, RFC 4203: ISIS / OSPF Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS)"; + list interface-switching-capabilities { + description + "List of interface capabilities for this interface"; + key "switching-capability"; + leaf switching-capability { + description + "Switching Capability for this interface"; + type ted:switching-capabilities; + } + leaf encoding { + description + "Encoding supported by this interface"; + type uint8; + } + list max-lsp-bandwidth { + description + "Maximum LSP Bandwidth at priorities 0-7"; + max-elements "8"; + key "priority"; + leaf priority { + type uint8 { + range "0..7"; + } + } + leaf bandwidth { + description + "Max LSP Bandwidth for this level"; + type decimal64 { + fraction-digits 2; + } + } + } + container packet-switch-capable { + when "../switching-capability = PSC-1 or ../switching-capability = PSC-2 or ../switching-capability = PSC-3 or ../switching-capability = PSC-4"; + description + "Interface has packet-switching capabilities"; + leaf minimum-lsp-bandwidth { + description + "Minimum LSP Bandwidth. Units in bytes per second"; + type decimal64 { + fraction-digits 2; + } + + } + leaf interface-mtu { + description + "Interface MTU"; + type uint16; + } + } + container time-division-multiplex-capable { + when "../switching-capability = TDM"; + description + "Interface has time-division multiplex capabilities"; + leaf minimum-lsp-bandwidth { + description + "Minimum LSP Bandwidth. Units in bytes per second"; + type decimal64 { + fraction-digits 2; + } + } + leaf indication { + description + "Indication whether the interface supports Standard or Arbitrary SONET/SDH"; + type uint16; + } + } + } + list srlg-values { + description + "List of Shared Risk Link Group this interface belongs to."; + key "srlg-value"; + leaf srlg-value { + description + "Shared Risk Link Group value"; + type uint32; + } + } + leaf link-protection-type { + description + "Link Protection Type desired for this link"; + type uint16; + } + } +} diff --git a/experimental/odp/toaster-app-config.yang b/experimental/odp/toaster-app-config.yang new file mode 100644 index 000000000..369ba463e --- /dev/null +++ b/experimental/odp/toaster-app-config.yang @@ -0,0 +1,33 @@ +module toaster-app-config { + yang-version 1; + + namespace "urn:opendaylight:params:xml:ns:yang:controller:toaster-app-config"; + prefix toaster-app-config; + + import toaster { prefix toaster; revision-date 2009-11-20; } + + description + "Configuration for the Opendaylight toaster application."; + + revision "2016-05-03" { + description + "Initial revision."; + } + + container toaster-app-config { + leaf manufacturer { + type toaster:DisplayString; + default "Opendaylight"; + } + + leaf model-number { + type toaster:DisplayString; + default "Model 1 - Binding Aware"; + } + + leaf max-make-toast-tries { + type uint16; + default 2; + } + } +} \ No newline at end of file diff --git a/experimental/odp/toaster-consumer-impl.yang b/experimental/odp/toaster-consumer-impl.yang deleted file mode 100644 index d24d62520..000000000 --- a/experimental/odp/toaster-consumer-impl.yang +++ /dev/null @@ -1,81 +0,0 @@ -// vi: set smarttab et sw=4 tabstop=4: -module toaster-consumer-impl { - - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:config:toaster-consumer:impl"; - prefix "toaster-consumer-impl"; - - import config { prefix config; revision-date 2013-04-05; } - import rpc-context { prefix rpcx; revision-date 2013-06-17; } - - import toaster-consumer { prefix toaster-consumer; revision-date 2014-01-31; } - import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; } - - description - "This module contains the base YANG definitions for - toaster-consumer impl implementation."; - - revision "2014-01-31" { - description - "Initial revision."; - } - - // This is the definition of a service implementation - identity toaster-consumer-impl { - base config:module-type; - config:provided-service toaster-consumer:toaster-consumer; - config:java-name-prefix ToasterConsumer; - } - - augment "/config:modules/config:module/config:configuration" { - case toaster-consumer-impl { - when "/config:modules/config:module/config:type = 'toaster-consumer-impl'"; - - container rpc-registry { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity mdsal:binding-rpc-registry; - } - } - } - - container notification-service { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity mdsal:binding-notification-service; - } - } - } - - } - } - - augment "/config:modules/config:module/config:state" { - case toaster-consumer-impl { - when "/config:modules/config:module/config:type = 'toaster-consumer-impl'"; - rpcx:rpc-context-instance "make-hash-brown-toast-rpc"; - } - } - - identity make-hash-brown-toast-rpc; - - rpc make-hash-brown-toast { - input { - uses rpcx:rpc-context-ref { - refine context-instance { - rpcx:rpc-context-instance make-hash-brown-toast-rpc; - } - } - leaf doneness { - type uint16; - } - } - output { - leaf result { - type boolean; - } - } - } -} diff --git a/experimental/odp/toaster-consumer.yang b/experimental/odp/toaster-consumer.yang deleted file mode 100644 index 1353c832a..000000000 --- a/experimental/odp/toaster-consumer.yang +++ /dev/null @@ -1,26 +0,0 @@ -// vi: set smarttab et sw=4 tabstop=4: -module toaster-consumer { - - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:config:toaster-consumer"; - prefix "toaster-consumer"; - - import config { prefix config; revision-date 2013-04-05; } - - description - "This module contains the base YANG definitions for - toaster-consumer services."; - - revision "2014-01-31" { - description - "Initial revision."; - } - - // This is the definition of a service - identity toaster-consumer { - - base "config:service-type"; - - config:java-class "org.opendaylight.controller.sample.toaster.provider.api.ToastConsumer"; - } -} diff --git a/experimental/odp/toaster-provider-impl.yang b/experimental/odp/toaster-provider-impl.yang deleted file mode 100644 index d6de5cfd1..000000000 --- a/experimental/odp/toaster-provider-impl.yang +++ /dev/null @@ -1,89 +0,0 @@ -// vi: set smarttab et sw=4 tabstop=4: -module toaster-provider-impl { - - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:config:toaster-provider:impl"; - prefix "toaster-provider-impl"; - - import config { prefix config; revision-date 2013-04-05; } - import rpc-context { prefix rpcx; revision-date 2013-06-17; } - import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; } - - description - "This module contains the base YANG definitions for - toaster-provider impl implementation."; - - revision "2014-01-31" { - description - "Initial revision."; - } - - // This is the definition of the service implementation as a module identity. - identity toaster-provider-impl { - base config:module-type; - - // Specifies the prefix for generated java classes. - config:java-name-prefix ToasterProvider; - } - - // Augments the 'configuration' choice node under modules/module. - augment "/config:modules/config:module/config:configuration" { - case toaster-provider-impl { - when "/config:modules/config:module/config:type = 'toaster-provider-impl'"; - - container rpc-registry { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity mdsal:binding-rpc-registry; - } - } - } - - container notification-service { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity mdsal:binding-notification-service; - } - } - } - - container data-broker { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity mdsal:binding-data-broker; - } - } - } - } - } - - augment "/config:modules/config:module/config:state" { - case toaster-provider-impl { - when "/config:modules/config:module/config:type = 'toaster-provider-impl'"; - - leaf toasts-made { - type uint32; - } - - rpcx:rpc-context-instance "clear-toasts-made-rpc"; - } - } - - identity clear-toasts-made-rpc; - - rpc clear-toasts-made { - description - "JMX call to clear the toasts-made counter."; - - input { - uses rpcx:rpc-context-ref { - refine context-instance { - rpcx:rpc-context-instance clear-toasts-made-rpc; - } - } - } - } -} diff --git a/experimental/odp/toaster-provider.yang b/experimental/odp/toaster-provider.yang deleted file mode 100644 index eec069e00..000000000 --- a/experimental/odp/toaster-provider.yang +++ /dev/null @@ -1,26 +0,0 @@ -// vi: set smarttab et sw=4 tabstop=4: -module toaster-provider { - - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:config:toaster-provider"; - prefix "toaster-provider"; - - import config { prefix config; revision-date 2013-04-05; } - - description - "This module contains the base YANG definitions for - toaster-provider services."; - - revision "2014-01-31" { - description - "Initial revision."; - } - - // This is the definition of a service - identity toaster-provider { - - base "config:service-type"; - - config:java-class "org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToasterData"; - } -} diff --git a/experimental/odp/topology-lldp-discovery-config.yang b/experimental/odp/topology-lldp-discovery-config.yang new file mode 100644 index 000000000..205cb2754 --- /dev/null +++ b/experimental/odp/topology-lldp-discovery-config.yang @@ -0,0 +1,40 @@ +module topology-lldp-discovery-config { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology-lldp-discovery:config"; + prefix "topology-lldp-discovery-config"; + + description + "Configuration for Topology LLDP discovery application."; + + revision "2016-05-11" { + description + "Initial revision."; + } + + typedef non-zero-uint32-type { + type uint32 { + range "1..max"; + } + } + + container topology-lldp-discovery-config { + leaf lldp-secure-key { + description "Provided key will be used to generate LLDP custom security hash"; + type string; + mandatory true; + } + + leaf topology-lldp-interval { + description "Periodic interval for sending LLDP packet for link discovery"; + type non-zero-uint32-type; + default 5000; + } + + leaf topology-lldp-expiration-interval { + description "Timeout duration for LLDP response message"; + type non-zero-uint32-type; + default 60000; + } + + } +} \ No newline at end of file diff --git a/experimental/odp/topology-tunnel-p2p.yang b/experimental/odp/topology-tunnel-p2p.yang new file mode 100644 index 000000000..7fd981a32 --- /dev/null +++ b/experimental/odp/topology-tunnel-p2p.yang @@ -0,0 +1,72 @@ +module topology-tunnel-p2p { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:tunnel:p2p"; + prefix "p2p"; + + import network-topology { prefix nt; revision-date 2013-10-21; } + import topology-tunnel { prefix tt; revision-date 2013-08-19; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the point-to-point extensions to the + base tunnel topology model. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2013-08-19" { + description + "Initial revision."; + reference ""; + } + + grouping tunnel-p2p-type { + container p2p-tunnel { + presence "indicates a link is a point-to-point tunnel"; + } + } + + augment "/nt:network-topology/nt:topology/nt:link/tt:tunnel-types" { + uses tunnel-p2p-type; + } + + grouping tunnel-p2p-path-hops { + leaf order { + type uint32; + mandatory true; + } + } + + grouping tunnel-p2p-path-cfg-attributes { + list explicit-hops { + uses tunnel-p2p-path-hops; + key order; + + leaf loose { + type boolean; + mandatory true; + } + } + } + + grouping tunnel-p2p-path-oper-attributes { + list reported-hops { + config false; + uses tunnel-p2p-path-hops; + key order; + } + } + + augment "/nt:network-topology/nt:topology/tt:paths" { + when "../path-types/p2p-tunnel"; + uses tunnel-p2p-path-cfg-attributes; + uses tunnel-p2p-path-oper-attributes; + } +} + diff --git a/experimental/odp/topology-tunnel-pcep-config.yang b/experimental/odp/topology-tunnel-pcep-config.yang new file mode 100644 index 000000000..a03bfeb66 --- /dev/null +++ b/experimental/odp/topology-tunnel-pcep-config.yang @@ -0,0 +1,51 @@ +// vi: set smarttab et sw=4 tabstop=4: +module topology-tunnel-pcep-config { + yang-version 1.1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:tunnel:pcep:config"; + prefix ttpc; + + import network-topology { prefix nt; revision-date 2013-10-21; } + import topology-tunnel-pcep { prefix ttp; revision-date 2018-11-09; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + + description + "This module contains the PCEP Tunnel config extensions to base topology model. + Copyright (c)2017 AT&T Services, Inc. All rights reserved.; + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + organization "AT&T Services, Inc."; + contact "Claudio D. Gasparini "; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision "2017-11-27" { + description + "Initial revision."; + } + + grouping topology-ref { + leaf pcep-topology-reference { + description "An absolute reference to a topology instance."; + type leafref { + path "/nt:network-topology/nt:topology/nt:topology-id"; + require-instance true; + } + } + } + + augment "/nt:network-topology/nt:topology" { + when "nt:topology-types/ttp:topology-tunnel-pcep"; + ext:augment-identifier pcep-tunnel-topology-config; + description "Augment Pcep topology with session config"; + + uses topology-ref; + } +} \ No newline at end of file diff --git a/experimental/odp/topology-tunnel-pcep-programming.yang b/experimental/odp/topology-tunnel-pcep-programming.yang new file mode 100644 index 000000000..794e4c9f5 --- /dev/null +++ b/experimental/odp/topology-tunnel-pcep-programming.yang @@ -0,0 +1,71 @@ +module topology-tunnel-pcep-programming { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:tunnel:pcep:programming"; + prefix "ttpp"; + + import pcep-types { prefix pcep; revision-date 2018-11-09; } + import topology-tunnel-programming { prefix ttp; revision-date 2013-09-30; } + import topology-tunnel-p2p { prefix p2p; revision-date 2013-08-19; } + import topology-tunnel-pcep { prefix ptp; revision-date 2018-11-09; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the programming extensions for tunnel + topologies. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision "2013-10-30" { + description + "Initial revision."; + reference ""; + } + + rpc pcep-create-p2p-tunnel { + input { + uses ttp:create-p2p-tunnel-input; + + uses p2p:tunnel-p2p-path-cfg-attributes; + uses ptp:tunnel-pcep-link-cfg-attributes; + } + output { + uses ttp:create-p2p-tunnel-output; + } + } + + rpc pcep-destroy-tunnel { + input { + uses ttp:destroy-tunnel-input; + } + output { + uses ttp:destroy-tunnel-output; + } + } + + rpc pcep-update-tunnel { + input { + uses ttp:base-tunnel-input; + + uses p2p:tunnel-p2p-path-cfg-attributes; + uses ptp:tunnel-pcep-link-cfg-attributes; + } + + output { + uses ttp:base-tunnel-output; + } + } +} + diff --git a/experimental/odp/topology-tunnel-pcep.yang b/experimental/odp/topology-tunnel-pcep.yang new file mode 100644 index 000000000..a1a5c0734 --- /dev/null +++ b/experimental/odp/topology-tunnel-pcep.yang @@ -0,0 +1,120 @@ +module topology-tunnel-pcep { + // vi: set et smarttab sw=4 tabstop=4: + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:tunnel:pcep"; + prefix "pceptun"; + + import network-topology { prefix nt; revision-date 2013-10-21; } + import network-concepts { prefix netc; revision-date 2013-11-25; } + import pcep-types { prefix pcep; revision-date 2018-11-09; } + import rsvp { prefix rsvp; revision-date 2015-08-20; } + import topology-tunnel { prefix tt; revision-date 2013-08-19; } + import topology-tunnel-p2p { prefix p2p; revision-date 2013-08-19; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the PCEP extensions to base tunnel + topology model. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2018-11-09" { + description + "P2MP extension."; + reference "RFC8306"; + } + + revision "2013-08-20" { + description + "Initial revision."; + reference ""; + } + + grouping topology-tunnel-pcep-type { + container topology-tunnel-pcep { + presence "indicates a PCEP tunnel-aware topology"; + } + } + + augment "/nt:network-topology/nt:topology/nt:topology-types" { + uses topology-tunnel-pcep-type; + } + + grouping tunnel-pcep-supporting-node-attributes { + container path-computation-client { + leaf controlling { + type boolean; + default false; + } + } + } + + augment "/nt:network-topology/nt:topology/nt:node/nt:supporting-node" { + when "../../../nt:topology-types/topology-tunnel-pcep"; + + uses tunnel-pcep-supporting-node-attributes; + } + + grouping tunnel-pcep-type { + container pcep-tunnel { + presence "indicates a link is a PCEP tunnel"; + } + } + + augment "/nt:network-topology/nt:topology/nt:link/tt:tunnel-types" { + uses tunnel-pcep-type; + } + + grouping tunnel-pcep-link-cfg-attributes { + leaf symbolic-path-name { + type string; + } + + leaf class-type { + type pcep:class-type; + } + + leaf bandwidth { + type netc:bandwidth; + } + + uses rsvp:tunnel-attributes; + } + + grouping tunnel-pcep-link-oper-attributes { + + } + + grouping tunnel-pcep-path-attributes { + + } + + augment "/nt:network-topology/nt:topology/nt:link" { + when "../../tunnel-types/pcep-tunnel"; + uses tunnel-pcep-link-cfg-attributes; + uses tunnel-pcep-link-oper-attributes; + } + + augment "/nt:network-topology/nt:topology/tt:paths" { + when "../../tunnel-types/pcep-tunnel"; + uses tunnel-pcep-path-attributes; + } + + augment "/nt:network-topology/nt:topology/tt:paths/p2p:explicit-hops" { + when "../../tunnel-types/pcep-tunnel"; + uses rsvp:explicit-route-subobjects; + } + + augment "/nt:network-topology/nt:topology/tt:paths/p2p:reported-hops" { + when "../../tunnel-types/pcep-tunnel"; + uses rsvp:record-route-subobjects; + } +} + diff --git a/experimental/odp/topology-tunnel-programming.yang b/experimental/odp/topology-tunnel-programming.yang new file mode 100644 index 000000000..9e6cf0321 --- /dev/null +++ b/experimental/odp/topology-tunnel-programming.yang @@ -0,0 +1,90 @@ +module topology-tunnel-programming { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:tunnel:programming"; + prefix "ttp"; + + import network-topology { prefix nt; revision-date 2013-10-21; } + import network-topology-programming { prefix tp; revision-date 2013-11-02; } + import topology-tunnel { prefix tt; revision-date 2013-08-19; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the programming extensions for tunnel + topologies. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2013-09-30" { + description + "Initial revision."; + reference ""; + } + + grouping base-tunnel-input { + uses tp:topology-instruction-input; + + leaf link-id { + type nt:link-id; + mandatory true; + } + } + + grouping base-tunnel-output { + uses tp:topology-instruction-output; + } + + grouping create-tunnel-input { + uses tp:topology-instruction-input; + } + + grouping create-tunnel-output { + uses base-tunnel-output; + + leaf link-id { + type nt:link-id; + mandatory true; + } + } + + grouping destroy-tunnel-input { + uses base-tunnel-input; + } + + grouping destroy-tunnel-output { + uses base-tunnel-output; + } + + grouping tp-reference { + leaf node { + type nt:node-ref; + mandatory true; + } + leaf tp { + type nt:tp-ref; + mandatory true; + } + } + + grouping create-p2p-tunnel-input { + uses create-tunnel-input; + + container destination { + uses tp-reference; + } + container source { + uses tp-reference; + } + } + + grouping create-p2p-tunnel-output { + uses create-tunnel-output; + } +} + diff --git a/experimental/odp/topology-tunnel-sr.yang b/experimental/odp/topology-tunnel-sr.yang new file mode 100644 index 000000000..e1d29fe5d --- /dev/null +++ b/experimental/odp/topology-tunnel-sr.yang @@ -0,0 +1,57 @@ +module topology-tunnel-sr { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:tunnel:sr"; + prefix "tun-sr"; + + import network-topology-sr { prefix sr; revision-date 2013-08-19; } + import network-topology { prefix nt; revision-date 2013-10-21; } + import topology-tunnel { prefix tt; revision-date 2013-08-19; } + import topology-tunnel-p2p { prefix p2p; revision-date 2013-08-19; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the Segment Routing extensions to + base tunnel topology model. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2013-08-19" { + description + "Initial revision."; + reference ""; + } + + grouping tunnel-sr-type { + container sr-tunnel { + presence "indicates a link is a Segment Routed tunnel"; + } + } + + grouping tunnel-sr-path-p2p-hop-attributes { + leaf segment-id { + type sr:segment-id; + } + } + + augment "/nt:network-topology/nt:topology/tt:paths/tt:path-types" { + uses tunnel-sr-type; + } + + augment "/nt:network-topology/nt:topology/tt:paths/p2p:explicit-hops" { + when "../../tunnel-types/sr-tunnel"; + uses tunnel-sr-path-p2p-hop-attributes; + } + + augment "/nt:network-topology/nt:topology/tt:paths/p2p:reported-hops" { + when "../../path-types/sr-tunnel"; + uses tunnel-sr-path-p2p-hop-attributes; + } +} + diff --git a/experimental/odp/topology-tunnel.yang b/experimental/odp/topology-tunnel.yang new file mode 100644 index 000000000..1f6dc84ef --- /dev/null +++ b/experimental/odp/topology-tunnel.yang @@ -0,0 +1,107 @@ +module topology-tunnel { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:topology:tunnel"; + prefix "tt"; + + import ietf-inet-types { prefix inet; revision-date 2013-07-15; } + import network-topology { prefix nt; revision-date 2013-10-21; } + + organization "Cisco Systems, Inc."; + contact "Robert Varga "; + + description + "This module contains the tunnel extension of the base topology + model. A tunnel is a link between two nodes, which is not a + direct adjacency, but rather is formed by one or more paths + routed through the network. + + Copyright (c)2013 Cisco Systems, Inc. All rights reserved. + + This program and the accompanying materials are made available + under the terms of the Eclipse Public License v1.0 which + accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html"; + + revision "2013-08-19" { + description + "Initial revision."; + reference ""; + } + + typedef path-id { + type inet:uri; + description + "Identifier of a single path. The identifier does not + carry any semantic meaning beyond uniquely identifying + a path."; + } + + typedef path-ref { + type leafref { + path "/nt:network-topology/nt:topology/paths/path-id"; + } + } + + grouping topology-tunnel-type { + container topology-tunnel { + presence "indicates a tunnel-aware topology"; + } + } + + augment "/nt:network-topology/nt:topology/nt:topology-types" { + uses topology-tunnel-type; + } + + augment "/nt:network-topology/nt:topology" { + when "../../nt:topology-types/topology-tunnel"; + + list "paths" { + config false; + + leaf path-id { + type path-id; + } + key path-id; + + container path-types { + description + "A path can have multiple traits, each + of which is indicated by a presence + container under this one. Such + containers should not carry any data."; + } + } + } + + grouping tunnel-link-attributes { + description + "A topology link which is actually a tunnel has + additional attributes."; + + container tunnel-types { + config false; + + description + "A tunnel can have multiple traits, each of + which is indicated by a presence container + under this one. Such containers should not + carry any data."; + } + + leaf-list paths { + description + "List of paths associated with this tunnel. + The exact relationship between the tunnel + and these paths is technology-specific."; + + config false; + type path-ref; + } + } + + augment "/nt:network-topology/nt:topology/nt:link" { + when "../../nt:topology-types/topology-tunnel"; + uses tunnel-link-attributes; + } +} + diff --git a/experimental/odp/upgrade-config.yang b/experimental/odp/upgrade-config.yang new file mode 100644 index 000000000..553ef9668 --- /dev/null +++ b/experimental/odp/upgrade-config.yang @@ -0,0 +1,24 @@ +/* +Copyright (c) 2018 Red Hat Inc. and others. All rights reserved. + +This program and the accompanying materials are made available under the +terms of the Eclipse Public License v1.0 which accompanies this distribution, +and is available at http://www.eclipse.org/legal/epl-v10.html +*/ + +module odl-serviceutils-upgrade { + yang-version 1.1; + namespace "urn:opendaylight:serviceutils:upgrade"; + prefix 'srv-upgrade'; + + revision "2018-07-02" { + description "Serviceutils upgrade config models"; + } + + container upgrade-config { + leaf upgradeInProgress { + type boolean; + default false; + } + } +} diff --git a/experimental/odp/v3po.yang b/experimental/odp/v3po.yang new file mode 100644 index 000000000..6333ec58d --- /dev/null +++ b/experimental/odp/v3po.yang @@ -0,0 +1,839 @@ +module v3po { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:v3po"; + prefix "v3po"; + + revision "2016-12-14" { + description + "This revision adds the following new features: + - ingress/egress ACLs support + - moved ACL definitions to vpp-acl module + - updated l2 container constraint (permit IP address on BVI interface) + - added PID of vpp process to vpp-state + - added support for Loopback interfaces + - added support for port mirroring"; + } + + revision "2015-01-05" { + description "Initial revision of v3po model"; + } + + import iana-if-type { + prefix "ianaift"; + } + import ietf-interfaces { + prefix "if"; + } + import ietf-yang-types { + prefix "yang"; + } + import ietf-inet-types { + prefix "inet"; + } + import ietf-ip { + prefix "ip"; + } + import yang-ext { + prefix "ext"; + } + import vpp-classfier-acl { + prefix "vpp-classfier-acl"; + } + + typedef bridge-domain-ref { + type leafref { + path "/vpp/bridge-domains/bridge-domain/name"; + } + description + "This type is used by to reference a bridge domain table"; + } + + typedef bridged-virtual-interface-ref { + type leafref { + path "/if:interfaces/if:interface/l2/bridged-virtual-interface"; + } + description + "This type is used by to reference a bridged virtual interface"; + } + + identity vxlan-tunnel { + base if:interface-type; + } + + identity gre-tunnel { + base if:interface-type; + } + + identity vhost-user { + base if:interface-type; + } + + identity tap { + base if:interface-type; + } + + identity loopback { + base if:interface-type; + } + + identity l2-fib-action { + description "Base identity for l2-fib actions"; + } + + identity l2-fib-forward { + base l2-fib-action; + description + "Forwards packet with configured mac address"; + } + + identity l2-fib-filter { + base l2-fib-action; + description + "Drops packet with configured mac address"; + } + + typedef l2-fib-action { + type identityref { + base "l2-fib-action"; + } + description "Identifies a specific L2 FIB action"; + } + + typedef vxlan-vni { + // FIXME: should be in a vxlan-specific model + description "VNI used in a VXLAN tunnel"; + type uint32 { + range "0..16777215"; + } + } + + typedef vhost-user-role { + type enumeration { + enum "server"; + enum "client"; + } + } + + identity vxlan-gpe-tunnel { + base if:interface-type; + } + + typedef vxlan-gpe-vni { + description "VNI used in a VXLAN-GPE tunnel"; + type uint32 { + range "0..16777215"; + } + } + + typedef vxlan-gpe-next-protocol { + type enumeration { + enum "ipv4" { + value 1; + } + enum "ipv6" { + value 2; + } + enum "ethernet" { + value 3; + } + enum "nsh" { + value 4; + } + } + } + + + typedef span-state { + type enumeration { + enum "receive" { + value "1"; + description + "Receive (Rx) SPAN—The goal of receive (or ingress) SPAN + is to monitor as much as possible all the packets received by the source interface. + A copy of each packet received by the source is sent to the destination port for that SPAN session. + You can monitor a series or range of ingress ports in a SPAN session."; + } + + enum "transmit" { + value "2"; + description + "Transmit (Tx) SPAN—The goal of transmit (or egress) SPAN is to monitor as much as possible all the packets + sent by the source interface after all modification and processing is performed by the switch. + A copy of each packet sent by the source is sent to the destination port for that SPAN session. + The copy is provided after the packet is modified. Monitors a range of egress ports in a SPAN session."; + } + + enum "both" { + value "3"; + description + "In a SPAN session, you can monitor a series or range of ports for both received and sent packets."; + } + } + } + + grouping bridge-domain-attributes { + leaf flood { + type boolean; + default true; + description + "Enable/disable L2 flooding."; + } + leaf forward { + type boolean; + default true; + description + "Enable/disable L2 forwarding."; + } + leaf learn { + type boolean; + default true; + description + "Enable/disable L2 learning."; + } + leaf unknown-unicast-flood { + type boolean; + default true; + } + leaf arp-termination { + type boolean; + default false; + } + + container arp-termination-table { + when "../v3po:arp-termination = 'true'"; + + // TODO(HONEYCOMB-133): add support for read (after VPP-230 is done) + list arp-termination-table-entry { + key "ip-address phys-address"; + leaf ip-address { + // FIXME: change to ip-address-no-zone after https://bugs.opendaylight.org/show_bug.cgi?id=6413 is resolved + type inet:ip-address; + } + leaf phys-address { + type yang:phys-address; + } + } + } + } + + // TODO express constraints for L2 FIB entries in YANG if possible + grouping l2-fib-attributes { + container l2-fib-table { + list l2-fib-entry { + key "phys-address"; + + leaf phys-address { + type yang:phys-address; + } + + leaf outgoing-interface { + // either filter must be specified or interface(can't be both) + when "../action != 'l2-fib-filter'"; + type if:interface-ref; + // mandatory true; - when is not actually resolved, so mandatory can't be in place + description + "One of interfaces assigned to the FIB table's bridge-domain."; + } + leaf static-config { + type boolean; + default false; + description + "Static entries cannot be overridden by mac learning."; + } + leaf action { + type l2-fib-action; + mandatory true; + description + "L2 FIB action. For filter action, entry must be configured as static."; + } + leaf bridged-virtual-interface { + when "../action = 'forward'"; + type boolean; + config false; // FIXME setting bvi is currently not supported by VPP's binary api + } + } + } + } + + grouping interface-tag { + leaf tag { + type string { + length 1..63; + } + description + "ASCII string placeholder for interface metadata. Value is stored in vpp, + and returned in read requests. No processing involved."; + } + } + + grouping tap-interface-base-attributes { + leaf tap-name { + type string{ + pattern "[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*"; + } + } + uses interface-tag; + } + + grouping tap-interface-config-attributes { + leaf mac { + type yang:phys-address; + mandatory false; + description "Mac address to be set for the tap interface. Random will be used if not configured"; + } + + leaf device-instance { + type uint32; + mandatory false; + description "Custom device instance. Autogenerated will be used if not configured"; + } + } + + grouping loopback-interface-base-attributes { + leaf mac { + type yang:phys-address; + mandatory false; + description "Mac address of the loopback interface"; + } + } + + grouping ethernet-base-attributes { + leaf mtu { + type uint16 { + range "64..9216"; + } + units "octets"; + default 9216; + description + "The size, in octets, of the largest packet that the + hardware interface will send and receive."; + } + } + + grouping routing-base-attributes { + leaf ipv4-vrf-id { + type uint32; + } + leaf ipv6-vrf-id { + type uint32; + } + description + "Defines VRF tables used for ipv4 and ipv6 traffic"; + } + + grouping ethernet-state-attributes { + leaf manufacturer-description { + type string; + config false; + } + leaf duplex { + type enumeration { + enum "half"; + enum "full"; + } + config false; + } + } + + grouping vhost-user-interface-base-attributes { + leaf socket { + type string { + length 1..255; + } + } + leaf role { + type vhost-user-role; + default "server"; + } + uses interface-tag; + description "vhost-user settings"; + } + + grouping vhost-user-interface-config-attributes { + leaf device-instance { + type uint32; + mandatory false; + description "Custom device instance. Autogenerated will be used if not configured"; + } + description "vhost-user settings"; + } + + grouping vhost-user-interface-state-attributes { + leaf features { + type uint64; + config false; + } + leaf virtio-net-hdr-size { + type uint32; + config false; + } + leaf num-memory-regions { + type uint32; + config false; + } + leaf connect-error { + type string; + config false; + } + } + + /* + * Defines the supported decap node for vxlan. + */ + identity decap-node { + description + "Define the supported decap node"; + } + identity l2-input { + base decap-node; + description + "The next decap node is l2-input"; + } + identity nsh-proxy { + base decap-node; + description + "The next decap node is nsh-proxy"; + } + typedef vxlan-decap-node { + type identityref { + base "decap-node"; + } + } + grouping vxlan-base-attributes { + // FIXME: this should be in an vxlan-specific extension + leaf src { + /*mandatory true;*/ + type inet:ip-address; + } + leaf dst { + /*mandatory true;*/ + type inet:ip-address; + } + leaf vni { + /*mandatory true;*/ + type vxlan-vni; + } + leaf encap-vrf-id { + type uint32; + } + leaf decap-next { + type vxlan-decap-node; + default "l2-input"; + } + } + + grouping gre-base-attributes { + leaf src { + /*mandatory true;*/ + type inet:ip-address; + } + leaf dst { + /*mandatory true;*/ + type inet:ip-address; + } + leaf outer-fib-id { + type uint32; + } + } + + grouping vxlan-gpe-base-attributes { + leaf local { + /*mandatory true;*/ + type inet:ip-address; + } + leaf remote { + /*mandatory true;*/ + type inet:ip-address; + } + leaf vni { + /*mandatory true;*/ + type vxlan-gpe-vni; + } + leaf next-protocol { + type vxlan-gpe-next-protocol; + } + leaf encap-vrf-id { + type uint32; + } + leaf decap-vrf-id { + type uint32; + } + } + + grouping l2-base-attributes { + description + "Parameters for configuring Layer2 features on interfaces."; + + choice interconnection { + case xconnect-based { + leaf xconnect-outgoing-interface { + /* Don't allow selection of this interface */ + must "../../if:name != current()"; + type if:interface-ref; // todo use interface-state-ref for operational data? + description + "L2 xconnect mode"; + } + } + case bridge-based { + leaf bridge-domain { + type bridge-domain-ref; + mandatory true; + description + "Interfaces in a bridge-domain forward packets to other + interfaces in the same bridge-domain based on + destination mac address."; + } + leaf split-horizon-group { + when "../bridge-domain"; + type uint8 { + range "0..255"; + } + default 0; //no split horizon group + description + "Interface's split-horizon group. Interfaces in the same + bridge-domain and split-horizon group can not forward + packets between each other. "; + } + leaf bridged-virtual-interface { + when "../bridge-domain"; + type boolean; + default false; + description + "Interface forward packets in the bridge-domain + associated with the BVI."; + } + } + } + } + + grouping proxy-arp-attributes { + description + "Parameters for configuring Proxy ARP on interfaces."; + + leaf vrf-id { + type uint32; + default 0; + } + leaf low-addr { + type inet:ipv4-address; + } + leaf high-addr { + type inet:ipv4-address; + } + } + + grouping span-attributes { + description "Parameters of the SPAN feature"; + + container mirrored-interfaces { + list mirrored-interface { + key "iface-ref"; + leaf iface-ref { + type if:interface-ref; // todo use interface-state-ref for operational data? + } + + leaf state { + type span-state; + mandatory true; + } + } + } + } + + augment /if:interfaces/if:interface { + ext:augment-identifier "vpp-interface-augmentation"; + + // FIXME using ietf-interfaces model for vpp interfaces makes it hard to implement because: + // 1. The link between interface type and this augmentation is unclear + // 2. Only this augmentation with combination of ifc type is trigger to do something for vpp, what if user only configures base interface stuff ? + We need to get leaves defined by ietf-interfaces when we are processing this augment + // 3. The ietf-interfaces model does not define groupings which makes types reuse difficult + + container tap { + when "../if:type = 'v3po:tap'"; + uses tap-interface-base-attributes; + uses tap-interface-config-attributes; + } + + container loopback { + presence "Presence of this container indicates loopback nature of the interface"; + when "../if:type = 'v3po:loopback'"; + uses loopback-interface-base-attributes; + } + + container ethernet { + when "../if:type = 'ianaift:ethernetCsmacd'"; + uses ethernet-base-attributes; + } + + container routing { + uses routing-base-attributes; + } + + container vhost-user { + when "../if:type = 'v3po:vhost-user'"; + uses vhost-user-interface-base-attributes; + uses vhost-user-interface-config-attributes; + } + + container vxlan { + when "../if:type = 'v3po:vxlan-tunnel'"; + uses vxlan-base-attributes; + } + + container gre { + when "../if:type = 'v3po:gre-tunnel'"; + uses gre-base-attributes; + } + + container l2 { + must "bridged-virtual-interface = 'true' or " + + "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " + + "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))"; + + uses l2-base-attributes; + } + + container vxlan-gpe { + when "../if:type = 'v3po:vxlan-gpe-tunnel'"; + + uses vxlan-gpe-base-attributes; + } + + container proxy-arp { + uses proxy-arp-attributes; + } + + container acl { + container ingress { + uses vpp-classfier-acl:acl-base-attributes; + } + container egress { + uses vpp-classfier-acl:acl-base-attributes; + } + } + + container ietf-acl { + container ingress { + uses vpp-classfier-acl:ietf-acl-base-attributes; + } + container egress { + uses vpp-classfier-acl:ietf-acl-base-attributes; + } + } + + container span { + uses span-attributes; + } + } + + container vpp { + description + "VPP config data"; + + container bridge-domains { + list bridge-domain { + key "name"; + + leaf name { + type string; + } + + uses bridge-domain-attributes; + uses l2-fib-attributes; + + description + "bridge-domain configuration"; + } + } + } + + augment /if:interfaces-state/if:interface { + ext:augment-identifier "vpp-interface-state-augmentation"; + + leaf description { + type string; + } + + container tap { + when "../if:type = 'v3po:tap'"; + uses tap-interface-base-attributes; + } + + container ethernet { + when "../if:type = 'ianaift:ethernetCsmacd'"; + uses ethernet-base-attributes; + uses ethernet-state-attributes; + } + + container routing { + uses routing-base-attributes; + } + + container vhost-user { + when "../if:type = 'v3po:vhost-user'"; + uses vhost-user-interface-base-attributes; + uses vhost-user-interface-state-attributes; + } + + container vxlan { + when "../if:type = 'v3po:vxlan-tunnel'"; + uses vxlan-base-attributes; + } + container vxlan-gpe { + when "../if:type = 'v3po:vxlan-gpe-tunnel'"; + + uses vxlan-gpe-base-attributes; + } + + container gre { + when "../if:type = 'gre-tunnel'"; + uses gre-base-attributes; + } + + container l2 { + must "bridged-virtual-interface = 'true' or " + + "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " + + "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))"; + + uses l2-base-attributes; + } + + container proxy-arp { + uses proxy-arp-attributes; + } + + container acl { + container ingress { + uses vpp-classfier-acl:acl-base-attributes; + } + container egress { + uses vpp-classfier-acl:acl-base-attributes; + } + } + + container ietf-acl { + container ingress { + uses vpp-classfier-acl:ietf-acl-base-attributes; + } + container egress { + uses vpp-classfier-acl:ietf-acl-base-attributes; + } + } + + container span { + uses span-attributes; + } + } + + augment /if:interfaces-state/if:interface/if:statistics { + ext:augment-identifier "vpp-interface-statistics-augmentation"; + leaf in-errors-no-buf { + type yang:counter64; + } + leaf in-errors-miss { + type yang:counter64; + } + leaf out-discards-fifo-full { + type yang:counter64; + } + } + + container vpp-state { + config false; + + description + "VPP operational data"; + + container bridge-domains { + // FIXME: Should this live in bridge-domain.yang in a modular fashion ? + list bridge-domain { + + key "name"; + leaf name { + type string; + } + + uses bridge-domain-attributes; + uses l2-fib-attributes; + + description + "bridge-domain operational data"; + } + } + + container version { + leaf name { + type string; + } + leaf build-directory { + type string; + } + leaf build-date { + type string; + } + leaf branch { + type string; + } + leaf pid { + type uint32; + description + "PID of the vpp process"; + } + description + "vlib version info"; + } + } + + // VPP Notifications + + typedef interface-status { + type enumeration { + enum up { + value 1; + } + enum down { + value 0; + } + } + } + + typedef interface-name-or-index { + type union { + type string; + type uint32; + } + } + + notification interface-state-change { + leaf name { + type interface-name-or-index; + } + + leaf admin-status { + type interface-status; + } + + leaf oper-status { + type interface-status; + } + } + + notification interface-deleted { + leaf name { + type interface-name-or-index; + } + } + + rpc cli-inband { + input { + leaf cmd { + type string; + } + } + output { + leaf reply { + type string; + } + } + } +} diff --git a/experimental/odp/vbridge-topology.yang b/experimental/odp/vbridge-topology.yang new file mode 100644 index 000000000..cbe682fbf --- /dev/null +++ b/experimental/odp/vbridge-topology.yang @@ -0,0 +1,174 @@ +module vbridge-topology { + // vi: set et smarttab sw=4 tabstop=4: + + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:vbridge:topology"; + prefix "vbridge"; + + organization "Cisco Systems, Inc."; + + contact "Robert Varga "; + + description + "Base model describing a virtual bridge domain mapped expressed + as a network topology. Implementations of this model are expected + to map this topology onto an underlay transport/management topology, + such as a NETCONF topology talking to forwarding boxes + + Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v1.0 which accompanies this distribution, + and is available at http://www.eclipse.org/legal/epl-v10.html"; + + revision "2016-01-29" { + description "Initial cut"; + } + + import network-topology { prefix nt; revision-date 2013-10-21; } + import odl-external-reference { prefix extref; } + import v3po { prefix "v3po"; revision-date "2017-06-07"; } + import yang-ext { prefix ext; revision-date "2013-07-09"; } + + identity tunnel-type { + description "Type of tunneling technology"; + } + + typedef tunnel-type-ref { + description "Reference to a tunneling technology"; + type identityref { + base tunnel-type; + } + } + + augment "/nt:network-topology/nt:topology/nt:topology-types" { + ext:augment-identifier "topology-types-vbridge-augment"; + container vbridge-topology { + presence "Indicates that this topology is a virtual bridge domain topology"; + } + } + + augment "/nt:network-topology/nt:topology" { + ext:augment-identifier "topology-vbridge-augment"; + when "./nt:topology-types/vbridge-topology"; + + // Pointer to the NETCONF topology which supports this bridge domain + // FIXME: must "../../nt:underlay-topology"; + + leaf tunnel-type { + description "Tunnel technology to use for encapsulation"; + type tunnel-type-ref; + } + + choice tunnel-parameters { + description "Empty container which will be augmented with + parameters specific to a particular underlay + tunnel technology"; + } + + uses v3po:bridge-domain-attributes; + } + + augment "/nt:network-topology/nt:topology/nt:node" { + ext:augment-identifier "node-vbridge-augment"; + when "../nt:topology-types/vbridge-topology"; + + + container bridge-member { + presence "Indicates this node is part of the bridge domain"; + + // Pointer to the NETCONF node which supports this bridge member + must "../../nt:supporting-node"; + + // FIXME: this is implementation specific, depends on whether + // the underlay has an a concept of a bridge domain. + leaf supporting-bridge-domain { + description + "Reference to the network element bridge domain, which has + been configured to support this virtual bridge domain on + this bridge member. + + This reference needs to be resolved against the supporting + node's configuration data store."; + config false; + type extref:external-reference; + } + } + } + + augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point" { + ext:augment-identifier "termination-point-vbridge-augment"; + when "../bridge-member"; + + choice interface-type { + leaf user-interface { + description + "Reference to the network element interface, which is + configured to be a member of this virtual bridge domain. + + This reference needs to be resolved against the supporting + node's configuration data store."; + type extref:external-reference; + mandatory true; + } + leaf tunnel-interface { + description + "Reference to the network element interface, which is + configured to on the member to support exchange of packet + passing through this virtual bridge domain towards other + domain members. + + This reference needs to be resolved against the supporting + node's configuration data store."; + config false; + type extref:external-reference; + mandatory true; + } + } + } + + augment "/nt:network-topology/nt:topology" { + ext:augment-identifier "topology-vbridge-cfg-augment"; + when "class = 'vbridge-startup-config'"; + + container vbridge-startup-config { + presence "Label for startup config."; + description "Topology used for displaying startup + VBridge nodes configuration defined in ODL."; + } + } + + augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point" { + ext:augment-identifier "termination-point-vbridge-cfg-augment"; + when "../../vbridge-startup-config"; + + choice interface-type-cfg { + case virtual-domain-carrier-case { + container virtual-domain-carrier { + presence "Label for startup config."; + description + "Reference to the physical network element interface, which + can be used as a super interface for VLAN sub-interfaces + or which IP address can be specified as a source or destination + of encapsulated VXLAN traffic."; + config false; + } + } + } + } + + augment "/nt:network-topology/nt:topology/nt:link" { + when "../nt:topology-types/vbridge-topology"; + ext:augment-identifier "link-vbridge-augment"; + leaf tunnel { + description + "Reference to the network element tunnel interface supporting + cross-connect between two bridge members. + + This reference needs to be resolved against the supporting + node's operational data store."; + config false; + type extref:external-reference; + } + } +} diff --git a/experimental/odp/vpn-rpc.yang b/experimental/odp/vpn-rpc.yang new file mode 100644 index 000000000..1b83391df --- /dev/null +++ b/experimental/odp/vpn-rpc.yang @@ -0,0 +1,90 @@ +module vpn-rpc { + namespace "urn:opendaylight:netvirt:vpn:rpc"; + prefix "vpn-rpc"; + + revision "2016-02-01" { + description "VPN Service RPC Module"; + } + + /* RPCs */ + rpc add-static-route { + description "Creates a static route in a VPN, creating a new label if needed"; + input { + leaf vpnInstanceName { + mandatory true; + type string; + } + leaf destination { + mandatory true; + type string; + } + leaf nexthop { + description "Ip-address of the nexthop. The RPC will check if this nexthop is the endpoint + of a VPN in an InterVpnLink"; + mandatory true; + type string; + } + leaf label { + description "Label for the static route. It can be left empty, in that case a new + label will be autogenerated"; + type uint32; + } + } + output { + leaf label { + description "The auto-generated label, if applies"; + type uint32; + } + } + } + + rpc remove-static-route { + description "Removes a static route in a VPN, identified by this vpn name, destination and nexthop. + Nextop is optional. If specified, the RPC will just remove one of the nexthops in the + route (ECMP feature). If not specified, the whole route will be removed"; + input { + leaf vpnInstanceName { + mandatory true; + type string; + } + leaf destination { + mandatory true; + type string; + } + leaf nexthop { + description "Ip-address of the nexthop. If specified, just one nexthop will be removed. Removing + the last nexthop in a route, will provoke the removal of the whole route"; + type string; + } + } + } + + rpc generate-vpn-label { + description "to generate label for the given ip prefix from the associated VPN"; + input { + leaf vpn-name { + type string; + } + leaf ip-prefix { + type string; + } + } + output { + leaf label { + type uint32; + } + } + } + + rpc remove-vpn-label { + description "to remove label for the given ip prefix from the associated VPN"; + input { + leaf vpn-name { + type string; + } + leaf ip-prefix { + type string; + } + } + } +} diff --git a/experimental/odp/vpnmanager-config.yang b/experimental/odp/vpnmanager-config.yang new file mode 100644 index 000000000..8541379cd --- /dev/null +++ b/experimental/odp/vpnmanager-config.yang @@ -0,0 +1,48 @@ +module vpn-config { + yang-version 1; + namespace "urn:opendaylight:netvirt:vpn:config"; + prefix "vpn-config"; + + description + "Configuration for vpnmanager"; + + revision "2016-11-30" { + description + "Initial revision"; + } + + container vpn-config { + config true; + leaf migrate-ip-cache-size { + description "Migrate IP cache size"; + type uint64; + default 10000; + } + leaf ip-learn-timeout { + description "IP learning timeout value (unit - ms)"; + type uint32; + default 2000; + } + leaf subnet-route-punt-timeout { + description "hard timeout value for learnt flows for subnet route punts (unit - seconds). + To turn off the rate limiting and installation of learnt flows, it should be set to 0"; + type uint32; + default 10; + } + leaf ipv6-nd-monitor-failure-threshold { + description "IPv6 ND monitor failure threshold"; + type uint32; + default 2; + } + leaf ipv6-nd-monitor-interval { + description "IPv6 ND monitor interval (unit - secs)"; + type uint32; + default 120; + } + leaf ipv6-nd-monitor-window { + description "IPv6 ND monitor window"; + type uint32; + default 4; + } + } +} diff --git a/experimental/odp/vpp-classfier-acl.yang b/experimental/odp/vpp-classfier-acl.yang new file mode 100644 index 000000000..42550d95d --- /dev/null +++ b/experimental/odp/vpp-classfier-acl.yang @@ -0,0 +1,163 @@ +module vpp-classfier-acl { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:vpp:classfier:acl"; + prefix "vpp-classfier-acl"; + + revision "2016-12-14" { + description + "Initial revision of vpp-classfier-acl model."; + } + + import ietf-access-control-list { + prefix "acl"; + } + + import vpp-classifier { + prefix "vpp-classifier"; + } + + import yang-ext { + prefix "ext"; + } + + import ietf-packet-fields { + prefix packet-fields; + } + + identity mixed-acl { + base acl:acl-base; + description + "ACL that can match on any of L2/L3/L4 fields."; + } + + typedef interface-mode { + type enumeration { + enum "l2"; + enum "l3"; + } + } + + grouping acl-base-attributes { + description + "Defines references to classify tables. + At least one table reference should be specified."; + container l2-acl { + leaf classify-table { + type vpp-classifier:classify-table-ref; + description + "An L2 ACL table"; + } + } + container ip4-acl { + leaf classify-table { + type vpp-classifier:classify-table-ref; + description + "An IPv4 ACL table"; + } + } + container ip6-acl { + leaf classify-table { + type vpp-classifier:classify-table-ref; + description + "An IPv6 ACL table"; + } + } + } + + grouping ietf-acl-base-attributes { + description + "Provides limited support for ietf-acl model."; + + container access-lists { + description + "Defines references to ietf-acl lists. + ACLs are translated into classify tables and sessions when assigned to interface. + + In case of L2 interfaces, acls are translated into a chain of classify tables and assigned as L2 table. + In case of L3 interfaces, acls are translated into ip4 and ip6 chains (eth only rules go to both chains, + rest - depending on ip-version). + User ordering is preserved in both cases. + + Assignment update/delete removes all created tables and sessions and repeats process described above. + Update/delete of ACL lists referenced here is not permitted (assignment needs to be removed first). + + Read is supported only for acls that were created and assigned by Honeycomb agent + (corresponding metadata is present). + + Extensions: + - mixing ACEs of different type in one list is permited + - mixing L2/L3/L4 rules in one ACE is permited + + Limitations (due to vpp limitations): + - egress rules are currently ignored (HONEYCOMB-234) + - L4 rules support is limited (every port pair from provided ranges is translated to single classify + session; which can very slow or even crash vpp if ranges are big, see HONEYCOMB-260) + - ace-ip-version needs to be provided for all aces (consequence of posibility to mix ACEs of different types, + and vpp classfier api limitation: common header fields for IP4/IP6 have different offsets) + - L2 rules on L3 interfaces are applied only to IP traffic (vpp classfier limitation) + - vlan tags are supported only for sub-interfaces defined as exact-match"; + + list acl { + key "type name"; + ordered-by user; + + leaf type { + type acl:acl-type; + } + + leaf name { + type acl:access-control-list-ref; + } + } + + leaf default-action { + type enumeration { + enum "deny"; + enum "permit"; + } + default "deny"; + description + "Default action applied to packet that does not match any of rules defined in assigned ACLs. + It is translated to single classify table and applied at the end of assigned chains."; + } + + leaf mode { + type interface-mode; + default l3; + description + "The way ACLs are translated depends on the interface mode. + In case of L2 interfaces (bridge/interconnection) + classify tables are assigned as l2_table using input_acl_set_interface (ether type matching is automatically + added in case of L3 rules). + In case of L3 interfaces, classify tables are assigned as ip4/ip6 tables. + + It is the user responsibility to choose mode that matches target interface. + "; + } + } + } + + augment /acl:access-lists/acl:acl/acl:access-list-entries/acl:ace/acl:matches/acl:ace-type { + ext:augment-identifier "vpp-classfier-acl-type-augmentation"; + case ace-ip-and-eth { + description + "Access List entry that can define both ip and eth rules."; + container ace-ip-and-eth-nodes { + + choice ace-ip-version { + description + "IP version used in this Access List Entry."; + mandatory true; + case ace-ipv4 { + uses packet-fields:acl-ipv4-header-fields; + } + case ace-ipv6 { + uses packet-fields:acl-ipv6-header-fields; + } + } + uses packet-fields:acl-ip-header-fields; + uses packet-fields:acl-eth-header-fields; + } + } + } +} \ No newline at end of file diff --git a/experimental/odp/vpp-classifier.yang b/experimental/odp/vpp-classifier.yang new file mode 100644 index 000000000..beb4def85 --- /dev/null +++ b/experimental/odp/vpp-classifier.yang @@ -0,0 +1,215 @@ +module vpp-classifier { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:vpp:classifier"; + prefix "vpp-classifier"; + + revision "2016-12-14" { + description + "This revision adds the following new features: + - updates order of union types for opaque-index"; + } + + revision "2015-06-03" { + description + "Initial revision of model for VPP packet classifier. + The model can be used ony to implement ACLs. + Other classify table usages are not supported yet, + see https://jira.fd.io/browse/VPP-203 for details."; + reference + "https://wiki.fd.io/view/VPP/Introduction_To_N-tuple_Classifiers"; + } + + import ietf-yang-types { + prefix "yang"; + } + + typedef classify-table-ref { + type leafref { + path "/vpp-classifier:vpp-classifier/classify-table/name"; + } + description + "This type is used by data models that need to reference + configured classify tables."; + } + + typedef packet-handling-action { + type enumeration { + enum "deny" { + // by VPP convention, first neighbour node (at index 0) is a drop node + value 0; + } + enum "permit" { + value -1; // indicates that the next node not set + } + } + } + + typedef vpp-node-name { + type string; + } + + typedef vpp-node { + type union { + type packet-handling-action; + type vpp-node-name; + } + description + "Defines VPP node reference using packet handling action or relative node name + (if definition in terms of packet handling action is not possible)."; + } + + typedef opaque-index { + type union { + type uint32; + type vpp-node; + } + description + "Defines opaque-index type - metadata that can be attached to session-hit packets. + Vpp nodes can't be referenced by index, because node indexes might change after vpp restart."; + } + + grouping classify-session-attributes { + description + "Defines classify session attributes that are mapped to classify_add_del_session + and classify_session_details messages parameters."; + + leaf hit_next { + type vpp-node; + mandatory true; + description + "Vpp node to which packet will be send when it produces a match."; + } + leaf opaque_index { + type opaque-index; + } + leaf advance { + type int32; + default 0; + description + "Nodes like ip4/6-classify use the parameter to \"consume\" networking layer. + Example: tunnel decapsulation."; + } + } + + grouping classify-table-base-attributes { + description + "Defines classify table attributes that are mapped to classify_add_del_table message parameters."; + + leaf classifier-node { + type vpp-node-name; + description + "Name of VPP node the table is defined for."; + } + leaf nbuckets { + mandatory true; + type uint32; + description + "Used by classifier hashing algorithm. It is not possible to resize the bucket array, + therefore suggested value is approximate number of expected entries."; + } + leaf skip_n_vectors { + type uint32; + default 0; + description + "Number of 16 byte vectors to be skipped before applying mask."; + } + leaf next_table { + type classify-table-ref; + description + "Reference to the next classify table. Required when multiple table chaining is used."; + } + leaf miss_next { + mandatory true; + type vpp-node; + description + "Vpp node to which packet will be send when it falis to produce a match"; + } + leaf mask { + type yang:hex-string; + mandatory true; + description + "Defines match mask (multiple of 16 bytes)"; + } + + list classify-session { + key "match"; + + leaf match { + type yang:hex-string; + description + "Defines actual value to be matched that is + a byte vector, which length is multiple of 16 bytes"; + + must "string-length(match) = string-length(../../mask)" { + error-message + "Match length is not equal to classify table mask length."; + description + "Match length must be equal to classify table mask length."; + } + } + + uses classify-session-attributes; + } + } + + grouping classify-table-config-attributes { + description + "Defines classify table config only attributes (present in classify_add_del_table message + but not in classify_table_info_reply)."; + + // TODO(HC2VPP-10): move to classify-table-base-attributes + // after https://jira.fd.io/browse/VPP-208 is fixed + leaf memory_size { + type uint32; + // mandatory true; // TODO(HC2VPP-10): uncomment + description + "Memory size for classify table and its entries."; + } + } + + grouping classify-table-operational-attributes { + description + "Defines classify table operational attributes (present in classify_table_info_reply message + but not in classify_add_del_table)."; + + leaf active_sessions { + type uint32; + config false; + description + "Number of sessions defined for the classify table."; + } + } + + container vpp-classifier { + list classify-table { + key "name"; + + leaf name { + type string; + description + "Hides classify table identifier managed by vpp."; + } + + uses classify-table-base-attributes; + uses classify-table-config-attributes; + } + } + + container vpp-classifier-state { + config false; + + list classify-table { + key "name"; + + leaf name { + type string; + description + "Hides classify table identifier managed by vpp."; + } + + uses classify-table-base-attributes; + uses classify-table-operational-attributes; + } + } + +} diff --git a/experimental/odp/vpp-nsh.yang b/experimental/odp/vpp-nsh.yang new file mode 100644 index 000000000..14ea06d6f --- /dev/null +++ b/experimental/odp/vpp-nsh.yang @@ -0,0 +1,319 @@ +module vpp-nsh { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:vpp:nsh"; + prefix "vpp-nsh"; + + revision "2016-12-14" { + description + "This revision adds support for NSH-Proxy and NSH-Classifier features"; + } + + revision "2016-06-24" { + description + "Initial revision of vpp-nsh model"; + } + + import iana-if-type { + prefix "ianaift"; + } + import ietf-interfaces { + prefix "if"; + } + import ietf-yang-types { + prefix "yang"; + } + import ietf-inet-types { + prefix "inet"; + } + import yang-ext { + prefix "ext"; + } + import v3po { + prefix "v3po"; + } + /* + * Defines the supported next protocols that can be used for + * NSH next-protocol field. + */ + identity next-protocol { + description "Base identity from which all nsh next protocols + are derived from"; + } + + identity ipv4 { + base next-protocol; + description + "Support ipv4 to act as next protocol"; + } + + identity ipv6 { + base next-protocol; + description + "Support ipv6 to act as next protocol"; + } + + identity ethernet { + base next-protocol; + description + "Support ethernet to act as next protocol"; + } + + typedef nsh-next-protocol { + type identityref { + base "next-protocol"; + } + description "Identifies a specific next protocol for nsh"; + } + + /* + * Defines the supported nsh header action. + */ + identity action-type { + description "nsh header action type"; + } + + identity swap { + base "action-type"; + description "swap action type"; + } + + identity push { + base "action-type"; + description "push action type"; + } + + identity pop { + base "action-type"; + description "pop action type"; + } + + typedef nsh-action-type { + type identityref { + base "action-type"; + } + } + + /* + * Defines the supported encap type. + */ + identity encap-type { + description "encap type"; + } + + identity vxlan-gpe { + base "encap-type"; + description "vxlan-gpe encap type"; + } + + identity vxlan4 { + base "encap-type"; + description "ipv4 vxlan encap type"; + } + + identity vxlan6 { + base "encap-type"; + description "ipv6 vxlan encap type"; + } + + identity none { + base "encap-type"; + description "encap-none"; + } + + typedef nsh-encap-type { + type identityref { + base "encap-type"; + } + } + + /* + * Defines the supported MD-types. + */ + identity md-type { + description "md type"; + } + + identity md-type1 { + base "md-type"; + description "nsh md-type1"; + } + + identity md-type2 { + base "md-type"; + description "nsh md-type2"; + } + + typedef nsh-md-type { + type identityref { + base "md-type"; + } + } + + grouping nsh-md-type1-attributes { + leaf c1 { + type uint32; + } + leaf c2 { + type uint32; + } + leaf c3 { + type uint32; + } + leaf c4 { + type uint32; + } + } + + grouping nsh-md-type2-attributes { + leaf type { + type uint32; + } + } + + grouping nsh-entry-base-attributes { + leaf name { + type string; + description "NSH Entry Name"; + } + leaf nsp { + type uint32 { + range "0..16777215"; + } + } + leaf nsi { + type uint8 { + range "1..255"; + } + } + leaf md-type { + type nsh-md-type; + } + leaf version { + type uint8; + } + leaf length { + type uint8; + } + leaf next-protocol { + type nsh-next-protocol; + } + } + + grouping nsh-map-base-attributes { + leaf name { + type string; + description "NSH Map Name"; + } + leaf nsp { + type uint32 { + range "0..16777215"; + } + } + leaf nsi { + type uint8 { + range "1..255"; + } + } + leaf mapped-nsp { + type uint32 { + range "0..16777215"; + } + } + leaf mapped-nsi { + type uint8 { + range "1..255"; + } + } + leaf nsh-action { + type nsh-action-type; + default "swap"; + } + leaf encap-type { + type nsh-encap-type; + } + leaf encap-if-name { + type string; + description "Interface Name"; + } + } + + container vpp-nsh { + description + "NSH config data"; + + container nsh-entries { + list nsh-entry { + key "name"; + + uses nsh-entry-base-attributes; + + description + "nsh-entry configuration"; + } + } + + container nsh-maps { + list nsh-map { + key "name"; + + uses nsh-map-base-attributes; + + description + "nsh-map configuration"; + } + } + } + + augment /vpp-nsh/nsh-entries/nsh-entry { + ext:augment-identifier nsh-md-type-1-augment; + when "/md-type = 'vpp-nsh:md-type1' "; + uses nsh-md-type1-attributes; + } + + augment /vpp-nsh/nsh-entries/nsh-entry { + ext:augment-identifier nsh-md-type-2-augment; + when "/md-type = 'vpp-nsh:md-type2' "; + uses nsh-md-type2-attributes; + } + + container vpp-nsh-state { + config false; + + description + "NSH operational data"; + + container nsh-entries { + list nsh-entry { + key "name"; + + uses nsh-entry-base-attributes; + + description + "nsh-entry operational data"; + } + } + + container nsh-maps { + list nsh-map { + key "name"; + + uses nsh-map-base-attributes; + + description + "nsh-map operational data"; + } + } + } + + augment /vpp-nsh-state/nsh-entries/nsh-entry { + ext:augment-identifier nsh-md-type-1-state-augment; + when "/md-type = 'vpp-nsh:md-type1' "; + uses nsh-md-type1-attributes; + } + + augment /vpp-nsh-state/nsh-entries/nsh-entry { + ext:augment-identifier nsh-md-type-2-state-augment; + when "/md-type = 'vpp-nsh:md-type2' "; + uses nsh-md-type2-attributes; + } +} \ No newline at end of file diff --git a/experimental/odp/yang-ext.yang b/experimental/odp/yang-ext.yang index 0fbe94ddc..f8452737f 100644 --- a/experimental/odp/yang-ext.yang +++ b/experimental/odp/yang-ext.yang @@ -2,10 +2,10 @@ module yang-ext { yang-version 1; namespace "urn:opendaylight:yang:extension:yang-ext"; prefix "ext"; - + contact "Anton Tkacik "; - description + description "Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This program and the accompanying materials are made available under the @@ -19,10 +19,10 @@ module yang-ext { // Augmentation name extension "augment-identifier" { - description - "YANG language extension which assigns an identifier to + description + "YANG language extension which assigns an identifier to augmentation. Augment identifier is used to identify - specific augment statement by name. + specific augment statement by name. The identifier syntax is defined formally defined by the rule 'identifier' in Section 12 of RFC 6020. @@ -37,16 +37,15 @@ module yang-ext { of YANG modules and it is suitable for code generation, where each augment statement is nicely identified by unique name instead of combination of augment target - and when condition. + and when condition. */ argument "identifier"; } - // Context-aware RPCs grouping rpc-context-ref { - description + description "A reference to RPC context."; leaf context-instance { type instance-identifier; @@ -56,7 +55,7 @@ module yang-ext { extension "rpc-context-instance" { description - "YANG language extension which defines enclosing (parent) + "YANG language extension which defines enclosing (parent) schema node as referencable context for RPCs. The argument is identity which is used to identify RPC context @@ -72,8 +71,8 @@ module yang-ext { extension "context-instance" { argument "context-type"; } - + extension "instance-target" { - argument "path"; + argument "path"; } } diff --git a/experimental/odp/yanglib.yang b/experimental/odp/yanglib.yang new file mode 100644 index 000000000..275995b3b --- /dev/null +++ b/experimental/odp/yanglib.yang @@ -0,0 +1,39 @@ +module yanglib { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:yanglib:impl"; + prefix "yanglib"; + + description + "Service configuration for yanglib project"; + + revision "2014-12-10" { + description + "Initial revision"; + } + + container yanglib-config { + // TODO extracting the schema repositories + leaf cache-folder { + mandatory true; + type string; + description "local filesystem folder to use as cache + to load yang models from"; + } + + // TODO it would be better if the binding arguments could be located by the app automatically + leaf binding-addr { + mandatory true; + type string; + // TODO make this uri + description "binding address is necessary for generating proper URLS (accessible from the outside world) + for models present directly in the library"; + } + + leaf binding-port { + mandatory true; + type uint32; + // TODO proper type + description "binding port is necessary for generating proper URLS (accessible from the outside world) + for models present directly in the library"; + } + } +}