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

need help on enable and disable of menu actions in plugin.xml

$
0
0

Hi,

 

i wanted to enable right click actions depending on condition for folder and datastore objects depeding on datastore type BLOCK or VVOL

 

coming to point i am able to enable configuration action on datastore object depending on DStype, following code works fine.

enable configuration only on DS type BLOCK. i am tring the same for DataStoreFolder but not working , please help

working code for datastore

<objectType>Datastore</objectType>

      <propertyConditions>

         <com.vmware.data.query.CompositeConstraint>

            <nestedConstraints>           

             <com.vmware.data.query.PropertyConstraint>

              <propertyName>vsm:isManaged</propertyName>

              <comparator>EQUALS</comparator>

              <comparableValue><Boolean>true</Boolean></comparableValue>

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

              <com.vmware.data.query.PropertyConstraint>

                <propertyName>vsm:datastoreType</propertyName>

                <comparator>EQUALS</comparator>

                <comparableValue><String>BLOCK</String></comparableValue>

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

            </nestedConstraints>

            <conjoiner>AND</conjoiner>

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

      </propertyConditions>

 

Problem code , tried the same in Folder Object , but it disable actions for both block and vvol datastore folder .

these actions appears on right click of datastore Folder.

tried using childType - matches/contains etc no luck.

please assist

 

<objectType>Folder</objectType>

    <propertyConditions>

        <com.vmware.data.query.CompositeConstraint>

          <nestedConstraints>

            <com.vmware.data.query.PropertyConstraint>

              <propertyName>vsm:isManaged</propertyName>

              <comparator>EQUALS</comparator>

              <comparableValue><Boolean>true</Boolean></comparableValue>

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

          

            <com.vmware.data.query.PropertyConstraint>

              <propertyName>isRootFolder</propertyName>

              <comparator>EQUALS</comparator>

              <comparableValue><Boolean>false</Boolean></comparableValue>

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

                    

            <com.vmware.data.query.PropertyConstraint>

              <propertyName>datastoreType</propertyName>

              <comparator>EQUALS</comparator>

              <comparableValue><String>BLOCK</String></comparableValue>

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

           

            <com.vmware.data.query.PropertyConstraint>

              <propertyName>childType</propertyName>

              <comparator>CONTAINS</comparator>

              <comparableValue><String>Datastore</String></comparableValue>

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

          </nestedConstraints>

         <conjoiner>AND</conjoiner>

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

        </propertyConditions>


Viewing all articles
Browse latest Browse all 2218

Trending Articles



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