-
Notifications
You must be signed in to change notification settings - Fork 234
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
base: devel
Are you sure you want to change the base?
Conversation
…r monitor_sessions
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 |
for more information, see https://pre-commit.ci
python-avd/pyavd/_eos_designs/structured_config/connected_endpoints/monitor_sessions.py
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/connected_endpoints/monitor_sessions.py
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/connected_endpoints/monitor_sessions.py
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/connected_endpoints/monitor_sessions.py
Outdated
Show resolved
Hide resolved
@cached_property | ||
def monitor_sessions(self: AvdStructuredConfigConnectedEndpoints) -> list | None: | ||
@structured_config_contributor | ||
def monitor_sessions(self: AvdStructuredConfigConnectedEndpoints) -> None: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
for more information, see https://pre-commit.ci
Co-authored-by: Claus Holbech <[email protected]>
Quality Gate passedIssues Measures |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Change Summary
Related Issue(s)
Fixes #
Component(s) name
arista.avd.<role-name>
Proposed changes
How to test
Checklist
User Checklist
Repository Checklist