Active IQ Unified Manager Discussions

How to select vfilers in specific IPspace in User Input

skellner
2,236 Views

Hi,

I'm trying to query all vfilers in a specific ipspace. The query always fails because vfiler.ipspace is not a valid field. According to the vfiler dictionary it is indeed. I tried it also to create a new filter with the vfiler.ipspace field, same error. Thanks in advance for any help on this.

Best regards

Stefan Kellner

Error message:

Failed to execute query for user input '$Vfiler_ip':

Unknown column 'storage.vfiler.ipspace' in 'where clause'

SQL:

SELECT

    vfiler.ip_address,

    vfiler.name

FROM

    storage.vfiler

JOIN

    storage.array

        on storage.vfiler.array_id = storage.array.id

JOIN

    storage.resource_group_member

        on storage.array.id = storage.resource_group_member.array_id

JOIN

    storage.resource_group

        on storage.resource_group_member.group_id = storage.resource_group.id

WHERE

    storage.resource_group.name = '${om_group}'

    and storage.vfiler.ipspace = 'esx'

ORDER BY

    vfiler.ip_address

1 REPLY 1

mgoddard
2,234 Views

Hi Stefan,

It is part of the object, but it's not gathered from the datasource so its not a cached attribute in the database.

You need to link it to the Interface object to get the ipspace. Something similar to this.

SELECT vfiler.ip_address,vfiler.name

FROM storage.interface,storage.vfiler

WHERE

interface.ip_space = "${ipspace}" AND

interface.vfiler_id = vfiler.id AND

vfiler.name != "vfiler0"

ORDER BY

vfiler.ip_address

Public