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

Virt cleanup #48262

Merged
merged 8 commits into from Jun 22, 2018

Conversation

Projects
None yet
3 participants
@cbosdo
Copy link
Contributor

commented Jun 22, 2018

What does this PR do?

Cleans up the virt module documentation, removes some deprecated or unused functions and merge all is_*_hyper() functions into more flexible get_hypervisor()

What issues does this PR fix or reference?

None

Tests written?

No, no feature changes in this PR, at most a new function grouping 2 others.

Commits signed with GPG?

Yes

cbosdo added some commits Jun 13, 2018

virt: fix pylint errors
Fix pylint in virt module and its tests
Fix virt module documentation
Several fixes have been squashed into this commit to make the virt
module documentation correct:

 * add missing parameters documentation in publicly exposed functions
 * fix ..versionadded into .. versionadded
 * a few minor display glitches
Fix sphynx error about tornado.version_info
This is fix errors like the following when building docs:

WARNING: autodoc: failed to import module 'salt.states.saltmod'; the following exception was raised:
Traceback (most recent call last):
  File "/public/src/salt/env/lib/python3.6/site-packages/sphinx/ext/autodoc/importer.py", line 140, in import_module
    __import__(modname)
  File "/public/src/salt/salt/states/saltmod.py", line 36, in <module>
    import salt.output
  File "/public/src/salt/salt/output/__init__.py", line 19, in <module>
    import salt.loader
  File "/public/src/salt/salt/loader.py", line 23, in <module>
    import salt.config
  File "/public/src/salt/salt/config/__init__.py", line 27, in <module>
    import salt.utils.network
  File "/public/src/salt/salt/utils/network.py", line 35, in <module>
    import salt.utils.zeromq
  File "/public/src/salt/salt/utils/zeromq.py", line 39, in <module>
    if tornado.version_info < (5,):
TypeError: '<' not supported between instances of 'Mock' and 'tuple'
doc: mock boto.regioninfo._load_json_file
Mockup _load_json_file() in order to avoid the following errors when
building the docs:

WARNING: autodoc: failed to import module 'salt.modules.boto_asg'; the following exception was raised:
Traceback (most recent call last):
  File "/public/src/salt/env/lib/python3.6/site-packages/sphinx/ext/autodoc/importer.py", line 140, in import_module
    __import__(modname)
  File "/public/src/salt/salt/modules/boto_asg.py", line 63, in <module>
    import boto.ec2
  File "/public/src/salt/env/lib/python3.6/site-packages/boto/ec2/__init__.py", line 31, in <module>
    RegionData = load_regions().get('ec2', {})
  File "/public/src/salt/env/lib/python3.6/site-packages/boto/regioninfo.py", line 100, in load_regions
    endpoints = _load_builtin_endpoints()
  File "/public/src/salt/env/lib/python3.6/site-packages/boto/regioninfo.py", line 128, in _load_builtin_endpoints
    resolver = BotoEndpointResolver(endpoints)
  File "/public/src/salt/env/lib/python3.6/site-packages/boto/endpoints.py", line 150, in __init__
    endpoint_data, service_rename_map)
  File "/public/src/salt/env/lib/python3.6/site-packages/boto/endpoints.py", line 44, in __init__
    super(_CompatEndpointResolver, self).__init__(endpoint_data)
  File "/public/src/salt/env/lib/python3.6/site-packages/boto/vendored/regions/regions.py", line 95, in __init__
    raise ValueError('Missing "partitions" in endpoint data')
ValueError: Missing "partitions" in endpoint data
Fix typos in virt module tests
Fix typos in tests docstrings
Remove deprecated _get_image_info
The _get_image_info() function was deprecated but still in use by
_gen_vol_xml(). Refactor to use __disk_profile() data instead.
Remove unused virt._qemu_image_info()
Unused code needs to go away.
Add virt.get_hypervisor
Since the number of detected hypervisors can only grow, merge all
is_*_hyper functions into a single get_hypervisor one.

@cbosdo cbosdo referenced this pull request Jun 22, 2018

Merged

Virt init improvements #48261

@cbosdo

This comment has been minimized.

Copy link
Contributor Author

commented Jun 22, 2018

@rallytime, @gtmanfred could you have a look at this PR? I think it should be a rather straight-forward one.

@rallytime rallytime requested review from gtmanfred and rallytime Jun 22, 2018

@rallytime rallytime merged commit 2661ae5 into saltstack:develop Jun 22, 2018

5 of 10 checks passed

jenkins/PR/salt-pr-linode-cent7-py3 Pull Requests » Salt PR - Linode CentOS 7 - PY3 #5950 — ABORTED
Details
jenkins/PR/salt-pr-linode-ubuntu16-py3 Pull Requests » Salt PR - Linode Ubuntu16.04 - PY3 #10920 — ABORTED
Details
codeclimate 1 issue to fix
Details
default Build finished.
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #20003 — FAILURE
Details
WIP ready for review
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #26154 — SUCCESS
Details
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #18204 — SUCCESS
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #23878 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #22839 — SUCCESS
Details

@cbosdo cbosdo deleted the cbosdo:virt-cleanup branch Aug 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.