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

Refactor(eos_designs): Refactor eos_designs structured_config code for monitor_sessions [WORK IN PROGRESS] #4937

Draft
wants to merge 8 commits into
base: devel
Choose a base branch
from

Conversation

Shivani-gslab
Copy link
Contributor

Change Summary

Related Issue(s)

Fixes #

Component(s) name

arista.avd.<role-name>

Proposed changes

How to test

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.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

Copy link

Review docs on Read the Docs

To test this pull request:

# Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-4937
# Activate the virtual environment
source test-avd-pr-4937/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/Shivani-gslab/avd.git@monitor_session_refactor#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/Shivani-gslab/avd.git#/ansible_collections/arista/avd/,monitor_session_refactor --force
# Optional: Install AVD examples
cd test-avd-pr-4937
ansible-playbook arista.avd.install_examples

@cached_property
def monitor_sessions(self: AvdStructuredConfigConnectedEndpoints) -> list | None:
@structured_config_contributor
def monitor_sessions(self: AvdStructuredConfigConnectedEndpoints) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Check if it makes sense to populate the self._monitor_session_configs with the EosCliConfigGen models directly instead of having to convert all of them here. Only if it makes sense and we can save something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tried converting https://github.com/aristanetworks/avd/pull/4937/files#diff-1284449f8b76718c2db4584fca521df1812f6dfb92991fe30970a0285d5151bbR98 to EosCliConfigGen object but it throws error for extra keys, which are being used later.

Copy link

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

@github-actions github-actions bot added the state: conflict PR with conflict label Jan 30, 2025
Copy link

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

@github-actions github-actions bot removed the state: conflict PR with conflict label Jan 31, 2025
@Shivani-gslab Shivani-gslab changed the title Refactor(eos_designs): Refactor eos_designs structured_config code for monitor_sessions Refactor(eos_designs): Refactor eos_designs structured_config code for monitor_sessions [WORK IN PROGRESS] Feb 6, 2025
@github-actions github-actions bot added the state: CI Updated CI scenario have been updated in the PR label Feb 7, 2025
Shivani-gslab and others added 2 commits February 7, 2025 17:44
Copy link

sonarqubecloud bot commented Feb 7, 2025

@github-actions github-actions bot added the state: conflict PR with conflict label Feb 7, 2025
Copy link

github-actions bot commented Feb 7, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: CI Updated CI scenario have been updated in the PR state: conflict PR with conflict
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants