VMware {code} Community
jawalevijay05
Contributor
Contributor

EQUALS Condition In Plugin.Xml Extension is Not Working.

Hi,

I am trying to apply an EQUALS condition in the plugin.xml file for the sample plugin generated by the plugin seed. I have also implemented the PropertyProviderAdapter interface in a class which returns the dummy value about the 'isHostConnected' property as 'false', but this condition is not working due to which the plugin 'actions' for the 'HostSystem' are not getting disabled. However, the user privilege filtering is working fine.

I am using the vCenter 6.7U2 version.

The plugin.xml :

   <extension id="com.test.testplugin.actionSet">

      <extendedPoint>vise.actions.sets</extendedPoint>

      <object>

         <actions>

            <com.vmware.actionsfw.ActionSpec>

               <uid>com.test.testplugin.sampleAction1</uid>

               <label>#{sampleAction1.name}</label>

               <icon>#{addIcon}</icon>

               <delegate>

                  <className>com.vmware.vsphere.client.HtmlPluginModalAction</className>

                  <object><root>

                     <!-- execute action1 on client-side, i.e. opens a modal dialog -->

                     <actionUrl>/ui/testplugin/index.html?view=action1-modal</actionUrl>

                     <dialogTitle>#{sampleAction1.name}</dialogTitle>

                     <dialogSize>584,260</dialogSize>

                  </root></object>

               </delegate>

            </com.vmware.actionsfw.ActionSpec>

            <com.vmware.actionsfw.ActionSpec>

               <uid>com.test.testplugin.sampleAction2</uid>

               <label>#{sampleAction2.name}</label>

               <icon>#{editIcon}</icon>

               <delegate>

                  <className>com.vmware.vsphere.client.HtmlPluginModalAction</className>

                  <object><root>

                     <!-- execute action2 on client-side, i.e. opens a modal wizard -->

                     <actionUrl>/ui/testplugin/index.html?view=action2-wizard</actionUrl>

                     <dialogTitle>#{sampleAction2.name}</dialogTitle>

                     <dialogSize>861,421</dialogSize>

                  </root></object>

               </delegate>

            </com.vmware.actionsfw.ActionSpec>

            <com.vmware.actionsfw.ActionSpec>

               <uid>com.test.testplugin.sampleAction3</uid>

               <label>#{sampleAction3.name}</label>

               <delegate>

                  <className>com.vmware.vsphere.client.HtmlPluginHeadlessAction</className>

                  <object><root>

                     <!-- action3 is headless, actionUid param must be added to the /actions endpoint  -->

                     <actionUrl>/ui/testplugin/rest/actions?actionUid=com.test.testplugin.sampleAction3</actionUrl>

                  </root></object>

               </delegate>

            </com.vmware.actionsfw.ActionSpec>

         </actions>

      </object>

      <metadata>

            <objectType>HostSystem</objectType>

          <propertyConditions>

                <com.vmware.data.query.CompositeConstraint>

                    <nestedConstraints>

                        <com.vmware.data.query.PropertyConstraint>

                            <propertyName>isHostConnected</propertyName>

                            <comparator>EQUALS</comparator>

                            <comparableValue>

                                <Boolean>true</Boolean>

                            </comparableValue>

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

                    </nestedConstraints>

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

            </propertyConditions>

        </metadata>

   </extension>

Any help on this will be appreciated.

Thanks.

0 Kudos
0 Replies