diff --git a/templates/cisco_nxos_show_license_usage.textfsm b/templates/cisco_nxos_show_license_usage.textfsm new file mode 100644 index 0000000000..5507da711a --- /dev/null +++ b/templates/cisco_nxos_show_license_usage.textfsm @@ -0,0 +1,18 @@ +Value FEATURE (\S+) +Value INSTALLED (Yes|No) +Value LICENSE_COUNT (\d+|-) +Value STATUS (Unused|In\s+use) +Value EXPIRY_DATE (\S+|\s*?) +Value COMMENTS (.+) + +Start + ^Feature\s+Ins\s+Lic\s+Status\s+Expiry\s+Date\s+Comments -> Begin + ^\s*$$ + ^. -> Error + +Begin + ^\s+Count + ^${FEATURE}\s+${INSTALLED}\s+${LICENSE_COUNT}\s+${STATUS}\s+?${EXPIRY_DATE}\s+${COMMENTS}\s*$$ -> Record + ^-+\s*$$ + ^\s*$$ + ^. -> Error diff --git a/templates/index b/templates/index index 2417fb92e1..931977e752 100644 --- a/templates/index +++ b/templates/index @@ -260,6 +260,7 @@ cisco_nxos_show_ip_bgp_summary.textfsm, .*, cisco_nxos, sh[[ow]] ip b[[gp]] s[[u cisco_nxos_show_lldp_neighbors.textfsm, .*, cisco_nxos, sh[[ow]] ll[[dp]] nei[[ghbors]] cisco_nxos_show_cdp_neighbors.textfsm, .*, cisco_nxos, sh[[ow]] cd[[p]] neig[[hbors]] cisco_nxos_show_ip_arp_detail.textfsm, .*, cisco_nxos, sh[[ow]] i[[p]] a[[rp]] det[[ail]] +cisco_nxos_show_license_usage.textfsm, .*, cisco_nxos, sh[[ow]] lic[[ense]] us[[age]] cisco_nxos_show_processes_cpu.textfsm, .*, cisco_nxos, sh[[ow]] proc[[esses]] c[[pu]] cisco_nxos_show_vrf_interface.textfsm, .*, cisco_nxos, sh[[ow]] vrf int[[erface]] cisco_nxos_show_access-lists.textfsm, .*, cisco_nxos, sh[[ow]] acc[[ess-lists]] diff --git a/tests/cisco_nxos/show_license_usage/cisco_nxos_show_license_usage.raw b/tests/cisco_nxos/show_license_usage/cisco_nxos_show_license_usage.raw new file mode 100644 index 0000000000..8a3f6cfb17 --- /dev/null +++ b/tests/cisco_nxos/show_license_usage/cisco_nxos_show_license_usage.raw @@ -0,0 +1,16 @@ + +Feature Ins Lic Status Expiry Date Comments + Count +-------------------------------------------------------------------------------- +MPLS_PKG No - Unused Grace 10D 1H +STORAGE-ENT No - Unused Grace 20D 6H +VDC_LICENSES No 0 Unused - +ENTERPRISE_PKG No - Unused - +FCOE-N7K-F132XP No 0 Unused - +FCOE-N7K-F248XP No 0 Unused - +ENHANCED_LAYER2_PKG No - Unused Grace 20D 6H +SCALABLE_SERVICES_PKG No - Unused - +TRANSPORT_SERVICES_PKG Yes - Unused Never - +LAN_ADVANCED_SERVICES_PKG Yes - Unused Never - +LAN_ENTERPRISE_SERVICES_PKG Yes - In use Never - +-------------------------------------------------------------------------------- diff --git a/tests/cisco_nxos/show_license_usage/cisco_nxos_show_license_usage.yml b/tests/cisco_nxos/show_license_usage/cisco_nxos_show_license_usage.yml new file mode 100644 index 0000000000..110c7b6a70 --- /dev/null +++ b/tests/cisco_nxos/show_license_usage/cisco_nxos_show_license_usage.yml @@ -0,0 +1,68 @@ +--- +parsed_sample: + - feature: "MPLS_PKG" + installed: "No" + license_count: "-" + status: "Unused" + expiry_date: "" + comments: "Grace 10D 1H" + - feature: "STORAGE-ENT" + installed: "No" + license_count: "-" + status: "Unused" + expiry_date: "" + comments: "Grace 20D 6H" + - feature: "VDC_LICENSES" + installed: "No" + license_count: "0" + status: "Unused" + expiry_date: "" + comments: "-" + - feature: "ENTERPRISE_PKG" + installed: "No" + license_count: "-" + status: "Unused" + expiry_date: "" + comments: "-" + - feature: "FCOE-N7K-F132XP" + installed: "No" + license_count: "0" + status: "Unused" + expiry_date: "" + comments: "-" + - feature: "FCOE-N7K-F248XP" + installed: "No" + license_count: "0" + status: "Unused" + expiry_date: "" + comments: "-" + - feature: "ENHANCED_LAYER2_PKG" + installed: "No" + license_count: "-" + status: "Unused" + expiry_date: "" + comments: "Grace 20D 6H" + - feature: "SCALABLE_SERVICES_PKG" + installed: "No" + license_count: "-" + status: "Unused" + expiry_date: "" + comments: "-" + - feature: "TRANSPORT_SERVICES_PKG" + installed: "Yes" + license_count: "-" + status: "Unused" + expiry_date: "Never" + comments: "-" + - feature: "LAN_ADVANCED_SERVICES_PKG" + installed: "Yes" + license_count: "-" + status: "Unused" + expiry_date: "Never" + comments: "-" + - feature: "LAN_ENTERPRISE_SERVICES_PKG" + installed: "Yes" + license_count: "-" + status: "In use" + expiry_date: "Never" + comments: "-"