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

cv device configlets mode #126

Merged
merged 15 commits into from
Jan 28, 2020

Conversation

titom73
Copy link
Contributor

@titom73 titom73 commented Jan 28, 2020

Refactor cv_device to allow easier updates

  • Refactor cv_device to allow easier updates
  • Support new devices provisioning
  • Support device reset
  • Support configlet update
  • Update module & code documentation

Support configlet_mode

  • Capture inputs
  • Implement all 3 modes
  • Update module documentation

Feature use case:

- name: Test cv_device
  hosts: cvp
  connection: local
  gather_facts: no
  collections:
    - arista.cvp
  vars:
    configlet_list:
      cv_device_test01: "alias a{{ 999 | random }} show version"
      cv_device_test02: "alias a{{ 999 | random }} show version"
    # Device inventory for provision activity: bind configlet
    devices_inventory:
      veos01:
        name: veos01
        configlets:
          - cv_device_test01
          - SYS_TelemetryBuilderV2_172.23.0.2_1
          - veos01-basic-configuration
          - SYS_TelemetryBuilderV2
  tasks:
    - name: "Configure devices on {{inventory_hostname}}"
      tags:
        - provision
      cv_device:
        devices: "{{devices_inventory}}"
        cvp_facts: '{{cvp_facts.ansible_facts}}'
        device_filter: ['veos']
        configlet_mode: <merge|overide*|delete>
      register: cvp_device

Start module refactor to allow mode implementation.

Phase01:
- Split to functions
- Add structure output for any function
- Implement configlet update for device
- Do not change reset mode

Todo:
- New device.
- Move device to another container.
- Configlet mode.
- Testing.
Phase02:
- Support device provisioning
- Support device move from one container to another
- Initial manual testing

Todo:
- Configlet mode.
- Testing.
Phase03:
- Add configlet_mode in module
- Support override (default mode)
- Support merge (only add new configlets)

Todo:
- Add support for delete (remove listed configlets)
- Perform complete testing
Phase03:
- Add configlet_mode in module
- Support override (default mode)
- Support merge (only add new configlets)
- Support for delete (remove listed configlets)
- Global testing done
Run local ansible-test linting validation
@titom73 titom73 changed the base branch from releases/v1.1.x to master January 28, 2020 13:05
@titom73 titom73 changed the title Features/117 cv device configlets mode cv device configlets mode Jan 28, 2020
@titom73 titom73 changed the base branch from master to releases/v1.1.x January 28, 2020 14:38
@titom73 titom73 added module: cv_device Issue related to cv_device module status: To be merged Issue solved in a volatile branch type: enhancement New feature or request labels Jan 28, 2020
@titom73 titom73 added this to the v1.1 milestone Jan 28, 2020
@titom73 titom73 merged commit bf85dec into releases/v1.1.x Jan 28, 2020
@titom73 titom73 deleted the features/117-cv-device-configlets-mode branch January 28, 2020 14:40
@titom73 titom73 restored the features/117-cv-device-configlets-mode branch January 30, 2020 11:07
@titom73 titom73 added status: testing PR under testing and removed status: To be merged Issue solved in a volatile branch labels Mar 16, 2020
@titom73 titom73 deleted the features/117-cv-device-configlets-mode branch March 18, 2020 20:29
@titom73 titom73 mentioned this pull request Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: cv_device Issue related to cv_device module status: testing PR under testing type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant