Add RFC8530 Logical Network Elements 26/80726/5
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 7 Mar 2019 15:24:32 +0000 (16:24 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 8 Mar 2019 05:30:58 +0000 (06:30 +0100)
This adds packaging for RFC8530 model, so that it can be reused
by downstreams.

Change-Id: I863951b0caed784f5d7d6c3f5ce4d562d8755b72
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
artifacts/pom.xml
docs/pom.xml
features/features-mdsal/pom.xml
features/odl-mdsal-model-rfc8530/pom.xml [new file with mode: 0644]
features/pom.xml
model/ietf/pom.xml
model/ietf/rfc8530/pom.xml [new file with mode: 0644]
model/ietf/rfc8530/src/main/yang/ietf-logical-network-element@2019-01-25.yang [new file with mode: 0644]

index 49d8572bd91aaa974e0a5bc09d7fdd0270c250ed..a14c4fd7cf4439c05025b0ff64017a2a401d6e3b 100644 (file)
                 <version>1.0.7-SNAPSHOT</version>
             </dependency>
 
+            <!-- RFC8530 -->
+            <dependency>
+                <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+                <artifactId>rfc8530</artifactId>
+                <version>1.0.7-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-rfc8530</artifactId>
+                <version>1.0.7-SNAPSHOT</version>
+                <classifier>features</classifier>
+                <type>xml</type>
+            </dependency>
 
             <dependency>
                 <groupId>org.opendaylight.mdsal.model</groupId>
index 0369d7fa956fac385248dd619775d60ea416c5f2..9eaf7365e29a1c08963444de1a9177874771a33a 100644 (file)
             <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
             <artifactId>rfc8529</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8530</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.opendaylight.mdsal.model</groupId>
             <artifactId>ietf-restconf</artifactId>
index d29d6d26726abbe4efc169ee6a30d15c2e42eb90..263cb8fd0a9f707bb29e341d92ddb59859c3ae3a 100644 (file)
             <classifier>features</classifier>
             <type>xml</type>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>odl-mdsal-model-rfc8530</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
 
         <dependency>
             <groupId>org.opendaylight.mdsal.model</groupId>
diff --git a/features/odl-mdsal-model-rfc8530/pom.xml b/features/odl-mdsal-model-rfc8530/pom.xml
new file mode 100644 (file)
index 0000000..f9fffed
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 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>feature-parent</artifactId>
+        <version>3.0.7-SNAPSHOT</version>
+        <relativePath>../feature-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.model</groupId>
+    <artifactId>odl-mdsal-model-rfc8530</artifactId>
+    <version>1.0.7-SNAPSHOT</version>
+    <packaging>feature</packaging>
+    <name>OpenDaylight :: MD-SAL :: Model :: RFC8530</name>
+    <description>Models from RFC8530</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>odl-mdsal-model-rfc8343</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>odl-mdsal-model-rfc8528</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8530</artifactId>
+        </dependency>
+    </dependencies>
+</project>
index b84ac4ede88a1c94576a8fa5c68bc329e7911b07..4b2fd007efed06ffc0464c87e5ee2c731e498e11 100644 (file)
@@ -81,6 +81,7 @@
         <module>odl-mdsal-model-rfc8349</module>
         <module>odl-mdsal-model-rfc8528</module>
         <module>odl-mdsal-model-rfc8529</module>
+        <module>odl-mdsal-model-rfc8530</module>
 
         <!-- IETF drafts -->
         <module>odl-mdsal-model-draft-bierman-netconf-restconf-02</module>
index 34af8ddf5143807a245784f6544cc733425f1a7b..57427c5c89f4d8e7e48ba8fbe0f5eac7a5c027f0 100644 (file)
@@ -84,6 +84,9 @@
         <!-- RFC8529 Network Instances -->
         <module>rfc8529</module>
 
+        <!-- RFC8530 Logical Network Elements -->
+        <module>rfc8530</module>
+
         <module>ietf-packet-fields</module>
         <module>ietf-access-control-list</module>
         <module>ietf-lisp-address-types</module>
diff --git a/model/ietf/rfc8530/pom.xml b/model/ietf/rfc8530/pom.xml
new file mode 100644 (file)
index 0000000..ec9a213
--- /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.ro. 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>3.0.7-SNAPSHOT</version>
+        <relativePath>../../../binding/binding-parent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+    <artifactId>rfc8530</artifactId>
+    <version>1.0.7-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>RFC8529 Logical Network Elements</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8343</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc8528</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/model/ietf/rfc8530/src/main/yang/ietf-logical-network-element@2019-01-25.yang b/model/ietf/rfc8530/src/main/yang/ietf-logical-network-element@2019-01-25.yang
new file mode 100644 (file)
index 0000000..4380449
--- /dev/null
@@ -0,0 +1,171 @@
+module ietf-logical-network-element {
+  yang-version 1.1;
+
+  // namespace
+
+  namespace "urn:ietf:params:xml:ns:yang:ietf-logical-network-element";
+  prefix lne;
+
+  // import some basic types
+
+  import ietf-interfaces {
+    prefix if;
+    reference
+      "RFC 8343: A YANG Data Model for Interface Management";
+  }
+  import ietf-yang-schema-mount {
+    prefix yangmnt;
+    reference
+      "RFC 8528: YANG Schema Mount";
+  }
+
+  organization
+    "IETF Routing Area (rtgwg) Working Group";
+  contact
+    "WG Web:   <https://datatracker.ietf.org/wg/rtgwg/>
+     WG List:  <mailto:rtgwg@ietf.org>
+
+     Author:   Lou Berger
+               <mailto:lberger@labn.net>
+
+     Author:   Christian Hopps
+               <mailto:chopps@chopps.org>
+
+     Author:   Acee Lindem
+               <mailto:acee@cisco.com>
+
+     Author:   Dean Bogdanovic
+               <mailto:ivandean@gmail.com>";
+  description
+    "This module is used to support multiple logical network
+     elements on a single physical or virtual system.
+
+     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
+     (http://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC 8530; see
+     the RFC itself for full legal notices.";
+
+  revision 2019-01-25 {
+    description
+      "Initial revision.";
+    reference
+      "RFC 8530: YANG Model for Logical Network Elements";
+  }
+
+  // top level device definition statements
+
+  container logical-network-elements {
+    description
+      "Allows a network device to support multiple logical
+       network element (device) instances.";
+    list logical-network-element {
+      key "name";
+      description
+        "List of logical network elements.";
+      leaf name {
+        type string;
+        description
+          "Device-wide unique identifier for the
+           logical network element.";
+      }
+      leaf managed {
+        type boolean;
+        default "true";
+        description
+          "True if the host can access LNE information
+           using the root mount point.  This value
+           may not be modifiable in all implementations.";
+      }
+      leaf description {
+        type string;
+        description
+          "Description of the logical network element.";
+      }
+      container root {
+        description
+          "Container for mount point.";
+        yangmnt:mount-point "root" {
+          description
+            "Root for models supported per logical
+             network element.  This mount point may or may not
+             be inline based on the server implementation.  It
+             SHALL always contain a YANG library and interfaces
+             instance.
+
+             When the associated 'managed' leaf is 'false', any
+             operation that attempts to access information below
+             the root SHALL fail with an error-tag of
+             'access-denied' and an error-app-tag of
+             'lne-not-managed'.";
+        }
+      }
+    }
+  }
+
+  // augment statements
+
+  augment "/if:interfaces/if:interface" {
+    description
+      "Add a node for the identification of the logical network
+       element associated with an interface.  Applies to
+       interfaces that can be assigned per logical network
+       element.
+
+       Note that a standard error will be returned if the
+       identified leafref isn't present.  If an interface
+       cannot be assigned for any other reason, the operation
+       SHALL fail with an error-tag of 'operation-failed' and an
+       error-app-tag of 'lne-assignment-failed'.  A meaningful
+       error-info that indicates the source of the assignment
+       failure SHOULD also be provided.";
+    leaf bind-lne-name {
+      type leafref {
+        path "/logical-network-elements/logical-network-element/name";
+      }
+      description
+        "Logical network element ID to which the interface is
+         bound.";
+    }
+  }
+
+  // notification statements
+
+  notification bind-lne-name-failed {
+    description
+      "Indicates an error in the association of an interface to an
+       LNE.  Only generated after success is initially returned
+       when bind-lne-name is set.";
+    leaf name {
+      type leafref {
+        path "/if:interfaces/if:interface/if:name";
+      }
+      mandatory true;
+      description
+        "Contains the interface name associated with the
+         failure.";
+    }
+    leaf bind-lne-name {
+      type leafref {
+        path "/if:interfaces/if:interface/lne:bind-lne-name";
+      }
+      mandatory true;
+      description
+        "Contains the bind-lne-name associated with the
+         failure.";
+    }
+    leaf error-info {
+      type string;
+      description
+        "Optionally, indicates the source of the assignment
+         failure.";
+    }
+  }
+}