Hello community,

here is the log from the commit of package python-glean for openSUSE:Factory 
checked in at 2019-04-30 13:04:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-glean (Old)
 and      /work/SRC/openSUSE:Factory/.python-glean.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-glean"

Tue Apr 30 13:04:41 2019 rev:2 rq:698071 version:1.14.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-glean/python-glean.changes        
2019-01-10 15:23:24.946325820 +0100
+++ /work/SRC/openSUSE:Factory/.python-glean.new.5536/python-glean.changes      
2019-04-30 13:04:45.733982249 +0200
@@ -1,0 +2,7 @@
+Fri Apr 26 06:45:10 UTC 2019 - [email protected]
+
+- version update to 1.14.0
+  * Ignore Wireguard interfaces
+  * Use openstackdocstheme
+
+-------------------------------------------------------------------

Old:
----
  glean-1.13.0.tar.gz

New:
----
  glean-1.14.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-glean.spec ++++++
--- /var/tmp/diff_new_pack.83LxyC/_old  2019-04-30 13:04:46.389981122 +0200
+++ /var/tmp/diff_new_pack.83LxyC/_new  2019-04-30 13:04:46.393981116 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-glean
-Version:        1.13.0
+Version:        1.14.0
 Release:        0
 Summary:        Program to write static config from config-drive
 License:        Apache-2.0

++++++ glean-1.13.0.tar.gz -> glean-1.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glean-1.13.0/ChangeLog new/glean-1.14.0/ChangeLog
--- old/glean-1.13.0/ChangeLog  2019-01-08 05:43:31.000000000 +0100
+++ new/glean-1.14.0/ChangeLog  2019-04-11 06:51:29.000000000 +0200
@@ -1,6 +1,12 @@
 CHANGES
 =======
 
+1.14.0
+------
+
+* Ignore Wireguard interfaces
+* Use openstackdocstheme
+
 1.13.0
 ------
 
@@ -8,6 +14,7 @@
 * A systemd skip for Debuntu systems
 * Add NetworkManager distro plugin support
 * fix tox python3 overrides
+* write dns info to networkd
 * Pass arguments rather than distro to utility functions
 * Fix argv patching in unit tests
 * check networkd files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glean-1.13.0/PKG-INFO new/glean-1.14.0/PKG-INFO
--- old/glean-1.13.0/PKG-INFO   2019-01-08 05:43:31.000000000 +0100
+++ new/glean-1.14.0/PKG-INFO   2019-04-11 06:51:29.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: glean
-Version: 1.13.0
+Version: 1.14.0
 Summary: Simple program to write static config from config-drive
 Home-page: http://www.openstack.org/
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glean-1.13.0/doc/source/conf.py 
new/glean-1.14.0/doc/source/conf.py
--- old/glean-1.13.0/doc/source/conf.py 2019-01-08 05:41:17.000000000 +0100
+++ new/glean-1.14.0/doc/source/conf.py 2019-04-11 06:49:33.000000000 +0200
@@ -23,7 +23,7 @@
 extensions = [
     'sphinx.ext.autodoc',
     #'sphinx.ext.intersphinx',
-    'oslosphinx'
+    'openstackdocstheme'
 ]
 
 # autodoc generation is a bit aggressive and a nuisance when doing heavy
@@ -55,9 +55,13 @@
 # The theme to use for HTML and HTML Help pages.  Major themes that come with
 # Sphinx are currently 'default' and 'sphinxdoc'.
 # html_theme_path = ["."]
-# html_theme = '_theme'
+html_theme = 'openstackdocs'
 # html_static_path = ['static']
 
+# openstackdocstheme options
+repository_name = 'openstack-infra/glean'
+use_storyboard = True
+
 # Output file base name for HTML help builder.
 htmlhelp_basename = '%sdoc' % project
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glean-1.13.0/glean/cmd.py 
new/glean-1.14.0/glean/cmd.py
--- old/glean-1.13.0/glean/cmd.py       2019-01-08 05:41:17.000000000 +0100
+++ new/glean-1.14.0/glean/cmd.py       2019-04-11 06:49:37.000000000 +0200
@@ -31,6 +31,16 @@
 from glean import utils
 from glean._vendor import distro
 
