Examples of token()


Examples of com.woorea.openstack.nova.Nova.token()

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

    Nova novaClient = new Nova(ExamplesConfiguration.NOVA_ENDPOINT.concat("/").concat(access.getToken().getTenant().getId()));
    novaClient.token(access.getToken().getId());

    Servers servers = novaClient.servers().list(true).execute();
    if(servers.getList().size() > 0) {

      // Server has to be in activated state.
View Full Code Here

Examples of com.woorea.openstack.nova.Nova.token()

          .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) {
        System.out.println(image);
View Full Code Here

Examples of com.woorea.openstack.nova.Nova.token()

    //use the token in the following requests
    keystone.token(access.getToken().getId());
     
    //NovaClient novaClient = new NovaClient(KeystoneUtils.findEndpointURL(access.getServiceCatalog(), "compute", null, "public"), access.getToken().getId());
    Nova novaClient = new Nova(ExamplesConfiguration.NOVA_ENDPOINT.concat("/").concat(access.getToken().getTenant().getId()));
    novaClient.token(access.getToken().getId());
    //novaClient.enableLogging(Logger.getLogger("nova"), 100 * 1024);
   
    Servers servers = novaClient.servers().list(true).execute();
    for(Server server : servers) {
      System.out.println(server);
View Full Code Here

Examples of com.woorea.openstack.nova.Nova.token()

     
      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) {
        System.out.println(flavor);
View Full Code Here

Examples of javarepl.rendering.ExpressionTemplate.token()

    @Produces(MediaType.APPLICATION_JSON)
    public Model template(@QueryParam("expression") String expr) {
        ExpressionTemplate template = console.template(expr);
        return model()
                .add("template", template.template())
                .add("token", template.token());
    }

    @GET
    @Path("completions")
    @Produces(MediaType.APPLICATION_JSON)
View Full Code Here

Examples of models.User.token()

                flash("success", "No changes to community detected");
                return redirect(routes.Communities.show(id));
            } else {
                editCommunity.id = originalCommunity.id;

                RestResponse restResponse = editCommunity.update(user.token());
                HttpResponse httpResponse = restResponse.httpResponse;
                if(httpResponse.getStatusLine().getStatusCode() == 200) {
                    Logger.info("ok");
                    flash("success", "Community has been updated.");
                    return redirect(routes.Communities.show(id));
View Full Code Here

Examples of models.User.token()

    //TODO index

    public static Result show(Long id) throws IOException {
        User user = new User();
        user = user.getUserFromSession(session());
        RestResponse response = Collection.findByID(id, user.token());
        if(response.httpResponse.getStatusLine().getStatusCode() == 200) {
            return ok(views.html.collection.detail.render(user, (Collection)response.modelObject, "Single Collection", response.jsonString, response.endpoint));
        } else {
            return internalServerError();
        }
View Full Code Here

Examples of org.elasticsearch.script.ScriptParameterParser.token()

                    vars = parser.map();
                } else {
                    throw new QueryParsingException(parseContext.index(), NAMES[0] + " query does not support [" + currentFieldName + "]");
                }
            } else if (token.isValue()) {
                if (!scriptParameterParser.token(currentFieldName, token, parser)) {
                    throw new QueryParsingException(parseContext.index(), NAMES[0] + " query does not support [" + currentFieldName + "]");
                }
            }
        }
View Full Code Here

Examples of org.elasticsearch.search.aggregations.support.ValuesSourceParser.token()

        XContentParser.Token token;
        String currentFieldName = null;
        while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
            if (token == XContentParser.Token.FIELD_NAME) {
                currentFieldName = parser.currentName();
            } else if (vsParser.token(currentFieldName, token, parser)) {
                continue;
            } else if (token.isValue()) {
                if ("interval".equals(currentFieldName)) {
                    interval = parser.longValue();
                } else if ("min_doc_count".equals(currentFieldName) || "minDocCount".equals(currentFieldName)) {
View Full Code Here

Examples of org.glassfish.jersey.oauth1.signature.OAuth1Parameters.token()

            paramCopy.consumerKey(consumerFromProperties.getConsumerKey());
            secretsCopy.consumerSecret(consumerFromProperties.getConsumerSecret());
        }

        if (tokenFromProperties != null) {
            paramCopy.token(tokenFromProperties.getToken());
            secretsCopy.tokenSecret(tokenFromProperties.getAccessTokenSecret());
        }

        if (paramCopy.getTimestamp() == null) {
            paramCopy.setTimestamp();
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.