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

A proposal for modularizing tgt logic. #44637

Closed
kstreee opened this issue Nov 22, 2017 · 7 comments
Closed

A proposal for modularizing tgt logic. #44637

kstreee opened this issue Nov 22, 2017 · 7 comments
Labels
Feature new functionality including changes to functionality and code refactors, etc. stale
Milestone

Comments

@kstreee
Copy link
Contributor

kstreee commented Nov 22, 2017

Description of Issue/Question

In my company, we have used customized tgt modules by implementing company dependent methods. We would like to modularize the tgt module to maintain well (like auth modules), but the current tgt modules are implemented as a series of functions in a single file, /salt/utils/minions.py. Thus, if you guys think that this proposal—modularize tgt modules—is appropriate to Salt Stack, we would like to contribute it. I guess the auth module is a good reference for this modularization work.

Are there any opinions or questions about it, or any advice about modularizing tgt modules, please leave comments for us.

Thanks.

Setup

N/A

Steps to Reproduce Issue

N/A

Versions Report

N/A

@kstreee kstreee changed the title Proposal to modularize tgt logic. A proposal for modularizing tgt logic. Nov 22, 2017
@Ch3LL
Copy link
Contributor

Ch3LL commented Nov 22, 2017

I don't see an issue with this idea but maybe @saltstack/team-core has some advice or opinions on this.

@Ch3LL Ch3LL added the Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged label Nov 22, 2017
@Ch3LL Ch3LL added this to the Blocked milestone Nov 22, 2017
@kstreee
Copy link
Contributor Author

kstreee commented Nov 28, 2017

@saltstack/team-core @Ch3LL Hi all, any opinions or advice here?

@thatch45
Copy link
Member

I think this would be a fine idea.

If you want to implement this you would need to make a loader system, first take a look at the /salt/loader.py file. This file has a number of functions that invoke the loader to create the subsystems. Next you will need to make that loader instance where the Matcher class is created.

Now, the trick is that you will also need to modularize the CkMinions system as well, check all of those references and make sure they are also making loader calls. The CkMinions system is found here: https://github.com/saltstack/salt/blob/develop/salt/utils/minions.py#L174

@kstreee
Copy link
Contributor Author

kstreee commented Nov 29, 2017

@thatch45 Thanks for the comment. It will be a great help for us while implementing it. Thanks 😄

@thatch45
Copy link
Member

Feel free to reach out and ask questions. Adding a loader subsystem is not hard, but it can have a few confusing turns

@Ch3LL Ch3LL added Feature new functionality including changes to functionality and code refactors, etc. team-core and removed Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged labels Nov 30, 2017
@Ch3LL Ch3LL modified the milestones: Blocked, Approved Nov 30, 2017
@stale
Copy link

stale bot commented Mar 25, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Mar 25, 2019
@stale stale bot closed this as completed Apr 1, 2019
@gtmanfred
Copy link
Contributor

this was actually completed for 2019.2

they are located in salt/matchers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc. stale
Projects
None yet
Development

No branches or pull requests

4 participants