API Docs

A python library for working with IBM Analytics Engine

Service Instance Operations

Lifecycle operations for an IAE service instance.

class ibm_analytics_engine.IAE(cf_client)[source]

This class provides methods for working with IBM Analytics Engine (IAE) deployment operations. Many of the methods in this calls are performed by calling the Cloud Foundry Rest API (https://apidocs.cloudfoundry.org/272/). The Cloud Foundry API is quite abstract, so this class provides methods names that are more meaningful for those just wanting to work with IAE.

This class does not save the state from the Cloud Foundry operations - it retrieve all state from Cloud Foundry as required.

__init__(cf_client)[source]

Create a new instance of the IAE client.

Parameters:cf_client (CloudFoundryAPI) – The object that makes the Cloud Foundry rest API calls.
clusters(space_guid, short=True, status=None)[source]

Returns a list of clusters in the space_guid

Parameters:
  • space_guid (str) – The space_guid to query for IAE clusters.
  • short (bool, optional) – Whether to return short (brief) output. If false, returns the full Cloud Foundry API output.
  • status (str, optional) – Filter the return only the provided status values.
Returns:

If the short=True, this method returns: [ (cluster_name, cluster_guid, last_operation_state), … ]

The last_operation_status may be:

- in progress
- succeeded
- failed

Return type:

list

create_cluster(service_instance_name, service_plan_guid, space_guid, cluster_creation_parameters)[source]

Create a new IAE Cluster`

Parameters:
  • service_instance_name (str) – The name you would like for the Cluster.
  • service_plan_guid (IAEServicePlanGuid) – The guid representing the type of Cluster to create.
  • space_guid (str) – The space guid where the Cluster will be created.
  • cluster_creation_parameters (dict) –

    The cluster creation parameters. An example cluster creation parameters is shown below:

    {
    “num_compute_nodes”: 1,
    ”hardware_config”: “Standard”,
    ”software_package”: “ae-1.0-spark”,
    ”customization”: [{
    “name”: “action1”,
    ”type”: “bootstrap”,
    ”script”: {
    “source_type”: “http”,
    ”script_path”: “http://path/to/your/script
    },
    ”script_params”: []
    }]
    }
Returns:

The cluster_instance_guid

Return type:

str

More api docs coming soon …

Spark Livy Operations

Not implemented yet.

Spark SSH Operations

Not implemented yet.

Ambari Operations

Not implemented yet.

Cloud Foundry Operations

class ibm_analytics_engine.CloudFoundryAPI(api_key=None, api_key_filename=None, api_endpoint='https://api.ng.bluemix.net', provision_poll_timeout_mins=30)[source]

Utility Classes

IBMServicePlanGuid

class ibm_analytics_engine.IAEServicePlanGuid[source]

Service Plan Guid for IBM Analytics Engine.

LITE = 'acb06a56-fab1-4cb1-a178-c811bc676164'

IBM Analytics Engine ‘Lite’ plan.

STD_HOURLY = '9ba7e645-fce1-46ad-90dc-12655bc45f9e'

IBM Analytics Engine ‘Standard Hourly’ plan.

STD_MONTHLY = 'f801e166-2c73-4189-8ebb-ef7c1b586709'

IBM Analytics Engine ‘Standard Monthly’ plan.