.settings\r
MANIFEST.MF\r
xtend-gen\r
+yang-gen-sal
+yang-gen-config
.externalToolBuilders\r
maven-eclipse.xml\r
-\r
+.metadata/
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.opendaylight.openflowplugin.model</groupId>
+ <artifactId>model-parent</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>model-flow-base</artifactId>
+ <packaging>bundle</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.controller.model</groupId>
+ <artifactId>model-inventory</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>opendaylight-l2-types</artifactId>
+ </dependency>
+ </dependencies>
+
+ <scm>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</connection>
+ <developerConnection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</developerConnection>
+ <url>https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:Main</url>
+ <tag>HEAD</tag>
+ </scm>
+
+</project>
--- /dev/null
+/*
+ * 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
+ */
+
+package org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.CommonPort.PortNumber;
+
+
+public class PortNumberBuilder {
+
+ public static PortNumber getDefaultInstance(java.lang.String defaultValue) {
+ try {
+ long uint32 = Long.parseLong(defaultValue);
+ return new PortNumber(uint32);
+ } catch(NumberFormatException e){
+ return new PortNumber(defaultValue);
+ }
+ }
+
+}
--- /dev/null
+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 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;
+ }
+
+ grouping address {
+ choice address {
+ case ipv4 {
+ leaf ipv4-address {
+ type inet:ipv4-prefix;
+ }
+ }
+ case ipv6 {
+ leaf ipv6-address {
+ type inet:ipv6-prefix;
+ }
+ }
+ }
+ }
+
+ container action-types {
+ uses action-list;
+ }
+
+ grouping ordered {
+ leaf order {
+ type int32;
+ }
+ }
+
+ grouping action-list {
+ list action {
+ key "order";
+ uses ordered;
+ uses action;
+ }
+ }
+
+ grouping action {
+ choice action {
+ case output-action-case {
+ container output-action {
+ leaf output-node-connector {
+ type inet:uri;
+ }
+
+ leaf max-length {
+ type uint16;
+ }
+ }
+ }
+
+ case controller-action-case {
+ container controller-action {
+ leaf max-length {
+ type uint16;
+ }
+ }
+ }
+
+
+
+ case set-field-case {
+ container set-field {
+ uses match:match;
+ }
+ }
+
+
+ case set-queue-action-case {
+ container set-queue-action {
+ leaf queue {
+ type string;
+ }
+ leaf queue-id {
+ type uint32;
+ }
+ }
+ }
+
+ case pop-mpls-action-case {
+ container pop-mpls-action {
+ leaf ethernet-type {
+ type uint16; // TODO: define ethertype type
+ }
+ }
+ }
+
+
+ case set-mpls-ttl-action-case {
+ container set-mpls-ttl-action {
+ leaf mpls-ttl {
+ type uint8;
+ }
+ }
+ }
+
+
+ case set-nw-ttl-action-case {
+ container set-nw-ttl-action {
+ leaf nw-ttl {
+ type uint8;
+ }
+ }
+ }
+
+
+ case push-pbb-action-case {
+ container push-pbb-action {
+ leaf ethernet-type {
+ type uint16; // TODO: define ethertype type
+ }
+ }
+ }
+
+
+ case pop-pbb-action-case {
+ container pop-pbb-action {
+
+ }
+ }
+
+
+ case push-mpls-action-case {
+ container push-mpls-action {
+ leaf ethernet-type {
+ type uint16; // TODO: define ethertype type
+ }
+ }
+ }
+
+
+ case dec-mpls-ttl-case {
+ container dec-mpls-ttl {
+ }
+ }
+
+
+ case dec-nw-ttl-case {
+ container dec-nw-ttl {
+ }
+ }
+
+
+ case drop-action-case {
+ container drop-action {
+ }
+ }
+
+
+ case flood-action-case {
+ container flood-action {
+ }
+ }
+
+
+ case flood-all-action-case {
+ container flood-all-action {
+ }
+ }
+
+
+ case hw-path-action-case {
+ container hw-path-action {
+ }
+ }
+
+
+ case loopback-action-case {
+ container loopback-action {
+ }
+ }
+
+
+ case pop-vlan-action-case {
+ container pop-vlan-action {
+ }
+ }
+
+
+
+ case push-vlan-action-case {
+ container push-vlan-action {
+ leaf ethernet-type {
+ type uint16; // TODO: define ethertype type
+ }
+ leaf tag { // TPID - 16 bits
+ type int32;
+ }
+ leaf pcp { // PCP - 3 bits
+ type int32;
+ }
+ leaf cfi { // CFI - 1 bit (drop eligible)
+ type vlan-cfi;
+ }
+ leaf vlan-id { // VID - 12 bits
+ type l2t:vlan-id;
+ }
+// leaf tci { //TCI = [PCP + CFI + VID]
+// }
+// leaf header { //header = [TPID + TCI]
+// }
+ }
+ }
+
+ case copy-ttl-out-case {
+ container copy-ttl-out {
+ }
+ }
+
+
+ case copy-ttl-in-case {
+ container copy-ttl-in {
+ }
+ }
+
+
+ case set-dl-dst-action-case {
+ container set-dl-dst-action {
+ leaf address {
+ type yang:mac-address;
+ }
+ }
+ }
+
+
+ case set-dl-src-action-case {
+ container set-dl-src-action {
+ leaf address {
+ type yang:mac-address;
+ }
+ }
+
+ }
+ case group-action-case {
+ container group-action {
+ leaf group {
+ type string;
+ }
+
+ leaf group-id {
+ type uint32;
+ }
+ }
+ }
+
+ case set-dl-type-action-case {
+ container set-dl-type-action {
+ leaf dl-type {
+ type l2t:ether-type;
+ }
+ }
+ }
+
+
+ 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;
+ }
+ }
+
+
+ case set-nw-src-action-case {
+ container set-nw-src-action {
+ uses address;
+ }
+ }
+
+
+ case set-nw-tos-action-case {
+ container set-nw-tos-action {
+ leaf tos {
+ type int32;
+ }
+ }
+ }
+
+
+ case set-tp-dst-action-case {
+ container set-tp-dst-action {
+ leaf port {
+ type inet:port-number;
+ }
+ }
+
+ }
+ case set-tp-src-action-case {
+ container set-tp-src-action {
+ leaf port {
+ type inet:port-number;
+ }
+ }
+
+ }
+ case set-vlan-cfi-action-case {
+ container set-vlan-cfi-action {
+ leaf vlan-cfi {
+ type vlan-cfi;
+ }
+ }
+ }
+
+
+ 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 {
+ }
+ }
+
+ case sw-path-action-case {
+ container sw-path-action {
+ }
+ }
+ }
+ }
+}
--- /dev/null
+module opendaylight-flow-types {
+ namespace "urn:opendaylight:flow:types";
+ prefix flow;
+
+ import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
+ 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";}
+
+ 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 {
+ value 1;
+ }
+ enum IN_PORT {
+ value 2;
+ }
+ enum TABLE {
+ value 3;
+ }
+ enum NORMAL {
+ value 4;
+ }
+ enum FLOOD {
+ value 5;
+ }
+ enum ALL {
+ value 6;
+ }
+ enum CONTROLLER {
+ value 7;
+ }
+ enum LOCAL {
+ value 8;
+ }
+ enum ANY {
+ value 9;
+ }
+ enum NONE {
+ value 10;
+ }
+
+ }
+ }
+ grouping instruction-list {
+ list instruction {
+ key "order";
+ uses action:ordered;
+ uses instruction;
+ }
+ }
+
+ grouping instruction {
+ choice instruction {
+ case go-to-table-case {
+ container go-to-table {
+ leaf table_id {
+ type uint8;
+ }
+ }
+ }
+
+ 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;
+ bit RESET_COUNTS;
+ bit NO_PKT_COUNTS;
+ bit NO_BYT_COUNTS;
+ bit SEND_FLOW_REM;
+ }
+ }
+
+ 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;
+ }
+
+ 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;
+ }
+
+ leaf barrier {
+ type boolean;
+ }
+
+ leaf strict {
+ type boolean;
+ default "false";
+ }
+
+ }
+
+ grouping flow-statistics {
+ leaf packet-count {
+ type yang:counter64;
+ }
+
+ leaf byte-count {
+ type yang:counter64;
+ }
+
+ container duration {
+ leaf second {
+ type yang:counter64;
+ }
+ leaf nanosecond {
+ type yang:counter64;
+ }
+ }
+ }
+
+ grouping flow-table-statistics {
+ leaf active {
+ type yang:counter64;
+ }
+
+ leaf lookup {
+ type yang:counter64;
+ }
+
+ leaf matched {
+ type yang:counter64;
+ }
+ }
+
+ grouping flow-mod-removed {
+ uses generic_flow_attributes;
+
+ leaf removed_reason {
+ type removed_reason_flags;
+ }
+
+ leaf duration_nsec {
+ type uint32;
+ }
+
+ leaf duration_sec {
+ type uint32;
+ }
+
+ leaf packet_count {
+ type uint64;
+ }
+
+ leaf byte_count {
+ type uint64;
+ }
+
+ container match {
+ uses match:match;
+ }
+ }
+}
--- /dev/null
+module opendaylight-group-types {
+ namespace "urn:opendaylight:group:types";
+ prefix group;
+
+ import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
+ import opendaylight-action-types {prefix action;}
+
+ revision "2013-10-18" {
+ description "Initial revision of group service";
+ }
+
+ typedef group-id {
+ type uint32;
+ }
+
+ typedef bucket-id {
+ type uint32;
+ }
+
+ typedef group-types {
+ type enumeration {
+ enum group-all;
+ enum group-select;
+ enum group-indirect;
+ enum group-ff;
+ }
+ }
+
+ typedef group-capabilities {
+ type enumeration {
+ enum select-weight;
+ enum select-liveness;
+ enum chaining;
+ enum chaining-checks;
+ }
+ }
+
+ identity group-type {
+ description "Base identity for all the available group types";
+ }
+
+ identity group-all {
+ base group-type;
+ description "All (multicast/broadcast) group";
+ }
+
+ identity group-select {
+ base group-type;
+ description "Select group";
+ }
+
+ identity group-indirect {
+ base group-type;
+ description "Indirect group";
+ }
+
+ identity group-ff {
+ base group-type;
+ description "Fast failover group";
+ }
+
+ identity group-capability {
+ description "Base identity for all the supported group capabilities";
+ }
+
+ identity select-weight{
+ base group-capability;
+ description "Support weight for select groups";
+ }
+
+ identity select-liveness{
+ base group-capability;
+ description "Support liveness for select groups";
+ }
+
+ identity chaining{
+ base group-capability;
+ description "Support chaining groups";
+ }
+
+ identity chaining-checks{
+ base group-capability;
+ description "Check chaining for loops and delete";
+ }
+
+ typedef group-ref {
+ type instance-identifier;
+ }
+
+ grouping group {
+
+ leaf group-type {
+ type group-types;
+ }
+
+ leaf group-id {
+ type group-id;
+ }
+
+ leaf group-name {
+ type string;
+ }
+
+ leaf container-name {
+ type string;
+ }
+
+ leaf barrier {
+ type boolean;
+ }
+
+ container buckets {
+ list bucket {
+ key "bucket-id";
+ leaf bucket-id {
+ type bucket-id;
+ }
+
+ leaf weight {
+ type uint16;
+ }
+
+ leaf watch_port {
+ type uint32;
+ }
+
+ leaf watch_group {
+ type uint32;
+ }
+
+ uses action:action-list;
+ }
+ }
+ }
+
+ grouping group-statistics {
+
+ leaf group-id {
+ type group-id;
+ }
+
+ leaf ref-count {
+ type yang:counter32;
+ }
+
+ leaf packet-count {
+ type yang:counter64;
+ }
+
+ leaf byte-count {
+ type yang:counter64;
+ }
+
+ container duration {
+ leaf second {
+ type yang:counter32;
+ }
+ leaf nanosecond {
+ type yang:counter32;
+ }
+ }
+
+ container buckets {
+ list bucket-counter {
+ key "bucket-id";
+ leaf bucket-id {
+ type bucket-id;
+ }
+
+ leaf packet-count {
+ type yang:counter64;
+ }
+
+ leaf byte-count {
+ type yang:counter64;
+ }
+ }
+ }
+ }
+
+ grouping group-features {
+
+ leaf-list group-types-supported {
+ type identityref {
+ base group-type;
+ }
+ }
+
+ leaf-list group-capabilities-supported {
+ type identityref {
+ base group-capability;
+ }
+ }
+
+ leaf-list max-groups {
+ type uint32;
+ description "Maximum number of groups for each type";
+ max-elements 4;
+ }
+
+ leaf-list actions {
+ type uint32;
+ description "Bitmap number OFPAT_* that are supported";
+ max-elements 4;
+ }
+ }
+
+ grouping group-statistics-request {
+ list group-stats {
+ key "group-id";
+ leaf group-id {
+ type group-id;
+ }
+ }
+ }
+
+
+ grouping group-statistics-reply {
+
+ list group-stats {
+ key "group-id";
+ uses group-statistics;
+ }
+ }
+
+ grouping group-desc-stats-reply {
+
+ list group-desc-stats {
+ key "group-id";
+ uses group;
+ }
+ }
+
+ grouping group-features-reply {
+ uses group-features;
+ }
+
+ grouping groups {
+ list group {
+ key "group-id";
+
+ uses group;
+ }
+ }
+
+}
--- /dev/null
+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 opendaylight-l2-types {prefix l2t;revision-date "2013-08-27";}
+ import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
+
+ revision "2013-10-26" {
+ description "Initial revision of match types";
+ }
+
+ grouping "mac-address-filter" {
+ leaf address {
+ mandatory true;
+ type yang:mac-address;
+ }
+ leaf mask {
+ type yang:mac-address;
+ }
+ }
+
+ grouping "of-metadata" {
+ leaf metadata {
+ type uint64;
+ }
+
+ leaf metadata-mask {
+ type uint64;
+ }
+ }
+
+ /** Match Groupings **/
+ grouping "ethernet-match-fields" {
+ container ethernet-source {
+ description "Ethernet source address.";
+ presence "Match field is active and set";
+ uses mac-address-filter;
+ }
+ container ethernet-destination {
+ description "Ethernet destination address.";
+ presence "Match field is active and set";
+ uses mac-address-filter;
+ }
+ container ethernet-type {
+ description "Ethernet frame type.";
+ presence "Match field is active and set";
+
+ leaf type {
+ mandatory true;
+ type l2t:ether-type; // Needs to define that as general model
+ }
+ }
+ }
+
+ grouping "vlan-match-fields" {
+ container vlan-id {
+ description "VLAN id.";
+ presence "Match field is active and set";
+
+ leaf vlan-id-present {
+ type boolean;
+ }
+
+ leaf vlan-id {
+ type l2t:vlan-id;
+ }
+ }
+ leaf vlan-pcp {
+ description "VLAN priority.";
+ type l2t:vlan-pcp;
+ }
+ }
+
+ grouping "ip-match-fields" {
+ leaf ip-protocol {
+ description "IP protocol.";
+ type uint8;
+ }
+
+ leaf ip-dscp {
+ description "IP DSCP (6 bits in ToS field).";
+ type inet:dscp;
+ }
+
+ leaf ip-ecn {
+ description "IP ECN (2 bits in ToS field).";
+ type uint8;
+ }
+
+ leaf ip-proto {
+ description "IP Proto (IPv4 or IPv6 Protocol Number).";
+ type inet:ip-version;
+ }
+ }
+
+ grouping "ipv4-match-fields" {
+ leaf ipv4-source {
+ description "IPv4 source address.";
+ type inet:ipv4-prefix;
+ }
+
+ leaf ipv4-destination {
+ description "IPv4 destination address.";
+ type inet:ipv4-prefix;
+ }
+
+ }
+
+ grouping "ipv6-match-fields" {
+ leaf ipv6-source {
+ description "IPv6 source address.";
+ type inet:ipv6-prefix;
+ }
+
+ leaf ipv6-destination {
+ description "IPv6 destination address.";
+ type inet:ipv6-prefix;
+ }
+
+ leaf ipv6-nd-target {
+ description "IPv6 target address for neighbour discovery message";
+ type inet:ipv6-address;
+ }
+
+ container "ipv6-label" {
+ leaf ipv6-flabel {
+ type inet:ipv6-flow-label;
+ }
+
+ leaf flabel-mask {
+ type inet:ipv6-flow-label;
+ }
+ }
+
+ leaf ipv6-nd-sll {
+ description "Link layer source address for neighbour discovery message";
+ type yang:mac-address;
+ }
+
+ leaf ipv6-nd-tll {
+ description "Link layer target address for neighbour discovery message";
+ type yang:mac-address;
+ }
+
+ container "ipv6-ext-header" {
+ leaf ipv6-exthdr {
+ description "IPv6 Extension Header field";
+ type uint16;
+ }
+
+ leaf ipv6-exthdr-mask {
+ type uint16 {
+ range "0..512";
+ }
+ }
+ }
+ }
+
+ grouping "udp-match-fields" {
+ leaf udp-source-port {
+ description "UDP source port.";
+ type inet:port-number;
+ }
+ leaf udp-destination-port {
+ description "UDP destination port.";
+ type inet:port-number;
+ }
+ }
+
+ grouping "protocol-match-fields" {
+ leaf mpls-label {
+ description "Label in the first MPLS shim header";
+ type uint32;
+ }
+
+ leaf mpls-tc {
+ description "TC in the first MPLS shim header";
+ type uint8;
+ }
+
+ leaf mpls-bos {
+ description "BoS bit in the first MPLS shim header";
+ type uint8;
+ }
+
+ container "pbb" {
+ leaf pbb-isid {
+ description "I-SID in the first PBB service instance tag";
+ type uint32;
+ }
+
+ leaf pbb-mask {
+ type uint32 {
+ range "0..16777216";
+ }
+ }
+ }
+ }
+
+ grouping "tcp-match-fields" {
+ leaf tcp-source-port {
+ description "TCP source port.";
+ type inet:port-number;
+ }
+ leaf tcp-destination-port {
+ description "TCP destination port.";
+ type inet:port-number;
+ }
+ }
+
+ grouping "sctp-match-fields" {
+ leaf sctp-source-port {
+ description "SCTP source port.";
+ type inet:port-number;
+ }
+ leaf sctp-destination-port {
+ description "SCTP destination port.";
+ type inet:port-number;
+ }
+ }
+
+ grouping "icmpv4-match-fields" {
+ leaf icmpv4-type {
+ description "ICMP type.";
+ type uint8; // Define ICMP Type
+ }
+ description "ICMP code.";
+ leaf icmpv4-code {
+ type uint8; // Define ICMP Code
+ }
+ }
+
+ grouping "icmpv6-match-fields" {
+ leaf icmpv6-type {
+ description "ICMP type.";
+ type uint8; // Define ICMP Type
+ }
+ description "ICMP code.";
+ leaf icmpv6-code {
+ type uint8; // Define ICMP Code
+ }
+ }
+
+ grouping "arp-match-fields" {
+ leaf arp-op {
+ type uint16;
+ }
+
+ leaf arp-source-transport-address {
+ description "ARP source IPv4 address.";
+ type inet:ipv4-prefix;
+ }
+
+ leaf arp-target-transport-address {
+ description "ARP target IPv4 address.";
+ type inet:ipv4-prefix;
+ }
+ container arp-source-hardware-address {
+ description "ARP source hardware address.";
+ presence "Match field is active and set";
+ uses mac-address-filter;
+ }
+ container arp-target-hardware-address {
+ description "ARP target hardware address.";
+ presence "Match field is active and set";
+ uses mac-address-filter;
+ }
+ }
+
+ grouping "tcp-flag-match-fields" {
+ leaf tcp-flag {
+ 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;
+ }
+
+ leaf in-phy-port {
+ type inv:node-connector-id;
+ }
+
+ container "metadata" {
+ uses of-metadata;
+ }
+
+ container "tunnel" {
+ leaf tunnel-id {
+ description "Metadata associated in the logical port";
+ type uint64;
+ }
+
+ leaf tunnel-mask {
+ type uint64;
+ }
+ }
+
+ container "ethernet-match" {
+ uses "ethernet-match-fields";
+ }
+
+ container "vlan-match" {
+ uses "vlan-match-fields";
+ }
+
+ container "ip-match" {
+ uses "ip-match-fields";
+ }
+
+ choice layer-3-match {
+ case "ipv4-match" {
+ uses "ipv4-match-fields";
+ }
+ case "ipv6-match" {
+ uses "ipv6-match-fields";
+ }
+ case "arp-match" {
+ uses "arp-match-fields";
+ }
+ case "tunnel-ipv4-match" {
+ uses "tunnel-ipv4-match-fields";
+ }
+ }
+
+ choice layer-4-match {
+ case "udp-match" {
+ uses "udp-match-fields";
+ }
+ case "tcp-match" {
+ uses "tcp-match-fields";
+ }
+ case "sctp-match" {
+ uses "sctp-match-fields";
+ }
+ }
+
+ container "icmpv4-match" {
+ uses "icmpv4-match-fields";
+ }
+
+ container "icmpv6-match" {
+ uses "icmpv6-match-fields";
+ }
+
+ container "protocol-match-fields" {
+ uses "protocol-match-fields";
+ }
+
+ container tcp-flag-match {
+ uses "tcp-flag-match-fields";
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+module opendaylight-meter-types {
+ namespace "urn:opendaylight:meter:types";
+ prefix meter;
+
+ import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
+
+
+ revision "2013-09-18" {
+ description "Initial revision of meter service";
+ }
+
+ typedef meter-id {
+ type uint32;
+ }
+ typedef band-id {
+ type uint32;
+ }
+
+ typedef meter-flags {
+ type bits {
+ bit meter-kbps;
+ bit meter-pktps;
+ bit meter-burst;
+ bit meter-stats;
+ }
+ }
+
+ identity meter-capability {
+ description "Base identity for all the supported meter capabilities/flags";
+ }
+ identity meter-kbps {
+ base meter-capability;
+ description "Rate value in kb/s (kilo-bit per second)";
+ }
+ identity meter-pktps {
+ base meter-capability;
+ description "Rate value in packet/sec.";
+ }
+ identity meter-burst {
+ base meter-capability;
+ description "Do burst size.";
+ }
+ identity meter-stats {
+ base meter-capability;
+ description "Collect statistics.";
+ }
+
+ typedef meter-band-type {
+ type bits {
+ bit ofpmbt-drop;
+ bit ofpmbt-dscp-remark;
+ bit ofpmbt-experimenter;
+ }
+ }
+
+ identity meter-band {
+ description "Base identity for all the band type available";
+ }
+ identity meter-band-drop {
+ base meter-band;
+ description "Drop packet";
+ }
+ identity meter-band-dscp-remark {
+ base meter-band;
+ description "Remark DSCP in the IP header";
+ }
+ identity meter-band-experimenter {
+ base meter-band;
+ description "Experimenter meter band";
+ }
+
+ grouping band-type {
+ choice band-type {
+ case drop {
+ leaf drop-rate {
+ description "Rate for dropping packets";
+ type uint32;
+ }
+
+ leaf drop-burst-size {
+ description "Size of bursts";
+ type uint32;
+ }
+ }
+
+ case dscp-remark {
+ leaf dscp-remark-rate {
+ description "Rate for remarking packets";
+ type uint32;
+ }
+
+ leaf dscp-remark-burst-size {
+ description "Size of bursts";
+ type uint32;
+ }
+
+ leaf prec_level {
+ description "Number of drop precedence level to add";
+ type uint8;
+ }
+ }
+
+ case experimenter {
+ leaf experimenter-rate {
+ description "Rate for remarking packets";
+ type uint32;
+ }
+
+ leaf experimenter-burst-size {
+ description "Size of bursts";
+ type uint32;
+ }
+
+ leaf experimenter {
+ description "Experimenter id";
+ type uint32;
+ }
+ }
+ }
+ }
+
+ typedef meter-ref {
+ type instance-identifier;
+ }
+
+ grouping meter {
+
+ leaf flags {
+ description "Meter configuration flags";
+ type meter-flags;
+ }
+
+ leaf meter-id {
+ description "Meter instance";
+ type meter-id;
+ }
+
+ leaf barrier {
+ description "If true, barrier message is sent";
+ type boolean;
+ }
+
+ leaf meter-name {
+ description "Name of meter instance";
+ type string;
+ }
+
+ leaf container-name {
+ description "Name of container";
+ type string;
+ }
+
+ container meter-band-headers {
+ list meter-band-header {
+ key "band-id";
+ leaf band-id {
+ description "Meter band id";
+ type band-id;
+ }
+
+ container meter-band-types {
+ leaf flags {
+ description "Meter band flags";
+ type meter-band-type;
+ }
+ }
+
+ leaf band-rate {
+ description "Rate for this band";
+ type uint32;
+ }
+
+ leaf band-burst-size {
+ description "Size of bursts";
+ type uint32;
+ }
+ uses band-type;
+ }
+ }
+ }
+
+ grouping meter-statistics {
+
+ leaf meter-id {
+ type meter-id;
+ }
+
+ leaf flow-count {
+ type yang:counter32;
+ }
+
+ leaf packet-in-count {
+ type yang:counter64;
+ }
+
+ leaf byte-in-count {
+ type yang:counter64;
+ }
+
+ container duration {
+ leaf second {
+ type yang:counter32;
+ }
+ leaf nanosecond {
+ type yang:counter32;
+ }
+ }
+
+ container meter-band-stats {
+ list band-stat {
+ key "band-id";
+ leaf band-id {
+ type band-id;
+ }
+
+ leaf packet-band-count {
+ type yang:counter64;
+ }
+
+ leaf byte-band-count {
+ type yang:counter64;
+ }
+ }
+ }
+ }
+
+ grouping meter-features {
+
+ leaf max_meter {
+ type yang:counter32;
+ }
+
+ leaf-list meter-band-supported {
+ type identityref {
+ base meter-band;
+ }
+ }
+
+ leaf-list meter-capabilities-supported {
+ type identityref {
+ base meter-capability;
+ }
+ }
+
+ leaf max_bands {
+ type uint8;
+ }
+
+ leaf max_color {
+ type uint8;
+ }
+ }
+
+ grouping meter-stats-config-request {
+ list meter-stats {
+ key "meter-id";
+ leaf meter-id {
+ type meter-id;
+ }
+ }
+ }
+
+ grouping meter-statistics-reply {
+ list meter-stats {
+ key "meter-id";
+ uses meter-statistics;
+ }
+ }
+
+ grouping meter-config-stats-reply {
+ list meter-config-stats {
+ key "meter-id";
+ uses meter;
+ }
+ }
+
+ grouping meter-features-reply {
+ uses meter-features;
+ }
+
+}
--- /dev/null
+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 opendaylight-queue-types {prefix queue-types; revision-date "2013-09-25";}
+
+ revision "2013-09-25" {
+ description "Initial revision of Port Inventory model";
+ }
+
+ typedef port-reason {
+ type enumeration {
+ enum add;
+ enum delete;
+ enum update;
+ }
+ }
+
+ typedef port-config {
+ type bits {
+ bit PORT-DOWN;
+ bit NO-RECV;
+ bit NO-FWD;
+ 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;
+ bit ten-mb-fd;
+ bit hundred-mb-hd;
+ bit hundred-mb-fd;
+ bit one-gb-hd;
+ bit one-gb-fd;
+ bit ten-gb-fd;
+ bit forty-gb-fd;
+ bit hundred-gb-fd;
+ bit one-tb-fd;
+ bit other;
+ bit copper;
+ bit fiber;
+ bit autoeng;
+ bit pause;
+ bit pause-asym;
+ }
+ }
+
+ grouping common-port {
+
+ leaf port-number {
+ type union {
+ type uint32;
+ type string;
+ }
+ }
+
+ 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-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 {
+
+ uses common-port;
+
+ leaf name {
+ type string;
+ description "Human readable name of the port";
+ }
+
+ container state {
+ uses port-state;
+ description "Description of state of port";
+ }
+
+ 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";
+ }
+
+ 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";
+ }
+
+ leaf container-name {
+ type string;
+ }
+
+ leaf port-name {
+ type string;
+ }
+
+ leaf barrier {
+ type boolean;
+ }
+ }
+ }
+ }
+}
--- /dev/null
+module opendaylight-queue-types {
+ namespace "urn:opendaylight:flow:types:queue";
+ prefix queue-types;
+
+ import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
+
+ revision "2013-09-25" {
+ description "Initial revision of Queue Inventory model";
+ }
+
+ typedef queue-id {
+ type yang:counter32;
+ description "id for the specific queue.";
+ }
+
+ typedef queue-properties {
+ type enumeration {
+ enum min_rate;
+ enum max_rate;
+ }
+ }
+
+
+ grouping common-queue {
+
+ leaf property {
+ type uint16;
+ description "One of OFPQT_.";
+ }
+
+ }
+
+
+ grouping queue-prop-min-rate {
+
+ uses common-queue;
+
+ leaf rate {
+ type uint16;
+ description "OFPQT_MIN, len: 16";
+ }
+
+ }
+
+ grouping queue-prop-max-rate {
+
+ uses common-queue;
+
+ leaf rate {
+ type uint16;
+ description "OFPQT_MAX, len: 16";
+ }
+
+ }
+ grouping queue-packet {
+
+
+ leaf queue-id {
+ type queue-id;
+ description "id for the specific queue.";
+ }
+
+ leaf port {
+ type uint32;
+ description "Port this queue is attached to.";
+ }
+ uses common-queue;
+ }
+
+ grouping queue-config-request
+ {
+ leaf port {
+ type uint32;
+ description "Port to be queried.";
+ }
+
+ }
+}
--- /dev/null
+module opendaylight-table-types {
+ namespace "urn:opendaylight:table:types";
+ prefix table;
+
+ import opendaylight-flow-types {prefix flow;revision-date "2013-10-26";}
+ import opendaylight-action-types {prefix action;}
+
+ revision "2013-10-26" {
+ description "Initial revision of table service";
+ }
+
+ typedef table-id {
+ type uint8;
+ }
+
+ typedef table-ref {
+ type instance-identifier;
+ }
+
+ typedef table-config {
+ type bits {
+ bit DEPRECATED-MASK;
+ }
+ }
+
+ // field types
+ identity match-field {
+ description "Base identity for match Fields";
+ }
+
+ identity in_port {
+ base match-field;
+ description "Match for Switch input port.";
+ }
+ identity in_phy_port {
+ base match-field;
+ description "Match for Switch physical input port.";
+ }
+ identity metadata {
+ base match-field;
+ description "Match for Metadata passed between tables.";
+ }
+ identity eth_dst {
+ base match-field;
+ description "Match for Ethernet destination address.";
+ }
+ identity eth_src {
+ base match-field;
+ description "Match for Ethernet source address.";
+ }
+ identity eth_type {
+ base match-field;
+ description "Match for Ethernet frame type.";
+ }
+ identity vlan_vid {
+ base match-field;
+ description "Match for VLAN id.";
+ }
+ identity vlan_pcp {
+ base match-field;
+ description "Match for VLAN priority.";
+ }
+ identity ip_dscp {
+ base match-field;
+ description "Match for IP DSCP (6 bits in ToS field).";
+ }
+ identity ip_ecn {
+ base match-field;
+ description "Match for IP ECN (2 bits in ToS field).";
+ }
+ identity ip_proto {
+ base match-field;
+ description "Match for IP protocol.";
+ }
+ identity ipv4_src {
+ base match-field;
+ description "Match for IPv4 source address.";
+ }
+ identity ipv4_dst {
+ base match-field;
+ description "Match for IPv4 destination address.";
+ }
+ identity tcp_src {
+ base match-field;
+ description "Match for TCP source port.";
+ }
+ identity tcp_dst {
+ base match-field;
+ description "Match for TCP destination port.";
+ }
+ identity udp_src {
+ base match-field;
+ description "Match for UDP source port.";
+ }
+ identity udp_dst {
+ base match-field;
+ description "Match for UDP destination port.";
+ }
+ identity sctp_src {
+ base match-field;
+ description "Match for SCTP source port.";
+ }
+ identity sctp_dst {
+ base match-field;
+ description "Match for SCTP destination port.";
+ }
+ identity icmpv4_type {
+ base match-field;
+ description "Match for ICMP type.";
+ }
+ identity icmpv4_code {
+ base match-field;
+ description "Match for ICMP code.";
+ }
+ identity arp_op {
+ base match-field;
+ description "Match for ARP opcode.";
+ }
+ identity arp_spa {
+ base match-field;
+ description "Match for ARP source IPv4 address.";
+ }
+ identity arp_tpa {
+ base match-field;
+ description "Match for ARP target IPv4 address.";
+ }
+ identity arp_sha {
+ base match-field;
+ description "Match for ARP source hardware address.";
+ }
+ identity arp_tha {
+ base match-field;
+ description "Match for ARP target hardware address.";
+ }
+ identity ipv6_src {
+ base match-field;
+ description "Match for IPv6 source address.";
+ }
+ identity ipv6_dst {
+ base match-field;
+ description "Match for IPv6 destination address.";
+ }
+ identity ipv6_flabel {
+ base match-field;
+ description "Match for IPv6 Flow Label";
+ }
+ identity icmpv6_type {
+ base match-field;
+ description "Match for ICMPv6 type.";
+ }
+ identity icmpv6_code {
+ base match-field;
+ description "Match for ICMPv6 code.";
+ }
+ identity ipv6_nd_target {
+ base match-field;
+ description "Match for Target address for ND.";
+ }
+ identity ipv6_nd_sll {
+ base match-field;
+ description "Match for Source link-layer for ND.";
+ }
+ identity ipv6_nd_tll {
+ base match-field;
+ description "Match for Target link-layer for ND.";
+ }
+ identity mpls_label {
+ base match-field;
+ description "Match for MPLS label.";
+ }
+ identity mpls_tc {
+ base match-field;
+ description "Match for MPLS TC.";
+ }
+ identity mpls_bos {
+ base match-field;
+ description "Match for MPLS BoS bit.";
+ }
+ identity pbb_isid {
+ base match-field;
+ description "Match for PBB I-SID.";
+ }
+ identity tunnel_id {
+ base match-field;
+ description "Match for Logical Port Metadata";
+ }
+ identity ipv6_exthdr {
+ base match-field;
+ description "Match for IPv6 Extension Header pseudo-field";
+ }
+ identity tcp_flag {
+ base match-field;
+ description "TCP Flag 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";
+ leaf match-type {
+ type identityref {
+ base match-field;
+ }
+ }
+ leaf has-mask {
+ type boolean;
+ }
+ }
+ }
+
+ grouping table-feature-prop-type {
+ choice table-feature-prop-type {
+ case instructions {
+ container instructions {
+ uses flow:instruction-list;
+ }
+ }
+
+ case instructions-miss {
+ container instructions-miss {
+ uses flow:instruction-list;
+ }
+ }
+
+ case next-table {
+ container tables {
+ leaf-list table-ids {
+ type uint8;
+ }
+ }
+ }
+
+ case next-table-miss {
+ container tables-miss {
+ leaf-list table-ids {
+ type uint8;
+ }
+ }
+ }
+
+ case write-actions {
+ container write-actions {
+ uses action:action-list;
+ }
+ }
+
+ case write-actions-miss {
+ container write-actions-miss {
+ uses action:action-list;
+ }
+ }
+
+ case apply-actions {
+ container apply-actions {
+ uses action:action-list;
+ }
+ }
+
+ case apply-actions-miss {
+ container apply-actions-miss {
+ uses action:action-list;
+ }
+ }
+
+ case match {
+ container match-setfield {
+ uses set-field-match;
+ }
+ }
+
+ case wildcards {
+ container wildcard-setfield {
+ uses set-field-match;
+ }
+ }
+
+ case write-setfield {
+ container write-setfield {
+ uses set-field-match;
+ }
+ }
+
+ case write-setfield-miss {
+ container write-setfield-miss {
+ uses set-field-match;
+ }
+ }
+
+ case apply-setfield {
+ container apply-setfield {
+ uses set-field-match;
+ }
+ }
+
+ case apply-setfield-miss {
+ container apply-setfield-miss {
+ 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;
+ }
+
+ leaf metadata-match {
+ description "Bits of metadata table can match";
+ type uint64;
+ }
+
+ leaf metadata-write {
+ description "Bits of metadata table can write";
+ type uint64;
+ }
+
+ leaf max-entries {
+ description "Max number of entries supported";
+ type uint32;
+ }
+
+ leaf config {
+ description "Bitmap of OFPTC_ values";
+ type table-config;
+ }
+
+ container table-properties {
+ list table-feature-properties {
+ key "order";
+ uses action:ordered;
+ uses table-feature-prop-type;
+ }
+ }
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.opendaylight.openflowplugin.model</groupId>
+ <artifactId>model-parent</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>model-flow-service</artifactId>
+ <packaging>bundle</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>model-flow-base</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller.model</groupId>
+ <artifactId>model-inventory</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>opendaylight-l2-types</artifactId>
+ </dependency>
+ </dependencies>
+
+ <scm>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</connection>
+ <developerConnection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</developerConnection>
+ <url>https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:Main</url>
+ <tag>HEAD</tag>
+ </scm>
+
+</project>
--- /dev/null
+module flow-capable-transaction {
+ namespace "urn:opendaylight:flow: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 yang-ext {prefix ext; revision-date "2013-07-09";}
+
+ revision "2013-11-03" {
+ description "Initial revision";
+ }
+
+ typedef transaction-id {
+ type uint64;
+ }
+ // This refers to MD-SAL transaction reference.
+ grouping transaction-metadata {
+ leaf transaction-uri {
+ type inet:uri;
+ }
+ }
+
+ grouping transaction-aware {
+ leaf transaction-id {
+ type transaction-id;
+ }
+ }
+
+ grouping multipart-transaction-aware {
+ uses transaction-aware;
+
+ leaf moreReplies {
+ type boolean;
+ default false;
+ }
+ }
+
+ 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 {
+ input {
+ leaf node {
+ ext:context-reference "inv:node-context";
+ type inv:node-ref;
+ }
+ leaf transaction-id {
+ type transaction-id;
+ }
+ }
+ }
+}
--- /dev/null
+module flow-errors {
+ namespace "urn:opendaylight:flow:errors";
+ prefix error;
+
+ revision "2013-11-16" {
+ description "Initial revision of error";
+ }
+
+ typedef error-type {
+ type enumeration {
+ enum hello-failed;
+ enum bad-request;
+ enum bad-action;
+ enum bad-instruction;
+ enum bad-match;
+ enum flow-mod-failed;
+ enum group-mod-failed;
+ enum port-mod-failed;
+ enum table-mod-failed;
+ enum queue-op-failed;
+ enum switch-config-failed;
+ enum role-request-failed;
+ enum meter-mod-failed;
+ enum table-features-failed;
+ enum experimenter {
+ value "65535";
+ }
+ }
+ }
+
+ grouping error-message {
+ leaf type {
+ type error-type;
+ }
+
+ leaf code {
+ type uint16;
+ }
+
+ leaf data {
+ type string;
+ }
+ }
+
+ grouping experimenter-error-message {
+ leaf type {
+ type error-type;
+ }
+
+ leaf exp-type {
+ type uint16;
+ }
+
+ leaf experimenter-id {
+ type uint32;
+ }
+
+ leaf data {
+ type string;
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+module flow-node-inventory {
+ namespace "urn:opendaylight:flow: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 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";}
+
+ revision "2013-08-19" {
+ description "Flow Capable Node extensions to the Inventory model";
+ }
+
+ identity feature-capability {
+ }
+
+ identity flow-feature-capability-flow-stats {
+ description "Flow statistics";
+ base feature-capability;
+ }
+
+ identity flow-feature-capability-table-stats {
+ description "Table statistics";
+ base feature-capability;
+ }
+
+ identity flow-feature-capability-port-stats {
+ description "Port statistics";
+ base feature-capability;
+ }
+
+ identity flow-feature-capability-stp {
+ description "802.1d spanning tree";
+ base feature-capability;
+ }
+
+ identity flow-feature-capability-reserved {
+ description "Reserved, must be zero";
+ base feature-capability;
+ }
+
+ identity flow-feature-capability-ip-reasm {
+ description "Can reassemble IP fragments";
+ base feature-capability;
+ }
+
+ identity flow-feature-capability-queue-stats {
+ description "Queue statistics";
+ base feature-capability;
+ }
+
+ identity flow-feature-capability-arp-match-ip {
+ description "Match IP addresses in ARP pkts";
+ base feature-capability;
+ }
+
+ identity flow-feature-capability-group-stats {
+ description "Group statistics";
+ base feature-capability;
+ }
+
+ identity flow-feature-capability-port-blocked {
+ description "Switch will block looping ports";
+ base feature-capability;
+ }
+
+ grouping feature {
+ leaf support-state {
+ type inv:support-type;
+ }
+ }
+
+ grouping queue {
+ leaf queue-id {
+ type uint32;
+ description "id for the specific queue";
+ mandatory true;
+ }
+ container properties {
+ leaf minimum-rate {
+ type uint32;
+ }
+ leaf maximum-rate{
+ type uint32;
+ }
+ }
+ }
+
+ typedef flow-id {
+ type inet:uri;
+ }
+
+ grouping tables {
+ list table {
+ key "id";
+
+ leaf id {
+ type uint8;
+ }
+
+ uses table:table-features;
+
+ list flow {
+ key "id";
+
+ leaf id {
+ type flow-id;
+ }
+
+ uses flow:flow;
+ }
+ }
+ }
+
+ grouping meters {
+ list meter {
+ key "meter-id";
+ uses meter:meter;
+ }
+ }
+
+ grouping ip-address-grouping {
+ leaf ip-address {
+ description "IP address of a flow capable node.";
+ type inet:ip-address;
+ }
+ }
+
+ grouping flow-node {
+ leaf manufacturer {
+ type string;
+ }
+ leaf hardware {
+ type string;
+ }
+ leaf software {
+ type string;
+ }
+ leaf serial-number {
+ type string;
+ }
+ leaf description {
+ type string;
+ }
+
+ uses tables;
+ uses group:groups;
+ uses meters;
+ uses ip-address-grouping;
+ // TODO: ports
+
+ container supported-match-types {
+ list match-type {
+ key "match";
+ uses feature;
+ leaf match {
+ type string; // FIXME: Add identity
+ }
+
+ }
+ }
+
+ container supported-instructions {
+ list instruction-type {
+ key "instruction";
+ uses feature;
+ leaf instruction {
+ type string; // FIXME: Add identity
+ }
+ }
+ }
+
+ container supported-actions {
+ list action-type {
+ key "action";
+ uses feature;
+
+ leaf action {
+ type string; // FIXME: Add identity
+ }
+ }
+ }
+
+ 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 {
+
+ uses port:flow-capable-port;
+ }
+
+ augment "/inv:nodes/inv:node" {
+ ext:augment-identifier "flow-capable-node";
+ uses flow-node;
+ }
+
+ augment "/inv:nodes/inv:node/inv:node-connector" {
+ ext:augment-identifier "flow-capable-node-connector";
+ uses flow-node-connector;
+ }
+
+ 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";
+ 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;
+ }
+ }
+ }
+}
--- /dev/null
+module flow-topology-discovery {
+ namespace "urn:opendaylight:flow:topology:discovery";
+ prefix flow-node-topo;
+
+ import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
+
+ revision "2013-08-19" {
+ description "Flow Capable Node extensions to the Inventory model";
+ }
+
+
+ grouping link {
+ leaf source {
+ type inv:node-connector-ref;
+ }
+ leaf destination {
+ type inv:node-connector-ref;
+ }
+ }
+
+
+ notification link-discovered {
+ uses link;
+ }
+
+ notification link-overutilized {
+ uses link;
+ }
+
+ notification link-removed {
+ uses link;
+ }
+
+ notification link-utilization-normal {
+ uses link;
+ }
+
+ rpc solicit-refresh {
+
+ }
+
+}
--- /dev/null
+module node-config {
+ namespace "urn:opendaylight:module:config";
+ prefix node-config;
+
+ import flow-capable-transaction {prefix tr;}
+ import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
+
+ revision "2014-10-15" {
+ description "Initial revision of node configuration service";
+ }
+
+ grouping node-ref {
+ uses "inv:node-context-ref";
+ }
+
+
+
+ /** Base configuration structure **/
+ grouping node-config {
+ leaf flag {
+ type string;
+ description "Switch config flag. Expected values FRAGNORMAL, OFPCFRAGDROP, OFPCFRAGREASM, OFPCFRAGMASK";
+ }
+ leaf miss-search-length{
+ type uint16;
+ }
+ }
+
+ rpc set-config {
+ input {
+ uses node-config;
+ uses tr:transaction-aware;
+ uses node-ref;
+ }
+ output {
+ uses tr:transaction-aware;
+ }
+ }
+}
--- /dev/null
+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;}
+ import flow-capable-transaction {prefix tr;}
+ 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";}
+
+ 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";
+
+ 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.";
+
+ 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.";
+
+ 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.";
+
+ 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.";
+
+ 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.";
+
+ 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.";
+
+ 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.";
+
+ 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.";
+
+ 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.";
+
+ 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.";
+
+ 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.";
+
+ 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.";
+
+ 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.";
+
+ 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";
+ uses error:error-message;
+ uses tr:transaction-aware;
+ uses tr:transaction-metadata;
+ uses flow:base-node-error-notification;
+ uses flow:node-error-reference;
+ }
+}
+
--- /dev/null
+module packet-processing {
+ namespace "urn:opendaylight:packet:service";
+ prefix flow;
+
+ 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 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";}
+
+
+ revision "2013-07-09" {
+ description "";
+ }
+
+ typedef connection-cookie {
+ type uint32;
+ }
+
+ grouping raw-packet {
+ leaf ingress {
+ type inv:node-connector-ref;
+ }
+ leaf payload {
+ type binary;
+ }
+ }
+
+ grouping ethernet-packet {
+ leaf source {
+ type yang:mac-address;
+ }
+
+ leaf destination {
+ type yang:mac-address;
+ }
+ }
+
+ identity packet-in-reason {
+ description "Base identity for all the available packet in reason";
+ }
+
+ identity no-match {
+ 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";
+ }
+
+ identity 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;
+ }
+ }
+
+ container match {
+ uses match-type:match;
+ }
+
+ uses raw-packet;
+ }
+
+ rpc transmit-packet {
+ input {
+ uses inv:node-context-ref;
+
+ leaf connection-cookie {
+ type connection-cookie;
+ }
+
+ leaf egress {
+ type inv:node-connector-ref;
+ }
+ leaf buffer-id {
+ type uint32;
+ }
+
+ uses raw-packet;
+ uses action-type:action-list;
+ }
+ }
+}
--- /dev/null
+module sal-flow {
+ namespace "urn:opendaylight:flow:service";
+ prefix 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-meter-types {prefix meter-type;revision-date "2013-09-18";}
+ import flow-capable-transaction {prefix tr;}
+ import flow-errors {prefix error;}
+
+ revision "2013-08-19" {
+ description "Initial revision of flow service";
+ }
+
+ typedef flow-table-ref {
+ type instance-identifier;
+ }
+
+ grouping node-flow-removed {
+ leaf node {
+ ext:context-reference "inv:node-context";
+ type inv:node-ref;
+ }
+ leaf flow-table {
+ type flow-table-ref;
+ }
+ uses types:flow-mod-removed;
+ }
+
+ grouping node-flow {
+ uses "inv:node-context-ref";
+
+ leaf flow-table {
+ type flow-table-ref;
+ }
+ uses types:flow;
+ }
+
+ grouping base-node-error-notification {
+ leaf node {
+ ext:context-reference "inv:node-context";
+ type inv:node-ref;
+ }
+ }
+
+ grouping node-error-reference {
+ choice object-reference {
+ case flow-ref{
+ leaf flow-ref {
+ type types:flow-ref;
+ }
+ }
+ case group-ref{
+ leaf group-ref {
+ type group-type:group-ref;
+ }
+ }
+ case meter-ref{
+ leaf meter-ref {
+ type meter-type:meter-ref;
+ }
+ }
+ }
+ }
+
+ /** Base configuration structure **/
+ grouping flow-update {
+ uses "inv:node-context-ref";
+
+ container original-flow {
+ uses types:flow;
+ }
+ container updated-flow {
+ uses types:flow;
+ }
+ }
+
+ rpc add-flow {
+ input {
+ uses tr:transaction-metadata;
+ leaf flow-ref {
+ type types:flow-ref;
+ }
+ uses node-flow;
+ }
+ output {
+ uses tr:transaction-aware;
+ }
+ }
+
+ rpc remove-flow {
+ input {
+ uses tr:transaction-metadata;
+ leaf flow-ref {
+ type types:flow-ref;
+ }
+ uses node-flow;
+ }
+ output {
+ uses tr:transaction-aware;
+ }
+ }
+
+ rpc update-flow {
+ input {
+ uses tr:transaction-metadata;
+ leaf flow-ref {
+ type types:flow-ref;
+ }
+ uses flow-update;
+ }
+ output {
+ uses tr:transaction-aware;
+ }
+ }
+
+ notification flow-added {
+ uses tr:transaction-metadata;
+ leaf flow-ref {
+ type types:flow-ref;
+ }
+ uses node-flow;
+ uses tr:transaction-aware;
+ }
+
+ notification flow-updated {
+ uses tr:transaction-metadata;
+ leaf flow-ref {
+ type types:flow-ref;
+ }
+ uses node-flow;
+ uses tr:transaction-aware;
+ }
+
+ notification flow-removed {
+ uses tr:transaction-metadata;
+ leaf flow-ref {
+ type types:flow-ref;
+ }
+ uses node-flow;
+ uses tr:transaction-aware;
+ }
+
+ notification switch-flow-removed {
+ uses node-flow-removed;
+ }
+
+ notification node-error-notification {
+ 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 {
+ uses error:experimenter-error-message;
+ uses tr:transaction-aware;
+ }
+}
--- /dev/null
+module sal-group {
+ namespace "urn:opendaylight:group:service";
+ 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;}
+
+ revision "2013-09-18" {
+ description "Initial revision of group service";
+ }
+
+ grouping node-group {
+ uses "inv:node-context-ref";
+ uses group-type:group;
+ }
+
+ /** Base configuration structure **/
+ grouping group-update {
+ uses "inv:node-context-ref";
+
+ container original-group {
+ uses group-type:group;
+ }
+ container updated-group {
+ uses group-type:group;
+ }
+ }
+
+ rpc add-group {
+ input {
+ uses tr:transaction-metadata;
+ leaf group-ref {
+ type group-type:group-ref;
+ }
+ uses node-group;
+ }
+ output {
+ uses tr:transaction-aware;
+ }
+ }
+
+ rpc remove-group {
+ input {
+ uses tr:transaction-metadata;
+ leaf group-ref {
+ type group-type:group-ref;
+ }
+ uses node-group;
+ }
+ output {
+ uses tr:transaction-aware;
+ }
+ }
+
+ rpc update-group {
+ input {
+ uses tr:transaction-metadata;
+ leaf group-ref {
+ type group-type:group-ref;
+ }
+ uses group-update;
+ }
+ output {
+ uses tr:transaction-aware;
+ }
+ }
+
+ notification group-added {
+ uses tr:transaction-metadata;
+ leaf group-ref {
+ type group-type:group-ref;
+ }
+ uses node-group;
+ uses tr:transaction-aware;
+ }
+
+ notification group-updated {
+ uses tr:transaction-metadata;
+ leaf group-ref {
+ type group-type:group-ref;
+ }
+ uses node-group;
+ uses tr:transaction-aware;
+ }
+
+ notification group-removed {
+ uses tr:transaction-metadata;
+ leaf group-ref {
+ type group-type:group-ref;
+ }
+ uses node-group;
+ uses tr:transaction-aware;
+ }
+}
--- /dev/null
+module sal-meter {
+ namespace "urn:opendaylight:meter:service";
+ prefix 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;}
+
+ revision "2013-09-18" {
+ description "Initial revision of meter service";
+ }
+
+ grouping node-meter {
+ uses "inv:node-context-ref";
+
+ uses meter-type:meter;
+ }
+
+ /** Base configuration structure **/
+ grouping meter-update {
+ uses "inv:node-context-ref";
+
+ container original-meter {
+ uses meter-type:meter;
+ }
+ container updated-meter {
+ uses meter-type:meter;
+ }
+ }
+
+ rpc add-meter {
+ input {
+ uses tr:transaction-metadata;
+ leaf meter-ref {
+ type meter-type:meter-ref;
+ }
+ uses node-meter;
+ }
+ output {
+ uses tr:transaction-aware;
+ }
+ }
+
+ rpc remove-meter {
+ input {
+ uses tr:transaction-metadata;
+ leaf meter-ref {
+ type meter-type:meter-ref;
+ }
+
+ uses node-meter;
+ }
+ output {
+ uses tr:transaction-aware;
+ }
+ }
+
+ rpc update-meter {
+ input {
+ uses tr:transaction-metadata;
+ leaf meter-ref {
+ type meter-type:meter-ref;
+ }
+
+ uses meter-update;
+ }
+ output {
+ uses tr:transaction-aware;
+ }
+ }
+
+ notification meter-added {
+ uses tr:transaction-metadata;
+ leaf meter-ref {
+ type meter-type:meter-ref;
+ }
+ uses node-meter;
+ uses tr:transaction-aware;
+ }
+
+ notification meter-updated {
+ uses tr:transaction-metadata;
+ leaf meter-ref {
+ type meter-type:meter-ref;
+ }
+ uses node-meter;
+ uses tr:transaction-aware;
+ }
+
+ notification meter-removed {
+ uses tr:transaction-metadata;
+ leaf meter-ref {
+ type meter-type:meter-ref;
+ }
+ uses node-meter;
+ uses tr:transaction-aware;
+ }
+}
--- /dev/null
+module sal-port {
+ namespace "urn:opendaylight:port:service";
+ prefix 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;}
+
+ revision "2013-11-07" {
+ description "Initial revision of port service";
+ }
+
+ grouping node-port {
+ uses "inv:node-context-ref";
+
+ uses port-type:flow-port-status;
+ }
+
+ /** Base configuration structure **/
+ grouping port-update {
+ uses "inv:node-context-ref";
+
+ container original-port {
+ uses port-type:port-mod;
+ }
+ container updated-port {
+ uses port-type:port-mod;
+ }
+ }
+
+ rpc update-port {
+ input {
+ uses port-update;
+ uses tr:transaction-aware;
+ }
+ output {
+ uses tr:transaction-aware;
+ }
+ }
+
+ notification port-updated {
+ uses port-update;
+ uses tr:transaction-aware;
+ }
+
+ notification port-removed {
+ uses node-port;
+ }
+}
--- /dev/null
+module sal-queue {
+ namespace "urn:opendaylight:queue:service";
+ prefix queue;
+
+ import opendaylight-inventory {prefix inv; revision-date "2013-08-19";}
+ import opendaylight-queue-types {prefix queue-type; revision-date "2013-09-25";}
+
+ revision "2013-11-07" {
+ description "Initial revision of queue service";
+ }
+
+ grouping node-queue {
+ uses "inv:node-context-ref";
+
+ uses queue-type:queue-packet;
+ }
+
+
+ rpc get-queue {
+ output {
+ uses queue-type:queue-packet;
+ }
+ }
+
+ notification queue-get-config-reply {
+ uses node-queue;
+ }
+}
--- /dev/null
+module sal-table {
+ namespace "urn:opendaylight:table:service";
+ prefix 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;}
+
+ revision "2013-10-26" {
+ description "Initial revision of table service";
+ }
+
+ /** Base configuration structure **/
+ grouping table-update {
+ uses "inv:node-context-ref";
+ container original-table {
+ uses table-type:table-features;
+ }
+ container updated-table {
+ uses table-type:table-features;
+ }
+ }
+
+ rpc update-table {
+ input {
+ uses table-update;
+ uses tr:transaction-aware;
+ }
+ output {
+ uses tr:transaction-aware;
+ }
+ }
+
+ notification table-updated {
+ uses "inv:node-context-ref";
+ uses tr:multipart-transaction-aware;
+ uses table-type:table-features;
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.opendaylight.openflowplugin.model</groupId>
+ <artifactId>model-parent</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>model-flow-statistics</artifactId>
+ <packaging>bundle</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>model-flow-base</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>model-flow-service</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller.model</groupId>
+ <artifactId>model-inventory</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>opendaylight-l2-types</artifactId>
+ </dependency>
+ </dependencies>
+
+ <scm>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</connection>
+ <developerConnection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</developerConnection>
+ <url>https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:Main</url>
+ <tag>HEAD</tag>
+ </scm>
+
+</project>
--- /dev/null
+module opendaylight-flow-statistics {
+ namespace "urn:opendaylight:flow:statistics";
+ prefix flowstat;
+
+ 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 flow-types;revision-date "2013-10-26";}
+ import opendaylight-statistics-types {prefix stat-types;revision-date "2013-09-25";}
+ 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";}
+
+
+ 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";
+ uses flow-statistics;
+ }
+
+ grouping flow-statistics {
+ container flow-statistics {
+ //config "false";
+ uses stat-types:generic-statistics;
+ }
+ }
+
+ typedef flow-id {
+ description "flow id";
+ type inet:uri;
+ }
+
+ grouping flow-and-statistics-map-list {
+ description "List of flow and statistics map";
+ list flow-and-statistics-map-list {
+ key "flow-id";
+ leaf flow-id {
+ type flow-id;
+ }
+ uses flow-and-statistics-map;
+ }
+ }
+
+ grouping flow-and-statistics-map{
+ description "Mapping between flow and its statistics";
+ uses flow-types:flow;
+ uses stat-types:generic-statistics;
+ }
+
+ // RPC calls to fetch flow statistics
+ rpc get-all-flows-statistics-from-all-flow-tables {
+ description "Fetch statistics of all the flow present in all the flow tables of the switch";
+ input {
+ uses inv:node-context-ref;
+ }
+ output {
+ uses flow-and-statistics-map-list;
+ uses tr:transaction-aware;
+ }
+
+ }
+
+ rpc get-all-flow-statistics-from-flow-table {
+ description "Fetch statistics of all the flow present in the specific flow table of the switch";
+ input {
+ uses inv:node-context-ref;
+ leaf table-id {
+ type table-types:table-id;
+ }
+ }
+ output {
+ uses flow-and-statistics-map-list;
+ uses tr:transaction-aware;
+ }
+ }
+
+ rpc get-flow-statistics-from-flow-table {
+ description "Fetch statistics of the specific flow present in the specific flow table of the switch";
+ input {
+ uses inv:node-context-ref;
+ uses flow-types:flow;
+ }
+ output {
+ uses flow-and-statistics-map-list;
+ uses tr:transaction-aware;
+ }
+ }
+
+ notification flows-statistics-update {
+ description "Flows statistics sent by switch";
+ leaf moreReplies {
+ type boolean;
+ }
+ uses inv:node;
+ uses flow-and-statistics-map-list;
+ uses tr:transaction-aware;
+ }
+
+ //Models for aggregate flow statistics collection
+ augment "/inv:nodes/inv:node/flow-node:table" {
+ 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 {
+ 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 {
+ type table-types:table-id;
+ }
+ }
+ output {
+ uses stat-types:aggregate-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";
+ input {
+ uses inv:node-context-ref;
+ uses flow-types:flow;
+ }
+ output {
+ uses stat-types:aggregate-flow-statistics;
+ uses tr:transaction-aware;
+ }
+ }
+
+ notification aggregate-flow-statistics-update {
+ description "Aggregate flow statistics for a table, sent by switch";
+ uses inv:node;
+ uses stat-types:aggregate-flow-statistics;
+ uses tr:multipart-transaction-aware;
+ }
+}
--- /dev/null
+module opendaylight-flow-table-statistics {
+ namespace "urn:opendaylight:flow:table:statistics";
+ prefix flowtablestat;
+
+ import flow-capable-transaction {prefix tr;}
+ 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";}
+
+
+ contact
+ "Anilkumar Vishnoi
+ Email: avishnoi@in.ibm.com";
+
+ 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" {
+ ext:augment-identifier "flow-table-statistics-data";
+ uses flow-table-statistics;
+ }
+
+ grouping flow-table-statistics {
+ 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 {
+ list flow-table-and-statistics-map {
+ key "table-id";
+ leaf table-id {
+ type table-types:table-id;
+ }
+ uses stat-types:generic-table-statistics;
+ }
+ }
+
+ rpc get-flow-tables-statistics {
+ description "Fetch statistics of all the flow tables present on the tarnet node";
+ input {
+ uses inv:node-context-ref;
+ }
+ output {
+ uses flow-table-and-statistics-map;
+ uses tr:transaction-aware;
+ }
+ }
+
+ //Notification to receive table statistics update
+
+ notification flow-table-statistics-update {
+ description "Receive flow table statistics update";
+
+ uses inv:node;
+ uses flow-table-and-statistics-map;
+ uses tr:multipart-transaction-aware;
+ }
+}
--- /dev/null
+module opendaylight-group-statistics {
+ namespace "urn:opendaylight:group:statistics";
+ prefix groupstat;
+
+ 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;}
+
+ contact
+ "Anilkumar Vishnoi
+ Email: avishnoi@in.ibm.com";
+
+ revision "2013-11-11" {
+ description "Initial revision of group statistics service";
+ }
+
+ grouping group-statistics {
+ container group-statistics {
+ //config "false";
+ uses group-types:group-statistics;
+ }
+ }
+
+ augment "/inv:nodes/inv:node/fni:group" {
+ ext:augment-identifier "node-group-statistics";
+ uses group-statistics;
+ }
+
+ grouping group-desc {
+ container group-desc {
+ //config "false";
+ uses group-types:group;
+ }
+ }
+
+ augment "/inv:nodes/inv:node/fni:group" {
+ ext:augment-identifier "node-group-desc-stats";
+ uses group-desc;
+ }
+
+ grouping group-features {
+ container group-features {
+ //config "false";
+ uses group-types:group-features-reply;
+ }
+ }
+
+ augment "/inv:nodes/inv:node" {
+ ext:augment-identifier "node-group-features";
+ uses group-features;
+ }
+
+ // RPC calls
+ rpc get-all-group-statistics {
+ input {
+ uses inv:node-context-ref;
+ }
+ output {
+ uses group-types:group-statistics-reply;
+ uses tr:transaction-aware;
+ }
+
+ }
+
+ rpc get-group-statistics {
+ 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 {
+ input {
+ uses inv:node-context-ref;
+ }
+ output {
+ uses group-types:group-desc-stats-reply;
+ uses tr:transaction-aware;
+ }
+ }
+
+ rpc get-group-features {
+ input {
+ uses inv:node-context-ref;
+ }
+ output {
+ uses group-types:group-features-reply;
+ uses tr:transaction-aware;
+ }
+ }
+
+
+ //Notification calls
+
+ notification group-statistics-updated {
+ uses inv:node;
+ uses group-types:group-statistics-reply;
+ uses tr:multipart-transaction-aware;
+ }
+
+ notification group-desc-stats-updated {
+ uses inv:node;
+ uses group-types:group-desc-stats-reply;
+ uses tr:multipart-transaction-aware;
+ }
+
+ notification group-features-updated {
+ uses inv:node;
+ uses group-types:group-features-reply;
+ uses tr:multipart-transaction-aware;
+ }
+}
--- /dev/null
+module opendaylight-meter-statistics {
+ namespace "urn:opendaylight:meter:statistics";
+ prefix meterstat;
+
+ 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;}
+
+ contact
+ "Anilkumar Vishnoi
+ Email: avishnoi@in.ibm.com";
+
+ revision "2013-11-11" {
+ description "Initial revision of meter statistics service";
+ }
+
+ augment "/inv:nodes/inv:node/flow-node:meter" {
+ ext:augment-identifier "node-meter-statistics";
+ container meter-statistics {
+ //config "false";
+ uses meter-types:meter-statistics;
+ }
+ }
+
+ augment "/inv:nodes/inv:node/flow-node:meter" {
+ ext:augment-identifier "node-meter-config-stats";
+ container meter-config-stats {
+ //config "false";
+ uses meter-types:meter;
+ }
+ }
+
+ augment "/inv:nodes/inv: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 {
+ input {
+ uses inv:node-context-ref;
+ }
+ output {
+ uses meter-types:meter-statistics-reply;
+ uses tr:transaction-aware;
+ }
+
+ }
+
+ rpc get-meter-statistics {
+ input {
+ uses inv:node-context-ref;
+ leaf meter-id{
+ type meter-types:meter-id;
+ }
+ }
+ output {
+ uses meter-types:meter-statistics-reply;
+ uses tr:transaction-aware;
+ }
+
+ }
+
+ rpc get-all-meter-config-statistics {
+ input {
+ uses inv:node-context-ref;
+ }
+ output {
+ uses meter-types:meter-config-stats-reply;
+ uses tr:transaction-aware;
+ }
+ }
+
+ rpc get-meter-features {
+ input {
+ uses inv:node-context-ref;
+ }
+ output {
+ uses meter-types:meter-features-reply;
+ uses tr:transaction-aware;
+ }
+ }
+
+
+ //Notification calls
+
+ notification meter-statistics-updated {
+ uses inv:node;
+ uses meter-types:meter-statistics-reply;
+ uses tr:multipart-transaction-aware;
+ }
+
+ notification meter-config-stats-updated {
+ uses inv:node;
+ uses meter-types:meter-config-stats-reply;
+ uses tr:multipart-transaction-aware;
+ }
+
+ notification meter-features-updated {
+ uses inv:node;
+ uses meter-types:meter-features-reply;
+ uses tr:multipart-transaction-aware;
+ }
+}
--- /dev/null
+module opendaylight-port-statistics {
+ namespace "urn:opendaylight:port:statistics";
+ prefix portstat;
+
+ import flow-capable-transaction {prefix tr;}
+ 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";}
+
+ contact
+ "Anilkumar Vishnoi
+ Email: avishnoi@in.ibm.com";
+
+ revision "2013-12-14" {
+ description "Initial revision of port statistics model";
+ }
+
+ //Augment port statistics data to the flow-capable-node-connector
+ augment "/inv:nodes/inv:node/inv:node-connector" {
+ ext:augment-identifier "flow-capable-node-connector-statistics-data";
+ uses flow-capable-node-connector-statistics;
+ }
+
+ grouping flow-capable-node-connector-statistics {
+ container flow-capable-node-connector-statistics {
+ //config "false";
+ uses stat-types:node-connector-statistics;
+ }
+ }
+
+ // RPC calls
+ rpc get-all-node-connectors-statistics {
+ description "Get statistics for all node connectors from the node";
+ input {
+ uses inv:node-context-ref;
+ }
+ output {
+ uses node-connector-statistics-and-port-number-map;
+ uses tr:transaction-aware;
+ }
+ }
+
+ rpc get-node-connector-statistics {
+ description "Get statistics for given node connector from the node";
+ input {
+ uses inv:node-context-ref;
+ leaf node-connector-id {
+ type inv:node-connector-id;
+ }
+ }
+ output {
+ uses stat-types:node-connector-statistics;
+ uses tr:transaction-aware;
+ }
+ }
+
+ //Notification for node connector statistics update
+ grouping node-connector-statistics-and-port-number-map {
+ description "List of map - node connectors and their statistics";
+ list node-connector-statistics-and-port-number-map {
+ key "node-connector-id";
+ leaf node-connector-id {
+ type inv:node-connector-id;
+ }
+ uses stat-types:node-connector-statistics;
+ }
+ }
+
+ notification node-connector-statistics-update {
+ uses inv:node;
+ uses node-connector-statistics-and-port-number-map;
+ uses tr:multipart-transaction-aware;
+ }
+}
--- /dev/null
+module opendaylight-queue-statistics {
+ namespace "urn:opendaylight:queue:statistics";
+ prefix queuestat;
+
+ import flow-capable-transaction {prefix tr;}
+ 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";}
+
+ contact
+ "Anilkumar Vishnoi
+ Email: avishnoi@in.ibm.com";
+
+ 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" {
+ ext:augment-identifier "flow-capable-node-connector-queue-statistics-data";
+ uses flow-capable-node-connector-queue-statistics;
+ }
+
+ grouping flow-capable-node-connector-queue-statistics {
+ 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 {
+ key "queue-id node-connector-id";
+ leaf queue-id {
+ type queue-types:queue-id;
+ }
+ leaf node-connector-id {
+ type inv:node-connector-id;
+ }
+
+ uses stat-types:generic-queue-statistics;
+ }
+ }
+
+ rpc get-all-queues-statistics-from-all-ports {
+ description "Get statistics for all the queues attached to all the ports from the node";
+ input {
+ uses inv:node-context-ref;
+ }
+ output {
+ uses queue-id-and-statistics-map;
+ uses tr:transaction-aware;
+ }
+ }
+
+ rpc get-all-queues-statistics-from-given-port {
+ description "Get statistics for all queues for given port of the node";
+ input {
+ uses inv:node-context-ref;
+ leaf node-connector-id {
+ type inv:node-connector-id;
+ }
+ }
+ output {
+ uses queue-id-and-statistics-map;
+ uses tr:transaction-aware;
+ }
+ }
+
+ rpc get-queue-statistics-from-given-port {
+ description "Get statistics for given queues from given port of the node";
+ input {
+ uses inv:node-context-ref;
+ leaf node-connector-id {
+ type inv:node-connector-id;
+ }
+ leaf queue-id {
+ type queue-types:queue-id;
+ }
+ }
+ output {
+ uses queue-id-and-statistics-map;
+ uses tr:transaction-aware;
+ }
+ }
+
+ //Notification for port statistics update
+
+ notification queue-statistics-update {
+ uses inv:node;
+ uses queue-id-and-statistics-map;
+ uses tr:multipart-transaction-aware;
+ }
+}
--- /dev/null
+module opendaylight-statistics-types {
+ namespace "urn:opendaylight:model:statistics:types";
+ prefix stat-types;
+
+ import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
+
+ revision "2013-09-25" {
+ description "Initial revision of flow service";
+ }
+
+ grouping duration {
+ container duration {
+ leaf second {
+ type yang:counter32;
+ }
+ leaf nanosecond {
+ type yang:counter32;
+ }
+ }
+ }
+
+ grouping node-connector-statistics {
+ container packets {
+ leaf received {
+ type uint64;
+ }
+ leaf transmitted {
+ type uint64;
+ }
+ }
+ container bytes {
+ leaf received {
+ type uint64;
+ }
+ leaf transmitted {
+ type uint64;
+ }
+ }
+ leaf receive-drops {
+ type uint64;
+ }
+ leaf transmit-drops {
+ type uint64;
+ }
+ leaf receive-errors {
+ type uint64;
+ }
+ leaf transmit-errors {
+ type uint64;
+ }
+ leaf receive-frame-error {
+ type uint64;
+ }
+ leaf receive-over-run-error {
+ type uint64;
+ }
+ leaf receive-crc-error {
+ type uint64;
+ }
+ leaf collision-count {
+ type uint64;
+ }
+ uses duration;
+ }
+
+ grouping generic-statistics {
+ description "Generic grouping for statistics";
+ leaf packet-count {
+ type yang:counter64;
+ }
+
+ leaf byte-count {
+ type yang:counter64;
+ }
+ uses duration;
+ }
+
+ grouping generic-table-statistics {
+ 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;
+ }
+ }
+
+ grouping aggregate-flow-statistics {
+ description "Aggregate flow statistics";
+ leaf packet-count {
+ type yang:counter64;
+ }
+
+ leaf byte-count {
+ type yang:counter64;
+ }
+ leaf flow-count {
+ 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;
+ }
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.opendaylight.openflowplugin</groupId>
+ <artifactId>openflowplugin-parent</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.opendaylight.openflowplugin.model</groupId>
+ <artifactId>model-parent</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>model-flow-base</module>
+ <module>model-flow-service</module>
+ <module>model-flow-statistics</module>
+ </modules>
+
+ <properties>
+ <bundle.plugin.version>2.4.0</bundle.plugin.version>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-binding</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>ietf-inet-types</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>ietf-yang-types</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>yang-ext</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
+ <Import-Package>org.opendaylight.yangtools.yang.binding.annotations, *</Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-maven-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>maven-sal-api-gen-plugin</artifactId>
+ <version>${yangtools.version}</version>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-binding</artifactId>
+ <version>${yangtools.version}</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-sources</goal>
+ </goals>
+ <configuration>
+ <yangFilesRootDir>src/main/yang</yangFilesRootDir>
+ <codeGenerators>
+ <generator>
+ <codeGeneratorClass>org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
+ <outputBaseDir>${salGeneratorPath}</outputBaseDir>
+ </generator>
+ <generator>
+ <codeGeneratorClass>org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl</codeGeneratorClass>
+ <outputBaseDir>target/site/models</outputBaseDir>
+ </generator>
+ <generator>
+ <codeGeneratorClass>org.opendaylight.yangtools.yang.wadl.generator.maven.WadlGenerator</codeGeneratorClass>
+ <outputBaseDir>target/site/models</outputBaseDir>
+ </generator>
+ </codeGenerators>
+ <inspectDependencies>true</inspectDependencies>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+
+ <scm>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</connection>
+ <developerConnection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</developerConnection>
+ <url>https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:Main</url>
+ <tag>HEAD</tag>
+ </scm>
+
+</project>
<karaf.distro.empty.version>1.5.0-SNAPSHOT</karaf.distro.empty.version>
<yang.binding.version>0.7.0-SNAPSHOT</yang.binding.version>
<dlux.version>0.2.0-SNAPSHOT</dlux.version>
+ <config.version>0.3.0-SNAPSHOT</config.version>
+ <yangtools.version>0.7.0-SNAPSHOT</yangtools.version>
+ <opendaylight-l2-types.version>2013.08.27.7-SNAPSHOT</opendaylight-l2-types.version>
+ <ietf-yang-types.version>2010.09.24.7-SNAPSHOT</ietf-yang-types.version>
+ <ietf-inet-types.version>2010.09.24.7-SNAPSHOT</ietf-inet-types.version>
+ <yang-ext.version>2013.09.07.7-SNAPSHOT</yang-ext.version>
</properties>
<dependencyManagement>
<artifactId>yang-binding</artifactId>
<version>${yang.binding.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-common</artifactId>
+ <version>${yang.binding.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>ietf-inet-types</artifactId>
+ <version>${ietf-inet-types.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>ietf-yang-types</artifactId>
+ <version>${ietf-yang-types.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>yang-ext</artifactId>
+ <version>${yang-ext.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>opendaylight-l2-types</artifactId>
+ <version>${opendaylight-l2-types.version}</version>
+ </dependency>
+
<dependency>
<groupId>org.opendaylight.openflowplugin</groupId>
<artifactId>openflowplugin-api</artifactId>
<artifactId>model-inventory</artifactId>
<version>${controller.model.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller.model</groupId>
+ <artifactId>model-topology</artifactId>
+ <version>${controller.model.version}</version>
+ </dependency>
+
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-api</artifactId>
<version>${controller.model.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-binding-config</artifactId>
+ <version>${controller.model.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-binding-util</artifactId>
+ <version>${controller.model.version}</version>
+ </dependency>
+
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>liblldp</artifactId>
<module>features</module>
<module>samples/sample-consumer</module>
<module>samples/learning-switch</module>
- <module>applications</module>
+ <module>applications</module>
+ <module>model</module>
</modules>
</project>