netstack 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -3
- data/{LICENSE.txt → LICENSE} +7 -6
- data/NOTICE +25 -0
- data/README.md +58 -20
- data/docs/acceptance.md +92 -0
- data/docs/backups.md +100 -0
- data/docs/configuration.md +198 -0
- data/docs/connector.md +187 -0
- data/docs/ddi.md +142 -0
- data/docs/deployment.md +47 -0
- data/docs/foundations.md +45 -0
- data/docs/implementation.md +68 -0
- data/docs/inventory.md +42 -0
- data/docs/monitoring.md +227 -0
- data/docs/motor_integration.md +96 -0
- data/docs/performance.md +39 -0
- data/docs/release.md +20 -0
- data/docs/vxlan.md +91 -0
- data/docs/wireless.md +81 -0
- data/lib/netstack/backups/artifact.rb +23 -0
- data/lib/netstack/backups/diff.rb +15 -0
- data/lib/netstack/backups/repository.rb +77 -0
- data/lib/netstack/backups/request.rb +78 -0
- data/lib/netstack/circuits/business_calendar.rb +51 -0
- data/lib/netstack/circuits/capacity_review.rb +191 -0
- data/lib/netstack/circuits/endpoint.rb +25 -0
- data/lib/netstack/circuits/monitoring_plan.rb +212 -0
- data/lib/netstack/configuration/artifact.rb +85 -0
- data/lib/netstack/configuration/artifact_resolver.rb +30 -0
- data/lib/netstack/configuration/bootstrap/payload.rb +67 -0
- data/lib/netstack/configuration/bootstrap/validator.rb +224 -0
- data/lib/netstack/configuration/catalog.rb +60 -0
- data/lib/netstack/configuration/generator.rb +87 -0
- data/lib/netstack/configuration/input_contract.rb +82 -0
- data/lib/netstack/configuration/payload.rb +168 -0
- data/lib/netstack/configuration/reader.rb +124 -0
- data/lib/netstack/configuration/support.rb +30 -0
- data/lib/netstack/configuration/system_configuration.rb +56 -0
- data/lib/netstack/configuration/template_manager.rb +174 -0
- data/lib/netstack/configuration/template_store.rb +40 -0
- data/lib/netstack/configuration/validator.rb +566 -0
- data/lib/netstack/connector/authentication.rb +77 -0
- data/lib/netstack/connector/authentication_error.rb +11 -0
- data/lib/netstack/connector/backup.rb +19 -0
- data/lib/netstack/connector/backup_busy.rb +11 -0
- data/lib/netstack/connector/backup_persistence_error.rb +32 -0
- data/lib/netstack/connector/command.rb +63 -0
- data/lib/netstack/connector/command_result.rb +24 -0
- data/lib/netstack/connector/command_timeout.rb +11 -0
- data/lib/netstack/connector/configuration.rb +138 -0
- data/lib/netstack/connector/connection_closed.rb +11 -0
- data/lib/netstack/connector/connection_error.rb +11 -0
- data/lib/netstack/connector/device.rb +284 -0
- data/lib/netstack/connector/device_error.rb +11 -0
- data/lib/netstack/connector/dialogue.rb +55 -0
- data/lib/netstack/connector/error.rb +44 -0
- data/lib/netstack/connector/error_metadata.rb +58 -0
- data/lib/netstack/connector/event.rb +24 -0
- data/lib/netstack/connector/execution.rb +110 -0
- data/lib/netstack/connector/interaction.rb +55 -0
- data/lib/netstack/connector/internal_error.rb +11 -0
- data/lib/netstack/connector/known_hosts.rb +128 -0
- data/lib/netstack/connector/local_backup.rb +63 -0
- data/lib/netstack/connector/log/event.rb +65 -0
- data/lib/netstack/connector/log/formatter.rb +18 -0
- data/lib/netstack/connector/log/messages.rb +54 -0
- data/lib/netstack/connector/log/redacting_writer.rb +33 -0
- data/lib/netstack/connector/log/transcript.rb +35 -0
- data/lib/netstack/connector/log.rb +262 -0
- data/lib/netstack/connector/log_error.rb +11 -0
- data/lib/netstack/connector/login_timeout.rb +11 -0
- data/lib/netstack/connector/output_limit_exceeded.rb +11 -0
- data/lib/netstack/connector/parsing_error.rb +11 -0
- data/lib/netstack/connector/profile/builder.rb +238 -0
- data/lib/netstack/connector/profile.rb +225 -0
- data/lib/netstack/connector/prompt_error.rb +11 -0
- data/lib/netstack/connector/recovery.rb +59 -0
- data/lib/netstack/connector/redactor.rb +100 -0
- data/lib/netstack/connector/response.rb +25 -0
- data/lib/netstack/connector/response_reader.rb +140 -0
- data/lib/netstack/connector/result.rb +50 -0
- data/lib/netstack/connector/running_config/rendered.rb +16 -0
- data/lib/netstack/connector/running_config/strategy.rb +28 -0
- data/lib/netstack/connector/running_config.rb +113 -0
- data/lib/netstack/connector/save_config.rb +23 -0
- data/lib/netstack/connector/script.rb +59 -0
- data/lib/netstack/connector/script_error.rb +11 -0
- data/lib/netstack/connector/script_output_limit_exceeded.rb +11 -0
- data/lib/netstack/connector/session.rb +414 -0
- data/lib/netstack/connector/session_busy.rb +11 -0
- data/lib/netstack/connector/storage/backup_lock.rb +117 -0
- data/lib/netstack/connector/storage/private_file.rb +111 -0
- data/lib/netstack/connector/storage/safe_file.rb +64 -0
- data/lib/netstack/connector/storage/saved_config.rb +76 -0
- data/lib/netstack/connector/terminal_renderer.rb +186 -0
- data/lib/netstack/connector/terminal_text.rb +32 -0
- data/lib/netstack/connector/textfsm.rb +71 -0
- data/lib/netstack/connector/tftp/file_upload.rb +53 -0
- data/lib/netstack/connector/tftp/strategy.rb +67 -0
- data/lib/netstack/connector/tftp.rb +116 -0
- data/lib/netstack/connector/tftp_completion_error.rb +36 -0
- data/lib/netstack/connector/tftp_receipt.rb +54 -0
- data/lib/netstack/connector/tftp_target.rb +65 -0
- data/lib/netstack/connector/topology/checkpoint_error.rb +16 -0
- data/lib/netstack/connector/topology/deployment_adapter.rb +163 -0
- data/lib/netstack/connector/topology/execution_result.rb +34 -0
- data/lib/netstack/connector/topology/immediate_strategy.rb +39 -0
- data/lib/netstack/connector/topology/interface_description.rb +46 -0
- data/lib/netstack/connector/topology/interface_name.rb +60 -0
- data/lib/netstack/connector/topology/plan.rb +105 -0
- data/lib/netstack/connector/topology/strategy.rb +76 -0
- data/lib/netstack/connector/topology.rb +255 -0
- data/lib/netstack/connector/transport_error.rb +11 -0
- data/lib/netstack/connector/transports.rb +201 -0
- data/lib/netstack/connector/underlying_error.rb +25 -0
- data/lib/netstack/connector/unsupported_operation.rb +11 -0
- data/lib/netstack/connector/vendors/cisco_ios/running_config.rb +22 -0
- data/lib/netstack/connector/vendors/cisco_ios/tftp_backup.rb +41 -0
- data/lib/netstack/connector/vendors/cisco_ios/topology.rb +54 -0
- data/lib/netstack/connector/vendors/cisco_ios.rb +44 -0
- data/lib/netstack/connector/vendors/cisco_nxos/running_config.rb +25 -0
- data/lib/netstack/connector/vendors/cisco_nxos/tftp_backup.rb +43 -0
- data/lib/netstack/connector/vendors/cisco_nxos.rb +51 -0
- data/lib/netstack/connector/vendors/h3c/tftp_backup.rb +34 -0
- data/lib/netstack/connector/vendors/h3c/topology.rb +72 -0
- data/lib/netstack/connector/vendors/h3c.rb +75 -0
- data/lib/netstack/connector/vendors/h3c_wireless.rb +13 -0
- data/lib/netstack/connector/vendors/hillstone/running_config.rb +16 -0
- data/lib/netstack/connector/vendors/hillstone/tftp_backup.rb +55 -0
- data/lib/netstack/connector/vendors/hillstone/topology.rb +64 -0
- data/lib/netstack/connector/vendors/hillstone.rb +39 -0
- data/lib/netstack/connector/vendors/huawei/tftp_backup.rb +26 -0
- data/lib/netstack/connector/vendors/huawei.rb +62 -0
- data/lib/netstack/connector/vendors/palo_alto/running_config.rb +77 -0
- data/lib/netstack/connector/vendors/palo_alto/tftp_backup.rb +49 -0
- data/lib/netstack/connector/vendors/palo_alto/topology.rb +77 -0
- data/lib/netstack/connector/vendors/palo_alto.rb +39 -0
- data/lib/netstack/connector/vendors/radware/running_config.rb +21 -0
- data/lib/netstack/connector/vendors/radware/tftp_backup.rb +49 -0
- data/lib/netstack/connector/vendors/radware/topology.rb +19 -0
- data/lib/netstack/connector/vendors/radware.rb +59 -0
- data/lib/netstack/connector/write_timeout.rb +11 -0
- data/lib/netstack/connector.rb +32 -0
- data/lib/netstack/ddi/applier.rb +107 -0
- data/lib/netstack/ddi/deployment.rb +137 -0
- data/lib/netstack/ddi/inputs.rb +61 -0
- data/lib/netstack/ddi/manager.rb +197 -0
- data/lib/netstack/ddi/plan.rb +99 -0
- data/lib/netstack/ddi/scope.rb +127 -0
- data/lib/netstack/ddi/settings.rb +44 -0
- data/lib/netstack/ddi/state.rb +166 -0
- data/lib/netstack/deployment/checkpoint_error.rb +14 -0
- data/lib/netstack/deployment/cli_adapter.rb +64 -0
- data/lib/netstack/deployment/executor.rb +131 -0
- data/lib/netstack/deployment/plan.rb +82 -0
- data/lib/netstack/deployment/receipt.rb +78 -0
- data/lib/netstack/deployment/recovery.rb +19 -0
- data/lib/netstack/deployment/step.rb +16 -0
- data/lib/netstack/dimension.rb +30 -0
- data/lib/netstack/error.rb +14 -0
- data/lib/netstack/input_error.rb +9 -0
- data/lib/netstack/integrations/bluecat/client.rb +84 -0
- data/lib/netstack/integrations/http/client.rb +146 -0
- data/lib/netstack/integrations/http/error.rb +10 -0
- data/lib/netstack/integrations/http/response.rb +28 -0
- data/lib/netstack/integrations/http_delivery/adapter.rb +51 -0
- data/lib/netstack/integrations/http_delivery/client.rb +127 -0
- data/lib/netstack/integrations/http_delivery/result.rb +27 -0
- data/lib/netstack/integrations/oxidized/client.rb +89 -0
- data/lib/netstack/integrations/zabbix/client.rb +211 -0
- data/lib/netstack/integrations/zabbix/error.rb +10 -0
- data/lib/netstack/inventory/address.rb +30 -0
- data/lib/netstack/inventory/changes.rb +13 -0
- data/lib/netstack/inventory/cli_parser.rb +75 -0
- data/lib/netstack/inventory/collector.rb +99 -0
- data/lib/netstack/inventory/device.rb +14 -0
- data/lib/netstack/inventory/interface.rb +25 -0
- data/lib/netstack/inventory/neighbor.rb +15 -0
- data/lib/netstack/inventory/reconciler.rb +74 -0
- data/lib/netstack/inventory/snapshot.rb +69 -0
- data/lib/netstack/inventory/transceiver.rb +23 -0
- data/lib/netstack/ipv4.rb +204 -0
- data/lib/netstack/ipv6.rb +88 -0
- data/lib/netstack/monitoring/applier.rb +179 -0
- data/lib/netstack/monitoring/device_plan.rb +23 -0
- data/lib/netstack/monitoring/host_plan.rb +152 -0
- data/lib/netstack/monitoring/inputs.rb +73 -0
- data/lib/netstack/monitoring/measurements.rb +89 -0
- data/lib/netstack/monitoring/mutation.rb +37 -0
- data/lib/netstack/monitoring/plan.rb +69 -0
- data/lib/netstack/monitoring/probe_plan.rb +19 -0
- data/lib/netstack/monitoring/state_comparison.rb +37 -0
- data/lib/netstack/range_set.rb +181 -0
- data/lib/netstack/routing/lookup.rb +46 -0
- data/lib/netstack/routing/lookup_result.rb +14 -0
- data/lib/netstack/routing/route.rb +32 -0
- data/lib/netstack/routing/snapshot.rb +23 -0
- data/lib/netstack/target.rb +15 -0
- data/lib/netstack/unsupported_capability.rb +9 -0
- data/lib/netstack/values.rb +70 -0
- data/lib/netstack/version.rb +1 -1
- data/lib/netstack/vxlan/auditor.rb +187 -0
- data/lib/netstack/vxlan/cisco_nxos/config_parser.rb +327 -0
- data/lib/netstack/vxlan/cisco_nxos/deployment_adapter.rb +63 -0
- data/lib/netstack/vxlan/cisco_nxos/runtime_parser.rb +182 -0
- data/lib/netstack/vxlan/cisco_nxos/segment_renderer.rb +42 -0
- data/lib/netstack/vxlan/collector.rb +77 -0
- data/lib/netstack/vxlan/fabric.rb +29 -0
- data/lib/netstack/vxlan/finding.rb +20 -0
- data/lib/netstack/vxlan/node.rb +51 -0
- data/lib/netstack/vxlan/route_policy.rb +57 -0
- data/lib/netstack/vxlan/runtime_result.rb +24 -0
- data/lib/netstack/vxlan/segment.rb +35 -0
- data/lib/netstack/vxlan/segment_plan.rb +25 -0
- data/lib/netstack/vxlan/segment_planner.rb +156 -0
- data/lib/netstack/vxlan/snapshot.rb +34 -0
- data/lib/netstack/vxlan/validation.rb +58 -0
- data/lib/netstack/vxlan/verifier.rb +52 -0
- data/lib/netstack/vxlan/vpc_domain.rb +20 -0
- data/lib/netstack/wireless/access_point.rb +12 -0
- data/lib/netstack/wireless/ap_group.rb +12 -0
- data/lib/netstack/wireless/assessment.rb +13 -0
- data/lib/netstack/wireless/assessor.rb +83 -0
- data/lib/netstack/wireless/authentication_connection.rb +12 -0
- data/lib/netstack/wireless/bss.rb +12 -0
- data/lib/netstack/wireless/client.rb +12 -0
- data/lib/netstack/wireless/collector.rb +191 -0
- data/lib/netstack/wireless/configuration.rb +13 -0
- data/lib/netstack/wireless/finding.rb +12 -0
- data/lib/netstack/wireless/h3c/config_parser.rb +229 -0
- data/lib/netstack/wireless/h3c/lldp_parser.rb +69 -0
- data/lib/netstack/wireless/h3c/runtime_parser.rb +240 -0
- data/lib/netstack/wireless/huawei/runtime_parser.rb +83 -0
- data/lib/netstack/wireless/invalid_snapshot.rb +11 -0
- data/lib/netstack/wireless/neighbor.rb +12 -0
- data/lib/netstack/wireless/normalizer.rb +90 -0
- data/lib/netstack/wireless/parse_result.rb +13 -0
- data/lib/netstack/wireless/radio.rb +12 -0
- data/lib/netstack/wireless/reconciler.rb +115 -0
- data/lib/netstack/wireless/reconciliation.rb +11 -0
- data/lib/netstack/wireless/security_policy.rb +12 -0
- data/lib/netstack/wireless/service_template.rb +12 -0
- data/lib/netstack/wireless/service_template_bindings.rb +56 -0
- data/lib/netstack/wireless/snapshot.rb +150 -0
- data/lib/netstack/wireless/state.rb +23 -0
- data/lib/netstack/wireless/view.rb +154 -0
- data/lib/netstack.rb +10 -3
- data/resources/configuration/cisco-bootstrap.erb +118 -0
- data/resources/configuration/cisco-distributed-gateway.erb +40 -0
- data/resources/configuration/cisco-n9k-vpc.erb +62 -0
- data/resources/configuration/cisco-server-port.erb +43 -0
- data/resources/configuration/h3c-bootstrap.erb +108 -0
- data/resources/configuration/h3c-irf.erb +57 -0
- data/resources/configuration/h3c-server-port.erb +36 -0
- data/resources/configuration/hillstone-ipsec-vpn.erb +68 -0
- data/resources/configuration/hillstone-policy.erb +31 -0
- data/resources/configuration/paloalto-ipsec-vpn.erb +39 -0
- data/resources/configuration/radware-load-balancer.erb +26 -0
- data/resources/textfsm/cisco_cdp_neighbors_detail.textfsm +7 -0
- data/resources/textfsm/cisco_ios_running_config_interfaces.textfsm +12 -0
- data/resources/textfsm/cisco_ios_show_ip_interface_brief.textfsm +7 -0
- data/resources/textfsm/h3c_interface_descriptions.textfsm +11 -0
- data/resources/textfsm/h3c_lldp_local_first.textfsm +8 -0
- data/resources/textfsm/h3c_lldp_name_first.textfsm +8 -0
- data/resources/textfsm/hillstone_interface_descriptions.textfsm +11 -0
- data/resources/textfsm/hillstone_lldp_neighbors.textfsm +7 -0
- data/resources/textfsm/index +8 -0
- data/resources/textfsm/palo_alto_interface_descriptions.textfsm +6 -0
- data/resources/textfsm/palo_alto_lldp_neighbors.textfsm +11 -0
- data/resources/textfsm/radware_port_names.textfsm +13 -0
- metadata +588 -27
- data/.rubocop.yml +0 -13
- data/CODE_OF_CONDUCT.md +0 -84
- data/Gemfile +0 -10
- data/Gemfile.lock +0 -40
- data/Rakefile +0 -8
- data/bin/console +0 -15
- data/bin/setup +0 -8
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
configure terminal
|
|
2
|
+
! Cisco switch ports / <%= stack_mode %>
|
|
3
|
+
! ============================================================
|
|
4
|
+
! 1. Logical port-channel interfaces
|
|
5
|
+
! ============================================================
|
|
6
|
+
<% aggregates.each do |port| %>interface port-channel<%= port.aggregate_id %>
|
|
7
|
+
description <%= port.local_description %>
|
|
8
|
+
switchport
|
|
9
|
+
mtu 9216
|
|
10
|
+
<% if port.trunk_all %> switchport mode trunk
|
|
11
|
+
spanning-tree port type edge trunk
|
|
12
|
+
<% end %><% if port.trunk_list %> switchport mode trunk
|
|
13
|
+
switchport trunk allowed vlan <%= port.vlan %>
|
|
14
|
+
spanning-tree port type edge trunk
|
|
15
|
+
<% end %><% if port.access %> switchport mode access
|
|
16
|
+
switchport access vlan <%= port.vlan %>
|
|
17
|
+
spanning-tree port type edge
|
|
18
|
+
<% end %><% if port.vpc %> vpc <%= port.aggregate_id %>
|
|
19
|
+
<% end %> no shutdown
|
|
20
|
+
<% end %>
|
|
21
|
+
! ============================================================
|
|
22
|
+
! 2. Physical member interfaces
|
|
23
|
+
! ============================================================
|
|
24
|
+
<% allocations.each do |port| %>interface <%= port.local_iface %>
|
|
25
|
+
description <%= port.local_description %>
|
|
26
|
+
switchport
|
|
27
|
+
mtu 9216
|
|
28
|
+
<% if port.trunk_all %> switchport mode trunk
|
|
29
|
+
spanning-tree port type edge trunk
|
|
30
|
+
<% end %><% if port.trunk_list %> switchport mode trunk
|
|
31
|
+
switchport trunk allowed vlan <%= port.vlan %>
|
|
32
|
+
spanning-tree port type edge trunk
|
|
33
|
+
<% end %><% if port.access %> switchport mode access
|
|
34
|
+
switchport access vlan <%= port.vlan %>
|
|
35
|
+
spanning-tree port type edge
|
|
36
|
+
<% end %><% if port.port_channel %> channel-group <%= port.aggregate_id %> mode active
|
|
37
|
+
<% end %> no shutdown
|
|
38
|
+
<% end %>
|
|
39
|
+
! ============================================================
|
|
40
|
+
! 3. Save configuration
|
|
41
|
+
! ============================================================
|
|
42
|
+
end
|
|
43
|
+
copy running-config startup-config
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# H3C bootstrap: <%= hostname %>
|
|
2
|
+
# Device role: <%= device_role %>
|
|
3
|
+
system-view
|
|
4
|
+
sysname <%= hostname %>
|
|
5
|
+
clock timezone <%= system.timezone %> add 08:00:00
|
|
6
|
+
clock protocol ntp
|
|
7
|
+
stp mode mstp
|
|
8
|
+
stp priority <%= stp_priority %>
|
|
9
|
+
dns domain <%= system.domain_name %>
|
|
10
|
+
<% system.dns_servers.each do |server| %>dns server <%= server %>
|
|
11
|
+
<% end %><% system.ntp_servers.each do |server| %>ntp-service unicast-server <%= server %>
|
|
12
|
+
<% end %><% system.syslog_servers.each do |server| %>info-center loghost <%= server %>
|
|
13
|
+
<% end %>
|
|
14
|
+
interface Vlan-interface<%= system.management_vlan %>
|
|
15
|
+
description MGMT
|
|
16
|
+
ip address <%= mgmt_ip %> <%= mgmt_mask %>
|
|
17
|
+
undo shutdown
|
|
18
|
+
quit
|
|
19
|
+
ip route-static 0.0.0.0 0 <%= mgmt_gateway %>
|
|
20
|
+
|
|
21
|
+
interface range <%= access_interface_start %> to <%= access_interface_end %>
|
|
22
|
+
port link-type trunk
|
|
23
|
+
port trunk permit vlan all
|
|
24
|
+
undo shutdown
|
|
25
|
+
quit
|
|
26
|
+
<% h3c_uplinks.each do |uplink| %>interface <%= uplink.interface %>
|
|
27
|
+
description <%= uplink.description %>
|
|
28
|
+
port link-type trunk
|
|
29
|
+
port trunk permit vlan all
|
|
30
|
+
undo shutdown
|
|
31
|
+
quit
|
|
32
|
+
<% end %>
|
|
33
|
+
|
|
34
|
+
snmp-agent
|
|
35
|
+
snmp-agent community read <%= system.snmp_community %>
|
|
36
|
+
snmp-agent sys-info location <%= snmp_location %>
|
|
37
|
+
snmp-agent sys-info version v2c
|
|
38
|
+
hwtacacs scheme TACACS
|
|
39
|
+
<% system.tacacs_entries.each do |server| %> <%= server.role %> authentication <%= server.address %>
|
|
40
|
+
<%= server.role %> authorization <%= server.address %>
|
|
41
|
+
<%= server.role %> accounting <%= server.address %>
|
|
42
|
+
<% end %> key authentication simple <%= system.tacacs_secret %>
|
|
43
|
+
key authorization simple <%= system.tacacs_secret %>
|
|
44
|
+
key accounting simple <%= system.tacacs_secret %>
|
|
45
|
+
quit
|
|
46
|
+
domain system
|
|
47
|
+
authentication login hwtacacs-scheme TACACS local
|
|
48
|
+
authorization login hwtacacs-scheme TACACS local
|
|
49
|
+
accounting login hwtacacs-scheme TACACS local
|
|
50
|
+
quit
|
|
51
|
+
<% if access_auth_enabled %>
|
|
52
|
+
# 802.1X and MAB access authentication
|
|
53
|
+
radius scheme RADIUS
|
|
54
|
+
<% system.radius_entries.each do |server| %> <%= server.role %> authentication <%= server.address %>
|
|
55
|
+
<%= server.role %> accounting <%= server.address %>
|
|
56
|
+
<% end %> key authentication simple <%= system.radius_secret %>
|
|
57
|
+
key accounting simple <%= system.radius_secret %>
|
|
58
|
+
user-name-format without-domain
|
|
59
|
+
quit
|
|
60
|
+
dot1x
|
|
61
|
+
dot1x authentication-method eap
|
|
62
|
+
mac-authentication
|
|
63
|
+
mac-authentication domain <%= access_auth_domain %>
|
|
64
|
+
mac-authentication user-name-format mac-address with-hyphen lowercase
|
|
65
|
+
domain <%= access_auth_domain %>
|
|
66
|
+
authentication lan-access radius-scheme RADIUS none
|
|
67
|
+
authorization lan-access radius-scheme RADIUS none
|
|
68
|
+
accounting lan-access radius-scheme RADIUS none
|
|
69
|
+
quit
|
|
70
|
+
interface range <%= access_auth_interface_start %> to <%= access_auth_interface_end %>
|
|
71
|
+
port link-type hybrid
|
|
72
|
+
undo port hybrid vlan 1
|
|
73
|
+
port hybrid vlan <%= access_auth_vlan %> untagged
|
|
74
|
+
port hybrid pvid vlan <%= access_auth_vlan %>
|
|
75
|
+
stp edged-port
|
|
76
|
+
dot1x
|
|
77
|
+
undo dot1x handshake
|
|
78
|
+
dot1x mandatory-domain <%= access_auth_domain %>
|
|
79
|
+
undo dot1x multicast-trigger
|
|
80
|
+
dot1x unicast-trigger
|
|
81
|
+
mac-authentication
|
|
82
|
+
mac-authentication parallel-with-dot1x
|
|
83
|
+
dhcp snooping binding record
|
|
84
|
+
quit
|
|
85
|
+
<% end %>
|
|
86
|
+
|
|
87
|
+
acl number 3001 name SSH-MANAGEMENT
|
|
88
|
+
<% system.ssh_acl_entries.each do |entry| %> rule <%= entry.sequence %> permit ip source <%= entry.wildcard %>
|
|
89
|
+
<% end %>quit
|
|
90
|
+
ssh server enable
|
|
91
|
+
ssh server acl 3001
|
|
92
|
+
line vty 0 63
|
|
93
|
+
authentication-mode scheme
|
|
94
|
+
protocol inbound ssh
|
|
95
|
+
idle-timeout <%= system.vty_timeout_minutes %> 0
|
|
96
|
+
quit
|
|
97
|
+
<% system.local_users.each do |user| %>local-user <%= user.username %> class manage
|
|
98
|
+
password simple <%= user.password %>
|
|
99
|
+
service-type ssh
|
|
100
|
+
authorization-attribute user-role <%= user.h3c_role %>
|
|
101
|
+
quit
|
|
102
|
+
<% end %><% if system.base_security_enabled %>password-control length <%= system.password_min_length %>
|
|
103
|
+
<% if system.disable_telnet %>undo telnet server enable
|
|
104
|
+
<% end %><% if system.disable_http %>undo ip http enable
|
|
105
|
+
undo ip https enable
|
|
106
|
+
<% end %><% if system.enable_bpdu_protection %>stp bpdu-protection
|
|
107
|
+
stp global enable
|
|
108
|
+
<% end %><% end %>save force
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# H3C IRF
|
|
2
|
+
# Stage 1 - master
|
|
3
|
+
system-view
|
|
4
|
+
irf member 1 priority 32
|
|
5
|
+
interface range <%= port1 %> to <%= port2 %>
|
|
6
|
+
shutdown
|
|
7
|
+
quit
|
|
8
|
+
irf-port 1/2
|
|
9
|
+
port group interface <%= port1 %>
|
|
10
|
+
port group interface <%= port2 %>
|
|
11
|
+
quit
|
|
12
|
+
interface range <%= port1 %> to <%= port2 %>
|
|
13
|
+
undo shutdown
|
|
14
|
+
quit
|
|
15
|
+
irf-port-configuration active
|
|
16
|
+
save force
|
|
17
|
+
# Stage 2 - standby renumber
|
|
18
|
+
system-view
|
|
19
|
+
irf member 1 renumber 2
|
|
20
|
+
save force
|
|
21
|
+
reboot
|
|
22
|
+
# Stage 3 - standby links
|
|
23
|
+
system-view
|
|
24
|
+
interface range <%= port3 %> to <%= port4 %>
|
|
25
|
+
shutdown
|
|
26
|
+
quit
|
|
27
|
+
irf-port 2/1
|
|
28
|
+
port group interface <%= port3 %>
|
|
29
|
+
port group interface <%= port4 %>
|
|
30
|
+
quit
|
|
31
|
+
interface range <%= port3 %> to <%= port4 %>
|
|
32
|
+
undo shutdown
|
|
33
|
+
quit
|
|
34
|
+
irf-port-configuration active
|
|
35
|
+
save force
|
|
36
|
+
# Stage 4 - BFD MAD
|
|
37
|
+
system-view
|
|
38
|
+
vlan <%= mad_vlan %>
|
|
39
|
+
description IRF_BFD_MAD
|
|
40
|
+
quit
|
|
41
|
+
interface range <%= mad_port1 %> <%= mad_port2 %>
|
|
42
|
+
port link-type access
|
|
43
|
+
port access vlan <%= mad_vlan %>
|
|
44
|
+
undo shutdown
|
|
45
|
+
quit
|
|
46
|
+
interface Vlan-interface<%= mad_vlan %>
|
|
47
|
+
mad bfd enable
|
|
48
|
+
mad ip address <%= mad_member1_ip %> <%= mad_mask %> member 1
|
|
49
|
+
mad ip address <%= mad_member2_ip %> <%= mad_mask %> member 2
|
|
50
|
+
quit
|
|
51
|
+
save force
|
|
52
|
+
display irf
|
|
53
|
+
display irf topology
|
|
54
|
+
display irf link
|
|
55
|
+
display irf configuration
|
|
56
|
+
display mad verbose
|
|
57
|
+
display bfd session
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
system-view
|
|
2
|
+
# H3C switch ports / <%= stack_mode %>
|
|
3
|
+
# ============================================================
|
|
4
|
+
# 1. Logical Bridge-Aggregation interfaces
|
|
5
|
+
# ============================================================
|
|
6
|
+
<% aggregates.each do |port| %>interface Bridge-Aggregation<%= port.aggregate_id %>
|
|
7
|
+
description <%= port.local_description %>
|
|
8
|
+
<% if port.trunk_all %> port link-type trunk
|
|
9
|
+
port trunk permit vlan all
|
|
10
|
+
<% end %><% if port.trunk_list %> port link-type trunk
|
|
11
|
+
port trunk permit vlan <%= port.vlan_space %>
|
|
12
|
+
<% end %><% if port.access %> port link-type access
|
|
13
|
+
port access vlan <%= port.vlan %>
|
|
14
|
+
<% end %> link-aggregation mode dynamic
|
|
15
|
+
undo shutdown
|
|
16
|
+
quit
|
|
17
|
+
<% end %>
|
|
18
|
+
# ============================================================
|
|
19
|
+
# 2. Physical member interfaces
|
|
20
|
+
# ============================================================
|
|
21
|
+
<% allocations.each do |port| %>interface <%= port.local_iface %>
|
|
22
|
+
description <%= port.local_description %>
|
|
23
|
+
<% if port.trunk_all %> port link-type trunk
|
|
24
|
+
port trunk permit vlan all
|
|
25
|
+
<% end %><% if port.trunk_list %> port link-type trunk
|
|
26
|
+
port trunk permit vlan <%= port.vlan_space %>
|
|
27
|
+
<% end %><% if port.access %> port link-type access
|
|
28
|
+
port access vlan <%= port.vlan %>
|
|
29
|
+
<% end %><% if port.port_channel %> port link-aggregation group <%= port.aggregate_id %>
|
|
30
|
+
<% end %> undo shutdown
|
|
31
|
+
quit
|
|
32
|
+
<% end %>
|
|
33
|
+
# ============================================================
|
|
34
|
+
# 3. Save configuration
|
|
35
|
+
# ============================================================
|
|
36
|
+
save force
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
configure
|
|
2
|
+
# Hillstone IPsec VPN: <%= site_name %>
|
|
3
|
+
<% if ikev1 %>isakmp proposal "<%= site_name %>_P1"
|
|
4
|
+
hash <%= hillstone_ike_hash %>
|
|
5
|
+
encryption <%= hillstone_ike_encryption %>
|
|
6
|
+
group <%= hillstone_ike_group %>
|
|
7
|
+
lifetime <%= ike_lifetime %>
|
|
8
|
+
exit
|
|
9
|
+
isakmp peer "<%= site_name %>"
|
|
10
|
+
isakmp-proposal "<%= site_name %>_P1"
|
|
11
|
+
pre-share "<%= preshared_key %>"
|
|
12
|
+
peer <%= remote_ip %>
|
|
13
|
+
accept-all-peer-id
|
|
14
|
+
dpd interval <%= dpd_interval %> retry <%= dpd_retry %> periodic
|
|
15
|
+
interface <%= local_interface %>
|
|
16
|
+
exit
|
|
17
|
+
ipsec proposal "<%= site_name %>_P2"
|
|
18
|
+
hash <%= hillstone_ipsec_hash %>
|
|
19
|
+
encryption <%= hillstone_ipsec_encryption %>
|
|
20
|
+
lifetime <%= ipsec_lifetime %>
|
|
21
|
+
exit
|
|
22
|
+
tunnel ipsec "<%= site_name %>" auto sa-index <%= hillstone_sa_index %>
|
|
23
|
+
ipsec-proposal "<%= site_name %>_P2"
|
|
24
|
+
auto-connect
|
|
25
|
+
check-id
|
|
26
|
+
isakmp-peer "<%= site_name %>"
|
|
27
|
+
<% proxy_ids.each do |proxy| %> id local <%= proxy.local %> remote <%= proxy.remote %> service "Any"
|
|
28
|
+
<% end %>exit
|
|
29
|
+
<% end %><% if ikev2 %>ikev2 proposal "<%= site_name %>_P1"
|
|
30
|
+
hash <%= hillstone_ike_hash %>
|
|
31
|
+
encryption <%= hillstone_ikev2_encryption %>
|
|
32
|
+
lifetime <%= ike_lifetime %>
|
|
33
|
+
exit
|
|
34
|
+
ikev2 ipsec-proposal "<%= site_name %>_P2"
|
|
35
|
+
hash <%= hillstone_ipsec_hash %>
|
|
36
|
+
encryption <%= hillstone_ipsec_v2_encryption %>
|
|
37
|
+
lifetime <%= ipsec_lifetime %>
|
|
38
|
+
exit
|
|
39
|
+
ikev2 peer "<%= site_name %>"
|
|
40
|
+
interface <%= local_interface %>
|
|
41
|
+
match-peer "<%= remote_ip %>"
|
|
42
|
+
ikev2-proposal "<%= site_name %>_P1"
|
|
43
|
+
local-id ip <%= local_ip %>
|
|
44
|
+
remote key "<%= preshared_key %>"
|
|
45
|
+
ikev2-profile "<%= site_name %>"
|
|
46
|
+
<% proxy_ids.each do |proxy| %> traffic-selector "<%= proxy.name %>"
|
|
47
|
+
local <%= proxy.local %>
|
|
48
|
+
remote <%= proxy.remote %>
|
|
49
|
+
exit
|
|
50
|
+
<% end %> exit
|
|
51
|
+
exit
|
|
52
|
+
tunnel ipsec "<%= site_name %>" ikev2 sa-index <%= hillstone_sa_index %>
|
|
53
|
+
ikev2-peer "<%= site_name %>"
|
|
54
|
+
ipsec-proposal "<%= site_name %>_P2"
|
|
55
|
+
auto-connect
|
|
56
|
+
exit
|
|
57
|
+
<% end %>interface <%= tunnel %>
|
|
58
|
+
zone "<%= tunnel_zone %>"
|
|
59
|
+
description "<%= site_name %>"
|
|
60
|
+
<% if ikev1 %> tunnel ipsec "<%= site_name %>"
|
|
61
|
+
<% end %><% if ikev2 %> tunnel ikev2 "<%= site_name %>"
|
|
62
|
+
<% end %>
|
|
63
|
+
no reverse-route
|
|
64
|
+
exit
|
|
65
|
+
<% if add_route %>ip vrouter "<%= virtual_router %>"
|
|
66
|
+
<% routes.each do |route| %> ip route <%= route.subnet %> "<%= tunnel %>"
|
|
67
|
+
<% end %>exit
|
|
68
|
+
<% end %>save
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
configure
|
|
2
|
+
# Hillstone security policies
|
|
3
|
+
<% service_objects.each do |service| %>service <%= service.name %>
|
|
4
|
+
<%= service.protocol %> dst-port <%= service.first_port %><% if service.port_range %> <%= service.last_port %><% end %>
|
|
5
|
+
exit
|
|
6
|
+
<% end %><% address_objects.each do |address| %>address <%= address.name %>
|
|
7
|
+
<% address.entries.each do |entry| %><% if entry.range %> range <%= entry.first %> <%= entry.last %>
|
|
8
|
+
<% else %> ip <%= entry.value %>
|
|
9
|
+
<% end %><% end %>exit
|
|
10
|
+
<% end %><% service_groups.each do |group| %>servgroup <%= group.name %>
|
|
11
|
+
<% group.services.each do |service_name| %> service <%= service_name %>
|
|
12
|
+
<% end %>exit
|
|
13
|
+
<% end %><% policies.each do |policy| %>rule top
|
|
14
|
+
<% if policy.has_description %> description "<%= policy.description %>"
|
|
15
|
+
<% end %> src-zone <%= policy.src_zone %>
|
|
16
|
+
<% if policy.src_any %> src-addr Any
|
|
17
|
+
<% else %><% if policy.src_object %> src-addr <%= policy.src_object %>
|
|
18
|
+
<% else %><% policy.src_entries.each do |entry| %><% if entry.range %> src-range <%= entry.first %> <%= entry.last %>
|
|
19
|
+
<% else %> src-ip <%= entry.value %>
|
|
20
|
+
<% end %><% end %><% end %><% end %> dst-zone <%= policy.dst_zone %>
|
|
21
|
+
<% if policy.dst_any %> dst-addr Any
|
|
22
|
+
<% else %><% if policy.dst_object %> dst-addr <%= policy.dst_object %>
|
|
23
|
+
<% else %><% policy.dst_entries.each do |entry| %><% if entry.range %> dst-range <%= entry.first %> <%= entry.last %>
|
|
24
|
+
<% else %> dst-ip <%= entry.value %>
|
|
25
|
+
<% end %><% end %><% end %><% end %><% if policy.service_any %> service Any
|
|
26
|
+
<% else %><% if policy.service_group %> service <%= policy.service_group %>
|
|
27
|
+
<% else %><% policy.service_names.each do |service_name| %> service <%= service_name %>
|
|
28
|
+
<% end %><% end %><% end %> action <%= policy.action %>
|
|
29
|
+
<% if policy.log %> log session-end
|
|
30
|
+
<% end %>exit
|
|
31
|
+
<% end %>save
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
configure
|
|
2
|
+
# Palo Alto IPsec VPN: <%= site_name %>
|
|
3
|
+
set network ike crypto-profiles ike-crypto-profiles <%= site_name %> hash <%= ike_authentication %>
|
|
4
|
+
set network ike crypto-profiles ike-crypto-profiles <%= site_name %> dh-group <%= ike_dh_group %>
|
|
5
|
+
set network ike crypto-profiles ike-crypto-profiles <%= site_name %> encryption <%= ike_encryption %>
|
|
6
|
+
set network ike crypto-profiles ike-crypto-profiles <%= site_name %> lifetime seconds <%= ike_lifetime %>
|
|
7
|
+
set network ike crypto-profiles ipsec-crypto-profiles <%= site_name %> esp authentication <%= ipsec_authentication %>
|
|
8
|
+
set network ike crypto-profiles ipsec-crypto-profiles <%= site_name %> esp encryption <%= ipsec_encryption %>
|
|
9
|
+
set network ike crypto-profiles ipsec-crypto-profiles <%= site_name %> lifetime seconds <%= ipsec_lifetime %>
|
|
10
|
+
set network ike gateway <%= site_name %> authentication pre-shared-key key <%= preshared_key %>
|
|
11
|
+
<% if ikev1 %>set network ike gateway <%= site_name %> protocol ikev1 ike-crypto-profile <%= site_name %>
|
|
12
|
+
set network ike gateway <%= site_name %> protocol ikev1 exchange-mode aggressive
|
|
13
|
+
set network ike gateway <%= site_name %> protocol ikev1 dpd enable yes
|
|
14
|
+
set network ike gateway <%= site_name %> protocol ikev1 dpd interval <%= dpd_interval %>
|
|
15
|
+
set network ike gateway <%= site_name %> protocol ikev1 dpd retry <%= dpd_retry %>
|
|
16
|
+
<% end %><% if ikev2 %>set network ike gateway <%= site_name %> protocol ikev2 ike-crypto-profile <%= site_name %>
|
|
17
|
+
set network ike gateway <%= site_name %> protocol ikev2 dpd enable yes
|
|
18
|
+
set network ike gateway <%= site_name %> protocol ikev2 pq-ppk enabled yes
|
|
19
|
+
set network ike gateway <%= site_name %> protocol ikev2 pq-ppk negotiation-mode preferred
|
|
20
|
+
<% end %>set network ike gateway <%= site_name %> protocol version <%= ike_version %>
|
|
21
|
+
set network ike gateway <%= site_name %> local-address ip <%= local_ip %>
|
|
22
|
+
set network ike gateway <%= site_name %> local-address interface <%= local_interface %>
|
|
23
|
+
set network ike gateway <%= site_name %> protocol-common nat-traversal enable yes
|
|
24
|
+
set network ike gateway <%= site_name %> protocol-common passive-mode no
|
|
25
|
+
set network ike gateway <%= site_name %> peer-address ip <%= remote_ip %>
|
|
26
|
+
set network tunnel ipsec <%= site_name %> auto-key ipsec-crypto-profile <%= site_name %>
|
|
27
|
+
set network tunnel ipsec <%= site_name %> auto-key ike-gateway <%= site_name %>
|
|
28
|
+
set network tunnel ipsec <%= site_name %> tunnel-monitor enable no
|
|
29
|
+
set network tunnel ipsec <%= site_name %> tunnel-interface <%= tunnel %>
|
|
30
|
+
set network tunnel ipsec <%= site_name %> disabled no
|
|
31
|
+
<% proxy_ids.each do |proxy| %>set network tunnel ipsec <%= site_name %> auto-key proxy-id <%= proxy.name %> protocol any
|
|
32
|
+
set network tunnel ipsec <%= site_name %> auto-key proxy-id <%= proxy.name %> local <%= proxy.local %>
|
|
33
|
+
set network tunnel ipsec <%= site_name %> auto-key proxy-id <%= proxy.name %> remote <%= proxy.remote %>
|
|
34
|
+
<% end %><% if add_route %><% routes.each do |route| %>set network virtual-router <%= virtual_router %> routing-table ip static-route <%= route.name %> bfd profile None
|
|
35
|
+
set network virtual-router <%= virtual_router %> routing-table ip static-route <%= route.name %> destination <%= route.subnet %>
|
|
36
|
+
set network virtual-router <%= virtual_router %> routing-table ip static-route <%= route.name %> interface <%= tunnel %>
|
|
37
|
+
set network virtual-router <%= virtual_router %> routing-table ip static-route <%= route.name %> metric <%= route_metric %>
|
|
38
|
+
set network virtual-router <%= virtual_router %> routing-table ip static-route <%= route.name %> route-table unicast
|
|
39
|
+
<% end %><% end %># Commit after peer review
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Radware load balancer services
|
|
2
|
+
/c/l3/route/ip4
|
|
3
|
+
<% real_servers.each do |server| %> add <%= server.address %> 255.255.255.255 <%= next_hop %> <%= route_metric %>
|
|
4
|
+
<% end %><% real_servers.each do |server| %>/c/slb/real <%= server.address %>
|
|
5
|
+
ena
|
|
6
|
+
ipver v4
|
|
7
|
+
rip <%= server.address %>
|
|
8
|
+
<% end %><% groups.each do |group| %>/c/slb/group <%= group.group_name %>
|
|
9
|
+
ipver v4
|
|
10
|
+
<% if group.health_check %> health <%= group.health_check %>
|
|
11
|
+
<% end %><% group.real_ips.each do |address| %> add <%= address %>
|
|
12
|
+
<% end %><% end %><% virtuals.each do |virtual| %>/c/slb/virt <%= virtual.virtual_name %>
|
|
13
|
+
ena
|
|
14
|
+
ipver v4
|
|
15
|
+
vip <%= virtual.virtual_ip %>
|
|
16
|
+
vname "<%= virtual.virtual_name %>_AUTO"
|
|
17
|
+
<% virtual.services.each do |service| %>/c/slb/virt <%= virtual.virtual_name %>/service <%= service.service_port %> <%= service.service_type %>
|
|
18
|
+
name "<%= service.service_name %>"
|
|
19
|
+
group <%= service.group_name %>
|
|
20
|
+
rport <%= service.app_port %>
|
|
21
|
+
tmout <%= service.timeout %>
|
|
22
|
+
<% if service.client_ip_persistence %> pbind clientip
|
|
23
|
+
<% end %>/c/slb/virt <%= virtual.virtual_name %>/service <%= service.service_port %> <%= service.service_type %>/pip
|
|
24
|
+
mode address
|
|
25
|
+
addr v4 <%= service.proxy_ip %> 255.255.255.255 persist disable
|
|
26
|
+
<% end %><% end %># Review before applying
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Value Required LOCAL_INTERFACE (\S+)
|
|
2
|
+
Value Required NEIGHBOR_NAME (\S+)
|
|
3
|
+
Value Required NEIGHBOR_INTERFACE (\S+)
|
|
4
|
+
|
|
5
|
+
Start
|
|
6
|
+
^\s*Device ID:\s*${NEIGHBOR_NAME}\s*$$
|
|
7
|
+
^\s*Interface:\s*${LOCAL_INTERFACE},\s*Port ID \(outgoing port\):\s*${NEIGHBOR_INTERFACE}\s*$$ -> Record
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Value Required INTERFACE (\S+)
|
|
2
|
+
Value DESCRIPTION (.*)
|
|
3
|
+
|
|
4
|
+
Start
|
|
5
|
+
^interface ${INTERFACE}$$ -> Interface
|
|
6
|
+
|
|
7
|
+
Interface
|
|
8
|
+
^\s+description ${DESCRIPTION}$$
|
|
9
|
+
^!$$ -> Record Start
|
|
10
|
+
^interface .+ -> Continue.Record
|
|
11
|
+
^interface ${INTERFACE}$$
|
|
12
|
+
^end$$ -> Record End
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Value Required LOCAL_INTERFACE (\S+)
|
|
2
|
+
Value NEIGHBOR_NAME (\S+)
|
|
3
|
+
Value Required CHASSIS_ID (\S+)
|
|
4
|
+
Value Required NEIGHBOR_INTERFACE (Port\s+\d+|\S+)
|
|
5
|
+
|
|
6
|
+
Start
|
|
7
|
+
^\s*display lldp neighbor-information list\s*$$
|
|
8
|
+
^\s*${LOCAL_INTERFACE}\s+${CHASSIS_ID}\s+${NEIGHBOR_INTERFACE}\s+${NEIGHBOR_NAME}\s*$$ -> Record
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Value Required LOCAL_INTERFACE (\S+)
|
|
2
|
+
Value NEIGHBOR_NAME (\S+)
|
|
3
|
+
Value Required CHASSIS_ID (\S+)
|
|
4
|
+
Value Required NEIGHBOR_INTERFACE (Port\s+\d+|\S+)
|
|
5
|
+
|
|
6
|
+
Start
|
|
7
|
+
^\s*display lldp neighbor-information list\s*$$
|
|
8
|
+
^\s*${NEIGHBOR_NAME}\s+${LOCAL_INTERFACE}\s+${CHASSIS_ID}\s+${NEIGHBOR_INTERFACE}\s*$$ -> Record
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Template, Vendor, Command
|
|
2
|
+
cisco_ios_show_ip_interface_brief.textfsm, cisco_ios, show ip interface brief$
|
|
3
|
+
cisco_cdp_neighbors_detail.textfsm, cisco_ios, show cdp neighbors detail$
|
|
4
|
+
cisco_cdp_neighbors_detail.textfsm, cisco_nxos, show cdp neighbors detail$
|
|
5
|
+
h3c_lldp_name_first.textfsm, h3c, display lldp neighbor-information list$
|
|
6
|
+
h3c_lldp_name_first.textfsm, h3c_wireless, display lldp neighbor-information list$
|
|
7
|
+
hillstone_lldp_neighbors.textfsm, hillstone, show lldp neighbor-information$
|
|
8
|
+
palo_alto_lldp_neighbors.textfsm, palo_alto, show lldp neighbors all$
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Value Required LOCAL_INTERFACE (\S+)
|
|
2
|
+
Value NEIGHBOR_NAME (\S+)
|
|
3
|
+
Value CHASSIS_ID (\S+)
|
|
4
|
+
Value Required NEIGHBOR_INTERFACE (\S+)
|
|
5
|
+
|
|
6
|
+
Start
|
|
7
|
+
^\s*Local information:\s*$$ -> Record
|
|
8
|
+
^\s*Local interface:\s*${LOCAL_INTERFACE}\s*$$
|
|
9
|
+
^\s*Chassis ID:\s*${CHASSIS_ID}\s*$$
|
|
10
|
+
^\s*Port ID:\s*${NEIGHBOR_INTERFACE}\s*$$
|
|
11
|
+
^\s*System name:\s*${NEIGHBOR_NAME}\s*$$
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Value Required INTERFACE (\d+)
|
|
2
|
+
Value DESCRIPTION (.*)
|
|
3
|
+
|
|
4
|
+
Start
|
|
5
|
+
^/(?:c|cfg)/port ${INTERFACE}/name "${DESCRIPTION}"\s*$$ -> Record
|
|
6
|
+
^/(?:c|cfg)/port ${INTERFACE}\s*$$ -> Port
|
|
7
|
+
|
|
8
|
+
Port
|
|
9
|
+
^\s+name "${DESCRIPTION}"\s*$$
|
|
10
|
+
^\s+name ${DESCRIPTION}$$
|
|
11
|
+
^/.* -> Continue.Record
|
|
12
|
+
^/(?:c|cfg)/port ${INTERFACE}/name "${DESCRIPTION}"\s*$$ -> Record Start
|
|
13
|
+
^/(?:c|cfg)/port ${INTERFACE}\s*$$
|