Add new glance module and states based on shade#44817
Conversation
salt/modules/glanceng.py
Outdated
There was a problem hiding this comment.
This should be Oxygen instead of Nitrogen. :)
salt/modules/glanceng.py
Outdated
There was a problem hiding this comment.
The salt.utils functions have been deprecated and moved to new files recently. We're moving away from importing salt.utils directly. Please use the new paths for any utils functions you may need.
There was a problem hiding this comment.
They are using salt.utils.clean_kwargs for backwards compatibility with this
There was a problem hiding this comment.
Backwards compatibility with what? This PR is being opened against develop.
There was a problem hiding this comment.
some people will want to drop this into their already functioning 2017.7 setup.
Since right now the keystone stuff in 2017.7 and before doesn't work with openstack keystone v3
salt/states/glance_image.py
Outdated
salt/modules/glanceng.py
Outdated
There was a problem hiding this comment.
please change this to __utils__['args.clean_kwargs']
There was a problem hiding this comment.
should I just use the new method and not make it backwards compat? we will still have to carry these internally anyway. itsnot a big deal to me.
|
I made the changes against the just-merged-yesterday keystone module and states as well so that doesnt get lost |
salt/modules/glanceng.py
Outdated
There was a problem hiding this comment.
Please do not use salt.utils. It will create unnecessary deprecation warnings. This entire try block should be rewritten as either
return __utils__['args.clean_kwargs'](**kwargs)or
return salt.utils.args.clean_kwargs(**kwargs)
salt/modules/keystoneng.py
Outdated
There was a problem hiding this comment.
Please replace this entire block with either
return __utils__['args.clean_kwargs'](**kwargs)or
return salt.utils.args.clean_kwargs(**kwargs)The develop branch has deprecated the use of salt.utils and it will generate a deprecation warning if used.
salt/modules/glanceng.py
Outdated
There was a problem hiding this comment.
We should not be importing salt.utils anymore in develop.
There was a problem hiding this comment.
this was already commented on above. @gtmanfred what should I be doing here?
Addtionally adjust to the new way to call clean_kwargs
What does this PR do?
This PR adds a new module (glanceng.py) to supercede glance.py. It uses the shade library from the openstack project (https://github.com/openstack-infra/shade.git) Shade is a project that has committed to maintaining the same API forever. It may add new features and more efficient ways of doing things, but it will never remove things.
We are making extensive use of **kwargs to help prevent the need to maintain lots of duplicate logic that exists in shade itself.
What issues does this PR fix or reference?
N/A
Tests written?
Not yet