Hello community,

here is the log from the commit of package python-mistralclient for 
openSUSE:Factory checked in at 2018-01-24 15:27:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mistralclient (Old)
 and      /work/SRC/openSUSE:Factory/.python-mistralclient.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-mistralclient"

Wed Jan 24 15:27:08 2018 rev:5 rq:567267 version:3.1.4

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-mistralclient/python-mistralclient.changes    
    2017-09-23 21:34:20.981283327 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-mistralclient.new/python-mistralclient.changes
   2018-01-24 15:27:16.919405033 +0100
@@ -1,0 +2,8 @@
+Mon Jan 15 11:45:12 UTC 2018 - [email protected]
+
+- update to version 3.1.4
+  - Don't create client for help and bash completion
+  - Fix several problems in keycloak auth module
+  - Updated from global requirements
+
+-------------------------------------------------------------------

Old:
----
  python-mistralclient-3.1.3.tar.gz

New:
----
  python-mistralclient-3.1.4.tar.gz

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

Other differences:
------------------
++++++ python-mistralclient.spec ++++++
--- /var/tmp/diff_new_pack.lYf2Sd/_old  2018-01-24 15:27:18.123348722 +0100
+++ /var/tmp/diff_new_pack.lYf2Sd/_new  2018-01-24 15:27:18.123348722 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-mistralclient
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,37 +17,37 @@
 
 
 Name:           python-mistralclient
-Version:        3.1.3
+Version:        3.1.4
 Release:        0
 Summary:        Python API and CLI for OpenStack Mistral
 License:        Apache-2.0
 Group:          Development/Languages/Python
 Url:            http://launchpad.net/%{name}
-Source0:        
https://pypi.io/packages/source/p/%{name}/%{name}-%{version}.tar.gz
+Source0:        
https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
 BuildRequires:  openstack-macros
-BuildRequires:  python-PyYAML >= 3.10.0
+BuildRequires:  python-PyYAML >= 3.10
 BuildRequires:  python-devel
 BuildRequires:  python-fixtures >= 3.0.0
-BuildRequires:  python-mock >= 2.0
-BuildRequires:  python-nose
-BuildRequires:  python-openstackclient >= 3.11.0
+BuildRequires:  python-mock >= 2.0.0
+BuildRequires:  python-nose >= 1.3.7
+BuildRequires:  python-openstackclient >= 3.12.0
 BuildRequires:  python-oslotest >= 1.10.0
 BuildRequires:  python-osprofiler >= 1.4.0
 BuildRequires:  python-pbr >= 2.0.0
-BuildRequires:  python-requests-mock >= 1.1
+BuildRequires:  python-requests-mock >= 1.1.0
 BuildRequires:  python-setuptools >= 16.0
 BuildRequires:  python-testrepository >= 0.0.18
-BuildRequires:  python-testtools >= 1.4.0
-Requires:       python-PyYAML >= 3.10.0
+BuildRequires:  python-testtools >= 2.2.0
+Requires:       python-PyYAML >= 3.10
 Requires:       python-cliff >= 2.8.0
 Requires:       python-keystoneclient >= 3.8.0
 Requires:       python-os-client-config >= 1.28.0
 Requires:       python-osc-lib >= 1.7.0
-Requires:       python-oslo.i18n >= 2.1.0
-Requires:       python-oslo.utils >= 3.20.0
+Requires:       python-oslo.i18n >= 3.15.3
+Requires:       python-oslo.utils >= 3.31.0
 Requires:       python-osprofiler >= 1.4.0
 Requires:       python-requests >= 2.14.2
-Requires:       python-six >= 1.9.0
+Requires:       python-six >= 1.10.0
 Requires:       python-stevedore >= 1.20.0
 BuildArch:      noarch
 
@@ -57,9 +57,9 @@
 
 %package doc
 Summary:        Documentation for OpenStack Mistral API client libary
-Group:          Documentation
+Group:          Documentation/HTML
 BuildRequires:  python-Sphinx
-BuildRequires:  python-openstackdocstheme >= 1.16.0
+BuildRequires:  python-openstackdocstheme >= 1.17.0
 
 %description doc
 Client library for Mistral built on the Mistral API. It provides a Python API

