Beispiel #1
0
        public List <StorageLinkRepository> FullSRRescan()
        {
            try
            {
                var repositories = new List <StorageLinkRepository>();

                storageRepositoryInfo[] srs;
                _service.enumStorageRepositories(string.Empty, string.Empty, (int)StorageLinkEnums.FlagsType.REFRESH_CACHE, out srs);

                foreach (storageRepositoryInfo sr in srs)
                {
                    if (sr.storageSystemInfo != null && sr.storagePoolInfo != null && !string.IsNullOrEmpty(sr.storageSystemInfo.objectId) && !string.IsNullOrEmpty(sr.storagePoolInfo.objectId))
                    {
                        repositories.Add(new StorageLinkRepository(this,
                                                                   sr.objectId,
                                                                   sr.friendlyName,
                                                                   Cache.Server,
                                                                   sr.storageSystemId,
                                                                   sr.storagePoolId,
                                                                   (StorageLinkEnums.RaidType)sr.raidType,
                                                                   (StorageLinkEnums.ProvisioningType)sr.provisioningType,
                                                                   (StorageLinkEnums.ProvisioningOptions)sr.useDeduplication,
                                                                   sr.hostGroupUuid));
                    }
                }

                return(repositories);
            }
            catch (SoapException e)
            {
                throw ConvertSoapException(e);
            }
        }