yunify / qingcloud-sdk-go

The official QingCloud SDK for the Go programming language.
Apache License 2.0
29 stars 42 forks source link

Add GetResourceStandards #152

Open wnxn opened 4 years ago

wnxn commented 4 years ago

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 commented 4 years ago