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

Cvprac integration #222

Merged
merged 17 commits into from
Sep 4, 2020
Merged

Cvprac integration #222

merged 17 commits into from
Sep 4, 2020

Conversation

titom73
Copy link
Contributor

@titom73 titom73 commented Jul 30, 2020

#191 Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Documentation content changes
  • Other (please describe):

Related Issue(s)

Fix #219
(New version of #221)

Proposed changes

Migrate Modules to CVPRAC:

  • cv_facts
  • cv_configlet
  • cv_device
  • cv_container
  • cv_task

Docs & repo updates

How to test

Run AVD playbook with a CVP deployment with the following setup

# Install CVPRAC fork
$ git clone https://github.com/aristanetworks/cvprac

# Install CVPRAC in development mode
$ cd cvprac
$ python setup.py develop

# Get development version of ansible-cvp collection
$ cd ../ansible-cvp/
$ git fetch upstream # or origin depending of your setup
$ git checkout cvprac-integration

# Run your test

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • All new and existing tests passed (make linting and make sanity-lint).

Change import from module_utils to cvprac lib
Validate with a playbook to upload / update configlets on CV server

```
ansible-playbook playbooks/dc1-upload-configlets.yml -i
inventories/emea/inventory.yml

PLAY [Build Switch configuration]
***************************************************************************************************************

TASK [cvp_configlet_upload : generate intented variables]
***************************************************************************************
Saturday 25 July 2020  14:40:34 +0200 (0:00:00.037)       0:00:00.037
*********
Saturday 25 July 2020  14:40:34 +0200 (0:00:00.037)       0:00:00.037
*********
ok: [cv_server]

TASK [cvp_configlet_upload : collecting facts from CVP cv_server.]
******************************************************************************
Saturday 25 July 2020  14:40:36 +0200 (0:00:01.625)       0:00:01.663
*********
Saturday 25 July 2020  14:40:36 +0200 (0:00:01.625)       0:00:01.662
*********
ok: [cv_server]

TASK [cvp_configlet_upload : create configlets on CVP cv_server.]
*******************************************************************************
Saturday 25 July 2020  14:41:12 +0200 (0:00:36.053)       0:00:37.717
*********
Saturday 25 July 2020  14:41:12 +0200 (0:00:36.053)       0:00:37.716
*********
ok: [cv_server]

PLAY RECAP
**************************************************************************************************************************************
cv_server                  : ok=3    changed=0    unreachable=0
failed=0    skipped=0    rescued=0    ignored=0

Saturday 25 July 2020  14:41:18 +0200 (0:00:06.047)       0:00:43.764
*********
===============================================================================
cvp_configlet_upload ---------------------------------------------------
43.73s
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
total ------------------------------------------------------------------
43.73s
Saturday 25 July 2020  14:41:18 +0200 (0:00:06.047)       0:00:43.763
*********
===============================================================================
cvp_configlet_upload : collecting facts from CVP cv_server.
-----------------------------------------------------------------------------
36.05s
cvp_configlet_upload : create configlets on CVP cv_server.
-------------------------------------------------------------------------------
6.05s
cvp_configlet_upload : generate intented variables
---------------------------------------------------------------------------------------
1.63s
Playbook run took 0 days, 0 hours, 0 minutes, 43 seconds
```
Update cv_facts functions to use cvprac primitive

- get_net_element_info_by_device_id --> get_device_by_mac
- get_devices_by_container_id --> get_devices_in_container
Fix an issue in cv_device where configlets where not correctly attached
to devices.
@titom73
Copy link
Contributor Author

titom73 commented Jul 30, 2020

AVD Testing Phase:

  • AVD to reset lab
  • AVD to deploy from ZTP mode
  • AVD to add additional configlet to device
  • AVD to remove additional configlet to device
  • AVD to add and remove configlet to device
  • AVD to add configlet to container

Test environment:

  • Cloudvision version: 2020.1
  • EOS Version: 4.22.x

@titom73 titom73 self-assigned this Jul 30, 2020
@titom73 titom73 added module: cv_configlet Issue related to cv_configlet module module: cv_container Issue related to cv_container module module: cv_device Issue related to cv_device module module: cv_facts Issue related to cv_facts module module: cv_task Issue related to cv_task module module_utils: cv_client cv_client implementation issue state: accepted Issue is part of the development roadmap status: in-progress Currently under investigation or implementation status: testing PR under testing labels Jul 30, 2020
@titom73 titom73 added this to the v1.2.0 milestone Jul 30, 2020
@titom73 titom73 marked this pull request as ready for review September 4, 2020 14:20
@titom73 titom73 removed this from the v1.2.0 milestone Sep 4, 2020
@titom73 titom73 merged commit 82e6cfb into aristanetworks:devel Sep 4, 2020
@titom73 titom73 deleted the cvprac-integration branch September 4, 2020 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: cv_configlet Issue related to cv_configlet module module: cv_container Issue related to cv_container module module: cv_device Issue related to cv_device module module: cv_facts Issue related to cv_facts module module: cv_task Issue related to cv_task module module_utils: cv_client cv_client implementation issue state: accepted Issue is part of the development roadmap status: in-progress Currently under investigation or implementation status: testing PR under testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request - CVPRAC implementation
1 participant