-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add API for accessing expected Pulp actions #128
Conversation
This commit adds a new API which generates a list of the associations and unassociations expected to be performed by Pulp for each repo in each UBI configuration. Fixes release-engineering#119
run tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this way of implementation would be very difficult to use in client apps.
Imagine how this will be used in Pub. Also please check DELIVERY-7357 and DELIVERY-7379 which will use this API. See my inline comment for some thoughts.
As this is 1st public API for ubipop, what I miss here is update of readme, docs with examples, examples dir with simple example of usage of this API.
I guess it's not obvious how caller should use this lib. What I mean is that UbiPopulate class will become public and there are no docs how to use it. Also classes that are not intended for public usage should be at least prefixed with underscore.
{ | ||
"repo ID": { | ||
"associations": ( | ||
AssociateActionModules, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How caller should know what he should do with this?
In ubipop it does:
self._executor.submit(*action.get_action(self.pulp))
where action is one item of e.g. AssociateActionModules.
I was thinking about really simple mapping (maybe encapsulated to some class, json can get too complicated for caller) that should be returned to caller and caller will handle actions by its own means:
e.g. in general terms what API should return is:
list of associations: src and dest repo_id, unit_type, [identifier of unit]
list of unassociations: repo_id, unit_type, [identifier of unit]
Does that make some sense?
Also there is a question how to handle actions on mdd as they need to be done in certain order.
At least it needs to be documented.
Okay, I can encapsulate associations and unassociations and leave out mdd_*.
I can add example and documentation for this new API as well.
You're asking for documentation on the whole of UbiPopulate and the privatization of existing classes/methods to be included in the fix for #119? If so, I disagree. I feel those things should be done for a separate issue with the goal of making UbiPopulate public. |
@nathanegillett |
This commit adds a new API which generates a list of the associations
and unassociations expected to be performed by Pulp for each repo in
each UBI configuration.
Fixes #119