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_downloader v2 #103

Merged
merged 52 commits into from
Dec 12, 2024
Merged

feat: eos_downloader v2 #103

merged 52 commits into from
Dec 12, 2024

Conversation

titom73
Copy link
Owner

@titom73 titom73 commented Dec 4, 2024

This pull request includes several changes to the eos_downloader project, focusing on improving the overall code structure, CLI commands, updating the documentation, and cleaning up the codebase.

Important

This Pull Request is introducing breaking change and compatibility with previous version is not maintained.

One of the main goal is to make code easier to maintain and open the door to easily support extension of software to download from Arista website. Today it is limited to EOS and CloudVision.

Task list:

  • Implement Objects with models and logics.
  • Implement Unit tests for new code.
  • Implement CLI to query Arista website
  • Implement EVE-NG integration
  • Implement docker integration
  • Repository cleanup

Available commands

  • ardl get eos ...
  • ardl get cvp ...
  • ardl info latest
  • ardl info versions
  • ardl info mapping
  • ardl debug xml

Changes

Codebase simplification

In this pull request, codebase has been massively updated in a more granular way:

  • models: all data representation mostly based on Pydantic.
  • logics: classes that implement logics to manipulate data.
  • helpers: Some functions to make code easier to maintain.

Full OOP approach to make it easier to maintain:

Data modeling with following objects:

  • eos_downloader.models.versions.{woftware}Version: A SemVer representation of a version. Helpful to do comparisons.
  • eos_downloader.models.data.DataMapping: Structure to save file structure.

Code logic is part of the following objects:

  • eos_downloader.logics.server.AristaServer: Manage HTTPS connection with Arista server
  • eos_downloader.logics.arista_server.AristaXmlQuerier: To query data from Arista website to get version information.
  • eos_downloader.logics.arista_server.{software}XmlObject: Object that represents a file to download from Arista Website
  • eos_downloader.logics.download.SoftManager: A class to manage object download from Arista website.

CLI Commands Enhancements:

  • Added new info command to list information from the Arista website (README.md, README.mdR45-R155).
  • Introduced versions and latest commands to list available versions and get the latest version of Arista packages (eos_downloader/cli/cli.py, eos_downloader/cli/cli.pyL65-R69).

Documentation Updates:

  • Updated README.md to include new commands and improve the clarity of existing instructions (README.md, [1] [2].

@titom73 titom73 added documentation Improvements or additions to documentation enhancement New feature or request CLI eos_download lib labels Dec 4, 2024
@titom73 titom73 self-assigned this Dec 4, 2024
@titom73 titom73 marked this pull request as ready for review December 12, 2024 08:09
@titom73 titom73 merged commit fe4bc4f into main Dec 12, 2024
17 checks passed
@titom73 titom73 deleted the refactor/code-v2 branch December 12, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI documentation Improvements or additions to documentation enhancement New feature or request eos_download lib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant