Quantcast
Channel: VMware Communities : Discussion List - vSphere Client SDK
Viewing all articles
Browse latest Browse all 2218

Actions filtered by ESX version

$
0
0

Hello,

 

I'm trying to apply menu actions only to hosts that have ESX 5.0 or 5.1

I've tried to filter them using the propertyCondition tag but didn't worked so far. I've spent some time looking over the HostSystem object documentation in vSphere 5.1 and found that the HostSystem.config.product.version should have the ESX version. Any ideas on what is wrong?

 

<propertyCondition>
    <com.vmware.data.query.CompositeConstraint>
        <nestedConstraints>
            <com.vmware.data.query.PropertyConstraint>
                <propertyName>config.product.version</propertyName>
                <comparator>EQUALS</comparator>
                <comparableValue>
                    <String>5.0</String>
                </comparableValue>
            </com.vmware.data.query.PropertyConstraint>
            <com.vmware.data.query.PropertyConstraint>
                <propertyName>config.product.version</propertyName>
                <comparator>EQUALS</comparator>
                <comparableValue>
                    <String>5.1</String>
                </comparableValue>
            </com.vmware.data.query.PropertyConstraint>
        </nestedConstraints>
        <conjoiner>OR</conjoiner>
    </com.vmware.data.query.CompositeConstraint>
</propertyCondition>

 

Thanks


Viewing all articles
Browse latest Browse all 2218

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>