Skip to content
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

examppple added for un-tag and tag a image #78

Conversation

syed-khadeerahmed
Copy link
Collaborator

@syed-khadeerahmed syed-khadeerahmed commented Dec 20, 2024

Description

Please include a summary of the changes and the related issue. Also, include relevant motivation and context.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • All the sanity checks have been completed and the sanity test cases have been executed

Ansible Best Practices

  • Tasks are idempotent (can be run multiple times without changing state)
  • Variables and secrets are handled securely (e.g., using ansible-vault or environment variables)
  • Playbooks are modular and reusable
  • Handlers are used for actions that need to run on change

Documentation

  • All options and parameters are documented clearly.
  • Examples are provided and tested.
  • Notes and limitations are clearly stated.

Screenshots (if applicable)

Notes to Reviewers

@@ -462,6 +462,29 @@
site_name: Global/USA/San Francisco/BGL_18
tagging: True

- name: Remove the golden tag from the specified image for the given device role and assign it to another device role.
Copy link
Collaborator

@madhansansel madhansansel Dec 20, 2024

Choose a reason for hiding this comment

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

- name: Replace golden tag from one device role to another for the specified image
or

- name: Remove golden tag from one device role and assign it to another

config:
- tagging_details:
image_name: cat9k_iosxe.17.12.01.SPA.bin
device_role: Core
Copy link
Collaborator

Choose a reason for hiding this comment

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

CORE or Core
ACCESS or Access? Follow one style?

dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
dnac_log_level: "{{dnac_log_level}}"
dnac_log: True
Copy link
Collaborator

Choose a reason for hiding this comment

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

true

image_name: cat9k_iosxe.17.12.01.SPA.bin
device_role: Core
device_image_family_name: Cisco Catalyst 9300 Switch
tagging: False
Copy link
Collaborator

Choose a reason for hiding this comment

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

false

image_name: cat9k_iosxe.17.12.01.SPA.bin
device_role: ACCESS
device_image_family_name: Cisco Catalyst 9300 Switch
tagging: True
Copy link
Collaborator

Choose a reason for hiding this comment

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

true

@@ -343,6 +343,12 @@

- Added the parameter 'dnac_api_task_timeout', 'dnac_task_poll_interval' options in v6.13.2.

- additional_info |
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can include this information in device_role itself

device_role:
  description: |
    Specifies the device role(s) for tagging or untagging the image as golden.

    Permissible values:
    - 'ALL': Applies the golden tag to all devices, regardless of role.
    - 'UNKNOWN': Tags devices without a specified classification.
    - 'ACCESS': Tags devices that connect end-user devices (e.g., access switches).
    - 'BORDER ROUTER': Tags devices linking different network segments or domains.
    - 'DISTRIBUTION': Tags devices aggregating traffic toward the core.
    - 'CORE': Tags backbone devices handling high-volume network traffic.

    Behavior:
    - If 'device_role' is a single string (e.g., `"ACCESS"`), only that role is tagged as golden.
    - If 'device_role' contains multiple roles (e.g., `"ACCESS,CORE"`), all specified roles are tagged as golden.

    To replace an existing golden tag for a specific role:
    - **Unassign** the tag from the current role (e.g., `ACCESS`).
    - **Assign** the tag to the new role (e.g., `CORE`).

    Examples:
    - device_role: "ACCESS" tags only the `ACCESS` role as golden.
    - device_role: "ACCESS,CORE" tags both `ACCESS` and `CORE` roles as golden.
  type: str

@madhansansel madhansansel merged commit 166390f into cisco-en-programmability:main Dec 20, 2024
3 of 4 checks passed
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