* Adding slx_command module and supporting module_utils.
This commit adds the slx_command module and tests as well as the
required slxos module_utils.
* Update copyright in header
* Adding missing module init
* Cleaning up shebangs/licensing.
* Incorporating feedback
Removing reference to `waitfor` alias in `slxos_command` module.
Adding `Extreme Networks` to `short_description` of `slxos_command` module.
* Adding cliconf tests
* Fixing 3.X tests
* Adding docstrings to test methods for slxos cliconf tests
* Adding slxos terminal tests
* Adding slxos module_utils tests
* Adding Extreme Networks team members to BOTMETA.yml
* Add troubleshooting URL for persistent socket path related issue
socket path timeout related error messages are not displayed on the
console as the ansible-connection process does not have access to it.
Until this is fixed need to point to troubleshooting URL so that
users can take corrective actions.
* Fix CI issue
* fix inventory plugin source caching
- avoid caching invetnory sources in loader in base
- same fix for yaml plugin
- idem for 'auto' plugin
fixes#37162
* fix mock dataloader func sig
actual error reprting on failed galaxy clone
also allow debugging to see stdout/stderr from command
handle output for all commands on error
also use std temp dir instead of random
avoids some repetitive loading
- read config file only once
- now cache the ini parser per file
- optimize shell plugin loading
tried to 'optimize' vars_plugins loading but it creates issues with precedence,
probalby due to iterator not being reset, will look into it in subsequent fix/PR
* restrore showing stderr on script success
accidentally removed during transition to plugin, with toggle for those
who prefer the quiet way
fixes#33776
* stderr display if no other errors capture first
* fixed issue with error encoding
* ignore version when deciding callback loading
The code already defaulted to load the callback if the properties are not present
there was no need for us to also check the version
fixes#38270
* fix error msg on set optoins to use correct name
This commit moves code to look for vars files/dirs to a common place and
uses it for loading role defaults/vars. This allows things such as
'defaults/main' or 'vars/main' being a directory in a role, allowing
splitting of defaults/vars into multiple files. This commit also fixes
the role loading unit tests for py3 when bytestrings are used for paths
instead of utf8 strings.
This fixes#14248 and #11639.
* fix urpmi.update path #37432
* improve urpmi
* use get_bin_path rather than hard coding the path
* fix pep8 issue
* avoid using global
* - `RPM_PATH`, `URPMIUPDATE_PATH`, `URPME_PATH`) aren't constants, they should be lowercase rather than uppercase
- shorten too long lines
- remove unused import
* revert removed imports
* use lowercase rather than uppercase
* update doc
* update doc
* update doc after sanity check
* get_url should accept headers as a dict, instead of only a complicated string
* update headers description text
* Add headers string and dict tests for get_url
* Add intg test for string header format parsing error
* Adjust deprecation version ahead 1 release, add the version dict format was added in to description
* Optimize file handling
Use the best practice of opening and doing operations on an opened file
Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
* Fix docstring to Sphinx type
- update the docstrings to Sphinx type, as suggested by Toshio
- Move the pattern object assignment outside the context manager, as
suggested by Matt
Signed-off-by: Daniel Andrei Minca <mandrei17@gmail.com>
* Handle duplicate headers, and make it easier for users to use cookies, by providing a pre-built string
* Ensure proper cookie ordering, make key plural
* Add note about cookie sort order
* Add tests for duplicate headers and cookies_string
* Extend tests, normalize headers between py2 and py3
* Add some notes in test code
* Don't use AttributeError, use six.PY3. Use better names.
* Error if a module is found to shadow a reserved keyword
* Add test for shadowed module
* Bring in functools.wraps for the decorator
* Drop the decorator, make _find_plugin the real function, find_plugin now holds the shadow logic
* Swap order of functions for bottom to top execution order
* Only error for modules
* Add test for loading a lookup plugin that shadows a keyword
* Reflect updated names of the aws_batch_job modules
* Remove mention of `lambda_invoke` module which has yet to make it to
Ansible.
* Update broken rst link in win_dsc module
* Start of tests for ansible.module_utils.urls
* Start adding file for generic functions throughout urls
* Add tests for maybe_add_ssl_handler
* Remove commented out line
* Improve coverage of maybe_add_ssl_handler, test basic_auth_header
* Start tests for open_url
* pep8 and ignore urlopen in test_url_open.py tests
* Extend auth tests, add test for validate_certs=False
* Finish tests for open_url
* Add tests for fetch_url
* Add fetch_url tests to replace-urlopen ignore
* dummy instead of _
* Add BadStatusLine test
* Reorganize/rename tests
* Add tests for RedirectHandlerFactory
* Add POST test to confirm behavior is to convert to GET
* Update tests to handle recent changes to RedirectHandlerFactory
* Special test, just to confirm that aliasing http_error_308 to http_error_307 does not cause issues with urllib2 type redirects
* Allow to set tls_ca_cert or skip verify for grafana datasources
* version_added in documentation for new options tls_skip_verify
* Added default value for tls_skip_verify option in doc
* Fixed author git account
* Updated author
For connection=local check only if the transport value in
provider is cli and the respective module support cli
transport. If not report back appropriate error message.
Currently, when ones run the module in check_mode it tries to retrieve
values from the actual certificate generated in the generate() function.
Since in check_mode we call dump() without calling generate(), self.cert
is None, leading to self.cert.get_notBefore(), self.cert.get_notAfter()
and self.cert.get_serial_number() raising an error.
> NoneType' object has no attribute 'get_notBefore'
The solution is to have two way to handle dump() method, whether its run
in check_mode=True or check_mode=False leading to different way the
information is retrieved.
* manageiq_provider: method docstrings fixes
* manageiq_provider: refactoring step towards DRY
`resource` is now same in `edit_provider()` and `create_provider()`,
to be extracted to main later.
* manageiq_provider: Fix creation of openshift provider
Fixes#38331.
Sending `api_version` to openshift provider would cause error:
"OpenShift api_version cannot be modified"
due to https://github.com/ManageIQ/manageiq-providers-kubernetes/blob/gaprindashvili-2/app/models/manageiq/providers/kubernetes/container_manager.rb#L37
In `edit_provider` we `delete_nulls()` on the whole data being sent
so `api_version` was omitted if not specified.
In `create_provider()` we only did it on endpoints list so `api_version`
was always sent - now doing on whole data.
Physical devices are listed using 'pvs' command. Then, for
'/dev/dm-*' devices 'dmsetup' command is used to find pv_name.
An error occurs when 'pvs' command list an unknown device:
$ pvs --noheadings -o pv_name,vg_name --separator ';'
/dev/dm-0;vg_var
/dev/mapper/sdb3_backups;vg_data_backups
$ dmsetup info -C --noheadings -o name /dev/dm-0
Device dm-0 not found
Then the module fails:
{
"changed": false,
"err": "Device dm-0 not found\nCommand failed\n",
"msg": "Failed executing dmsetup command.",
"rc": 1
}
This failure can be avoided when the unknown device isn't used in
module parameter 'pvs'.