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; } 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-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-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 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; } list bridge-external-ids { description "Bridge external id"; 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; } } } grouping ovsdb-node-attributes { uses overlay:ip-port-locator; leaf ovs-version { 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; } } } } 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-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; } 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 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."; } } } } grouping ovsdb-external-ids-attributes { list external-ids { description "Port/Interface external id"; 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; } } } grouping ovsdb-other-config-attributes { list other-configs { description "Other config attributes for OVSDB tables"; 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; } } } 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; uses ovsdb-external-ids-attributes; uses ovsdb-other-config-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; uses ovsdb-external-ids-attributes; } }