+try:
+    import configparser
+except ImportError:
+    import ConfigParser as configparser
+
+try:
+    from StringIO import StringIO
+except ImportError:
+    from io import StringIO
+
 log = logging.getLogger("glean")
 
 
@@ -317,7 +327,7 @@
     return files_to_write
 
 
-def _write_networkd_interface(name, interfaces, files_struct=dict()):
+def _write_networkd_interface(name, interfaces, args, files_struct=dict()):
     vlans = []
     for interface in interfaces:
         iname = name
@@ -345,6 +355,15 @@
                 ('bond_mode' in interface)):
             if '[Network]' not in files_struct[network_file]:
                 files_struct[network_file]['[Network]'] = list()
+            if 'services' in interface:
+                for service in interface['services']:
+                    if service['type'] == 'dns':
+                        if not args.skip_dns:
+                            files_struct[network_file]['[Network]'].append(
+                                'DNS={address}'.format(
+                                    address=service['address']
+                                )
+                            )
         # dhcp network, set to yes if both dhcp6 and dhcp4 are set
         if interface['type'] == 'ipv4_dhcp':
             if 'DHCP=ipv6' in files_struct[network_file]['[Network]']:
@@ -497,7 +516,7 @@
     return files_struct
 
 
-def write_networkd_interfaces(interfaces, sys_interfaces):
+def write_networkd_interfaces(interfaces, sys_interfaces, args):
     files_to_write = dict()
     gen_intfs = {}
     files_struct = dict()
@@ -536,7 +555,7 @@
                 intf.get('link', intf['id']) for intf in interfs
                 if 'bond_mode' in intf)
         files_struct = _write_networkd_interface(
-            interface_name, interfs, files_struct)
+            interface_name, interfs, args, files_struct)
 
     for mac, iname in sorted(
             sys_interfaces.items(), key=lambda x: x[1]):
@@ -550,7 +569,7 @@
             continue
         interface = {'type': 'ipv4_dhcp', 'mac_address': mac}
         files_struct = _write_networkd_interface(
-            iname, [interface], files_struct)
+            iname, [interface], args, files_struct)
 
     for networkd_file in files_struct:
         file_contents = '# Automatically generated, do not edit\n'
@@ -923,10 +942,30 @@
 
 
 def write_dns_info(dns_servers):
-    results = ""
+    resolve_confs = {}
+    resolv_nameservers = ""
     for server in dns_servers:
-        results += "nameserver {0}\n".format(server)
-    return {'/etc/resolv.conf': results}
+        resolv_nameservers += "nameserver {0}\n".format(server)
+    resolve_confs['/etc/resolv.conf'] = resolv_nameservers
+    # set up resolved if available
+    if os.path.isfile('/etc/systemd/resolved.conf'):
+        # read the existing config  so we only overwrite what's needed
+        resolved_conf = configparser.ConfigParser()
+        resolved_conf.read('/etc/systemd/resolved.conf')
+        # create config section if not created
+        if not resolved_conf.has_section('Resolve'):
+            resolved_conf.add_section('Resolve')
+        # write space separated dns servers
+        resolved_conf.set('Resolve', 'DNS', " ".join(dns_servers))
+        # use stringio to output the resulting config to string
+        # configparser only outputs to file descriptors
+        resolved_conf_fd = StringIO("")
+        resolved_conf.write(resolved_conf_fd)
+        resolved_conf_output = resolved_conf_fd.getvalue()
+        resolved_conf_fd.close()
+        # add the config to files to be written
+        resolve_confs['/etc/systemd/resolved.conf'] = resolved_conf_output
+    return resolve_confs
 
 
 def get_config_drive_interfaces(net):
