Skip to content

Commit

Permalink
reverting space
Browse files Browse the repository at this point in the history
  • Loading branch information
ABHISHEK-SINHA10 committed Dec 24, 2024
1 parent 73a7623 commit 87ea02a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
---
- name: Test that we have an OMEVV host, OMEVV username and OMEVV password
ansible.builtin.fail:
msg: "Please define the following variables: hostname,
vcenter_username and vcenter_password."
when: "hostname is not defined or vcenter_username is not defined or
vcenter_password is not defined"
msg: 'Please define the following variables: hostname,
vcenter_username and vcenter_password.'
when: 'hostname is not defined or vcenter_username is not defined or
vcenter_password is not defined'

- block:
- name: Fetch pre-requisite details
Expand All @@ -35,7 +35,7 @@
- invalid_firmware_update.failed
- not invalid_firmware_update.changed
- 'invalid_firmware_update.msg == "parameters are
mutually exclusive: cluster|host|servicetag."'
mutually exclusive: cluster|host|servicetag."'

- name: Negative - Update the firmware by passing invalid cluster.
dellemc.openmanage.omevv_firmware:
Expand All @@ -59,7 +59,8 @@

- name: Create the expected error message for partial cluster_name
set_fact:
expected_msg_for_partial_cluster_name: "Provided cluster name '{{ cluster_name[:5] }}' is not valid."
expected_msg_for_partial_cluster_name:
"Provided cluster name '{{ cluster_name[:5] }}' is not valid."

- name: Negative - Update the firmware by passing passing partial cluster_name.
dellemc.openmanage.omevv_firmware:
Expand Down Expand Up @@ -107,7 +108,8 @@

- name: Create the expected error message for partial host
set_fact:
expected_msg_for_partial_host: "Host '{{ partial_host }}' not found under managed hosts."
expected_msg_for_partial_host:
"Host '{{ partial_host }}' not found under managed hosts."

- name: Negative - Update the firmware by passing partial host.
dellemc.openmanage.omevv_firmware:
Expand Down Expand Up @@ -155,7 +157,8 @@

- name: Create the expected error message for partial host
set_fact:
expected_msg_for_partial_servicetag: "Host '{{ partial_servicetag }}' not found under managed hosts."
expected_msg_for_partial_servicetag:
"Host '{{ partial_servicetag }}' not found under managed hosts."

- name: Negative - Update the firmware by passing partial servicetag.
dellemc.openmanage.omevv_firmware:
Expand All @@ -175,7 +178,7 @@
that:
- invalid_cluster_result.skipped
- not invalid_cluster_result.changed
- "invalid_cluster_result.msg == expected_msg_for_partial_servicetag"
- 'invalid_cluster_result.msg == expected_msg_for_partial_servicetag'

- name: Negative - Update the firmware by passing invalid date time.
dellemc.openmanage.omevv_firmware:
Expand All @@ -197,7 +200,7 @@
- invalid_cluster_result.failed
- not invalid_cluster_result.changed
- 'invalid_cluster_result.msg == "Invalid date time. Enter a
valid date time in the format of YYYY-MM-DDTHH:MM:SSZ."'
valid date time in the format of YYYY-MM-DDTHH:MM:SSZ."'

- name: Negative - invalid job_wait_timeout type
dellemc.openmanage.omevv_firmware:
Expand All @@ -215,8 +218,8 @@
- invalid_job_wait_timeout_type.failed
- not invalid_job_wait_timeout_type.changed
- '"argument ''job_wait_timeout'' is of
type <class ''str''> and we were unable to convert to
int:" in invalid_job_wait_timeout_type.msg'
type <class ''str''> and we were unable to convert to
int:" in invalid_job_wait_timeout_type.msg'

- name: Negative - invalid job_wait_timeout value
dellemc.openmanage.omevv_firmware:
Expand All @@ -234,7 +237,7 @@
- invalid_job_wait_timeout_value.failed
- not invalid_job_wait_timeout_value.changed
- 'invalid_job_wait_timeout_value.msg == "The value for the ''job_wait_timeout''
parameter cannot be negative or zero."'
parameter cannot be negative or zero."'

module_defaults:
dellemc.openmanage.omevv_firmware:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
---
- name: Test that we have an OMEVV host, OMEVV username and OMEVV password
ansible.builtin.fail:
msg: "Please define the following variables: hostname,
vcenter_username and vcenter_password."
when: "hostname is not defined or vcenter_username is not defined or
vcenter_password is not defined"
msg: 'Please define the following variables: hostname,
vcenter_username and vcenter_password.'
when: 'hostname is not defined or vcenter_username is not defined or
vcenter_password is not defined'

- block:
- name: Fetch pre-requisite details
Expand All @@ -33,14 +33,14 @@
- invalid_unsupported_argument.failed
- not invalid_unsupported_argument.changed
- 'invalid_unsupported_argument.msg == "Unsupported parameters for
(dellemc.openmanage.omevv_firmware) module: unsupported_argument.
Supported parameters include: ca_path, check_vSAN_health, date_time,
delete_job_queue, drs_check, enter_maintenance_mode_options,
enter_maintenance_mode_timeout, evacuate_VMs, exit_maintenance_mode,
hostname, job_description, job_name, job_wait, job_wait_timeout,
maintenance_mode_count_check, port, reboot_options, reset_idrac,
run_now, targets, timeout, validate_certs, vcenter_password,
vcenter_username, vcenter_uuid."'
(dellemc.openmanage.omevv_firmware) module: unsupported_argument.
Supported parameters include: ca_path, check_vSAN_health, date_time,
delete_job_queue, drs_check, enter_maintenance_mode_options,
enter_maintenance_mode_timeout, evacuate_VMs, exit_maintenance_mode,
hostname, job_description, job_name, job_wait, job_wait_timeout,
maintenance_mode_count_check, port, reboot_options, reset_idrac,
run_now, targets, timeout, validate_certs, vcenter_password,
vcenter_username, vcenter_uuid."'

- name: Negative - unreachable host
dellemc.openmanage.omevv_firmware:
Expand All @@ -58,10 +58,10 @@
- invalid_unreachable.unreachable
- not invalid_unreachable.changed
- 'invalid_unreachable.msg == "<urlopen error Unable to resolve
hostname or IP 999.999.999.999.>" or invalid_unreachable.msg ==
"<urlopen error [Errno -2] Name or service not known>" or
invalid_unreachable.msg == "The URL with IP 999.999.999.999
and port 443 cannot be reached."'
hostname or IP 999.999.999.999.>" or invalid_unreachable.msg ==
"<urlopen error [Errno -2] Name or service not known>" or
invalid_unreachable.msg == "The URL with IP 999.999.999.999
and port 443 cannot be reached."'

- name: Negative - invalid port
dellemc.openmanage.omevv_firmware:
Expand Down Expand Up @@ -97,8 +97,8 @@
- invalid_username.failed
- not invalid_username.changed
- 'invalid_username.error_info.message == "User is not authorized
for the request. Please check if credentials are proper
and account is not in locked state."'
for the request. Please check if credentials are proper
and account is not in locked state."'
- 'invalid_username.error_info.errorCode == "10001"'

- name: Negative - invalid password
Expand All @@ -117,8 +117,8 @@
- invalid_password.failed
- not invalid_password.changed
- 'invalid_password.error_info.message == "User is not authorized
for the request. Please check if credentials are proper
and account is not in locked state."'
for the request. Please check if credentials are proper
and account is not in locked state."'
- 'invalid_password.error_info.errorCode == "10001"'

- name: Negative - invalid validate_certs
Expand Down Expand Up @@ -176,8 +176,8 @@
- invalid_timeout_type.failed
- not invalid_timeout_type.changed
- '"argument ''timeout'' is of
type <class ''str''> and we were unable to convert to
int:" in invalid_timeout_type.msg'
type <class ''str''> and we were unable to convert to
int:" in invalid_timeout_type.msg'

- name: Negative - invalid timeout value
dellemc.openmanage.omevv_firmware:
Expand Down

0 comments on commit 87ea02a

Please sign in to comment.