Have some pesky __ui objects? Want to delete them?

Introduction

Customers who use the CLI or Basic GUI and then use the advance GUI will have a ton of these __ui objects causing havoc for troubleshooting. There is a simple easy script to run to delete them

 

Solution

from an APIC, change directory to

/mit/uni/infra

then run this script

 

>for i in `find *__ui*`
> do 
> echo "removing $i" 
> modelete $i
> done
>moconfig commit

Then they will disappear!!

 

admin@rtp-f1-p1-apic1:infra> find *__ui*
attentp-__ui_l121_eth1--95
attentp-__ui_l121_eth1--95/mo
attentp-__ui_l121_eth1--95/dompcont
attentp-__ui_l121_eth1--95/dompcont/assocdomp-[uni--l3dom-dpita-2600]
attentp-__ui_l121_eth1--95/dompcont/assocdomp-[uni--l3dom-dpita-2600]/summary
attentp-__ui_l121_eth1--95/dompcont/summary
attentp-__ui_l121_eth1--95/summary
attentp-__ui_l121_eth1--95/nscont
attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]].link
attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]]
attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]]/source-[uni--l3dom-dpita-2600]
attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]]/source-[uni--l3dom-dpita-2600]/summary
attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]]/summary
attentp-__ui_l121_eth1--95/nscont/summary
attentp-__ui_l121_eth1--95/rtattEntP-[uni--infra--funcprof--accportgrp-__ui_l121_eth1--95]
attentp-__ui_l121_eth1--95/rsdomP-[uni--l3dom-dpita-2600].link
attentp-__ui_l121_eth1--95/rsdomP-[uni--l3dom-dpita-2600]
attentp-__ui_l121_eth1--95/rsdomP-[uni--l3dom-dpita-2600]/mo
attentp-__ui_l121_eth1--95/rsdomP-[uni--l3dom-dpita-2600]/summary
hpaths-__ui_l111_eth1--1
hpaths-__ui_l111_eth1--1/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--1]].link
hpaths-__ui_l111_eth1--1/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--1]]
hpaths-__ui_l111_eth1--1/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--1]]/mo
hpaths-__ui_l111_eth1--1/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--1]]/summary
hpaths-__ui_l111_eth1--1/mo
hpaths-__ui_l111_eth1--1/summary
hpaths-__ui_l111_eth1--13
hpaths-__ui_l111_eth1--13/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--13]].link
hpaths-__ui_l111_eth1--13/mo
hpaths-__ui_l111_eth1--13/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--13]]
hpaths-__ui_l111_eth1--13/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--13]]/mo
hpaths-__ui_l111_eth1--13/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--13]]/summary
hpaths-__ui_l111_eth1--13/summary
hpaths-__ui_l121_eth1--95
hpaths-__ui_l121_eth1--95/rsHPathAtt-[topology--pod-2--paths-121--pathep-[eth1--95]]
hpaths-__ui_l121_eth1--95/rsHPathAtt-[topology--pod-2--paths-121--pathep-[eth1--95]]/mo
hpaths-__ui_l121_eth1--95/rsHPathAtt-[topology--pod-2--paths-121--pathep-[eth1--95]]/summary
hpaths-__ui_l121_eth1--95/mo
hpaths-__ui_l121_eth1--95/summary
hpaths-__ui_l121_eth1--95/rspathToAccBaseGrp.link
hpaths-__ui_l121_eth1--95/rspathToAccBaseGrp
hpaths-__ui_l121_eth1--95/rspathToAccBaseGrp/mo
hpaths-__ui_l121_eth1--95/rspathToAccBaseGrp/summary
hpaths-__ui_l121_eth1--95/rsHPathAtt-[topology--pod-2--paths-121--pathep-[eth1--95]].link
admin@rtp-f1-p1-apic1:infra> 
admin@rtp-f1-p1-apic1:infra> 
admin@rtp-f1-p1-apic1:infra> 
admin@rtp-f1-p1-apic1:infra> 
admin@rtp-f1-p1-apic1:infra> 
admin@rtp-f1-p1-apic1:infra> find *__ui* | wc -l
44
admin@rtp-f1-p1-apic1:infra> for i in `find *__ui*`
> do 
> echo "removing $i" 
> modelete $i
> done

