Skip to content

Commit

Permalink
Merge pull request #637 from Kritika-Bhateja-03/issue/defect_fix
Browse files Browse the repository at this point in the history
Issue/defect fix
  • Loading branch information
rajshekarp87 authored Mar 25, 2024
2 parents bec15d3 + f890fc2 commit abde3b5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 28 deletions.
59 changes: 34 additions & 25 deletions docs/modules/ome_device_quick_deploy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Requirements
------------
The below requirements are needed on the host that executes this module.

- python >= 3.9.6
- python \>= 3.9.6



Expand All @@ -30,35 +30,35 @@ Parameters
device_id (optional, int, None)
The ID of the chassis for which the Quick Deploy settings to be deployed.

If the device ID is not specified, this module updates the Quick Deploy settings for the *hostname*.
If the device ID is not specified, this module updates the Quick Deploy settings for the \ :emphasis:`hostname`\ .

*device_id* is mutually exclusive with *device_service_tag*.
\ :emphasis:`device\_id`\ is mutually exclusive with \ :emphasis:`device\_service\_tag`\ .


device_service_tag (optional, str, None)
The service tag of the chassis for which the Quick Deploy settings to be deployed.

If the device service tag is not specified, this module updates the Quick Deploy settings for the *hostname*.
If the device service tag is not specified, this module updates the Quick Deploy settings for the \ :emphasis:`hostname`\ .

*device_service_tag* is mutually exclusive with *device_id*.
\ :emphasis:`device\_service\_tag`\ is mutually exclusive with \ :emphasis:`device\_id`\ .


setting_type (True, str, None)
The type of the Quick Deploy settings to be applied.

``ServerQuickDeploy`` to apply the server Quick Deploy settings.
\ :literal:`ServerQuickDeploy`\ to apply the server Quick Deploy settings.

``IOMQuickDeploy`` to apply the IOM Quick Deploy settings.
\ :literal:`IOMQuickDeploy`\ to apply the IOM Quick Deploy settings.


job_wait (optional, bool, True)
Determines whether to wait for the job completion or not.


job_wait_timeout (optional, int, 120)
The maximum wait time of *job_wait* in seconds. The job is tracked only for this duration.
The maximum wait time of \ :emphasis:`job\_wait`\ in seconds. The job is tracked only for this duration.

This option is applicable when *job_wait* is ``true``.
This option is applicable when \ :emphasis:`job\_wait`\ is \ :literal:`true`\ .


quick_deploy_options (True, dict, None)
Expand All @@ -68,7 +68,7 @@ Parameters
password (optional, str, None)
The password to login to the server or IOM.

The module will always report change when *password* option is added.
The module will always report change when \ :emphasis:`password`\ option is added.


ipv4_enabled (optional, bool, None)
Expand All @@ -78,23 +78,23 @@ Parameters
ipv4_network_type (optional, str, None)
IPv4 network type.

*ipv4_network_type* is required if *ipv4_enabled* is ``true``.
\ :emphasis:`ipv4\_network\_type`\ is required if \ :emphasis:`ipv4\_enabled`\ is \ :literal:`true`\ .

``Static`` to configure the static IP settings.
\ :literal:`Static`\ to configure the static IP settings.

``DHCP`` to configure the Dynamic IP settings.
\ :literal:`DHCP`\ to configure the Dynamic IP settings.


ipv4_subnet_mask (optional, str, None)
IPv4 subnet mask.

*ipv4_subnet_mask* is required if *ipv4_network_type* is ``Static``.
\ :emphasis:`ipv4\_subnet\_mask`\ is required if \ :emphasis:`ipv4\_network\_type`\ is \ :literal:`Static`\ .


ipv4_gateway (optional, str, None)
IPv4 gateway.

*ipv4_gateway* is required if *ipv4_network_type* is ``Static``.
\ :emphasis:`ipv4\_gateway`\ is required if \ :emphasis:`ipv4\_network\_type`\ is \ :literal:`Static`\ .


ipv6_enabled (optional, bool, None)
Expand All @@ -104,23 +104,23 @@ Parameters
ipv6_network_type (optional, str, None)
IPv6 network type.

*ipv6_network_type* is required if *ipv6_enabled* is ``true``.
\ :emphasis:`ipv6\_network\_type`\ is required if \ :emphasis:`ipv6\_enabled`\ is \ :literal:`true`\ .

``Static`` to configure the static IP settings.
\ :literal:`Static`\ to configure the static IP settings.

``DHCP`` to configure the Dynamic IP settings.
\ :literal:`DHCP`\ to configure the Dynamic IP settings.


ipv6_prefix_length (optional, int, None)
IPV6 prefix length.

*ipv6_prefix_length* is required if *ipv6_network_type* is ``Static``.
\ :emphasis:`ipv6\_prefix\_length`\ is required if \ :emphasis:`ipv6\_network\_type`\ is \ :literal:`Static`\ .


ipv6_gateway (optional, str, None)
IPv6 gateway.

*ipv6_gateway* is required if *ipv6_network_type* is ``Static``.
\ :emphasis:`ipv6\_gateway`\ is required if \ :emphasis:`ipv6\_network\_type`\ is \ :literal:`Static`\ .


slots (optional, list, None)
Expand Down Expand Up @@ -152,21 +152,29 @@ Parameters
username (True, str, None)
OpenManage Enterprise Modular username.

If the username is not provided, then the environment variable \ :literal:`OME\_USERNAME`\ is used.

Example: export OME\_USERNAME=username


password (True, str, None)
OpenManage Enterprise Modular password.

If the password is not provided, then the environment variable \ :literal:`OME\_PASSWORD`\ is used.

Example: export OME\_PASSWORD=password


port (optional, int, 443)
OpenManage Enterprise Modular HTTPS port.


validate_certs (optional, bool, True)
If ``false``, the SSL certificates will not be validated.
If \ :literal:`false`\ , the SSL certificates will not be validated.

Configure ``false`` only on personally controlled sites where self-signed certificates are used.
Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used.

Prior to collection version ``5.0.0``, the *validate_certs* is ``false`` by default.
Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default.


ca_path (optional, path, None)
Expand All @@ -185,8 +193,8 @@ Notes

.. note::
- Run this module from a system that has direct access to OpenManage Enterprise Modular.
- This module supports ``check_mode``.
- The module will always report change when *password* option is added.
- This module supports \ :literal:`check\_mode`\ .
- The module will always report change when \ :emphasis:`password`\ option is added.
- If the chassis is a member of a multi-chassis group and it is assigned as a backup lead chassis, the operations performed on the chassis using this module may conflict with the management operations performed on the chassis through the lead chassis.


Expand Down Expand Up @@ -291,4 +299,5 @@ Authors

- Felix Stephen (@felixs88)
- Shivam Sharma (@ShivamSh3)
- Kritika Bhateja (@Kritika-Bhateja-03)

4 changes: 1 addition & 3 deletions plugins/modules/ome_device_quick_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#
# Dell OpenManage Ansible Modules
# Version 8.7.0
# Version 9.1.0
# Copyright (C) 2022-2024 Dell Inc. or its subsidiaries. All Rights Reserved.

# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
Expand Down Expand Up @@ -470,8 +470,6 @@ def check_mode_validation(module, deploy_data):
"SlotIPV6Address": each.get("slot_ipv6_address"), "VlanId": each.get("vlan_id")}
if each.get("vlan_id") is not None:
req_slot_1.update({"VlanId": str(each.get("vlan_id"))})
else:
req_slot_1.update({"VlanId": ""})
req_filter_slot = dict([(k, v) for k, v in req_slot_1.items() if v is not None])
exist_slot_1 = {"SlotId": exist_filter_slot[0].get("SlotId"),
"SlotIPV4Address": exist_filter_slot[0].get("SlotIPV4Address"),
Expand Down

0 comments on commit abde3b5

Please sign in to comment.