-
Notifications
You must be signed in to change notification settings - Fork 1
New Module - WCA Brownfield playbook generator #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| from ansible_collections.cisco.dnac.plugins.module_utils.dnac import ( | ||
| DnacBase, | ||
| validate_list_of_dicts, | ||
| ) | ||
| import time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The validate_list_of_dicts from dnac is outdated. Please make sure to import it from ansible_collections.cisco.dnac.plugins.module_utils.validation and test the workflow one again for all the cases.
| #!/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) | ||
| import datetime | ||
| import os | ||
| try: | ||
| import yaml | ||
| HAS_YAML = True | ||
| except ImportError: | ||
| HAS_YAML = False | ||
| yaml = None | ||
| from collections import OrderedDict | ||
|
|
||
| if HAS_YAML: | ||
| class OrderedDumper(yaml.Dumper): | ||
| def represent_dict(self, data): | ||
| return self.represent_mapping("tag:yaml.org,2002:map", data.items()) | ||
|
|
||
| OrderedDumper.add_representer(OrderedDict, OrderedDumper.represent_dict) | ||
| else: | ||
| OrderedDumper = None | ||
| __metaclass__ = type | ||
| from abc import ABCMeta | ||
|
|
||
|
|
||
| class BrownFieldHelper(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rukapse , please run Black formatter on the code to maintain consistency across the repository.
To enable this, install the Black formatter extension and add the following to your user settings JSON:
"[python]": {
//....Some existing settings
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
},
Type of Change
Description
New module that Generates YAML configurations compatible with the 'wired_campus_automation_workflow_manager'
module, reducing the effort required to manually create Ansible playbooks and
enabling programmatic modifications.
on network devices within the Cisco Catalyst Center.
MLD Snooping, Authentication, Logical Ports, and Port Configuration settings.
Testing Done:
Test cases covered: [Mention test case IDs or brief points]
Checklist
Ansible Best Practices
ansible-vaultor environment variables)Documentation
Screenshots (if applicable)
Notes to Reviewers