Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b8d15cbd50
Fetching contributors…

Cannot retrieve contributors at this time

59 lines (44 sloc) 1.946 kb

SUSE Studio Java Client SDK

This is a Java based library for interacting with the SUSE Studio image store and appliances toolkit. The library is supposed to enable developers to easily implement client applications for SUSE Studio in Java, even for mobile platforms like Android. The implementation however is at the moment still a work in progress and only the most basic parts of the REST API are currently covered.

Example Usage

General Information

// Initialize
SUSEStudio studio = new SUSEStudio("username", "password");
System.out.println("Version: " + studio.getApiVersion());

// Get user details
User user = studio.getUser();
System.out.println("Name: " + user.getUsername());

// Disk quota
DiskQuota dq = user.getDiskQuota();
System.out.println("DiskQuota: " + dq.getUsed() + " of " + dq.getAvailable());

Appliances

// Get the appliances
List<Appliance> appliances = studio.getAppliances();
for (Appliance a : appliances) {
    System.out.println("Name: " + a.getName());
    System.out.println("UUID: " + a.getUuid());
    System.out.println("Basesystem: " + a.getBasesystem());
    System.out.println("Type: " + a.getType());
    System.out.println("Edit URL: " + a.getEditUrl());
    System.out.println("Raw Size: " + a.getEstimatedRawSize());

    // List the builds
    for(Build b : a.getBuilds()) {
        System.out.println("Build ID: " + b.getId());
        System.out.println("Download URL: " + b.getDownloadUrl());
    }
}

Gallery

// Get popular appliances
Gallery gallery = studio.getGallery(SUSEStudio.GALLERY_POPULAR);
GalleryAppliances appliances = gallery.getAppliances();
System.out.println(appliances.getCount());

Build From Sources

Calling ‘ant’ on the commandline will build the library jarfile from sources and put it in a folder called ‘dist’.

License

See the LICENSE file.

Jump to Line
Something went wrong with that request. Please try again.