15
0
Files
python-ntc-templates/python-ntc-templates.spec
Dirk Mueller 90b6a5e22f - update to 3.1.0:
* New template: cisco_ios_show_ip_eigrp_interfaces_detail.textfsm
  * New template: cisco_ios_show_snmp_group.textfsm
  * New templates & updates: Updated support for Arista EOS devices
  * New template: cisco_xr_show_ipv4_interface.textfsm
  * New templates: Add multiple zyxel templates
  * Bug fix: Change huawei_vrf shortest command
  * Bug fix: Path separator error on windows
  * New templates: Adding multiple mikrotik routeros templates
  * New template: aruba_os_show_ap_database_long.textfsm
  * New template: aruba_os_show_ap_radio-database.textfsm
  * Bug fix: EOS 4.28.XF updated output of codes in `show ip route`
  * New template: juniper_junos_show_vlans.textfsm
  * Bug fix: cisco_ios show ip bgp neighbors advertised-routes output where
    metric is wider than 6 chars
  * Bug fix: cisco_ios show ip bgp output where metric is wider than 6 chars
  * Bug fix: cisco_nxos_show_int_breief do not match mgmt and vlan
  * Bug fix: cisco_ios_show_module updated output for c9200
  * Changed: add vlan_id to cisco_ios_show_interfaces
  * Bug fix: fix not advertised vlan in cisco_nxos_show_lldp_neighbors_detail
  * Added: Additional fields for cisco_ios_show_ip_access-lists.textfsm
  * Bug fix: Multiple line parsing using lists with textfsm extracting wrong details
  * Bug fix: Cisco IOS show boot missing parameter
  * New template: arista_eos_show_processes_top_once.textfsm
  * Bug fix: Adding a record without the vlan field for very old HP Procurve switches
  * New template: cisco_xr_show_install_active.textfsm
  * Changed: Clarifies docs about length order
  * New template: ubiquiti_edgerouter_show_dhcp_leases.textfsm
  * Bug fix: hanges the CRLF to LF to pass tests
  * Changed: Additional fields for cisco_nxos_show_ip_route.textfsm

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ntc-templates?expand=0&rev=11
2022-10-01 17:51:25 +00:00

80 lines
3.2 KiB
RPMSpec

#
# spec file for package python-ntc-templates
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-ntc-templates
Version: 3.1.0
Release: 0
Summary: Package to return structured data from the output of network devices
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/networktocode/ntc-templates
Source: https://github.com/networktocode/ntc-templates/archive/v%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-textfsm >= 1.1.0
Suggests: python-PyYAML
Suggests: python-black
Suggests: python-pytest
Suggests: python-ruamel.yaml
Suggests: python-yamllint
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module pyaml}
BuildRequires: %{python_module pytest >= 4.0.0}
BuildRequires: %{python_module ruamel.yaml}
BuildRequires: %{python_module textfsm >= 1.1.0}
# /SECTION
%python_subpackages
%description
TextFSM is a project built by Google that takes CLI string output and passes each line through a series of regular expressions until it finds a match. The regular expressions use named capture groups to build a text table out of the significant text. The names of the capture groups are used as column headers, and the captured values are stored as rows in the table.
%prep
%setup -q -n ntc-templates-%{version}
# rpmlintrc
chmod -x ntc_templates/templates/cisco*
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%if 0%{suse_version} <= 1500
# https://github.com/networktocode/ntc-templates/issues/743
rm tests/cisco_ios/show_access-list/cisco_ios_show_access-list.raw
%endif
# https://github.com/networktocode/ntc-templates/issues/743 (closed but still an open issue)
# -> skip tests: arista_eos_show_ip_access-lists, cisco_ios_show_access-list, cisco_nxos_show_ip_bgp_neighbors, cisco_nxos_show_ip_bgp_neighbors_with_policy_names
# https://github.com/networktocode/ntc-templates/issues/958
# -> skip tests: cisco_nxos_show_environment, cisco_nxos_show_environment2
%pytest -k 'not (arista_eos_show_ip_access-lists or cisco_ios_show_access-list or cisco_nxos_show_ip_bgp_neighbors or cisco_nxos_show_environment or cisco_nxos_show_environment2 or cisco_nxos_show_ip_bgp_neighbors_with_policy_names)'
%files %{python_files}
%license LICENSE
%doc README.md CHANGELOG.md
%{python_sitelib}/*
%changelog