@@ -1023,7 +1062,7 @@
         )
     elif args.distro in 'networkd':
         files_to_write.update(
-            write_networkd_interfaces(interfaces, sys_interfaces)
+            write_networkd_interfaces(interfaces, sys_interfaces, args)
         )
     else:
         return False
@@ -1140,7 +1179,7 @@
     log.debug("Probing system interfaces")
     sys_root = os.path.join(args.root, 'sys/class/net')
 
-    ignored_interfaces = ('sit', 'tunl', 'bonding_master', 'teql',
+    ignored_interfaces = ('sit', 'tunl', 'bonding_master', 'teql', 'wg',
                           'ip6gre', 'ip6_vti', 'ip6tnl', 'bond', 'lo')
     sys_interfaces = {}
     if interface is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/glean-1.13.0/glean/tests/fixtures/rax-iad/mnt/config/openstack/latest/network_data.json
 
new/glean-1.14.0/glean/tests/fixtures/rax-iad/mnt/config/openstack/latest/network_data.json
--- 
old/glean-1.13.0/glean/tests/fixtures/rax-iad/mnt/config/openstack/latest/network_data.json
 2019-01-08 05:41:17.000000000 +0100
+++ 
new/glean-1.14.0/glean/tests/fixtures/rax-iad/mnt/config/openstack/latest/network_data.json
 2019-04-11 06:49:33.000000000 +0200
@@ -43,7 +43,17 @@
         }
       ],
       "ip_address": "2001:4802:7807:103:be76:4eff:fe20:d72f",
-      "id": "network1"
+      "id": "network1",
+      "services": [
+                {
+                    "address": "1111:2222:3333:4444::1234",
+                    "type": "dns"
+                },
+                {
+                    "address": "1.2.3.4",
+                    "type": "dns"
+                }
+            ]
     },
     {
       "network_id": "11111111-1111-1111-1111-111111111111",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/glean-1.13.0/glean/tests/fixtures/test/rax-iad.networkd.network.out.dns 
new/glean-1.14.0/glean/tests/fixtures/test/rax-iad.networkd.network.out.dns
--- old/glean-1.13.0/glean/tests/fixtures/test/rax-iad.networkd.network.out.dns 
1970-01-01 01:00:00.000000000 +0100
+++ new/glean-1.14.0/glean/tests/fixtures/test/rax-iad.networkd.network.out.dns 
2019-04-11 06:49:33.000000000 +0200
@@ -0,0 +1,52 @@
+### Write /etc/resolv.conf
+nameserver 69.20.0.196
+nameserver 69.20.0.164
+### Write /etc/systemd/network/eth0.network
+# Automatically generated, do not edit
+[Match]
+MACAddress=bc:76:4e:20:d7:2f
+Name=eth0
+
+[Network]
+DNS=1.2.3.4
+DNS=1111:2222:3333:4444::1234
+IPv6AcceptRA=no
+
+[Address]
+Address=146.20.110.113/24
+
+[Address]
+Address=2001:4802:7807:103:be76:4eff:fe20:d72f/64
+
+[Route]
+Destination=0.0.0.0/0
+Gateway=146.20.110.1
+
+[Route]
+Destination=::/0
+Gateway=fe80::def
+
+[Route]
+Destination=fd30::/48
+Gateway=fe80::f001
+
+### Write /etc/systemd/network/eth1.network
+# Automatically generated, do not edit
+[Match]
+MACAddress=bc:76:4e:20:d7:33
+Name=eth1
+
+[Network]
+IPv6AcceptRA=no
+
+[Address]
+Address=10.210.32.174/19
+
+[Route]
+Destination=10.176.0.0/12
+Gateway=10.210.32.1
+
+[Route]
+Destination=10.208.0.0/12
+Gateway=10.210.32.1
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glean-1.13.0/glean/tests/test_glean.py 
new/glean-1.14.0/glean/tests/test_glean.py
--- old/glean-1.13.0/glean/tests/test_glean.py  2019-01-08 05:41:17.000000000 
+0100
+++ new/glean-1.14.0/glean/tests/test_glean.py  2019-04-11 06:49:33.000000000 
+0200
@@ -84,7 +84,7 @@
                      '/etc/conf.d', '/etc/init.d', '/etc/sysconfig/network',
                      '/etc/systemd/network')
         mock_files = ('/etc/resolv.conf', '/etc/hostname', '/etc/hosts',
-                      '/bin/systemctl')
+                      '/etc/systemd/resolved.conf', '/bin/systemctl')
         if (path.startswith(mock_dirs) or path in mock_files):
             try:
                 mock_handle = self.file_handle_mocks[path]
