libdeltacloud 0.9
|
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include "common.h"
#include "storage_snapshot.h"
Functions | |
int | deltacloud_get_storage_snapshots (struct deltacloud_api *api, struct deltacloud_storage_snapshot **storage_snapshots) |
int | deltacloud_get_storage_snapshot_by_id (struct deltacloud_api *api, const char *id, struct deltacloud_storage_snapshot *storage_snapshot) |
int | deltacloud_create_storage_snapshot (struct deltacloud_api *api, struct deltacloud_storage_volume *volume, struct deltacloud_create_parameter *params, int params_length, char **snap_id) |
int | deltacloud_storage_snapshot_destroy (struct deltacloud_api *api, struct deltacloud_storage_snapshot *storage_snapshot) |
void | deltacloud_free_storage_snapshot (struct deltacloud_storage_snapshot *storage_snapshot) |
void | deltacloud_free_storage_snapshot_list (struct deltacloud_storage_snapshot **storage_snapshots) |
int deltacloud_create_storage_snapshot | ( | struct deltacloud_api * | api, |
struct deltacloud_storage_volume * | volume, | ||
struct deltacloud_create_parameter * | params, | ||
int | params_length, | ||
char ** | snap_id | ||
) |
A function to create a new storage snapshot.
[in] | api | The deltacloud_api structure representing the connection |
[in] | volume | The volume to take the snapshot from |
[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 |
[out] | snap_id | The snapshot_id returned by the create call |
void deltacloud_free_storage_snapshot | ( | struct deltacloud_storage_snapshot * | storage_snapshot | ) |
A function to free a deltacloud_storage_snapshot structure initially allocated by deltacloud_get_storage_snapshot_by_id().
[in] | storage_snapshot | The deltacloud_storage_snapshot structure representing the storage snapshot |
void deltacloud_free_storage_snapshot_list | ( | struct deltacloud_storage_snapshot ** | storage_snapshots | ) |
A function to free a list of deltacloud_storage_snapshot structures initially allocated by deltacloud_get_storage_snapshots().
[in] | storage_snapshots | The pointer to the head of the deltacloud_storage_snapshot list |
int deltacloud_get_storage_snapshot_by_id | ( | struct deltacloud_api * | api, |
const char * | id, | ||
struct deltacloud_storage_snapshot * | storage_snapshot | ||
) |
A function to look up a particular storage snapshot by id. The caller is expected to free the deltacloud_storage_snapshot structure using deltacloud_free_storage_snapshot().
[in] | api | The deltacloud_api structure representing the connection |
[in] | id | The storage snapshot ID to look for |
[out] | storage_snapshot | The deltacloud_storage_snapshot structure to fill in if the ID is found |
int deltacloud_get_storage_snapshots | ( | struct deltacloud_api * | api, |
struct deltacloud_storage_snapshot ** | storage_snapshots | ||
) |
A function to get a linked list of all of the storage snapshots. The caller is expected to free the list using deltacloud_free_storage_snapshot_list().
[in] | api | The deltacloud_api structure representing this connection |
[out] | storage_snapshots | A pointer to the deltacloud_storage_snapshot structure to hold the list of storage snapshots |
int deltacloud_storage_snapshot_destroy | ( | struct deltacloud_api * | api, |
struct deltacloud_storage_snapshot * | storage_snapshot | ||
) |
A function to destroy a storage snapshot.
[in] | api | The deltacloud_api structure representing the connection |
[in] | storage_snapshot | The deltacloud_storage_snapstho structure representing the storage snapshot |