Commit Graph

926 Commits (1aa39ae78bc0c3cbb36e2ee6dfa658b98e17024c)

Author SHA1 Message Date
Toshio Kuratomi 92e4f25066 Make load_params into a function that custom modules can access (#15913) 10 years ago
machilde 41f45336a9 Fixed issue with parents havings depth of 3+ on add method of NetworkConfig 10 years ago
Mike Bryant 76cd7cadfe Allow ssh agent usage for junos_netconf
By default the `Shell` class disables ssh agents. The `junos_netconf`
module uses this class, but doesn't re-enable agents.
Here it's explicitly enabled again, so an ssh agent can be used to
connect to and configure Junos devices.
10 years ago
Kei Nohguchi 94e4e4105d openswitch.py: Fix the OpenSwitch REST authentication
It's a cookie based authentication, that we get it
through /login endpoint, called by connect() method
and save the cookie for the rest of the call.
10 years ago
Peter Sprygada 309aba128c handle name resolution errors more gracefully from shell.py
This change will catch socket.gaierror exceptions from shell.py and
return a more friendly message to the user
10 years ago
Peter Sprygada 2259b90827 bugfix for issue with trying to eval contains with non-string
fixes ansible/ansible-modules-core#3502
10 years ago
Peter Sprygada d9fa5a3b80 fixes #15496
changed to using OrderedDict to preserve order of lines
10 years ago
Michael Scherer e0112a3db3 Fix pkgin detection on NetBSD 6 and 7 (#15834)
Since this is now the default package manager, it got moved
to another location on Netbsd :

  netbsd# type pkgin
  pkgin is a tracked alias for /usr/pkg/bin/pkgin
  netbsd# uname -a
  NetBSD netbsd.example.org 6.1.4 NetBSD 6.1.4 (GENERIC) amd64

But since the package manager is also used outside of NetBSD, we
have to keep the /opt/local path too.
10 years ago
Nathaniel Case 8f4243c3ec Check for jxmlease when using netconf on JUNOS. (#15835) 10 years ago
camradal af5195e336 vCloud module utils error handling bug fixes (#15859)
* Fix AttributeError that hides login errors

* Typo fixes for vca error messages
10 years ago
Matt Martz 9121ca2f8e Use .code instead of .getcode() as py24 does not have .getcode(). Fixes https://github.com/ansible/ansible-modules-core/issues/3608 10 years ago
Toshio Kuratomi cae6240e5e Ship constants to the modules via internal module params rather than a secondary dict. 10 years ago
Matt Martz 047d62cce3 Guard against a shell profile printing extraneous data 10 years ago
Toshio Kuratomi 8cd0c432e7 Fixed importing the libcloud modules to give a nice error rather than a traceback. 10 years ago
Vic Iglesias 151df71464 Update GCE module to use JSON credentials (#13623)
* Update GCE module to use JSON credentials

* Ensure minimum libcloud version when using JSON crednetials for GCE

* Relax langauge around libcloud requirements
10 years ago
Toshio Kuratomi e9406bcfd3 Backport some python3 fixes for facts 10 years ago
Toshio Kuratomi be28443943 Strip leading and trailing whitespace for json arg types 10 years ago
camradal a355ebcbb8 Fix logging into vCloud Director and expose verify_certs argument (#15533) 10 years ago
Toshio Kuratomi efbcd8bda0 Add a jsonarg type to arg spec (#15701)
This makes sure that if we get a list or dict that it is turned into
a jsonified string.
10 years ago
jctanner 16c1f10e18 Remove the ziploader provided pythonpaths from the env inside run_com… (#15674)
Remove the ziploader provided pythonpaths from the env inside run_command.

Fixes #15655
10 years ago
Toshio Kuratomi 1e5708514b Fix ziploader for the cornercase of ansible invoking ansible.
* Make ziploader's ansible and ansible.module_utils libraries into
  namespace packages.
* Move __version__ and __author__ from ansible/__init__ to
  ansible/release.py.  This is because namespace packages only load one
  __init__.py.  If that is not the __init__.py with the author and
  version info then those won't be available.
* In ziploader, move the version ito ANSIBLE_CONSTANTS.
* Change PluginLoader to properly construct the path to the plugins even
  when namespace packages are present.
10 years ago
Toshio Kuratomi 07e0fceb61 Some beginning python3 porting for urls.py 10 years ago
Toshio Kuratomi caa8fffa01 Fix traceback in fetch_urls when status code is in info as well as the error. 10 years ago
Brian Coca 0652fa0ce6 ran dos2unix and renamed tags cannonical option 10 years ago
Rob bc859eec7e Add shared functionality to return list of security group IDs from list of names (#15054)
* Add shared functionality to return list of security group IDs from list of security group names - this functionality can be used by nearly all ec2 modules

* Improved doc string for get_ec2_security_group_ids_from_names function
10 years ago
Chris Houseknecht 2790929e73 Fix bugs from API version 1.20 testing. (#15586) 10 years ago
Nathaniel Case 250b975704 Clarify exception handling in net modules (#15507)
* Clarify exception handling in EOS

Also modify to EOS to standardize modules. It makes vimdiff a lot less angry

* Move IOS exception handling into Cli

* Move IOS-XR exception handling into Cli

* Move JUNOS exception handling into Cli

* Move NXOS exception handling into Cli

And reorganize to make it match the other modules

* Move OpenSwitch exception handling into Cli

More speculative restructuring here
10 years ago
Jonathan Davila 1999e71658 Added basic auth argument spec to utils (#15585) 10 years ago
Olivier GROSJEANNE 4647e8b74e HTTPError can also function as a non-exceptional file-like return value (#14915)
* HTTPError can also function as a non-exceptional file-like return value (the same thing that urlopen() returns)

* HTTPError - adding response to info dictionnary

* HTTPError - adding response to info dictionnary

* HTTPError - adding body response to info dictionnary
10 years ago
Robin Roth f7c589b049 get ssh_keys without using distribution info (#15301)
* use list of possible directories directly instead of checking distribution info
* this could fail if someone has keys in one of the other directories, but there could also be custom ssh key directories, which
  are not checked at all
* this is work towards separating Facts from Distribution in facts.py
10 years ago
Peter Sprygada 2f411c9aa9 fix default REST ports for http and https in openswitch (#15580)
properly uses the right default ports for http (80) and https (443)
10 years ago
Adam Hamsik 2424d57868 Add sas_address and sas_device_handle to ansible disk device facts (#15201) 10 years ago
Toshio Kuratomi 87d2345cf5 Merge pull request #15562 from abadger/ziploader-minor
Quite a few individually minor changes to ziploader
10 years ago
Peter Sprygada c87300f9e7 adds check on config_format kwarg in junos
This adds a check to validate the arugment for config_format kwarg in
get_config.  If the specified format is not a valid option, the shared
module will call fail_json
10 years ago
Peter Sprygada 61baf41edc Merge pull request #5 from dgarros/pyez
Add options to get_config to accept format (text, set or xml)
10 years ago
Peter Sprygada 2c90472609 Merge pull request #15410 from privateip/junos
adds support for netconf to junos shared module
10 years ago
Toshio Kuratomi 44e21f7062 Allow AnsibleModules to be instantiated more than once in a module
Fix SELINUX monkeypatch in test_basic
10 years ago
chouseknecht dc9b784432
Update per PR comments. 10 years ago
chouseknecht 8dc04770b6 Fix syntax error 10 years ago
chouseknecht 48a2165310 Adding docker_common util module. 10 years ago
Toshio Kuratomi d7189a442e ziploader currently needs absolute imports to know whether to include another module 10 years ago
Yannig Perre 72f17f3ff3 New get_all_subclasses function in basic modules and use it in fact modules. 10 years ago
Yannig Perre eb18767f91 Visit all network class not just direct sub classes.
Fix for https://github.com/ansible/ansible/issues/15446
10 years ago
Peter Sprygada 32329b493d adds support for netconf to junos shared module
Netconf support is provided using the junos-eznc library and the shared
module depends on junos-eznc to be installed on the local Ansible host.  This
commit also adds changes to the netcfg library to handle receiving messages
over netconf.

To use netconf, specify transport=netconf for junos module.  Be sure that
netconf has been enabled on the remote device.
10 years ago
chouseknecht a79e9182e1
Set the name of the user_agent in each mangement client. 10 years ago
Kei Nohguchi 9d5b4fe212 openswitch.py: Use new ops.dc declarative Config(DC) module (#15489)
Instead of using the old OpenSwitch runconfig, we'll use
Mir's new ops.dc declarative config for the DC interaction
with OpenSwitch.  This gives us the clearer separation between
ansible and the OpenSwitch, as well as the performance
improvement done inside the ops.dc module itself.

Squashed the original Mir's change into single commit.

Tested-by: Kei Nohguchi <kei@nohguchi.com>
10 years ago
Toshio Kuratomi ee18af48ef Merge pull request #15385 from bjne/mysql_unix_socket
mysql_*: enable mysql connection via unix socket
10 years ago
Toshio Kuratomi 7b5d2d3bec Make sure that args are interpreted as utf8 on python3 10 years ago
nitzmahone 5b336832af add _load_params debug overrides for module args/file passed on cmdline
Updated python module wrapper explode method to drop 'args' file next to module.
Both execute() and excommunicate() debug methods now pass the module args via file to enable debuggers that are picky about stdin.
Updated unit tests to use a context manager for masking/restoring default streams and argv.
10 years ago
James Cammarata ed35e8bce2 Don't override the http status code when successful in urls.py 10 years ago