mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Add latest updates from FTD Ansible downstream repository. (#53638)
* Add latest updates from FTD Ansible downstream repository. - add a better implementation of the upsert operation; - add API version lookup functionality; - add filter which remove duplicated references from the list of references; - fix minor bugs. * fix issues outlined by ansibot * fix argument name for _check_enum_method
This commit is contained in:
committed by
Sumit Jaiswal
parent
71216cace5
commit
2176b53a55
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2018 Cisco and/or its affiliates.
|
||||
# Copyright (c) 2018-2019 Cisco and/or its affiliates.
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
@@ -105,10 +105,10 @@ class TestFtdConfiguration(object):
|
||||
|
||||
def test_module_should_run_successful(self, resource_mock):
|
||||
operation_name = 'test name'
|
||||
resource_mock.return_value = 'ok'
|
||||
resource_mock.return_value = {'result': 'ok'}
|
||||
|
||||
result = self._run_module({'operation': operation_name})
|
||||
assert result['response'] == 'ok'
|
||||
assert result['response'] == {'result': 'ok'}
|
||||
|
||||
def _run_module(self, module_args):
|
||||
set_module_args(module_args)
|
||||
|
||||
@@ -1,31 +1,13 @@
|
||||
# Copyright (c) 2018 Cisco and/or its affiliates.
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible.module_utils import basic
|
||||
from ansible.module_utils.network.ftd.common import HTTPMethod
|
||||
from ansible.module_utils.network.ftd.fdm_swagger_client import OperationField
|
||||
from ansible.modules.network.ftd import ftd_file_upload
|
||||
from units.modules.utils import set_module_args, exit_json, fail_json, AnsibleFailJson, AnsibleExitJson
|
||||
|
||||
from ansible.modules.network.ftd import ftd_file_upload
|
||||
from ansible.module_utils.network.ftd.fdm_swagger_client import OperationField
|
||||
from ansible.module_utils.network.ftd.common import HTTPMethod
|
||||
|
||||
|
||||
class TestFtdFileUpload(object):
|
||||
module = ftd_file_upload
|
||||
|
||||
Reference in New Issue
Block a user