This module contains a collection of YANG definitions for executing and monitoring Cisco IOS-XR sysadmin ISSU operations. Copyr...
Version: 2019-06-12
module Cisco-IOS-XR-sysadmin-issu { yang-version 1; namespace "http://cisco.com/calvados/Cisco-IOS-XR-sysadmin-issu"; prefix issu; import tailf-common { prefix tailf; } import ietf-yang-types { prefix ietf-types; } import Cisco-IOS-XR-sysadmin-types { prefix calvados; } import cisco-semver { prefix semver; } organization "Cisco Systems Inc."; contact "Cisco Systems, Inc. Customer Service Postal: 170 West Tasman Drive San Jose, CA 95134 Tel: +1 800 553-NETS E-mail: cs-yang@cisco.com"; description "This module contains a collection of YANG definitions for executing and monitoring Cisco IOS-XR sysadmin ISSU operations. Copyright (c) 2016-2020 by Cisco Systems, Inc. All rights reserved."; revision "2019-06-12" { description "Fix the 'not in canonical order' errors raised in CSCvq09045"; } revision "2019-04-15" { description "Establish semantic version baseline."; } revision "2018-12-13" { description "Change the type for the location key leaf of a client list item from string to calvados:location-id. This is only a string with a regex but will block entered CLI which uses an obviously incorrect node string."; } revision "2018-07-05" { description "Split of the ISSU container into separate information and action containers. Addition of some more leaves to op_start_output, and some more options to the op-start-result enum."; } revision "2018-03-12" { description "Initial revision"; } semver:module-version "1.0.0"; typedef op-start-result { type enumeration { enum "start-success" { value 0; description "Operation was started successfully"; } enum "error-operation-in-progress" { value 1; description "Another ISSU operation is already in progress"; } enum "activate-error-no-prepare" { value 2; description "A request to activate the prepared software was made, but there is no successfully prepared software"; } enum "prepare-error-previous-prepare" { value 3; description "A request to prepare software was made, but previously prepared software exists"; } enum "recover-error-unrecoverable" { value 4; description "The system is in a state that makes in-service recovery impossible"; } enum "start-error-internal" { value 5; description "An internal error occured while attempting to start the operation"; } enum "prepare-error-previous-operation-not-committed" { value 6; description "A previous install operation has not been committed"; } enum "prepare-error-already-in-progress" { value 7; description "An install operation is already in progress"; } } description "Enumeration of errors that can be encountered while attempting to begin an ISSU operation"; } typedef op-result { type enumeration { enum "success" { value 0; description "Operation succeeded"; } enum "error-input" { value 1; description "Part or all of the input was invalid"; } enum "error-orchestration" { value 2; description "An internal error occurred during ISSU orchestration"; } enum "error-install" { value 3; description "An error occured in the install infrastructure"; } enum "error-node-redundancy" { value 4; description "Not all nodes in the system have the required redundancy to allow an ISSU to proceed"; } } description "Enumeration of errors that can be encountered during an ISSU operation"; } typedef issu-notif { type enumeration { enum "notif-sysadmin-op-start" { value 0; description "A sysadmin ISSU operation is beginning"; } enum "notif-sysadmin-phase-start" { value 1; description "A sysadmin ISSU phase is beginning"; } enum "notif-sysadmin-op-end" { value 2; description "A sysadmin ISSU operation is ending"; } } description "Enumeration of notifications that features can be registered for"; } typedef op-stage { type enumeration { enum "prepare-preamble" { value 0; description "Prechecks and preprocessing"; } enum "prepare-host" { value 1; description "Host package preparation"; } enum "prepare-sysadmin" { value 2; description "Sysadmin package preparation"; } enum "prepare-aborting" { value 3; description "Aborting after encountering an error"; } enum "prepare-postamble" { value 4; description "Operation post-processing"; } enum "prepare-complete" { value 5; description "All preparation complete"; } enum "activate-preamble" { value 6; description "Pre-checks and pre-processing"; } enum "activate-sysadmin-phase-one" { value 7; description "Sysadmin activation on first subset of nodes"; } enum "activate-sysadmin-phase-two" { value 8; description "Sysadmin activation on second subset of nodes"; } enum "activate-host" { value 9; description "Host activation"; } enum "activate-aborting" { value 10; description "Aborting after encountering an error, from which it is not possible to recover"; } enum "activate-paused" { value 11; description "Paused after encountering an error from which it is possible to recover"; } enum "activate-postamble" { value 12; description "Post-checks and post-processing"; } enum "activate-complete" { value 13; description "All activation complete"; } } description "Enumeration of stages that the ISSU operation can be in"; } grouping op-start-output { leaf result { type op-start-result; description "Enumeration value representing the result of the operation start request. In the error case this is duplicated by failure-enum."; } leaf failure-enum { type op-start-result; description "Enumeration value representing the error case that was hit. This is only present if the operation failed to start i.e. when op-initiated is False."; } leaf id { type uint32; description "On success, the ID of the started operationDuplicate of the operation-id leaf, included for backwards compatibility."; } leaf operation-id { type uint32; description "On success, the ID of the started operation"; } leaf op-initiated { type boolean; description "True if the operation was started sucessfully, False otherwise"; } leaf more-details { type string; description "More details on the cause of failure"; } } // grouping op-start-output container issu_action { tailf:action "prepare" { description "Prepare software for ISSU activation, without changing the running software"; input { leaf-list "packages" { type "string"; description "Names of packages added to the repository that are to be prepared"; } leaf-list "ids" { type "uint32"; description "IDs of previous install operations: packages added by these operations are to be prepared"; } leaf "activate" { type "boolean"; default "false"; description "If true, automatically activate the software using ISSU once it has been prepared"; } } output { uses "op-start-output"; } } tailf:action "activate" { description "Activate prepared software using ISSU"; input; output { uses "op-start-output"; } } tailf:action "deactivate" { description "Deactivate software using ISSU"; input { leaf-list "packages" { type "string"; description "Names of packages that are currently active and are to be deactivated"; } leaf-list "ids" { type "uint32"; description "IDs of previous install operations: packages added by these operations are to be prepared"; } } output { uses "op-start-output"; } } tailf:action "recover" { description "Perform an in-service recovery to bring the system back to its original state after a failed ISSU activate or deactivate operation. This is a continuation of the original activate or deactivate operation (so in particular it has the same operation ID)"; input; output { uses "op-start-output"; } } config false; description "ISSU action commands"; } // container issu_action container issu { config false; description "ISSU operational state"; container status { config false; description "Status of the in-progress or last completed ISSU operation"; leaf operation-type { type enumeration { enum "no-operation" { value 0; description "No ISSU operations have been attempted."; } enum "activate-operation" { value 1; description "Overall operation will add or upgrade packages in the running software"; } enum "deactivate-operation" { value 2; description "Overall operation will remove packages from the running software"; } } description "Whether the operation is an activate or deactivate. Both types of operation go through 'prepare' and 'activate' phases.The difference is the end result: whether the target packages are made to run, or removed from the running software."; } leaf id { type uint32; description "ID for the current/latest phase of the operation"; } leaf prepare-id { type uint32; description "ID for the prepare phase of the operation"; } leaf activate-id { type uint32; description "ID for the activate or deactivate phase of the operation"; } leaf-list sysadmin-packages { type string; description "Sysadmin packages that are part of the operation"; } leaf-list host-packages { type string; description "Host OS packages that are part of the operation"; } leaf complete { type boolean; description "Whether or not the operation has completed."; } leaf result { type op-result; description "Whether the operation succeeded or failed, and the error if any. If in progress, this reflects the current state."; } leaf recover-result { type op-result; description "If a recovery attempt has been completed, an indication of whether the recovery succeeded or failed, and the error if any"; } container prepare { description "State specific to the prepare phase"; leaf stage { type op-stage; description "Progress of the prepare phase"; } leaf start-time { type ietf-types:date-and-time; description "When this ehase was started"; } leaf activity { type string; description "A description of the current orchestration activity being executed"; } leaf activity-start-time { type ietf-types:date-and-time; description "When the current activity was started"; } } // container prepare container activate { description "State specific to the activate phase"; leaf stage { type op-stage; description "Progress of the activate phase"; } leaf start-time { type ietf-types:date-and-time; description "When this phase was started"; } leaf activity { type string; description "A description of the current orchestration activity being executed"; } leaf-list activity-nodes { type string; description "Nodes on which the current orchestration activity is being executed"; } leaf activity-waiting-for { type string; description "A description of what needs to happen before the next orchestration activity can be started"; } leaf activity-start-time { type ietf-types:date-and-time; description "When the current activity was started"; } } // container activate container error { description "Details of the first error that was encountered, if there were any."; leaf result { type op-result; description "If the operation has completed, an indication of whether the operation succeeded or failed, and the error if any"; } leaf stage { type op-stage; description "The stage during which the error was encountered"; } leaf error-message { type string; description "Message describing the error."; } container details { description "Details specific to the error. Contents are only filled in if it is relevant to the error that occured."; leaf-list nodes { type string; description "A list of the nodes affected by or causing the error."; } leaf-list clients { type string; description "A list of the registered features affected by or causing the error."; } leaf-list packages { type string; description "A list of the packages affected by or causing the error."; } leaf-list operation-ids { type uint32; description "A list of the operation IDs affected by or causing the error."; } } // container details } // container error } // container status container clients { description "Features registered for notifications of ISSU phases"; leaf announcement { type issu-notif; description "Type of most recent notification sent to clients"; } leaf announcement-status { type enumeration { enum "announce-no-notif" { value 0; description "No announcement has yet been sent"; } enum "announce-in-progress" { value 1; description "Announcement is in progress, waiting for responses"; } enum "announce-success" { value 2; description "The announcement has been acknowledged by all clients, ISSU may continue"; } enum "announce-veto" { value 3; description "One or more features vetoed the ISSU operation"; } enum "announce-disconnect" { value 4; description "One or more features disconnected during the announcement"; } enum "announce-timeout" { value 5; description "One or more features timed out during the announcement"; } enum "announce-send-error" { value 6; description "There was an error ending the announcement to one or more features"; } enum "announce-client-error" { value 7; description "One or more features has returned an error during the ISSU operation"; } } description "Status of most recent notification sent to clients"; } list client { key "name location"; leaf name { type string; description "Name of the registered feature"; } leaf location { type calvados:location-id; description "Node on which the feature process is running"; } leaf-list registered-for { type issu-notif; description "Which notifications the feature is registered to receive"; } leaf notif { type issu-notif; description "Type of most recent notification"; } leaf response { type enumeration { enum "notif-resp-no-notif" { value 0; description "No notification has yet been sent"; } enum "notif-resp-pending" { value 1; description "No response has yet been sent"; } enum "notif-resp-ack" { value 2; description "The notification has been acknowledged, ISSU may continue"; } enum "notif-resp-veto" { value 3; description "The feature has vetoed the ISSU operation"; } enum "notif-resp-disconnect" { value 4; description "The feature has disconnected during the notification"; } enum "notif-resp-timeout" { value 5; description "The feature has timed out during the ISSU operation"; } enum "notif-resp-send-error" { value 6; description "There was an error ending the announcement to the feature"; } enum "notif-resp-client-error" { value 7; description "The feature has returned an error during the ISSU operation"; } enum "notif-resp-client-abort" { value 8; description "The feature has aborted during the ISSU operation"; } } description "Response from this client to most recent notification sent to the client"; } leaf aborted { type boolean; description "Whether the feature has requested that the current operation be aborted"; } leaf abort-reason { type string; description "Description of the reason for requesting an abort, if applicable"; } } // list client } // container clients container internals { description "Internal infrastructure state"; container orchestrator { description "Orchestrator module internal state"; typedef op-request-type { type enumeration { enum "operation-request-prepare" { value 0; description "Request to execute the prepare phase of an operation"; } enum "operation-request-activate" { value 1; description "Request to activate prepared packages"; } enum "operation-request-deactivate" { value 2; description "Request to execute both prepare and deactivate phases of an operation"; } enum "operation-request-recover" { value 3; description "Recover the system from a failed activate or deactivate operation"; } } description "Enumeration of requests that initiate (part of) an ISSU operation"; } typedef stage-type { type enumeration { enum "start" { value 0; description "Start of operation"; } enum "end" { value 1; description "End of operation"; } enum "prepare-inventory-precheck" { value 2; description "Inventory precheck"; } enum "prepare-expand-operation-ids" { value 3; description "Expand add operation IDs to packages"; } enum "prepare-get-metadata" { value 4; description "Retrieve package metadata"; } enum "prepare-extract-composite" { value 5; description "Extract constituent packages"; } enum "prepare-verify-packages" { value 6; description "Verify package contents"; } enum "prepare-host" { value 7; description "The host preparation"; } enum "prepare-calvados" { value 8; description "The Calvados preparation"; } enum "prepare-deactivate-verify-packages" { value 9; description "Verify package contents for deactivation"; } enum "prepare-deactivate-calvados" { value 10; description "The Calvados preparation for deactivation"; } enum "prepare-abort" { value 11; description "Abort the prepare operation"; } enum "prepare-clean" { value 12; description "Clean-up of prepare operation"; } enum "activate-preamble" { value 13; description "Activation preamble"; } enum "deactivate-preamble" { value 14; description "Deactivation preamble"; } enum "activate-calvados-preamble" { value 15; description "Calvados-specific activation preamble"; } enum "activate-calvados-phase" { value 16; description "Activate the Calvados software"; } enum "activate-calvados-phase-reload" { value 17; description "Reload Calvados VMs"; } enum "activate-calvados-phase-postamble" { value 18; description "Post VM restart checks for Calvados"; } enum "activate-calvados-postamble" { value 19; description "Post Calvados activation handling"; } enum "activate-host" { value 20; description "Execute host ISSU"; } enum "activate-postamble" { value 21; description "Post-processing for the activate operation"; } enum "deactivate-calvados" { value 22; description "Deactivate the Calvados software"; } enum "activate-abort-no-recovery" { value 23; description "Abort the activate operation, no recovery is necessary"; } enum "activate-abort-unrecoverable" { value 24; description "Abort the activate operation, no recovery is possible"; } enum "activate-error-pause" { value 25; description "Pause following an error"; } enum "activate-calvados-recovery" { value 26; description "Rollback to committed Calvados"; } enum "activate-recovery-postamble" { value 27; description "Post rollback to committed Calvados"; } } description "Enumeration of possible internal stages in an operation"; } typedef phase-type { type enumeration { enum "calvados-activate-phase-one" { value 0; description "Phase one of the Calvados activate operation"; } enum "calvados-activate-phase-two" { value 1; description "Phase two of the Calvados activate operation"; } } description "Calvados activate phase"; } grouping stage-history-type { list historical-stage { key "stage-index"; leaf stage-index { type uint32; description "Integer stage index"; } leaf external-stage { type op-stage; description "External stage of operation"; } leaf internal-stage-details { type string; description "Details of the internal stage"; } leaf status { type string; description "Status of the stage"; } leaf error-details { type string; description "Further error details"; } leaf start-time { type ietf-types:date-and-time; description "Start time of stage"; } leaf end-time { type ietf-types:date-and-time; description "End time of stage"; } leaf complete { type boolean; description "Is the stage complete?"; } } // list historical-stage } // grouping stage-history-type leaf command { type op-request-type; description "Command issued"; } leaf operation-type { type op-request-type; description "Type of operation: activate or deactivate"; } leaf current-operation { type op-request-type; description "Operation being performed"; } leaf issu-completed { type boolean; description "True if the overall ISSU operation has been completed, false otherwise"; } leaf operation-id { type uint32; description "The ID for the operation"; } leaf in-progress { type boolean; description "True if an operation is in progress"; } container operation-start-details { leaf-list input-package { type string; description "Packages used to initiate the operation"; } leaf-list input-operation-id { type uint32; description "Operation IDs used to initiate operation"; } } // container operation-start-details container internal-prepare { leaf operation-id { type uint32; description "ID of prepare operation"; } leaf complete { type boolean; description "True if prepare phase complete"; } leaf current-stage { type stage-type; description "Current stage of prepare operation, if a stage is in progress"; } leaf-list host-package { type string; description "Host packages to be used in the ISSU"; } leaf-list calvados-package { type string; description "Calvados packages to be used in the ISSU"; } container prepare-stage-history { uses stage-history-type; } // container prepare-stage-history } // container internal-prepare container internal-activate { leaf operation-id { type uint32; description "ID of prepare operation"; } leaf complete { type boolean; description "True if activate phase complete"; } leaf current-stage { type stage-type; description "Current stage of activate operation, if a stage is in progress"; } leaf current-phase { type phase-type; description "Current phase of activate operation, if phase is relevant"; } leaf host-prepared { type boolean; description "Indicates whether any host packages have been prepared"; } leaf calvados-prepared { type boolean; description "Indicates whether any Calvados packages have been prepared"; } leaf-list host-node { type string; description "Nodes participating in host ISSU"; } leaf-list calvados-phase-one-node { type string; description "Nodes participating in phase one of Calvados ISSU"; } leaf-list calvados-phase-two-node { type string; description "Nodes participating in phase two of Calvados ISSU"; } container activate-stage-history { uses stage-history-type; } // container activate-stage-history } // container internal-activate container error { leaf operation-status { type string; description "Overall status of the operation"; } leaf failure-operation { type op-request-type; description "Operation in progress when first error was encountered"; } leaf failure-external-stage { type stage-type; description "Stage being undertaken when first failure was encountered"; } leaf failure-internal-stage-details { type string; description "Description of the internal state when first error encountered"; } leaf error-details { type string; description "String describing error encountered"; } leaf-list failed-node { type string; description "Nodes on which a failure occurred"; } leaf-list failed-package { type string; description "Packages which caused a failure"; } leaf-list failed-operation-id { type uint32; description "Operation IDs which caused a failure"; } leaf-list failed-client { type string; description "Registered features which caused a failure"; } leaf recovery-attempted { type boolean; description "True if a recovery has been attempted or is currently in progress"; } leaf recovery-status { type string; description "Status of the recovery operation"; } } // container error } // container orchestrator container agents { description "Agent module internal state"; container requests { description "Data on requests being processed by Agent module"; list request { key "request-index"; leaf request-index { type uint32; description "Integer request index"; } leaf request-type { type enumeration { enum "requests-node-ready" { value 0; description "Node ready request"; } enum "requests-checkpoint" { value 1; description "Checkpoint request"; } enum "requests-post-upgrade-cleanup" { value 2; description "Post-upgrade cleanup request"; } } description "Type of request"; } choice contents { case node-ready; container checkpoint { leaf message-type { type enumeration { enum "requests-checkpoint-start" { value 0; description "Start request"; } enum "requests-checkpoint-end" { value 1; description "End request"; } enum "requests-checkpoint-update" { value 2; description "Update request"; } } description "Checkpoint request type"; } leaf data-length { type uint32; description "Length of checkpoint data. 0 for start/end requests"; } leaf filename { type string; description "Filename of associated checkpoint file"; } } // container checkpoint case post-upgrade-cleanup; } // choice contents leaf requests-sent { type uint32; description "Number of requests sent. Equal to number of expected responses"; } leaf responses-received { type uint32; description "Number of responses received from agents"; } container agents { list agent { key "agent-index"; leaf agent-index { type uint32; description "Integer agent index"; } leaf node { type string; description "Node ID"; } leaf waiting-for-response { type boolean; description "Indicates whether this agent has responded"; } container response-contents { leaf agent-status { type enumeration { enum "agent-response-ok" { value 0; description "Node is ready/operation successful"; } enum "agent-response-error" { value 1; description "Otherwise undefined error"; } enum "agent-response-timeout" { value 2; description "Timeout during request"; } enum "agent-response-send-failure" { value 3; description "Failed to send request"; } } description "Enum indicating node status"; } leaf error-details { type string; description "Further details of error occuring"; } } // container response-contents } // list agent } // container agents } // list request } // container requests container inventory { description "Inventory of agents held by Agent module"; list agent { key "agent-index"; leaf agent-index { type uint32; description "Integer agent index"; } leaf agent-node { type string; description "Agent node ID"; } leaf reloaded { type boolean; description "True if node has been reloaded. False otherwise"; } } // list agent } // container inventory container reload-tracking { description "Reload tracking performed by Agent module"; leaf in-progress { type boolean; description "True if reload tracking in progress"; } leaf remaining-nodes-count { type uint32; description "Number of nodes which have not yet reloaded"; } list node { key "node-index"; leaf node-index { type uint32; description "Integer node index"; } leaf id { type string; description "Node ID"; } leaf reloaded { type boolean; description "True if node has been reloaded. False otherwise"; } } // list node } // container reload-tracking } // container agents container inventory-monitor { description "Inventory monitor module internal state"; container inventory { description "Inventory of nodes in the system held by ISSU Director"; list node { key "node"; description "The tree of nodes within the Inventory monitor module, keyed by node ID"; leaf node { type string; description "Node ID"; } leaf ip { type string; description "Node IP address"; } } // list node } // container inventory } // container inventory-monitor } // container internals } // container issu } // module Cisco-IOS-XR-sysadmin-issu
© 2023 YumaWorks, Inc. All rights reserved.