Open Telekom Cloud for Business Customers

How OpenStack4j works with Open Telekom Cloud

Open Telekom Cloud provides native OpenStack so it is compatible with most of the community's SDK and toolchain. When it comes to java, OpenStack4j is the most active and mature OpenStack SDK tool in the community. 

This document gives you an outline of how to use OpenStack4j on Open Telekom Cloud.

Compatibility of Open Telekom Cloud & OpenStack4j

Open Telekom Cloud is compatible with most of the service APIs that OpenStack4j supports. The following table lists the compatibility between OpenStack4j 3.0.4-SNAPSHOT and Open Telekom Cloud native OpenStack APIs.

OpenStack ServiceOpenStack API VersionOpen Telekom Cloud Service

Obtaining OpenStack4j

At the time of writing, the stable version of openstack4j is 3.0.3. In case you want to make use the Glance v2 API, you also need the 3.0.4-SNAPSHOT.

Follow the instructions given on the openstack4j’s github page ( and activate the 3.0.4-SNAPSHOT version. Make sure to add the Sonatype snapshot repo to the configuration file of your favorite build tool.

Get OpenStack4j authenticated by IAM

Identify Access Management (IAM) is a service that provides API client authentication. After being authenticated, you can manage the IAM, ECS, EVS, VPC, and RTS services.

The following code shows how to use openstack4j’s fluent API for authentication:

Authentification with API of OpenStack4j

Create a VPC and a Subnet with OpenStack4j

The Virtual Private Cloud (VPC) service enables you to provision logically isolated, configurable, and manageable virtual networks for Elastic Cloud Servers (ECSs), improving security of resources in the cloud and simplifying network deployment.

A typical VPC is composed of the router, network, and subnet, as shown in the following figure:

Composition of a typical VPC

OpenStack4j allows you to create a subnet on Open Telekom Cloud. The detailed steps are as follows:

  1. Create a router.
  2. Create a network.
  3. Create a subnet.
  4. Connect the subnet to the router.

The following code shows the network creation process, and you can modify these configurations as required. After you have created the router, network, and subnet and connected the subnet to the router, you can see a new VPC created from the console.

Network creation process

Create ECS Server with OpenStack4j

The following code could be used to create a VM. WaitForServerStatus allows you to continuously query the VM status until the VM is in the specified status or the query times out. In the following example, the timeout interval is set to 10 minutes.

Practice Reference of Open Telekom Cloud & OpenStack4j

Practice reference of Open Telekom Cloud & OpenStack4j

A variety of reference documents for Open Telekom Cloud and OpenStack is provided on Open Telekom Cloud's help center. The complete instructional documentation for OpenStack4j that works with Open Telekom Cloud is also available, including:

  • Open Telekom Cloud API Overview
  • OpenStack4j Demo Code with Open Telekom Cloud
  • OpenStack4j Methods Supported by Open Telekom Cloud

Book now and claim starting credit of EUR 250* (code: 4UOTC250)

24/7 Service
Take advantage of our consulting services!

Our experts will be happy to help you.

We will answer any questions you have regarding testing, booking and usage – free and tailored to your needs. Try it out today!

Hotline: 24 hours a day, seven days a week 

0800 33 04477 from Germany
+800 33 04 47 70 from abroad

* Voucher can be redeemed until December 31, 2021. Please contact us when using the voucher for booking. The discount is only valid for customers with a billing address in Germany and expires two months after conclusion of the contract. The credit is deducted according to the valid list prices as per the service description. Payment of the credit in cash is excluded.

  • The Open Telekom Cloud Community

    This is where users, developers and product owners meet to help each other, share knowledge and discuss.

    Discover now

  • Telefon

    Free expert hotline

    Our certified cloud experts provide you with personal service free of charge.

    0800 33 04477 (from Germany)

    +800 33 04 47 70 (from abroad)

    24 hours a day, seven days a week

  • E-Mail

    Our customer service is available free of charge via E-Mail

    Write an E-Mail