Examples of Tenants


Examples of com.emc.vipr.client.core.Tenants

    public AutoTieringPolicies autoTierPolicies() {
        return new AutoTieringPolicies(this, client);
    }

    public Tenants tenants() {
        return new Tenants(this, client);
    }
View Full Code Here

Examples of com.emc.vipr.client.core.Tenants

    public AutoTieringPolicies autoTierPolicies() {
        return new AutoTieringPolicies(this, client);
    }

    public Tenants tenants() {
        return new Tenants(this, client);
    }
View Full Code Here

Examples of com.woorea.openstack.keystone.model.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();
      access = keystone
          .tokens()
          .authenticate(
View Full Code Here

Examples of com.woorea.openstack.keystone.model.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()
          .withToken(access.getToken().getId())
          .withTenantId(tenants.getList().get(0).getId()).execute();

      // NovaClient novaClient = new
      // NovaClient(KeystoneUtils.findEndpointURL(access.getServiceCatalog(),
      // "compute", null, "public"), access.getToken().getId());
      Nova nova = new Nova(ExamplesConfiguration.NOVA_ENDPOINT.concat(tenants
          .getList().get(0).getId()));
      nova.setTokenProvider(new OpenStackSimpleTokenProvider(access.getToken()
          .getId()));
      // novaClient.enableLogging(Logger.getLogger("nova"), 100 * 1024);
      // create a new keypair
View Full Code Here

Examples of com.woorea.openstack.keystone.model.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()))
          .withTenantId(tenants.getList().get(0).getId())
          .execute();
     
      //NovaClient novaClient = new NovaClient(KeystoneUtils.findEndpointURL(access.getServiceCatalog(), "compute", null, "public"), access.getToken().getId());
      Nova novaClient = new Nova(ExamplesConfiguration.NOVA_ENDPOINT.concat("/").concat(tenants.getList().get(0).getId()));
      novaClient.token(access.getToken().getId());
      //novaClient.enableLogging(Logger.getLogger("nova"), 100 * 1024);
     
      Images images = novaClient.images().list(true).execute();
      for(Image image : images) {
View Full Code Here

Examples of com.woorea.openstack.keystone.model.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();

      Quantum quantumClient = new Quantum(KeystoneUtils.findEndpointURL(access.getServiceCatalog(), "network",  null, "public"));
      quantumClient.setTokenProvider(new OpenStackSimpleTokenProvider(access.getToken().getId()));

      Network networkQuery = new Network();
View Full Code Here

Examples of com.woorea.openstack.keystone.model.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();
     
      Swift swift = new Swift(KeystoneUtils.findEndpointURL(access.getServiceCatalog(), "object-store", null, "public"));
      swift.setTokenProvider(new OpenStackSimpleTokenProvider(access.getToken().getId()));
   
      //swiftClient.execute(new DeleteContainer("navidad2"));
View Full Code Here

Examples of com.woorea.openstack.keystone.model.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();

      Quantum quantum = new Quantum(KeystoneUtils.findEndpointURL(access.getServiceCatalog(), "network",  null, "public"));
      quantum.setTokenProvider(new OpenStackSimpleTokenProvider(access.getToken().getId()));

      Networks networks = quantum.networks().list().execute();
View Full Code Here

Examples of com.woorea.openstack.keystone.model.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(new TokenAuthentication(access.getToken().getId())).withTenantId(tenants.getList().get(0).getId()).execute();
     
      //NovaClient novaClient = new NovaClient(KeystoneUtils.findEndpointURL(access.getServiceCatalog(), "compute", null, "public"), access.getToken().getId());
      Nova novaClient = new Nova(ExamplesConfiguration.NOVA_ENDPOINT.concat("/").concat(tenants.getList().get(0).getId()));
      novaClient.token(access.getToken().getId());
      //novaClient.enableLogging(Logger.getLogger("nova"), 100 * 1024);
     
      Flavors flavors = novaClient.flavors().list(true).execute();
      for(Flavor flavor : flavors) {
View Full Code Here

Examples of com.woorea.openstack.keystone.model.Tenants

  }

  @Override
  public void execute(Keystone keystone, CommandLine args) {
   
    final Tenants tenants = keystone.tenants().list().execute();
   
    Table t = new Table(new TableModel<Tenant>(tenants.getList()) {

      @Override
      public Column[] getHeaders() {
        return new Column[]{
          new Column("id", 32, Column.ALIGN_LEFT),
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.