Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GetResourceStandards #152

Open
wnxn opened this issue Mar 30, 2020 · 1 comment
Open

Add GetResourceStandards #152

wnxn opened this issue Mar 30, 2020 · 1 comment

Comments

@wnxn
Copy link

wnxn commented Mar 30, 2020

In QingCloud IaaS, the GetResourceStandards API has been added.
Would you please add this command in QingCloud Go SDK and CLI tool?

=======================================
sending: {
    "action":"GetResourceStandards",
    "resource_types":[
        "a",
        "b",
        "volume"
    ],
    "zone":"dev1"
}
=======================================
recv: {
    "volume":{
        "clone_volume_type_map":{

            "200":[
                100,
                200
            ],
            "1":[
                2
            ],
            "0":[
                0,
                3
            ],
            "3":[
                0,
                3
            ],
            "2":[
                2,
                6
            ],
            "5":[
                5
            ],
            "6":[
                6
            ],
            "100":[
                100,
                200
            ]
        },
        "supported_instance_hypervisors":[
            "kvm"
        ],
        "volume_type_attach_instance_class_map":{

            "200":[
                200,
                300,
                1
            ],
            "10":[
                5
            ],
            "1":[
                0,
                1,
                2,
                3,
                6,
                101,
                201,
                301,
                7
            ],
            "0":[
                0,
                100
            ],
            "3":[
                1,
                200,
                300
            ],
            "2":[
                0,
                1,
                2,
                3,
                6,
                101,
                201,
                301,
                7
            ],
            "5":[
                0,
                1,
                2,
                3,
                6,
                101,
                201,
                301,
                7
            ],
            "6":[
                0,
                1,
                2,
                3,
                6,
                101,
                201,
                301,
                7
            ],
            "100":[
                100,
                0
            ]
        },
        "resource_limits":{

            "min_volume_size":1,
            "max_volume_per_inst":6,
            "min_hcs_volume_size":10,
            "max_hps_volume_size":500000,
            "max_volume_count":10,
            "max_hcs_volume_size":500000,
            "valid_volume_types":[
                0,
                2,
                3,
                6
            ],
            "hc_volume_step":1,
            "min_hc_volume_size":1,
            "max_volume_size":1000,
            "min_hps_volume_size":10,
            "max_hc_volume_size":5000,
            "hcs_volume_step":10,
            "volume_step":10,
            "hps_volume_step":10
        },
        "volume_type_architecture":{

            "200":"hp",
            "10":"bmlocal",
            "1":"hc",
            "0":"hp",
            "3":"hp",
            "2":"hc",
            "5":"neonsan",
            "4":"san",
            "6":"neonsan",
            "100":"hp"
        },
        "multiple_mount_volume_types":[
            1,
            2,
            5,
            6
        ]
    },
    "action":"GetResourceStandardsResponse",
    "ret_code":0
}
@wnxn
Copy link
Author

wnxn commented Mar 31, 2020

  • According to Dawson, this API is developed for developers. Normal users have the authority to call this API. Currently, we don't have document for this API.

  • Request Parameters

  1. resource_types: instance, volume
  2. zone: pek3, sh1a
  • Response

Please reference QingCloud docs.
https://docs.qingcloud.com/product/api/action/volume/create_volumes.html
https://docs.qingcloud.com/product/api/action/instance/run_instances.html

  • Example
  1. Request
{
    "action":"GetResourceStandards",
    "resource_types":[
        "instance",
        "volume"
    ],
    "zone":"dev1"
}
  1. Response
{
  "instance":{
     ...
  },
  "volume":{
     ...
  },
  "action":"GetResourceStandardsResponse",
  "ret_code":0
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant