Add support for Redfish session create, delete, and authenticate (#2027)

* Add support for Redfish session create and delete

* add changelog fragment

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Bill Dodd 2021-03-19 15:14:33 -05:00 committed by GitHub
commit efd441407f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 246 additions and 62 deletions

View file

@ -36,15 +36,18 @@ options:
- Base URI of iDRAC
type: str
username:
required: true
description:
- User for authentication with iDRAC
type: str
password:
required: true
description:
- Password for authentication with iDRAC
type: str
auth_token:
description:
- Security token for authentication with OOB controller
type: str
version_added: 2.3.0
manager_attributes:
required: false
description:
@ -232,12 +235,22 @@ def main():
category=dict(required=True),
command=dict(required=True, type='list', elements='str'),
baseuri=dict(required=True),
username=dict(required=True),
password=dict(required=True, no_log=True),
username=dict(),
password=dict(no_log=True),
auth_token=dict(no_log=True),
manager_attributes=dict(type='dict', default={}),
timeout=dict(type='int', default=10),
resource_id=dict()
),
required_together=[
('username', 'password'),
],
required_one_of=[
('username', 'auth_token'),
],
mutually_exclusive=[
('username', 'auth_token'),
],
supports_check_mode=False
)
@ -246,7 +259,8 @@ def main():
# admin credentials used for authentication
creds = {'user': module.params['username'],
'pswd': module.params['password']}
'pswd': module.params['password'],
'token': module.params['auth_token']}
# timeout
timeout = module.params['timeout']