-
Notifications
You must be signed in to change notification settings - Fork 17
Rename ABI-specific baremetal vars to AGENT_BAREMETAL_* prefix #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -431,33 +431,33 @@ generate_baremetal_config() { | |
| echo "export MANAGE_INT_BRIDGE=n" | ||
| echo "export AGENT_E2E_TEST_SCENARIO=\"TNF_IPV4_DHCP\"" | ||
|
|
||
| # BAREMETAL_IPS is required — dev-scripts crashes under set -u without it | ||
| # AGENT_BAREMETAL_IPS is required — dev-scripts agent pipeline needs node IPs | ||
| local ip_list="" | ||
| for ((i = 0; i < ${#NODE_IPS[@]}; i++)); do | ||
| [[ -z "${NODE_IPS[$i]}" ]] && die "Node '${NODE_NAMES[$i]}': node_ip is required for baremetal deploy" | ||
| [[ -n "${ip_list}" ]] && ip_list+="," | ||
| ip_list+="${NODE_IPS[$i]}" | ||
| done | ||
| echo "export BAREMETAL_IPS=\"${ip_list}\"" | ||
| echo "export AGENT_BAREMETAL_IPS=\"${ip_list}\"" | ||
|
|
||
| # BAREMETAL_API_VIP is required — set_api_and_ingress_vip() needs it | ||
| # BAREMETAL_API_VIP is platform-level (used by both IPI and ABI in network.sh) | ||
| [[ -z "${API_VIP}" ]] && die "api_vip is required in [baremetal_network] for baremetal deploy" | ||
| [[ -z "${ISO_URL}" ]] && die "iso_url is required in [baremetal_network] for baremetal deploy" | ||
| echo "" | ||
| echo "# Baremetal network config" | ||
| echo "export BAREMETAL_API_VIP=\"${API_VIP}\"" | ||
| echo "export BAREMETAL_ISO_SERVER=\"${ISO_URL}\"" | ||
| echo "export AGENT_BAREMETAL_ISO_SERVER=\"${ISO_URL}\"" | ||
| [[ -n "${MACHINE_NETWORK}" ]] && echo "export EXTERNAL_SUBNET_V4=\"${MACHINE_NETWORK}\"" | ||
| [[ -n "${INGRESS_VIP}" ]] && echo "export BAREMETAL_INGRESS_VIP=\"${INGRESS_VIP}\"" | ||
|
|
||
| # BAREMETAL_MACS is required — agent-config needs data NIC MACs for hostname mapping | ||
| # AGENT_BAREMETAL_MACS is required — agent-config needs data NIC MACs for hostname mapping | ||
| local mac_list="" | ||
| for ((i = 0; i < ${#NODE_DATA_MACS[@]}; i++)); do | ||
| [[ -z "${NODE_DATA_MACS[$i]}" ]] && die "Node '${NODE_NAMES[$i]}': data_mac is required for baremetal deploy" | ||
| [[ -n "${mac_list}" ]] && mac_list+="," | ||
| mac_list+="${NODE_DATA_MACS[$i]}" | ||
| done | ||
| echo "export BAREMETAL_MACS=\"${mac_list}\"" | ||
| echo "export AGENT_BAREMETAL_MACS=\"${mac_list}\"" | ||
|
Comment on lines
+453
to
+460
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf 'Inspecting cited files...\n'
sed -n '440,470p' deploy/openshift-clusters/scripts/baremetal-adopt.sh
printf '\n---\n'
sed -n '1,80p' deploy/openshift-clusters/inventory_baremetal.ini.sample
printf '\nSearching for old/new variable references...\n'
rg -n 'BAREMETAL_MACS|AGENT_BAREMETAL_MACS|data_mac' deploy/openshift-clustersRepository: openshift-eng/two-node-toolbox Length of output: 7590 Update the inventory sample to use 🤖 Prompt for AI Agents |
||
| } > "${output_file}" | ||
|
|
||
| info " → ${output_file}" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use uppercase names for new shell locals.
ip_list,mac_list, and the loop indexiviolate the repository’s shell-script naming rule. Rename them consistently, for example, toIP_LIST,MAC_LIST, andINDEX.As per coding guidelines, shell scripts should use meaningful uppercase variable names.
Proposed fix
Also applies to: 454-458
🤖 Prompt for AI Agents
Source: Coding guidelines