Class FcdTagOperations


  • @Sample(name="fcd-tagoperations",
            description="This sample attaches tag to FCD, lists tags attached to FCD, list FCDs attached to tag and detaches tags from FCD .")
    public class FcdTagOperations
    extends com.vmware.connection.ConnectedVimServiceBase
     FcdTagOperations
    
     This sample executes below tag related
     operations on a given VStorageObject from vslm:
    
     1. Attach a tag to a virtual storage object.
     2. List all tags attached to virtual storage object.
     3. List all virtual storage objects attached to the tag.
     4. Detach a tag from a virtual storage object.
    
     Pre-requisite :        1. Existing VStorageObject name
                            2. Existing tag name
                            3. Existing category name
     Parameters:
     url                    [required] : url of the web service
     username               [required] : username for the authentication
     password               [required] : password for the authentication
     vstorageobjectid       [required] : Uuid of the vstorageobject
     category               [required] : The category to which the tag belongs.
     tag                    [required] : The tag which has to be associated
                                         with the virtual storage object.
    
     Command Line:
     run.bat com.vmware.fcd.FcdTagOperations --url [webserviceurl]
     --username [username] --password [password]
     --vstorageobjectid [vstorageobjectid] --category [category] --tag [tag]
     
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.vmware.connection.ConnectedVimServiceBase

        com.vmware.connection.ConnectedVimServiceBase.ConnectionException
    • Field Summary

      • Fields inherited from class com.vmware.connection.ConnectedVimServiceBase

        PROP_ME_NAME, SVC_INST_NAME
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()  
      void setCategory​(java.lang.String category)  
      void setTag​(java.lang.String tag)  
      void setVStorageObjectId​(java.lang.String vStorageObjectId)  
      • Methods inherited from class com.vmware.connection.ConnectedVimServiceBase

        basicConnectionFromConnection, connect, disconnect, getServiceInstanceReference, setConnection, setHostConnection
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FcdTagOperations

        public FcdTagOperations()
    • Method Detail

      • setVStorageObjectId

        @Option(name="vStorageObjectId",
                required=true,
                description="The ID of the virtual storage object.")
        public void setVStorageObjectId​(java.lang.String vStorageObjectId)
        Parameters:
        vStorageObjectId - the vStorageObjectId to set
      • setCategory

        @Option(name="category",
                required=true,
                description="The category to which the tag belongs.")
        public void setCategory​(java.lang.String category)
        Parameters:
        category - the category to set
      • setTag

        @Option(name="tag",
                required=true,
                description="The tag to be queried.")
        public void setTag​(java.lang.String tag)
        Parameters:
        tag - the tag to set
      • run

        @Action
        public void run()
                 throws java.lang.Exception
        Throws:
        java.lang.Exception