02-10-2022 10:11 PM
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 ?
Solved! Go to Solution.
02-11-2022 12:10 PM
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.
02-10-2022 10:22 PM
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
02-11-2022 02:14 AM - edited 02-11-2022 02:18 AM
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
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.
Step 5 is to right-click on a tenant in the list of All Tenants and choose Post
Step 6 Make sure you enter uni/ as the Parent DN, select your edited file and Post.
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.
02-11-2022 06:18 AM
@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 .
02-11-2022 12:10 PM
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.
02-12-2022 06:17 AM
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 ?
02-12-2022 12:11 PM
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!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide