Hello community,

here is the log from the commit of package python-keystoneclient for 
openSUSE:Factory checked in at 2014-03-09 20:13:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-keystoneclient (Old)
 and      /work/SRC/openSUSE:Factory/.python-keystoneclient.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-keystoneclient"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-keystoneclient/python-keystoneclient.changes  
    2014-01-23 15:54:16.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-keystoneclient.new/python-keystoneclient.changes
 2014-03-09 20:13:15.000000000 +0100
@@ -1,0 +2,25 @@
+Fri Feb 28 16:56:06 UTC 2014 - iartar...@suse.com
+
+- Backport patch to ask for password interactively for keystone
+ user-create:
+ + 0001-Interactive-prompt-for-create-user.patch
+
+-------------------------------------------------------------------
+Fri Feb 14 10:47:00 UTC 2014 - speili...@suse.com
+
+- Replace git_tarballs source service with download_files and set_version
+  + Use upstream URL as source (enables verification)
+
+-------------------------------------------------------------------
+Thu Jan 30 01:05:59 UTC 2014 - cloud-de...@suse.de
+
+- Rebased patches:
+  + 0001-Add-workaround-for-OSError-raised-by-Popen.communica.patch (only 
offset)
+  + 0001-Make-ROOTDIR-determination-more-robust.patch (only offset)
+
+-------------------------------------------------------------------
+Wed Jan 29 09:12:36 UTC 2014 - speili...@suse.com
+
+- Add refresh_patches source service
+
+-------------------------------------------------------------------

New:
----
  0001-Interactive-prompt-for-create-user.patch

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

Other differences:
------------------
++++++ python-keystoneclient.spec ++++++
--- /var/tmp/diff_new_pack.PCAowV/_old  2014-03-09 20:13:15.000000000 +0100
+++ /var/tmp/diff_new_pack.PCAowV/_new  2014-03-09 20:13:15.000000000 +0100
@@ -25,10 +25,13 @@
 License:        Apache-2.0
 Group:          Development/Languages/Python
 Url:            http://launchpad.net/python-keystoneclient
-Source:         python-keystoneclient-0.4.1.tar.gz
+Source:         
http://tarballs.openstack.org/python-keystoneclient/python-keystoneclient-0.4.1.tar.gz
 Source2:        openstack-keystone.sh
 Patch0:         0001-Add-workaround-for-OSError-raised-by-Popen.communica.patch
 Patch1:         0001-Make-ROOTDIR-determination-more-robust.patch
+# Adds an interactive prompt for entering the password when creating a
+# new user from the CLI - backported from master
+Patch2:         0001-Interactive-prompt-for-create-user.patch
 BuildRequires:  fdupes
 BuildRequires:  openstack-suse-macros
 BuildRequires:  python-base
@@ -99,9 +102,10 @@
 This package contains testsuite files for %{name}.
 
 %prep
-%setup -q -n python-keystoneclient-0.4.1
+%setup -q -n python-keystoneclient-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 %openstack_cleanup_prep
 
 %build

++++++ 0001-Add-workaround-for-OSError-raised-by-Popen.communica.patch ++++++
--- /var/tmp/diff_new_pack.PCAowV/_old  2014-03-09 20:13:15.000000000 +0100
+++ /var/tmp/diff_new_pack.PCAowV/_new  2014-03-09 20:13:15.000000000 +0100
@@ -1,7 +1,8 @@
-diff -ruN a/keystoneclient/common/cms.py b/keystoneclient/common/cms.py
---- a/keystoneclient/common/cms.py     2013-10-09 21:46:20.000000000 +0200
-+++ b/keystoneclient/common/cms.py     2013-10-14 09:52:06.493270055 +0200
-@@ -38,6 +38,36 @@
+Index: python-keystoneclient-0.4.1/keystoneclient/common/cms.py
+===================================================================
+--- python-keystoneclient-0.4.1.orig/keystoneclient/common/cms.py
++++ python-keystoneclient-0.4.1/keystoneclient/common/cms.py
+@@ -38,6 +38,36 @@ def _ensure_subprocess():
              import subprocess  # noqa
  
  
@@ -38,7 +39,7 @@
  def cms_verify(formatted, signing_cert_file_name, ca_file_name):
      """Verifies the signature of the contents IAW CMS syntax.
  
-@@ -53,8 +83,10 @@
+@@ -53,8 +83,10 @@ def cms_verify(formatted, signing_cert_f
                                 stdin=subprocess.PIPE,
                                 stdout=subprocess.PIPE,
                                 stderr=subprocess.PIPE)
@@ -51,7 +52,7 @@
      if retcode:
          # Do not log errors, as some happen in the positive thread
          # instead, catch them in the calling code and log them there.
-@@ -150,8 +182,10 @@
+@@ -150,8 +182,10 @@ def cms_sign_text(text, signing_cert_fil
                                 stdin=subprocess.PIPE,
                                 stdout=subprocess.PIPE,
                                 stderr=subprocess.PIPE)
@@ -64,10 +65,11 @@
      if retcode or "Error" in err:
          LOG.error('Signing error: %s' % err)
          raise subprocess.CalledProcessError(retcode, "openssl")
-diff -ruN a/keystoneclient/tests/client_fixtures.py 
b/keystoneclient/tests/client_fixtures.py
---- a/keystoneclient/tests/client_fixtures.py  2013-10-09 21:46:20.000000000 
+0200
-+++ b/keystoneclient/tests/client_fixtures.py  2013-10-14 09:52:06.109272165 
+0200
-@@ -26,7 +26,7 @@
+Index: python-keystoneclient-0.4.1/keystoneclient/tests/client_fixtures.py
+===================================================================
+--- python-keystoneclient-0.4.1.orig/keystoneclient/tests/client_fixtures.py
++++ python-keystoneclient-0.4.1/keystoneclient/tests/client_fixtures.py
+@@ -28,7 +28,7 @@ CLIENTDIR = os.path.dirname(os.path.dirn
  ROOTDIR = os.path.dirname(CLIENTDIR)
  CERTDIR = os.path.join(ROOTDIR, 'examples', 'pki', 'certs')
  CMSDIR = os.path.join(ROOTDIR, 'examples', 'pki', 'cms')
@@ -76,7 +78,7 @@
  
  # @TODO(mordred) This should become a testresources resource attached to the
  #                class
-@@ -49,9 +49,17 @@
+@@ -51,9 +51,17 @@ with open(os.path.join(CMSDIR, 'revocati
      REVOCATION_LIST = jsonutils.loads(f.read())
  with open(os.path.join(CMSDIR, 'revocation_list.pem')) as f:
      SIGNED_REVOCATION_LIST = jsonutils.dumps({'signed': f.read()})
@@ -96,10 +98,11 @@
      SIGNING_CA = f.read()
  
  UUID_TOKEN_DEFAULT = "ec6c0710ec2f471498484c1b53ab4f9d"
-diff -ruN a/keystoneclient/tests/test_auth_token_middleware.py 
b/keystoneclient/tests/test_auth_token_middleware.py
---- a/keystoneclient/tests/test_auth_token_middleware.py       2013-10-09 
21:46:20.000000000 +0200
-+++ b/keystoneclient/tests/test_auth_token_middleware.py       2013-10-14 
09:52:46.021052970 +0200
-@@ -20,6 +20,7 @@
+Index: 
python-keystoneclient-0.4.1/keystoneclient/tests/test_auth_token_middleware.py
+===================================================================
+--- 
python-keystoneclient-0.4.1.orig/keystoneclient/tests/test_auth_token_middleware.py
++++ 
python-keystoneclient-0.4.1/keystoneclient/tests/test_auth_token_middleware.py
+@@ -20,6 +20,7 @@ import iso8601
  import os
  import shutil
  import stat
@@ -107,7 +110,7 @@
  import sys
  import tempfile
  import testtools
-@@ -1256,6 +1257,78 @@
+@@ -1256,6 +1257,78 @@ class TokenEncodingTest(testtools.TestCa
          self.assertEqual('foo%20bar', auth_token.safe_quote('foo%20bar'))
  
  

++++++ 0001-Interactive-prompt-for-create-user.patch ++++++
>From 370a54c4e512649f6596393d11c636c70a8956ac Mon Sep 17 00:00:00 2001
From: Eric Brown <bro...@vmware.com>
Date: Tue, 14 Jan 2014 09:19:42 -0800
Subject: [PATCH] Interactive prompt for create user

Execution of the shell will now prompt the user for a password if argument
'--pass' is specified without a following parameter.  In that way, a user does
not need to pass passwords on the command line.

Usage example:
$ keystone user-create --name bob --tenant admin --pass --enabled true
New Password:
Repeat New Password:

Closes-Bug: #1100116
Change-Id: I1f6d6322830972dfad19ebe2fe63e91f82ed8033
---
 keystoneclient/tests/v2_0/test_shell.py | 15 +++++++++++++++
 keystoneclient/v2_0/shell.py            | 10 +++++++---
 2 files changed, 22 insertions(+), 3 deletions(-)
 mode change 100644 => 100755 keystoneclient/v2_0/shell.py

diff --git a/keystoneclient/tests/v2_0/test_shell.py 
b/keystoneclient/tests/v2_0/test_shell.py
index 1b6db20..7e10c6e 100644
--- a/keystoneclient/tests/v2_0/test_shell.py
+++ b/keystoneclient/tests/v2_0/test_shell.py
@@ -16,6 +16,7 @@ import cStringIO
 import os
 import sys
 
+import mock
 from mox3 import stubout
 from testtools import matchers
 
@@ -104,6 +105,20 @@ class ShellTests(utils.TestCase):
                  'name': 'new-user',
                  'tenantId': None}})
 
+    @mock.patch('sys.stdin', autospec=True)
+    def test_user_create_password_prompt(self, mock_stdin):
+        with mock.patch('getpass.getpass') as mock_getpass:
+            mock_getpass.return_value = 'newpass'
+            self.run_command('user-create --name new-user --pass')
+            self.fake_client.assert_called_anytime(
+                'POST', '/users',
+                {'user':
+                    {'email': None,
+                     'password': 'newpass',
+                     'enabled': True,
+                     'name': 'new-user',
+                     'tenantId': None}})
+
     def test_user_get(self):
         self.run_command('user-get 1')
         self.fake_client.assert_called_anytime('GET', '/users/1')
diff --git a/keystoneclient/v2_0/shell.py b/keystoneclient/v2_0/shell.py
old mode 100644
new mode 100755
index d241571..235f35f
--- a/keystoneclient/v2_0/shell.py
+++ b/keystoneclient/v2_0/shell.py
@@ -26,6 +26,7 @@ from keystoneclient.v2_0 import client
 
 
 CLIENT_CLASS = client.Client
+ASK_FOR_PASSWORD = object()
 
 
 def require_service_catalog(f):
@@ -70,8 +71,8 @@ def do_user_get(kc, args):
 @utils.arg('--tenant', '--tenant-id', metavar='<tenant>',
            help='New user default tenant')
 @utils.arg('--tenant_id', help=argparse.SUPPRESS)
-@utils.arg('--pass', metavar='<pass>', dest='passwd',
-           help='New user password')
+@utils.arg('--pass', metavar='<pass>', dest='passwd', nargs='?',
+           const=ASK_FOR_PASSWORD, help='New user password')
 @utils.arg('--email', metavar='<email>',
            help='New user email address')
 @utils.arg('--enabled', metavar='<true|false>', default=True,
@@ -84,7 +85,10 @@ def do_user_create(kc, args):
         tenant_id = args.tenant_id
     else:
         tenant_id = None
-    user = kc.users.create(args.name, args.passwd, args.email,
+    new_passwd = args.passwd
+    if args.passwd is ASK_FOR_PASSWORD:
+        new_passwd = utils.prompt_for_password()
+    user = kc.users.create(args.name, new_passwd, args.email,
                            tenant_id=tenant_id,
                            enabled=utils.string_to_bool(args.enabled))
     utils.print_dict(user._info)
-- 
1.8.5.2

++++++ 0001-Make-ROOTDIR-determination-more-robust.patch ++++++
--- /var/tmp/diff_new_pack.PCAowV/_old  2014-03-09 20:13:15.000000000 +0100
+++ /var/tmp/diff_new_pack.PCAowV/_new  2014-03-09 20:13:15.000000000 +0100
@@ -11,11 +11,11 @@
  keystoneclient/tests/client_fixtures.py | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-Index: 
python-keystoneclient-0.3.2.78.gbaa9490/keystoneclient/tests/client_fixtures.py
+Index: python-keystoneclient-0.4.1/keystoneclient/tests/client_fixtures.py
 ===================================================================
---- 
python-keystoneclient-0.3.2.78.gbaa9490.orig/keystoneclient/tests/client_fixtures.py
-+++ 
python-keystoneclient-0.3.2.78.gbaa9490/keystoneclient/tests/client_fixtures.py
-@@ -22,8 +22,8 @@ from keystoneclient.openstack.common imp
+--- python-keystoneclient-0.4.1.orig/keystoneclient/tests/client_fixtures.py
++++ python-keystoneclient-0.4.1/keystoneclient/tests/client_fixtures.py
+@@ -24,8 +24,8 @@ from keystoneclient.openstack.common imp
  from keystoneclient import utils
  
  

++++++ _service ++++++
--- /var/tmp/diff_new_pack.PCAowV/_old  2014-03-09 20:13:15.000000000 +0100
+++ /var/tmp/diff_new_pack.PCAowV/_new  2014-03-09 20:13:15.000000000 +0100
@@ -1,8 +1,11 @@
 <services>
-  <service name="git_tarballs" mode="disabled">
-    <param 
name="url">http://tarballs.openstack.org/python-keystoneclient/python-keystoneclient-0.4.1.tar.gz</param>
-    <param name="email">opensuse-cl...@opensuse.org</param>
-    <!--<param name="version-regexp">.*-([^-]+)\.g[a-zA-Z0-9]{7}</param>-->
-    <param name="plain-version">True</param>
+  <service mode="disabled" name="download_files"> 
+    <param name="changesgenerate">enable</param>
+  </service>
+  <service mode="disabled" name="set_version">
+    <param name="basename">python-keystoneclient</param>
+  </service>
+  <service name="refresh_patches" mode="disabled">
+    <param name="changesgenerate">enable</param>
   </service>
 </services>

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to