Merge lp://qastaging/~freyes/charm-helpers/add-set-mysql-password into lp://qastaging/charm-helpers

Proposed by Felipe Reyes
Status: Merged
Merged at revision: 760
Proposed branch: lp://qastaging/~freyes/charm-helpers/add-set-mysql-password
Merge into: lp://qastaging/charm-helpers
Diff against target: 220 lines (+178/-0)
2 files modified
charmhelpers/contrib/database/mysql.py (+75/-0)
tests/contrib/database/test_mysql.py (+103/-0)
To merge this branch: bzr merge lp://qastaging/~freyes/charm-helpers/add-set-mysql-password
Reviewer Review Type Date Requested Status
Billy Olsen Needs Fixing
Jorge Niedbalski (community) Approve
Mario Splivalo (community) Approve
MySQL Charm Maintainers Pending
Review via email: mp+325876@code.qastaging.launchpad.net

Description of the change

  Add support to change a user's password in MySQL

  Add set_mysql_password() to MySQLHelper class, this method connect's to
  the database runs an UPDATE on the mysql.user table, then connects again
  using the new password an runs a "SELECT 1;" to make sure the password
  change was successful.

To post a comment you must log in.
Revision history for this message
Felipe Reyes (freyes) wrote :

Here is a sample of how I pretend to consume these new methods -> https://review.openstack.org/474032

Revision history for this message
Mario Splivalo (mariosplivalo) wrote :

Looks good to me - few nitpicks in the comments in-line.

review: Approve
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

LGTM

review: Approve
Revision history for this message
Billy Olsen (billy-olsen) wrote :

Overall, I think the change is mostly fine. I think the value of None for the password parameter poses problems and ambiguity that should definitely be fixed.

review: Needs Fixing
Revision history for this message
Felipe Reyes (freyes) wrote :

On Wed, 12 Jul 2017 17:54:06 -0000
Billy Olsen <email address hidden> wrote:

> Review: Needs Fixing
>
> Overall, I think the change is mostly fine. I think the value of None
> for the password parameter poses problems and ambiguity that should
> definitely be fixed.

I agree that None is totally unexpected for an API, but the reasoning of using None is https://bazaar.launchpad.net/~charm-helpers/charm-helpers/devel/view/head:/charmhelpers/contrib/database/mysql.py#L283

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches