Skip to content

Commit

Permalink
Merge pull request #23 from cisco-en-programmability/develop
Browse files Browse the repository at this point in the history
Develop to update to v3.2.0
  • Loading branch information
wastorga authored Oct 22, 2021
2 parents 367d0ae + 18a4917 commit 48b8bd7
Show file tree
Hide file tree
Showing 599 changed files with 6,433 additions and 1,263 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/sanity_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ jobs:
strategy:
matrix:
ansible:
- stable-2.9
- stable-2.10
- stable-2.11
- stable-2.12
- devel
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand Down
698 changes: 677 additions & 21 deletions LICENSE

Large diffs are not rendered by default.

23 changes: 21 additions & 2 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ releases:
changes:
release_summary: Fixes a bug related to optional module parameters.
bugfixes:
- Improve the documentation.
- Fixes a bug that caused the task execution to fail if the optional parameters like port, dnac version and SSL verification were missing from the hosts.yml file.
1.0.3:
release_date: '2021-03-29'
Expand Down Expand Up @@ -79,14 +80,22 @@ releases:
release_date: '2021-04-12'
changes:
release_summary: This release introduces no changes. Exists just to be in sync with the Ansible Galaxy release number.
minor_changes:
- sync with Ansible Galaxy release number
2.0.6:
release_date: '2021-04-13'
changes:
release_summary: Adds dnacentersdk to the requirements.txt file. Adds sanitiy checks for Ansible v2.9.
bugfixes:
- Adds dnacentersdk to requirements.
minor_changes:
- Adds sanity ignores for ansible-2.9.
2.0.7:
release_date: '2021-04-14'
changes:
release_summary: Changes the minimum supported version of Ansible to v2.9.
minor_changes:
- Changes the minimum supported version from Ansible v.2.10.5 to v2.9.10.
3.0.0:
release_date: '2021-08-05'
changes:
Expand All @@ -102,11 +111,13 @@ releases:
release_summary: Updates to support DNA version 2.2.2.3
major_changes:
- Adds new plugins related to DNA version 2.2.2.3.
- Updates previouse plugins to follow DNA version 2.2.2.3 specification.
- Updates previous plugins to follow DNA version 2.2.2.3 specification.
3.1.1:
release_date: '2021-09-03'
changes:
release_summary: Adds headers parameter to info modules.
minor_changes:
- Adds ``headers`` parameter to info modules.
3.1.2:
release_date: '2021-09-08'
changes:
Expand Down Expand Up @@ -147,4 +158,12 @@ releases:
bugfixes:
- Fixes *delete modules that were calling update operation
- Fixes *update modules that were calling delete operation
- Fixes *update modules that were calling create operation
- Fixes *update modules that were calling create operation
3.2.0:
release_date: '2021-10-22'
changes:
release_summary: Improves documentation and fixes check_mode behavior.
bugfixes:
- Improves the changelog.
- Improves the documentation of modules.
- Fixes check_mode behavior for non-info modules.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import datetime
import os
import sys
sys.path.insert(0, os.path.abspath('../plugins/module_utils/'))
sys.path.insert(0, os.path.abspath('../plugins/plugin_utils/'))
# sys.path.insert(0, os.path.abspath('.'))