++++++ _service ++++++
--- /var/tmp/diff_new_pack.lYf2Sd/_old  2018-01-24 15:27:18.155347226 +0100
+++ /var/tmp/diff_new_pack.lYf2Sd/_new  2018-01-24 15:27:18.155347226 +0100
@@ -1,8 +1,8 @@
 <services>
   <service mode="disabled" name="renderspec">
-    <param 
name="input-template">https://git.openstack.org/cgit/openstack/rpm-packaging/plain/openstack/python-mistralclient/python-mistralclient.spec.j2?h=stable/pike</param>
+    <param 
name="input-template">https://git.openstack.org/cgit/openstack/rpm-packaging/plain/openstack/python-mistralclient/python-mistralclient.spec.j2?h=master</param>
     <param name="output-name">python-mistralclient.spec</param>
-    <param 
name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/pike/global-requirements.txt</param>
+    <param 
name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/requirements.txt</param>
     <param name="changelog-email">[email protected]</param>
     <param name="changelog-provider">gh,openstack,python-mistralclient</param>
 

++++++ python-mistralclient-3.1.3.tar.gz -> python-mistralclient-3.1.4.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-mistralclient-3.1.3/AUTHORS 
new/python-mistralclient-3.1.4/AUTHORS
--- old/python-mistralclient-3.1.3/AUTHORS      2017-09-08 00:21:46.000000000 
+0200
+++ new/python-mistralclient-3.1.4/AUTHORS      2017-11-03 00:53:29.000000000 
+0100
@@ -56,6 +56,7 @@
 W Chan <[email protected]>
 Winson Chan <[email protected]>
 Zhenguo Niu <[email protected]>
+Zuul <[email protected]>
 fengchaoyang <[email protected]>
 gengchc2 <[email protected]>
 hardik <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-mistralclient-3.1.3/ChangeLog 
new/python-mistralclient-3.1.4/ChangeLog
--- old/python-mistralclient-3.1.3/ChangeLog    2017-09-08 00:21:45.000000000 
+0200
+++ new/python-mistralclient-3.1.4/ChangeLog    2017-11-03 00:53:29.000000000 
+0100
@@ -1,6 +1,13 @@
 CHANGES
 =======
 
+3.1.4
+-----
+
+* Don't create client for help and bash completion
+* Fix several problems in keycloak auth module
+* Updated from global requirements
+
 3.1.3
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-mistralclient-3.1.3/PKG-INFO 
new/python-mistralclient-3.1.4/PKG-INFO
--- old/python-mistralclient-3.1.3/PKG-INFO     2017-09-08 00:21:47.000000000 
+0200
+++ new/python-mistralclient-3.1.4/PKG-INFO     2017-11-03 00:53:30.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: python-mistralclient
-Version: 3.1.3
+Version: 3.1.4
 Summary: Mistral Client Library
 Home-page: 
http://docs.openstack.org/developer/mistral/guides/mistralclient_guide.html
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-mistralclient-3.1.3/mistralclient/auth/keycloak.py 
new/python-mistralclient-3.1.4/mistralclient/auth/keycloak.py
--- old/python-mistralclient-3.1.3/mistralclient/auth/keycloak.py       
2017-09-08 00:17:49.000000000 +0200
+++ new/python-mistralclient-3.1.4/mistralclient/auth/keycloak.py       
2017-11-03 00:50:02.000000000 +0100
@@ -38,10 +38,10 @@
             * client_id: Client ID (according to OpenID Connect protocol).
             * client_secret: Client secret (according to OpenID Connect
                 protocol).
-            * realm_name: KeyCloak realm name.
+            * project_name: KeyCloak realm name.
             * username: User name (Optional, if None then access_token must be
                 provided).
-            * password: Password (Optional).
+            * api_key: Password (Optional).
             * access_token: Access token. If passed, username and password are
                 not used and this method just validates the token and refreshes
                 it if needed (Optional, if None then username must be
@@ -59,9 +59,9 @@
         auth_url = req.get('auth_url')
         client_id = req.get('client_id')
         client_secret = req.get('client_secret')
-        realm_name = req.get('realm_name')
+        realm_name = req.get('project_name')
         username = req.get('username')
-        password = req.get('password')
+        password = req.get('api_key')
         access_token = req.get('access_token')
         cacert = req.get('cacert')
         insecure = req.get('insecure', False)
@@ -72,9 +72,6 @@
         if not client_id:
             raise ValueError('Client ID is not provided.')
 
-        if not client_secret:
-            raise ValueError('Client secret is not provided.')
-
         if not realm_name:
             raise ValueError('Project(realm) name is not provided.')
 
@@ -110,9 +107,7 @@
                 insecure
             )
 
-        response['project_id'] = realm_name
-
-        return response
+        return {'auth_token': response, 'project_id': realm_name}
 
     @staticmethod
     def _authenticate_with_token(auth_url, client_id, client_secret,
@@ -131,20 +126,21 @@
 
         verify = None
         if urllib.parse.urlparse(access_token_endpoint).scheme == "https":
-            verify = False if insecure else cacert
-
-        client_auth = (client_id, client_secret)
+            verify = False if insecure else cacert if cacert else True
 
         body = {
             'grant_type': 'password',
             'username': username,
             'password': password,
+            'client_id': client_id,
             'scope': 'profile'
         }
 
+        if client_secret:
+            body['client_secret'] = client_secret,
+
         resp = requests.post(
             access_token_endpoint,
-            auth=client_auth,
             data=body,
             verify=verify
         )
@@ -177,6 +173,10 @@
             return ca
     LOG.warning("System ca file could not be found.")
 
+# An example of working curl request to keycloak
+# curl -d "client_id=admin-cli" -d "client_secret=secret"
+# -d "username=admin" -d "password=qwerty" -d "grant_type=password"
+# "http://localhost:8080/auth/realms/master/protocol/openid-connect/token";
 
 # An example of using KeyCloak OpenID authentication.
 if __name__ == '__main__':
@@ -188,12 +188,12 @@
         dict(
             "https://my.keycloak:8443/auth";,
             client_id="mistral_client",
-            client_secret="4a080907-921b-409a-b793-c431609c3a47",
-            realm_name="mistral",
+            client_secret="secret",
+            project_name="mistral",
             username="user",
-            password="secret",
+            api_key="secret",
             insecure=True
         )
-    )
+    )['auth_token']
 
-    print("Access token: %s" % a_token)
+    print("Auth token: %s" % a_token)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-mistralclient-3.1.3/mistralclient/shell.py 
new/python-mistralclient-3.1.4/mistralclient/shell.py
--- old/python-mistralclient-3.1.3/mistralclient/shell.py       2017-09-08 
00:17:50.000000000 +0200
+++ new/python-mistralclient-3.1.4/mistralclient/shell.py       2017-11-03 
00:50:15.000000000 +0100
@@ -523,7 +523,13 @@
 
         self._set_shell_commands(self._get_commands(ver))
 
-        do_help = ('help' in argv) or ('-h' in argv) or not argv
+        # bash-completion and help messages should not require client creation
+        need_client = not (
+            ('bash-completion' in argv) or
+            ('help' in argv) or
+            ('-h' in argv) or
+            ('--help' in argv) or
+            not argv)
 
         # Set default for auth_url if not supplied. The default is not
         # set at the parser to support use cases where auth is not enabled.
@@ -532,10 +538,6 @@
             if self.options.password or self.options.token:
                 self.options.auth_url = 'http://localhost:35357/v3'
 
-        # bash-completion should not require authentification.
-        if do_help or ('bash-completion' in argv):
-            self.options.auth_url = None
-
         if self.options.auth_url and not self.options.token:
             if not self.options.username:
                 raise exe.IllegalArgumentException(
@@ -549,6 +551,19 @@
                      "via --os-password env[OS_PASSWORD]")
                 )
 
