cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
320
Views
0
Helpful
2
Replies

How to renumber an existing node id and all of it's associated objets?

YanL
Level 1
Level 1

Hello we know how to renumber an existing node id by removing the node from controller and re-register it with the new number but we are struggling with associated objects, specially static ports. Usually I save the objects I need to change in json, modify the json, delete the old objects and Post the new json in GUI. First challenge: saving multiple static ports from the GUI doesn't seem possible so I used moquery -c fvRsPathAtt -o json -f 'fv.RsPathAtt.dn*"1595"' but that creates a json file with attributes that are not accepted by Post in GUI, even if I delete all those unwanted lines using Notepad++ Find & Replace when I post a json payload with multiple static ports it always only creates the first one in the list omitting the other ones. Post in GUI or Postman have the same results. 

{
  "totalCount": "2",
  "imdata": [
    {
      "fvRsPathAtt": {

}
},
{
"fvRsPathAtt": {

}
}
]
}

 once this is figured out we will also need to change the port selectors associated with the old node id.

2 Replies 2

YanL
Level 1
Level 1

We found a mitigation by adding parent EPG information manually and children structure but that means we would have to do this for every EPG found... very tedious. 

{
"imdata": [
{
"fvAEPg": {
"attributes": {
"dn": "uni/tn-Tenant1/ap-AppProfile1/epg-EPG1",
"name": "EPG1"
},
"children": [
{
"fvRsPathAtt": {
"attributes": {
"tDn": "topology/pod-1/paths-101/pathep-[eth1/1]",
"encap": "vlan-100"
}
}
},
{
"fvRsPathAtt": {
"attributes": {
"tDn": "topology/pod-1/paths-102/pathep-[eth1/2]",
"encap": "vlan-101"
}
}
}
]
}
}
]
}

YanL
Level 1
Level 1

Here's better approach to gather the static ports per EPG as json to allow editing the json and post in GUI but it doesn't allow to post to multiple EPGs, I need to find a way to include parent information.

APIC#bash

username@apic1:~>icurl -s -k https://localhost/api/node/class/fvAEPg.json?\rsp-subtree=children\&rsp-subtree-class=fvRsPathAtt\&rsp-subtree-include=required\&rsp-prop-include=config-only\&order-by=fvAEPg.dn\&rsp-subtree-filter='wcard(fvRsPathAtt.dn,"1595")'

change 1595 with the node id you are looking for.

 

@RedNectar can you assit with building the proper icurl to gather the info I need ? I need json format file that I can edit and change node ID and post it back to uni/ and configure multiple tenants/app/EPG static ports. tks

Review Cisco Networking for a $25 gift card

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