# -- Project information -----------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: cisco
name: dnac
version: 3.1.7
version: 3.2.0
readme: README.md
authors:
- Rafael Campos <[email protected]>
Expand All @@ -17,7 +17,7 @@ tags:
- networking
- sdn
dependencies:
ansible.utils: ">=2.0.0"
ansible.utils: ">=2.0.0,<3.0"
repository: https://github.com/cisco-en-programmability/dnacenter-ansible
documentation: https://developer.cisco.com/docs/dna-center/#!ansible
homepage: https://github.com/cisco-en-programmability/dnacenter-ansible
Expand Down
18 changes: 15 additions & 3 deletions plugins/action/application_sets.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2021, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.action import ActionBase
Expand All @@ -10,13 +16,13 @@
else:
ANSIBLE_UTILS_IS_INSTALLED = True
from ansible.errors import AnsibleActionFail
from ansible_collections.cisco.dnac.plugins.module_utils.dnac import (
from ansible_collections.cisco.dnac.plugins.plugin_utils.dnac import (
DNACSDK,
dnac_argument_spec,
dnac_compare_equality,
get_dict_result,
)
from ansible_collections.cisco.dnac.plugins.module_utils.exceptions import (
from ansible_collections.cisco.dnac.plugins.plugin_utils.exceptions import (
InconsistentParameters,
)

Expand Down Expand Up @@ -153,7 +159,8 @@ def __init__(self, *args, **kwargs):
if not ANSIBLE_UTILS_IS_INSTALLED:
raise AnsibleActionFail("ansible.utils is not installed. Execute 'ansible-galaxy collection install ansible.utils'")
super(ActionModule, self).__init__(*args, **kwargs)
self._supports_async = True
self._supports_async = False
self._supports_check_mode = False
self._result = None

# Checks the supplied parameters against the argument spec for this module
Expand All @@ -180,6 +187,11 @@ def run(self, tmp=None, task_vars=None):
self._result["changed"] = False
self._check_argspec()

if self._play_context.check_mode:
# in --check mode, always skip this module execution
self._result["skipped"] = True
return self._result

dnac = DNACSDK(self._task.args)
obj = ApplicationSets(self._task.args, dnac)

Expand Down
16 changes: 14 additions & 2 deletions plugins/action/application_sets_count_info.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2021, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.action import ActionBase
Expand All @@ -10,7 +16,7 @@
else:
ANSIBLE_UTILS_IS_INSTALLED = True
from ansible.errors import AnsibleActionFail
from ansible_collections.cisco.dnac.plugins.module_utils.dnac import (
from ansible_collections.cisco.dnac.plugins.plugin_utils.dnac import (
DNACSDK,
dnac_argument_spec,
)
Expand All @@ -33,7 +39,8 @@ def __init__(self, *args, **kwargs):
if not ANSIBLE_UTILS_IS_INSTALLED:
raise AnsibleActionFail("ansible.utils is not installed. Execute 'ansible-galaxy collection install ansible.utils'")
super(ActionModule, self).__init__(*args, **kwargs)
self._supports_async = True
self._supports_async = False
self._supports_check_mode = True
self._result = None

# Checks the supplied parameters against the argument spec for this module
Expand Down Expand Up @@ -66,6 +73,11 @@ def run(self, tmp=None, task_vars=None):
self._result["changed"] = False
self._check_argspec()

if self._play_context.check_mode:
self._result["changed"] = True
self._result.update(dict(dnac_response={}))
return self._result

dnac = DNACSDK(params=self._task.args)

response = dnac.exec(
Expand Down
16 changes: 14 additions & 2 deletions plugins/action/application_sets_info.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2021, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.action import ActionBase
Expand All @@ -10,7 +16,7 @@
else:
ANSIBLE_UTILS_IS_INSTALLED = True
from ansible.errors import AnsibleActionFail
from ansible_collections.cisco.dnac.plugins.module_utils.dnac import (
from ansible_collections.cisco.dnac.plugins.plugin_utils.dnac import (
DNACSDK,
dnac_argument_spec,
)
Expand All @@ -36,7 +42,8 @@ def __init__(self, *args, **kwargs):
if not ANSIBLE_UTILS_IS_INSTALLED:
raise AnsibleActionFail("ansible.utils is not installed. Execute 'ansible-galaxy collection install ansible.utils'")
super(ActionModule, self).__init__(*args, **kwargs)
self._supports_async = True
self._supports_async = False
self._supports_check_mode = True
self._result = None

# Checks the supplied parameters against the argument spec for this module
Expand Down Expand Up @@ -72,6 +79,11 @@ def run(self, tmp=None, task_vars=None):
self._result["changed"] = False
self._check_argspec()

if self._play_context.check_mode:
self._result["changed"] = True
self._result.update(dict(dnac_response={}))
return self._result

dnac = DNACSDK(params=self._task.args)

response = dnac.exec(
Expand Down
18 changes: 15 additions & 3 deletions plugins/action/applications.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2021, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.action import ActionBase
Expand All @@ -10,13 +16,13 @@
else:
ANSIBLE_UTILS_IS_INSTALLED = True
from ansible.errors import AnsibleActionFail
from ansible_collections.cisco.dnac.plugins.module_utils.dnac import (
from ansible_collections.cisco.dnac.plugins.plugin_utils.dnac import (
DNACSDK,
dnac_argument_spec,
dnac_compare_equality,
get_dict_result,
)
from ansible_collections.cisco.dnac.plugins.module_utils.exceptions import (
from ansible_collections.cisco.dnac.plugins.plugin_utils.exceptions import (
InconsistentParameters,
)

Expand Down Expand Up @@ -177,7 +183,8 @@ def __init__(self, *args, **kwargs):
if not ANSIBLE_UTILS_IS_INSTALLED:
raise AnsibleActionFail("ansible.utils is not installed. Execute 'ansible-galaxy collection install ansible.utils'")
super(ActionModule, self).__init__(*args, **kwargs)
self._supports_async = True
self._supports_async = False
self._supports_check_mode = False
self._result = None

# Checks the supplied parameters against the argument spec for this module
Expand All @@ -204,6 +211,11 @@ def run(self, tmp=None, task_vars=None):
self._result["changed"] = False
self._check_argspec()

if self._play_context.check_mode:
# in --check mode, always skip this module execution
self._result["skipped"] = True
return self._result

dnac = DNACSDK(self._task.args)
obj = Applications(self._task.args, dnac)

Expand Down
16 changes: 14 additions & 2 deletions plugins/action/applications_count_info.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2021, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.action import ActionBase
Expand All @@ -10,7 +16,7 @@
else:
ANSIBLE_UTILS_IS_INSTALLED = True
from ansible.errors import AnsibleActionFail
from ansible_collections.cisco.dnac.plugins.module_utils.dnac import (
from ansible_collections.cisco.dnac.plugins.plugin_utils.dnac import (
DNACSDK,
dnac_argument_spec,
)
Expand All @@ -33,7 +39,8 @@ def __init__(self, *args, **kwargs):
if not ANSIBLE_UTILS_IS_INSTALLED:
raise AnsibleActionFail("ansible.utils is not installed. Execute 'ansible-galaxy collection install ansible.utils'")
super(ActionModule, self).__init__(*args, **kwargs)
self._supports_async = True
self._supports_async = False
self._supports_check_mode = True
self._result = None

# Checks the supplied parameters against the argument spec for this module
Expand Down Expand Up @@ -66,6 +73,11 @@ def run(self, tmp=None, task_vars=None):
self._result["changed"] = False
self._check_argspec()

if self._play_context.check_mode:
self._result["changed"] = True
self._result.update(dict(dnac_response={}))
return self._result

dnac = DNACSDK(params=self._task.args)

response = dnac.exec(
Expand Down
16 changes: 14 additions & 2 deletions plugins/action/applications_health_info.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2021, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.action import ActionBase
Expand All @@ -10,7 +16,7 @@
else:
ANSIBLE_UTILS_IS_INSTALLED = True
from ansible.errors import AnsibleActionFail
from ansible_collections.cisco.dnac.plugins.module_utils.dnac import (
from ansible_collections.cisco.dnac.plugins.plugin_utils.dnac import (
DNACSDK,
dnac_argument_spec,
)
Expand Down Expand Up @@ -41,7 +47,8 @@ def __init__(self, *args, **kwargs):
if not ANSIBLE_UTILS_IS_INSTALLED:
raise AnsibleActionFail("ansible.utils is not installed. Execute 'ansible-galaxy collection install ansible.utils'")
super(ActionModule, self).__init__(*args, **kwargs)
self._supports_async = True
self._supports_async = False
self._supports_check_mode = True
self._result = None

# Checks the supplied parameters against the argument spec for this module
Expand Down Expand Up @@ -82,6 +89,11 @@ def run(self, tmp=None, task_vars=None):
self._result["changed"] = False
self._check_argspec()

if self._play_context.check_mode:
self._result["changed"] = True
self._result.update(dict(dnac_response={}))
return self._result

dnac = DNACSDK(params=self._task.args)

response = dnac.exec(
Expand Down
Loading

0 comments on commit 48b8bd7

Please sign in to comment.