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

How to set a condition on a portlet based on a custom property/relationship?

$
0
0

I'm trying to add a portlet to HostSystem that only appears if there is a relationship to one of my custom objects. However, I can't find a way to achieve this. I tried various syntaxes to add a relational constraint in "plugin.xml" but this failed to work, including one from an old post here.

 

I tried this on a modified "chassis-b" sample (where only the first host is assigned to a chassis, to make it easy to tell that the portlet only appears on hosts with chassis).

 

      <metadata>

        <propertyConditions>

          <com.vmware.data.query.CompositeConstraint>

            <nestedConstraints>

              <com.vmware.data.query.PropertyConstraint>

                <propertyName>chassis</propertyName>

                <comparator>EQUALS</comparator>

                <comparableValue>

                 <Boolean>false</Boolean>

                </comparableValue>

              </com.vmware.data.query.PropertyConstraint>

            </nestedConstraints>

            <conjoiner>AND</conjoiner>

          </com.vmware.data.query.CompositeConstraint>

        </propertyConditions>

      </metadata>

 

Any suggestions greatly appreciated!


Viewing all articles
Browse latest Browse all 2218

Trending Articles



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