Changeset 7386 for branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/ServiceManagementOperation.cs
- Timestamp:
- 01/20/12 16:52:52 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/ServiceManagementOperation.cs
r7374 r7386 117 117 service.ServiceName = response.Descendants(wa + "ServiceName").Single().Value; 118 118 service.Url = response.Descendants(wa + "Url").Single().Value; 119 service.SubscriptionId = subscriptionId; 119 120 return service; 120 121 } … … 127 128 service.ServiceName = response.Descendants(wa + "ServiceName").Single().Value; 128 129 service.Url = response.Descendants(wa + "Url").First().Value; 130 service.SubscriptionId = subscriptionId; 129 131 if (response.Root.Elements(wa + "HostedServiceProperties").Any()) { 130 132 XElement xHostedServiceProperties = response.Descendants(wa + "HostedServiceProperties").Single(); … … 210 212 } 211 213 214 public static List<HostedService> DiscoverSlaveService(string subscriptionId, string thumbprint) { 215 List<HostedService> hostedServices = new List<HostedService>(); 216 foreach (HostedService hostedService in ListHostedServices(subscriptionId, thumbprint)) { 217 HostedService hs = GetHostedServiceDetailed(subscriptionId, thumbprint, hostedService.ServiceName); 218 foreach (Deployment deployment in hs.Deployments) { 219 if (ContainsRoleNameInConfiguration(XDocument.Parse(deployment.Configuration), Constants.HLSlaveRoleName)) { 220 if (!hostedServices.Contains(hs)) { 221 hostedServices.Add(hs); 222 } 223 } 224 } 225 } 226 return hostedServices; 227 } 228 229 public static string DeleteHostedService(string subscriptionId, string thumbprint, string serviceName) { 230 string uri = String.Format(Constants.URISpecificHostedServiceFormat, subscriptionId, serviceName); 231 ServiceWebRequest operation = new ServiceWebRequest(thumbprint); 232 string requestId = operation.Invoke(uri, Constants.HttpMethodDELETE); 233 return requestId; 234 } 235 212 236 #endregion 213 237
Note: See TracChangeset
for help on using the changeset viewer.