Version: 2018-04-09
module Cisco-IOS-XR-sysadmin-sdm-diag { yang-version 1; namespace "http://cisco.com/calvados/diagnostics"; prefix diagnostics_actions; import tailf-common { prefix tailf; } organization "Cisco Systems Inc."; revision "2018-04-09" { description "Required changes for ConfD 6.4.5"; } revision "2017-03-21" { description "Added completion point to location and testid Suppressed the range using cli-suppress-range"; } revision "2012-08-03" { description "output string formatting using cli"; } typedef Location { type string { tailf:info "WORD ;; Fully qualified location specification"; } } typedef Test { type string { tailf:info "Test Name or ALL ;; Enter Name of the test / Select all tests"; } description "Enter the test Name"; } typedef Individual_test { type string { tailf:info "Test Name ;; Enter Name of the test"; } description "Enter the test Name"; } typedef Type_int32 { type int32 { tailf:info "Enter The value "; } description "Enter the value "; } typedef Hour_Minute { type string { tailf:info "00:00 to 23:59 ;; Enter the hour and minute in hh:mm format"; pattern "([01]?[0-9]|2[0-3]):[0-5][0-9]"; } } container diagnostic { tailf:info "Online diagnostic commands"; container monitor { tailf:info "Configure diagnostic monitoring tests"; container rejected { tailf:validate "diag_validate" { tailf:dependency "."; } tailf:cli-drop-node-name; list location { tailf:info "Select location"; tailf:cli-no-key-completion; key "loc"; leaf loc { tailf:cli-completion-actionpoint "location-complete"; tailf:cli-suppress-range; type Location; } list test { tailf:info "Select a test name"; tailf:cli-no-key-completion; tailf:cli-suppress-mode; key "test_id run"; leaf test_id { tailf:cli-completion-actionpoint "test_name-complete"; tailf:cli-suppress-range; type Individual_test; } leaf run { tailf:info "Set Disable of the test"; tailf:cli-drop-node-name; tailf:cli-suppress-range; type enumeration { enum "disable" { value 1; } } } } // list test } // list location } // container rejected container interval { tailf:validate "diag_validate" { tailf:dependency "."; } tailf:info "Configure diagnostic monitoring tests interval"; list location { tailf:info "Select location"; tailf:cli-no-key-completion; key "loc"; leaf loc { tailf:cli-suppress-range; tailf:cli-completion-actionpoint "location-complete"; type Location; } list test { tailf:info "Select a test name"; tailf:cli-no-key-completion; tailf:cli-full-no; key "test_id"; leaf test_id { tailf:cli-suppress-range; tailf:cli-completion-actionpoint "test_name-complete"; type Individual_test; } leaf days { tailf:info "Enter number of days 0 to 20"; tailf:validate "validate_interval" { tailf:dependency "."; } type int32 { tailf:info "0 to 20 ;; Number of days"; range "0..20"; } mandatory true; } leaf time { tailf:validate "validate_interval" { tailf:dependency "."; } tailf:info "Time information in hh:mm:ss format. Ex. For 5 seconds, [00:00:05]"; type string { tailf:info "00:00:00 to 23:59:59 ;; Time information in hh:mm:ss format. Ex. For 5 second, [00:00:05]"; pattern "([01]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]"; } mandatory true; } } // list test } // list location } // container interval container threshold { tailf:validate "diag_validate" { tailf:dependency "."; } tailf:info "Configure diagnostic monitoring failure threshold"; list location { tailf:info "Select location"; tailf:cli-no-key-completion; key "loc"; leaf loc { tailf:cli-completion-actionpoint "location-complete"; tailf:cli-suppress-range; type Location; } list test { tailf:info "Select a test name"; tailf:cli-no-key-completion; key "test_id"; leaf test_id { tailf:cli-suppress-range; tailf:cli-completion-actionpoint "test_name-complete"; type Individual_test; } leaf failure-count { tailf:info "Setting failure threshold count"; type int32 { tailf:info "1 to 99 ;; Enter the Threshold "; range "1..99"; } mandatory true; } } // list test } // list location } // container threshold } // container monitor container schedule { tailf:info "Configure diagnostic schedule for a card"; container start { tailf:validate "diag_validate" { tailf:dependency "."; } list location { tailf:info "Select location"; tailf:cli-no-key-completion; key "loc"; leaf loc { tailf:cli-completion-actionpoint "location-complete"; tailf:cli-suppress-range; type Location; } list test { tailf:info "Select a test name"; tailf:cli-no-key-completion; key "test_id"; leaf test_id { tailf:cli-suppress-range; tailf:cli-completion-actionpoint "test_name-complete"; type Individual_test; } list daily { tailf:info "Daily schedule"; tailf:cli-no-key-completion; key "hour_min"; leaf hour_min { tailf:cli-suppress-range; type Hour_Minute; } } // list daily list on { tailf:info "Absolute schedule"; tailf:cli-no-key-completion; tailf:cli-suppress-key-sort; tailf:validate "validate_date" { tailf:dependency "."; } key "month day_of_month year hour_min"; leaf month { tailf:cli-suppress-range; tailf:info "Enter the month to start the test"; type enumeration { enum "JAN" { value 0; } enum "FEB" { value 1; } enum "MAR" { value 2; } enum "APR" { value 3; } enum "MAY" { value 4; } enum "JUN" { value 5; } enum "JUL" { value 6; } enum "AUG" { value 7; } enum "SEP" { value 8; } enum "OCT" { value 9; } enum "NOV" { value 10; } enum "DEC" { value 11; } } } leaf day_of_month { tailf:cli-suppress-range; type int32 { tailf:info "1 - 31 ;; Enter date in the month to start the test "; range "1..31"; } } leaf year { tailf:cli-suppress-range; type int32 { tailf:info "2013 - 2099 ;; Enter year"; range "2013..2099"; } } leaf hour_min { tailf:cli-suppress-range; type Hour_Minute; } } // list on list weekly { tailf:info "Weekly schedule"; tailf:cli-suppress-key-sort; tailf:cli-no-key-completion; key "daysofweek hour_min"; leaf daysofweek { tailf:cli-suppress-range; tailf:info "Enter the day in the week"; type enumeration { enum "SUN" { value 0; } enum "MON" { value 1; } enum "TUE" { value 2; } enum "WED" { value 3; } enum "THR" { value 4; } enum "FRI" { value 5; } enum "SAT" { value 6; } } } leaf hour_min { tailf:cli-suppress-range; type Hour_Minute; } } // list weekly } // list test } // list location } // container start } // container schedule container status { tailf:callpoint "diag_status"; tailf:info "show diagnostic status"; config false; list location_index { tailf:info "to populate the location index"; tailf:cli-suppress-table; tailf:cli-show-template-enter ""; tailf:cli-show-template " $(description|ljust:11) $(curr_running_tst_runby) --------------------------------------------------------------------------- "; tailf:cli-show-template-legend " <BU> - Bootup Diagnostics, <HM> - Health Monitoring Diagnostics, <OD> - OnDemand Diagnostics, <SCHD> - Scheduled Diagnostics =========================================================================== Location Current Running Test Status Run by ---------------------------------------------------------------------------"; key "data_idx"; leaf data_idx { type int32; } leaf description { tailf:hidden "internal"; type string; } leaf curr_running_tst_runby { tailf:hidden "internal"; type string; } } // list location_index } // container status container diag_start { tailf:cli-drop-node-name; tailf:hidden "internal-command"; tailf:callpoint "diag_ondemand_cli_cp"; tailf:info "Show diagnostic start"; config false; list location { key "loc"; leaf loc { type Location; } leaf description { type string; default "port."; } list test { tailf:action "start" { tailf:actionpoint "diagnostic_start"; tailf:info "Diagnostic Start command"; input; output { leaf "response_str" { type "string"; tailf:cli-drop-node-name; } } } key "test_type"; leaf test_type { type Test; } leaf description { type string; default "Test."; } } // list test } // list location } // container diag_start container diag_stop { tailf:cli-drop-node-name; tailf:hidden "internal-command"; tailf:callpoint "diag_ondemand_cli_cp"; tailf:info "Show diagnostic stop"; config false; list location { key "loc"; leaf loc { type Location; } leaf description { type string; default "port."; } list test { tailf:action "stop" { tailf:actionpoint "diagnostic_stop"; tailf:info "Diagnostic Stop command"; input; } key "test_type"; leaf test_type { type Test; } leaf description { type string; default "Test."; } } // list test } // list location } // container diag_stop container content { tailf:callpoint "show_diag_content"; tailf:info "show diagnostic content"; tailf:hidden "internal-command"; config false; list location { key "loc"; leaf loc { type Location; } leaf description { type string; default "port."; } list data_list { tailf:cli-suppress-table; tailf:cli-show-template-enter ""; tailf:cli-show-template " $(id|ljust:4) $(test_name|ljust:34) $(attribute|ljust:12) $(timeinfo|ljust:17) $(threshold|ljust) "; tailf:cli-show-template-legend " Diagnostics test suite attributes: M/C/* - Minimal bootup level test / Complete bootup level test / NA B/* - Basic ondemand test / NA P/V/* - Per port test / Per device test / NA D/N/* - Disruptive test / Non-disruptive test / NA S/* - Only applicable to standby unit / NA X/* - Not a health monitoring test / NA F/* - Fixed monitoring interval test / NA E/* - Always enabled monitoring test / NA A/I - Monitoring is active / Monitoring is inactive Test Interval thre- ID Test Name Attributes (day hh:mm:ss) shold ==== ================================== ============ ================= ===== "; key "data_idx"; leaf data_idx { type int32; } leaf id { tailf:hidden "internal"; type int32; description "To display the test information"; } leaf test_name { tailf:hidden "internal"; type string; } leaf attribute { tailf:hidden "internal"; type string; } leaf timeinfo { tailf:hidden "internal"; type string; } leaf threshold { tailf:hidden "internal"; type int32; } } // list data_list } // list location } // container content container result { tailf:callpoint "show_diag_result"; tailf:info "show diagnostic result"; tailf:hidden "internal-command"; config false; list location { tailf:cli-show-template-enter " Diag Information For : "; tailf:cli-no-key-completion; tailf:cli-no-match-completion; key "loc"; leaf loc { type Location; } leaf description { type string; default "port."; } list test { key "test_type"; leaf test_type { type Test; description "test name|all"; } leaf description { type string; default "port."; } list detail { tailf:cli-drop-node-name; key "det"; leaf det { type string; } list data_list { tailf:cli-suppress-table; tailf:cli-show-template-enter ""; tailf:cli-show-template "$(sl_no)) $(test_name) -------> $(test_result)$(detail_flag==1? Error code ------------------> $(err_code) $(err_description) Test type -------------------> $(test_type) HM test count ---------------> $(hm_test_count) ONDEMAND test count ---------> $(od_test_count) SCHED test count ------------> $(sched_test_count) Total run count -------------> $(run_cnt) Last test execution time ----> $(lt_exe_time)First test failure time -----> $(ft_fail_time)Last test failure time ------> $(lt_fail_time)Last test pass time ---------> $(lt_pass_time)Total failure count ---------> $(total_fail_cnt) Consecutive failure count ---> $(cons_fail_cnt) Additional information ------> $(more_info) ___________________________________________________________________________) "; tailf:cli-show-template-legend " Test results: (P = Pass, F = Fail, U = Untested, T = Timedout, A = Aborted, S = Stopped) ___________________________________________________________________________ "; key "data_idx"; leaf data_idx { type int32; } leaf detail_flag { tailf:hidden "internal"; type int32; } leaf sl_no { tailf:hidden "internal"; type int32; } leaf test_name { tailf:hidden "internal"; type string; } leaf test_result { tailf:hidden "internal"; type string; } leaf err_code { tailf:hidden "internal"; type int32; } leaf err_description { tailf:hidden "internal"; type string; } leaf test_type { tailf:hidden "internal"; type string; } leaf hm_test_count { tailf:hidden "internal"; type int32; } leaf od_test_count { tailf:hidden "internal"; type int32; } leaf sched_test_count { tailf:hidden "internal"; type int32; } leaf run_cnt { tailf:hidden "internal"; type int32; } leaf lt_exe_time { tailf:hidden "internal"; type string; } leaf ft_fail_time { tailf:hidden "internal"; type string; } leaf lt_fail_time { tailf:hidden "internal"; type string; } leaf lt_pass_time { tailf:hidden "internal"; type string; } leaf total_fail_cnt { tailf:hidden "internal"; type int32; } leaf cons_fail_cnt { tailf:hidden "internal"; type int32; } leaf more_info { tailf:hidden "internal"; type string; } } // list data_list } // list detail } // list test } // list location } // container result } // container diagnostic } // module Cisco-IOS-XR-sysadmin-sdm-diag
© 2023 YumaWorks, Inc. All rights reserved.