Skip to content

Commit

Permalink
Added support for redfish for KVM hosts
Browse files Browse the repository at this point in the history
Currently redfish is supported for HP and Dell systems, but none of
these vendors provide settings compatible with sushy-tools based virtual
BMCs. For instance, all the KVMs in the same hypervisor share the BMC
address, and are differentiated by the system ID, which is part of the
resource path.

This change extends the install-config and install-config-virtualmedia
templates to allow for sushy-tools based redfish vBMCs.
  • Loading branch information
nsilla committed Sep 21, 2023
1 parent bcd2038 commit d82c9f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ platform:
provisioningHostIP: {{ provisioningHostIP }}
{% endif %}
bootstrapProvisioningIP: {{ bootstrapProvisioningIP }}
{% if externalMACAddress is defined and externalMACAddress|length %}
externalMACAddress: '{{ externalMACAddress }}'
{% if externalMACAddress is defined %}
externalMACAddress: {{ externalMACAddress }}
{% endif %}
{% if bootstraposimage is defined and bootstraposimage|length %}
bootstrapOSImage: {{ bootstraposimage }}
Expand All @@ -96,6 +96,9 @@ platform:
{% elif groups['hp_hosts_redfish'] is defined and host in groups['hp_hosts_redfish'] and ((release_version.split('.')[0]|int > 4) or ((release_version.split('.')[0]|int == 4) and (release_version.split('.')[1]|int >= 6))) and enable_virtualmedia|bool %}
address: redfish-virtualmedia://{{ hostvars[host]['ipmi_address']|ipwrap }}/redfish/v1/Systems/1
disableCertificateVerification: {{ disable_bmc_certificate_verification }}
{% elif groups['kvm_hosts_redfish'] is defined and host in groups['kvm_hosts_redfish'] %}
address: redfish-virtualmedia://{{ hostvars[host]['ipmi_address']|ipwrap }}:{{ hostvars[host]['redfish_port'] }}/redfish/v1/Systems/{{ hostvars[host]['kvm_uuid'] }}
disableCertificateVerification: true
{% elif ansible_system_vendor == 'Dell Inc.' %}
address: idrac-virtualmedia://{{ hostvars[host]['ipmi_address']|ipwrap }}/redfish/v1/Systems/System.Embedded.1
disableCertificateVerification: {{ disable_bmc_certificate_verification }}
Expand Down Expand Up @@ -140,6 +143,9 @@ platform:
{% elif groups['hp_hosts_redfish'] is defined and host in groups['hp_hosts_redfish'] and ((release_version.split('.')[0]|int > 4) or ((release_version.split('.')[0]|int == 4) and (release_version.split('.')[1]|int >= 6))) and enable_virtualmedia|bool %}
address: redfish-virtualmedia://{{ hostvars[host]['ipmi_address']|ipwrap }}/redfish/v1/Systems/1
disableCertificateVerification: {{ disable_bmc_certificate_verification }}
{% elif groups['kvm_hosts_redfish'] is defined and host in groups['kvm_hosts_redfish'] %}
address: redfish-virtualmedia://{{ hostvars[host]['ipmi_address']|ipwrap }}:{{ hostvars[host]['redfish_port'] }}/redfish/v1/Systems/{{ hostvars[host]['kvm_uuid'] }}
disableCertificateVerification: true
{% elif ansible_system_vendor == 'Dell Inc.' %}
address: idrac-virtualmedia://{{ hostvars[host]['ipmi_address']|ipwrap }}/redfish/v1/Systems/System.Embedded.1
disableCertificateVerification: {{ disable_bmc_certificate_verification }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ platform:
{% elif groups['hp_hosts_redfish'] is defined and host in groups['hp_hosts_redfish'] and ((release_version.split('.')[0]|int > 4) or ((release_version.split('.')[0]|int == 4) and (release_version.split('.')[1]|int >= 5))) %}
address: redfish://{{ hostvars[host]['ipmi_address']|ipwrap }}/redfish/v1/Systems/1
disableCertificateVerification: {{ disable_bmc_certificate_verification }}
{% elif groups['kvm_hosts_redfish'] is defined and host in groups['kvm_hosts_redfish'] %}
address: redfish://{{ hostvars[host]['ipmi_address']|ipwrap }}:{{ hostvars[host]['redfish_port'] }}/redfish/v1/Systems/{{ hostvars[host]['kvm_uuid'] }}
disableCertificateVerification: true
{% elif hostvars[host]['irmc_address'] is defined %}
address: irmc://{{ hostvars[host]['irmc_address']|ipwrap }}:{{ hostvars[host]['irmc_port']|default(443) }}
{% else %}
Expand Down Expand Up @@ -141,6 +144,9 @@ platform:
{% elif groups['hp_hosts_redfish'] is defined and host in groups['hp_hosts_redfish'] %}
address: redfish://{{ hostvars[host]['ipmi_address']|ipwrap }}/redfish/v1/Systems/1
disableCertificateVerification: {{ disable_bmc_certificate_verification }}
{% elif groups['kvm_hosts_redfish'] is defined and host in groups['kvm_hosts_redfish'] %}
address: redfish://{{ hostvars[host]['ipmi_address']|ipwrap }}:{{ hostvars[host]['redfish_port'] }}/redfish/v1/Systems/{{ hostvars[host]['kvm_uuid'] }}
disableCertificateVerification: true
{% elif hostvars[host]['irmc_address'] is defined %}
address: irmc://{{ hostvars[host]['irmc_address']|ipwrap }}:{{ hostvars[host]['irmc_port']|default(443) }}
{% else %}
Expand Down

0 comments on commit d82c9f1

Please sign in to comment.