Module package management.
Version: 2020-06-24
module huawei-module-management { yang-version 1; namespace "urn:huawei:yang:huawei-module-management"; prefix module-management; import ietf-yang-types { prefix yang; } import huawei-pub-type { prefix pub-type; } import ietf-inet-types { prefix inet; } import huawei-extension { prefix ext; } organization "Huawei Technologies Co., Ltd."; contact "Huawei Industrial Base Bantian, Longgang Shenzhen 518129 People's Republic of China Website: http://www.huawei.com Email: support@huawei.com"; description "Module package management."; revision "2020-06-24" { description "Modify node description."; reference "Huawei private."; } revision "2020-01-16" { description "Modify node properties."; reference "Huawei private."; } revision "2019-12-03" { description "Initial revision."; reference "Huawei private."; } ext:task-name "patch"; typedef module-state { type enumeration { enum "not-exist" { value 0; description "The status of the current module package is not-exist."; } enum "running" { value 3; description "The status of the current module package is running."; } } description "Status of the current module package."; } typedef operation-type { type enumeration { enum "install-module" { value 0; description "The operation type of module operation is install-module."; } enum "uninstall-module" { value 1; description "The operation type of module operation is uninstall-module."; } enum "startup-module" { value 2; description "The operation type of module operation is startup-module."; } enum "reset-startup-module" { value 3; description "The operation type of module operation is reset-startup-module."; } } description "Specify module operation type."; } typedef operation-status { type enumeration { enum "not-started" { value 0; description "The current status of module operation is not started."; } enum "operating" { value 1; description "The current status of module operation is operating."; } enum "successful" { value 2; description "The current status of module operation is successful."; } enum "failed" { value 3; description "The current status of module operation is failed."; } } description "Specify module operation status."; } typedef schedule-query-type { type enumeration { enum "default" { value 0; description "Default mode."; } enum "hftp" { value 1; description "HFTP mode."; } } description "Progress query type."; } typedef file-type { type enumeration { enum "module" { value 3; description "Module package."; } } description "File type."; } typedef service-type { type enumeration { enum "module" { value 7; description "Module file path type."; } } description "Service type."; } typedef action-type { type enumeration { enum "all" { value 0; description "The action of deleting module package is all."; } enum "single" { value 1; description "The action of deleting module package is single."; } } description "Specify the action of deleting module package."; } typedef transfer-type { type enumeration { enum "ftp" { value 0; description "FTP mode."; } enum "sftp" { value 1; description "SFTP mode."; } } description "Transfer type."; } container module-management { config false; description "Module package management."; container module-infos { description "List of module packet informations."; list module-info { key "package-name"; description "Operational data of a module packet information."; leaf package-name { type string { length "5..63"; } description "Name of the current module package."; } leaf version { type string { length "1..63"; } description "Version of the current module package."; } leaf module-name { type string { length "1..63"; } description "Name of the current module."; } leaf state { type module-state; description "Status of the current module package."; } leaf runtime { type yang:date-and-time; description "Run time of the current module package."; } leaf path { type string { length "1..127"; } description "Path of the current module package."; } } // list module-info } // container module-infos container next-startup-modules { description "List of next startup module packet informations."; list next-startup-module { key "name"; description "Operational data of a module startup packet information."; leaf name { type string { length "5..63"; } description "Name of a next startup module package."; } leaf path { type string { length "1..127"; } description "Path of a next startup module package."; } } // list next-startup-module } // container next-startup-modules container operation-schedules { description "List of module operation process."; list operation-schedule { key "phase"; description "Operational data of module operation process."; leaf phase { type operation-type; description "Module operation type."; } leaf name { type string { length "5..63"; } description "Name of a module package."; } leaf status { type operation-status; description "Module operation status."; } leaf schedule { type pub-type:percent; description "Value of the module operation process."; } } // list operation-schedule } // container operation-schedules container download-package-schedule { description "Operational data of package loading progress."; leaf name { type string { length "1..127"; } description "File name."; } leaf status { type operation-status; description "Package loading status."; } leaf schedule { type pub-type:percent; description "The schedule of file download, for example, progress (%)."; } leaf transfer-index { type uint32; description "Transfer index."; } leaf query-type { type schedule-query-type; description "Progress query type."; } } // container download-package-schedule container download-package-load-path { description "Operational data of load path before downloading a module package."; leaf file-type { type file-type; description "File type."; } leaf service-type { type service-type; description "Service type."; } leaf file-path { type string { length "0..128"; } description "File path. If the value of file-type node is module, the file path will be /$_install_mod/."; } } // container download-package-load-path } // container module-management rpc install-module { ext:node-ref "/file-operation/dirs/dir"; description "Load a module package."; input { leaf name { type string { length "5..63"; } mandatory true; description "Name of a module package."; } } } // rpc install-module rpc uninstall-module { ext:node-ref "/module-management/module-infos/module-info"; description "Delete a module package."; input { leaf action-type { type action-type; default "single"; description "Specify the action of uninstall module package."; } leaf name { when "../action-type != 'all'"; type leafref { path "/module-management/module-infos/module-info/package-name"; } description "Name of a module package."; } } } // rpc uninstall-module rpc startup-module { ext:node-ref "/file-operation/dirs/dir"; description "Specify the module package that will be used at the next startup."; input { leaf name { type string { length "5..63"; } mandatory true; description "Specify the name of a module package that will be used at the next startup."; } } } // rpc startup-module rpc reset-startup-module { ext:node-ref "/module-management/next-startup-modules/next-startup-module"; description "Delete a module packet that will be used at the next startup."; input { leaf action-type { type action-type; default "single"; description "Specify the action of reset startup module package."; } leaf name { when "../action-type != 'all'"; type leafref { path "/module-management/next-startup-modules/next-startup-module/name"; } description "Specify the name of a module package that used at the next startup."; } } } // rpc reset-startup-module rpc download-module-file { description "Download module package."; input { leaf server-ip { type inet:ipv4-address-no-zone; mandatory true; description "Server address."; } leaf user-name { type string { length "1..255"; } mandatory true; description "User name."; } leaf password { type pub-type:password-extend { length "1..255"; } mandatory true; description "Password of FTP or SFTP server."; } leaf server-port { type uint32 { range "1..65535"; } mandatory true; description "Server port."; } leaf file-name { type string { length "5..128"; } mandatory true; description "Package name."; } leaf transfer-type { type transfer-type; description "Transfer type."; } } } // rpc download-module-file } // module huawei-module-management
© 2023 YumaWorks, Inc. All rights reserved.