--- /dev/null
+module datapath-port-types {
+ yang-version 1;
+ namespace "urn:opendaylight:params:xml:ns:yang:example";
+ prefix "datapathport";
+
+ import network-topology {prefix "topo"; revision-date "2013-10-21"; }
+ import yang-ext { prefix "ext"; }
+ import ietf-inet-types { prefix inet; }
+
+ revision "2015-01-28" {
+ description "Initial revision of base datapath & port types which would be used by DPDK, among others";
+ }
+
+ identity datapath-type-base {
+ description "datapath type supported by switch";
+ }
+
+ identity port-type-base {
+ description "port type supported by switch";
+ }
+
+ identity datapath-type-netdev {
+ description "Generic netdev datapath type";
+ base datapath-type-base;
+ }
+
+ identity datapath-type-linux {
+ description "Datapath type for linux";
+ base datapath-type-base;
+ }
+
+ grouping port-type-attributes {
+ description "Common leaf for expressing port-type";
+ leaf port-type {
+ type identityref {
+ base port-type-base;
+ }
+ }
+ }
+
+ grouping datapath-type-attributes {
+ description "Common leaf for expressing datapath-type";
+ leaf datapath-type {
+ type identityref {
+ base datapath-type-base;
+ }
+ }
+ }
+
+ augment "/topo:network-topology/topo:topology/topo:node" {
+ description "Augment topology node with a list of supported-port-types";
+ ext:augment-identifier "supported-ports";
+ list supported-port-types-entry {
+ uses port-type-attributes;
+ }
+ }
+
+ augment "/topo:network-topology/topo:topology/topo:node" {
+ description "Augment topology node with a list of supported-datapath-types";
+ ext:augment-identifier "supported-datapaths";
+ list supported-datapath-types-entry {
+ uses datapath-type-attributes;
+ }
+ }
+
+}
--- /dev/null
+module dpdk {
+ yang-version 1;
+ namespace "urn:opendaylight:params:xml:ns:yang:example";
+ prefix "dpdk";
+
+ import network-topology {prefix "topo"; revision-date "2013-10-21"; }
+ import yang-ext { prefix "ext"; }
+ import ietf-inet-types { prefix inet; }
+ import datapath-port-types {prefix datapathport;}
+
+ revision "2015-01-26" {
+ description "Initial revision of dpdk model";
+ }
+
+ identity dpdk-port-type-base {
+ description "Base identity for all dpdk-port-types";
+ }
+
+ identity dpdk-datapath-type-base {
+ description "Datapath type for DPDK";
+ }
+
+ identity datapath-type-dpdk-netdev {
+ description "Datapath type for DPDK netdev";
+ base dpdk-datapath-type-base;
+ }
+
+ identity port-type-dpdk {
+ description "DPDK port type dpdk"; //CHECK IF THIS IS NEEDED.
+ base dpdk-port-type-base;
+ }
+
+ identity port-type-dpdkr {
+ description "DPDK port type dpdkr";
+ base dpdk-port-type-base;
+ }
+
+ identity port-type-dpdkvhost {
+ description "DPDK port type dpdkvhost";
+ base dpdk-port-type-base;
+ }
+
+ grouping dpdk-port-type-attributes {
+ description "Common leaf for dpdk port types";
+ leaf dpdk-port-type {
+ type identityref {
+ base dpdk-port-type-base;
+ }
+ }
+ }
+
+ grouping datapath-port-locator {
+ description "switch datapath and port descriptor";
+ leaf datapath {
+ type identityref {
+ base dpdk-datapath-type-base;
+ }
+ }
+ leaf port {
+ type identityref {
+ base dpdk-port-type-base;
+ }
+ }
+ }
+
+ augment "/topo:network-topology/topo:topology/topo:node" {
+ description "Augment topology with a list of supported dpdk-port-types";
+ ext:augment-identifier "supported-datapath-port-parameters";
+ list dpdk-port-type-entry {
+ uses dpdk-port-type-attributes;
+ }
+ }
+
+
+}