Skip to content

Conversation

@allenrobel
Copy link
Collaborator

This PR updates the following vars in all dcnm_bootflash integration tests to align with standardized switch naming.

switch1 -> switch_1
switch2 -> switch_2

This commit updates the following vars in all dcnm_bootflash integration tests:

switch1 -> switch_1
switch2 -> switch_2

We are standardizing on switch_X going forward for all ansible-dcnm integration tests.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates variable naming in dcnm_bootflash integration tests to standardize switch references from switch1/switch2 to switch_1/switch_2. The changes apply to documentation comments, IP address variable references, and dictionary key accesses across four test files.

Key Changes:

  • Updated IP address variable references from {{ switch1 }} and {{ switch2 }} to {{ switch_1 }} and {{ switch_2 }}
  • Updated dictionary key accesses in assertions from switch1/switch2 to switch_1/switch_2
  • Updated documentation comments to reference the new naming convention

Issue Identified:
The PR partially implements the standardized naming convention. While it updates the main switch variables and dictionary keys, it does not update related compound variables like switch1_file1, switch1_filepath1, switch2_file1, etc. to switch_1_file1, switch_1_filepath1, switch_2_file1, etc. This creates an inconsistent naming pattern where some variables use underscores and others don't. Complete consistency would require also updating the variable definitions in defaults/main.yaml.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
tests/integration/targets/dcnm_bootflash/tests/dcnm_bootflash_query_wildcard.yaml Updates switch variable references in comments, config, and assertions from switch1/switch2 to switch_1/switch_2
tests/integration/targets/dcnm_bootflash/tests/dcnm_bootflash_query_specific.yaml Updates switch variable references in comments, config, and assertions from switch1/switch2 to switch_1/switch_2
tests/integration/targets/dcnm_bootflash/tests/dcnm_bootflash_deleted_wildcard.yaml Updates switch variable references in comments, config, and assertions from switch1/switch2 to switch_1/switch_2
tests/integration/targets/dcnm_bootflash/tests/dcnm_bootflash_deleted_specific.yaml Updates switch variable references in comments, config, and assertions from switch1/switch2 to switch_1/switch_2
Comments suppressed due to low confidence (2)

tests/integration/targets/dcnm_bootflash/tests/dcnm_bootflash_deleted_specific.yaml:219

  • Inconsistent variable naming: While the IP address variable has been updated to {{ switch_2 }}, the file variables in the filepath templates still use the old naming convention (switch2_file1, switch2_file2, etc.). For consistency with the standardized naming, these should be updated to switch_2_file1, switch_2_file2, switch_2_file3, switch_2_file4. This also requires updating the variable definitions in defaults/main.yaml.
              - filepath: "bootflash:/{{ switch2_file1 }}"
                supervisor: active
              - filepath: "bootflash:/{{ switch2_file2 }}"
                supervisor: active
              - filepath: "bootflash:/{{ switch2_file3 }}"
                supervisor: active
              - filepath: "bootflash:/{{ switch2_file4 }}"

tests/integration/targets/dcnm_bootflash/tests/dcnm_bootflash_query_specific.yaml:236

  • Inconsistent variable naming: While the IP address variables have been updated to {{ switch_2 }}, the file variables in the filepath templates still use the old naming convention (switch2_file2, switch2_file3, etc.). For consistency with the standardized naming, these should be updated to switch_2_file2, switch_2_file3, switch_2_file4. This also requires updating the variable definitions in defaults/main.yaml.
              - filepath: "bootflash:/{{ switch2_file2 }}"
                supervisor: active
              - filepath: "bootflash:/{{ switch2_file3 }}"
                supervisor: active
              - filepath: "bootflash:/{{ switch2_file4 }}"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +254 to +259
