15
0
forked from pool/python-napalm
Files
python-napalm/python-napalm.spec

125 lines
4.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-napalm
#
# 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-%{**}}
Accepting request 789750 from home:pgajdos:python - version update to 2.5.0 * This is the last release supporting Python 2. Going forward, we will only support Python 3.6+ * namespace fix for napalm cli (#950) * [EOS] Fix broken get_bgp_neighbors when 6PE configured on eos (#945) * [NXOS] If parent_table in nxos is None call exception (#939) * [Junos] Remove extensive argument from junos_iface_table (#929) * MTU support for get_interfaces (#940) * [EOS] When asPathType is Internal (IBGP), as_path is empty and the remote-as is the local_as (#1064) * [IOS] support n9k ipv6 ints for interfaces_ip getter (#969) * [IOS] support catalyst vss for mac_address getter (#968) * [IOS] Raise exception if BGP neighbor info requested and BGP not running (#970) * [NXOS] Implement nxos_ssh get_environment (#973) * Better handling of connection closing upon exceptions in enter (#994) * [NXOS] address single and multiple v6 address on n9k (#997) * [NXOS] Fix nxos and nxos_ssh hostname change handling (#999) * added option to run show run all (#1029) * [Junos] add optional arg for DB config selection (#1035) * [Junos] Fixed "Wrong interface information for Junos virtual-switch w/ bridge domains using get_network_instances" (#1032) * [EOS] Implemented lock_disable for EOS based on Junos. (#1042) * [NXOS] Work around NXAPI double quoting (#1048) * [NXOS] napalm.nxos.traceroute - VRF traces and handle AS in hops (#989) * [IOS] Fix extra line in show ip int brief on IOS (#986) * [NXOS] Expand nxos commit merge rollback error (#860) * [IOS] add support for VRF for get_arp_table func (#937) * [IOS] get_bgp_neighbors vrf and safi aware (#768) * [IOS] Check if temperature sensor on Cisco device is not supported (#1055) * [IOS] Fixes get_environment memory collection on ios-xe devices (#1053) * [IOS] get_route_to implementation for IOS (#750) OBS-URL: https://build.opensuse.org/request/show/789750 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=5
2020-03-30 12:54:03 +00:00
%define skip_python2 1
Name: python-napalm
Version: 3.4.0
Release: 0
Summary: Network Automation and Programmability Abstraction Layer
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/napalm-automation/napalm
Source: https://github.com/napalm-automation/napalm/archive/%{version}.tar.gz#/napalm-%{version}.tar.gz
# https://github.com/napalm-automation/napalm/issues/1594
Patch0: python-napalm-no-mock.patch
Patch1: netmiko-4-support.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Jinja2
Requires: python-PyYAML
Requires: python-cffi >= 1.11.3
Accepting request 789750 from home:pgajdos:python - version update to 2.5.0 * This is the last release supporting Python 2. Going forward, we will only support Python 3.6+ * namespace fix for napalm cli (#950) * [EOS] Fix broken get_bgp_neighbors when 6PE configured on eos (#945) * [NXOS] If parent_table in nxos is None call exception (#939) * [Junos] Remove extensive argument from junos_iface_table (#929) * MTU support for get_interfaces (#940) * [EOS] When asPathType is Internal (IBGP), as_path is empty and the remote-as is the local_as (#1064) * [IOS] support n9k ipv6 ints for interfaces_ip getter (#969) * [IOS] support catalyst vss for mac_address getter (#968) * [IOS] Raise exception if BGP neighbor info requested and BGP not running (#970) * [NXOS] Implement nxos_ssh get_environment (#973) * Better handling of connection closing upon exceptions in enter (#994) * [NXOS] address single and multiple v6 address on n9k (#997) * [NXOS] Fix nxos and nxos_ssh hostname change handling (#999) * added option to run show run all (#1029) * [Junos] add optional arg for DB config selection (#1035) * [Junos] Fixed "Wrong interface information for Junos virtual-switch w/ bridge domains using get_network_instances" (#1032) * [EOS] Implemented lock_disable for EOS based on Junos. (#1042) * [NXOS] Work around NXAPI double quoting (#1048) * [NXOS] napalm.nxos.traceroute - VRF traces and handle AS in hops (#989) * [IOS] Fix extra line in show ip int brief on IOS (#986) * [NXOS] Expand nxos commit merge rollback error (#860) * [IOS] add support for VRF for get_arp_table func (#937) * [IOS] get_bgp_neighbors vrf and safi aware (#768) * [IOS] Check if temperature sensor on Cisco device is not supported (#1055) * [IOS] Fixes get_environment memory collection on ios-xe devices (#1053) * [IOS] get_route_to implementation for IOS (#750) OBS-URL: https://build.opensuse.org/request/show/789750 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=5
2020-03-30 12:54:03 +00:00
Requires: python-ciscoconfparse
Requires: python-future
Accepting request 789750 from home:pgajdos:python - version update to 2.5.0 * This is the last release supporting Python 2. Going forward, we will only support Python 3.6+ * namespace fix for napalm cli (#950) * [EOS] Fix broken get_bgp_neighbors when 6PE configured on eos (#945) * [NXOS] If parent_table in nxos is None call exception (#939) * [Junos] Remove extensive argument from junos_iface_table (#929) * MTU support for get_interfaces (#940) * [EOS] When asPathType is Internal (IBGP), as_path is empty and the remote-as is the local_as (#1064) * [IOS] support n9k ipv6 ints for interfaces_ip getter (#969) * [IOS] support catalyst vss for mac_address getter (#968) * [IOS] Raise exception if BGP neighbor info requested and BGP not running (#970) * [NXOS] Implement nxos_ssh get_environment (#973) * Better handling of connection closing upon exceptions in enter (#994) * [NXOS] address single and multiple v6 address on n9k (#997) * [NXOS] Fix nxos and nxos_ssh hostname change handling (#999) * added option to run show run all (#1029) * [Junos] add optional arg for DB config selection (#1035) * [Junos] Fixed "Wrong interface information for Junos virtual-switch w/ bridge domains using get_network_instances" (#1032) * [EOS] Implemented lock_disable for EOS based on Junos. (#1042) * [NXOS] Work around NXAPI double quoting (#1048) * [NXOS] napalm.nxos.traceroute - VRF traces and handle AS in hops (#989) * [IOS] Fix extra line in show ip int brief on IOS (#986) * [NXOS] Expand nxos commit merge rollback error (#860) * [IOS] add support for VRF for get_arp_table func (#937) * [IOS] get_bgp_neighbors vrf and safi aware (#768) * [IOS] Check if temperature sensor on Cisco device is not supported (#1055) * [IOS] Fixes get_environment memory collection on ios-xe devices (#1053) * [IOS] get_route_to implementation for IOS (#750) OBS-URL: https://build.opensuse.org/request/show/789750 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=5
2020-03-30 12:54:03 +00:00
Requires: python-junos-eznc >= 2.2.1
Requires: python-lxml >= 4.3.0
Requires: python-ncclient
Requires: python-netaddr
Requires: python-netmiko >= 4.0.0
Requires: python-paramiko >= 2.6.0
Requires: python-pyeapi >= 0.8.2
Accepting request 800795 from home:mnhauke:network:automation - Update to version 3.0.0 Changes: * Integrated nxapi_plumbing and pyIOSXR into NAPALM. * [NXOS] If the command returns a null value then json.loads(None) throws an exception. * [NXOS] For Vlan interfaces nxos driver, the state is not correctly defined (related to json output). * [IOS] Return empty dictionary if BGP not running. * Fix Nornir + NAPALM threading issue. * [IOS, NXOS] get-vlans() getter implementation. * [IOS] Fix traceroute output parsing in ios. * [NXOS] firmware less than 7 does not support json in cli * Updated support for TwoGigabit & TwentyFiveGig interfaces to canonical_map.py * [NXOS]: Prevent nxos.get_interfaces_ip from failing if no ipv6 support. * [Junos] Added auto_probe optional argument. * [NXOS] Fix exception when trying to get environmental data from certain Nexus devices. * [IOS] Fix fix vrf detection when no vrf is defined. * [IOS-XR} No silent pass of errors in base.helpers & logging. * [IOS-XR] Add support for XML namespace prefixes in find_txt. * [NXOS] Fix get_vlans() method where no interfaces in VLAN. * [IOS] Added ``force_no_enable` optional argument. * [NXOS] Use Kickstart version to determine NXOS version. * [NXOS] Add nxos_ssh support for force_no_enable. * [EOS] Fix #1153: Strip double quotation on LLDP remote port. * [IOS] Fix typo in the traceoute method. * add a few less used canonical mappings. * [IOS] Fix show interfaces summary for 10/40/100 Gig Interfaces OBS-URL: https://build.opensuse.org/request/show/800795 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=7
2020-05-06 16:15:51 +00:00
Requires: python-requests >= 2.7.0
Requires: python-scp
Requires: python-setuptools >= 38.4.0
Requires: python-textfsm
Requires: python-typing_extensions
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module cffi >= 1.11.3}
Accepting request 789750 from home:pgajdos:python - version update to 2.5.0 * This is the last release supporting Python 2. Going forward, we will only support Python 3.6+ * namespace fix for napalm cli (#950) * [EOS] Fix broken get_bgp_neighbors when 6PE configured on eos (#945) * [NXOS] If parent_table in nxos is None call exception (#939) * [Junos] Remove extensive argument from junos_iface_table (#929) * MTU support for get_interfaces (#940) * [EOS] When asPathType is Internal (IBGP), as_path is empty and the remote-as is the local_as (#1064) * [IOS] support n9k ipv6 ints for interfaces_ip getter (#969) * [IOS] support catalyst vss for mac_address getter (#968) * [IOS] Raise exception if BGP neighbor info requested and BGP not running (#970) * [NXOS] Implement nxos_ssh get_environment (#973) * Better handling of connection closing upon exceptions in enter (#994) * [NXOS] address single and multiple v6 address on n9k (#997) * [NXOS] Fix nxos and nxos_ssh hostname change handling (#999) * added option to run show run all (#1029) * [Junos] add optional arg for DB config selection (#1035) * [Junos] Fixed "Wrong interface information for Junos virtual-switch w/ bridge domains using get_network_instances" (#1032) * [EOS] Implemented lock_disable for EOS based on Junos. (#1042) * [NXOS] Work around NXAPI double quoting (#1048) * [NXOS] napalm.nxos.traceroute - VRF traces and handle AS in hops (#989) * [IOS] Fix extra line in show ip int brief on IOS (#986) * [NXOS] Expand nxos commit merge rollback error (#860) * [IOS] add support for VRF for get_arp_table func (#937) * [IOS] get_bgp_neighbors vrf and safi aware (#768) * [IOS] Check if temperature sensor on Cisco device is not supported (#1055) * [IOS] Fixes get_environment memory collection on ios-xe devices (#1053) * [IOS] get_route_to implementation for IOS (#750) OBS-URL: https://build.opensuse.org/request/show/789750 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=5
2020-03-30 12:54:03 +00:00
BuildRequires: %{python_module ciscoconfparse}
BuildRequires: %{python_module ddt}
BuildRequires: %{python_module future}
Accepting request 789750 from home:pgajdos:python - version update to 2.5.0 * This is the last release supporting Python 2. Going forward, we will only support Python 3.6+ * namespace fix for napalm cli (#950) * [EOS] Fix broken get_bgp_neighbors when 6PE configured on eos (#945) * [NXOS] If parent_table in nxos is None call exception (#939) * [Junos] Remove extensive argument from junos_iface_table (#929) * MTU support for get_interfaces (#940) * [EOS] When asPathType is Internal (IBGP), as_path is empty and the remote-as is the local_as (#1064) * [IOS] support n9k ipv6 ints for interfaces_ip getter (#969) * [IOS] support catalyst vss for mac_address getter (#968) * [IOS] Raise exception if BGP neighbor info requested and BGP not running (#970) * [NXOS] Implement nxos_ssh get_environment (#973) * Better handling of connection closing upon exceptions in enter (#994) * [NXOS] address single and multiple v6 address on n9k (#997) * [NXOS] Fix nxos and nxos_ssh hostname change handling (#999) * added option to run show run all (#1029) * [Junos] add optional arg for DB config selection (#1035) * [Junos] Fixed "Wrong interface information for Junos virtual-switch w/ bridge domains using get_network_instances" (#1032) * [EOS] Implemented lock_disable for EOS based on Junos. (#1042) * [NXOS] Work around NXAPI double quoting (#1048) * [NXOS] napalm.nxos.traceroute - VRF traces and handle AS in hops (#989) * [IOS] Fix extra line in show ip int brief on IOS (#986) * [NXOS] Expand nxos commit merge rollback error (#860) * [IOS] add support for VRF for get_arp_table func (#937) * [IOS] get_bgp_neighbors vrf and safi aware (#768) * [IOS] Check if temperature sensor on Cisco device is not supported (#1055) * [IOS] Fixes get_environment memory collection on ios-xe devices (#1053) * [IOS] get_route_to implementation for IOS (#750) OBS-URL: https://build.opensuse.org/request/show/789750 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=5
2020-03-30 12:54:03 +00:00
BuildRequires: %{python_module junos-eznc >= 2.2.1}
BuildRequires: %{python_module lxml >= 4.3.0}
BuildRequires: %{python_module ncclient}
BuildRequires: %{python_module netaddr}
BuildRequires: %{python_module netmiko >= 4.0.0}
BuildRequires: %{python_module paramiko >= 2.6.0}
BuildRequires: %{python_module pyeapi >= 0.8.2}
BuildRequires: %{python_module pytest >= 5.4.3}
Accepting request 800795 from home:mnhauke:network:automation - Update to version 3.0.0 Changes: * Integrated nxapi_plumbing and pyIOSXR into NAPALM. * [NXOS] If the command returns a null value then json.loads(None) throws an exception. * [NXOS] For Vlan interfaces nxos driver, the state is not correctly defined (related to json output). * [IOS] Return empty dictionary if BGP not running. * Fix Nornir + NAPALM threading issue. * [IOS, NXOS] get-vlans() getter implementation. * [IOS] Fix traceroute output parsing in ios. * [NXOS] firmware less than 7 does not support json in cli * Updated support for TwoGigabit & TwentyFiveGig interfaces to canonical_map.py * [NXOS]: Prevent nxos.get_interfaces_ip from failing if no ipv6 support. * [Junos] Added auto_probe optional argument. * [NXOS] Fix exception when trying to get environmental data from certain Nexus devices. * [IOS] Fix fix vrf detection when no vrf is defined. * [IOS-XR} No silent pass of errors in base.helpers & logging. * [IOS-XR] Add support for XML namespace prefixes in find_txt. * [NXOS] Fix get_vlans() method where no interfaces in VLAN. * [IOS] Added ``force_no_enable` optional argument. * [NXOS] Use Kickstart version to determine NXOS version. * [NXOS] Add nxos_ssh support for force_no_enable. * [EOS] Fix #1153: Strip double quotation on LLDP remote port. * [IOS] Fix typo in the traceoute method. * add a few less used canonical mappings. * [IOS] Fix show interfaces summary for 10/40/100 Gig Interfaces OBS-URL: https://build.opensuse.org/request/show/800795 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=7
2020-05-06 16:15:51 +00:00
BuildRequires: %{python_module requests >= 2.7.0}
BuildRequires: %{python_module scp}
BuildRequires: %{python_module setuptools >= 38.4.0}
BuildRequires: %{python_module textfsm}
BuildRequires: %{python_module typing_extensions}
# /SECTION
%python_subpackages
%description
NAPALM is a Python library that implements a set of functions to
interact with different router vendor devices using a unified API.
%prep
%autosetup -p1 -n napalm-%{version}
sed -i '1{/env python/d}' napalm/pyIOSXR/*.py
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/napalm
%python_clone -a %{buildroot}%{_bindir}/cl_napalm_validate
%python_clone -a %{buildroot}%{_bindir}/cl_napalm_test
%python_clone -a %{buildroot}%{_bindir}/cl_napalm_configure
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# FIXME: JunOS related unit tests are know to be broken with junos-eznc-2.3.0.
# Do not run those for now. https://github.com/napalm-automation/napalm/issues/1060
rm -Rf test/junos/
%pytest
%post
%python_install_alternative napalm
%python_install_alternative cl_napalm_validate
%python_install_alternative cl_napalm_test
%python_install_alternative cl_napalm_configure
%postun
%python_uninstall_alternative napalm
%python_uninstall_alternative cl_napalm_validate
%python_uninstall_alternative cl_napalm_test
%python_uninstall_alternative cl_napalm_configure
%files %{python_files}
%license LICENSE
%doc README.md
%python_alternative %{_bindir}/cl_napalm_configure
%python_alternative %{_bindir}/cl_napalm_test
%python_alternative %{_bindir}/cl_napalm_validate
%python_alternative %{_bindir}/napalm
%{python_sitelib}/*
%changelog