+        self.client = self._create_client() if need_client else None
+
+        # Adding client_manager variable to make mistral client work with
+        # unified OpenStack client.
+        ClientManager = type(
+            'ClientManager',
+            (object,),
+            dict(workflow_engine=self.client)
+        )
+
+        self.client_manager = ClientManager()
+
+    def _create_client(self):
         kwargs = {
             'cert': self.options.os_cert,
             'key': self.options.os_key,
@@ -556,7 +571,7 @@
             'project_domain_name': self.options.project_domain_name
         }
 
-        self.client = client.client(
+        return client.client(
             mistral_url=self.options.mistral_url,
             username=self.options.username,
             api_key=self.options.password,
@@ -585,16 +600,6 @@
             **kwargs
         )
 
-        # Adding client_manager variable to make mistral client work with
-        # unified OpenStack client.
-        ClientManager = type(
-            'ClientManager',
-            (object,),
-            dict(workflow_engine=self.client)
-        )
-
-        self.client_manager = ClientManager()
-
     def _set_shell_commands(self, cmds_dict):
         for k, v in cmds_dict.items():
             self.command_manager.add_command(k, v)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-mistralclient-3.1.3/mistralclient/tests/unit/test_shell.py 
new/python-mistralclient-3.1.4/mistralclient/tests/unit/test_shell.py
--- old/python-mistralclient-3.1.3/mistralclient/tests/unit/test_shell.py       
2017-09-08 00:17:50.000000000 +0200
+++ new/python-mistralclient-3.1.4/mistralclient/tests/unit/test_shell.py       
2017-11-03 00:50:15.000000000 +0100
@@ -19,6 +19,17 @@
 
 class TestShell(base.BaseShellTests):
 
+    def test_help(self):
+        """Test that client is not created for help and bash complete"""
+        for command in ('-h',
+                        '--help',
+                        'help',
+                        'help workbook-list',
+                        'bash-completion'):
+            with mock.patch('mistralclient.api.client.client') as client_mock:
+                self.shell(command)
+                self.assertFalse(client_mock.called)
+
     @mock.patch('mistralclient.api.client.client')
     def test_command_no_mistral_url(self, client_mock):
         self.shell(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-mistralclient-3.1.3/python_mistralclient.egg-info/PKG-INFO 
new/python-mistralclient-3.1.4/python_mistralclient.egg-info/PKG-INFO
--- old/python-mistralclient-3.1.3/python_mistralclient.egg-info/PKG-INFO       
2017-09-08 00:21:46.000000000 +0200
+++ new/python-mistralclient-3.1.4/python_mistralclient.egg-info/PKG-INFO       
2017-11-03 00:53:29.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: python-mistralclient
-Version: 3.1.3
+Version: 3.1.4
 Summary: Mistral Client Library
 Home-page: 
http://docs.openstack.org/developer/mistral/guides/mistralclient_guide.html
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-mistralclient-3.1.3/python_mistralclient.egg-info/pbr.json 
new/python-mistralclient-3.1.4/python_mistralclient.egg-info/pbr.json
--- old/python-mistralclient-3.1.3/python_mistralclient.egg-info/pbr.json       
2017-09-08 00:21:46.000000000 +0200
+++ new/python-mistralclient-3.1.4/python_mistralclient.egg-info/pbr.json       
2017-11-03 00:53:29.000000000 +0100
@@ -1 +1 @@
-{"git_version": "c33d39c", "is_release": true}
\ No newline at end of file
+{"git_version": "291501a", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-mistralclient-3.1.3/test-requirements.txt 
new/python-mistralclient-3.1.4/test-requirements.txt
--- old/python-mistralclient-3.1.3/test-requirements.txt        2017-09-08 
00:17:50.000000000 +0200
+++ new/python-mistralclient-3.1.4/test-requirements.txt        2017-11-03 
00:50:15.000000000 +0100
@@ -2,7 +2,7 @@
 # of appearance. Changing the order has an impact on the overall integration
 # process, which may cause wedges in the gate later.
 hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
-python-openstackclient!=3.10.0,>=3.3.0 # Apache-2.0
+python-openstackclient>=3.11.0 # Apache-2.0
 sphinx>=1.6.2 # BSD
 mock>=2.0 # BSD
 nose # LGPL


Reply via email to