本文整理了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow
类的一些代码示例,展示了Flow
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow
类的具体详情如下:
包路径:org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow
类名称:Flow
[英]This class represents the following YANG schema fragment defined in module flow-node-inventory
list flow {
key "id"
leaf id {
type flow-id;
}
container match {
leaf in-port {
type node-connector-id;
}
leaf in-phy-port {
type node-connector-id;
}
container metadata {
leaf metadata {
type uint64;
}
leaf metadata-mask {
type uint64;
}
uses of-metadata;
}
container tunnel {
leaf tunnel-id {
type uint64;
}
leaf tunnel-mask {
type uint64;
}
}
container ethernet-match {
container ethernet-source {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-destination {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-type {
leaf type {
type ether-type;
}
}
uses ethernet-match-fields;
}
container vlan-match {
container vlan-id {
leaf vlan-id-present {
type boolean;
}
leaf vlan-id {
type vlan-id;
}
}
leaf vlan-pcp {
type vlan-pcp;
}
uses vlan-match-fields;
}
container ip-match {
leaf ip-protocol {
type uint8;
}
leaf ip-dscp {
type dscp;
}
leaf ip-ecn {
type uint8;
}
leaf ip-proto {
type ip-version;
}
uses ip-match-fields;
}
choice layer-3-match {
case arp-match {
leaf arp-op {
type uint16;
}
leaf arp-source-transport-address {
type ipv4-prefix;
}
leaf arp-target-transport-address {
type ipv4-prefix;
}
container arp-source-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container arp-target-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
}
case ipv4-match {
leaf ipv4-source {
type ipv4-prefix;
}
leaf ipv4-destination {
type ipv4-prefix;
}
}
case ipv4-match-arbitrary-bit-mask {
leaf ipv4-source-address-no-mask {
type ipv4-address;
}
leaf ipv4-destination-address-no-mask {
type ipv4-address;
}
leaf ipv4-source-arbitrary-bitmask {
type dotted-quad;
}
leaf ipv4-destination-arbitrary-bitmask {
type dotted-quad;
}
}
case ipv6-match {
leaf ipv6-source {
type ipv6-prefix;
}
leaf ipv6-destination {
type ipv6-prefix;
}
leaf ipv6-nd-target {
type ipv6-address;
}
container ipv6-label {
leaf ipv6-flabel {
type ipv6-flow-label;
}
leaf flabel-mask {
type ipv6-flow-label;
}
}
leaf ipv6-nd-sll {
type mac-address;
}
leaf ipv6-nd-tll {
type mac-address;
}
container ipv6-ext-header {
leaf ipv6-exthdr {
type uint16;
}
leaf ipv6-exthdr-mask {
type uint16;
}
}
}
case ipv6-match-arbitrary-bit-mask {
leaf ipv6-source-address-no-mask {
type ipv6-address;
}
leaf ipv6-source-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
leaf ipv6-destination-address-no-mask {
type ipv6-address;
}
leaf ipv6-destination-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
}
case tunnel-ipv4-match {
leaf tunnel-ipv4-source {
type ipv4-prefix;
}
leaf tunnel-ipv4-destination {
type ipv4-prefix;
}
}
}
choice layer-4-match {
case sctp-match {
leaf sctp-source-port {
type port-number;
}
leaf sctp-destination-port {
type port-number;
}
}
case tcp-match {
leaf tcp-source-port {
type port-number;
}
leaf tcp-destination-port {
type port-number;
}
}
case udp-match {
leaf udp-source-port {
type port-number;
}
leaf udp-destination-port {
type port-number;
}
}
}
container icmpv4-match {
leaf icmpv4-type {
type uint8;
}
leaf icmpv4-code {
type uint8;
}
uses icmpv4-match-fields;
}
container icmpv6-match {
leaf icmpv6-type {
type uint8;
}
leaf icmpv6-code {
type uint8;
}
uses icmpv6-match-fields;
}
container protocol-match-fields {
leaf mpls-label {
type uint32;
}
leaf mpls-tc {
type uint8;
}
leaf mpls-bos {
type uint8;
}
container pbb {
leaf pbb-isid {
type uint32;
}
leaf pbb-mask {
type uint32;
}
}
uses protocol-match-fields;
}
container tcp-flags-match {
leaf tcp-flags {
type uint16;
}
leaf tcp-flags-mask {
type uint16;
}
uses tcp-flags-match-fields;
}
uses match;
}
container instructions {
list instruction {
key "order"
leaf order {
type int32;
}
choice instruction {
case apply-actions-case {
container apply-actions {
list action {
key "order"
leaf order {
type int32;
}
choice action {
case controller-action-case {
container controller-action {
leaf max-length {
type uint16;
}
}
}
case copy-ttl-in-case {
container copy-ttl-in {
}
}
case copy-ttl-out-case {
container copy-ttl-out {
}
}
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 group-action-case {
container group-action {
leaf group {
type string;
}
leaf group-id {
type uint32;
}
}
}
case hw-path-action-case {
container hw-path-action {
}
}
case loopback-action-case {
container loopback-action {
}
}
case output-action-case {
container output-action {
leaf output-node-connector {
type uri;
}
leaf max-length {
type uint16;
}
}
}
case pop-mpls-action-case {
container pop-mpls-action {
leaf ethernet-type {
type uint16;
}
}
}
case pop-pbb-action-case {
container pop-pbb-action {
}
}
case pop-vlan-action-case {
container pop-vlan-action {
}
}
case push-mpls-action-case {
container push-mpls-action {
leaf ethernet-type {
type uint16;
}
}
}
case push-pbb-action-case {
container push-pbb-action {
leaf ethernet-type {
type uint16;
}
}
}
case push-vlan-action-case {
container push-vlan-action {
leaf ethernet-type {
type uint16;
}
leaf tag {
type int32;
}
leaf pcp {
type int32;
}
leaf cfi {
type vlan-cfi;
}
leaf vlan-id {
type vlan-id;
}
}
}
case set-dl-dst-action-case {
container set-dl-dst-action {
leaf address {
type mac-address;
}
}
}
case set-dl-src-action-case {
container set-dl-src-action {
leaf address {
type mac-address;
}
}
}
case set-dl-type-action-case {
container set-dl-type-action {
leaf dl-type {
type ether-type;
}
}
}
case set-field-case {
container set-field {
leaf in-port {
type node-connector-id;
}
leaf in-phy-port {
type node-connector-id;
}
container metadata {
leaf metadata {
type uint64;
}
leaf metadata-mask {
type uint64;
}
uses of-metadata;
}
container tunnel {
leaf tunnel-id {
type uint64;
}
leaf tunnel-mask {
type uint64;
}
}
container ethernet-match {
container ethernet-source {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-destination {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-type {
leaf type {
type ether-type;
}
}
uses ethernet-match-fields;
}
container vlan-match {
container vlan-id {
leaf vlan-id-present {
type boolean;
}
leaf vlan-id {
type vlan-id;
}
}
leaf vlan-pcp {
type vlan-pcp;
}
uses vlan-match-fields;
}
container ip-match {
leaf ip-protocol {
type uint8;
}
leaf ip-dscp {
type dscp;
}
leaf ip-ecn {
type uint8;
}
leaf ip-proto {
type ip-version;
}
uses ip-match-fields;
}
choice layer-3-match {
case arp-match {
leaf arp-op {
type uint16;
}
leaf arp-source-transport-address {
type ipv4-prefix;
}
leaf arp-target-transport-address {
type ipv4-prefix;
}
container arp-source-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container arp-target-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
}
case ipv4-match {
leaf ipv4-source {
type ipv4-prefix;
}
leaf ipv4-destination {
type ipv4-prefix;
}
}
case ipv4-match-arbitrary-bit-mask {
leaf ipv4-source-address-no-mask {
type ipv4-address;
}
leaf ipv4-destination-address-no-mask {
type ipv4-address;
}
leaf ipv4-source-arbitrary-bitmask {
type dotted-quad;
}
leaf ipv4-destination-arbitrary-bitmask {
type dotted-quad;
}
}
case ipv6-match {
leaf ipv6-source {
type ipv6-prefix;
}
leaf ipv6-destination {
type ipv6-prefix;
}
leaf ipv6-nd-target {
type ipv6-address;
}
container ipv6-label {
leaf ipv6-flabel {
type ipv6-flow-label;
}
leaf flabel-mask {
type ipv6-flow-label;
}
}
leaf ipv6-nd-sll {
type mac-address;
}
leaf ipv6-nd-tll {
type mac-address;
}
container ipv6-ext-header {
leaf ipv6-exthdr {
type uint16;
}
leaf ipv6-exthdr-mask {
type uint16;
}
}
}
case ipv6-match-arbitrary-bit-mask {
leaf ipv6-source-address-no-mask {
type ipv6-address;
}
leaf ipv6-source-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
leaf ipv6-destination-address-no-mask {
type ipv6-address;
}
leaf ipv6-destination-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
}
case tunnel-ipv4-match {
leaf tunnel-ipv4-source {
type ipv4-prefix;
}
leaf tunnel-ipv4-destination {
type ipv4-prefix;
}
}
}
choice layer-4-match {
case sctp-match {
leaf sctp-source-port {
type port-number;
}
leaf sctp-destination-port {
type port-number;
}
}
case tcp-match {
leaf tcp-source-port {
type port-number;
}
leaf tcp-destination-port {
type port-number;
}
}
case udp-match {
leaf udp-source-port {
type port-number;
}
leaf udp-destination-port {
type port-number;
}
}
}
container icmpv4-match {
leaf icmpv4-type {
type uint8;
}
leaf icmpv4-code {
type uint8;
}
uses icmpv4-match-fields;
}
container icmpv6-match {
leaf icmpv6-type {
type uint8;
}
leaf icmpv6-code {
type uint8;
}
uses icmpv6-match-fields;
}
container protocol-match-fields {
leaf mpls-label {
type uint32;
}
leaf mpls-tc {
type uint8;
}
leaf mpls-bos {
type uint8;
}
container pbb {
leaf pbb-isid {
type uint32;
}
leaf pbb-mask {
type uint32;
}
}
uses protocol-match-fields;
}
container tcp-flags-match {
leaf tcp-flags {
type uint16;
}
leaf tcp-flags-mask {
type uint16;
}
uses tcp-flags-match-fields;
}
uses match;
}
}
case set-mpls-ttl-action-case {
container set-mpls-ttl-action {
leaf mpls-ttl {
type uint8;
}
}
}
case set-next-hop-action-case {
container set-next-hop-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-dst-action-case {
container set-nw-dst-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-src-action-case {
container set-nw-src-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-tos-action-case {
container set-nw-tos-action {
leaf tos {
type int32;
}
}
}
case set-nw-ttl-action-case {
container set-nw-ttl-action {
leaf nw-ttl {
type uint8;
}
}
}
case set-queue-action-case {
container set-queue-action {
leaf queue {
type string;
}
leaf queue-id {
type uint32;
}
}
}
case set-tp-dst-action-case {
container set-tp-dst-action {
leaf port {
type port-number;
}
}
}
case set-tp-src-action-case {
container set-tp-src-action {
leaf port {
type 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 vlan-id;
}
}
}
case set-vlan-pcp-action-case {
container set-vlan-pcp-action {
leaf vlan-pcp {
type vlan-pcp;
}
}
}
case strip-vlan-action-case {
container strip-vlan-action {
}
}
case sw-path-action-case {
container sw-path-action {
}
}
}
uses action;
uses ordered;
}
uses action-list;
}
}
case clear-actions-case {
container clear-actions {
list action {
key "order"
leaf order {
type int32;
}
choice action {
case controller-action-case {
container controller-action {
leaf max-length {
type uint16;
}
}
}
case copy-ttl-in-case {
container copy-ttl-in {
}
}
case copy-ttl-out-case {
container copy-ttl-out {
}
}
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 group-action-case {
container group-action {
leaf group {
type string;
}
leaf group-id {
type uint32;
}
}
}
case hw-path-action-case {
container hw-path-action {
}
}
case loopback-action-case {
container loopback-action {
}
}
case output-action-case {
container output-action {
leaf output-node-connector {
type uri;
}
leaf max-length {
type uint16;
}
}
}
case pop-mpls-action-case {
container pop-mpls-action {
leaf ethernet-type {
type uint16;
}
}
}
case pop-pbb-action-case {
container pop-pbb-action {
}
}
case pop-vlan-action-case {
container pop-vlan-action {
}
}
case push-mpls-action-case {
container push-mpls-action {
leaf ethernet-type {
type uint16;
}
}
}
case push-pbb-action-case {
container push-pbb-action {
leaf ethernet-type {
type uint16;
}
}
}
case push-vlan-action-case {
container push-vlan-action {
leaf ethernet-type {
type uint16;
}
leaf tag {
type int32;
}
leaf pcp {
type int32;
}
leaf cfi {
type vlan-cfi;
}
leaf vlan-id {
type vlan-id;
}
}
}
case set-dl-dst-action-case {
container set-dl-dst-action {
leaf address {
type mac-address;
}
}
}
case set-dl-src-action-case {
container set-dl-src-action {
leaf address {
type mac-address;
}
}
}
case set-dl-type-action-case {
container set-dl-type-action {
leaf dl-type {
type ether-type;
}
}
}
case set-field-case {
container set-field {
leaf in-port {
type node-connector-id;
}
leaf in-phy-port {
type node-connector-id;
}
container metadata {
leaf metadata {
type uint64;
}
leaf metadata-mask {
type uint64;
}
uses of-metadata;
}
container tunnel {
leaf tunnel-id {
type uint64;
}
leaf tunnel-mask {
type uint64;
}
}
container ethernet-match {
container ethernet-source {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-destination {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-type {
leaf type {
type ether-type;
}
}
uses ethernet-match-fields;
}
container vlan-match {
container vlan-id {
leaf vlan-id-present {
type boolean;
}
leaf vlan-id {
type vlan-id;
}
}
leaf vlan-pcp {
type vlan-pcp;
}
uses vlan-match-fields;
}
container ip-match {
leaf ip-protocol {
type uint8;
}
leaf ip-dscp {
type dscp;
}
leaf ip-ecn {
type uint8;
}
leaf ip-proto {
type ip-version;
}
uses ip-match-fields;
}
choice layer-3-match {
case arp-match {
leaf arp-op {
type uint16;
}
leaf arp-source-transport-address {
type ipv4-prefix;
}
leaf arp-target-transport-address {
type ipv4-prefix;
}
container arp-source-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container arp-target-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
}
case ipv4-match {
leaf ipv4-source {
type ipv4-prefix;
}
leaf ipv4-destination {
type ipv4-prefix;
}
}
case ipv4-match-arbitrary-bit-mask {
leaf ipv4-source-address-no-mask {
type ipv4-address;
}
leaf ipv4-destination-address-no-mask {
type ipv4-address;
}
leaf ipv4-source-arbitrary-bitmask {
type dotted-quad;
}
leaf ipv4-destination-arbitrary-bitmask {
type dotted-quad;
}
}
case ipv6-match {
leaf ipv6-source {
type ipv6-prefix;
}
leaf ipv6-destination {
type ipv6-prefix;
}
leaf ipv6-nd-target {
type ipv6-address;
}
container ipv6-label {
leaf ipv6-flabel {
type ipv6-flow-label;
}
leaf flabel-mask {
type ipv6-flow-label;
}
}
leaf ipv6-nd-sll {
type mac-address;
}
leaf ipv6-nd-tll {
type mac-address;
}
container ipv6-ext-header {
leaf ipv6-exthdr {
type uint16;
}
leaf ipv6-exthdr-mask {
type uint16;
}
}
}
case ipv6-match-arbitrary-bit-mask {
leaf ipv6-source-address-no-mask {
type ipv6-address;
}
leaf ipv6-source-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
leaf ipv6-destination-address-no-mask {
type ipv6-address;
}
leaf ipv6-destination-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
}
case tunnel-ipv4-match {
leaf tunnel-ipv4-source {
type ipv4-prefix;
}
leaf tunnel-ipv4-destination {
type ipv4-prefix;
}
}
}
choice layer-4-match {
case sctp-match {
leaf sctp-source-port {
type port-number;
}
leaf sctp-destination-port {
type port-number;
}
}
case tcp-match {
leaf tcp-source-port {
type port-number;
}
leaf tcp-destination-port {
type port-number;
}
}
case udp-match {
leaf udp-source-port {
type port-number;
}
leaf udp-destination-port {
type port-number;
}
}
}
container icmpv4-match {
leaf icmpv4-type {
type uint8;
}
leaf icmpv4-code {
type uint8;
}
uses icmpv4-match-fields;
}
container icmpv6-match {
leaf icmpv6-type {
type uint8;
}
leaf icmpv6-code {
type uint8;
}
uses icmpv6-match-fields;
}
container protocol-match-fields {
leaf mpls-label {
type uint32;
}
leaf mpls-tc {
type uint8;
}
leaf mpls-bos {
type uint8;
}
container pbb {
leaf pbb-isid {
type uint32;
}
leaf pbb-mask {
type uint32;
}
}
uses protocol-match-fields;
}
container tcp-flags-match {
leaf tcp-flags {
type uint16;
}
leaf tcp-flags-mask {
type uint16;
}
uses tcp-flags-match-fields;
}
uses match;
}
}
case set-mpls-ttl-action-case {
container set-mpls-ttl-action {
leaf mpls-ttl {
type uint8;
}
}
}
case set-next-hop-action-case {
container set-next-hop-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-dst-action-case {
container set-nw-dst-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-src-action-case {
container set-nw-src-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-tos-action-case {
container set-nw-tos-action {
leaf tos {
type int32;
}
}
}
case set-nw-ttl-action-case {
container set-nw-ttl-action {
leaf nw-ttl {
type uint8;
}
}
}
case set-queue-action-case {
container set-queue-action {
leaf queue {
type string;
}
leaf queue-id {
type uint32;
}
}
}
case set-tp-dst-action-case {
container set-tp-dst-action {
leaf port {
type port-number;
}
}
}
case set-tp-src-action-case {
container set-tp-src-action {
leaf port {
type 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 vlan-id;
}
}
}
case set-vlan-pcp-action-case {
container set-vlan-pcp-action {
leaf vlan-pcp {
type vlan-pcp;
}
}
}
case strip-vlan-action-case {
container strip-vlan-action {
}
}
case sw-path-action-case {
container sw-path-action {
}
}
}
uses action;
uses ordered;
}
uses action-list;
}
}
case go-to-table-case {
container go-to-table {
leaf table_id {
type uint8;
}
}
}
case meter-case {
container meter {
leaf meter-id {
type meter-id;
}
}
}
case write-actions-case {
container write-actions {
list action {
key "order"
leaf order {
type int32;
}
choice action {
case controller-action-case {
container controller-action {
leaf max-length {
type uint16;
}
}
}
case copy-ttl-in-case {
container copy-ttl-in {
}
}
case copy-ttl-out-case {
container copy-ttl-out {
}
}
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 group-action-case {
container group-action {
leaf group {
type string;
}
leaf group-id {
type uint32;
}
}
}
case hw-path-action-case {
container hw-path-action {
}
}
case loopback-action-case {
container loopback-action {
}
}
case output-action-case {
container output-action {
leaf output-node-connector {
type uri;
}
leaf max-length {
type uint16;
}
}
}
case pop-mpls-action-case {
container pop-mpls-action {
leaf ethernet-type {
type uint16;
}
}
}
case pop-pbb-action-case {
container pop-pbb-action {
}
}
case pop-vlan-action-case {
container pop-vlan-action {
}
}
case push-mpls-action-case {
container push-mpls-action {
leaf ethernet-type {
type uint16;
}
}
}
case push-pbb-action-case {
container push-pbb-action {
leaf ethernet-type {
type uint16;
}
}
}
case push-vlan-action-case {
container push-vlan-action {
leaf ethernet-type {
type uint16;
}
leaf tag {
type int32;
}
leaf pcp {
type int32;
}
leaf cfi {
type vlan-cfi;
}
leaf vlan-id {
type vlan-id;
}
}
}
case set-dl-dst-action-case {
container set-dl-dst-action {
leaf address {
type mac-address;
}
}
}
case set-dl-src-action-case {
container set-dl-src-action {
leaf address {
type mac-address;
}
}
}
case set-dl-type-action-case {
container set-dl-type-action {
leaf dl-type {
type ether-type;
}
}
}
case set-field-case {
container set-field {
leaf in-port {
type node-connector-id;
}
leaf in-phy-port {
type node-connector-id;
}
container metadata {
leaf metadata {
type uint64;
}
leaf metadata-mask {
type uint64;
}
uses of-metadata;
}
container tunnel {
leaf tunnel-id {
type uint64;
}
leaf tunnel-mask {
type uint64;
}
}
container ethernet-match {
container ethernet-source {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-destination {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-type {
leaf type {
type ether-type;
}
}
uses ethernet-match-fields;
}
container vlan-match {
container vlan-id {
leaf vlan-id-present {
type boolean;
}
leaf vlan-id {
type vlan-id;
}
}
leaf vlan-pcp {
type vlan-pcp;
}
uses vlan-match-fields;
}
container ip-match {
leaf ip-protocol {
type uint8;
}
leaf ip-dscp {
type dscp;
}
leaf ip-ecn {
type uint8;
}
leaf ip-proto {
type ip-version;
}
uses ip-match-fields;
}
choice layer-3-match {
case arp-match {
leaf arp-op {
type uint16;
}
leaf arp-source-transport-address {
type ipv4-prefix;
}
leaf arp-target-transport-address {
type ipv4-prefix;
}
container arp-source-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container arp-target-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
}
case ipv4-match {
leaf ipv4-source {
type ipv4-prefix;
}
leaf ipv4-destination {
type ipv4-prefix;
}
}
case ipv4-match-arbitrary-bit-mask {
leaf ipv4-source-address-no-mask {
type ipv4-address;
}
leaf ipv4-destination-address-no-mask {
type ipv4-address;
}
leaf ipv4-source-arbitrary-bitmask {
type dotted-quad;
}
leaf ipv4-destination-arbitrary-bitmask {
type dotted-quad;
}
}
case ipv6-match {
leaf ipv6-source {
type ipv6-prefix;
}
leaf ipv6-destination {
type ipv6-prefix;
}
leaf ipv6-nd-target {
type ipv6-address;
}
container ipv6-label {
leaf ipv6-flabel {
type ipv6-flow-label;
}
leaf flabel-mask {
type ipv6-flow-label;
}
}
leaf ipv6-nd-sll {
type mac-address;
}
leaf ipv6-nd-tll {
type mac-address;
}
container ipv6-ext-header {
leaf ipv6-exthdr {
type uint16;
}
leaf ipv6-exthdr-mask {
type uint16;
}
}
}
case ipv6-match-arbitrary-bit-mask {
leaf ipv6-source-address-no-mask {
type ipv6-address;
}
leaf ipv6-source-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
leaf ipv6-destination-address-no-mask {
type ipv6-address;
}
leaf ipv6-destination-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
}
case tunnel-ipv4-match {
leaf tunnel-ipv4-source {
type ipv4-prefix;
}
leaf tunnel-ipv4-destination {
type ipv4-prefix;
}
}
}
choice layer-4-match {
case sctp-match {
leaf sctp-source-port {
type port-number;
}
leaf sctp-destination-port {
type port-number;
}
}
case tcp-match {
leaf tcp-source-port {
type port-number;
}
leaf tcp-destination-port {
type port-number;
}
}
case udp-match {
leaf udp-source-port {
type port-number;
}
leaf udp-destination-port {
type port-number;
}
}
}
container icmpv4-match {
leaf icmpv4-type {
type uint8;
}
leaf icmpv4-code {
type uint8;
}
uses icmpv4-match-fields;
}
container icmpv6-match {
leaf icmpv6-type {
type uint8;
}
leaf icmpv6-code {
type uint8;
}
uses icmpv6-match-fields;
}
container protocol-match-fields {
leaf mpls-label {
type uint32;
}
leaf mpls-tc {
type uint8;
}
leaf mpls-bos {
type uint8;
}
container pbb {
leaf pbb-isid {
type uint32;
}
leaf pbb-mask {
type uint32;
}
}
uses protocol-match-fields;
}
container tcp-flags-match {
leaf tcp-flags {
type uint16;
}
leaf tcp-flags-mask {
type uint16;
}
uses tcp-flags-match-fields;
}
uses match;
}
}
case set-mpls-ttl-action-case {
container set-mpls-ttl-action {
leaf mpls-ttl {
type uint8;
}
}
}
case set-next-hop-action-case {
container set-next-hop-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-dst-action-case {
container set-nw-dst-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-src-action-case {
container set-nw-src-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-tos-action-case {
container set-nw-tos-action {
leaf tos {
type int32;
}
}
}
case set-nw-ttl-action-case {
container set-nw-ttl-action {
leaf nw-ttl {
type uint8;
}
}
}
case set-queue-action-case {
container set-queue-action {
leaf queue {
type string;
}
leaf queue-id {
type uint32;
}
}
}
case set-tp-dst-action-case {
container set-tp-dst-action {
leaf port {
type port-number;
}
}
}
case set-tp-src-action-case {
container set-tp-src-action {
leaf port {
type 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 vlan-id;
}
}
}
case set-vlan-pcp-action-case {
container set-vlan-pcp-action {
leaf vlan-pcp {
type vlan-pcp;
}
}
}
case strip-vlan-action-case {
container strip-vlan-action {
}
}
case sw-path-action-case {
container sw-path-action {
}
}
}
uses action;
uses ordered;
}
uses action-list;
}
}
case write-metadata-case {
container write-metadata {
leaf metadata {
type uint64;
}
leaf metadata-mask {
type uint64;
}
}
}
}
uses instruction;
uses ordered;
}
uses instruction-list;
}
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 strict;
}
leaf priority {
type uint16;
}
leaf idle-timeout {
type uint16;
}
leaf hard-timeout {
type uint16;
}
leaf cookie {
type flow-cookie;
}
leaf table_id {
type uint8;
}
uses flow;
}
The schema path to identify an instance is flow-node-inventory/tables/table/flow
To create instances of this class use org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder.
[中]此类表示模块流节点清单中定义的以下架构片段
list flow {
key "id"
leaf id {
type flow-id;
}
container match {
leaf in-port {
type node-connector-id;
}
leaf in-phy-port {
type node-connector-id;
}
container metadata {
leaf metadata {
type uint64;
}
leaf metadata-mask {
type uint64;
}
uses of-metadata;
}
container tunnel {
leaf tunnel-id {
type uint64;
}
leaf tunnel-mask {
type uint64;
}
}
container ethernet-match {
container ethernet-source {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-destination {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-type {
leaf type {
type ether-type;
}
}
uses ethernet-match-fields;
}
container vlan-match {
container vlan-id {
leaf vlan-id-present {
type boolean;
}
leaf vlan-id {
type vlan-id;
}
}
leaf vlan-pcp {
type vlan-pcp;
}
uses vlan-match-fields;
}
container ip-match {
leaf ip-protocol {
type uint8;
}
leaf ip-dscp {
type dscp;
}
leaf ip-ecn {
type uint8;
}
leaf ip-proto {
type ip-version;
}
uses ip-match-fields;
}
choice layer-3-match {
case arp-match {
leaf arp-op {
type uint16;
}
leaf arp-source-transport-address {
type ipv4-prefix;
}
leaf arp-target-transport-address {
type ipv4-prefix;
}
container arp-source-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container arp-target-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
}
case ipv4-match {
leaf ipv4-source {
type ipv4-prefix;
}
leaf ipv4-destination {
type ipv4-prefix;
}
}
case ipv4-match-arbitrary-bit-mask {
leaf ipv4-source-address-no-mask {
type ipv4-address;
}
leaf ipv4-destination-address-no-mask {
type ipv4-address;
}
leaf ipv4-source-arbitrary-bitmask {
type dotted-quad;
}
leaf ipv4-destination-arbitrary-bitmask {
type dotted-quad;
}
}
case ipv6-match {
leaf ipv6-source {
type ipv6-prefix;
}
leaf ipv6-destination {
type ipv6-prefix;
}
leaf ipv6-nd-target {
type ipv6-address;
}
container ipv6-label {
leaf ipv6-flabel {
type ipv6-flow-label;
}
leaf flabel-mask {
type ipv6-flow-label;
}
}
leaf ipv6-nd-sll {
type mac-address;
}
leaf ipv6-nd-tll {
type mac-address;
}
container ipv6-ext-header {
leaf ipv6-exthdr {
type uint16;
}
leaf ipv6-exthdr-mask {
type uint16;
}
}
}
case ipv6-match-arbitrary-bit-mask {
leaf ipv6-source-address-no-mask {
type ipv6-address;
}
leaf ipv6-source-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
leaf ipv6-destination-address-no-mask {
type ipv6-address;
}
leaf ipv6-destination-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
}
case tunnel-ipv4-match {
leaf tunnel-ipv4-source {
type ipv4-prefix;
}
leaf tunnel-ipv4-destination {
type ipv4-prefix;
}
}
}
choice layer-4-match {
case sctp-match {
leaf sctp-source-port {
type port-number;
}
leaf sctp-destination-port {
type port-number;
}
}
case tcp-match {
leaf tcp-source-port {
type port-number;
}
leaf tcp-destination-port {
type port-number;
}
}
case udp-match {
leaf udp-source-port {
type port-number;
}
leaf udp-destination-port {
type port-number;
}
}
}
container icmpv4-match {
leaf icmpv4-type {
type uint8;
}
leaf icmpv4-code {
type uint8;
}
uses icmpv4-match-fields;
}
container icmpv6-match {
leaf icmpv6-type {
type uint8;
}
leaf icmpv6-code {
type uint8;
}
uses icmpv6-match-fields;
}
container protocol-match-fields {
leaf mpls-label {
type uint32;
}
leaf mpls-tc {
type uint8;
}
leaf mpls-bos {
type uint8;
}
container pbb {
leaf pbb-isid {
type uint32;
}
leaf pbb-mask {
type uint32;
}
}
uses protocol-match-fields;
}
container tcp-flags-match {
leaf tcp-flags {
type uint16;
}
leaf tcp-flags-mask {
type uint16;
}
uses tcp-flags-match-fields;
}
uses match;
}
container instructions {
list instruction {
key "order"
leaf order {
type int32;
}
choice instruction {
case apply-actions-case {
container apply-actions {
list action {
key "order"
leaf order {
type int32;
}
choice action {
case controller-action-case {
container controller-action {
leaf max-length {
type uint16;
}
}
}
case copy-ttl-in-case {
container copy-ttl-in {
}
}
case copy-ttl-out-case {
container copy-ttl-out {
}
}
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 group-action-case {
container group-action {
leaf group {
type string;
}
leaf group-id {
type uint32;
}
}
}
case hw-path-action-case {
container hw-path-action {
}
}
case loopback-action-case {
container loopback-action {
}
}
case output-action-case {
container output-action {
leaf output-node-connector {
type uri;
}
leaf max-length {
type uint16;
}
}
}
case pop-mpls-action-case {
container pop-mpls-action {
leaf ethernet-type {
type uint16;
}
}
}
case pop-pbb-action-case {
container pop-pbb-action {
}
}
case pop-vlan-action-case {
container pop-vlan-action {
}
}
case push-mpls-action-case {
container push-mpls-action {
leaf ethernet-type {
type uint16;
}
}
}
case push-pbb-action-case {
container push-pbb-action {
leaf ethernet-type {
type uint16;
}
}
}
case push-vlan-action-case {
container push-vlan-action {
leaf ethernet-type {
type uint16;
}
leaf tag {
type int32;
}
leaf pcp {
type int32;
}
leaf cfi {
type vlan-cfi;
}
leaf vlan-id {
type vlan-id;
}
}
}
case set-dl-dst-action-case {
container set-dl-dst-action {
leaf address {
type mac-address;
}
}
}
case set-dl-src-action-case {
container set-dl-src-action {
leaf address {
type mac-address;
}
}
}
case set-dl-type-action-case {
container set-dl-type-action {
leaf dl-type {
type ether-type;
}
}
}
case set-field-case {
container set-field {
leaf in-port {
type node-connector-id;
}
leaf in-phy-port {
type node-connector-id;
}
container metadata {
leaf metadata {
type uint64;
}
leaf metadata-mask {
type uint64;
}
uses of-metadata;
}
container tunnel {
leaf tunnel-id {
type uint64;
}
leaf tunnel-mask {
type uint64;
}
}
container ethernet-match {
container ethernet-source {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-destination {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-type {
leaf type {
type ether-type;
}
}
uses ethernet-match-fields;
}
container vlan-match {
container vlan-id {
leaf vlan-id-present {
type boolean;
}
leaf vlan-id {
type vlan-id;
}
}
leaf vlan-pcp {
type vlan-pcp;
}
uses vlan-match-fields;
}
container ip-match {
leaf ip-protocol {
type uint8;
}
leaf ip-dscp {
type dscp;
}
leaf ip-ecn {
type uint8;
}
leaf ip-proto {
type ip-version;
}
uses ip-match-fields;
}
choice layer-3-match {
case arp-match {
leaf arp-op {
type uint16;
}
leaf arp-source-transport-address {
type ipv4-prefix;
}
leaf arp-target-transport-address {
type ipv4-prefix;
}
container arp-source-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container arp-target-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
}
case ipv4-match {
leaf ipv4-source {
type ipv4-prefix;
}
leaf ipv4-destination {
type ipv4-prefix;
}
}
case ipv4-match-arbitrary-bit-mask {
leaf ipv4-source-address-no-mask {
type ipv4-address;
}
leaf ipv4-destination-address-no-mask {
type ipv4-address;
}
leaf ipv4-source-arbitrary-bitmask {
type dotted-quad;
}
leaf ipv4-destination-arbitrary-bitmask {
type dotted-quad;
}
}
case ipv6-match {
leaf ipv6-source {
type ipv6-prefix;
}
leaf ipv6-destination {
type ipv6-prefix;
}
leaf ipv6-nd-target {
type ipv6-address;
}
container ipv6-label {
leaf ipv6-flabel {
type ipv6-flow-label;
}
leaf flabel-mask {
type ipv6-flow-label;
}
}
leaf ipv6-nd-sll {
type mac-address;
}
leaf ipv6-nd-tll {
type mac-address;
}
container ipv6-ext-header {
leaf ipv6-exthdr {
type uint16;
}
leaf ipv6-exthdr-mask {
type uint16;
}
}
}
case ipv6-match-arbitrary-bit-mask {
leaf ipv6-source-address-no-mask {
type ipv6-address;
}
leaf ipv6-source-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
leaf ipv6-destination-address-no-mask {
type ipv6-address;
}
leaf ipv6-destination-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
}
case tunnel-ipv4-match {
leaf tunnel-ipv4-source {
type ipv4-prefix;
}
leaf tunnel-ipv4-destination {
type ipv4-prefix;
}
}
}
choice layer-4-match {
case sctp-match {
leaf sctp-source-port {
type port-number;
}
leaf sctp-destination-port {
type port-number;
}
}
case tcp-match {
leaf tcp-source-port {
type port-number;
}
leaf tcp-destination-port {
type port-number;
}
}
case udp-match {
leaf udp-source-port {
type port-number;
}
leaf udp-destination-port {
type port-number;
}
}
}
container icmpv4-match {
leaf icmpv4-type {
type uint8;
}
leaf icmpv4-code {
type uint8;
}
uses icmpv4-match-fields;
}
container icmpv6-match {
leaf icmpv6-type {
type uint8;
}
leaf icmpv6-code {
type uint8;
}
uses icmpv6-match-fields;
}
container protocol-match-fields {
leaf mpls-label {
type uint32;
}
leaf mpls-tc {
type uint8;
}
leaf mpls-bos {
type uint8;
}
container pbb {
leaf pbb-isid {
type uint32;
}
leaf pbb-mask {
type uint32;
}
}
uses protocol-match-fields;
}
container tcp-flags-match {
leaf tcp-flags {
type uint16;
}
leaf tcp-flags-mask {
type uint16;
}
uses tcp-flags-match-fields;
}
uses match;
}
}
case set-mpls-ttl-action-case {
container set-mpls-ttl-action {
leaf mpls-ttl {
type uint8;
}
}
}
case set-next-hop-action-case {
container set-next-hop-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-dst-action-case {
container set-nw-dst-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-src-action-case {
container set-nw-src-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-tos-action-case {
container set-nw-tos-action {
leaf tos {
type int32;
}
}
}
case set-nw-ttl-action-case {
container set-nw-ttl-action {
leaf nw-ttl {
type uint8;
}
}
}
case set-queue-action-case {
container set-queue-action {
leaf queue {
type string;
}
leaf queue-id {
type uint32;
}
}
}
case set-tp-dst-action-case {
container set-tp-dst-action {
leaf port {
type port-number;
}
}
}
case set-tp-src-action-case {
container set-tp-src-action {
leaf port {
type 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 vlan-id;
}
}
}
case set-vlan-pcp-action-case {
container set-vlan-pcp-action {
leaf vlan-pcp {
type vlan-pcp;
}
}
}
case strip-vlan-action-case {
container strip-vlan-action {
}
}
case sw-path-action-case {
container sw-path-action {
}
}
}
uses action;
uses ordered;
}
uses action-list;
}
}
case clear-actions-case {
container clear-actions {
list action {
key "order"
leaf order {
type int32;
}
choice action {
case controller-action-case {
container controller-action {
leaf max-length {
type uint16;
}
}
}
case copy-ttl-in-case {
container copy-ttl-in {
}
}
case copy-ttl-out-case {
container copy-ttl-out {
}
}
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 group-action-case {
container group-action {
leaf group {
type string;
}
leaf group-id {
type uint32;
}
}
}
case hw-path-action-case {
container hw-path-action {
}
}
case loopback-action-case {
container loopback-action {
}
}
case output-action-case {
container output-action {
leaf output-node-connector {
type uri;
}
leaf max-length {
type uint16;
}
}
}
case pop-mpls-action-case {
container pop-mpls-action {
leaf ethernet-type {
type uint16;
}
}
}
case pop-pbb-action-case {
container pop-pbb-action {
}
}
case pop-vlan-action-case {
container pop-vlan-action {
}
}
case push-mpls-action-case {
container push-mpls-action {
leaf ethernet-type {
type uint16;
}
}
}
case push-pbb-action-case {
container push-pbb-action {
leaf ethernet-type {
type uint16;
}
}
}
case push-vlan-action-case {
container push-vlan-action {
leaf ethernet-type {
type uint16;
}
leaf tag {
type int32;
}
leaf pcp {
type int32;
}
leaf cfi {
type vlan-cfi;
}
leaf vlan-id {
type vlan-id;
}
}
}
case set-dl-dst-action-case {
container set-dl-dst-action {
leaf address {
type mac-address;
}
}
}
case set-dl-src-action-case {
container set-dl-src-action {
leaf address {
type mac-address;
}
}
}
case set-dl-type-action-case {
container set-dl-type-action {
leaf dl-type {
type ether-type;
}
}
}
case set-field-case {
container set-field {
leaf in-port {
type node-connector-id;
}
leaf in-phy-port {
type node-connector-id;
}
container metadata {
leaf metadata {
type uint64;
}
leaf metadata-mask {
type uint64;
}
uses of-metadata;
}
container tunnel {
leaf tunnel-id {
type uint64;
}
leaf tunnel-mask {
type uint64;
}
}
container ethernet-match {
container ethernet-source {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-destination {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-type {
leaf type {
type ether-type;
}
}
uses ethernet-match-fields;
}
container vlan-match {
container vlan-id {
leaf vlan-id-present {
type boolean;
}
leaf vlan-id {
type vlan-id;
}
}
leaf vlan-pcp {
type vlan-pcp;
}
uses vlan-match-fields;
}
container ip-match {
leaf ip-protocol {
type uint8;
}
leaf ip-dscp {
type dscp;
}
leaf ip-ecn {
type uint8;
}
leaf ip-proto {
type ip-version;
}
uses ip-match-fields;
}
choice layer-3-match {
case arp-match {
leaf arp-op {
type uint16;
}
leaf arp-source-transport-address {
type ipv4-prefix;
}
leaf arp-target-transport-address {
type ipv4-prefix;
}
container arp-source-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container arp-target-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
}
case ipv4-match {
leaf ipv4-source {
type ipv4-prefix;
}
leaf ipv4-destination {
type ipv4-prefix;
}
}
case ipv4-match-arbitrary-bit-mask {
leaf ipv4-source-address-no-mask {
type ipv4-address;
}
leaf ipv4-destination-address-no-mask {
type ipv4-address;
}
leaf ipv4-source-arbitrary-bitmask {
type dotted-quad;
}
leaf ipv4-destination-arbitrary-bitmask {
type dotted-quad;
}
}
case ipv6-match {
leaf ipv6-source {
type ipv6-prefix;
}
leaf ipv6-destination {
type ipv6-prefix;
}
leaf ipv6-nd-target {
type ipv6-address;
}
container ipv6-label {
leaf ipv6-flabel {
type ipv6-flow-label;
}
leaf flabel-mask {
type ipv6-flow-label;
}
}
leaf ipv6-nd-sll {
type mac-address;
}
leaf ipv6-nd-tll {
type mac-address;
}
container ipv6-ext-header {
leaf ipv6-exthdr {
type uint16;
}
leaf ipv6-exthdr-mask {
type uint16;
}
}
}
case ipv6-match-arbitrary-bit-mask {
leaf ipv6-source-address-no-mask {
type ipv6-address;
}
leaf ipv6-source-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
leaf ipv6-destination-address-no-mask {
type ipv6-address;
}
leaf ipv6-destination-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
}
case tunnel-ipv4-match {
leaf tunnel-ipv4-source {
type ipv4-prefix;
}
leaf tunnel-ipv4-destination {
type ipv4-prefix;
}
}
}
choice layer-4-match {
case sctp-match {
leaf sctp-source-port {
type port-number;
}
leaf sctp-destination-port {
type port-number;
}
}
case tcp-match {
leaf tcp-source-port {
type port-number;
}
leaf tcp-destination-port {
type port-number;
}
}
case udp-match {
leaf udp-source-port {
type port-number;
}
leaf udp-destination-port {
type port-number;
}
}
}
container icmpv4-match {
leaf icmpv4-type {
type uint8;
}
leaf icmpv4-code {
type uint8;
}
uses icmpv4-match-fields;
}
container icmpv6-match {
leaf icmpv6-type {
type uint8;
}
leaf icmpv6-code {
type uint8;
}
uses icmpv6-match-fields;
}
container protocol-match-fields {
leaf mpls-label {
type uint32;
}
leaf mpls-tc {
type uint8;
}
leaf mpls-bos {
type uint8;
}
container pbb {
leaf pbb-isid {
type uint32;
}
leaf pbb-mask {
type uint32;
}
}
uses protocol-match-fields;
}
container tcp-flags-match {
leaf tcp-flags {
type uint16;
}
leaf tcp-flags-mask {
type uint16;
}
uses tcp-flags-match-fields;
}
uses match;
}
}
case set-mpls-ttl-action-case {
container set-mpls-ttl-action {
leaf mpls-ttl {
type uint8;
}
}
}
case set-next-hop-action-case {
container set-next-hop-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-dst-action-case {
container set-nw-dst-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-src-action-case {
container set-nw-src-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-tos-action-case {
container set-nw-tos-action {
leaf tos {
type int32;
}
}
}
case set-nw-ttl-action-case {
container set-nw-ttl-action {
leaf nw-ttl {
type uint8;
}
}
}
case set-queue-action-case {
container set-queue-action {
leaf queue {
type string;
}
leaf queue-id {
type uint32;
}
}
}
case set-tp-dst-action-case {
container set-tp-dst-action {
leaf port {
type port-number;
}
}
}
case set-tp-src-action-case {
container set-tp-src-action {
leaf port {
type 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 vlan-id;
}
}
}
case set-vlan-pcp-action-case {
container set-vlan-pcp-action {
leaf vlan-pcp {
type vlan-pcp;
}
}
}
case strip-vlan-action-case {
container strip-vlan-action {
}
}
case sw-path-action-case {
container sw-path-action {
}
}
}
uses action;
uses ordered;
}
uses action-list;
}
}
case go-to-table-case {
container go-to-table {
leaf table_id {
type uint8;
}
}
}
case meter-case {
container meter {
leaf meter-id {
type meter-id;
}
}
}
case write-actions-case {
container write-actions {
list action {
key "order"
leaf order {
type int32;
}
choice action {
case controller-action-case {
container controller-action {
leaf max-length {
type uint16;
}
}
}
case copy-ttl-in-case {
container copy-ttl-in {
}
}
case copy-ttl-out-case {
container copy-ttl-out {
}
}
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 group-action-case {
container group-action {
leaf group {
type string;
}
leaf group-id {
type uint32;
}
}
}
case hw-path-action-case {
container hw-path-action {
}
}
case loopback-action-case {
container loopback-action {
}
}
case output-action-case {
container output-action {
leaf output-node-connector {
type uri;
}
leaf max-length {
type uint16;
}
}
}
case pop-mpls-action-case {
container pop-mpls-action {
leaf ethernet-type {
type uint16;
}
}
}
case pop-pbb-action-case {
container pop-pbb-action {
}
}
case pop-vlan-action-case {
container pop-vlan-action {
}
}
case push-mpls-action-case {
container push-mpls-action {
leaf ethernet-type {
type uint16;
}
}
}
case push-pbb-action-case {
container push-pbb-action {
leaf ethernet-type {
type uint16;
}
}
}
case push-vlan-action-case {
container push-vlan-action {
leaf ethernet-type {
type uint16;
}
leaf tag {
type int32;
}
leaf pcp {
type int32;
}
leaf cfi {
type vlan-cfi;
}
leaf vlan-id {
type vlan-id;
}
}
}
case set-dl-dst-action-case {
container set-dl-dst-action {
leaf address {
type mac-address;
}
}
}
case set-dl-src-action-case {
container set-dl-src-action {
leaf address {
type mac-address;
}
}
}
case set-dl-type-action-case {
container set-dl-type-action {
leaf dl-type {
type ether-type;
}
}
}
case set-field-case {
container set-field {
leaf in-port {
type node-connector-id;
}
leaf in-phy-port {
type node-connector-id;
}
container metadata {
leaf metadata {
type uint64;
}
leaf metadata-mask {
type uint64;
}
uses of-metadata;
}
container tunnel {
leaf tunnel-id {
type uint64;
}
leaf tunnel-mask {
type uint64;
}
}
container ethernet-match {
container ethernet-source {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-destination {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container ethernet-type {
leaf type {
type ether-type;
}
}
uses ethernet-match-fields;
}
container vlan-match {
container vlan-id {
leaf vlan-id-present {
type boolean;
}
leaf vlan-id {
type vlan-id;
}
}
leaf vlan-pcp {
type vlan-pcp;
}
uses vlan-match-fields;
}
container ip-match {
leaf ip-protocol {
type uint8;
}
leaf ip-dscp {
type dscp;
}
leaf ip-ecn {
type uint8;
}
leaf ip-proto {
type ip-version;
}
uses ip-match-fields;
}
choice layer-3-match {
case arp-match {
leaf arp-op {
type uint16;
}
leaf arp-source-transport-address {
type ipv4-prefix;
}
leaf arp-target-transport-address {
type ipv4-prefix;
}
container arp-source-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
container arp-target-hardware-address {
leaf address {
type mac-address;
}
leaf mask {
type mac-address;
}
uses mac-address-filter;
}
}
case ipv4-match {
leaf ipv4-source {
type ipv4-prefix;
}
leaf ipv4-destination {
type ipv4-prefix;
}
}
case ipv4-match-arbitrary-bit-mask {
leaf ipv4-source-address-no-mask {
type ipv4-address;
}
leaf ipv4-destination-address-no-mask {
type ipv4-address;
}
leaf ipv4-source-arbitrary-bitmask {
type dotted-quad;
}
leaf ipv4-destination-arbitrary-bitmask {
type dotted-quad;
}
}
case ipv6-match {
leaf ipv6-source {
type ipv6-prefix;
}
leaf ipv6-destination {
type ipv6-prefix;
}
leaf ipv6-nd-target {
type ipv6-address;
}
container ipv6-label {
leaf ipv6-flabel {
type ipv6-flow-label;
}
leaf flabel-mask {
type ipv6-flow-label;
}
}
leaf ipv6-nd-sll {
type mac-address;
}
leaf ipv6-nd-tll {
type mac-address;
}
container ipv6-ext-header {
leaf ipv6-exthdr {
type uint16;
}
leaf ipv6-exthdr-mask {
type uint16;
}
}
}
case ipv6-match-arbitrary-bit-mask {
leaf ipv6-source-address-no-mask {
type ipv6-address;
}
leaf ipv6-source-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
leaf ipv6-destination-address-no-mask {
type ipv6-address;
}
leaf ipv6-destination-arbitrary-bitmask {
type ipv6-arbitrary-mask;
}
}
case tunnel-ipv4-match {
leaf tunnel-ipv4-source {
type ipv4-prefix;
}
leaf tunnel-ipv4-destination {
type ipv4-prefix;
}
}
}
choice layer-4-match {
case sctp-match {
leaf sctp-source-port {
type port-number;
}
leaf sctp-destination-port {
type port-number;
}
}
case tcp-match {
leaf tcp-source-port {
type port-number;
}
leaf tcp-destination-port {
type port-number;
}
}
case udp-match {
leaf udp-source-port {
type port-number;
}
leaf udp-destination-port {
type port-number;
}
}
}
container icmpv4-match {
leaf icmpv4-type {
type uint8;
}
leaf icmpv4-code {
type uint8;
}
uses icmpv4-match-fields;
}
container icmpv6-match {
leaf icmpv6-type {
type uint8;
}
leaf icmpv6-code {
type uint8;
}
uses icmpv6-match-fields;
}
container protocol-match-fields {
leaf mpls-label {
type uint32;
}
leaf mpls-tc {
type uint8;
}
leaf mpls-bos {
type uint8;
}
container pbb {
leaf pbb-isid {
type uint32;
}
leaf pbb-mask {
type uint32;
}
}
uses protocol-match-fields;
}
container tcp-flags-match {
leaf tcp-flags {
type uint16;
}
leaf tcp-flags-mask {
type uint16;
}
uses tcp-flags-match-fields;
}
uses match;
}
}
case set-mpls-ttl-action-case {
container set-mpls-ttl-action {
leaf mpls-ttl {
type uint8;
}
}
}
case set-next-hop-action-case {
container set-next-hop-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-dst-action-case {
container set-nw-dst-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-src-action-case {
container set-nw-src-action {
choice address {
case ipv4 {
leaf ipv4-address {
type ipv4-prefix;
}
}
case ipv6 {
leaf ipv6-address {
type ipv6-prefix;
}
}
}
uses address;
}
}
case set-nw-tos-action-case {
container set-nw-tos-action {
leaf tos {
type int32;
}
}
}
case set-nw-ttl-action-case {
container set-nw-ttl-action {
leaf nw-ttl {
type uint8;
}
}
}
case set-queue-action-case {
container set-queue-action {
leaf queue {
type string;
}
leaf queue-id {
type uint32;
}
}
}
case set-tp-dst-action-case {
container set-tp-dst-action {
leaf port {
type port-number;
}
}
}
case set-tp-src-action-case {
container set-tp-src-action {
leaf port {
type 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 vlan-id;
}
}
}
case set-vlan-pcp-action-case {
container set-vlan-pcp-action {
leaf vlan-pcp {
type vlan-pcp;
}
}
}
case strip-vlan-action-case {
container strip-vlan-action {
}
}
case sw-path-action-case {
container sw-path-action {
}
}
}
uses action;
uses ordered;
}
uses action-list;
}
}
case write-metadata-case {
container write-metadata {
leaf metadata {
type uint64;
}
leaf metadata-mask {
type uint64;
}
}
}
}
uses instruction;
uses ordered;
}
uses instruction-list;
}
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 strict;
}
leaf priority {
type uint16;
}
leaf idle-timeout {
type uint16;
}
leaf hard-timeout {
type uint16;
}
leaf cookie {
type flow-cookie;
}
leaf table_id {
type uint8;
}
uses flow;
}
标识实例的模式路径是流节点库存/表/表/流
要创建此类的实例,请使用org。露天采光。杨。第1代。瓮。露天采光。流库存第130819版。桌子。桌子FlowBuilder。
代码示例来源:origin: org.opendaylight.openflowplugin.model/model-flow-service
public FlowBuilder(Flow base) {
if (base.getKey() == null) {
this._key = new FlowKey(
base.getId()
);
this._id = base.getId();
} else {
this._key = base.getKey();
this._id = _key.getId();
this._bufferId = base.getBufferId();
this._containerName = base.getContainerName();
this._cookie = base.getCookie();
this._cookieMask = base.getCookieMask();
this._flags = base.getFlags();
this._flowName = base.getFlowName();
this._hardTimeout = base.getHardTimeout();
this._idleTimeout = base.getIdleTimeout();
this._instructions = base.getInstructions();
this._match = base.getMatch();
this._outGroup = base.getOutGroup();
this._outPort = base.getOutPort();
this._priority = base.getPriority();
this._tableId = base.getTableId();
this._barrier = base.isBarrier();
this._installHw = base.isInstallHw();
this._strict = base.isStrict();
if (base instanceof FlowImpl) {
FlowImpl impl = (FlowImpl) base;
代码示例来源:origin: org.opendaylight.netvirt/utils.netvirt-it-utils
private boolean checkFlowsEqual(Flow configFlow, Flow opFlow) {
Integer configPrio = configFlow.getPriority();
Integer opPrio = opFlow.getPriority();
if (!Objects.equals(configPrio == null ? DEFAULT_PRIORITY : configPrio,
opPrio == null ? DEFAULT_PRIORITY : opPrio)) {
return false;
}
return areMatchesEqual(configFlow.getMatch(), opFlow.getMatch());
}
代码示例来源:origin: org.opendaylight.vpnservice/mdsalutil-impl
private void notifyTaskIfRequired(BigInteger dpId, Flow flow) {
FlowInfoKey flowKey = new FlowInfoKey(dpId, flow.getTableId(), flow.getMatch(), flow.getId().getValue());
Runnable notifyTask = flowMap.remove(flowKey);
if (notifyTask == null) {
return;
}
executorService.execute(notifyTask);
}
代码示例来源:origin: org.opendaylight.groupbasedpolicy/ofoverlay-renderer
int result = 1;
result = prime * result + ((flow.getBufferId() == null) ? 0 : flow.getBufferId().hashCode());
result = prime * result + ((flow.getContainerName() == null) ? 0 : flow.getContainerName().hashCode());
result = prime * result + ((flow.getCookie() == null) ? 0 : flow.getCookie().hashCode());
result = prime * result + ((flow.getCookieMask() == null) ? 0 : flow.getCookieMask().hashCode());
result = prime * result + ((flow.getFlags() == null) ? 0 : flow.getFlags().hashCode());
result = prime * result + ((flow.getFlowName() == null) ? 0 : flow.getFlowName().hashCode());
if (flow.getInstructions() != null
&& flow.getInstructions().getInstruction() != null
&& !flow.getInstructions().getInstruction().isEmpty()) {
Set<Instruction> instructions = new HashSet<>(flow.getInstructions().getInstruction());
result = prime * result + instructions.hashCode();
result = prime * result + ((flow.getMatch() == null) ? 0
: EquivalenceFabric.MATCH_EQUIVALENCE.wrap(flow.getMatch()).hashCode());
result = prime * result + ((flow.getOutGroup() == null) ? 0 : flow.getOutGroup().hashCode());
result = prime * result + ((flow.getOutPort() == null) ? 0 : flow.getOutPort().hashCode());
result = prime * result + ((flow.getPriority() == null) ? 0 : flow.getPriority().hashCode());
result = prime * result + ((flow.getTableId() == null) ? 0 : flow.getTableId().hashCode());
result = prime * result + ((flow.isBarrier() == null) ? 0 : flow.isBarrier().hashCode());
result = prime * result + ((flow.isInstallHw() == null) ? 0 : flow.isInstallHw().hashCode());
result = prime * result + ((flow.isStrict() == null) ? 0 : flow.isStrict().hashCode());
代码示例来源:origin: org.opendaylight.vtn/manager.it.ofmock
/**
* Add a MD-SAL flow entry to be removed from the flow table.
*
* @param flow A MD-SAL flow entry to be removed from the flow table.
*/
public void addRemoved(Flow flow) {
removedIds.add(flow.getId().getValue());
}
代码示例来源:origin: org.opendaylight.groupbasedpolicy/ofoverlay-renderer
private static InstanceIdentifier<Flow> createFlowIid(Flow flow, InstanceIdentifier<Node> nodeIid) {
return nodeIid.builder()
.augmentation(FlowCapableNode.class)
.child(Table.class, new TableKey(flow.getTableId()))
.child(Flow.class, new FlowKey(flow.getId()))
.build();
}
代码示例来源:origin: org.opendaylight.openflowplugin.legacy/sal-compatibility
if (statsFlow.getBufferId()== null) {
if (storedFlow.getBufferId() != null) {
return false;
} else if(!statsFlow.getBufferId().equals(storedFlow.getBufferId())) {
return false;
if (statsFlow.getContainerName()== null) {
if (storedFlow.getContainerName()!= null) {
return false;
} else if(!statsFlow.getContainerName().equals(storedFlow.getContainerName())) {
return false;
if (statsFlow.getCookie()== null) {
if (storedFlow.getCookie()!= null) {
return false;
} else if(!statsFlow.getCookie().equals(storedFlow.getCookie())) {
return false;
if (statsFlow.getMatch()== null) {
if (storedFlow.getMatch() != null) {
return false;
} else if(!statsFlow.getMatch().equals(storedFlow.getMatch())) {
return false;
if (statsFlow.getCookie()== null) {
代码示例来源:origin: org.opendaylight.didm/didm-tools-utils
NodeConnectorRef nodeConnectorRef = new NodeConnectorRef(node);
TableKey flowTableKey = new TableKey(flow.getTableId());
builder.setFlowRef(new FlowRef(flowPath));
builder.setFlowTable(new FlowTableRef(tableInstanceId));
builder.setTransactionUri(new Uri(flowToSend.getId().getValue()));
if(addFlowOutputRpcResult != null)
if (addFlowOutputRpcResult.isSuccessful())
LOG.info("Pushed the flow successfully", flow.getFlowName());
代码示例来源:origin: org.opendaylight.didm/didm-tools-utils
/**
* This utility method deletes the flows as per the match.
* @param flowService reference of SalFlowService.
* @param flows Collection of flows to be deleted.
* @param node Flows to be deleted from the node.
*/
public static void deleteFlows(SalFlowService flowService,
Collection<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow> flows,
InstanceIdentifier<Node> node) {
for(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow flow : flows) {
RemoveFlowInputBuilder inputBuilder = new RemoveFlowInputBuilder()
.setMatch(flow.getMatch())
.setTableId(flow.getTableId())
.setNode(new NodeRef(node));
flowService.removeFlow(inputBuilder.build());
}
}
代码示例来源:origin: org.opendaylight.groupbasedpolicy/ofoverlay-renderer
if (f != null) {
t.delete(LogicalDatastoreType.CONFIGURATION,
FlowUtils.createFlowPath(tableIid, f.getId()));
Flow f = wf.get();
if (f != null) {
if (f.getMatch() == null) {
f = new FlowBuilder(f).setMatch(new MatchBuilder().build()).build();
FlowUtils.createFlowPath(tableIid, f.getId()), f, true);
代码示例来源:origin: org.opendaylight.vtn/manager.implementation
flow.getAugmentation(FlowStatisticsData.class);
if (data != null) {
GenericStatistics fstats = data.getFlowStatistics();
"{}: {}: No flow statistics: {}",
builder.getFlowId().getValue(),
flow.getId().getValue(), err);
代码示例来源:origin: org.opendaylight.alto.basic/alto-simple-ecs-impl
private short lookUpFlowTable(short tableId, MatchFields matchFields) {
List<Flow> flows = indexTables.get(tableId).getFlow();
sortFlowByPriority(flows);
for (Flow flow : flows) {
if (flowEntryMatcher.match(flow.getMatch(), matchFields)) {
log.info("Priority: " + flow.getPriority());
Instructions inss = flow.getInstructions();
if (inss == null) {
return tableId;
}
short nextTableId = lookUpInstructions(inss.getInstruction());
return (nextTableId != -1) ? nextTableId : tableId;
}
}
return tableId;
}
代码示例来源:origin: org.opendaylight.vtn/manager.implementation
/**
* Add the given flow information into this instance.
*
* @param data An {@link IdentifiedData} instance which contains
* flow statistics.
*/
public void add(IdentifiedData<Flow> data) {
Flow flow = data.getValue();
FlowCookie cookie = flow.getCookie();
VtnFlowId vtnId = FlowUtils.getVtnFlowId(cookie);
if (vtnId == null) {
LOG.debug("{}: Unwanted flow cookie: {}",
flow.getId().getValue(), cookie);
} else {
InstanceIdentifier<Flow> path = data.getIdentifier();
SalNode snode = SalNode.create(path.firstKeyOf(Node.class));
if (snode == null) {
LOG.debug("{}: Invalid flow path: {}",
flow.getId().getValue(), path);
} else {
Map<SalNode, Flow> flowMap = addedFlows.get(vtnId);
if (flowMap == null) {
flowMap = new HashMap<>();
addedFlows.put(vtnId, flowMap);
}
flowMap.put(snode, flow);
}
}
}
代码示例来源:origin: org.opendaylight.openflowplugin.applications/forwardingrules-manager
private static boolean tableIdValidationPrecondition (final TableKey tableKey, final Flow flow) {
Preconditions.checkNotNull(tableKey, "TableKey can not be null or empty!");
Preconditions.checkNotNull(flow, "Flow can not be null or empty!");
if (! tableKey.getId().equals(flow.getTableId())) {
LOG.warn("TableID in URI tableId={} and in palyload tableId={} is not same.",
flow.getTableId(), tableKey.getId());
return false;
}
return true;
}
代码示例来源:origin: org.opendaylight.openflowplugin/test-provider
for (Iterator<Flow> iterator3 = flows.iterator(); iterator3.hasNext();) {
flowCount++;
FlowKey flowKey = iterator3.next().getKey();
InstanceIdentifier<Flow> flowRef = InstanceIdentifier
.create(Nodes.class).child(Node.class, nodeKey)
if (flow != null) {
FlowStatisticsData data = flow
.getAugmentation(FlowStatisticsData.class);
if (null != data) {
flowStatsCount++;
代码示例来源:origin: org.opendaylight.controller.md/statistics-manager
List<InstanceIdentifier<Flow>> notStatReportedConfigFlows() {
if (configFlows != null) {
final List<InstanceIdentifier<Flow>> returnList = new ArrayList<>(configFlows.size());
for (final Flow confFlow : configFlows) {
final InstanceIdentifier<Flow> confFlowIdent = tableRef.child(Flow.class, confFlow.getKey());
returnList.add(confFlowIdent);
}
return returnList;
}
return Collections.emptyList();
}
}
代码示例来源:origin: org.opendaylight.openflowplugin.legacy/sal-compatibility
final FlowStatisticsData statsFromDataStore = flow.getAugmentation(FlowStatisticsData.class);
if (statsFromDataStore != null) {
final FlowOnNode it = new FlowOnNode(ToSalConversionsUtils.toFlow(flow, node));
代码示例来源:origin: org.opendaylight.groupbasedpolicy/ofoverlay-renderer
public void writeFlow(NodeId nodeId, short tableId, Flow flow) {
Preconditions.checkNotNull(flow);
Preconditions.checkNotNull(nodeId);
if (flow.getMatch() == null) {
flow = new FlowBuilder(flow).setMatch(new MatchBuilder().build()).build();
}
TableBuilder tableBuilder = this.getTableBuilderForNode(nodeId, tableId);
// transforming List<Flow> to Set (with customized equals/hashCode) to eliminate duplicate entries
List<Flow> flows = tableBuilder.getFlow();
Set<Equivalence.Wrapper<Flow>> wrappedFlows = new HashSet<>(
Collections2.transform(flows, EquivalenceFabric.FLOW_WRAPPER_FUNCTION));
Equivalence.Wrapper<Flow> wFlow = EquivalenceFabric.FLOW_EQUIVALENCE.wrap(flow);
if (!wrappedFlows.contains(wFlow)) {
tableBuilder.getFlow().add(flow);
} else {
LOG.debug("Flow already exists in OfData - {}", flow);
}
}
代码示例来源:origin: org.opendaylight.alto.basic/alto-simple-ecs-impl
@Override
public int compare(Flow f1, Flow f2) {
if (f1.getPriority() < f2.getPriority()){
return 1;
} else if (f1.getPriority() > f2.getPriority()) {
return -1;
} else {
return 0;
}
}
});
代码示例来源:origin: org.opendaylight.netvirt/utils.netvirt-it-utils
/**
* Log the flows in a given table.
* @param datapathId dpid
* @param tableNum table number
* @param store configuration or operational
*/
public void logFlows(long datapathId, short tableNum, LogicalDatastoreType store) {
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder nodeBuilder =
FlowUtils.createNodeBuilder(datapathId);
Table table = FlowUtils.getTable(nodeBuilder, tableNum, dataBroker.newReadOnlyTransaction(), store);
if (table == null) {
LOG.info("logFlows: Could not find table {} in {}", tableNum, store);
}
//TBD: Log table and store in one line, flows in following lines
for (Flow flow : table.getFlow()) {
LOG.info("logFlows: table {} flow {} in {}", tableNum, flow.getFlowName(), store);
}
}
内容来源于网络,如有侵权,请联系作者删除!