X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflow-protocol-api%2Fsrc%2Fmain%2Fyang%2Fopenflow-instruction.yang;h=b9e515b3a2c66369d29e67922c320e1d717f455b;hb=1bab57414997362845756a427c5306076cdaf96c;hp=cb575a80edd8c114684aa0e3ae00a43eb26c94e3;hpb=617601a1b75c00b29636c59654abbc1fc065e664;p=openflowjava.git diff --git a/openflow-protocol-api/src/main/yang/openflow-instruction.yang b/openflow-protocol-api/src/main/yang/openflow-instruction.yang index cb575a80..b9e515b3 100644 --- a/openflow-protocol-api/src/main/yang/openflow-instruction.yang +++ b/openflow-protocol-api/src/main/yang/openflow-instruction.yang @@ -1,83 +1,75 @@ -module openflow-instruction { +/* + * Copyright (c) 2013 Pantheon Technologies s.r.o. 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 + */ + + module openflow-instruction { namespace "urn:opendaylight:openflow:common:instruction"; prefix "ofinstruction"; import openflow-types { prefix oft; } + import openflow-action {prefix ofaction;} revision "2013-07-31" { - // description "Initial model"; - } - /* - identity goto_table { - //description " Setup the next table in the lookup pipeline"; - base oft:instruction; - } - identity write_metadata { - //description " Setup the metadata field for use later in pipeline"; - base oft:instruction; - } - identity write_actions { - description " Write the action(s) onto the datapath action set"; - base oft:instruction; - } - identity apply_actions { - description " Applies the action(s) immediately"; - base oft:instruction; - } - identity clear_actions { - description " Clears all actions from the datapath action set"; - base oft:instruction; + description "#NOT_PUBLISHED# OpenFlow 1.3 - instruction model"; } - identity meter { - description " Apply meter (rate limiter)"; - base oft:instruction; - } - identity experimenter { - description "Experimenter instruction"; - base oft:instruction; - } - */ - // Structures - grouping goto_table { - description " Setup the next table in the lookup pipeline"; - leaf table { - type oft:table-id; // - } + container instruction-container { + uses instruction-grouping; } - grouping write_metadata { - description " Setup the metadata field for use later in pipeline"; - leaf metadata { - type oft:metadata; - } - leaf mask { - type oft:metadata; + + grouping instructions-grouping { + list instruction { + config false; + uses instruction-grouping; + leaf experimenter-id { + type oft:experimenter-id; + } } } - grouping actions { - leaf type { - type enumeration { - enum write { - description " Write the action(s) onto the datapath action set"; + + grouping instruction-grouping { + choice instruction-choice { + case goto-table-case { + container goto-table { + leaf table-id { + type uint8; + } } - enum apply { - description " Applies the action(s) immediately"; + } + case write-metadata-case { + container write-metadata { + leaf metadata { + type binary; + } + leaf metadata-mask { + type binary; + } } - enum clear { - description " Clears all actions from the datapath action set"; + } + case write-actions-case { + container write-actions { + uses ofaction:actions-grouping; + } + } + case apply-actions-case { + container apply-actions { + uses ofaction:actions-grouping; + } + } + case clear-actions-case { + // empty instruction + } + case meter-case { + container meter { + leaf meter-id { + type uint32; + } } } - } - list action { - // TBD - } - } - - grouping meter { - description " Apply meter (rate limiter)"; - leaf meter-id { - type oft:meter-id; } } - } \ No newline at end of file