#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include "common.h"
#include "storage_volume.h"
Functions |
int | deltacloud_get_storage_volumes (struct deltacloud_api *api, struct deltacloud_storage_volume **storage_volumes) |
int | deltacloud_get_storage_volume_by_id (struct deltacloud_api *api, const char *id, struct deltacloud_storage_volume *storage_volume) |
int | deltacloud_create_storage_volume (struct deltacloud_api *api, struct deltacloud_create_parameter *params, int params_length) |
int | deltacloud_storage_volume_destroy (struct deltacloud_api *api, struct deltacloud_storage_volume *storage_volume) |
int | deltacloud_storage_volume_attach (struct deltacloud_api *api, struct deltacloud_storage_volume *storage_volume, const char *instance_id, const char *device, struct deltacloud_create_parameter *params, int params_length) |
int | deltacloud_storage_volume_detach (struct deltacloud_api *api, struct deltacloud_storage_volume *storage_volume, struct deltacloud_create_parameter *params, int params_length) |
void | deltacloud_free_storage_volume (struct deltacloud_storage_volume *storage_volume) |
void | deltacloud_free_storage_volume_list (struct deltacloud_storage_volume **storage_volumes) |
Detailed Description
Function Documentation
A function to create a new storage volume.
- Parameters:
-
[in] | api | The deltacloud_api structure representing the connection |
[in] | params | An array of deltacloud_create_parameter structures that represent any optional parameters to pass into the create call |
[in] | params_length | An integer describing the length of the params array |
- Returns:
- 0 on success, -1 on error
A function to get a linked list of all of the storage volumes. The caller is expected to free the list using deltacloud_free_storage_volume_list().
- Parameters:
-
- Returns:
- 0 on success, -1 on error
A function to attach a storage volume to an instance.
- Parameters:
-
[in] | api | The deltacloud_api structure representing the connection |
[in] | storage_volume | The deltacloud_storage_volume structure representing the storage volume to attach |
[in] | instance_id | The instance ID to attach the storage volume to |
[in] | device | The device name that the storage volume will be attached as |
[in] | params | An array of deltacloud_create_parameter structures that represent any optional parameters to pass into the register call |
[in] | params_length | An integer describing the length of the params array |
- Returns:
- 0 on success, -1 on error
A function to destroy a storage volume.
- Parameters:
-
[in] | api | The deltacloud_api structure representing the connection |
[in] | storage_volume | The deltacloud_storage_snapstho structure representing the storage volume |
- Returns:
- 0 on success, -1 on error
A function to detach a storage volume from an instance.
- Parameters:
-
[in] | api | The deltacloud_api structure representing the connection |
[in] | storage_volume | The deltacloud_storage_volume structure representing the storage volume to detach |
[in] | params | An array of deltacloud_create_parameter structures that represent any optional parameters to pass into the register call |
[in] | params_length | An integer describing the length of the params array |
- Returns:
- 0 on success, -1 on error