Skip to content

dirigiblelabs/client-openstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Open Stack API Client for Eclipse Dirigible

Eclipse License GitHub contributors

Overview

  1. Set-up:
  • Extension
    {
      'module': 'test/extensions/ServiceRegistryProvider.js',
      'extensionPoint': 'openstack-ServiceRegistryProvider',
      'description': 'Service Registry Provider'
    }
  • Service Registry Provider
    // The Keystone service endpoint
    exports.getIdentityService = function() {
      return 'https://<host>:<port>';
    };
    
    // The Nova service endpoint
    exports.getComputeService = function() {
      return 'https://<host>:<port>';
    };
    
    // The Cinder service
    exports.getVolumeService = function() {
      return 'https://<host>:<port>';
    };
    
    // The Neutron service endpont
    exports.getNetworkService = function() {
      return 'https://<host>:<port>';
    };
  1. Usage:
var response = require('http/v3/response');
var Auth = require('openstack/identity/Auth');
var Servers = require('openstack/compute/Servers');

var domain = '<Domain-Name>';
var user = '<User-Name>';
var password = '<Password>';
var projectId = '<Project-Id>';

var auth = new Auth();
var token = auth.authenticate(domain, user, password, projectId);

var serversApi = new Servers(token);
var servers = serversApi.list();
response.println(JSON.stringify(servers));

License

This project is copyrighted by SAP SE and is available under the Eclipse Public License v 1.0. See LICENSE and NOTICE.txt for further details.