OpenStack4j > Documentation / What is OpenStack4j?

What is OpenStack4j?

OpenStack4j is an open source library that helps you manage an OpenStack deployment. It is a fluent based API giving you full control over the various OpenStack services.

OpenStack4j is broken out into several major API abstractions as Java libraries.

Identity V2
The Identity (Keystone) V2 service provides the central directory of users, tenants, service endpoints and authorization. This API is responsible for authenticating and providing access to all the other OpenStack services. The API also enables administrators to configure centralized access policies, users and tenants.
Identity V3
The Identity (Keystone) V3 service provides the central directory of users, groups, regions, services and endpoints. This API is responsible for authenticating and providing access to all the other OpenStack services. The API also enables administrators to configure centralized access policies, users, domains and projects.
Compute
The Compute (Nova) service provides management to Servers (running virtual machines), VM Management, Flavors and diagnostics. The API streamlines day to day management tasks and makes managing your cloud straight forward with the fluent design.
Image
The Image (Glance) service provides discovery, registration and delivery services for disk and server images. Stored images can be used as a template for quickly booting new running instances via the Compute service.
Network
The Network (Neutron) service provides "network connectivity as a service" between interface devices managed by other OpenStack service, mainly Nova. The API allows users to create their own networks and then attach interfaces to them. The OpenStack4j implementation supports Routers, Ports, Subnets and Interface management.
Block Storage
The Block Storage (Cinder) Service is a block-level storage solution that enables you to mount drives to scale storage. OpenStack4j implementation fully supports all major operations.
Object Storage
Object Storage (Swift) provides persistant object storage for files and media which can be shared globally or kept private for adhoc storage.
Telemetry
Telemetry (Ceilometer) delivers metering and statistic measurements against OpenStack core components. This is ideal for customer billing, account and reporting of resources. OpenStack4j implementation fully supports all major operations.
Orchestration
Orchestration (Heat) is a service that you can use to orchestrate multiple composite cloud applications. Using OpenStack4j you can control Stacks, Templates, Resources and Events.
DNS
DNS (Designate) is a multi-tenant DNSaaS service for OpenStack. Using OpenStack4j you can control Zones and Recordsets.

Why should I use OpenStack4j?

OpenStack is a large system to manage. We have made it easy by providing a simplistic fluent API and intelligent error handling. Some of the areas we have focused on to make your experience with OpenStack easy with less boiler-plate code are:

Expected Results
All API calls that return a single object will be null if no data is found. Calls that return a List/Collection will return an empty list if not found.
Fluent Interface
All calls are fluent by nature. To shorten fluent calls an interface can be assigned during the chain to shorten the calls.
Concrete API
All APIs are interface defined as well as corresponding models and builders. No need to ever refer to the implementation. Implementations are always defined within an "internal" package.
Deployment Tested
All APIs have been tested and are used in various OpenStack environments. This includes small and large multi-node deployments. The main test focus has been around Icehouse, Havana and Grizzly releases of OpenStack.
Exception Handling
Checked exceptions will never be thrown for 404 (Not Found) See above for standards. Based on the OpenStack specifications of errors all exceptions extend a common unchecked ResponseException. Server and Client exceptions also have an enumerated type fully classifying the exact reason for failure allowing your application to report appropriately.
All Exceptions are unchecked and are broken up into 5 categories (All extend ResponseException):
  • ServerResponseException - thrown if error codes are between 500 and 600.
  • ClientResponseException - thrown if error codes are between 400 and 499 excluding 404.
  • AuthenticationException - Credentials or initial login failure
  • ConnectionException - I/O or HTTP based communication failure
  • ResponseException - Base exception is for all other failures (communication).