libdeltacloud 0.9
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "common.h"
#include "image.h"
Functions | |
int | deltacloud_get_images (struct deltacloud_api *api, struct deltacloud_image **images) |
int | deltacloud_get_image_by_id (struct deltacloud_api *api, const char *id, struct deltacloud_image *image) |
int | deltacloud_create_image (struct deltacloud_api *api, const char *name, struct deltacloud_instance *instance, struct deltacloud_create_parameter *params, int params_length, char **image_id) |
void | deltacloud_free_image (struct deltacloud_image *image) |
void | deltacloud_free_image_list (struct deltacloud_image **images) |
int deltacloud_create_image | ( | struct deltacloud_api * | api, |
const char * | name, | ||
struct deltacloud_instance * | instance, | ||
struct deltacloud_create_parameter * | params, | ||
int | params_length, | ||
char ** | image_id | ||
) |
A function to create a new image from a running instance.
[in] | api | The deltacloud_api structure representing the connection |
[in] | name | The name for the image |
[in] | instance | The deltacloud_instance structure to create the image 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] | image_id | The image_id returned by the create call |
void deltacloud_free_image | ( | struct deltacloud_image * | image | ) |
A function to free a deltacloud_image structure initially allocated by deltacloud_get_image_by_id().
[in] | image | The deltacloud_image structure representing the image |
void deltacloud_free_image_list | ( | struct deltacloud_image ** | images | ) |
A function to free a list of deltacloud_image structures initially allocated by deltacloud_get_images().
[in] | images | The pointer to the head of the deltacloud_image list |
int deltacloud_get_image_by_id | ( | struct deltacloud_api * | api, |
const char * | id, | ||
struct deltacloud_image * | image | ||
) |
A function to look up a particular image by id. The caller is expected to free the deltacloud_image structure using deltacloud_free_image().
[in] | api | The deltacloud_api structure representing the connection |
[in] | id | The image ID to look for |
[out] | image | The deltacloud_image structure to fill in if the ID is found |
int deltacloud_get_images | ( | struct deltacloud_api * | api, |
struct deltacloud_image ** | images | ||
) |
A function to get a linked list of all of the images. The caller is expected to free the list using deltacloud_free_image_list().
[in] | api | The deltacloud_api structure representing this connection |
[out] | images | A pointer to the deltacloud_image structure to hold the list of images |