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

QACTL: Add an implementation to generate S3 links #1809

Closed
6 tasks done
fernandolojano opened this issue Aug 30, 2021 · 4 comments
Closed
6 tasks done

QACTL: Add an implementation to generate S3 links #1809

fernandolojano opened this issue Aug 30, 2021 · 4 comments
Assignees

Comments

@fernandolojano
Copy link
Contributor

fernandolojano commented Aug 30, 2021

This issue has been created with the purpose of implementing a method that will use the new parameter entries to generate the proper link for the desired package. As the new command line type will be:

qa-ctl -r test_general_settings_enabled -v 4.2.0

We have to use this information along with some internal parameters to generate the S3 link and use it for the running qa-ctl instance.

Tasks

In order to get this process done, several taks needs to be done:

  • Research for possible implementations
  • Research for the needed parameters
  • Give a first implementation approach
  • Test possible case uses to search for errors
  • Modify schema validator file
  • Modify current QAProvisioning implementation
@fernandolojano fernandolojano self-assigned this Aug 30, 2021
@fernandolojano fernandolojano changed the title QACTL: Add a implementation to generate S3 links QACTL: Add an implementation to generate S3 links Aug 30, 2021
@fernandolojano
Copy link
Contributor Author

The working branch for this issue is : 1809-gen-s3-links-implementation

@fernandolojano
Copy link
Contributor Author

As for now, the first implemented approach for this issue is finished. The implementation given in the file s3Helper file has been used as a guidence. This file plus another changes added in the implementation have given us this first approach.
In order to prove that the functions are working correcty, catch possible error cases and add modifications for improving its functionality, we need to test some case uses for this new tool.

@fernandolojano
Copy link
Contributor Author

The new alternative method for getting a wazuh s3 link generating it by using certain parameters given in the yaml configurator file is implemented and working fine. In order to get this method to work, the modifications and additions made were:

  • The current QAProvisioning test has been modified adding a new condition in the package section, which funtion is to pass all the useful parameters for the s3 package generator link method.
  • The method is called in the wazuh_s3_package.py file and it uses different functions implemented in the file s3_package.py file. This new file is going to be used as a tool. Because of that, it is stored into the tools directory.
  • As a last point worth to mention, the schema validator file has been also modified and now there is a new condition where all the parameters needed for the generator functions are required at once, that means that if one just paremeter of the required list (version, system, architecture, revision, repository) is given or missing, the validation process will fail until all the parameters required in the list are given or until none of them are appearing in the yaml configuration file

@jmv74211
Copy link
Contributor

jmv74211 commented Oct 7, 2021

This issue has been closed by this PR #1828

@jmv74211 jmv74211 closed this as completed Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants