SHA256
1
0
forked from pool/salt

Accepting request 605688 from systemsmanagement:saltstack:testing

- Fixed Python 3 issue with CIDR addresses.
- Added:
  * fixed-usage-of-ipaddress.patch

OBS-URL: https://build.opensuse.org/request/show/605688
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=121
This commit is contained in:
Jochen Breuer 2018-05-09 09:09:28 +00:00 committed by Git OBS Bridge
parent 0aa0223de4
commit 6169156adc
4 changed files with 40 additions and 1 deletions

View File

@ -1 +1 @@
057b96d7f072dc69b61ca9e3b8d04a890003e58f
191f12d1f56ce5b5645ae420da0392941bcb2de4

View File

@ -0,0 +1,28 @@
From 205e031f6e5552ac860120f7ac852e24c5da73e5 Mon Sep 17 00:00:00 2001
From: Jochen Breuer <jbreuer@suse.de>
Date: Sun, 22 Apr 2018 23:11:11 +0200
Subject: [PATCH] Fixed usage of ipaddress
ipaddress is imported either directly or from salt.ext. If we
use it, we shouldn't address it with salt.ext.ipaddress.
---
salt/modules/network.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/salt/modules/network.py b/salt/modules/network.py
index f188fd7954..92893572a6 100644
--- a/salt/modules/network.py
+++ b/salt/modules/network.py
@@ -1140,7 +1140,7 @@ def convert_cidr(cidr):
ret = {'network': None,
'netmask': None}
cidr = calc_net(cidr)
- network_info = salt.ext.ipaddress.ip_network(cidr)
+ network_info = ipaddress.ip_network(cidr)
ret['network'] = six.text_type(network_info.network_address)
ret['netmask'] = six.text_type(network_info.netmask)
return ret
--
2.13.6

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri May 4 12:17:07 UTC 2018 - Jochen Breuer <jbreuer@suse.de>
- Fixed Python 3 issue with CIDR addresses.
- Added:
* fixed-usage-of-ipaddress.patch
-------------------------------------------------------------------
Wed Apr 25 14:50:36 UTC 2018 - Pablo Suárez Hernández <psuarezhernandez@suse.com>

View File

@ -96,6 +96,8 @@ Patch17: strip-trailing-commas-on-linux-user-gecos-fields.patch
Patch18: provide-kwargs-to-pkg_resource.parse_targets-require.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/47270
Patch19: initialize-__context__-retcode-for-functions-handled.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/47232
Patch20: fixed-usage-of-ipaddress.patch
# BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -574,6 +576,7 @@ cp %{S:5} ./.travis.yml
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%build
%if 0%{?build_py2}