1 Reply Latest reply on Mar 15, 2019 2:57 AM by Putuque

    addDatastores Method

    Putuque Lurker

      Hi

       

      Would need a little advice after upgraded SRM 6.5.1 to 8.1.1

      as I want to use powercli to automatically add the new datastores to storage replicated protectiongroups I face one issue with it.

       

      I can't find the new protectiongroup object (VMware.VimAutomation.Srm.Views.SrmProtectionGroup) method  introduced in 8.1 API - "addDatastores"


      I wonder if I have to also upgrade the API somehow as under srmapi connection the api version shows 7.0 or does it come somehow from the BenMeadowcroft module what I'm using?

       

      PS > $srmapi.Content

       

      ApiVersion       : 7.0

      SrmApi           : SrmApi-SrmRecoveryApi1

      Protection       : SrmProtection-SrmProtection

      Recovery         : SrmRecovery-SrmRecovery

      InventoryMapping : SrmInventoryMapping-SrmInventoryMapping

      About            : VMware.Vim.AboutInfo

      Storage          : SrmStorage-SrmStorage

       

      PS> $protectiongroup | gm

       

         TypeName: VMware.VimAutomation.Srm.Views.SrmProtectionGroup

       

      Name                                  MemberType Definition

      ----                                  ---------- ----------

      AssociateVms                          Method     void AssociateVms(VMware.Vim.ManagedObjectReference[] vms)

      CheckConfigured                       Method     bool CheckConfigured()

      Equals                                Method     bool Equals(System.Object obj)

      GetHashCode                           Method     int GetHashCode()

      GetInfo                               Method     VMware.VimAutomation.Srm.Views.SrmProtectionGroupInfo GetInfo()

      GetParentFolder                       Method     VMware.VimAutomation.Srm.Views.SrmProtectionGroupFolder GetParentFolder()

      GetPeer                               Method     VMware.VimAutomation.Srm.Views.SrmProtectionGroupPeer GetPeer()

      GetProtectionState                    Method     VMware.VimAutomation.Srm.Views.SrmProtectionGroupProtectionState GetProtectionState()

      GetType                               Method     type GetType()

      ListAssociatedVms                     Method     System.Collections.Generic.List[VMware.Vim.VirtualMachine] ListAssociatedVms()

      ListProtectedDatastores               Method     System.Collections.Generic.List[VMware.Vim.Datastore] ListProtectedDatastores()

      ListProtectedVms                      Method     System.Collections.Generic.List[VMware.VimAutomation.Srm.Views.SrmProtectionGroupProtectedVm] ListProtectedVms()

      ListRecoveryPlans                     Method     System.Collections.Generic.List[VMware.VimAutomation.Srm.Views.SrmRecoveryPlan] ListRecoveryPlans()

      ProtectionGroupGetOperationalLocation Method     string ProtectionGroupGetOperationalLocation()

      ProtectVms                            Method     VMware.VimAutomation.Srm.Views.SrmProtectionTask ProtectVms(VMware.VimAutomation.Srm.Views.SrmProtectionGroupVmProtectionSpec[] vms)

      QueryVmProtection                     Method     System.Collections.Generic.List[VMware.VimAutomation.Srm.Views.SrmProtectionGroupVmProtectionInfo] QueryVmProtection(VMware.Vim.ManagedObjectReference[] vms)

      ToString                              Method     string ToString()

      UnassociateVms                        Method     void UnassociateVms(VMware.Vim.ManagedObjectReference[] vms)

      UnprotectVms                          Method     VMware.VimAutomation.Srm.Views.SrmProtectionTask UnprotectVms(VMware.Vim.ManagedObjectReference[] vms)

      MoRef                                 Property   VMware.Vim.ManagedObjectReference MoRef {get;set;}