[racktables-users] Re: [QUE] IP4 for new objects

  • From: Denis Ovsienko <infrastation@xxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Mon, 03 May 2010 17:51:24 +0400

> I followed the instructions on
> "//www.freelists.org/post/racktables-users/How-do-I-hack-IP-address-into-objects,4";
>  in order to enable IP4 for certain manually added objects.
> This worked fine for at least two objects I've created, but adding a
> third one doesn't work at all.
>
> The current entry in "List source: IPv4-enabled objects" field is:
> "{$typeid_4} or {$typeid_7} or {$typeid_8} or {$typeid_12} or
> {$typeid_445} or {$typeid_447} or {$typeid_798} or {$typeid_14} or
> {$typeid_50010} or {$typeid_50037} or {$typeid_50039} or
> {$typeid_50018}". ID 50018 doesn't change anything in the object, though
> I see the same ID as Value on an object property page, HW Type.
> I'm a bit confused that there's no effect at all.
>
> Does anybody have an explanation for this or does anybody see an obvious
> typo?

These config options don't detect typos indeed. I would suggest "packing" that 
expression into a RackCode predicate (that's done in Permissions editor):

define [runs IPv4] {$typeid_4} or {$typeid_7} or {$typeid_8} or {$typeid_12} or
{$typeid_445} or {$typeid_447} or {$typeid_798} or {$typeid_14} or
{$typeid_445} or {$typeid_447} or {$typeid_798} or {$typeid_14} or
{$typeid_50010} or {$typeid_50037} or {$typeid_50039} or
{$typeid_50018}

Once it saves Ok, you will know, that syntax is correct. After that you will be 
able to:
1. use [runs IPv4] as the value of "IPv4 list source"
2. see the exact list of objects, which are picked by this predicate (set 
"Suggest predicates in list filter" option to "yes" and look at objects filter 
panel)

--
    Denis Ovsienko

Other related posts: