Examples of tenants()


Examples of com.woorea.openstack.keystone.Keystone.tenants()

  public static final String CEILOMETER_ENDPOINT = "";
 
  public static void main(String[] args) {
    Keystone client = new Keystone(KEYSTONE_ENDPOINT);
    client.setTokenProvider(new OpenStackSimpleTokenProvider("secret0"));
    client.tenants().delete("36c481aec1d54fc49190c92c3ef6840a").execute();
    Tenant tenant = client.tenants().create(new Tenant("new_api")).execute();
    System.out.println(tenant);
    System.out.println(client.tenants().list().execute());
    client.tenants().delete(tenant.getId()).execute();
  }
View Full Code Here

Examples of com.woorea.openstack.keystone.Keystone.tenants()

 
  public static void main(String[] args) {
    Keystone client = new Keystone(KEYSTONE_ENDPOINT);
    client.setTokenProvider(new OpenStackSimpleTokenProvider("secret0"));
    client.tenants().delete("36c481aec1d54fc49190c92c3ef6840a").execute();
    Tenant tenant = client.tenants().create(new Tenant("new_api")).execute();
    System.out.println(tenant);
    System.out.println(client.tenants().list().execute());
    client.tenants().delete(tenant.getId()).execute();
  }
 
View Full Code Here

Examples of com.woorea.openstack.keystone.Keystone.tenants()

    Keystone client = new Keystone(KEYSTONE_ENDPOINT);
    client.setTokenProvider(new OpenStackSimpleTokenProvider("secret0"));
    client.tenants().delete("36c481aec1d54fc49190c92c3ef6840a").execute();
    Tenant tenant = client.tenants().create(new Tenant("new_api")).execute();
    System.out.println(tenant);
    System.out.println(client.tenants().list().execute());
    client.tenants().delete(tenant.getId()).execute();
  }
 
}
View Full Code Here

Examples of com.woorea.openstack.keystone.Keystone.tenants()

    client.setTokenProvider(new OpenStackSimpleTokenProvider("secret0"));
    client.tenants().delete("36c481aec1d54fc49190c92c3ef6840a").execute();
    Tenant tenant = client.tenants().create(new Tenant("new_api")).execute();
    System.out.println(tenant);
    System.out.println(client.tenants().list().execute());
    client.tenants().delete(tenant.getId()).execute();
  }
 
}
View Full Code Here

Examples of com.woorea.openstack.keystone.Keystone.tenants()

        .execute();
    // use the token in the following requests
    keystone.setTokenProvider(new OpenStackSimpleTokenProvider(access
        .getToken().getId()));
    keystone.token(access.getToken().getId());
    Tenants tenants = keystone.tenants().list().execute();
    // try to exchange token using the first tenant

    if (tenants.getList().size() > 0) {
      // access with tenant
      Network network = new Network();
View Full Code Here

Examples of com.woorea.openstack.keystone.Keystone.tenants()

        .execute();

    // use the token in the following requests
    keystone.token(access.getToken().getId());

    Tenants tenants = keystone.tenants().list().execute();

    // try to exchange token using the first tenant
    if (tenants.getList().size() > 0) {

      access = keystone.tokens().authenticate()
View Full Code Here

Examples of com.woorea.openstack.keystone.Keystone.tenants()

    Access access = keystone.tokens().authenticate(new UsernamePassword(ExamplesConfiguration.KEYSTONE_USERNAME, ExamplesConfiguration.KEYSTONE_PASSWORD)).execute();
   
    //use the token in the following requests
    keystone.token(access.getToken().getId());
   
    Tenants tenants = keystone.tenants().list().execute();
   
    //try to exchange token using the first tenant
    if(tenants.getList().size() > 0) {
     
      access = keystone.tokens().authenticate(new TokenAuthentication(access.getToken().getId()))
View Full Code Here

Examples of com.woorea.openstack.keystone.Keystone.tenants()

        .execute();
   
    //use the token in the following requests
    keystone.setTokenProvider(new OpenStackSimpleTokenProvider(access.getToken().getId()));
   
    Tenants tenants = keystone.tenants().list().execute();
   
    //try to exchange token using the first tenant
    if(tenants.getList().size() > 0) {
     
      access = keystone.tokens().authenticate(new TokenAuthentication(access.getToken().getId())).withTenantId(tenants.getList().get(0).getId()).execute();
View Full Code Here

Examples of com.woorea.openstack.keystone.Keystone.tenants()

        new UsernamePassword(ExamplesConfiguration.KEYSTONE_USERNAME, ExamplesConfiguration.KEYSTONE_PASSWORD))
        .execute();
    // use the token in the following requests
    keystone.setTokenProvider(new OpenStackSimpleTokenProvider(access.getToken().getId()));

    Tenants tenants = keystone.tenants().list().execute();
    // try to exchange token using the first tenant
    if (tenants.getList().size() > 0) {
      // access with tenant
      access = keystone.tokens().authenticate(new TokenAuthentication(access.getToken().getId())).withTenantId(tenants.getList().get(0).getId()).execute();
View Full Code Here

Examples of com.woorea.openstack.keystone.Keystone.tenants()

    tenant.setDescription("benn.cs");
    tenant.setEnabled(true);
    //Get the adminURL client and use the token got above
    keystone = new Keystone("http://keystone.x.org/v2.0");
    keystone.token(access.getToken().getId());
    tenant = keystone.tenants().create(tenant).execute();
    System.out.println(tenant);
    keystone.tenants().delete(tenant.getId());
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.