From a1615cfbcf26baee2cf9e1fa2737a79a90a8cdcb Mon Sep 17 00:00:00 2001 From: root Date: Sun, 28 Feb 2021 19:25:00 +0000 Subject: [PATCH] New Cisco MS --- CISCO/ISR/Common/.meta_hostname.xml | 39 ++++++++ .../Common/.meta_lldp_neighbour_details.xml | 43 +++++++++ CISCO/ISR/Common/.meta_lldp_neighbours.xml | 43 +++++++++ CISCO/ISR/Common/.meta_pbr_interface.xml | 39 ++++++++ CISCO/ISR/Common/.meta_pbr_maps.xml | 39 ++++++++ CISCO/ISR/Common/.meta_std_acl.xml | 39 ++++++++ CISCO/ISR/Common/hostname.xml | 47 ++++++++++ CISCO/ISR/Common/lldp_neighbour_details.xml | 75 +++++++++++++++ CISCO/ISR/Common/lldp_neighbours.xml | 54 +++++++++++ CISCO/ISR/Common/pbr_interface.xml | 88 +++++++++++++++++ CISCO/ISR/Common/pbr_maps.xml | 78 +++++++++++++++ CISCO/ISR/Common/std_acl.xml | 80 ++++++++++++++++ CISCO/ISR/OSPF/.meta_ospfv2_configuration.xml | 43 +++++++++ CISCO/ISR/OSPF/.meta_ospfv2_general.xml | 39 ++++++++ CISCO/ISR/OSPF/.meta_ospfv2_lsdb_lsa_1.xml | 39 ++++++++ CISCO/ISR/OSPF/ospfv2_configuration.xml | 78 +++++++++++++++ CISCO/ISR/OSPF/ospfv2_general.xml | 62 ++++++++++++ CISCO/ISR/OSPF/ospfv2_lsdb_lsa_1.xml | 94 +++++++++++++++++++ 18 files changed, 1019 insertions(+) create mode 100755 CISCO/ISR/Common/.meta_hostname.xml create mode 100755 CISCO/ISR/Common/.meta_lldp_neighbour_details.xml create mode 100755 CISCO/ISR/Common/.meta_lldp_neighbours.xml create mode 100755 CISCO/ISR/Common/.meta_pbr_interface.xml create mode 100755 CISCO/ISR/Common/.meta_pbr_maps.xml create mode 100755 CISCO/ISR/Common/.meta_std_acl.xml create mode 100644 CISCO/ISR/Common/hostname.xml create mode 100644 CISCO/ISR/Common/lldp_neighbour_details.xml create mode 100644 CISCO/ISR/Common/lldp_neighbours.xml create mode 100755 CISCO/ISR/Common/pbr_interface.xml create mode 100644 CISCO/ISR/Common/pbr_maps.xml create mode 100644 CISCO/ISR/Common/std_acl.xml create mode 100755 CISCO/ISR/OSPF/.meta_ospfv2_configuration.xml create mode 100755 CISCO/ISR/OSPF/.meta_ospfv2_general.xml create mode 100755 CISCO/ISR/OSPF/.meta_ospfv2_lsdb_lsa_1.xml create mode 100644 CISCO/ISR/OSPF/ospfv2_configuration.xml create mode 100644 CISCO/ISR/OSPF/ospfv2_general.xml create mode 100644 CISCO/ISR/OSPF/ospfv2_lsdb_lsa_1.xml diff --git a/CISCO/ISR/Common/.meta_hostname.xml b/CISCO/ISR/Common/.meta_hostname.xml new file mode 100755 index 00000000..38e035fd --- /dev/null +++ b/CISCO/ISR/Common/.meta_hostname.xml @@ -0,0 +1,39 @@ + + + + + DATE_MODIFICATION + 1608628888949 + + + REPOSITORY + CommandDefinition + + + DATE_CREATION + 1608628888945 + + + MODEL + 113 + + + TAG + + + FILE_TYPE + text + + + MANUFACTURER + 1 + + + TYPE + FILE + + + COMMENT + + + diff --git a/CISCO/ISR/Common/.meta_lldp_neighbour_details.xml b/CISCO/ISR/Common/.meta_lldp_neighbour_details.xml new file mode 100755 index 00000000..0260c23f --- /dev/null +++ b/CISCO/ISR/Common/.meta_lldp_neighbour_details.xml @@ -0,0 +1,43 @@ + + + + + DISPLAYNAME + lldp_neighbour_details.xml + + + DATE_MODIFICATION + 1614279678951 + + + REPOSITORY + CommandDefinition + + + DATE_CREATION + 1614279678945 + + + MODEL + 113 + + + TAG + + + FILE_TYPE + text + + + MANUFACTURER + 1 + + + TYPE + FILE + + + COMMENT + + + diff --git a/CISCO/ISR/Common/.meta_lldp_neighbours.xml b/CISCO/ISR/Common/.meta_lldp_neighbours.xml new file mode 100755 index 00000000..82d67c04 --- /dev/null +++ b/CISCO/ISR/Common/.meta_lldp_neighbours.xml @@ -0,0 +1,43 @@ + + + + + DISPLAYNAME + lldp_neighbours.xml + + + DATE_MODIFICATION + 1614197846889 + + + REPOSITORY + CommandDefinition + + + DATE_CREATION + 1614197846883 + + + MODEL + 113 + + + TAG + + + FILE_TYPE + text + + + MANUFACTURER + 1 + + + TYPE + FILE + + + COMMENT + + + diff --git a/CISCO/ISR/Common/.meta_pbr_interface.xml b/CISCO/ISR/Common/.meta_pbr_interface.xml new file mode 100755 index 00000000..4ad15101 --- /dev/null +++ b/CISCO/ISR/Common/.meta_pbr_interface.xml @@ -0,0 +1,39 @@ + + + + + DATE_MODIFICATION + 1608558061605 + + + REPOSITORY + CommandDefinition + + + DATE_CREATION + 1608558061599 + + + MODEL + 113 + + + TAG + + + FILE_TYPE + text + + + MANUFACTURER + 1 + + + TYPE + FILE + + + COMMENT + + + diff --git a/CISCO/ISR/Common/.meta_pbr_maps.xml b/CISCO/ISR/Common/.meta_pbr_maps.xml new file mode 100755 index 00000000..c96817e1 --- /dev/null +++ b/CISCO/ISR/Common/.meta_pbr_maps.xml @@ -0,0 +1,39 @@ + + + + + DATE_MODIFICATION + 1608620567279 + + + REPOSITORY + CommandDefinition + + + DATE_CREATION + 1608620567266 + + + MODEL + 113 + + + TAG + + + FILE_TYPE + text + + + MANUFACTURER + 1 + + + TYPE + FILE + + + COMMENT + + + diff --git a/CISCO/ISR/Common/.meta_std_acl.xml b/CISCO/ISR/Common/.meta_std_acl.xml new file mode 100755 index 00000000..d5da25da --- /dev/null +++ b/CISCO/ISR/Common/.meta_std_acl.xml @@ -0,0 +1,39 @@ + + + + + DATE_MODIFICATION + 1608622831794 + + + REPOSITORY + CommandDefinition + + + DATE_CREATION + 1608622831782 + + + MODEL + 113 + + + TAG + + + FILE_TYPE + text + + + MANUFACTURER + 1 + + + TYPE + FILE + + + COMMENT + + + diff --git a/CISCO/ISR/Common/hostname.xml b/CISCO/ISR/Common/hostname.xml new file mode 100644 index 00000000..64bd0505 --- /dev/null +++ b/CISCO/ISR/Common/hostname.xml @@ -0,0 +1,47 @@ + + + none + + object_id + + 0 + 5 + cli + + + false + false + false + 0 + + Hostname + Default + false + 0 + false + false + false + false + param._order + + + + + + + show running-config | include hostname + +
+ @^hostname\s+?(?<object_id>\S+?)$@ + +
+ +
+
+ + + + + + +
diff --git a/CISCO/ISR/Common/lldp_neighbour_details.xml b/CISCO/ISR/Common/lldp_neighbour_details.xml new file mode 100644 index 00000000..01173d38 --- /dev/null +++ b/CISCO/ISR/Common/lldp_neighbour_details.xml @@ -0,0 +1,75 @@ + + + none + + object_id + + 0 + 5 + cli + + + false + false + false + 0 + + LLDP Neighbour details + Default + false + 0 + false + false + false + false + param._order + + + + + + + + + + + show lldp neighbors detail + {foreach from=$lldp_neighbours item=$neighbour_object} +{if $neighbour_object.neigh_port_id == $params.port_id} +{assign_object_variable var="local_interface" value = $neighbour_object.local_interface} +{/if} +{/foreach} + +
+ @^Chassis\s+?id:\s+?(?<object_id>\S+?)$@ + +
+ + + + @^Port\s+?id:\s+?(?<port_id>\S+?)$@ + + + + + @^Port\s+?Description:\s+?(?<port_name>\S+?)$@ + + + + + @^System\s+?Name:\s+?(?<system_name>\S+?)$@ + + + + @^[ a-zA-Z0-9].+$@ + + +
+
+ + + + + + +
diff --git a/CISCO/ISR/Common/lldp_neighbours.xml b/CISCO/ISR/Common/lldp_neighbours.xml new file mode 100644 index 00000000..4621d086 --- /dev/null +++ b/CISCO/ISR/Common/lldp_neighbours.xml @@ -0,0 +1,54 @@ + + + none + + object_id + + 0 + 5 + cli + + + false + false + false + 0 + + LLDP Neighbours + Default + false + 0 + false + false + false + false + param._order + + + + + + + + + + show lldp neighbors + {assign var="temp_var" value=$params.object_id|strip} +{assign var="temp_list" value=' '|explode:$temp_var} +{assign_object_variable var="neigh_name" value = $temp_list[0]} +{assign_object_variable var="local_interface" value = $temp_list[1]} + +
+ @^(?<object_id>\S+?\s+?\S+?)\s+?\d+?\s.+?\s(?<neigh_port_id>[a-f0-9]{4}(\.[a-f0-9]{4}){2})$@ + +
+ +
+
+ + + + + + +
diff --git a/CISCO/ISR/Common/pbr_interface.xml b/CISCO/ISR/Common/pbr_interface.xml new file mode 100755 index 00000000..3e9e86d5 --- /dev/null +++ b/CISCO/ISR/Common/pbr_interface.xml @@ -0,0 +1,88 @@ + + + /images/repository/CommandDefinition/icons/svx.jpg + Interfaces + object_id + + 100 + 5 + cli + + + false + false + false + 0 + + Policy Based Routing Interfaces + VRF + false + 1 + false + true + true + true + params._order + + + + + + Address + + + + + Address + + + + + vrf + + + + + + + + show running-config all + +
+ @^interface\s+(?<object_id>\S+[0-9]+)\s*$@ + +
+ + + + @^\sip\s+address\s+(?<address>[0-9.]+)\s+(?<mask>[0-9.]+)\s*$@ + + + + + @^\s*?ip\s+?policy\s+?route-map\s+?(?<pbr>\S+?)$@ + + + + @^[^!].+?$@ + + +
+
+ + interface {$params.object_id} +{if !empty($params.vrf)} +ip vrf forwarding {$params.vrf} +{else} +no ip vrf forwarding +{/if} +{if !empty($params.address) && !empty($params.mask)} +ip address {$params.address} {$params.mask} +{/if} + + + + + + +
diff --git a/CISCO/ISR/Common/pbr_maps.xml b/CISCO/ISR/Common/pbr_maps.xml new file mode 100644 index 00000000..9bc13154 --- /dev/null +++ b/CISCO/ISR/Common/pbr_maps.xml @@ -0,0 +1,78 @@ + + + none + + object_id + + 0 + 0 + cli + + + false + false + false + 0 + + Policy Based Routing Maps + Default + false + 0 + false + false + false + false + param._order + + + + + + + + + + + + show running-config + {assign var = "_term_list" value = " "|explode:$params.object_id} +{assign_object_variable var="policy_name" value = $_term_list.0} +{assign_object_variable var="term_action" value = $_term_list.1} +{assign_object_variable var="term_name" value = $_term_list.2} + +
+ @^route-map\s+?(?<object_id>.+?)$@ + +
+ + + + @^\s*?match\s+?ip\s+?address\s+?(?<access_list>\S+?)$@ + + + + + @^\s*?set\s+?ip\s+?next-hop\s+?(?<next_hop>(\d{1,3}\.){3}\d{1,3})$@ + + + +
+
+ + no route-map {$Policy_Based_Routing_Maps.$object_id.policy_name} {$Policy_Based_Routing_Maps.$object_id.term_action} {$Policy_Based_Routing_Maps.$object_id.term_name} +route-map {$Policy_Based_Routing_Maps.$object_id.policy_name} {$params.term_action} {$Policy_Based_Routing_Maps.$object_id.term_name} +match ip address {$params.access_list} +set ip next-hop {$params.next_hop} + + + + route-map {$params.policy_name} {$params.term_action} {$params.term_name} +match ip address {$params.access_list} +set ip next-hop {$params.next_hop} + + + no route-map {$Policy_Based_Routing_Maps.$object_id.policy_name} permit {$Policy_Based_Routing_Maps.$object_id.term_name} + + + +
diff --git a/CISCO/ISR/Common/std_acl.xml b/CISCO/ISR/Common/std_acl.xml new file mode 100644 index 00000000..87d69eba --- /dev/null +++ b/CISCO/ISR/Common/std_acl.xml @@ -0,0 +1,80 @@ + + + none + + object_id + + 0 + 5 + cli + + + false + false + false + 0 + + Standard Access Control List + Default + false + 0 + false + false + false + false + param._order + + + + + + + + + + + show ip access-lists + {foreach from=$params.acl_list item=line key=num} +{if !$line.src_wildcard} +{assign_object_variable var="acl_list.$num.src_wildcard" value = "0.0.0.0"} +{/if} +{/foreach} + +
+ @^\s*?Standard\s+?IP\s+?access\s+?list\s+?(?<object_id>\S+?)$@ + +
+ + + + + @^\s+?(?<number>\d+?)\s+?(?<action>permit|deny)\s+?(?<src_address>(\d{1,3}\.){3}\d{1,3})\s*?(log)?$@ + @^\s+?(?<number>\d+?)\s+?(?<action>permit|deny)\s+?(?<src_address>(\d{1,3}\.){3}\d{1,3}),\s+?wildcard\s+?bits\s+?(?<src_wildcard>(\d{1,3}\.){3}\d{1,3})\s*?(log)?$@ + + + + + + +
+
+ + no ip access-list standard {$Standard_Access_Control_List.$object_id.object_id} +ip access-list standard {$Standard_Access_Control_List.$object_id.object_id} +{foreach from=$params.acl_list item=line} +{$line.number} {$line.action} {$line.src_address} {$line.src_wildcard} +{/foreach} + + + + ip access-list standard {$params.object_id} +{foreach from=$params.acl_list item=line} +{$line.number} {$line.action} {$line.src_address} {$line.src_wildcard} +{/foreach} + + + no ip access-list standard {$Standard_Access_Control_List.$object_id.object_id} + + + +
diff --git a/CISCO/ISR/OSPF/.meta_ospfv2_configuration.xml b/CISCO/ISR/OSPF/.meta_ospfv2_configuration.xml new file mode 100755 index 00000000..795d0957 --- /dev/null +++ b/CISCO/ISR/OSPF/.meta_ospfv2_configuration.xml @@ -0,0 +1,43 @@ + + + + + DISPLAYNAME + OSPFv2_Configuration.xml + + + DATE_MODIFICATION + 1614181547633 + + + REPOSITORY + CommandDefinition + + + DATE_CREATION + 1614181547624 + + + MODEL + 113 + + + TAG + + + FILE_TYPE + text + + + MANUFACTURER + 1 + + + TYPE + FILE + + + COMMENT + + + diff --git a/CISCO/ISR/OSPF/.meta_ospfv2_general.xml b/CISCO/ISR/OSPF/.meta_ospfv2_general.xml new file mode 100755 index 00000000..81d16b4b --- /dev/null +++ b/CISCO/ISR/OSPF/.meta_ospfv2_general.xml @@ -0,0 +1,39 @@ + + + + + DATE_MODIFICATION + 1608548030256 + + + REPOSITORY + CommandDefinition + + + DATE_CREATION + 1608548030241 + + + MODEL + 113 + + + TAG + + + FILE_TYPE + text + + + MANUFACTURER + 1 + + + TYPE + FILE + + + COMMENT + + + diff --git a/CISCO/ISR/OSPF/.meta_ospfv2_lsdb_lsa_1.xml b/CISCO/ISR/OSPF/.meta_ospfv2_lsdb_lsa_1.xml new file mode 100755 index 00000000..61357312 --- /dev/null +++ b/CISCO/ISR/OSPF/.meta_ospfv2_lsdb_lsa_1.xml @@ -0,0 +1,39 @@ + + + + + DATE_MODIFICATION + 1608660230977 + + + REPOSITORY + CommandDefinition + + + DATE_CREATION + 1608660230972 + + + MODEL + 113 + + + TAG + + + FILE_TYPE + text + + + MANUFACTURER + 1 + + + TYPE + FILE + + + COMMENT + + + diff --git a/CISCO/ISR/OSPF/ospfv2_configuration.xml b/CISCO/ISR/OSPF/ospfv2_configuration.xml new file mode 100644 index 00000000..f9360ae2 --- /dev/null +++ b/CISCO/ISR/OSPF/ospfv2_configuration.xml @@ -0,0 +1,78 @@ + + + none + + object_id + + 0 + 5 + cli + + + false + false + false + 0 + + OSPFv2 Configuration + Default + false + 0 + false + false + false + false + param._order + + + + + + + + + + show running-config | section router ospf + +
+ @^router\s+?ospf\s+?(?<object_id>\d+?)$@ + +
+ + + + + @^\s+?network\s+?(?<network_address>(\d{1,3}\.){3}\d{1,3})\s+?(?<network_mask>(\d{1,3}\.){3}\d{1,3})\s+?area\s+?(?<area>\d+?)$@ + + + + + + + @^\s.+?$@ + + +
+
+ + router ospf {$params.object_id} +{foreach $OSPFv2_Configuration.$object_id.interface item=details} +no network {$details.network_address} {$details.network_mask} area {$details.area} +{/foreach} +{foreach $params.interface item=details} +network {$details.network_address} {$details.network_mask} area {$details.area} +{/foreach} + + + + router ospf {$params.object_id} +{foreach $params.interface item=details} +network {$details.network_address} {$details.network_mask} area {$details.area} +{/foreach} + + + no router ospf {$OSPFv2_Configuration.$object_id.object_id} + + + +
diff --git a/CISCO/ISR/OSPF/ospfv2_general.xml b/CISCO/ISR/OSPF/ospfv2_general.xml new file mode 100644 index 00000000..b5e61cba --- /dev/null +++ b/CISCO/ISR/OSPF/ospfv2_general.xml @@ -0,0 +1,62 @@ + + + none + + object_id + + 0 + 5 + cli + + + false + false + false + 0 + + OSPFv2 General + Default + false + 0 + false + false + false + false + param._order + + + + + + + + + show ip ospf + +
+ @^\s*?Routing\s+?Process\s+?.ospf\s+?(?<object_id>\d+?).\s+?.+?ID\s+?(?<router_id>(\d{1,3}\.){3}\d{1,3})$@ + +
+ + + + + @^\s+?Area\s+?\S*?(?<area>\d+?)\D*?$@ + + + + + + + @^\s*?\S.+?$@ + + +
+
+ + + + + + +
diff --git a/CISCO/ISR/OSPF/ospfv2_lsdb_lsa_1.xml b/CISCO/ISR/OSPF/ospfv2_lsdb_lsa_1.xml new file mode 100644 index 00000000..f8cb08cd --- /dev/null +++ b/CISCO/ISR/OSPF/ospfv2_lsdb_lsa_1.xml @@ -0,0 +1,94 @@ + + + none + + object_id + + 0 + 0 + cli + + + false + false + false + 0 + + OSPFv2 LSDB LSA 1 + Default + false + 0 + false + false + false + false + param._order + + + + + + LSA + + + + + LSA + + + + + LSA + + + + + LSA + + + + + + + show ip ospf 100 0 database router | exclude ^$ + {foreach from=$params.lsa_array item=lsa key=num} +{if $lsa._link_type|strstr:'point-to-point'} +{assign_object_variable var="lsa_array.$num.link_type" value = "p2p"} +{elseif $lsa._link_type|strstr:'Stub'} +{assign_object_variable var="lsa_array.$num.link_type" value = "stub"} +{elseif $lsa._link_type|strstr:'Transit'} +{assign_object_variable var="lsa_array.$num.link_type" value = "transit"} +{elseif $lsa._link_type|strstr:'Virtual'} +{assign_object_variable var="lsa_array.$num.link_type" value = "virtual"} +{/if}{/foreach} + +
+ @^\s*?Link\s+?State\s+?ID:\s+?(?<object_id>(\d{1,3}\.){3}\d{1,3})$@ + +
+ + + + + @^\s+?Link\s+?connected\s+?to:(?<_link_type>.+?)$@ + @^\s+?\(Link\s+?ID\).+?(?<link_id>(\d{1,3}\.){3}\d{1,3})$@ + @^\s+?\(Link\s+?Data\).+?(?<link_data>(\d{1,3}\.){3}\d{1,3})$@ + @^.+?Metrics:\s+?(?<metric>\d+?)@ + + + + + + + @^((?!LS age).)*$@ + + +
+
+ + + + + + +