- result.diff[0][switch_1][0].filepath == switch1_filepath1
- result.diff[0][switch_1][1].filepath == switch1_filepath2
- result.diff[0][switch_1][2].filepath == switch1_filepath3
- result.diff[0][switch_2][0].filepath == switch2_filepath1
- result.diff[0][switch_2][1].filepath == switch2_filepath2
- result.diff[0][switch_2][2].filepath == switch2_filepath3
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent variable naming: While the dictionary keys have been correctly updated to switch_1 and switch_2, the comparison variables still use the old naming convention (switch1_filepath1, switch1_filepath2, etc.). For consistency with the standardized naming, consider updating these to switch_1_filepath1, switch_1_filepath2, etc. This would also require updating the variable definitions in defaults/main.yaml and the set_fact task above.

Copilot uses AI. Check for mistakes.
Comment on lines +222 to +227
- result.diff[0][switch_1][0].filepath == switch1_filepath1
- result.diff[0][switch_1][1].filepath == switch1_filepath2
- result.diff[0][switch_1][2].filepath == switch1_filepath3
- result.diff[0][switch_2][0].filepath == switch2_filepath1
- result.diff[0][switch_2][1].filepath == switch2_filepath2
- result.diff[0][switch_2][2].filepath == switch2_filepath3
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent variable naming: While the dictionary keys have been correctly updated to switch_1 and switch_2, the comparison variables still use the old naming convention (switch1_filepath1, switch1_filepath2, etc.). For consistency with the standardized naming, consider updating these to switch_1_filepath1, switch_1_filepath2, etc. This would also require updating the variable definitions in defaults/main.yaml and the set_fact task above.

Copilot uses AI. Check for mistakes.
Comment on lines +239 to +246
- result.diff[0][switch_1][0].filepath == switch1_filepath1
- result.diff[0][switch_1][1].filepath == switch1_filepath2
- result.diff[0][switch_1][2].filepath == switch1_filepath3
- result.diff[0][switch_1][3].filepath == switch1_filepath4
- result.diff[0][switch_2][0].filepath == switch2_filepath1
- result.diff[0][switch_2][1].filepath == switch2_filepath2
- result.diff[0][switch_2][2].filepath == switch2_filepath3
- result.diff[0][switch_2][3].filepath == switch2_filepath4
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent variable naming: While the dictionary keys have been correctly updated to switch_1 and switch_2, the comparison variables still use the old naming convention (switch1_filepath1, switch1_filepath2, etc.). For consistency with the standardized naming, consider updating these to switch_1_filepath1, switch_1_filepath2, etc. This would also require updating the variable definitions in defaults/main.yaml and the set_fact task above.

Copilot uses AI. Check for mistakes.
Comment on lines +243 to +248
- result.diff[0][switch_1][0].filepath == switch1_filepath1
- result.diff[0][switch_1][1].filepath == switch1_filepath2
- result.diff[0][switch_1][2].filepath == switch1_filepath3
- result.diff[0][switch_2][0].filepath == switch2_filepath1
- result.diff[0][switch_2][1].filepath == switch2_filepath2
- result.diff[0][switch_2][2].filepath == switch2_filepath3
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent variable naming: While the dictionary keys have been correctly updated to switch_1 and switch_2, the comparison variables still use the old naming convention (switch1_filepath1, switch1_filepath2, etc.). For consistency with the standardized naming, consider updating these to switch_1_filepath1, switch_1_filepath2, etc. This would also require updating the variable definitions in defaults/main.yaml and the set_fact task above.

Copilot uses AI. Check for mistakes.
Comment on lines 224 to 228
- filepath: "bootflash:/{{ switch1_file2 }}"
supervisor: active
- filepath: "bootflash:/{{ switch1_file3 }}"
supervisor: active
- filepath: "bootflash:/{{ switch1_file4 }}"
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent variable naming: While the IP address variables have been updated to {{ switch_1 }} and {{ switch_2 }}, the file variables in the filepath templates still use the old naming convention (switch1_file2, switch1_file3, etc.). For consistency with the standardized naming, these should be updated to switch_1_file2, switch_1_file3, switch_1_file4. This also requires updating the variable definitions in defaults/main.yaml.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants