XenServer: Documentation improvements and fixes for XenServer related modules (#53498)

- More info added to module docs.
 - Fixed errors and typos in module docs.
 - Added parameter types to module docs.
 - Some error messages are fixed and/or changed to be more helpful.
 - Some code comments changed and added.
 - Updated unit tests that test changed error messages.
 - Improved module examples.
 - Improved docs for custom_params xenserver_guest module parameter
This commit is contained in:
Bojan Vitnik 2019-03-11 04:26:17 +01:00 committed by Abhijeet Kasurde
commit e775434a52
7 changed files with 138 additions and 99 deletions

View file

@ -20,7 +20,9 @@ def test_xenserverobject_xenapi_lib_detection(mocker, fake_ansible_module, xense
with pytest.raises(FailJsonException) as exc_info:
xenserver.XenServerObject(fake_ansible_module)
assert exc_info.value.kwargs['msg'] == "XenAPI.py required for this module! Please download XenServer SDK and copy XenAPI.py to your site-packages."
assert exc_info.value.kwargs['msg'] == ("XenAPI Python library is required for this module! "
"Please download XenServer SDK and copy XenAPI.py to your Python site-packages. "
"Check Notes section in module documentation for more info.")
def test_xenserverobject_xenapi_failure(mock_xenapi_failure, fake_ansible_module, xenserver):