cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
456
Views
2
Helpful
1
Replies

Does APIC cli save automatically?

samantha
Level 1
Level 1

Hello,

We are using APIC 5.2(4e). We would like to add EPG static ports using cli. Does APIC cli save automatically?

Thanks, Samantha

 

 

 

1 Reply 1

RedNectar
VIP Alumni
VIP Alumni

Hi @samantha ,

Let me quote a passage from Charles Dickens' book David Copperfield.

Annual income twenty pounds, annual expenditure nineteen nineteen and six, result happiness.
Annual income twenty pounds, annual expenditure twenty pounds ought and six, result misery

And new I'll put it into context

Configure ACI using the GUI or APIs, result happiness.
Configure ACI using the CLI, result misery

The ACI CLI is a great tool for troubleshooting, but it takes shortcuts and at times needs to create HIDDEN OBJECTS that can be almost impossible to remove in the future, leading to the misery that I mentioned above.

I repeat

DO NOT USE THE CLI TO CONFIGURE ACI

Now, this is what you should do:

Configure the first static EPG port.  Once it is done, right click on it and choose Save as...

Make sure you choose Only ConfigurationSubtreejson (or xml if you prefer)

Open the file in a decent editor that will format the JSON (or xml) for you

It should looks something like

{
    "totalCount": "1",
    "imdata": [
        {
            "fvRsPathAtt": {
                "attributes": {
                    "annotation": "",
                    "descr": "",
                    "dn": "uni/tn-<your_tenant>/ap-<your_app_prof>/epg-<your_epg>/rspathAtt-[topology/pod-1/paths-<your_switch>/pathep-[eth1/<your_port>]]",
                    "encap": "vlan-<your_vlan>",
                    "instrImedcy": "immediate",
                    "mode": "<untagged or tagged>",
                    "primaryEncap": "unknown",
                    "tDn": "topology/pod-1/paths-<your_switch>/pathep-[eth1/<your_port>]",
                    "userdom": ""
                }
            }
        }
    ]
}

Now copy/paste/edit as many times as you like until you've got your static mappings. Save the file. 

Now, back where you save the file, right-click again and choose Post

Make sure you set the Parent DN: to uni/  and then select your file and post it.

Job done.

Also, you should upgrade to ACI v5.2(7f) - there is a HUGE change in the way ACI works for Access Policies - the system takes care of many things that used to be a bit of a nightmare (you'll have to navigate to Access Policies > Interface Configuration and accept the invitation to fix up your policies for you to begin)

Oh. I almost forgot:

Does APIC cli save automatically?

Yes it does. But please don't do that

 

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

Review Cisco Networking for a $25 gift card

Save 25% on Day-2 Operations Add-On License