-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Virt cleanup #48262
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
Merged
Merged
Virt cleanup #48262
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix pylint in virt module and its tests
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'
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
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 typos in tests docstrings
The _get_image_info() function was deprecated but still in use by _gen_vol_xml(). Refactor to use __disk_profile() data instead.
Unused code needs to go away.
Since the number of detected hypervisors can only grow, merge all is_*_hyper functions into a single get_hypervisor one.
Contributor
Author
|
@rallytime, @gtmanfred could you have a look at this PR? I think it should be a rather straight-forward one. |
gtmanfred
approved these changes
Jun 22, 2018
rallytime
approved these changes
Jun 22, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 flexibleget_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