X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fmd-sal%2Fmodel%2Fmodel-flow-base%2Fsrc%2Fmain%2Fyang%2Fport-types.yang;fp=opendaylight%2Fmd-sal%2Fmodel%2Fmodel-flow-base%2Fsrc%2Fmain%2Fyang%2Fport-types.yang;h=af7c4dff531998dc150976f7c527e2258975e21f;hb=71306ae62ba5e4b32edc655cb202d2294c92379e;hp=0000000000000000000000000000000000000000;hpb=85641a705943d7b657c627654c72b54e905c1e78;p=controller.git diff --git a/opendaylight/md-sal/model/model-flow-base/src/main/yang/port-types.yang b/opendaylight/md-sal/model/model-flow-base/src/main/yang/port-types.yang new file mode 100644 index 0000000000..af7c4dff53 --- /dev/null +++ b/opendaylight/md-sal/model/model-flow-base/src/main/yang/port-types.yang @@ -0,0 +1,135 @@ +module opendaylight-port-types { + namespace "urn:opendaylight:flow:types:port"; + prefix port-types; + + import yang-ext {prefix ext;} + import ietf-inet-types {prefix inet;} + import ietf-yang-types {prefix yang;} + + revision "2013-09-25" { + description "Initial revision of Port Inventory model"; + } + + + typedef port-config { + type bits { + bit PORT-DOWN; + bit NO-RECV; + bit NO-FWD; + bit NO-PACKET-IN; + } + } + + typedef port-state { + type enumeration { + enum LINK-DOWN; + enum BLOCKED; + enum LIVE; + } + } + + + typedef port-features { + type bits { + bit 10mb-hd; + bit 10mb-fd; + bit 100mb-hd; + bit 100mb-fd; + bit 1gb-hd; + bit 1gb-fd; + bit 10gb-fd; + bit 40gb-fd; + bit 100gb-fd; + bit 1tb-fd; + bit other; + bit copper; + bit fiber; + bit autoeng; + bit pause; + bit pause-asym; + } + } + + grouping common-port { + + leaf port-number { + type uint32; + } + + leaf hardware-address { + type yang:mac-address; + description "MAC Address of the port"; + + } + + leaf configuration { + type port-config; + description "Bit map of OFPPC-* flags"; + } + + leaf advertised-features { + type port-features; + description "Features being advertised by the port"; + } + } + + grouping flow-capable-port { + + uses common-port; + + leaf name { + type string; + description "Human readable name of the port"; + } + + leaf state { + type port-state; + description "Bit map of OFPPS-* flags"; + } + + leaf current-feature { + type port-features; + description "Bit map of OFPPF-* flags"; + } + + leaf supported { + type port-features; + description "Features supported by the port"; + } + + leaf peer-features { + type port-features; + description "Features advertised by peer"; + } + + leaf current-speed { + type uint32; + units "kbps"; + description "Current port bit rate in kbps"; + } + + leaf maximum-speed { + type uint32; + units "kbps"; + description "Max port bit rate in kbps"; + } + } + + grouping ofp-port-mod { + container port { + list port { + key "port-mod-order"; + leaf port-mod-order { + type uint32; + } + + uses common-port; + + leaf mask { + type uint32; + description "Bitmap of OFPPC-* flags to be changed"; + } + } + } + } +} \ No newline at end of file