Inheritance: IDeploymentConfiguration
        public RequestUri BeginUpgrade(DeploymentSlotUri deploymentUri, DeploymentConfiguration configuration)
        {
            OurTrace.TraceVerbose("BeginUpgrade");
            var xml = configuration.MakeUpgradeDeploymentMessage();
            OurTrace.TraceInfo(xml);

            var response = _http.Post(deploymentUri + "/?comp=upgrade", xml);
            var statusCode = response.StatusCode;

            if (statusCode.IsAccepted())
                return deploymentUri.ToRequestUri(response.AzureRequestIdHeader);

            if (statusCode.IsConflict())
                return null;

            ThrowUnexpectedHttpResponse(response);
            return null; // can't be reached.
        }
        public void SetUp()
        {
            configurationFileName = Path.GetTempFileName();
            serviceConfigurationPath = Path.GetTempFileName();
            using (var writer = new StreamWriter(configurationFileName))
            {
                writer.WriteLine("  <Params>");
                writer.WriteLine("    <SubscriptionId>subscription id</SubscriptionId>");
                writer.WriteLine("    <ServiceName>service name</ServiceName>");
                writer.WriteLine("    <DeploymentSlot>deployment slot</DeploymentSlot>");
                writer.WriteLine("    <StorageAccountName>storage account name</StorageAccountName>");
                writer.WriteLine("    <StorageAccountKey>storage account key</StorageAccountKey>");
                writer.WriteLine("    <CertFileName>cert file name</CertFileName>");
                writer.WriteLine("    <CertPassword>cert password</CertPassword>");
                writer.WriteLine("    <PackageFileName>package file name</PackageFileName>");
                writer.WriteLine("    <ServiceConfigurationPath>{0}</ServiceConfigurationPath>",serviceConfigurationPath);
                writer.WriteLine("    <DeploymentLabel>deployment label</DeploymentLabel>");
                writer.WriteLine("    <DeploymentName>deployment name</DeploymentName>");
                writer.WriteLine("    <RoleName>role name</RoleName>");
                writer.WriteLine("    <MaxRetries>12</MaxRetries>");
                writer.WriteLine("    <RetryIntervalInSeconds>12</RetryIntervalInSeconds>");
                writer.WriteLine("    <Force>true</Force>");
                writer.WriteLine("  </Params>");
            }

            using (var serviceConfig = new StreamWriter(serviceConfigurationPath))
                serviceConfig.Write("service config contents and stuff");

            configuration = ConfigurationParser.ParseConfiguration(configurationFileName);
        }
Exemplo n.º 3
0
 public void UpgradeDeployment(DeploymentConfiguration configuration)
 {
     _apiWithRetries.Upgrade(_deploymentSlotUri, configuration);
     _apiWithRetries.WaitForDeploymentStatus(_deploymentSlotUri, AzureDeploymentCheckOutcome.Running);
 }
 public void Upgrade(DeploymentSlotUri deploymentSlotUri, DeploymentConfiguration configuration)
 {
     throw new NotImplementedException();
 }
 public RequestUri BeginUpgrade(DeploymentSlotUri deploymentSlotUri, DeploymentConfiguration configuration)
 {
     throw new NotImplementedException();
 }
 public void Upgrade(DeploymentSlotUri deploymentSlotUri, DeploymentConfiguration configuration)
 {
     ExecuteAsynchronousAction(() => _managementLowLevelApi.BeginUpgrade(deploymentSlotUri, configuration));
 }