예제 #1
0
 /// <summary>
 /// The Begin Creating Volume Container operation creates a new volume
 /// container.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IDataContainerOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. device id
 /// </param>
 /// <param name='containerDetails'>
 /// Required. Parameters supplied to the Begin Creating Volume
 /// Container operation.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// This is the Task Response for all Async Calls
 /// </returns>
 public static TaskResponse BeginCreating(this IDataContainerOperations operations, string deviceId, DataContainerRequest containerDetails, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDataContainerOperations)s).BeginCreatingAsync(deviceId, containerDetails, customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #2
0
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IDataContainerOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. device id
 /// </param>
 /// <param name='dataContainerId'>
 /// Required. id of data container which needs to be deleted
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// Info about the async task
 /// </returns>
 public static TaskStatusInfo Delete(this IDataContainerOperations operations, string deviceId, string dataContainerId, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDataContainerOperations)s).DeleteAsync(deviceId, dataContainerId, customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the StorSimpleManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public StorSimpleManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._backup                             = new BackupOperations(this);
     this._backupPolicy                       = new BackupPolicyOperations(this);
     this._dataContainer                      = new DataContainerOperations(this);
     this._deviceDetails                      = new DeviceDetailsOperations(this);
     this._devices                            = new DeviceOperations(this);
     this._iscsiConnection                    = new IscsiConnectionDetailsOperations(this);
     this._resourceEncryptionKeys             = new ResourceEncryptionKeyOperations(this);
     this._serviceConfig                      = new ServiceConfigurationOperations(this);
     this._virtualDisk                        = new VirtualDiskOperations(this);
     this._apiVersion                         = "2014-01-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the StorSimpleManagementClient class.
 /// </summary>
 public StorSimpleManagementClient()
     : base()
 {
     this._backup                             = new BackupOperations(this);
     this._backupPolicy                       = new BackupPolicyOperations(this);
     this._cloneVolume                        = new CloneVolumeOperations(this);
     this._dataContainer                      = new DataContainerOperations(this);
     this._deviceDetails                      = new DeviceDetailsOperations(this);
     this._deviceFailover                     = new DeviceFailoverOperations(this);
     this._deviceJob                          = new DeviceJobOperations(this);
     this._devices                            = new DeviceOperations(this);
     this._devicePublicKey                    = new DevicePublicKeyOperations(this);
     this._iscsiConnection                    = new IscsiConnectionDetailsOperations(this);
     this._migrateLegacyAppliance             = new MigrationOperations(this);
     this._resourceEncryptionKeys             = new ResourceEncryptionKeyOperations(this);
     this._serviceConfig                      = new ServiceConfigurationOperations(this);
     this._virtualDevice                      = new VirtualDeviceOperations(this);
     this._virtualDisk                        = new VirtualDiskOperations(this);
     this._apiVersion                         = "2014-01-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
예제 #5
0
 /// <summary>
 /// The Begin Creating Volume Container operation creates a new volume
 /// container.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IDataContainerOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. device id
 /// </param>
 /// <param name='containerDetails'>
 /// Required. Parameters supplied to the Begin Creating Volume
 /// Container operation.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// This is the Task Response for all Async Calls
 /// </returns>
 public static Task <TaskResponse> BeginCreatingAsync(this IDataContainerOperations operations, string deviceId, DataContainerRequest containerDetails, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.BeginCreatingAsync(deviceId, containerDetails, customRequestHeaders, CancellationToken.None));
 }
예제 #6
0
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IDataContainerOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Optional.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional.
 /// </param>
 /// <returns>
 /// The response model for the list of data containers.
 /// </returns>
 public static Task <DataContainerListResponse> ListAsync(this IDataContainerOperations operations, string deviceId, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.ListAsync(deviceId, customRequestHeaders, CancellationToken.None));
 }
예제 #7
0
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IDataContainerOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. device id
 /// </param>
 /// <param name='dataContainerId'>
 /// Required. id of data container which needs to be deleted
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// Info about the async task
 /// </returns>
 public static Task <TaskStatusInfo> DeleteAsync(this IDataContainerOperations operations, string deviceId, string dataContainerId, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.DeleteAsync(deviceId, dataContainerId, customRequestHeaders, CancellationToken.None));
 }