#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include "common.h"
#include "instance.h"
#include "curl_action.h"
Functions |
int | deltacloud_create_instance (struct deltacloud_api *api, const char *image_id, struct deltacloud_create_parameter *params, int params_length, char **instance_id) |
int | deltacloud_instance_stop (struct deltacloud_api *api, struct deltacloud_instance *instance) |
int | deltacloud_instance_reboot (struct deltacloud_api *api, struct deltacloud_instance *instance) |
int | deltacloud_instance_start (struct deltacloud_api *api, struct deltacloud_instance *instance) |
int | deltacloud_instance_destroy (struct deltacloud_api *api, struct deltacloud_instance *instance) |
int | deltacloud_get_instances (struct deltacloud_api *api, struct deltacloud_instance **instances) |
int | deltacloud_get_instance_by_id (struct deltacloud_api *api, const char *id, struct deltacloud_instance *instance) |
int | deltacloud_get_instance_by_name (struct deltacloud_api *api, const char *name, struct deltacloud_instance *instance) |
void | deltacloud_free_instance (struct deltacloud_instance *instance) |
void | deltacloud_free_instance_list (struct deltacloud_instance **instances) |
Detailed Description
Function Documentation
A function to create a new instance from an image.
- Parameters:
-
[in] | api | The deltacloud_api structure representing the connection |
[in] | image_id | The image ID to create the instance 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] | instance_id | The instance ID returned by the create call |
- Returns:
- 0 on success, -1 on error
A function to look up a particular instance by id. The caller is expected to free the deltacloud_instance structure using deltacloud_free_instance().
- Parameters:
-
[in] | api | The deltacloud_api structure representing the connection |
[in] | id | The instance ID to look for |
[out] | instance | The deltacloud_instance structure to fill in if the ID is found |
- Returns:
- 0 on success, -1 if the instance cannot be found or on error
A function to look up a particular instance by name. The caller is expected to free the deltacloud_instance structure using deltacloud_free_instance(). Note that deltacloud does not guarantee that instance names are unique; this function will only find and return the first instance with the desired name.
- Parameters:
-
[in] | api | The deltacloud_api structure representing the connection |
[in] | name | The instance name to look for |
[out] | instance | The deltacloud_instance structure to fill in if the name is found |
- Returns:
- 0 on success, -1 if the instance cannot be found or on error
A function to get a linked list of all of the instances. The caller is expected to free the list using deltacloud_free_instance_list().
- Parameters:
-
- Returns:
- 0 on success, -1 on error
A function to perform the destroy action on an instance.
- Parameters:
-
- Returns:
- 0 on success, -1 on error
A function to perform the reboot action on an instance.
- Parameters:
-
- Returns:
- 0 on success, -1 on error
A function to perform the start action on an instance.
- Parameters:
-
- Returns:
- 0 on success, -1 on error
A function to perform the stop action on an instance.
- Parameters:
-
- Returns:
- 0 on success, -1 on error