@@ -198,6 +198,9 @@
 
         output_filename = '%s.%s.network.out' % (provider, distro.lower())
         output_path = os.path.join(sample_data_path, 'test', output_filename)
+        if not skip_dns:
+            if os.path.exists(output_path + '.dns'):
+                output_path = output_path + '.dns'
 
         # Generate a list of (dest, content) into write_blocks to assert
         write_blocks = []
@@ -271,7 +274,8 @@
     # comes up with "--interface".  This simulates that.
     def test_glean_systemd(self):
         with mock.patch('glean.systemlock.Lock'):
-            self._assert_distro_provider(self.distro, self.style, 'eth0')
+            self._assert_distro_provider(self.distro, self.style,
+                                         'eth0', skip_dns=True)
 
     def test_glean_skip_dns(self):
         with mock.patch('glean.systemlock.Lock'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glean-1.13.0/glean.egg-info/PKG-INFO 
new/glean-1.14.0/glean.egg-info/PKG-INFO
--- old/glean-1.13.0/glean.egg-info/PKG-INFO    2019-01-08 05:43:31.000000000 
+0100
+++ new/glean-1.14.0/glean.egg-info/PKG-INFO    2019-04-11 06:51:29.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: glean
-Version: 1.13.0
+Version: 1.14.0
 Summary: Simple program to write static config from config-drive
 Home-page: http://www.openstack.org/
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glean-1.13.0/glean.egg-info/SOURCES.txt 
new/glean-1.14.0/glean.egg-info/SOURCES.txt
--- old/glean-1.13.0/glean.egg-info/SOURCES.txt 2019-01-08 05:43:31.000000000 
+0100
+++ new/glean-1.14.0/glean.egg-info/SOURCES.txt 2019-04-11 06:51:29.000000000 
+0200
@@ -177,6 +177,7 @@
 glean/tests/fixtures/test/rax-iad.gentoo.network.out
 glean/tests/fixtures/test/rax-iad.keys.out
 glean/tests/fixtures/test/rax-iad.networkd.network.out
+glean/tests/fixtures/test/rax-iad.networkd.network.out.dns
 glean/tests/fixtures/test/rax-iad.opensuse.network.out
 glean/tests/fixtures/test/rax-iad.redhat.network.out
 glean/tests/fixtures/test/rax-iad.ubuntu.network.out
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glean-1.13.0/glean.egg-info/pbr.json 
new/glean-1.14.0/glean.egg-info/pbr.json
--- old/glean-1.13.0/glean.egg-info/pbr.json    2019-01-08 05:43:31.000000000 
+0100
+++ new/glean-1.14.0/glean.egg-info/pbr.json    2019-04-11 06:51:29.000000000 
+0200
@@ -1 +1 @@
-{"git_version": "8ca30bd", "is_release": true}
\ No newline at end of file
+{"git_version": "64718a1", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glean-1.13.0/test-requirements.txt 
new/glean-1.14.0/test-requirements.txt
--- old/glean-1.13.0/test-requirements.txt      2019-01-08 05:41:17.000000000 
+0100
+++ new/glean-1.14.0/test-requirements.txt      2019-04-11 06:49:33.000000000 
+0200
@@ -8,7 +8,7 @@
 mock>=1.0
 python-subunit
 sphinx>=1.1.2
-oslosphinx
+openstackdocstheme
 oslotest>=1.1.0.0a1
 testrepository>=0.0.18
 testscenarios>=0.4


Reply via email to