cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
252
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
VIP

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-<y