mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge branch 'ansible-collections:main' into main
This commit is contained in:
commit
fff2ab298b
7 changed files with 41 additions and 2 deletions
5
CHANGELOG.md
Normal file
5
CHANGELOG.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Placeholder changelog
|
||||||
|
|
||||||
|
This file is a placeholder; a version-specific `CHANGELOG-vX.md` will be generated during releases from fragments
|
||||||
|
under `changelogs/fragments`. On release branches once a release has been created, consult the branch's version-specific
|
||||||
|
file for changes that have occurred in that branch.
|
3
CHANGELOG.md.license
Normal file
3
CHANGELOG.md.license
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
SPDX-FileCopyrightText: Ansible Project
|
|
@ -115,7 +115,7 @@ See the [Releasing guidelines](https://github.com/ansible/community-docs/blob/ma
|
||||||
|
|
||||||
## Release notes
|
## Release notes
|
||||||
|
|
||||||
See the [changelog](https://github.com/ansible-collections/community.general/blob/main/CHANGELOG.rst).
|
See the [changelog](https://github.com/ansible-collections/community.general/blob/main/CHANGELOG.md).
|
||||||
|
|
||||||
## Roadmap
|
## Roadmap
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,9 @@ mention_ancestor: true
|
||||||
flatmap: true
|
flatmap: true
|
||||||
new_plugins_after_name: removed_features
|
new_plugins_after_name: removed_features
|
||||||
notesdir: fragments
|
notesdir: fragments
|
||||||
|
output_formats:
|
||||||
|
- md
|
||||||
|
- rst
|
||||||
prelude_section_name: release_summary
|
prelude_section_name: release_summary
|
||||||
prelude_section_title: Release Summary
|
prelude_section_title: Release Summary
|
||||||
sections:
|
sections:
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- redfish_config - add command ``SetServiceIdentification`` to set service identification (https://github.com/ansible-collections/community.general/issues/7916).
|
|
@ -3408,6 +3408,11 @@ class RedfishUtils(object):
|
||||||
result['ret'] = True
|
result['ret'] = True
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def set_service_identification(self, service_id):
|
||||||
|
data = {"ServiceIdentification": service_id}
|
||||||
|
resp = self.patch_request(self.root_uri + '/redfish/v1/Managers/' + self.resource_id, data, check_pyld=True)
|
||||||
|
return resp
|
||||||
|
|
||||||
def set_session_service(self, sessions_config):
|
def set_session_service(self, sessions_config):
|
||||||
if sessions_config is None:
|
if sessions_config is None:
|
||||||
return {'ret': False, 'msg':
|
return {'ret': False, 'msg':
|
||||||
|
|
|
@ -88,6 +88,12 @@ options:
|
||||||
- ID of the System, Manager or Chassis to modify.
|
- ID of the System, Manager or Chassis to modify.
|
||||||
type: str
|
type: str
|
||||||
version_added: '0.2.0'
|
version_added: '0.2.0'
|
||||||
|
service_id:
|
||||||
|
required: false
|
||||||
|
description:
|
||||||
|
- ID of the manager to update.
|
||||||
|
type: str
|
||||||
|
version_added: '8.4.0'
|
||||||
nic_addr:
|
nic_addr:
|
||||||
required: false
|
required: false
|
||||||
description:
|
description:
|
||||||
|
@ -334,6 +340,15 @@ EXAMPLES = '''
|
||||||
RAIDType: "RAID0"
|
RAIDType: "RAID0"
|
||||||
Drives:
|
Drives:
|
||||||
- "/redfish/v1/Systems/1/Storage/DE00B000/Drives/1"
|
- "/redfish/v1/Systems/1/Storage/DE00B000/Drives/1"
|
||||||
|
|
||||||
|
- name: Set service identification to {{ service_id }}
|
||||||
|
community.general.redfish_config:
|
||||||
|
category: Manager
|
||||||
|
command: SetServiceIdentification
|
||||||
|
service_id: "{{ service_id }}"
|
||||||
|
baseuri: "{{ baseuri }}"
|
||||||
|
username: "{{ username }}"
|
||||||
|
password: "{{ password }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -353,7 +368,7 @@ from ansible.module_utils.common.text.converters import to_native
|
||||||
CATEGORY_COMMANDS_ALL = {
|
CATEGORY_COMMANDS_ALL = {
|
||||||
"Systems": ["SetBiosDefaultSettings", "SetBiosAttributes", "SetBootOrder",
|
"Systems": ["SetBiosDefaultSettings", "SetBiosAttributes", "SetBootOrder",
|
||||||
"SetDefaultBootOrder", "EnableSecureBoot", "SetSecureBoot", "DeleteVolumes", "CreateVolume"],
|
"SetDefaultBootOrder", "EnableSecureBoot", "SetSecureBoot", "DeleteVolumes", "CreateVolume"],
|
||||||
"Manager": ["SetNetworkProtocols", "SetManagerNic", "SetHostInterface"],
|
"Manager": ["SetNetworkProtocols", "SetManagerNic", "SetHostInterface", "SetServiceIdentification"],
|
||||||
"Sessions": ["SetSessionService"],
|
"Sessions": ["SetSessionService"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,6 +391,7 @@ def main():
|
||||||
default={}
|
default={}
|
||||||
),
|
),
|
||||||
resource_id=dict(),
|
resource_id=dict(),
|
||||||
|
service_id=dict(),
|
||||||
nic_addr=dict(default='null'),
|
nic_addr=dict(default='null'),
|
||||||
nic_config=dict(
|
nic_config=dict(
|
||||||
type='dict',
|
type='dict',
|
||||||
|
@ -445,6 +461,9 @@ def main():
|
||||||
# HostInterface instance ID
|
# HostInterface instance ID
|
||||||
hostinterface_id = module.params['hostinterface_id']
|
hostinterface_id = module.params['hostinterface_id']
|
||||||
|
|
||||||
|
# Service Identification
|
||||||
|
service_id = module.params['service_id']
|
||||||
|
|
||||||
# Sessions config options
|
# Sessions config options
|
||||||
sessions_config = module.params['sessions_config']
|
sessions_config = module.params['sessions_config']
|
||||||
|
|
||||||
|
@ -512,6 +531,8 @@ def main():
|
||||||
result = rf_utils.set_manager_nic(nic_addr, nic_config)
|
result = rf_utils.set_manager_nic(nic_addr, nic_config)
|
||||||
elif command == "SetHostInterface":
|
elif command == "SetHostInterface":
|
||||||
result = rf_utils.set_hostinterface_attributes(hostinterface_config, hostinterface_id)
|
result = rf_utils.set_hostinterface_attributes(hostinterface_config, hostinterface_id)
|
||||||
|
elif command == "SetServiceIdentification":
|
||||||
|
result = rf_utils.set_service_identification(service_id)
|
||||||
|
|
||||||
elif category == "Sessions":
|
elif category == "Sessions":
|
||||||
# execute only if we find a Sessions resource
|
# execute only if we find a Sessions resource
|
||||||
|
|
Loading…
Reference in a new issue