Merge lp:~letterj/swift/auth2swauth into lp:~hudson-openstack/swift/trunk

Proposed by Jay Payne
Status: Merged
Approved by: Chuck Thier
Approved revision: 201
Merged at revision: 202
Proposed branch: lp:~letterj/swift/auth2swauth
Merge into: lp:~hudson-openstack/swift/trunk
Diff against target: 23 lines (+4/-2)
1 file modified
bin/swift-auth-to-swauth (+4/-2)
To merge this branch: bzr merge lp:~letterj/swift/auth2swauth
Reviewer Review Type Date Requested Status
Chuck Thier (community) Approve
Review via email: mp+47749@code.launchpad.net

Description of the change

Simple change to the swift-auth-to-swauth utility to only list out the commands for converting accounts to from auth to swauth.

A later fix would be to actually run the commands on the new swauth server.

To post a comment you must log in.
Revision history for this message
Chuck Thier (cthier) wrote :

ok

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/swift-auth-to-swauth'
2--- bin/swift-auth-to-swauth 2011-01-19 23:21:57 +0000
3+++ bin/swift-auth-to-swauth 2011-01-27 23:18:57 +0000
4@@ -26,7 +26,8 @@
5 if len(argv) != 4 or argv[1] != '-K':
6 exit('Syntax: %s -K <super_admin_key> <path to auth.db>' % argv[0])
7 _junk, _junk, super_admin_key, auth_db = argv
8- call(['swauth-prep', '-K', super_admin_key])
9+ # This version will not attempt to prep swauth
10+ # call(['swauth-prep', '-K', super_admin_key])
11 conn = sqlite3.connect(auth_db)
12 for account, cfaccount, user, password, admin, reseller_admin in \
13 conn.execute('SELECT account, cfaccount, user, password, admin, '
14@@ -39,7 +40,8 @@
15 cmd.append('-r')
16 cmd.extend([account, user, password])
17 print ' '.join(cmd)
18- call(cmd)
19+ # For this version, the script will only print out the commands
20+ # call(cmd)
21 print '----------------------------------------------------------------'
22 print ' Assuming the above worked perfectly, you should copy and paste '
23 print ' those lines into your ~/bin/recreateaccounts script.'