grouping meter-flags {
leaf flags {
- type enumeration {
- enum meter-kbps;
- enum meter_pktps;
- enum meter_burst;
- enum meter_stats;
+ type bits {
+ bit meter-kbps;
+ bit meter_pktps;
+ bit meter_burst;
+ bit meter_stats;
}
}
}
grouping meter-band-type {
leaf flags {
- type enumeration {
- enum ofpmbt-drop;
- enum ofpmbt-dscp-remark;
- enum ofpmbt-experimenter;
+ type bits {
+ bit ofpmbt-drop;
+ bit ofpmbt-dscp-remark;
+ bit ofpmbt-experimenter;
}
}
}
--- /dev/null
+module opendaylight-port-types {
+ namespace "urn:opendaylight:flow:types:port";
+ prefix port-types;
+
+ import yang-ext {prefix ext;}
+ import ietf-inet-types {prefix inet;}
+ import ietf-yang-types {prefix yang;}
+
+ revision "2013-09-25" {
+ description "Initial revision of Port Inventory model";
+ }
+
+
+ typedef port-config {
+ type bits {
+ bit PORT-DOWN;
+ bit NO-RECV;
+ bit NO-FWD;
+ bit NO-PACKET-IN;
+ }
+ }
+
+ typedef port-state {
+ type enumeration {
+ enum LINK-DOWN;
+ enum BLOCKED;
+ enum LIVE;
+ }
+ }
+
+
+ typedef port-features {
+ type bits {
+ bit 10mb-hd;
+ bit 10mb-fd;
+ bit 100mb-hd;
+ bit 100mb-fd;
+ bit 1gb-hd;
+ bit 1gb-fd;
+ bit 10gb-fd;
+ bit 40gb-fd;
+ bit 100gb-fd;
+ bit 1tb-fd;
+ bit other;
+ bit copper;
+ bit fiber;
+ bit autoeng;
+ bit pause;
+ bit pause-asym;
+ }
+ }
+
+ grouping common-port {
+
+ leaf port-number {
+ type uint32;
+ }
+
+ leaf hardware-address {
+ type yang:mac-address;
+ description "MAC Address of the port";
+
+ }
+
+ leaf configuration {
+ type port-config;
+ description "Bit map of OFPPC-* flags";
+ }
+
+ leaf advertised-features {
+ type port-features;
+ description "Features being advertised by the port";
+ }
+ }
+
+ grouping flow-capable-port {
+
+ uses common-port;
+
+ leaf name {
+ type string;
+ description "Human readable name of the port";
+ }
+
+ leaf state {
+ type port-state;
+ description "Bit map of OFPPS-* flags";
+ }
+
+ leaf current-feature {
+ type port-features;
+ description "Bit map of OFPPF-* flags";
+ }
+
+ leaf supported {
+ type port-features;
+ description "Features supported by the port";
+ }
+
+ leaf peer-features {
+ type port-features;
+ description "Features advertised by peer";
+ }
+
+ leaf current-speed {
+ type uint32;
+ units "kbps";
+ description "Current port bit rate in kbps";
+ }
+
+ leaf maximum-speed {
+ type uint32;
+ units "kbps";
+ description "Max port bit rate in kbps";
+ }
+ }
+
+ grouping ofp-port-mod {
+ container port {
+ list port {
+ key "port-mod-order";
+ leaf port-mod-order {
+ type uint32;
+ }
+
+ uses common-port;
+
+ leaf mask {
+ type uint32;
+ description "Bitmap of OFPPC-* flags to be changed";
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
import yang-ext {prefix ext;}
import ietf-inet-types {prefix inet;}
import ietf-yang-types {prefix yang;}
+ import opendaylight-port-types {prefix port;}
import opendaylight-inventory {prefix inv;}
revision "2013-08-19" {
}
+ grouping feature {
+ leaf support-state {
+ type inv:support-type;
+ }
+ }
+
grouping queue {
leaf queue-id {
type uint32;
}
}
- grouping flow-capable-node-capabilities {
+ grouping table {
+
+
+ }
+
+ grouping flow-node {
container tables {
- leaf support-state {
- type inv:support-type;
+ uses feature;
+ list table {
+ uses table;
}
-
}
container group-tables {
-
+ uses feature;
}
container supported-match-types {
list match-type {
+ uses feature;
leaf match {
type string; // FIXME: Add identity
}
- leaf support-state {
- type inv:support-type;
- }
+
}
}
container supported-instructions {
list instruction-type {
+ uses feature;
leaf instruction {
type string; // FIXME: Add identity
}
-
- leaf support-state {
- type inv:support-type;
- }
}
}
container supported-actions {
list action-type {
+ uses feature;
+
leaf action {
type string; // FIXME: Add identity
}
-
- leaf support-state {
- type inv:support-type;
- }
}
}
}
- grouping flow-capable-node-connector {
-
+ grouping flow-node-connector {
+
+ uses port:flow-capable-port;
}
- notification node-capabilities-updated {
- uses flow-capable-node-capabilities;
+ augment "/inv:nodes/inv:node" {
+ ext:augment-identifier "flow-capable-node";
+ uses flow-node;
}
- notification node-connector-capabilities-updated {
- uses flow-capable-node-connector;
+ augment "/inv:nodes/inv:node/inv:node-connector" {
+ ext:augment-identifier "flow-capable-node-connector";
+ uses flow-node-connector;
}
- augment "/inv:nodes/inv:node" {
- augment-identifier "flow-capable-node";
- uses flow-capable-node-capabilities;
+ augment "/inv:node-updated" {
+ ext:augment-identifier "flow-capable-node-updated";
+ 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";
+ uses flow-node-connector;
+ }
+
+ augment "/inv:node-connector-updated" {
+ ext:augment-identifier "flow-capable-node-connector-updated";
}
}
\ No newline at end of file
}
identity node-connector-context {
-
+
}
grouping node {
- leaf id {
+ leaf id {
type node-id;
}
+
+ list "node-connector" {
+ key "id";
+ ext:context-instance "node-connector-context";
+
+ use node-connector;
+ }
+
}
grouping node-connector {
ext:context-instance "node-context";
uses node;
+ }
+ }
+
+ notification node-updated {
+ leaf node-ref {
+ ext:context-reference "node-context";
+ type node-ref;
+ }
+ uses node;
+ }
- list "node-connector" {
- key "id";
- ext:context-instance "node-connector-context";
+ notification node-connector-updated {
+ /*leaf node-ref {
+ type node-ref;
+ }*/
+ uses node-connector;
+ }
+
+ notification node-removed {
+ leaf node-ref {
+ ext:context-reference "node-context";
+ type node-ref;
+ }
+ }
- use node-connector;
- }
+ notification node-connector-removed {
+ leaf node-connector-ref {
+ ext:context-reference "node-connector-context";
+ type node-ref;
}
}
}
\ No newline at end of file