Closed wnxn closed 5 years ago
We can get the zone ID of a instance through describe-instances command of QingCloud CLI.
describe-instances
# qingcloud iaas describe-instances -i i-bgvzf0a2 -z ap2a -V 1 { "action": "DescribeInstancesResponse", "instance_set": [ { "logic_volumes": [ { "device": "vda2", "volume_id": "os" }, { "device": "vda2", "volume_id": "os" } ], "vxnets": [ { "ipv6_address": "", "vxnet_type": 1, "vxnet_id": "vxnet-dh0mgel", "vxnet_name": "k8s cluster vxnet", "role": 1, "private_ip": "192.168.0.21", "nic_id": "52:54:22:2b:f5:a2" } ], "keypair_ids": [], "fence": null, "extra": { "iops": 900, "nic_mqueue": 0, "read_throughput": 0, "ivshmem": [], "gpu_pci_nums": "", "cpu_max": 0, "cpu_model": "", "bandwidth": 800, "mem_max": 0, "throughput": 44544, "read_iops": 0, "hypervisor": "kvm", "gpu": 0, "os_disk_size": 50, "gpu_class": 0, "features": 4 }, "image": { "ui_type": "tui", "processor_type": "64bit", "image_id": "bionic1x64c", "features_supported": { "set_keypair": 1, "disk_hot_plug": 1, "user_data": 1, "set_pwd": 1, "join_multiple_managed_vxnets": 0, "root_fs_rw_online": 1, "nic_hot_plug": 1, "root_fs_rw_offline": 1, "reset_fstab": 1 }, "provider": "system", "image_name": "Ubuntu Server 18.04.1 LTS 64bit", "platform": "linux", "os_family": "ubuntu", "image_size": 20, "features": 0 }, "graphics_passwd": "3F25RUDMrdf0y9LTGskK2em5FY5WtDYK", "dns_aliases": [], "alarm_status": "", "owner": "usr-XqlPq3qV", "memory_current": 4096, "vcpus_current": 4, "instance_name": "qke-image", "sub_code": 0, "graphics_protocol": "vnc", "platform": "linux", "instance_class": 101, "status_time": "2019-07-23T02:21:49Z", "status": "stopped", "description": null, "cpu_topology": "", "tags": [], "transition_status": "", "eips": [], "repl": "rpp-00000002", "volume_ids": [], "zone_id": "ap2a", "lastest_snapshot_time": null, "instance_group": null, "instance_id": "i-bgvzf0a2", "instance_type": "s1.xlarge.r1", "create_time": "2019-07-08T09:39:57Z", "volumes": [], "resource_project_info": [] } ], "ret_code": 0, "total_count": 1 }
But QingCloud Go SDK does not support get instance's zone ID in DescribeInstancesOutput.
https://github.com/yunify/qingcloud-sdk-go/blob/ac222d4999629785bf5ca28344fadd65d9d5efb3/service/types.go#L997-L1027
For describe volume output, we also need to get the zone ID info. Would you please support it?
describe volume in QingCloud CLI
# qingcloud iaas describe-volumes -v vol-iyvr83mk -z pek3c { "action": "DescribeVolumesResponse", "total_count": 1, "volume_set": [ { "read_throughput": 0, "extra": null, "instances": [ { "instance_id": "", "instance_name": "" } ], "iops": 2300, "owner": "usr-XqlPq3qV", "place_group_id": "plg-00000201", "size": 10, "sub_code": 0, "instance": { "instance_id": "", "instance_name": "" }, "status_time": "2019-07-23T03:19:40Z", "resources": [ { "device": "", "resource_name": "", "resource_type": "instance", "resource_id": "" } ], "status": "available", "description": null, "tags": [], "transition_status": "", "repl": "rpp-00000000", "volume_id": "vol-iyvr83mk", "zone_id": "pek3c", "lastest_snapshot_time": null, "volume_type": 200, "create_time": "2019-07-23T03:19:40Z", "throughput": 136192, "read_iops": 0, "volume_name": "", "resource_project_info": [] } ], "ret_code": 0 }
In QingCloud Go SDK https://github.com/yunify/qingcloud-sdk-go/blob/ac222d4999629785bf5ca28344fadd65d9d5efb3/service/types.go#L2998-L3020
We can get the zone ID of a instance through
describe-instances
command of QingCloud CLI.But QingCloud Go SDK does not support get instance's zone ID in DescribeInstancesOutput.
https://github.com/yunify/qingcloud-sdk-go/blob/ac222d4999629785bf5ca28344fadd65d9d5efb3/service/types.go#L997-L1027
For describe volume output, we also need to get the zone ID info. Would you please support it?
describe volume in QingCloud CLI
In QingCloud Go SDK https://github.com/yunify/qingcloud-sdk-go/blob/ac222d4999629785bf5ca28344fadd65d9d5efb3/service/types.go#L2998-L3020