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

Fix(cv_facts_v3): make image bundle name key usage consistent #513

Conversation

colinmacgiolla
Copy link
Contributor

@colinmacgiolla colinmacgiolla commented Sep 9, 2022

Change Summary

The cv_facts_v3 was providing information (facts) about the software image bundle assigned to the container or device. The current implementation used image_bundle as the key. This is not compatible with the container/device schema, and inconsistent in usage.

This PR updates cv_facts_v3 to provide the image bundle, using the imageBundle key, and updates the container schema to have the imageBundle as a string.

#505 updates the schema in the same way for the device level

Related Issue(s)

Fixes #508

Component(s) name

arista.cvp.cv_facts_v3
schema/v3.py

Proposed changes

Change is from image_bundle: <name of image bundle to imageBundle: <name of image bundle> for both devices and containers.

How to test

- name: container topology creation
  hosts: CloudVision
  connection: local
  gather_facts: no
  vars:
    # Container definition
    containers_provision:
        Undefined:
            configlets: []
            imageBundle: EOS-4.25.4M
            parentContainerName: Tenant
        containerA:
            configlets:
            - configletA1
            - configletA2
            imageBundle: ''
            parentContainerName: Tenant
        containerB:
            configlets:
            - configletB1
            - configletB2
            imageBundle: ''
            parentContainerName: containerA

  tasks:
    - name: "Build Container topology on {{inventory_hostname}}"
      arista.cvp.cv_container_v3:
        topology: '{{containers_provision}}'

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly. (check the box if not applicable)
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

@github-actions github-actions bot added module_utils: cv_client cv_client implementation issue type: documentation Improvements or additions to documentation labels Sep 9, 2022
@colinmacgiolla colinmacgiolla changed the title Fix (cv facts v3) make image bundle name key usage consistent Fix(cv facts v3): make image bundle name key usage consistent Sep 9, 2022
@colinmacgiolla colinmacgiolla changed the title Fix(cv facts v3): make image bundle name key usage consistent Fix(cv_facts_v3): make image bundle name key usage consistent Sep 9, 2022
Copy link
Contributor

@sugetha24 sugetha24 left a comment

Choose a reason for hiding this comment

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

Would you be able to add an example playbook that feeds the output of cv_facts_v3 with the imageBundle keyword in it as an input to cv_container_v3 and cv_device_v3 ?

@sugetha24 sugetha24 force-pushed the Fix-(cv_facts_v3)--Make-imageBundle-usage-consistent branch from 92fe4d7 to 3dbd7ba Compare September 14, 2022 18:45
@sugetha24 sugetha24 force-pushed the Fix-(cv_facts_v3)--Make-imageBundle-usage-consistent branch from 3dbd7ba to e92e9da Compare September 18, 2022 21:57
@sugetha24 sugetha24 force-pushed the Fix-(cv_facts_v3)--Make-imageBundle-usage-consistent branch from e92e9da to c8029d9 Compare September 26, 2022 21:12
@sugetha24 sugetha24 force-pushed the Fix-(cv_facts_v3)--Make-imageBundle-usage-consistent branch from c8029d9 to 115e0e2 Compare October 12, 2022 21:06
@github-actions github-actions bot added the state: conflict PR has conflict to resolve label Oct 13, 2022
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot removed the state: conflict PR has conflict to resolve label Oct 13, 2022
Copy link
Contributor

@noredistribution noredistribution left a comment

Choose a reason for hiding this comment

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

LGTM!

@sugetha24 sugetha24 merged commit 7844696 into aristanetworks:devel Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module_utils: cv_client cv_client implementation issue type: documentation Improvements or additions to documentation
Projects
None yet
3 participants