Active IQ Unified Manager Discussions

WFA - Using Conditional Command

RoiBeci

Hi All,

 

I'm trying to implement a conditional command using an attribute which is not part of the original dictionary of "Aggregate(cm_storage)".

 

In details:

I want that a variable (lets call it 'aggr1') will have more attributes - for example: "VSMtoLP" , and then I will use it as an advanced condition on one of my other commands in the workflow 
(for example: If the following Expression is TRUE:   aggr1.VSMtoLP == 1)

 

I'm searching the aggr1 variable using some certified filters and some customized filters.

 

Thanks in advance,

 

Roi ecinda.

1 ACCEPTED SOLUTION

paragp

That is possible too. In the resource selection dialog once you select your filter, go to the advance tab and change the sorting for your attribute 'vsmtolp' to either ASCENDING or DESCENDING

View solution in original post

4 REPLIES 4

paragp

If the extra attribute that you wish to add can be returned from a sql query then there is an easy way to do this. 

 

For example this is the Aggregate Filter query that returns the extra attribute 'vsmtolp' 

 

SELECT
    aggr.name,
    node.name AS 'node.name',
    cluster.primary_address AS 'node.cluster.primary_address' ,
    aggr.available_size_mb,
    1 AS 'vsmtolp'
FROM
    cm_storage.aggregate AS aggr
JOIN
    cm_storage.node AS node
        ON aggr.node_id=node.id
JOIN
    cm_storage.cluster AS cluster
        ON node.cluster_id =cluster.id
WHERE
    aggr.block_type = '${block_type}'

 

You can now create a Finder using this filter and add the attribute 'vsmtolp' as a return attribute for the finder. After you have done this it should be possible for you to use the expression "aggregate1.vsmtolp == 1" in the advanced tab of another command

RoiBeci

Thaks alot for your quick response!

 

is there a way doing it without a Finder? just using a filter?

 

 

paragp

That is possible too. In the resource selection dialog once you select your filter, go to the advance tab and change the sorting for your attribute 'vsmtolp' to either ASCENDING or DESCENDING

View solution in original post

RoiBeci

Works like a charm!

thank you 🙂

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public