Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/19/12 17:45:21 (12 years ago)
Author:
spimming
Message:

#1680:

  • Methods to create a deployment added
  • Download blob block from public blob container
  • Constants for deployment and storage api version added
File:
1 edited

Legend:

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

    r7354 r7374  
    103103    }
    104104
     105    public string CreateDeployment(Subscription subscription, string serviceName, string deploymentName, string deploymentSlot, string packageUrl, string configurationUrl, string label) {
     106      return CreateDeployment(subscription, serviceName, deploymentName, deploymentSlot, packageUrl, configurationUrl, label, 1);
     107    }
     108
     109    public string CreateDeployment(Subscription subscription, string serviceName, string deploymentName, string deploymentSlot, string packageUrl, string configurationUrl, string label, int instanceCount) {
     110      if (subscription == null) {
     111        throw new ArgumentNullException("Subscription must not be null.", "subscription");
     112      }
     113      if (instanceCount <= 0) {
     114        throw new ArgumentException("Instance count must be greater than zero.", "instanceCount");
     115      }
     116
     117      string configuration = ServiceManagementOperation.DownloadBlobAsString(new Uri(Constants.DeploymentConfigurationUrl));
     118      return ServiceManagementOperation.CreateDeployment(subscription.SubscriptionID, subscription.CertificateThumbprint, serviceName, deploymentName, deploymentSlot, packageUrl, configuration, label, instanceCount);
     119
     120    }
    105121  }
    106122}
Note: See TracChangeset for help on using the changeset viewer.