cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1541
Views
15
Helpful
6
Replies

Can we rename any objects in ACI once it is created ?

Hi Team, 

 

Can we rename the objects in ACI once it is being created ! 

 

Example : I configured VRF with name SR-PRD , Can I rename this to VRF-PRD ? , If yes - How ?

 

VRF.PNG

1 Accepted Solution

Accepted Solutions

Hi @Network_Sarovani:

Can we test this in Sandbox lab ?

You sure can - I just did it to create the video below. Start here: https://devnetsandbox.cisco.com/RM/Topology

Can you please also guide me how to take the backup (snapshot) of the entire config before change .

Here. It's a bit long-winded - but I did a video showing how to snapshot, delete and restore a tenant on the Cisco Devnet Sandbox.  There is a bit if a trick to it because one your tenant is deleted, you can't see the snapshot you created for your tenant.  Taking a snapshot of the ENTIRE config is much the same, but I'd recommend only snapshotting that bit that you are changing.

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.

View solution in original post

6 Replies 6

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Hi @Network_Sarovani 

No, you cannot rename objects in ACI. However, you can use Alias option to make it appear a different name in GUI. But the DN will still have the original name.

 

Stay safe,

Sergiu

 

RedNectar
VIP
VIP

Hi @Network_Sarovani ,

The lack of ability to rename objects is something many people find frustrating.  But it is not until you understand how the relationships between objects works in ACI that you can appreciate WHY it is so hard.

So to take your example of SR_PRD that you want to rename to VRF-PRD (Oh - I hope you mean VRF_PRD. There are good reasons for NOT using dash "-" characters in names)

If I look at a possible example of a tenant in its textual definition (either in XML or JSON), I will find several instances of the name of the VRF within the tenant. And potentially, that VRF may turn up in other places if there are contracts shared between tenants (haven't checked that particular example, but as a general rule, this is true)

Here's a JSON (HEAVILY trimmed file down from about 900 lines) of a tenant on my lab:

{
  "totalCount": "1",
  "imdata": [{
      "fvTenant": {
        "dn": "uni/tn-My_Tenant",
        "name": "My_Tenant"
      },
      "children": [{
        "l3extOut": {
          "attributes": {
            "name": "PED.VRF_L3Out"
          },
          "children": [  {
            "l3extRsEctx": {
              "attributes": {
                "tnFvCtxName": "PRD_VRF"
              }
            }
          }]
        }
      }, {
        "fvCtx": {
          "attributes": {
            "name": "PRD_VRF",
            "vrfIndex": "0"
          }
        }
      }, {
        "fvBD": {
          "attributes": {
            "name": "App_BD",
          },
            "fvRsCtx": {
              "attributes": {
                "tnFvCtxName": "PRD_VRF"
              }
            }
          }]
        }
      }, {
        "fvBD": {
          "attributes": {
            "name": "Web_BD",
          },
            "fvRsCtx": {
              "attributes": {
                "tnFvCtxName": "PRD_VRF"
              }
            }
          }]
        }
      }]
    }
  }]
}

As you can see, the name PRD_VRF occurs 4 times in the file - once for the VRF name plus once for each BD and once for each L3Out.

So it's not JUST a simple matter to change the name. As I said, potentially there are other related object that also refer to this name.

Having said that, in the case of renaming a VRF, especially if it was recently created, is NOT too hard, but it will NOT be without impact, so make sure you do it in a maintenance window

Step 1 is to take a snapshot of the existing configuration in case this doesn't work.

Step 2 is is to save your Tenant configuration as a JSON or XML file. Make sure you choose Only Configuration and Subtree

image.png

Step 3 is to edit the file you just downloaded and replace all instances of SR_PRD with PRD_VRF (or whatever your new name is) and the save the file.

Step 4 is to delete your tenant. Yes. You read that correctly.

image.png

Step 5 is to right-click on a tenant in the list of All Tenants and choose Post

image.png

Step 6 Make sure you enter uni/ as the Parent DN, select your edited file and Post.

image.png

Step 7 Make sure nothing's broken

Step 8 Roll back to the snapshot you saved before you started if it is broken - then back to Step 2

I hope this helps.


Don't forget to mark answers as correct if it solves your problem. This helps others find the correct answer if they search for the same problem.


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.

@RedNectar Thanks a lot for the detailed information ..

Can we test this in Sandbox lab ?

 

Can you please also guide me how to take the backup (snapshot) of the entire config before change .

Hi @Network_Sarovani:

Can we test this in Sandbox lab ?

You sure can - I just did it to create the video below. Start here: https://devnetsandbox.cisco.com/RM/Topology

Can you please also guide me how to take the backup (snapshot) of the entire config before change .

Here. It's a bit long-winded - but I did a video showing how to snapshot, delete and restore a tenant on the Cisco Devnet Sandbox.  There is a bit if a trick to it because one your tenant is deleted, you can't see the snapshot you created for your tenant.  Taking a snapshot of the ENTIRE config is much the same, but I'd recommend only snapshotting that bit that you are changing.

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.

wow super ..Thanks you @RedNectar for the video and clear explanation ...

 

If I want to practice the lab ..which is good sandbox or github ?

 

and can we import the snapshots to our local desktop/laptop and re-import and use it on he sandbox each time we login ?

@Network_Sarovani 

wow super ..Thanks you @RedNectar for the video and clear explanation ...

No Problem

If I want to practice the lab ..which is good sandbox or github ?

The Devnet Sandbox is about as good as you can get

and can we import the snapshots to our local desktop/laptop and re-import and use it on he sandbox each time we login ?

That's exactly what I did in the video!

Maybe it's time this question was marked as answered if the original question about renaming objects has been covered!

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.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

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