remove yang models form tr-069-adapter
[oam/tr069-adapter.git] / netconf-server / schemas / common / o-ran-software-management.yang
diff --git a/netconf-server/schemas/common/o-ran-software-management.yang b/netconf-server/schemas/common/o-ran-software-management.yang
deleted file mode 100644 (file)
index ed84774..0000000
+++ /dev/null
@@ -1,595 +0,0 @@
-module o-ran-software-management {\r
-  yang-version 1.1;\r
-  namespace "urn:o-ran:software-management:1.0";\r
-  prefix o-ran-swm;\r
-\r
-  import ietf-inet-types {\r
-    prefix "inet";\r
-    revision-date 2013-07-15;\r
-  }\r
-\r
-  import ietf-hardware {\r
-    prefix "hw";\r
-  }\r
-\r
-  import o-ran-hardware {\r
-    prefix "o-ran-hw";\r
-  }\r
-\r
-  import o-ran-file-management {\r
-    prefix "o-ran-fm";\r
-  }\r
-\r
-  organization "O-RAN Alliance";\r
-\r
-  contact\r
-    "www.o-ran.org";\r
-\r
-  description\r
-    "This module defines operations and configuration for the management of software packages.\r
-    This module is derived out of opencpe-firmware-mgmt@2014-02-06.yang\r
-\r
-    Copyright 2019 the O-RAN Alliance.\r
-\r
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'\r
-    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
-    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
-    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r
-    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
-    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
-    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
-    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
-    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
-    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
-    POSSIBILITY OF SUCH DAMAGE.\r
-\r
-    Redistribution and use in source and binary forms, with or without\r
-    modification, are permitted provided that the following conditions are met:\r
-\r
-    * Redistributions of source code must retain the above copyright notice,\r
-    this list of conditions and the above disclaimer.\r
-    * Redistributions in binary form must reproduce the above copyright notice,\r
-    this list of conditions and the above disclaimer in the documentation\r
-    and/or other materials provided with the distribution.\r
-    * Neither the Members of the O-RAN Alliance nor the names of its\r
-    contributors may be used to endorse or promote products derived from\r
-    this software without specific prior written permission.";\r
-\r
-  revision "2019-07-03" {\r
-    description\r
-      "version 1.0.2\r
-\r
-      1) backward compatible changes to correct sFTP Server Authentication .\r
-      2) simplifying file management and authentication to reuse from o-ran-file-management module\r
-      3) minor fixes according to lack of descriptions\r
-      4) removal of not used grouping\r
-      5) backward compatible changes to introduce groupings.";\r
-\r
-    reference "ORAN-WG4.M.0-v01.00";\r
-  }\r
-\r
-  revision "2019-02-04" {\r
-    description\r
-      "version 1.0.0\r
-\r
-      1) imported model from xRAN\r
-      2) changed namespace and reference from xran to o-ran";\r
-\r
-    reference "ORAN-WG4.M.0-v01.00";\r
-  }\r
-\r
-  // groupings\r
-\r
-  grouping slot-group {\r
-    description\r
-      "Contains information about each software slot and its content.";\r
-    list software-slot {\r
-      key name;\r
-      min-elements 2;\r
-\r
-      description\r
-        "Information about available software-slots and their software.";\r
-\r
-      leaf name {\r
-        type string;\r
-\r
-        description\r
-          "Name of the software package. This shall be unique to identify the software-slot.";\r
-      }\r
-\r
-      leaf status {\r
-        type enumeration {\r
-          enum VALID {\r
-            description\r
-              "Slot Contains software build considered as proven valid";\r
-          }\r
-          enum INVALID {\r
-            description\r
-              "software build is not currently used by O-RU. The software is considered by O-RU as damaged (e.g. wrong CRC)";\r
-          }\r
-          enum EMPTY {\r
-            description\r
-              "W slot does not contain software package.";\r
-          }\r
-        }\r
-        config false;\r
-        mandatory true;\r
-\r
-        description "Indicates the status of the software slot";\r
-      }\r
-\r
-      leaf active {\r
-          type boolean;\r
-      must "../status = 'VALID'";\r
-        config false;\r
-          description\r
-            "informs if software stored in particular slot is activated at the moment";\r
-      }\r
-\r
-      leaf running {\r
-          type boolean;\r
-      must "../status = 'VALID'";\r
-        config false;\r
-          description\r
-            "informs if software stored in particular slot is used at the moment";\r
-      }\r
-\r
-      leaf access {\r
-        type enumeration {\r
-          enum READ_ONLY {\r
-            description\r
-              "slot intended only for factory software,\r
-              activation of such software slot means getting back to factory defaults";\r
-          }\r
-          enum READ_WRITE {\r
-            description\r
-              "slot used for updating software";\r
-          }\r
-        }\r
-        default READ_WRITE;\r
-        config false;\r
-\r
-        description\r
-          "Indicates the writability of the slot.\r
-          A Read-Only software slot is one which has a factory installed software-slot";\r
-      }\r
-\r
-      leaf product-code {\r
-        type leafref {\r
-        path "/hw:hardware/hw:component/o-ran-hw:product-code";\r
-        }\r
-        config false;\r
-\r
-        description "product code provided by the vendor, specific to the product. This is derived from manifest file.";\r
-      }\r
-\r
-      leaf vendor-code {\r
-        type string {\r
-          length 1..2;\r
-        }\r
-        config false;\r
-\r
-        description\r
-          "Unique code of the vendor. This is derived from manifest file.";\r
-      }\r
-\r
-      leaf build-id {\r
-        type string;\r
-        config false;\r
-\r
-        description\r
-          "Identity associated with the software build. This is derived from manifest file.";\r
-      }\r
-\r
-      leaf build-name {\r
-        type string;\r
-        config false;\r
-\r
-        description\r
-          "Name of the build. This is derived from manifest file.";\r
-      }\r
-\r
-      leaf build-version {\r
-        type string;\r
-        description "The vendor-specific version string of the software build.";\r
-      }\r
-\r
-      list files {\r
-        key "name";\r
-        config false;\r
-\r
-        description "List of all the files present in the software package.";\r
-\r
-        leaf name {\r
-          type string;\r
-\r
-          description\r
-            "Name of the file installed in the slot.";\r
-        }\r
-\r
-        leaf version {\r
-          type string;\r
-\r
-          description\r
-            "Version of the file installed in the slot";\r
-        }\r
-        leaf local-path {\r
-          type string;\r
-          mandatory true;\r
-\r
-          description\r
-            "Complete path of the file stored locally";\r
-        }\r
-\r
-        leaf integrity {\r
-          type enumeration {\r
-            enum OK {\r
-              description "OK - indicates that file integrity is correct";\r
-            }\r
-            enum NOK {\r
-              description "NOK - indicates corrupted file";\r
-            }\r
-          }\r
-          config false;\r
-\r
-          description\r
-            "Result of the file integrity check (checksum calculation) during installation.";\r
-        }\r
-      }\r
-    }\r
-  }\r
-\r
-  grouping download-input {\r
-    description\r
-      "Grouping for sw download rpc input";\r
-    leaf remote-file-path {\r
-      type inet:uri;\r
-      mandatory true;\r
-      description\r
-        "URI of the software image including username.\r
-        The following format is possible:\r
-        sftp://<username>@<host>[:<port>]/path";\r
-    }\r
-\r
-    uses o-ran-fm:credential-information;\r
-  }\r
-\r
-  grouping download-output {\r
-    description\r
-      "Grouping for sw download rpc output";\r
-    leaf status {\r
-      type enumeration {\r
-        enum STARTED {\r
-          description\r
-            "Operation has been started without error.";\r
-        }\r
-        enum FAILED {\r
-          description\r
-            "Operation cannot be started because of error, more detailed information can be found in error-message.";\r
-        }\r
-      }\r
-      mandatory true;\r
-\r
-      description\r
-        "Status of the software files download";\r
-    }\r
-    leaf error-message {\r
-      when "../status = 'FAILED'";\r
-      type string;\r
-\r
-      description\r
-        "Detailed error Message when the status is failed.";\r
-    }\r
-\r
-    leaf notification-timeout {\r
-      type int32;\r
-      units seconds;\r
-      default 30;\r
-\r
-      description\r
-        "Notification timeout is the time NETCONF client shall\r
-        wait for a 'download-event' notification from O-RU. If there is no\r
-        'download-event' notification received within notification-timeout,\r
-        NETCONF client shall assume the download timeout/failure, and follow necessary steps.";\r
-    }\r
-  }\r
-\r
-  grouping install-input {\r
-    description\r
-      "Grouping for sw installation rpc input";\r
-    leaf slot-name {\r
-      type leafref {\r
-        path "/software-inventory/software-slot/name";\r
-        }\r
-      must "/software-inventory/software-slot[name = current()][active = 'false' and running = 'false']" {\r
-        error-message "software-install may be requested only against active::false and running::false slot!";\r
-      }\r
-      mandatory true;\r
-\r
-      description\r
-        "software-slot to which the software shall be installed to.";\r
-    }\r
-\r
-    leaf-list file-names {\r
-      type string;\r
-\r
-      description\r
-        "Names of the files within software package to be installed";\r
-    }\r
-  }\r
-\r
-  grouping install-output {\r
-    description\r
-      "Grouping for sw installation rpc output";\r
-    leaf status {\r
-      type enumeration {\r
-        enum STARTED {\r
-          description\r
-            "Operation has been started without error.";\r
-        }\r
-        enum FAILED {\r
-          description\r
-            "Operation cannot be started because of error, more detailed information can be found in error-message.";\r
-        }\r
-      }\r
-      mandatory true;\r
-\r
-      description\r
-        "Status of the software package install.";\r
-    }\r
-    leaf error-message {\r
-      when "../status = 'FAILED'";\r
-      type string;\r
-\r
-      description\r
-        "Detailed error Message when the status is failed.";\r
-    }\r
-  }\r
-\r
-  grouping activate-input {\r
-    description\r
-      "Grouping for sw activation rpc input";\r
-    leaf slot-name {\r
-      type leafref {\r
-        path "/software-inventory/software-slot/name";\r
-      }\r
-      must "/software-inventory/software-slot[name = current()][status = 'VALID']" {\r
-        error-message "software activation may be requested only on VALID slot!";\r
-      }\r
-      mandatory true;\r
-\r
-      description\r
-        "Slot name on which software has to be activated.";\r
-    }\r
-  }\r
-\r
-  grouping activate-output {\r
-    description\r
-      "Grouping for sw activation rpc output";\r
-    leaf status {\r
-      type enumeration {\r
-        enum STARTED {\r
-          description\r
-            "Operation has been started without error.";\r
-        }\r
-        enum FAILED {\r
-          description\r
-            "Operation cannot be started because of error, more detailed information can be found in error-message.";\r
-        }\r
-      }\r
-      mandatory true;\r
-\r
-      description\r
-        "Status of the software files activation";\r
-    }\r
-    leaf error-message {\r
-      when "../status = 'FAILED'";\r
-      type string;\r
-\r
-      description\r
-        "Detailed error Message when the status is failed.";\r
-    }\r
-\r
-    leaf notification-timeout {\r
-      type int32;\r
-      units seconds;\r
-      default 30;\r
-\r
-      description\r
-        "Timeout on client waiting for the activate event";\r
-    }\r
-  }\r
-\r
-  grouping download-notification {\r
-    description\r
-      "Grouping for notification event structure for download completion";\r
-    leaf file-name {\r
-      type string;\r
-      mandatory true;\r
-\r
-      description\r
-        "File name of downloaded software package";\r
-    }\r
-\r
-    leaf status {\r
-      type enumeration {\r
-        enum COMPLETED {\r
-          description\r
-            "Operation completed succesfully";\r
-        }\r
-        enum AUTHENTICATION_ERROR {\r
-          description "source available, wrong credentials";\r
-        }\r
-        enum PROTOCOL_ERROR {\r
-          description "SFTP errors";\r
-        }\r
-        enum FILE_NOT_FOUND {\r
-          description "source not available.";\r
-        }\r
-        enum APPLICATION_ERROR {\r
-          description "Application related errors";\r
-        }\r
-        enum TIMEOUT {\r
-          description "Timeout waiting for download";\r
-        }\r
-      }\r
-\r
-      description\r
-        "Status of finished operation execution";\r
-    }\r
-    leaf error-message {\r
-      when "../status != 'COMPLETED'";\r
-      type string;\r
-\r
-      description\r
-        "Detailed description of faulty situation";\r
-    }\r
-  }\r
-\r
-  grouping install-notification {\r
-    description\r
-      "Grouping for notification event structure for installation completion";\r
-    leaf slot-name {\r
-      type leafref {\r
-        path "/software-inventory/software-slot/name";\r
-      }\r
-\r
-      description\r
-        "Name of the slot to which software was installed.";\r
-    }\r
-    leaf status {\r
-      type enumeration {\r
-        enum COMPLETED {\r
-          description\r
-            "Operation completed succesfully";\r
-        }\r
-        enum FILE_ERROR {\r
-          description "operation on the file resulted in in error, disk failure, not enough disk space,\r
-                      incompatible file format";\r
-        }\r
-        enum INTEGRITY_ERROR {\r
-          description "file is corrupted";\r
-        }\r
-        enum APPLICATION_ERROR {\r
-          description "operation failed due to internal reason";\r
-        }\r
-      }\r
-\r
-      description\r
-        "Status of finished operation execution";\r
-    }\r
-    leaf error-message {\r
-      when "../status != 'COMPLETED'";\r
-      type string;\r
-\r
-      description\r
-        "Detailed description of faulty situation";\r
-    }\r
-  }\r
-\r
-  grouping activation-notification {\r
-    description\r
-      "Grouping for notification event structure for activation completion";\r
-    leaf slot-name {\r
-      type leafref {\r
-        path "/software-inventory/software-slot/name";\r
-      }\r
-\r
-      description\r
-        "Name of the slot which was activated";\r
-    }\r
-\r
-    leaf status {\r
-      type enumeration {\r
-        enum COMPLETED {\r
-          description\r
-            "Operation completed succesfully";\r
-        }\r
-        enum APPLICATION_ERROR {\r
-          description\r
-            "Operation finished with error, more details can by found in error-message";\r
-        }\r
-      }\r
-\r
-      description\r
-        "Status of finished operation execution";\r
-    }\r
-    leaf return-code {\r
-      type uint8;\r
-\r
-      description\r
-        "status code return when the software is tried to activate";\r
-    }\r
-    leaf error-message {\r
-      when "../status != 'COMPLETED'";\r
-      type string;\r
-\r
-      description\r
-        "Detailed description of faulty situation";\r
-    }\r
-  }\r
-\r
-  // top level container\r
-\r
-  container software-inventory {\r
-    config false;\r
-    description\r
-      "Contains information about each software slot and its content.";\r
-\r
-    uses slot-group;\r
-\r
-  }\r
-    // rpc statements\r
-\r
-  rpc software-download {\r
-    description\r
-      "Rpc needed to perform software download operation.";\r
-\r
-    input {\r
-      uses download-input;\r
-    }\r
-    output {\r
-      uses download-output;\r
-    }\r
-  }\r
-\r
-  rpc software-install {\r
-    description\r
-      "Install a previously downloaded software package.";\r
-\r
-    input {\r
-      uses install-input;\r
-    }\r
-    output {\r
-      uses install-output;\r
-    }\r
-  }\r
-\r
-  rpc software-activate {\r
-    description\r
-      "Activate a previously installed software.";\r
-    input {\r
-      uses activate-input;\r
-    }\r
-    output {\r
-      uses activate-output;\r
-    }\r
-  }\r
-\r
-    // notification definitions\r
-  notification download-event {\r
-    description "Notification event structure for download completion";\r
-    uses download-notification;\r
-\r
-  }\r
-\r
-  notification install-event {\r
-    description "Notification event structure for installation completion";\r
-    uses install-notification;\r
-  }\r
-\r
-  notification activation-event {\r
-    description "Notification event structure for activation completion";\r
-    uses activation-notification;\r
-  }\r
-}\r