Skip to content

Instantly share code, notes, and snippets.

View allenrobel's full-sized avatar

Allen Robel allenrobel

View GitHub Profile
@allenrobel
allenrobel / gist:1e043247279543543dbfa54d3ecc2510
Created March 4, 2025 20:32
NDFC Ticket Endpoint Examples (Change Control) Postman Collection (v2.1)
{
"info": {
"_postman_id": "dd333858-cce0-4a40-890a-0bea23923673",
"name": "Ticket Endpoint Examples",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "7476253",
"_collection_link": "https://cisco-dcn-marketing-ndfc.postman.co/workspace/e50eba86-0fd2-481f-8f98-21129f80f426/collection/7476253-dd333858-cce0-4a40-890a-0bea23923673?action=share&source=collection_link&creator=7476253"
},
"item": [
{
```json
{
"status": "success",
"data": {
"name": "",
"version": 11,
"features": {
"eventmgr-data": {
"name": "Syslog Trap On Data",
"description": "Event Management on Data Network",
```json
{
"status": "success",
"data": {
"name": "",
"version": 28,
"features": {
"change-mgmt": {
"name": "Change Control",
"description": "Tracking, Approval, and Rollback of all Configuration Changes",
Below is:
1. The 500 error payload with the controller response.
2. A 200 response with payload for comparison.
I believe this could be due to the way the extensionValues are constructured.
----------------------------
Payload with 500 response
----------------------------
@allenrobel
allenrobel / gist:c49cdc55d50c22e82b0843a3054ddf7d
Created August 7, 2024 04:25
KeyError when querying a network that does not exist.
arobel@AROBEL-M-G793 ndfc-roles-prod % ansible-playbook demo_query_network.yml -i inventory -vvv
ansible-playbook [core 2.16.6]
config file = /Users/arobel/repos/ndfc-roles-prod/ansible.cfg
configured module search path = ['/Users/arobel/repos/ansible_dev/dcnm_fabric/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/arobel/repos/ansible_dev/dcnm_fabric/ansible_collections/cisco/dcnm/.venv/lib/python3.12/site-packages/ansible
ansible collection location = /Users/arobel/repos/ansible_dev/dcnm_fabric
executable location = /Users/arobel/repos/ansible_dev/dcnm_fabric/ansible_collections/cisco/dcnm/.venv/bin/ansible-playbook
python version = 3.12.0 (v3.12.0:0fb18b02c8, Oct 2 2023, 09:45:56) [Clang 13.0.0 (clang-1300.0.29.30)] (/Users/arobel/repos/ansible_dev/dcnm_fabric/ansible_collections/cisco/dcnm/.venv/bin/python)
jinja version = 3.1.4
libyaml = True
@allenrobel
allenrobel / dcnm_fabric.png
Last active June 25, 2024 16:31
dcnm_fabric.py code flow
dcnm_fabric.png
@allenrobel
allenrobel / gist:c74483f61dee6337b209288ae257ed37
Last active June 3, 2024 22:18
dcnm_maintenance_mode merged state output
(.venv) AROBEL-M-G793% ansible-playbook dcnm_maintenance_mode_merged_leaf_maintenance_spine_normal.yaml -i inventory
PLAY [ndfc] *********************************************************************************************************************************************************************************************************************************************************
TASK [Configure switch mode] ****************************************************************************************************************************************************************************************************************************************
changed: [ndfc1]
TASK [debug] ********************************************************************************************************************************************************************************************************************************************************
ok: [ndfc1] => {
"result": {
@allenrobel
allenrobel / gist:2ff505dd0a1f7823687d2930f053ff06
Last active June 3, 2024 22:15
dcnm_maintenance_mode_query_state_output
(.venv) AROBEL-M-G793% ansible-playbook dcnm_maintenance_mode_query.yaml -i inventory
PLAY [ndfc] *********************************************************************************************************************************************************************************************************************************************************
TASK [Query switch mode] ********************************************************************************************************************************************************************************************************************************************
ok: [ndfc1]
TASK [debug] ********************************************************************************************************************************************************************************************************************************************************
ok: [ndfc1] => {
"result": {
@allenrobel
allenrobel / gist:c8b7762524d39a4f2c5638cc093fa30a
Last active May 2, 2022 21:32
Debug Output: dcnm_vrf - Omission of Loopback Routing Tag during VRF creation causes later issue when editing VRF in NDFC
(py310) foobar % ansible-playbook -vvv example_ndfc_vrf_replaced.yml --ask-vault-pass -i inventory
ansible-playbook [core 2.12.4]
config file = /Users/foobar/tmp_ndfc/ndfc-roles/ansible.cfg
configured module search path = ['/Users/foobar/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/foobar/py310/lib/python3.10/site-packages/ansible
ansible collection location = /Users/foobar/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/foobar/py310/bin/ansible-playbook
python version = 3.10.3 (v3.10.3:a342a49189, Mar 16 2022, 09:34:18) [Clang 13.0.0 (clang-1300.0.29.30)]
jinja version = 3.0.3
libyaml = True