Return to NDFC and close the fabric overview:
After closing the fabric view, you should be back at the main NDFC Fabrics dashboard:
Staging
FabricReturn to your VSCode window.
This step is to create a quick Ansible playbook to wipe and remove the staging fabric. This step is performed so that your NDFC instance starts with a clean slate and no fabrics. The idea in this section is to demonstrate how you can use an existing framework, Ansible in this case, in different ways and in preparation for the next section that is fully declarative in intent.
Staging
FabricFrom the root ansible project directory execute the following command.
Upon a successful run of the playbook your output should look as follows:
PLAY [Reset NDFC Fabric(s)] ********************************************************************************************************************************************************************************************* TASK [Set NDFC Reset Control Variable] ********************************************************************************************************************************************************************************** ok: [10.15.0.23] TASK [Get Current NDFC Fabric(s)] *************************************************************************************************************************************************************************************** ok: [10.15.0.23] TASK [Display Current NDFC Fabrics] ************************************************************************************************************************************************************************************* ok: [10.15.0.23] => (item=fabric-stage) => { "msg": "fabric-stage" } TASK [Display Count of Current NDFC Fabrics] **************************************************************************************************************************************************************************** ok: [10.15.0.23] => { "msg": "Number of NDFC Fabrics - 1" } TASK [Update NDFC Reset Control Variable if Fabric(s) Exist] ************************************************************************************************************************************************************ ok: [10.15.0.23] TASK [Remove Switches from Fabrics in NDFC] ******************************************************************************************************************************************************** changed: [10.15.0.23] => (item=fabric-stage) TASK [Delete Current Fabrics from NDFC] ********************************************************************************************************************************************************************************* changed: [10.15.0.23] TASK [Get Current NDFC Fabric(s)] *************************************************************************************************************************************************************************************** ok: [10.15.0.23] TASK [Display Count of Current NDFC Fabrics] **************************************************************************************************************************************************************************** ok: [10.15.0.23] => { "msg": "Number of NDFC Fabrics - 0" } PLAY RECAP ************************************************************************************************************************************************************************************************************** 10.15.0.23 : ok=9 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Examine the output above. The number of NDFC Fabrics should indicate the following:
(Beginning of script) - Number of NDFC Fabrics - 1
(End of script) - Number of NDFC Fabrics - 0
This is accurate because the staging
fabric was deleted so that you can rebuild it from scratch using VXLAN as Code.
Return to NDFC in your browser where you should still be sitting at the Fabrics dashboard. After the playbook has run, verify the staging fabric is removed.
If your stage-fabric is still showing, please try clicking the refresh button in the top-right of the Fabrics pane.
There should be no fabrics listed. Now that you have reset your NDFC instance, let's start building your fabric from the ground up using VXLAN as Code.