Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/24/12 13:48:19 (13 years ago)
Author:
spimming
Message:

#1680:

  • Enum for instance size of roles
  • Set reference to subscription in hosted services and deployments
  • Add properties for subscription in hosted services and deployments
  • Extend properties in RoleInstance
Location:
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/AzureProvider.cs

    r7386 r7402  
    4545        throw new ArgumentException("Servicename is not valid.", "serviceName");
    4646      }
    47       return ServiceManagementOperation.GetHostedServiceDetailed(subscription.SubscriptionID, subscription.CertificateThumbprint, serviceName);
     47      HostedService service = ServiceManagementOperation.GetHostedServiceDetailed(subscription.SubscriptionID, subscription.CertificateThumbprint, serviceName);
     48      service.Subscription = subscription;
     49      foreach (Deployment dep in service.Deployments) {
     50        dep.Subscription = subscription;
     51      }
     52      return service;
    4853    }
    4954
     
    5964        throw new ArgumentNullException("Subscription must not be null.", "subscription");
    6065      }
    61       return ServiceManagementOperation.ListHostedServices(subscription.SubscriptionID, subscription.CertificateThumbprint);
     66      List<HostedService> services = ServiceManagementOperation.ListHostedServices(subscription.SubscriptionID, subscription.CertificateThumbprint);
     67      foreach (HostedService serv in services) {
     68        serv.Subscription = subscription;
     69        foreach (Deployment dep in serv.Deployments) {
     70          dep.Subscription = subscription;
     71        }
     72      }
     73      return services;
    6274    }
    6375
     
    145157        throw new ArgumentNullException("Subscription must not be null.", "subscription");
    146158      }
    147       return ServiceManagementOperation.DiscoverSlaveService(subscription.SubscriptionID, subscription.CertificateThumbprint);
     159      List<HostedService> services = ServiceManagementOperation.DiscoverSlaveService(subscription.SubscriptionID, subscription.CertificateThumbprint);
     160      foreach (HostedService serv in services) {
     161        serv.Subscription = subscription;
     162        foreach (Deployment dep in serv.Deployments) {
     163          dep.Subscription = subscription;
     164        }
     165      }
     166      return services;
    148167    }
    149168  }
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/Constants.cs

    r7374 r7402  
    8686
    8787    #endregion
     88
     89    #region Enums
     90
     91    public enum InstanceSize {
     92      ExtraSmall = 0,
     93      Small = 1,
     94      Medium = 2,
     95      Large = 4,
     96      ExtraLarge = 8
     97    }
     98
     99    #endregion
    88100  }
    89101}
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/ServiceManagementOperation.cs

    r7386 r7402  
    117117      service.ServiceName = response.Descendants(wa + "ServiceName").Single().Value;
    118118      service.Url = response.Descendants(wa + "Url").Single().Value;
    119       service.SubscriptionId = subscriptionId;
    120119      return service;
    121120    }
     
    128127      service.ServiceName = response.Descendants(wa + "ServiceName").Single().Value;
    129128      service.Url = response.Descendants(wa + "Url").First().Value;
    130       service.SubscriptionId = subscriptionId;
    131129      if (response.Root.Elements(wa + "HostedServiceProperties").Any()) {
    132130        XElement xHostedServiceProperties = response.Descendants(wa + "HostedServiceProperties").Single();
     
    402400                                                 RoleName = s.Descendants(wa + "RoleName").Single().Value,
    403401                                                 InstanceName = s.Descendants(wa + "InstanceName").Single().Value,
    404                                                  InstanceStatus = s.Descendants(wa + "InstanceStatus").Single().Value
     402                                                 InstanceStatus = s.Descendants(wa + "InstanceStatus").Single().Value,
     403                                                 InstanceSize = s.Descendants(wa + "InstanceSize").Single().Value,
     404                                                 InstanceStateDetails = s.Descendants(wa + "InstanceStateDetails").Single().Value
    405405                                               }).ToList();
    406406        deployment.RoleInstanceList = new List<RoleInstance>(instances);
Note: See TracChangeset for help on using the changeset viewer.