Add RFC8542 models 85/83785/4
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 20 Aug 2019 08:54:25 +0000 (10:54 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 20 Aug 2019 09:16:02 +0000 (11:16 +0200)
This adds the two models present in RFC8542.

JIRA: MDSAL-431
Change-Id: I4745703bf3de0338922da2568ef9c0530348fa05
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
artifacts/pom.xml
features/features-mdsal/pom.xml
features/odl-mdsal-model-rfc8542/pom.xml [new file with mode: 0644]
features/pom.xml
model/ietf/pom.xml
model/ietf/rfc8542-ietf-dc-fabric-topology/pom.xml [new file with mode: 0644]
model/ietf/rfc8542-ietf-dc-fabric-topology/src/main/yang/ietf-dc-fabric-topology@2019-02-25.yang [new file with mode: 0644]
model/ietf/rfc8542-ietf-dc-fabric-types/pom.xml [new file with mode: 0644]
model/ietf/rfc8542-ietf-dc-fabric-types/src/main/yang/ietf-dc-fabric-types@2019-02-25.yang [new file with mode: 0644]
model/ietf/rfc8542/pom.xml [new file with mode: 0644]

index 8693b3113ded93e401e9a862c296f6735f5bc264..5ade54937979e04b5224334c5eafd89f7d2d0148 100644 (file)
                 <version>3.0.0-SNAPSHOT</version>
             </dependency>
 
+            <!-- RFC8542 -->
+            <dependency>
+                <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+                <artifactId>rfc8542</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+                <artifactId>rfc8542-ietf-dc-fabric-topology</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+                <artifactId>rfc8542-ietf-dc-fabric-types</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+            </dependency>
+
             <!-- draft-bierman-netconf-restconf-02 -->
             <!-- FIXME: upgrade to RFC8040 -->
             <dependency>
                 <classifier>features</classifier>
                 <type>xml</type>
             </dependency>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.model</groupId>
+                <artifactId>odl-mdsal-model-rfc8542</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+                <classifier>features</classifier>
+                <type>xml</type>
+            </dependency>
 
             <dependency>
                 <groupId>org.opendaylight.mdsal.model</groupId>
index a52614fef93def09993fa0a1e7d0fa831400d988..024749444d3bd8b46137561a5d03f6397a8e99ea 100644 (file)
             <classifier>features</classifier>
             <type>xml</type>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>odl-mdsal-model-rfc8542</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
 
         <dependency>
             <groupId>org.opendaylight.mdsal.model</groupId>
diff --git a/features/odl-mdsal-model-rfc8542/pom.xml b/features/odl-mdsal-model-rfc8542/pom.xml
new file mode 100644 (file)
index 0000000..a35592b
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 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
+ -->
+<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.mdsal</groupId>
+        <artifactId>feature-parent</artifactId>
+        <version>5.0.0-SNAPSHOT</version>
+        <relativePath>../feature-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.model</groupId>
+    <artifactId>odl-mdsal-model-rfc8542</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>feature</packaging>
+    <name>OpenDaylight :: MD-SAL :: Model :: RFC8542</name>
+    <description>Models from RFC8542</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>odl-mdsal-model-rfc8345</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8542</artifactId>
+        </dependency>
+    </dependencies>
+</project>
index f31cee36a7f36ed25692bcea29fa9fe34cd5634a..49d57a59f90123a224db14bbeecf7eccb6bb0fe2 100644 (file)
@@ -83,6 +83,7 @@
         <module>odl-mdsal-model-rfc8528</module>
         <module>odl-mdsal-model-rfc8529</module>
         <module>odl-mdsal-model-rfc8530</module>
+        <module>odl-mdsal-model-rfc8542</module>
 
         <!-- IETF drafts -->
         <module>odl-mdsal-model-draft-bierman-netconf-restconf-02</module>
index 2694afcc949680d38784fe31dd1e6a83f1e62761..02bbc3b2c82401374ffd0ec6abe176e8365b1b6d 100644 (file)
         <!-- RFC8530 Logical Network Elements -->
         <module>rfc8530</module>
 
+        <!-- RFC8542 Fabric Topology in Data-Center Networks -->
+        <module>rfc8542</module>
+        <module>rfc8542-ietf-dc-fabric-topology</module>
+        <module>rfc8542-ietf-dc-fabric-types</module>
+
         <!-- Legacy Network Access Control Lists -->
         <module>ietf-packet-fields</module>
         <module>ietf-access-control-list</module>
diff --git a/model/ietf/rfc8542-ietf-dc-fabric-topology/pom.xml b/model/ietf/rfc8542-ietf-dc-fabric-topology/pom.xml
new file mode 100644 (file)
index 0000000..7430d50
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2019 PANTHEON.tech, 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
+-->
+<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.mdsal</groupId>
+        <artifactId>binding-parent</artifactId>
+        <version>5.0.0-SNAPSHOT</version>
+        <relativePath>../../../binding/binding-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+    <artifactId>rfc8542-ietf-dc-fabric-topology</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>RFC8542 ietf-dc-fabric-topology</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8345-ietf-network-topology</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8542-ietf-dc-fabric-types</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/model/ietf/rfc8542-ietf-dc-fabric-topology/src/main/yang/ietf-dc-fabric-topology@2019-02-25.yang b/model/ietf/rfc8542-ietf-dc-fabric-topology/src/main/yang/ietf-dc-fabric-topology@2019-02-25.yang
new file mode 100644 (file)
index 0000000..29741ca
--- /dev/null
@@ -0,0 +1,288 @@
+module ietf-dc-fabric-topology {
+  yang-version 1.1;
+  namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-topology";
+  prefix fabric;
+
+  import ietf-network {
+    prefix nw;
+    reference
+      "RFC 8345: A YANG Data Model for Network Topologies";
+  }
+  import ietf-network-topology {
+    prefix nt;
+    reference
+      "RFC 8345: A YANG Data Model for Network Topologies";
+  }
+  import ietf-dc-fabric-types {
+    prefix fabrictypes;
+    reference
+      "RFC 8542: A YANG Data Model for Fabric Topology in
+       Data-Center Networks";
+  }
+  organization
+    "IETF I2RS (Interface to the Routing System) Working Group";
+  contact
+    "WG Web:    <https://datatracker.ietf.org/wg/i2rs/>
+     WG List:   <mailto:i2rs@ietf.org>
+
+     Editor:    Yan Zhuang
+                <mailto:zhuangyan.zhuang@huawei.com>
+
+     Editor:    Danian Shi
+                <mailto:shidanian@huawei.com>";
+  description
+    "This module contains a collection of YANG definitions for
+     fabric.
+
+     Copyright (c) 2019 IETF Trust and the persons identified
+     as authors of the code.  All rights reserved.
+
+     Redistribution and use in source and binary forms, with
+     or without modification, is permitted pursuant to, and
+     subject to the license terms contained in, the Simplified
+     BSD License set forth in Section 4.c of the IETF Trust's
+     Legal Provisions Relating to IETF Documents
+     (https://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC 8542;
+     see the RFC itself for full legal notices.";
+
+  revision 2019-02-25 {
+    description
+      "Initial revision.";
+    reference
+      "RFC 8542: A YANG Data Model for Fabric Topology
+       in Data-Center Networks";
+  }
+
+  //grouping statements
+
+  grouping fabric-network-type {
+    description
+      "Identify the topology type to be fabric.";
+    container fabric-network {
+      presence "indicates fabric Network";
+      description
+        "The presence of the container node indicates
+         fabric topology";
+    }
+  }
+  grouping fabric-options {
+    description
+      "Options for a fabric";
+    leaf gateway-mode {
+      type enumeration {
+        enum centralized {
+          description
+            "The Fabric uses centralized
+             gateway, in which gateway is deployed on SPINE
+             node.";
+        }
+        enum distributed {
+          description
+            "The Fabric uses distributed
+             gateway, in which gateway is deployed on LEAF
+             node.";
+        }
+      }
+      default "distributed";
+      description
+        "Gateway mode of the fabric";
+    }
+    leaf traffic-behavior {
+      type enumeration {
+        enum normal {
+          description
+            "Normal means no policy is needed
+             for all traffic";
+        }
+        enum policy-driven {
+          description
+            "Policy driven means policy is
+             needed for the traffic; otherwise, the traffic
+             will be discarded.";
+        }
+      }
+      default "normal";
+      description
+        "Traffic behavior of the fabric";
+    }
+    leaf-list capability-supported {
+      type fabrictypes:service-capabilities;
+      description
+        "It provides a list of supported services of the
+         fabric.  The service-capabilities is defined as
+         identity-ref.  Users can define more services
+         by defining new identities.";
+    }
+  }
+
+  grouping device-attributes {
+    description
+      "device attributes";
+    leaf device-ref {
+      type fabrictypes:node-ref;
+      description
+        "The device that the fabric includes that refers
+         to a node in another topology.";
+    }
+    leaf-list role {
+      type fabrictypes:device-role;
+      default "fabrictypes:leaf";
+      description
+        "It is a list of device roles to represent the roles
+         that a device plays within a POD, such as SPINE,
+         LEAF, Border, or Border-Leaf.
+         The device role is defined as identity-ref.  If more
+         than 2 stages are used for a POD, users can
+         define new identities for the device role.";
+    }
+  }
+
+  grouping link-attributes {
+    description
+      "Link attributes";
+    leaf link-ref {
+      type fabrictypes:link-ref;
+      description
+        "The link that the fabric includes that refers to
+         a link in another topology.";
+    }
+  }
+
+  grouping port-attributes {
+    description
+      "Port attributes";
+    leaf port-ref {
+      type fabrictypes:tp-ref;
+      description
+        "The port that the fabric includes that refers to
+         a termination-point in another topology.";
+    }
+    leaf port-type {
+      type fabrictypes:port-type;
+      description
+        "Port type is defined as identity-ref.  The current
+         types include ethernet or serial.  If more types
+         are needed, developers can define new identities.";
+    }
+    leaf bandwidth {
+      type fabrictypes:bandwidth;
+      description
+        "Bandwidth of the port.  It is defined as identity-ref.
+         If more speeds are introduced, developers can define
+         new identities for them.  Current speeds include 1M, 10M,
+         100M, 1G, 10G, 25G, 40G, 100G, and 400G.";
+    }
+  }
+
+  grouping fabric-attributes {
+    description
+      "Attributes of a fabric";
+    leaf fabric-id {
+      type fabrictypes:fabric-id;
+      description
+        "An identifier for a fabric in a topology.
+         This identifier can be generated when composing a fabric.
+         The composition of a fabric can be achieved by defining an
+         RPC, which is left for vendor-specific implementation and
+         not provided in this model.";
+    }
+    leaf name {
+      type string;
+      description
+        "Name of the fabric";
+    }
+    leaf type {
+      type fabrictypes:underlay-network-type;
+      description
+        "The type of physical network that implements this
+         fabric.  Examples are VLAN and TRILL.";
+    }
+    container vni-capacity {
+      description
+        "The range of the VXLAN Network Identifier
+         (VNI) defined in RFC 7348 that the POD uses.";
+      leaf min {
+        type int32;
+        description
+          "The lower-limit VNI.";
+      }
+      leaf max {
+        type int32;
+        description
+          "The upper-limit VNI.";
+      }
+    }
+    leaf description {
+      type string;
+      description
+        "Description of the fabric";
+    }
+    container options {
+      description
+        "Options of the fabric";
+      uses fabric-options;
+    }
+    list device-nodes {
+      key "device-ref";
+      description
+        "Device nodes that are included in a fabric.";
+      uses device-attributes;
+    }
+    list device-links {
+      key "link-ref";
+      description
+        "Links that are included within a fabric.";
+      uses link-attributes;
+    }
+    list device-ports {
+      key "port-ref";
+      description
+        "Ports that are included in the fabric.";
+      uses port-attributes;
+    }
+  }
+
+  // augment statements
+
+  augment "/nw:networks/nw:network/nw:network-types" {
+    description
+      "Introduce a new network type for fabric-based topology";
+    uses fabric-network-type;
+  }
+
+  augment "/nw:networks/nw:network/nw:node" {
+    when '/nw:networks/nw:network/nw:network-types/'
+       + 'fabric:fabric-network' {
+      description
+        "Augmentation parameters apply only for networks
+         with fabric topology";
+    }
+    description
+      "Augmentation for fabric nodes created by
+       fabric topology.";
+    container fabric-attributes {
+      description
+        "Attributes for a fabric network";
+      uses fabric-attributes;
+    }
+  }
+
+  augment "/nw:networks/nw:network/nw:node/nt:termination-point" {
+    when '/nw:networks/nw:network/nw:network-types/'
+       + 'fabric:fabric-network' {
+      description
+        "Augmentation parameters apply only for networks
+         with fabric topology";
+    }
+    description
+      "Augmentation for port on fabric.";
+    container fport-attributes {
+      config false;
+      description
+        "Attributes for fabric ports";
+      uses fabrictypes:fabric-port;
+    }
+  }
+}
diff --git a/model/ietf/rfc8542-ietf-dc-fabric-types/pom.xml b/model/ietf/rfc8542-ietf-dc-fabric-types/pom.xml
new file mode 100644 (file)
index 0000000..f623ef1
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2019 PANTHEON.tech, 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
+-->
+<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.mdsal</groupId>
+        <artifactId>binding-parent</artifactId>
+        <version>5.0.0-SNAPSHOT</version>
+        <relativePath>../../../binding/binding-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+    <artifactId>rfc8542-ietf-dc-fabric-types</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>RFC8542 ietf-dc-fabric-types</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8345-ietf-network</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/model/ietf/rfc8542-ietf-dc-fabric-types/src/main/yang/ietf-dc-fabric-types@2019-02-25.yang b/model/ietf/rfc8542-ietf-dc-fabric-types/src/main/yang/ietf-dc-fabric-types@2019-02-25.yang
new file mode 100644 (file)
index 0000000..58b7122
--- /dev/null
@@ -0,0 +1,353 @@
+module ietf-dc-fabric-types {
+  yang-version 1.1;
+  namespace "urn:ietf:params:xml:ns:yang:ietf-dc-fabric-types";
+  prefix fabrictypes;
+
+  import ietf-network {
+    prefix nw;
+    reference
+      "RFC 8345: A YANG Data Model for Network Topologies";
+  }
+
+  organization
+    "IETF I2RS (Interface to the Routing System) Working Group";
+  contact
+    "WG Web:    <https://datatracker.ietf.org/wg/i2rs/>
+     WG List:   <mailto:i2rs@ietf.org>
+
+     Editor:    Yan Zhuang
+                <mailto:zhuangyan.zhuang@huawei.com>
+
+     Editor:    Danian Shi
+                <mailto:shidanian@huawei.com>";
+  description
+    "This module contains a collection of YANG definitions for
+     fabric.
+
+     Copyright (c) 2019 IETF Trust and the persons identified
+     as authors of the code.  All rights reserved.
+
+     Redistribution and use in source and binary forms, with
+     or without modification, is permitted pursuant to, and
+     subject to the license terms contained in, the Simplified
+     BSD License set forth in Section 4.c of the IETF Trust's
+     Legal Provisions Relating to IETF Documents
+     (https://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC 8542;
+     see the RFC itself for full legal notices.";
+
+  revision 2019-02-25 {
+    description
+      "Initial revision.";
+    reference
+      "RFC 8542: A YANG Data Model for Fabric Topology
+       in Data-Center Networks";
+  }
+
+  identity fabric-type {
+    description
+      "Base type for fabric networks";
+  }
+
+  identity vxlan-fabric {
+    base fabric-type;
+    description
+      "VXLAN fabric";
+  }
+
+  identity vlan-fabric {
+    base fabric-type;
+    description
+      "VLAN fabric";
+  }
+
+  identity trill-fabric {
+    base fabric-type;
+    description
+      "TRILL fabric";
+  }
+
+  identity port-type {
+    description
+      "Base type for fabric port";
+  }
+
+  identity eth {
+    base port-type;
+    description
+      "Ethernet";
+  }
+
+  identity serial {
+    base port-type;
+    description
+      "Serial";
+  }
+
+  identity bandwidth {
+    description
+      "Base for bandwidth";
+  }
+
+  identity bw-1M {
+    base bandwidth;
+    description
+      "1M";
+  }
+
+  identity bw-10M {
+    base bandwidth;
+    description
+      "10Mbps";
+  }
+
+  identity bw-100M {
+    base bandwidth;
+    description
+      "100Mbps";
+  }
+
+  identity bw-1G {
+    base bandwidth;
+    description
+      "1Gbps";
+  }
+
+  identity bw-10G {
+    base bandwidth;
+    description
+      "10Gbps";
+  }
+
+  identity bw-25G {
+    base bandwidth;
+    description
+      "25Gbps";
+  }
+
+  identity bw-40G {
+    base bandwidth;
+    description
+      "40Gbps";
+  }
+
+  identity bw-100G {
+    base bandwidth;
+    description
+      "100Gbps";
+  }
+
+  identity bw-400G {
+    base bandwidth;
+    description
+      "400Gbps";
+  }
+
+  identity device-role {
+    description
+      "Base for the device role in a fabric.";
+  }
+
+  identity spine {
+    base device-role;
+    description
+      "This is a spine node in a fabric.";
+  }
+
+  identity leaf {
+    base device-role;
+    description
+      "This is a leaf node in a fabric.";
+  }
+
+  identity border {
+    base device-role;
+    description
+      "This is a border node to connect to other
+       fabric/network.";
+  }
+
+  identity fabric-port-role {
+    description
+      "Base for the port's role in a fabric.";
+  }
+
+  identity internal {
+    base fabric-port-role;
+    description
+      "The port is used for devices to access each
+       other within a fabric.";
+  }
+
+  identity external {
+    base fabric-port-role;
+    description
+      "The port is used for a fabric to connect to
+       outside network.";
+  }
+
+  identity access {
+    base fabric-port-role;
+    description
+      "The port is used for an endpoint to connect
+       to a fabric.";
+  }
+
+  identity service-capability {
+    description
+      "Base for the service of the fabric ";
+  }
+
+  identity ip-mapping {
+    base service-capability;
+    description
+      "NAT.";
+  }
+
+  identity acl-redirect {
+    base service-capability;
+    description
+      "ACL redirect, which can provide a Service Function Chain (SFC).";
+  }
+
+  identity dynamic-route-exchange {
+    base service-capability;
+    description
+      "Dynamic route exchange.";
+  }
+
+  /*
+   * Typedefs
+   */
+
+  typedef fabric-id {
+    type nw:node-id;
+    description
+      "An identifier for a fabric in a topology.
+       This identifier can be generated when composing a fabric.
+       The composition of a fabric can be achieved by defining an
+       RPC, which is left for vendor specific implementation
+       and not provided in this model.";
+  }
+
+  typedef service-capabilities {
+    type identityref {
+      base service-capability;
+    }
+    description
+      "Service capability of the fabric";
+  }
+
+  typedef port-type {
+    type identityref {
+      base port-type;
+    }
+    description
+      "Port type: ethernet or serial or others.";
+  }
+
+  typedef bandwidth {
+    type identityref {
+      base bandwidth;
+    }
+    description
+      "Bandwidth of the port.";
+  }
+
+  typedef node-ref {
+    type instance-identifier;
+    description
+      "A reference to a node in topology";
+  }
+
+  typedef tp-ref {
+    type instance-identifier;
+    description
+      "A reference to a termination point in topology";
+  }
+
+  typedef link-ref {
+    type instance-identifier;
+    description
+      "A reference to a link in topology";
+  }
+
+  typedef underlay-network-type {
+    type identityref {
+      base fabric-type;
+    }
+    description
+      "The type of physical network that implements
+       this fabric.  Examples are VLAN and TRILL.";
+  }
+
+  typedef device-role {
+    type identityref {
+      base device-role;
+    }
+    description
+      "Role of the device node.";
+  }
+
+  typedef fabric-port-role {
+    type identityref {
+      base fabric-port-role;
+    }
+    description
+      "Role of the port in a fabric.";
+  }
+
+  typedef fabric-port-type {
+    type enumeration {
+      enum layer2interface {
+        description
+          "L2 interface";
+      }
+      enum layer3interface {
+        description
+          "L3 interface";
+      }
+      enum layer2Tunnel {
+        description
+          "L2 tunnel";
+      }
+      enum layer3Tunnel {
+        description
+          "L3 tunnel";
+      }
+    }
+    description
+      "Fabric port type";
+  }
+
+  grouping fabric-port {
+    description
+      "Attributes of a fabric port.";
+    leaf name {
+      type string;
+      description
+        "Name of the port.";
+    }
+    leaf role {
+      type fabric-port-role;
+      description
+        "Role of the port in a fabric.";
+    }
+    leaf type {
+      type fabric-port-type;
+      description
+        "Type of the port";
+    }
+    leaf device-port {
+      type tp-ref;
+      description
+        "The device port it mapped to.";
+    }
+    choice tunnel-option {
+      description
+        "Tunnel options to connect two fabrics.
+         It could be L2 Tunnel or L3 Tunnel.";
+    }
+  }
+}
diff --git a/model/ietf/rfc8542/pom.xml b/model/ietf/rfc8542/pom.xml
new file mode 100644 (file)
index 0000000..10bba5b
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2019 PANTHEON.tech, 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
+-->
+<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.mdsal</groupId>
+        <artifactId>dom-parent</artifactId>
+        <version>5.0.0-SNAPSHOT</version>
+        <relativePath>../../../dom/dom-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+    <artifactId>rfc8542</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>RFC8542 Fabric Topology in Data-Center Networks</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8542-ietf-dc-fabric-topology</artifactId>
+        </dependency>
+    </dependencies>
+</project>