Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7402


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
Files:
6 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);
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model/Deployment.cs

    r7326 r7402  
    3737    public int UpgradeDomainCount;
    3838    public List<Role> RoleList { get; set; }
     39    public Subscription Subscription { get; set; }
    3940
    4041    public Deployment() {
     
    5455      this.UpgradeDomainCount = original.UpgradeDomainCount;
    5556      this.RoleList = new List<Role>(original.RoleList);
     57      this.Subscription = cloner.Clone(original.Subscription);
    5658
    5759    }
     
    9092      this.UpgradeDomainCount = deployment.UpgradeDomainCount;
    9193      this.RoleList = deployment.RoleList;
     94      this.Subscription = deployment.Subscription;
    9295    }
    9396  }
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model/HostedService.cs

    r7386 r7402  
    2828    public string ServiceName { get; set; }
    2929    public string Url { get; set; }
    30     public string SubscriptionId { get; set; }
     30    public Subscription Subscription { get; set; }
    3131    public HostedServiceProperties HostedServiceProperties { get; set; }
    3232    public List<Deployment> Deployments { get; set; }
     
    3939      this.ServiceName = original.ServiceName;
    4040      this.Url = original.Url;
    41       this.HostedServiceProperties = cloner.Clone(HostedServiceProperties);
     41      this.Subscription = cloner.Clone(original.Subscription);
     42      this.HostedServiceProperties = cloner.Clone(original.HostedServiceProperties);
    4243      this.Deployments = new List<Deployment>(original.Deployments);
    4344    }
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model/RoleInstance.cs

    r7326 r7402  
    2828    public string InstanceName { get; set; }
    2929    public string InstanceStatus { get; set; }
     30    public string InstanceSize { get; set; }
     31    public string InstanceStateDetails { get; set; }
     32    public string InstanceErrorCode { get; set; }
    3033
    3134    public RoleInstance() {
     
    3740      this.InstanceName = original.InstanceName;
    3841      this.InstanceStatus = original.InstanceStatus;
     42      this.InstanceSize = original.InstanceSize;
     43      this.InstanceStateDetails = original.InstanceStateDetails;
     44      this.InstanceErrorCode = original.InstanceErrorCode;
    3945    }
    4046
Note: See TracChangeset for help on using the changeset viewer.