From fd97ce740ebea5b49d425b7c64aacffc67fd1cba Mon Sep 17 00:00:00 2001 From: Ramon Perez Date: Thu, 4 Jan 2024 11:58:59 +0100 Subject: [PATCH 1/7] Crucible | Update possible responses received from KVM Force Power On System --- roles/vendors/kvm/tasks/iso.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/vendors/kvm/tasks/iso.yml b/roles/vendors/kvm/tasks/iso.yml index 30795daa9..c8d9b352f 100644 --- a/roles/vendors/kvm/tasks/iso.yml +++ b/roles/vendors/kvm/tasks/iso.yml @@ -163,7 +163,8 @@ method: POST body_format: json body: { "ResetType": "ForceOn" } - status_code: [200, 204] + # redfish specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.12.1.pdf + status_code: [200, 201, 202, 204] force_basic_auth: no validate_certs: no return_content: yes From 678dcafd3f5aa4980e45a750d24661980100ac4e Mon Sep 17 00:00:00 2001 From: Ramon Perez Date: Thu, 4 Jan 2024 13:42:39 +0100 Subject: [PATCH 2/7] Change URL --- roles/vendors/kvm/tasks/iso.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/vendors/kvm/tasks/iso.yml b/roles/vendors/kvm/tasks/iso.yml index c8d9b352f..43007477c 100644 --- a/roles/vendors/kvm/tasks/iso.yml +++ b/roles/vendors/kvm/tasks/iso.yml @@ -163,7 +163,7 @@ method: POST body_format: json body: { "ResetType": "ForceOn" } - # redfish specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.12.1.pdf + # redfish specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.19.0.pdf status_code: [200, 201, 202, 204] force_basic_auth: no validate_certs: no From d6378a762548120097fdfbe355318f31d7ecedbc Mon Sep 17 00:00:00 2001 From: Ramon Perez Date: Thu, 4 Jan 2024 14:05:28 +0100 Subject: [PATCH 3/7] Change some arguments in the file to make the ansible-lint check to pass --- roles/vendors/kvm/tasks/iso.yml | 46 ++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/roles/vendors/kvm/tasks/iso.yml b/roles/vendors/kvm/tasks/iso.yml index 43007477c..2ce30ad12 100644 --- a/roles/vendors/kvm/tasks/iso.yml +++ b/roles/vendors/kvm/tasks/iso.yml @@ -11,8 +11,8 @@ password: "{{ bmc_password }}" method: GET status_code: [200, 201] - validate_certs: no - return_content: yes + validate_certs: false + return_content: true register: http_reply - debug: # noqa unnamed-task @@ -37,9 +37,9 @@ body_format: json body: { "ResetType": "ForceOff" } status_code: [200, 204] - force_basic_auth: no - validate_certs: no - return_content: yes + force_basic_auth: false + validate_certs: false + return_content: true register: redfish_poweroff ignore_errors: yes @@ -52,8 +52,8 @@ body_format: json body: {} status_code: [200, 204] - validate_certs: no - return_content: yes + validate_certs: false + return_content: true register: redfish_reply ignore_errors: yes @@ -70,9 +70,9 @@ body_format: json body: { "Image": "{{ boot_iso_url }}", "Inserted": true } status_code: [200, 204] - force_basic_auth: no - validate_certs: no - return_content: yes + force_basic_auth: false + validate_certs: false + return_content: true timeout: 120 register: redfish_reply until: "redfish_reply.status == 204" @@ -90,8 +90,8 @@ password: "{{ bmc_password }}" method: GET status_code: [200, 201] - validate_certs: no - return_content: yes + validate_certs: false + return_content: true register: redfish_reply when: ansible_verbosity >= 1 @@ -116,9 +116,9 @@ }, } status_code: [200, 204] - force_basic_auth: no - validate_certs: no - return_content: yes + force_basic_auth: false + validate_certs: false + return_content: true register: redfish_reply - debug: # noqa unnamed-task @@ -132,8 +132,8 @@ password: "{{ bmc_password }}" method: GET status_code: [200, 201] - validate_certs: no - return_content: yes + validate_certs: false + return_content: true register: redfish_reply - debug: # noqa unnamed-task @@ -149,9 +149,9 @@ body_format: json body: { "ResetType": "ForceRestart" } status_code: [200, 204] - force_basic_auth: no - validate_certs: no - return_content: yes + force_basic_auth: false + validate_certs: false + return_content: true register: redfish_restart when: redfish_reply.json.PowerState == "On" @@ -165,8 +165,8 @@ body: { "ResetType": "ForceOn" } # redfish specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.19.0.pdf status_code: [200, 201, 202, 204] - force_basic_auth: no - validate_certs: no - return_content: yes + force_basic_auth: false + validate_certs: false + return_content: true register: redfish_poweron when: redfish_reply.json.PowerState == "Off" From eea7491be67ff47e056f4b27fd047854e9eef351 Mon Sep 17 00:00:00 2001 From: Tatiana Krishtop Date: Thu, 21 Dec 2023 12:03:35 +0100 Subject: [PATCH 4/7] Allow response 201 and 202 following Redfish specification --- roles/vendors/kvm/tasks/iso.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/vendors/kvm/tasks/iso.yml b/roles/vendors/kvm/tasks/iso.yml index 2ce30ad12..7be8af25c 100644 --- a/roles/vendors/kvm/tasks/iso.yml +++ b/roles/vendors/kvm/tasks/iso.yml @@ -163,10 +163,10 @@ method: POST body_format: json body: { "ResetType": "ForceOn" } - # redfish specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.19.0.pdf + # redfish specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.12.1.pdf status_code: [200, 201, 202, 204] - force_basic_auth: false - validate_certs: false - return_content: true + force_basic_auth: no + validate_certs: no + return_content: yes register: redfish_poweron when: redfish_reply.json.PowerState == "Off" From f5bbd20dfb0c4b704ef9994ff177e0ea4593bd0b Mon Sep 17 00:00:00 2001 From: Ramon Perez Date: Thu, 4 Jan 2024 15:01:03 +0100 Subject: [PATCH 5/7] re-fix URL and other variables --- roles/vendors/kvm/tasks/iso.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/vendors/kvm/tasks/iso.yml b/roles/vendors/kvm/tasks/iso.yml index 7be8af25c..2ce30ad12 100644 --- a/roles/vendors/kvm/tasks/iso.yml +++ b/roles/vendors/kvm/tasks/iso.yml @@ -163,10 +163,10 @@ method: POST body_format: json body: { "ResetType": "ForceOn" } - # redfish specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.12.1.pdf + # redfish specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.19.0.pdf status_code: [200, 201, 202, 204] - force_basic_auth: no - validate_certs: no - return_content: yes + force_basic_auth: false + validate_certs: false + return_content: true register: redfish_poweron when: redfish_reply.json.PowerState == "Off" From 4a62ef5333b572851d443bfd94a3c98e459d2a27 Mon Sep 17 00:00:00 2001 From: Ramon Perez Date: Thu, 4 Jan 2024 16:14:54 +0100 Subject: [PATCH 6/7] Revert "Crucible | Update possible responses received from KVM Force Power On System" This reverts commit fd97ce740ebea5b49d425b7c64aacffc67fd1cba. --- roles/vendors/kvm/tasks/iso.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/vendors/kvm/tasks/iso.yml b/roles/vendors/kvm/tasks/iso.yml index 2ce30ad12..69d3753b5 100644 --- a/roles/vendors/kvm/tasks/iso.yml +++ b/roles/vendors/kvm/tasks/iso.yml @@ -163,10 +163,17 @@ method: POST body_format: json body: { "ResetType": "ForceOn" } +<<<<<<< HEAD # redfish specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.19.0.pdf status_code: [200, 201, 202, 204] force_basic_auth: false validate_certs: false return_content: true +======= + status_code: [200, 204] + force_basic_auth: no + validate_certs: no + return_content: yes +>>>>>>> parent of fd97ce7 (Crucible | Update possible responses received from KVM Force Power On System) register: redfish_poweron when: redfish_reply.json.PowerState == "Off" From a1768cffca808b7aa0124d8b430049870bb224ca Mon Sep 17 00:00:00 2001 From: Ramon Perez Date: Thu, 4 Jan 2024 16:15:47 +0100 Subject: [PATCH 7/7] remove revert conflict tags --- roles/vendors/kvm/tasks/iso.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/roles/vendors/kvm/tasks/iso.yml b/roles/vendors/kvm/tasks/iso.yml index 69d3753b5..2ce30ad12 100644 --- a/roles/vendors/kvm/tasks/iso.yml +++ b/roles/vendors/kvm/tasks/iso.yml @@ -163,17 +163,10 @@ method: POST body_format: json body: { "ResetType": "ForceOn" } -<<<<<<< HEAD # redfish specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.19.0.pdf status_code: [200, 201, 202, 204] force_basic_auth: false validate_certs: false return_content: true -======= - status_code: [200, 204] - force_basic_auth: no - validate_certs: no - return_content: yes ->>>>>>> parent of fd97ce7 (Crucible | Update possible responses received from KVM Force Power On System) register: redfish_poweron when: redfish_reply.json.PowerState == "Off"