Debian Codegraph @

ansible_collections/dellemc/openmanage/roles/redfish_storage_volume/molecule/initialization-10603/converge.yml

raw symbols SCIP
1 ---
2 - name: Converge
3 hosts: all
4 gather_facts: false
5
6 tasks:
7 - name: Fetching data from iDRAC for PERC
8 ansible.builtin.include_tasks:
9 file: ../__extract_storage.yml
10 vars:
11 redfish_storage_volume_search_in_name: 'PERC'
12 redfish_storage_volume_raid: "RAID0"
13
14 - name: Fetching Volume_id from iDRAC
15 ansible.builtin.include_tasks: ../__get_helper.yml
16 vars:
17 _url: "Systems/System.Embedded.1/Storage/{{ redfish_storage_volume_controller_id }}/Volumes"
18
19 - name: Extracting volume_id
20 ansible.builtin.set_fact:
21 redfish_storage_volume_id: "{{ (redfish_storage_volume_fetched_output.json.Members | last)['@odata.id'] | ansible.builtin.split('/') | last }}"
22
23 - name: To check the behaviour of Initialization type Fast.
24 ansible.builtin.import_role:
25 name: dellemc.openmanage.redfish_storage_volume
26 vars:
27 hostname: "{{ lookup('env', 'IDRAC_IP') }}"
28 username: "{{ lookup('env', 'IDRAC_USER') }}"
29 password: "{{ lookup('env', 'IDRAC_PASSWORD') }}"
30 validate_certs: false
31 command: initialize
32 volume_id: "in:in"
33 initialize_type: "Fast"
34 ignore_errors: true
35 register: redfish_storage_volume_result
36
37 - name: Define error message
38 ansible.builtin.set_fact:
39 error_message: "Specified Volume Id in:in does not exist in the System."
40
41 - name: Asserting operation for initialization of type Fast.
42 ansible.builtin.assert:
43 that: redfish_storage_volume_out.msg == error_message
44
45 - name: Running for Initialization type scenarios
46 block:
47 - name: To check the behaviour of Initialization type Fast.
48 ansible.builtin.import_role:
49 name: dellemc.openmanage.redfish_storage_volume
50 vars:
51 hostname: "{{ lookup('env', 'IDRAC_IP') }}"
52 username: "{{ lookup('env', 'IDRAC_USER') }}"
53 password: "{{ lookup('env', 'IDRAC_PASSWORD') }}"
54 validate_certs: false
55 command: initialize
56 volume_id: "{{ redfish_storage_volume_id }}"
57 initialize_type: "Fast"
58 job_wait: false
59
60 - name: Asserting operation for initialization type Fast.
61 ansible.builtin.assert:
62 that: redfish_storage_volume_out.msg == "Successfully submitted initialize volume task."
63
64 - name: Track the initialization job
65 ansible.builtin.include_tasks:
66 file: ../__job_track.yml
67 vars:
68 job_id: "{{ redfish_storage_volume_out.job_status.Id }}"
69
70 - name: To check the behaviour of Initialization type Slow.
71 ansible.builtin.import_role:
72 name: dellemc.openmanage.redfish_storage_volume
73 vars:
74 hostname: "{{ lookup('env', 'IDRAC_IP') }}"
75 username: "{{ lookup('env', 'IDRAC_USER') }}"
76 password: "{{ lookup('env', 'IDRAC_PASSWORD') }}"
77 validate_certs: false
78 command: initialize
79 volume_id: "{{ redfish_storage_volume_id }}"
80 initialize_type: "Slow"
81 job_wait: true
82
83 - name: Asserting operation for initialization type Slow.
84 ansible.builtin.assert:
85 that: redfish_storage_volume_out.msg == "The job is successfully completed."