redfish_utils: adding "Id" to the add user function (#3343) (#3382)

* Adding "Id" to the add user function

Some implementations of Redfish (e.g. the one in Cisco's CIMC) seem to require the id of the new user for account creation.
I'm not that firm with Python but lines 982 and 983 should fix it.

* changed indention

* created changelog fragment

* Update changelogs/fragments/3343-redfish_utils-addUser-userId.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update change type

* supplemented the description of the ID parameter

* Update plugins/modules/remote_management/redfish/redfish_command.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 331f5bdf24)

Co-authored-by: Patrick Pfurtscheller <57419021+PfurtschellerP@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2021-09-16 22:36:27 +02:00 committed by GitHub
parent 2c79d42eb4
commit 9d468fb078
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

@ -979,6 +979,8 @@ class RedfishUtils(object):
payload['Password'] = user.get('account_password')
if user.get('account_roleid'):
payload['RoleId'] = user.get('account_roleid')
if user.get('account_id'):
payload['Id'] = user.get('account_id')
response = self.post_request(self.root_uri + self.accounts_uri, payload)
if not response['ret']: