-
Notifications
You must be signed in to change notification settings - Fork 47
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
api: reorganize policy generation API #196
Conversation
Extract policy generation API from api's __init__.py and move into verb as nothing else uses it. Signed-off-by: Kyle Fazzari <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #196 +/- ##
==========================================
- Coverage 54.96% 53.34% -1.63%
==========================================
Files 18 18
Lines 584 583 -1
Branches 52 52
==========================================
- Hits 321 311 -10
- Misses 249 258 +9
Partials 14 14
Continue to review full report at Codecov.
|
if request_services: | ||
self.add_permission( | ||
profile, 'service', 'request', 'ALLOW', request_services, node_name) | ||
|
||
with open(args.POLICY_FILE_PATH, 'w') as stream: | ||
dump_policy(policy, stream) | ||
return 0 | ||
|
||
|
||
def _get_node_names(*, node, include_hidden_nodes=False): |
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 don't think these are more generally useful. They're very specific to this verb. Other packages will consume node names/namespaces on their own.
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.
Agreed
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.
lgtm
Extract policy generation API from api's
__init__.py
and move into verb. Nothing else uses it, and the verb includes a lot of related API on its own.