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

Feat(eos_cli_config_gen): Add support for unix-socket protocol #4898

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from

Conversation

KrasenKolev
Copy link
Contributor

Change Summary

Add support for unix-socket protocol under management api http-commands

Related Issue(s)

Fixes #4761

Component(s) name

arista.avd.eos_cli_config_gen

Proposed changes

add unix-socket protocol under management api http-commands

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-4898
# Activate the virtual environment
source test-avd-pr-4898/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/KrasenKolev/avd.git@Add_support_for_unix_socket_protocol#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/KrasenKolev/avd.git#/ansible_collections/arista/avd/,Add_support_for_unix_socket_protocol --force
# Optional: Install AVD examples
cd test-avd-pr-4898
ansible-playbook arista.avd.install_examples

@github-actions github-actions bot added role: eos_cli_config_gen issue related to eos_cli_config_gen role state: CI Updated CI scenario have been updated in the PR state: Documentation role Updated labels Jan 20, 2025
@carlbuchmann carlbuchmann changed the title feat(eos_cli_config_gen): Add support for unix-socket protocol Feat(eos_cli_config_gen): Add support for unix-socket protocol Jan 21, 2025
@carlbuchmann
Copy link
Member

@KrasenKolev thank you for the contribution. CI is failing due to modifying a documentation template that impacts all molecule scenarios. To execute all the molecule scenarios, run make refresh-facts from the path ansible_collections/arista/avd/molecule and verify the tests output.

Copy link
Contributor

@ClausHolbechArista ClausHolbechArista left a comment

Choose a reason for hiding this comment

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

Please upgrade your anta version (actually all requirements) and rerun molecule for everything again. It should remove some of the anta catalog changes you see here.

@KrasenKolev
Copy link
Contributor Author

Please upgrade your anta version (actually all requirements) and rerun molecule for everything again. It should remove some of the anta catalog changes you see here.

@ClausHolbechArista, right, after container rebuild everything looks good.

| {{ management_api_http.enable_http | arista.avd.default(false) }} | {{ management_api_http.enable_https | arista.avd.default(true) }} | {{ management_api_http.default_services | arista.avd.default('-') }} |
| HTTP | HTTPS | UNIX-Socket | Default Services |
| ---- | ----- | ----------- | ---------------- |
| {{ management_api_http.enable_http | arista.avd.default(false) }} | {{ management_api_http.enable_https | arista.avd.default(true) }} | {{ management_api_http.enable_unix | arista.avd.default(false) }} | {{ management_api_http.default_services | arista.avd.default('-') }} |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| {{ management_api_http.enable_http | arista.avd.default(false) }} | {{ management_api_http.enable_https | arista.avd.default(true) }} | {{ management_api_http.enable_unix | arista.avd.default(false) }} | {{ management_api_http.default_services | arista.avd.default('-') }} |
| {{ management_api_http.enable_http | arista.avd.default(false) }} | {{ management_api_http.enable_https | arista.avd.default(true) }} | {{ management_api_http.enable_unix | arista.avd.default("-") }} | {{ management_api_http.default_services | arista.avd.default('-') }} |

Copy link
Contributor

Choose a reason for hiding this comment

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

@gmuloc @ClausHolbechArista
If am not wrong since we are not giving any default in schema hence in doc also we should give - as default not false.
@KrasenKolev Please make the changes after confirmation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MaheshGSLAB can you elaborate a bit more on the default values or provide some example where default value is provided ?
I made the schema for the unix protocol the same as the schema for http and https, but in the documentation http and https have default values. What I am missing ?

Copy link
Contributor

Choose a reason for hiding this comment

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

@KrasenKolev we try to avoid having default values in eos_cli_config_gen, so we just render things as given. We still have some default values from early AVD days, and enable_http(s) is one of those.
We prefer to just render - if no value is given. This way we don't have to emulate how EOS would behave, which may change over time depending on platforms or other features.

@ClausHolbechArista ClausHolbechArista dismissed their stale review January 23, 2025 05:40

fixed the requested upgrade of anta

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

Successfully merging this pull request may close these issues.

add support for unix-socket protocol
4 participants