Skip to content

Commit

Permalink
Merge pull request #148 from cisco-en-programmability/develop
Browse files Browse the repository at this point in the history
Develop v6.10.3
  • Loading branch information
fmunozmiranda authored Jan 30, 2024
2 parents aab284f + 16b70ca commit 41b8f0c
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 3 deletions.
6 changes: 6 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -778,3 +778,9 @@ releases:
- Set dnac log level if it is not set in the playbook.
- Handle provisioning of device if it is not in managed state for longer.
- Set the logging levels for device credentails intent module.
6.10.3:
release_date: "2024-01-30"
changes:
release_summary: Fixing swim_import_local action.
minor_changes:
- Building additional parameters needed in sdk.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: cisco
name: dnac
version: 6.10.2
version: 6.10.3
readme: README.md
authors:
- Rafael Campos <[email protected]>
Expand Down
22 changes: 22 additions & 0 deletions playbooks/swim_import_local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- hosts: dnac_servers
vars_files:
- credentials.yml
gather_facts: false
connection: local
tasks:
- name: Import Local
cisco.dnac.swim_import_local:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
#headers: "{{my_headers | from_json}}"
isThirdParty: False
thirdPartyVendor: "string"
thirdPartyImageFamily: "string"
thirdPartyApplicationType: "string"
filePath: "./tests/test-1592357065255.csv"
register: result
3 changes: 3 additions & 0 deletions playbooks/tests/test-1592357065255.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Device IP,Device Name,DeviceType,Target Image,Target Version,Image Type,Reboot,Check Type,Description,PreCheck Status,LastChecked
10.10.20.51,3504_WLC,Wireless Controller,AIR-CT3504-K9-8-10-121-0,8.10.121.0,WLC_SW,Yes,Service Entitlement Check,Service Entitlement Check: WARNING : Unable to validate license for Device. Not enough information to validate.,WARNING,2020-06-17 01:24:04,
10.10.20.51,3504_WLC,Wireless Controller,AIR-CT3504-K9-8-10-121-0,8.10.121.0,WLC_SW,Yes,Flash check,Upgrade Analysis feature is not supported for Cisco Interfaces and Modules/Content Networking/Third Party devices/Wireless Controllers excluding Cisco 5760 Series; : ,SUCCESS,2020-06-17 01:24:04,
10 changes: 8 additions & 2 deletions plugins/action/swim_import_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
DNACSDK,
dnac_argument_spec,
)
import os

# Get common arguements specification
argument_spec = dnac_argument_spec()
Expand All @@ -41,7 +42,8 @@
class ActionModule(ActionBase):
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'")
raise AnsibleActionFail(
"ansible.utils is not installed. Execute 'ansible-galaxy collection install ansible.utils'")
super(ActionModule, self).__init__(*args, **kwargs)
self._supports_async = False
self._supports_check_mode = False
Expand Down Expand Up @@ -70,8 +72,12 @@ def get_object(self, params):
is_third_party=params.get("isThirdParty"),
third_party_vendor=params.get("thirdPartyVendor"),
third_party_image_family=params.get("thirdPartyImageFamily"),
third_party_application_type=params.get("thirdPartyApplicationType"),
third_party_application_type=params.get(
"thirdPartyApplicationType"),
file_path=params.get("filePath"),
multipart_fields={'file': (os.path.basename(params.get(
"filePath")), open(params.get("filePath"), 'rb'))},
multipart_monitor_callback=None
)
return new_object

Expand Down

0 comments on commit 41b8f0c

Please sign in to comment.