zoukankan      html  css  js  c++  java
  • LR开发接口脚本

        char token_id,tenant_id;
        web_add_header("Accept","application/json");
        web_add_header("Content-Type","application/json");
        web_add_header("User-Agent","python-novaclient");

        web_reg_save_param("token_id",
            "LB="id": "",
            "RB=", "tenant"",
            LAST);

        web_reg_save_param("tenant_id",
            "LB="id": "",
            "RB="",
            "Ord=2",
            LAST);

        web_custom_request("get_token_id",
            "URL=http://25.0.0.2:5000/v2.0/tokens",
            "Method=POST",
            "Resource=0",
            "Referer=",
            "Mode=HTTP",
            "Body={"auth": {"tenantName":"luolijun","passwordCredentials":{"username":"luolijun","password":"test1234"}}}",
            LAST);

        web_add_header("User-Agent","ceilometerclient.openstack.common.apiclient");
        web_add_header("X-Auth-Token","{token_id}");

        web_custom_request("select_cpu_id",
            "URL=http://25.0.0.2:8777/v2/meters/cpu_util?q.field=project_id&q.op=eq&q.type=&q.value={tenant_id}&limit=1",
            "Method=GET",
            "Resource=0",
            "Referer=",
            "Mode=HTTP",

  • 相关阅读:
    hdu 3018
    poj 1833 排列
    poj 1256 Anagram
    CF 548B Mike and Fun
    CF 548A
    【冰茶几专题】F
    【冰茶几专题】C
    535 C.Tavas and karafs
    [WA]cf 534 D. Handshakes
    cf 534C. Polycarpus' Dice
  • 原文地址:https://www.cnblogs.com/wensiyang0916/p/7018051.html
Copyright © 2011-2022 走看看