moremoving attentp-__ui_l121_eth1--95
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
removing attentp-__ui_l121_eth1--95/mo
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string mo under class infra.AttEntityP
Error executing command, check logs for details
removing attentp-__ui_l121_eth1--95/dompcont
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Mo 'attentp-__ui_l121_eth1--95/dompcont' cannot be deleted
removing attentp-__ui_l121_eth1--95/dompcont/assocdomp-[uni--l3dom-dpita-2600]
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Mo 'attentp-__ui_l121_eth1--95/dompcont/assocdomp-[uni--l3dom-dpita-2600]' cannot be deleted
removing attentp-__ui_l121_eth1--95/dompcont/assocdomp-[uni--l3dom-dpita-2600]/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.AssocDomP
Error executing command, check logs for details
removing attentp-__ui_l121_eth1--95/dompcont/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.ContDomP
Error executing command, check logs for details
removing attentp-__ui_l121_eth1--95/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.AttEntityP
Error executing command, check logs for details
removing attentp-__ui_l121_eth1--95/nscont
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Mo 'attentp-__ui_l121_eth1--95/nscont' cannot be deleted
removing attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]].link
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Mo 'attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]].link' cannot be deleted
removing attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]]
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Mo 'attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]]' cannot be deleted
removing attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]]/source-[uni--l3dom-dpita-2600]
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Mo 'attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]]/source-[uni--l3dom-dpita-2600]' cannot be deleted
removing attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]]/source-[uni--l3dom-dpita-2600]/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class fabric.CreatedBy
Error executing command, check logs for details
removing attentp-__ui_l121_eth1--95/nscont/rstoEncapInstDef-[allocencap-[uni--infra]--encapnsdef-[uni--infra--vlanns-[dpita-vlan-pool]-dynamic]]/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.RsToEncapInstDef
Error executing command, check logs for details
removing attentp-__ui_l121_eth1--95/nscont/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.ContNS
Error executing command, check logs for details
removing attentp-__ui_l121_eth1--95/rtattEntP-[uni--infra--funcprof--accportgrp-__ui_l121_eth1--95]
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Mo 'attentp-__ui_l121_eth1--95/rtattEntP-[uni--infra--funcprof--accportgrp-__ui_l121_eth1--95]' cannot be deleted
removing attentp-__ui_l121_eth1--95/rsdomP-[uni--l3dom-dpita-2600].link
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
removing attentp-__ui_l121_eth1--95/rsdomP-[uni--l3dom-dpita-2600]
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
removing attentp-__ui_l121_eth1--95/rsdomP-[uni--l3dom-dpita-2600]/mo
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string mo under class infra.RsDomP
Error executing command, check logs for details
removing attentp-__ui_l121_eth1--95/rsdomP-[uni--l3dom-dpita-2600]/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.RsDomP
Error executing command, check logs for details
removing hpaths-__ui_l111_eth1--1
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
removing hpaths-__ui_l111_eth1--1/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--1]].link
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
[Errno 2] No such file or directory: 'hpaths-__ui_l111_eth1--1/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--1]].link/mo'
removing hpaths-__ui_l111_eth1--1/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--1]]
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
removing hpaths-__ui_l111_eth1--1/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--1]]/mo
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string mo under class infra.RsHPathAtt
Error executing command, check logs for details
removing hpaths-__ui_l111_eth1--1/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--1]]/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.RsHPathAtt
Error executing command, check logs for details
removing hpaths-__ui_l111_eth1--1/mo
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string mo under class infra.HPathS
Error executing command, check logs for details
removing hpaths-__ui_l111_eth1--1/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.HPathS
Error executing command, check logs for details
removing hpaths-__ui_l111_eth1--13
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
removing hpaths-__ui_l111_eth1--13/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--13]].link
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
[Errno 2] No such file or directory: 'hpaths-__ui_l111_eth1--13/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--13]].link/mo'
removing hpaths-__ui_l111_eth1--13/mo
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string mo under class infra.HPathS
Error executing command, check logs for details
removing hpaths-__ui_l111_eth1--13/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--13]]
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
removing hpaths-__ui_l111_eth1--13/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--13]]/mo
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string mo under class infra.RsHPathAtt
Error executing command, check logs for details
removing hpaths-__ui_l111_eth1--13/rsHPathAtt-[topology--pod-1--paths-111--pathep-[eth1--13]]/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.RsHPathAtt
Error executing command, check logs for details
removing hpaths-__ui_l111_eth1--13/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.HPathS
Error executing command, check logs for details
removing hpaths-__ui_l121_eth1--95
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
removing hpaths-__ui_l121_eth1--95/rsHPathAtt-[topology--pod-2--paths-121--pathep-[eth1--95]]
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
removing hpaths-__ui_l121_eth1--95/rsHPathAtt-[topology--pod-2--paths-121--pathep-[eth1--95]]/mo
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string mo under class infra.RsHPathAtt
Error executing command, check logs for details
removing hpaths-__ui_l121_eth1--95/rsHPathAtt-[topology--pod-2--paths-121--pathep-[eth1--95]]/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.RsHPathAtt
Error executing command, check logs for details
removing hpaths-__ui_l121_eth1--95/mo
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string mo under class infra.HPathS
Error executing command, check logs for details
removing hpaths-__ui_l121_eth1--95/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.HPathS
Error executing command, check logs for details
removing hpaths-__ui_l121_eth1--95/rspathToAccBaseGrp.link
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string rspathToAccBaseGrp.link under class infra.HPathS
Error executing command, check logs for details
removing hpaths-__ui_l121_eth1--95/rspathToAccBaseGrp
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
removing hpaths-__ui_l121_eth1--95/rspathToAccBaseGrp/mo
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string mo under class infra.RsPathToAccBaseGrp
Error executing command, check logs for details
removing hpaths-__ui_l121_eth1--95/rspathToAccBaseGrp/summary
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Invalid rn string summary under class infra.RsPathToAccBaseGrp
Error executing command, check logs for details
removing hpaths-__ui_l121_eth1--95/rsHPathAtt-[topology--pod-2--paths-121--pathep-[eth1--95]].link
This command is being deprecated on APIC controller, please use NXOS-style equivalent command
[Errno 2] No such file or directory: 'hpaths-__ui_l121_eth1--95/rsHPathAtt-[topology--pod-2--paths-121--pathep-[eth1--95]].link/mo'


admin@rtp-f1-p1-apic1:infra> moconfig commit


This command is being deprecated on APIC controller, please use NXOS-style equivalent command
Committing mo 'uni/l3dom-dpita-2600'
Committing mo 'uni/infra/hpaths-__ui_l121_eth1--95'
Committing mo 'uni/infra/hpaths-__ui_l121_eth1--95/rspathToAccBaseGrp'
Committing mo 'uni/infra/hpaths-__ui_l121_eth1--95/rsHPathAtt-[topology/pod-2/paths-121/pathep-[eth1/95]]'
Committing mo 'uni/infra/hpaths-__ui_l111_eth1--13'
Committing mo 'uni/infra/hpaths-__ui_l111_eth1--13/rsHPathAtt-[topology/pod-1/paths-111/pathep-[eth1/13]]'
Committing mo 'uni/infra/hpaths-__ui_l111_eth1--1'
Committing mo 'uni/infra/hpaths-__ui_l111_eth1--1/rsHPathAtt-[topology/pod-1/paths-111/pathep-[eth1/1]]'
Committing mo 'uni/infra/attentp-__ui_l121_eth1--95'
Committing mo 'uni/infra/attentp-__ui_l121_eth1--95/rsdomP-[uni/l3dom-dpita-2600]'

All mos committed successfully.
admin@rtp-f1-p1-apic1:infra> find *__ui*
find: `*__ui*': No such file or directory
admin@rtp-f1-p1-apic1:infra> pwd
/mit/uni/infra
admin@rtp-f1-p1-apic1:infra> 

 

Advertisements

3 thoughts on “Have some pesky __ui objects? Want to delete them?

  1. hello Daniel,
    thanks for this post
    we were in this situation since we started at the very beginning with the APIC GUI basic mode, and so, we got all these __ui* objects that were useless once we started to use the APIC GUI advanced mode

    I followed your commands :
    at the beginning, I had :
    admin@CL_APIC1:~> cd /mit/uni/infra
    admin@CL_APIC1:infra> find *__ui* | wc -l
    371

    after running, the script, I entered the “moconfig commit” command you mentionned in red in your output log (but not he moconfig delete you mentionned at the very beginning of your post)
    and it ended OK with the message “All mos committed successfully.”
    then a new check shows :
    admin@CL_APIC1:infra> find *__ui* | wc -l
    find: `*__ui*’: No such file or directory
    0

    Nevertheless, I still have some __ui* entries remaining under Leaf Policies Groups : it seems to be the only place where I can see some

    Any idea ?
    the command to pass is well “”moconfig commit” and not “moconfig delete” ?

    thanks

    Like

    1. Hello!

      Thanks for reading! Not really sure where a leaf policy group would be and not get deleted if not in that directory.

      by chance, have you used the NXOS CLI as well?

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s