mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
Fix imports and installing dependencies in CI, part 1 (#41)
* Fix ovirt collection name (ovirt.ovirt_collection, not ovirt.ovirt). * Fix kubernetes module_utils references. * Fix broken f5 imports on community.general side. The imports in that collection are still broken and will still cause failures. * Fix Cisco ACI and MSO modules imports. * Fix check_point.mgmt dependency, fix imports. * Fix fortimanager imports. * Fix cisco intersight imports. * Fix ovirt module docs fragments. * Fix usage of _ in unit tests to avoid sanity failures. * Fix Cisco module docs fragments. * Fix netapp.ontap module docs fragment name. * Fix documentation. * Fix some boilerplate (the ones not mentioned in ignore.txt).
This commit is contained in:
parent
927d91f35f
commit
25394eeafb
95 changed files with 349 additions and 343 deletions
|
@ -15,6 +15,8 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible_collections.ansible.posix.tests.unit.compat import unittest
|
||||
from ansible_collections.community.general.plugins.modules import interfaces_file
|
||||
from shutil import copyfile, move
|
||||
|
@ -156,7 +158,7 @@ class TestInterfacesFileModule(unittest.TestCase):
|
|||
fail_json_iterations = []
|
||||
for i, options in enumerate(options_list):
|
||||
try:
|
||||
_, lines = interfaces_file.setInterfaceOption(module, lines, options['iface'], options['option'], options['value'], options['state'])
|
||||
dummy, lines = interfaces_file.setInterfaceOption(module, lines, options['iface'], options['option'], options['value'], options['state'])
|
||||
except AnsibleFailJson as e:
|
||||
fail_json_iterations.append("[%d] fail_json message: %s\noptions:\n%s" %
|
||||
(i, str(e), json.dumps(options, sort_keys=True, indent=4, separators=(',', ': '))))
|
||||
|
@ -188,8 +190,8 @@ class TestInterfacesFileModule(unittest.TestCase):
|
|||
fail_json_iterations = []
|
||||
options['state'] = state
|
||||
try:
|
||||
_, lines = interfaces_file.setInterfaceOption(module, lines,
|
||||
options['iface'], options['option'], options['value'], options['state'])
|
||||
dummy, lines = interfaces_file.setInterfaceOption(module, lines,
|
||||
options['iface'], options['option'], options['value'], options['state'])
|
||||
except AnsibleFailJson as e:
|
||||
fail_json_iterations.append("fail_json message: %s\noptions:\n%s" %
|
||||
(str(e), json.dumps(options, sort_keys=True, indent=4, separators=(',', ': '))))
|
||||
|
@ -312,8 +314,8 @@ class TestInterfacesFileModule(unittest.TestCase):
|
|||
options = options_list[0]
|
||||
fail_json_iterations = []
|
||||
try:
|
||||
_, lines = interfaces_file.setInterfaceOption(module, lines, options['iface'], options['option'],
|
||||
options['value'], options['state'], options['address_family'])
|
||||
dummy, lines = interfaces_file.setInterfaceOption(module, lines, options['iface'], options['option'],
|
||||
options['value'], options['state'], options['address_family'])
|
||||
except AnsibleFailJson as e:
|
||||
fail_json_iterations.append("fail_json message: %s\noptions:\n%s" %
|
||||
(str(e), json.dumps(options, sort_keys=True, indent=4, separators=(',', ': '))))
|
||||
|
|
|
@ -42,18 +42,22 @@ cd "${TEST_DIR}"
|
|||
ansible-galaxy -vvv collection install ansible.posix
|
||||
ansible-galaxy -vvv collection install community.crypto
|
||||
ansible-galaxy -vvv collection install ansible.netcommon
|
||||
ansible-galaxy -vvv collection install ovirt.ovirt_collection
|
||||
|
||||
# unit tests
|
||||
ansible-galaxy -vvv collection install community.kubernetes
|
||||
ansible-galaxy -vvv collection install netbox.netbox
|
||||
ansible-galaxy -vvv collection install netapp.ontap
|
||||
ansible-galaxy -vvv collection install cisco.mso
|
||||
ansible-galaxy -vvv collection install cisco.meraki
|
||||
ansible-galaxy -vvv collection install cisco.intersight
|
||||
ansible-galaxy -vvv collection install fortinet.fortios
|
||||
ansible-galaxy -vvv collection install junipernetworks.junos
|
||||
ansible-galaxy -vvv collection install cisco.aci
|
||||
ansible-galaxy -vvv collection install google.cloud
|
||||
ansible-galaxy -vvv collection install community.kubernetes
|
||||
ansible-galaxy -vvv collection install f5networks.f5_modules
|
||||
ansible-galaxy -vvv collection install check_point.mgmt
|
||||
|
||||
# Needed until https://github.com/ansible/ansible/issues/68415 is fixed:
|
||||
chmod -R a+rX "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue