Exemple #1
0
 /// <summary>
 /// <para>Deletes the compose deployment from the cluster.</para>
 /// </summary>
 /// <param name="client"><see cref="System.Fabric.FabricClient"/> object.</param>
 /// <param name="description">
 /// <para>The <see cref="Description.DeleteComposeDeploymentDescription"/> that determines which compose deployment should be deleted.</para>
 /// </param>
 /// <param name="timeout">
 /// <para>Defines the maximum amount of time the system will allow this operation to continue before returning System.TimeoutException.</para>
 /// </param>
 /// <returns>
 ///   <para>A <see cref="System.Threading.Tasks.Task" /> representing the operation.</para>
 /// </returns>
 /// <exception cref="System.Fabric.FabricObjectClosedException">
 /// <para>The <see cref="System.Fabric.FabricClient" /> object is in a closed state. Dispose of the <see cref="System.Fabric.FabricClient" /> object you are using and instantiate a new <see cref="System.Fabric.FabricClient" /> object.</para>
 /// </exception>
 /// <exception cref="System.Fabric.FabricElementNotFoundException">
 /// <para>
 ///     <see cref="System.Fabric.FabricErrorCode.ComposeDeploymentNotFound" />: The compose deployment does not exist.
 /// </para>
 /// </exception>
 /// <exception cref="System.Fabric.FabricTransientException">
 /// <para>
 ///     <see cref="System.Fabric.FabricErrorCode.ApplicationUpgradeInProgress" />: The application is being upgraded. </para>
 /// </exception>
 /// <exception cref="System.TimeoutException">
 /// <para>The request timed out but may have already been accepted for processing by the system.</para>
 /// </exception>
 /// <exception cref="System.OperationCanceledException">
 /// <para>The request was canceled before the timeout expired but may have already been accepted for processing by the system.</para>
 /// </exception>
 /// <remarks>
 /// <para>All application state will be lost and cannot be recovered after the application is deleted.</para>
 /// </remarks>
 public static Task DeleteComposeDeploymentAsync(
     this FabricClient.ComposeDeploymentClient client,
     DeleteComposeDeploymentDescription description,
     TimeSpan timeout)
 {
     return(client.DeleteComposeDeploymentWrapperAsync(description.ToWrapper(), timeout));
 }
Exemple #2
0
 /// <summary>
 /// <para>Starts rolling back the current compose deployment upgrade.</para>
 /// </summary>
 /// <param name="client"><see cref="System.Fabric.FabricClient"/> object.</param>
 /// <param name="description">
 /// <para>The <see cref="Description.ComposeDeploymentRollbackDescription"/> that determines which compose deployment should be rolled back.</para>
 /// </param>
 /// <param name="timeout">
 /// <para>Defines the maximum amount of time the system will allow this operation to continue before returning System.TimeoutException.</para>
 /// </param>
 /// <returns>
 /// <para>A <see cref="System.Threading.Tasks.Task" /> representing the operation.</para>
 /// </returns>
 /// <exception cref="System.Fabric.FabricElementNotFoundException">
 /// <para>
 /// <see cref="System.Fabric.FabricErrorCode.ComposeDeploymentNotFound" />: The compose deployment does not exist.
 /// </para>
 /// </exception>
 /// <exception cref="System.Fabric.FabricException">
 /// <para>
 /// <see cref="System.Fabric.FabricErrorCode.ComposeDeploymentNotUpgrading" />: There is no pending upgrade for the specified compose deployment to rollback.
 /// </para>
 /// </exception>
 public static Task RollbackComposeDeploymentUpgradeAsync(
     this FabricClient.ComposeDeploymentClient client,
     ComposeDeploymentRollbackDescription description,
     TimeSpan timeout)
 {
     return(client.RollbackComposeDeploymentUpgradeAsync(description.ToWrapper(), timeout));
 }
Exemple #3
0
 /// <summary>
 ///   <para>Creates and instantiates the Service Fabric compose deployment described by the compose deployment description.</para>
 /// </summary>
 /// <param name="composeDeploymentDescription">
 /// <para>The <see cref="ComposeDeploymentDescription"/> that describes the compose deployment to be created.</para>
 /// </param>
 /// <param name="client"><see cref="System.Fabric.FabricClient"/> object.</param>
 /// <param name="timeout">
 /// <para>Defines the maximum amount of time the system will allow this operation to continue before returning <see cref="System.TimeoutException" />.</para>
 /// </param>
 /// <returns>
 ///   <para>A <see cref="System.Threading.Tasks.Task" /> representing the operation.</para>
 /// </returns>
 /// <exception cref="System.Fabric.FabricObjectClosedException">
 ///   <para>The <see cref="System.Fabric.FabricClient" /> object is in a closed state. Dispose of the <see cref="System.Fabric.FabricClient" />
 ///   object you are using and instantiate a new <see cref="System.Fabric.FabricClient" /> object.</para>
 /// </exception>
 /// <exception cref="System.Fabric.FabricException">
 ///   <para>
 ///     <see cref="System.Fabric.FabricErrorCode.ImageBuilderValidationError" />: The create application request is not valid with respect to the provisioned manifests for the requested application type.</para>
 ///   <para>
 ///     <see cref="System.Fabric.FabricErrorCode.InvalidNameUri" />: The application name is not a valid Naming URI.</para>
 ///   <para>
 ///     <see cref="System.Fabric.FabricErrorCode.CorruptedImageStoreObjectFound" />: A corrupted file was encountered on the image store.</para>
 /// </exception>
 /// <exception cref="System.Fabric.FabricElementAlreadyExistsException">
 ///   <para><see cref="System.Fabric.FabricErrorCode.ComposeDeploymentAlreadyExists" />: The compose deployment has already been created.</para>
 ///   <para><see cref="System.Fabric.FabricErrorCode.ApplicationAlreadyExists" />: The application has already been created so that compose deployment can not be created using the same name. </para>
 /// </exception>
 /// <exception cref="System.UnauthorizedAccessException">
 ///   <para>There was an error accessing a file on the Image Store.</para>
 /// </exception>
 /// <exception cref="System.IO.FileNotFoundException">
 ///   <para>A required file was not found on the Image Store.</para>
 /// </exception>
 /// <exception cref="System.IO.DirectoryNotFoundException">
 ///   <para>A required directory was not found on the Image Store.</para>
 /// </exception>
 /// <exception cref="System.IO.PathTooLongException">
 ///   <para>A path to an Image Store file/directory was too long.</para>
 /// </exception>
 /// <exception cref="System.IO.IOException">
 ///   <para>
 ///     <see cref="System.Fabric.FabricErrorCode.ImageStoreIOException" />: There was an IO error communicating with the Image Store.</para>
 /// </exception>
 /// <exception cref="System.TimeoutException">
 ///   <para>The request timed out but may have already been accepted for processing by the system.</para>
 /// </exception>
 /// <exception cref="System.OperationCanceledException">
 ///   <para>The request was canceled before the timeout expired but may have already been accepted for processing by the system.</para>
 /// </exception>
 /// <exception cref="System.ArgumentException">
 ///   <para>
 ///     The parameters specified via the <see cref="ComposeDeploymentDescription"/> are incorrect.
 ///   </para>
 /// </exception>
 public static Task CreateComposeDeploymentAsync(
     this FabricClient.ComposeDeploymentClient client,
     ComposeDeploymentDescription composeDeploymentDescription,
     TimeSpan timeout)
 {
     return(client.CreateComposeDeploymentAsync(composeDeploymentDescription.ToWrapper(), timeout));
 }
Exemple #4
0
 /// <summary>
 /// <para>Retrieves the upgrade progress of the specified compose deployment.</para>
 /// </summary>
 /// <param name="client"><see cref="System.Fabric.FabricClient"/> object.</param>
 /// <param name="deploymentName">
 /// <para>The name of the deployment.</para>
 /// </param>
 /// <param name="timeout">
 /// <para>The maximum amount of time the system will allow this operation to continue before returning <see cref="System.TimeoutException" />.</para>
 /// </param>
 /// <param name="cancellationToken">
 /// <para>The <see cref="System.Threading.CancellationToken" /> that the operation is observing. It can be used to propagate notification that the operation should be canceled.</para>
 /// </param>
 /// <returns>
 /// <para>A <see cref="System.Threading.Tasks.Task" /> whose result is the upgrade progress of the specified compose deployment.</para>
 /// </returns>
 /// <exception cref="System.Fabric.FabricObjectClosedException">
 /// <para>The <see cref="System.Fabric.FabricClient" /> object is in a closed state. Dispose of the <see cref="System.Fabric.FabricClient" /> object you are using and instantiate a new <see cref="System.Fabric.FabricClient" /> object.</para>
 /// </exception>
 /// <exception cref="System.Fabric.FabricElementNotFoundException">
 /// <para>
 ///     <see cref="System.Fabric.FabricErrorCode.ComposeDeploymentNotFound" />: The compose deployment does not exist.
 /// </para>
 /// </exception>
 /// <exception cref="System.TimeoutException">
 /// <para>The request timed out but may have already been accepted for processing by the system.</para>
 /// </exception>
 /// <exception cref="System.OperationCanceledException">
 /// <para>The request was canceled before the timeout expired but may have already been accepted for processing by the system.</para>
 /// </exception>
 internal static Task <ComposeDeploymentUpgradeProgress> GetComposeDeploymentUpgradeProgressAsync(
     this FabricClient.ComposeDeploymentClient client,
     string deploymentName,
     TimeSpan timeout,
     CancellationToken cancellationToken)
 {
     return(client.GetComposeDeploymentUpgradeProgressAsync(deploymentName, timeout, cancellationToken));
 }
Exemple #5
0
 /// <summary>
 /// <para>Starts the upgrade for the compose deployment identified by the deployment name, in the cluster.</para>
 /// </summary>
 public static Task UpgradeComposeDeploymentAsync(
     this FabricClient.ComposeDeploymentClient client,
     ComposeDeploymentUpgradeDescription upgradeDescription,
     TimeSpan timeout,
     CancellationToken cancellationToken)
 {
     return(client.UpgradeComposeDeploymentAsync(upgradeDescription.ToWrapper(), timeout, cancellationToken));
 }
Exemple #6
0
 /// <summary>
 /// <para>Retrieves the upgrade progress of the specified compose deployment.</para>
 /// </summary>
 /// <param name="client"><see cref="System.Fabric.FabricClient"/> object.</param>
 /// <param name="deploymentName">
 /// <para>The name of the deployment.</para>
 /// </param>
 /// <returns>
 /// <para>A <see cref="System.Threading.Tasks.Task" /> whose result is the upgrade progress of the specified compose deployment.</para>
 /// </returns>
 /// <exception cref="System.Fabric.FabricObjectClosedException">
 /// <para>The <see cref="System.Fabric.FabricClient" /> object is in a closed state. Dispose of the <see cref="System.Fabric.FabricClient" /> object you are using and instantiate a new <see cref="System.Fabric.FabricClient" /> object.</para>
 /// </exception>
 /// <exception cref="System.Fabric.FabricElementNotFoundException">
 /// <para>
 ///     <see cref="System.Fabric.FabricErrorCode.ComposeDeploymentNotFound" />: The compose deployment does not exist.
 /// </para>
 /// </exception>
 /// <exception cref="System.TimeoutException">
 /// <para>The request timed out but may have already been accepted for processing by the system.</para>
 /// </exception>
 /// <exception cref="System.OperationCanceledException">
 /// <para>The request was canceled before the timeout expired but may have already been accepted for processing by the system.</para>
 /// </exception>
 public static Task <ComposeDeploymentUpgradeProgress> GetComposeDeploymentUpgradeProgressAsync(
     this FabricClient.ComposeDeploymentClient client,
     string deploymentName)
 {
     return(client.GetComposeDeploymentUpgradeProgressAsync(deploymentName, FabricClient.DefaultTimeout, CancellationToken.None));
 }
Exemple #7
0
 /// <summary>
 /// <para>Starts the upgrade for the compose deployment identified by the deployment name, in the cluster.</para>
 /// </summary>
 public static Task UpgradeComposeDeploymentAsync(
     this FabricClient.ComposeDeploymentClient client,
     ComposeDeploymentUpgradeDescription upgradeDescription)
 {
     return(client.UpgradeComposeDeploymentAsync(upgradeDescription.ToWrapper()));
 }