-
Notifications
You must be signed in to change notification settings - Fork 5.6k
DVS states + dependencies #43604
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
DVS states + dependencies #43604
Conversation
|
@alexbleotu, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rallytime, @cro and @skazi0 to be potential reviewers. |
|
@alexbleotu Wow this is really great! While we get started on the reviews, could you please clean up the lint errors? They are here: https://jenkins.saltstack.com/job/PR/job/salt-pr-lint-n/14747/violations/ This is going to be a fantastic addition! |
1525f37 to
b05c45f
Compare
|
@cachedout had to rebase, there were some exceptions added in the PR you merged yesterday I needed in this one |
|
Don't know how to fix the remaining pylint error. Anyone know? |
|
Hey @rallytime I don't have my new laptop set up with pylint yet. Could you check on this error for @alexbleotu please? |
|
Yeah! @alexbleotu Your state module is using The Python 3 lint errors are not very helpful in the normal violation display, but you can find them in the console output of the lint build. (Totally not intuitive, I know, but works for now. We need to figure out what that output doesn't transfer to the jenkins error display.) |
|
Ah cool @rallytime! Thanks for the info! Will fix ASAP |
|
I didn't actually know that. Thanks, @rallytime ! |
|
@cachedout Finally pylint done and all tests relevant to the change pass |
0dfc4e2 to
d41e29e
Compare
salt/modules/vsphere.py
Outdated
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.
ret_dict is a list? This is a bit confusing. :]
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.
Old incarnation of the code. Will fix
salt/modules/vsphere.py
Outdated
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.
IMHO ress and res as variable names is very hard to read.
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.
Will fix
salt/states/dvs.py
Outdated
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.
Would it be better to move these private dictionary difference functions over to salt.utils.dictdiffer?
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.
Yep, I already created a RecursiveDictDiffer in salt.utils.dictdiffer which should be used here (it's in a different pull request). This is pretty old code however and I didn't have time to update it. It's not such a trivial change. That's why I've upstreamed this code and will revisit later.
… distributed virtual portgroup
…epresentation of the uplink portgroup of a DVS
… a VMware spec object
… based on a dict representations
… based on a dict representations
…moved reference to Python 2.6
16e9700 to
c1d3bda
Compare
|
@cachedout rebased and added the pyVmomi incompatibility check |
|
Somehow some failing unit tests appeared due to #43645. Will fix ASAP |
…ffer so result is deterministic
64982aa to
847deba
Compare
|
some more test fixes |
|
Thank you very much for fixing up those tests, @alexbleotu! I guess we missed those failures when merging the other PR. I have fixed the boto and openscap test failures in other PRs. |
What does this PR do?
Implements new states and required execution and utils functions to manage distributed virtual switches (DVS) and distributed virtual portgroups (DVportgroup).
A new function file was added
salt.states.dvs; in it's sysdoc there are examples of expected input.State functions:
Execution functions:
Utils functions:
Tests written?
Yes (utils functions only)
Please review Salt's Contributing Guide for best practices.