diff --git a/tests/integration/inventory.networking b/tests/integration/inventory.networking index 7a65f7e8a..3ddfcd3a8 100644 --- a/tests/integration/inventory.networking +++ b/tests/integration/inventory.networking @@ -42,9 +42,13 @@ ome_application_certificate_local_temp_path=local_temp_path idrac_secure_boot_cert_path_1=secure_boot_certitifate_path_1 idrac_secure_boot_cert_path_2=secure_boot_certitifate_path_1 nfs_share_name=nfs_share_name +modify_nfs_share_name="" cifs_share_name=cifs_share_name cifs_share_user=cifs_share_user cifs_share_password=cifs_share_password +modify_cifs_share_name="" +modify_cifs_share_user="" +modify_cifs_share_password="" ftp_share_ip=ftp_share_ip ftp_share_dir_path=ftp_share_dir_path ftp_share_username=ftp_share_username diff --git a/tests/integration/targets/omevv_firmware_repository_profile/tests/__helper_modify.yml b/tests/integration/targets/omevv_firmware_repository_profile/tests/__helper_modify.yml index 3e5882b30..06e57e8a9 100644 --- a/tests/integration/targets/omevv_firmware_repository_profile/tests/__helper_modify.yml +++ b/tests/integration/targets/omevv_firmware_repository_profile/tests/__helper_modify.yml @@ -1,12 +1,23 @@ --- +- name: Creating firmware repository profile + dellemc.openmanage.omevv_firmware_repository_profile: + name: "{{ name }}" + state: present + catalog_path: "{{ first_path }}" + protocol_type: "{{ protocol }}" + share_username: "{{ first_share__username | default(omit) }}" + share_password: "{{ first_share__password | default(omit) }}" + share_domain: "" + description: "FW repo description" + - name: Modifying firmware repository profile based on protocol type- Check Mode dellemc.openmanage.omevv_firmware_repository_profile: &firm1 - name: "Update_Ansible_FirmRepo" + name: "Ansible_Repo_Modify_{{ protocol }}" state: present - catalog_path: "{{ path }}" + catalog_path: "{{ second_path }}" protocol_type: "{{ protocol }}" - share_username: "{{ share__username | default(omit) }}" - share_password: "{{ share__password | default(omit) }}" + share_username: "{{ second_share__username | default(omit) }}" + share_password: "{{ second_share__password | default(omit) }}" share_domain: "" check_mode: true register: check_firm_repo diff --git a/tests/integration/targets/omevv_firmware_repository_profile/tests/create.yaml b/tests/integration/targets/omevv_firmware_repository_profile/tests/create.yaml index 6bd55efc7..f05c9ce64 100644 --- a/tests/integration/targets/omevv_firmware_repository_profile/tests/create.yaml +++ b/tests/integration/targets/omevv_firmware_repository_profile/tests/create.yaml @@ -42,7 +42,6 @@ state: absent ignore_errors: true loop: "{{ payload }}" - no_log: true module_defaults: dellemc.openmanage.omevv_firmware_repository_profile: diff --git a/tests/integration/targets/omevv_firmware_repository_profile/tests/modify.yaml b/tests/integration/targets/omevv_firmware_repository_profile/tests/modify.yaml index 1d734c7a9..776d32913 100644 --- a/tests/integration/targets/omevv_firmware_repository_profile/tests/modify.yaml +++ b/tests/integration/targets/omevv_firmware_repository_profile/tests/modify.yaml @@ -15,7 +15,7 @@ - block: - name: Creating firmware repository profile dellemc.openmanage.omevv_firmware_repository_profile: - name: "Ansible_FirmRepo" + name: "Ansible_Repo_Modify_HTTPS" state: present catalog_path: "{{ https_share_ip }}" protocol_type: "HTTPS" @@ -24,8 +24,8 @@ - name: Modifying firm repo profile with new name and description - Check Mode dellemc.openmanage.omevv_firmware_repository_profile: &mod1 - name: "Ansible_FirmRepo" - new_name: "Update_Ansible_FirmRepo" + name: "Ansible_Repo_Modify_HTTPS" + new_name: "Upd_Ansible_Repo_Modify_HTTPS" description: "New description" state: present register: modify_1_check @@ -70,18 +70,40 @@ - modify_1_normal_and_diff.diff.after | length == 2 - modify_1_normal_and_diff.diff.before | length == 2 + - name: Cleanup after modification of new name and description + dellemc.openmanage.omevv_firmware_repository_profile: + name: "Upd_Ansible_Repo_Modify_HTTPS" + state: absent + ignore_errors: true + - name: Including task for modification based on protocol type ansible.builtin.include_tasks: __helper_modify.yml vars: + name: "Ansible_Repo_Modify_{{ item.protocol }}" protocol: "{{ item.protocol }}" - path: "{{ item.path }}" - share__username: "{{ item.username }}" - share__password: "{{ item.password }}" + first_path: "{{ item.first_path }}" + first_share__username: "{{ item.first_username }}" + first_share__password: "{{ item.first_password }}" + second_path: "{{ item.second_path }}" + second_share__username: "{{ item.second_username }}" + second_share__password: "{{ item.second_password }}" loop: - protocol: "HTTPS" - path: "https://downloads.dell.com/catalog/catalog.xml.gz" - username: "" - password: "" + first_path: "{{ https_share_ip }}" + second_path: "https://downloads.dell.com/catalog/catalog.xml.gz" + - protocol: "HTTP" + first_path: "{{ http_share }}{{ http_share_dir_path }}" + second_path: "http://downloads.dell.com/catalog/catalog.xml.gz" + - protocol: "CIFS" + first_path: "{{ cifs_share_name }}" + second_path: "{{ modify_cifs_share_name }}" + first_username: "{{ cifs_share_user }}" + second_username: "{{ modify_cifs_share_user }}" + first_password: "{{ cifs_share_password }}" + second_password: "{{ modify_cifs_share_password }}" + - protocol: "NFS" + first_path: "{{ nfs_share_name }}" + second_path: "{{ modify_nfs_share_name }}" always: - name: Cleanup @@ -90,9 +112,11 @@ state: absent ignore_errors: true loop: - - "Ansible_FirmRepo" - - "Update_Ansible_FirmRepo" - no_log: true + - "Ansible_Repo_Modify_HTTPS" + - "Ansible_Repo_Modify_HTTP" + - "Ansible_Repo_Modify_NFS" + - "Ansible_Repo_Modify_CIFS" + - "Upd_Ansible_Repo_Modify_HTTPS" module_defaults: dellemc.openmanage.omevv_firmware_repository_profile: diff --git a/tests/integration/targets/prepare_omevv_registration/tasks/main.yaml b/tests/integration/targets/prepare_omevv_registration/tasks/main.yaml index dfeeee5f5..6812b65d2 100644 --- a/tests/integration/targets/prepare_omevv_registration/tasks/main.yaml +++ b/tests/integration/targets/prepare_omevv_registration/tasks/main.yaml @@ -34,6 +34,7 @@ timeout: 300 status_code: - 201 + body: "{{ payload }}" when: get_vcenter_plugin.json | length == 0 vars: payload: @@ -56,8 +57,4 @@ - name: Set fact of uuid ansible.builtin.set_fact: uuid: "{{ console_details.json[0].uuid }}" - vcenter_hostname: "{{ console_details.json[0].consoleAddress }}" - - - name: Set fact of consoleAddress - ansible.builtin.set_fact: - vcenter_hostname: "{{ console_details.json[0].consoleAddress }}" + when: vcenter_hostname == console_details.json[0].consoleAddress