Skip to content

Commit 2b67949

Browse files
Resolving sanity errors
1 parent 8176d1c commit 2b67949

File tree

8 files changed

+10
-14
lines changed

8 files changed

+10
-14
lines changed

plugins/action/dtc/manage_child_fabric_vrfs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ def run(self, tmp=None, task_vars=None):
9090

9191
child_fabrics = msite_data['child_fabrics_data']
9292

93-
9493
network_os = task_vars['ansible_network_os']
9594
rest_module = get_rest_module(network_os)
9695
if not rest_module:

plugins/action/dtc/rest.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#!/usr/bin/python
2-
# -*- coding: utf-8 -*-
3-
41
# Copyright (c) 2024 Cisco Systems, Inc. and its affiliates
52
#
63
# Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -57,11 +54,11 @@ def run(self, tmp=None, task_vars=None):
5754

5855
# Get task arguments
5956
module_args = self._task.args.copy()
60-
57+
6158
# Get the network OS from task variables or module arguments
6259
network_os = task_vars.get('ansible_network_os')
6360
display.vvvv(f"Using OS module: {network_os}")
64-
61+
6562
# Determine which module to use based on network_os
6663
rest_module = get_rest_module(network_os)
6764
if not rest_module:
@@ -79,7 +76,7 @@ def run(self, tmp=None, task_vars=None):
7976
# Set the connection to httpapi
8077
if 'connection' not in task_vars:
8178
task_vars['connection'] = 'httpapi'
82-
79+
8380
# Execute the appropriate REST module
8481
result = self._execute_module(
8582
module_name=rest_module,
@@ -88,7 +85,7 @@ def run(self, tmp=None, task_vars=None):
8885
tmp=tmp,
8986
wrap_async=False
9087
)
91-
88+
9289
# Update results with the module's results
9390
if result.get('failed'):
9491
results.update(result)
@@ -97,7 +94,7 @@ def run(self, tmp=None, task_vars=None):
9794
results['changed'] = result.get('changed', False)
9895
results.update(result)
9996
display.vvvv(f"Module execution successful: {result}")
100-
97+
10198
except Exception as e:
10299
import traceback
103100
error_trace = traceback.format_exc()

roles/dtc/create/tasks/common/devices_discovery.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,3 @@
100100
path: "/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/policies/{{ policy_ids }}/bulk"
101101
json_data: "{{ results.policy_update.values() | list | to_json }}"
102102
when: results.policy_update | length > 0
103-
104-

roles/dtc/create/tasks/external/devices_discovery.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,4 @@
5757
method: PUT
5858
path: "/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/policies/{{ policy_ids }}/bulk"
5959
json_data: "{{ results.policy_update.values() | list | to_json }}"
60-
when: results.policy_update | length > 0
61-
62-
60+
when: results.policy_update | length > 0

tests/sanity/ignore-2.14.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ plugins/action/dtc/unmanaged_edge_connections.py action-plugin-docs # action plu
3636
plugins/action/dtc/get_poap_data.py action-plugin-docs # action plugin has no matching module to provide documentation
3737
plugins/action/dtc/map_msd_inventory.py action-plugin-docs # action plugin has no matching module to provide documentation
3838
plugins/action/dtc/existing_links_check.py action-plugin-docs # action plugin has no matching module to provide documentation
39+
plugins/action/dtc/rest.py action-plugin-docs # action plugin has no matching module to provide documentation
3940
plugins/action/dtd/prepare_service_model.py action-plugin-docs # action plugin has no matching module to provide documentation
4041
plugins/action/test/inventory.py action-plugin-docs # action plugin has no matching module to provide documentation
4142
plugins/action/common/nac_dc_validate.py import-3.10!skip

tests/sanity/ignore-2.15.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ plugins/action/dtc/unmanaged_edge_connections.py action-plugin-docs # action plu
3636
plugins/action/dtc/get_poap_data.py action-plugin-docs # action plugin has no matching module to provide documentation
3737
plugins/action/dtc/map_msd_inventory.py action-plugin-docs # action plugin has no matching module to provide documentation
3838
plugins/action/dtc/existing_links_check.py action-plugin-docs # action plugin has no matching module to provide documentation
39+
plugins/action/dtc/rest.py action-plugin-docs # action plugin has no matching module to provide documentation
3940
plugins/action/dtd/prepare_service_model.py action-plugin-docs # action plugin has no matching module to provide documentation
4041
plugins/action/test/inventory.py action-plugin-docs # action plugin has no matching module to provide documentation
4142
plugins/action/common/nac_dc_validate.py import-3.10!skip

tests/sanity/ignore-2.16.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ plugins/action/dtc/unmanaged_edge_connections.py action-plugin-docs # action plu
3636
plugins/action/dtc/get_poap_data.py action-plugin-docs # action plugin has no matching module to provide documentation
3737
plugins/action/dtc/map_msd_inventory.py action-plugin-docs # action plugin has no matching module to provide documentation
3838
plugins/action/dtc/existing_links_check.py action-plugin-docs # action plugin has no matching module to provide documentation
39+
plugins/action/dtc/rest.py action-plugin-docs # action plugin has no matching module to provide documentation
3940
plugins/action/dtd/prepare_service_model.py action-plugin-docs # action plugin has no matching module to provide documentation
4041
plugins/action/test/inventory.py action-plugin-docs # action plugin has no matching module to provide documentation
4142
plugins/action/common/nac_dc_validate.py import-3.10!skip

tests/sanity/ignore-2.17.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ plugins/action/dtc/unmanaged_edge_connections.py action-plugin-docs # action plu
3636
plugins/action/dtc/get_poap_data.py action-plugin-docs # action plugin has no matching module to provide documentation
3737
plugins/action/dtc/map_msd_inventory.py action-plugin-docs # action plugin has no matching module to provide documentation
3838
plugins/action/dtc/existing_links_check.py action-plugin-docs # action plugin has no matching module to provide documentation
39+
plugins/action/dtc/rest.py action-plugin-docs # action plugin has no matching module to provide documentation
3940
plugins/action/dtd/prepare_service_model.py action-plugin-docs # action plugin has no matching module to provide documentation
4041
plugins/action/test/inventory.py action-plugin-docs # action plugin has no matching module to provide documentation
4142
plugins/action/common/nac_dc_validate.py import-3.10!skip

0 commit comments

Comments
 (0)