File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -895,9 +895,11 @@ def auth_passwd(self, args):
895895
896896 Options:
897897 --password=<password>
898- provide the current password for the account.
898+ the current password for the account.
899899 --new-password=<new-password>
900- provide a new password for the account.
900+ the new password for the account.
901+ --username=<username>
902+ the account's username.
901903 """
902904 if not self ._settings .get ('token' ):
903905 raise EnvironmentError (
@@ -912,7 +914,11 @@ def auth_passwd(self, args):
912914 if new_password != confirm :
913915 self ._logger .error ('Password mismatch, not changing.' )
914916 sys .exit (1 )
915- payload = {'password' : password , 'new_password' : new_password }
917+ payload = {
918+ 'password' : password ,
919+ 'new_password' : new_password ,
920+ 'username' : args .get ('--username' , self ._settings ['username' ]),
921+ }
916922 response = self ._dispatch ('post' , "/v1/auth/passwd" , json .dumps (payload ))
917923 if response .status_code == requests .codes .ok :
918924 self ._logger .info ('Password change succeeded.' )
You can’t perform that action at this time.
0 commit comments