Inherits from AFHTTPClient
Declared in HPCSComputeClient.h

Overview

The interface to HP’s Nova System (Compute)

Tasks

Other Methods

Creating and Initializing HPCSCompute Clients

List Running Nova Instances

List available server flavors

List available server images

Get detailed information about a server

Get detailed information about a server flavor

Get detailed information about a server (Glance) image

Terminate a server

Properties

identityClient

the interface to the identity system

@property (retain) HPCSIdentityClient *identityClient

Declared In

HPCSComputeClient.h

Instance Methods

flavorDetailsFor:success:failure:

Retrieve verbose details on a Nova flavor

- (void)flavorDetailsFor:(id)flavorInfo success:(void ( ^ ) ( id flavorInfo ))block failure:(void ( ^ ) ( NSHTTPURLResponse *response , NSError *error ))failure

Parameters

flavorInfo

object that must respond to flavorId

block

block that returns an NSDictionary of information about the flavor

failure

block called for a failed call

Discussion

emits HPCSNovaFlavorDetailsDidFailNotification on failure with userInfo[“NSError”] for error details

Declared In

HPCSComputeClient.h

flavors:failure:

Retrieves the list of flavors available to launch

- (void)flavors:(void ( ^ ) ( NSArray *records ))block failure:(void ( ^ ) ( NSHTTPURLResponse *response , NSError *error ))failure

Parameters

block

returns an NSArray of flavors, or an empty NSArray if it fails

failure

block called for a failed call

Discussion

emits event HPCSNovaFlavorsDidFailNotification on failure with userInfo[“NSError”] for error details

Declared In

HPCSComputeClient.h

imageDetailsFor:success:failure:

Retrieve verbose details on a Glance image

- (void)imageDetailsFor:(id)imageInfo success:(void ( ^ ) ( id imageInfo ))block failure:(void ( ^ ) ( NSHTTPURLResponse *response , NSError *error ))failure

Parameters

imageInfo

object that must respond to imageId

block

block that returns an NSDictionary of information about the image

failure

block called for a failed call

Discussion

emits HPCSNovaImageDetailsDidFailNotification on failure with userInfo[“NSError”] for error details

Declared In

HPCSComputeClient.h

images:failure:

Retrieves the list of images available to launch (from Glance)

- (void)images:(void ( ^ ) ( NSArray *records ))block failure:(void ( ^ ) ( NSHTTPURLResponse *response , NSError *error ))failure

Parameters

block

returns an NSArray of Glance images, or an empty NSArray if it fails

failure

block called for a failed call

Discussion

emits HPCSNovaImagesDidFailNotification on failure with userInfo[“NSError”] for error details

Declared In

HPCSComputeClient.h

initWithIdentityClient:

Creates a compute client

- (id)initWithIdentityClient:(HPCSIdentityClient *)client

Parameters

client

the HPCSIdentityClient to use as the Identity Service Client

Discussion

This is designated initializer. Typically its called in the following fashion (implicitly) from a singleton instance of HPCSIdentityClient:

HPCSIdentityClient *client = [HPCSIdentityClient sharedClient];
//this calls initWithIdentityClient
HPCSComputeClient *computeClient = [client computeClient];

Declared In

HPCSComputeClient.h

serverDetailsFor:success:failure:

Retrieve verbose details on a Nova server

- (void)serverDetailsFor:(id)serverInfo success:(void ( ^ ) ( id serverInfo ))block failure:(void ( ^ ) ( NSHTTPURLResponse *response , NSError *error ))failure

Parameters

serverInfo

object that must respond to serverId

block

block that returns an NSDictionary of information about the server

failure

block called for a failed call

Discussion

emits HPCSNovaServersShowDidFailNotification on failure with userInfo[“NSError”] for error details

Declared In

HPCSComputeClient.h

servers:failure:

Retrieves the list of servers running

- (void)servers:(void ( ^ ) ( NSArray *records ))block failure:(void ( ^ ) ( NSHTTPURLResponse *response , NSError *error ))failure

Parameters

block

returns an NSArray of servers, or an empty NSArray if it fails

failure

block called for a failed call

Discussion

emits notification HPCSNovaServersListDidFailNotification if servers list fails with userInfo[“NSError”] for error details. Question: support changes-since param?

Declared In

HPCSComputeClient.h

terminateServer:success:failure:

Terminate the specified server.

- (void)terminateServer:(id)serverInfo success:(void ( ^ ) ( NSHTTPURLResponse *response ))success failure:(void ( ^ ) ( NSHTTPURLResponse *response , NSError *error ))failure

Parameters

serverInfo

object that must respond to serverId

success

block which returns the NSHTTPURLResponse

failure

block which is called in case of a failure

Discussion

emits event HPCSNovaServersDeleteDidFailNotification on failure with userInfo[“NSError”] with error details

Declared In

HPCSComputeClient.h