Changeset 7545 for branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/ServiceManagementOperation.cs
- Timestamp:
- 03/05/12 13:38:48 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/ServiceManagementOperation.cs
r7429 r7545 108 108 else 109 109 return new List<HostedService>(); 110 } 111 112 public static List<StorageService> ListStorageServices(string subscriptionId, string thumbprint) { 113 string uri = string.Format(Constants.URIStorageServiceFormat, subscriptionId); 114 ServiceWebRequest operation = new ServiceWebRequest(thumbprint); 115 XDocument response = operation.Invoke(uri); 116 List<StorageService> result = null; 117 if (response.Root.HasElements) { 118 result = (from s in response.Elements() 119 select new StorageService() { 120 Url = s.Descendants(wa + "Url").Single().Value, 121 ServiceName = s.Descendants(wa + "ServiceName").Single().Value 122 }).ToList(); 123 } 124 if (result != null) 125 return result; 126 else 127 return new List<StorageService>(); 110 128 } 111 129 … … 170 188 } 171 189 190 public static StorageServiceKeys GetStorageKeys(string subscriptionId, string thumbprint, string serviceName) { 191 string uri = string.Format(Constants.URIStorageServiceKeys, subscriptionId, serviceName); 192 ServiceWebRequest operation = new ServiceWebRequest(thumbprint); 193 XDocument response = operation.Invoke(uri); 194 StorageServiceKeys keys = new StorageServiceKeys(); 195 keys.Primary = response.Descendants(wa + "Primary").Single().Value; 196 keys.Secondary = response.Descendants(wa + "Secondary").Single().Value; 197 return keys; 198 } 199 172 200 public static string AddCertificate(string subscriptionId, string thumbprint, string serviceName, string certificateFilePath, string password) { 173 201 string uri = String.Format(Constants.URICertificateFormat, subscriptionId, serviceName);
Note: See TracChangeset
for help on using the changeset viewer.