Align with VINO CR bmhLabels

This patchset makes minor changes to vino-builder to work with the
addition of bmhLabels in [0].

[0] https://review.opendev.org/c/airship/vino/+/782875

Change-Id: I5eb41a863c556b38c819f6da862265e153922fe7
This commit is contained in:
Crank, Daniel (dc6350) 2021-03-29 16:17:15 -05:00
parent c652c4babc
commit 2f591607a4
2 changed files with 4 additions and 4 deletions

View File

@ -96,7 +96,7 @@ def allocate_cores(nodes, flavors, exclude_cpu):
# address the case where previous != desired - delete previous, re-run
for node in nodes:
flavor = node['labels']['vmFlavor']
flavor = node['bmhLabels']['airshipit.org/k8s-role']
vcpus = flavors[flavor]['vcpus']
for num_node in range(0, node['count']):

View File

@ -5,7 +5,7 @@
- name: debug print virsh xml domain
debug:
msg: "{{ flavorTemplates[node.labels.vmFlavor]['domainTemplate'] }}"
msg: "{{ flavorTemplates[node['bmhLabels']['airshipit.org/k8s-role']]['domainTemplate'] }}"
loop: "{{ range(0,node.count)|list }}"
- name: get state of existing volumes
@ -14,7 +14,7 @@
register: vol_list
- name: write out domain volume request xml
copy: content="{{ flavorTemplates[node.labels.vmFlavor]['volumeTemplate'] }}" dest=/tmp/vol-{{item}}.xml
copy: content="{{ flavorTemplates[node['bmhLabels']['airshipit.org/k8s-role']]['volumeTemplate'] }}" dest=/tmp/vol-{{item}}.xml
loop: "{{ range(0,node.count)|list }}"
- name: create domain volume if it doesn't exist
@ -35,7 +35,7 @@
# to domains, so we must shell out here instead
- name: write out domain volume request xml
copy: content="{{ flavorTemplates[node.labels.vmFlavor]['domainTemplate'] }}" dest=/tmp/domain-{{item}}.xml
copy: content="{{ flavorTemplates[node['bmhLabels']['airshipit.org/k8s-role']]['domainTemplate'] }}" dest=/tmp/domain-{{item}}.xml
loop: "{{ range(0,node.count)|list }}"
- name: virsh define domain