This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Unused definition

Hi.
I'm quite sure someone already asked it, but I just can't find it.
Has anyone found a way to show all the unused Definitions in "Network Definitions"?
As years goes by, we collect a lot of definitions (I have 340).
For sure quit a few are not in use any more and can be deleted.

Thanks… 
[:$]


This thread was automatically locked due to age.
  • Has anyone found a way to show all the unused Definitions in "Network Definitions"?
    This ability was planned for 9.1 or 9.2, but it slipped and was never implemented, to this point.  Currently you have to click on the blue button to the right of each definition to see where they are used, one by one.  Maybe do 50/day, so will get through 350 in a week.
    __________________
    ACE v8/SCA v9.3

    ...still have a v5 install disk in a box somewhere.

    http://xkcd.com
    http://www.tedgoff.com/mb
    http://www.projectcartoon.com/cartoon/1
  • This might help:

    # for REF in `cc get_objects network | grep \'ref\' | cut -f 4 -d \'` ; do echo $REF ; cc get_affected_nodes $REF ; cc get_affected_objects $REF | grep -v \'$REF\'; done


    Note: Quick and dirty, barely tested and didn't check for corner cases or put very much effort into thinking about partial string matches.
  • Thanks [:)]

    Teched - could you please give more detail?
     I have to say I feel a bit insecure runing something like that on my production system.  

    Scot - Is there any plan  for this feature in the near future?
               IT seems quit basic -  and essential...
               Wondering why it has not being implemented so far...
  • It isn't tuning (the commands should change nothing in the config) and is closer to reporting/auditing.

    The backticked command lists network objects and whittles the list down to only the ref names. The for loop runs over the list of REFs checking for affected nodes and checking for affected objects, minus any lines (from the object listing) containing the object's own name.

    I'll touch on a potential consideration of feature prioritization:  most product administration (and inefficiency) costs are are borne by the customer, most product development costs are borne by the vendor.
  • Thank [:)]
    Can I add it to my "Astaro useful shell commands" in the Forum, so other users can benefit from this?
  • The feature request is still listed as planned, Definitions: Show Unused Objects, so it's hopeful, but I don't have any further information at this time.
    __________________
    ACE v8/SCA v9.3

    ...still have a v5 install disk in a box somewhere.

    http://xkcd.com
    http://www.tedgoff.com/mb
    http://www.projectcartoon.com/cartoon/1
  • Do as you like with the command.

    I perhaps should have been clearer that it doesn't show specifically which REFs aren't in use, but shows where each REF is in use.