libdeltacloud 0.9
Functions
src/storage_snapshot.c File Reference
#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)

Detailed Description


Function Documentation

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.

Parameters:
[in]apiThe deltacloud_api structure representing the connection
[in]volumeThe volume to take the snapshot from
[in]paramsAn array of deltacloud_create_parameter structures that represent any optional parameters to pass into the create call
[in]params_lengthAn integer describing the length of the params array
[out]snap_idThe snapshot_id returned by the create call
Returns:
0 on success, -1 on error
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().

Parameters:
[in]storage_snapshotThe 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().

Parameters:
[in]storage_snapshotsThe 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().

Parameters:
[in]apiThe deltacloud_api structure representing the connection
[in]idThe storage snapshot ID to look for
[out]storage_snapshotThe deltacloud_storage_snapshot structure to fill in if the ID is found
Returns:
0 on success, -1 if the storage snapshot cannot be found or on error
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().

Parameters:
[in]apiThe deltacloud_api structure representing this connection
[out]storage_snapshotsA pointer to the deltacloud_storage_snapshot structure to hold the list of storage snapshots
Returns:
0 on success, -1 on error
int deltacloud_storage_snapshot_destroy ( struct deltacloud_api api,
struct deltacloud_storage_snapshot storage_snapshot 
)

A function to destroy a storage snapshot.

Parameters:
[in]apiThe deltacloud_api structure representing the connection
[in]storage_snapshotThe deltacloud_storage_snapstho structure representing the storage snapshot
Returns:
0 on success, -1 on error
 All Data Structures Files Functions Variables