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(module_utils): Create resource submodules for fields and schemas #439

Merged
merged 16 commits into from
Feb 11, 2022
Merged

Refactor(module_utils): Create resource submodules for fields and schemas #439

merged 16 commits into from
Feb 11, 2022

Conversation

titom73
Copy link
Contributor

@titom73 titom73 commented Jan 18, 2022

Change Summary

Instead of using definition of FIELDS in each tool, this PR use a global field definition that helps code to be more consistant and helps for maintenance.

Related Issue(s)

N/A

Component(s) name

module_utils

Proposed changes

Create a resources module with following elements:

resources.api.fields:

  • Api: List all fields used in modules with following classification:
    • generic: All fields used regardless of resource type
    • device: All fields specific to device resource management
    • container: All fields specific to container resource management
    • configlet: All fields specific to configlet resource management
    • task: All fields specific to task resource management

resources.modules.fields

  • ModuleOptionValues to get some values related to ansible input like mode or state
  • Modules output keys

resources.schemas

  • schema for v3
  • schema for v1 (for reference only since v1 is deprecated and will be removed)

How to test

Run all existing worklfows and check if there is unexpected changes

Checklist

User Checklist

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

@github-actions github-actions bot added module: cv_configlet_v3 Issue related to cv_cononfiglet module in v3 module: cv_container_v3 Issue related to cv_container module in v3 module: cv_device_v3 Issue related to cv_device module in v3 module_utils: cv_client cv_client implementation issue labels Jan 18, 2022
@titom73 titom73 requested a review from mtache January 18, 2022 10:24
@github-actions github-actions bot added the state: conflict PR has conflict to resolve label Jan 26, 2022
@github-actions
Copy link

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

@github-actions github-actions bot removed the state: conflict PR has conflict to resolve label Jan 27, 2022
@github-actions
Copy link

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

@titom73 titom73 marked this pull request as ready for review January 27, 2022 10:05
@titom73 titom73 changed the title Fix(module_utils): Use Fields module for FIELD constant Fix(module_utils): Create resource submodules for fields and schemas Jan 27, 2022
@github-actions github-actions bot added the state: conflict PR has conflict to resolve label Jan 31, 2022
@github-actions
Copy link

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

@github-actions
Copy link

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

@github-actions github-actions bot removed the state: conflict PR has conflict to resolve label Jan 31, 2022
@titom73 titom73 changed the title Fix(module_utils): Create resource submodules for fields and schemas Refactor(module_utils): Create resource submodules for fields and schemas Feb 10, 2022
@titom73 titom73 merged commit b04a887 into aristanetworks:devel Feb 11, 2022
@titom73 titom73 deleted the features/unify-fields branch February 11, 2022 15:47
titom73 added a commit that referenced this pull request Feb 11, 2022
@titom73 titom73 restored the features/unify-fields branch February 11, 2022 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: cv_configlet_v3 Issue related to cv_cononfiglet module in v3 module: cv_container_v3 Issue related to cv_container module in v3 module: cv_device_v3 Issue related to cv_device module in v3 module: cv_facts_v3 module_utils: cv_client cv_client implementation issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant