feat:vm images list

Signed-off-by: devad <cossjie@gmail.com>
This commit is contained in:
devad 2022-10-25 10:05:19 +08:00
parent b67aab76d8
commit 06451fb456
20 changed files with 822 additions and 195 deletions

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.26.0 // protoc-gen-go v1.28.0
// protoc (unknown) // protoc (unknown)
// source: idl/pod.proto // source: idl/pod.proto
@ -86,9 +86,9 @@ type Region struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
// id //id
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// name //name
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
} }
@ -147,7 +147,7 @@ type PodInstance struct {
Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pod.CloudProvider" json:"provider,omitempty"` Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pod.CloudProvider" json:"provider,omitempty"`
// 账号名称 // 账号名称
AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
// pcm id //pcm id
PcmId string `protobuf:"bytes,3,opt,name=pcm_id,json=pcmId,proto3" json:"pcm_id,omitempty"` PcmId string `protobuf:"bytes,3,opt,name=pcm_id,json=pcmId,proto3" json:"pcm_id,omitempty"`
// 实例id // 实例id
PodId string `protobuf:"bytes,4,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` PodId string `protobuf:"bytes,4,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
@ -165,13 +165,13 @@ type PodInstance struct {
CpuPod string `protobuf:"bytes,10,opt,name=cpu_pod,json=cpuPod,proto3" json:"cpu_pod,omitempty"` CpuPod string `protobuf:"bytes,10,opt,name=cpu_pod,json=cpuPod,proto3" json:"cpu_pod,omitempty"`
// 内存MB // 内存MB
MemoryPod string `protobuf:"bytes,11,opt,name=memory_pod,json=memoryPod,proto3" json:"memory_pod,omitempty"` MemoryPod string `protobuf:"bytes,11,opt,name=memory_pod,json=memoryPod,proto3" json:"memory_pod,omitempty"`
// 安全组ID 对应腾讯 SecurityGroupIds(腾讯必需) //安全组ID 对应腾讯 SecurityGroupIds(腾讯必需)
SecurityGroupId string `protobuf:"bytes,12,opt,name=security_group_id,json=securityGroupId,proto3" json:"security_group_id,omitempty"` SecurityGroupId string `protobuf:"bytes,12,opt,name=security_group_id,json=securityGroupId,proto3" json:"security_group_id,omitempty"`
// 子网ID 对应腾讯 SubnetId(腾讯必需) //子网ID 对应腾讯 SubnetId(腾讯必需)
SubnetId string `protobuf:"bytes,13,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` SubnetId string `protobuf:"bytes,13,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"`
// VPC ID 对应腾讯 VpcId(腾讯必需) //VPC ID 对应腾讯 VpcId(腾讯必需)
VpcId string `protobuf:"bytes,14,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` VpcId string `protobuf:"bytes,14,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"`
// 名空间 //名空间
Namespace string `protobuf:"bytes,15,opt,name=namespace,proto3" json:"namespace,omitempty"` Namespace string `protobuf:"bytes,15,opt,name=namespace,proto3" json:"namespace,omitempty"`
// 实例状态 // 实例状态
Status string `protobuf:"bytes,16,opt,name=status,proto3" json:"status,omitempty"` Status string `protobuf:"bytes,16,opt,name=status,proto3" json:"status,omitempty"`
@ -449,15 +449,15 @@ type CreatePodReq struct {
CpuPod string `protobuf:"bytes,8,opt,name=cpu_pod,json=cpuPod,proto3" json:"cpu_pod,omitempty"` CpuPod string `protobuf:"bytes,8,opt,name=cpu_pod,json=cpuPod,proto3" json:"cpu_pod,omitempty"`
// 内存MB // 内存MB
MemoryPod string `protobuf:"bytes,9,opt,name=memory_pod,json=memoryPod,proto3" json:"memory_pod,omitempty"` MemoryPod string `protobuf:"bytes,9,opt,name=memory_pod,json=memoryPod,proto3" json:"memory_pod,omitempty"`
// 安全组ID 对应腾讯 SecurityGroupIds(腾讯必需) //安全组ID 对应腾讯 SecurityGroupIds(腾讯必需)
SecurityGroupId string `protobuf:"bytes,10,opt,name=security_group_id,json=securityGroupId,proto3" json:"security_group_id,omitempty"` SecurityGroupId string `protobuf:"bytes,10,opt,name=security_group_id,json=securityGroupId,proto3" json:"security_group_id,omitempty"`
// 子网ID 对应腾讯 SubnetId(腾讯必需) //子网ID 对应腾讯 SubnetId(腾讯必需)
SubnetId string `protobuf:"bytes,11,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` SubnetId string `protobuf:"bytes,11,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"`
// VPC ID 对应腾讯 VpcId(腾讯必需) //VPC ID 对应腾讯 VpcId(腾讯必需)
VpcId string `protobuf:"bytes,12,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` VpcId string `protobuf:"bytes,12,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"`
// 名空间 //名空间
Namespace string `protobuf:"bytes,13,opt,name=namespace,proto3" json:"namespace,omitempty"` Namespace string `protobuf:"bytes,13,opt,name=namespace,proto3" json:"namespace,omitempty"`
// 请求源,如果是从pcm sdk 过来的则单独生成tenanters实体 //请求源,如果是从pcm sdk 过来的则单独生成tenanters实体
RequestSource string `protobuf:"bytes,14,opt,name=requestSource,proto3" json:"requestSource,omitempty"` RequestSource string `protobuf:"bytes,14,opt,name=requestSource,proto3" json:"requestSource,omitempty"`
} }
@ -681,11 +681,11 @@ type DeletePodReq struct {
PodId string `protobuf:"bytes,4,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` PodId string `protobuf:"bytes,4,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
// podName // podName
PodName string `protobuf:"bytes,5,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` PodName string `protobuf:"bytes,5,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"`
// namespace //namespace
Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"` Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"`
// 地域,数据中心 // 地域,数据中心
RegionId int32 `protobuf:"varint,7,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` RegionId int32 `protobuf:"varint,7,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
// 请求源,如果是从pcm sdk 过来的则单独生成tenanters实体 //请求源,如果是从pcm sdk 过来的则单独生成tenanters实体
RequestSource string `protobuf:"bytes,8,opt,name=requestSource,proto3" json:"requestSource,omitempty"` RequestSource string `protobuf:"bytes,8,opt,name=requestSource,proto3" json:"requestSource,omitempty"`
} }
@ -867,7 +867,7 @@ type UpdatePodReq struct {
PodId string `protobuf:"bytes,4,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"` PodId string `protobuf:"bytes,4,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
// podName // podName
PodName string `protobuf:"bytes,5,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` PodName string `protobuf:"bytes,5,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"`
// namespace //namespace
Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"` Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"`
// 地域,数据中心 // 地域,数据中心
RegionId int32 `protobuf:"varint,7,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` RegionId int32 `protobuf:"varint,7,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
@ -883,7 +883,7 @@ type UpdatePodReq struct {
RestartPolicy string `protobuf:"bytes,12,opt,name=restart_policy,json=restartPolicy,proto3" json:"restart_policy,omitempty"` RestartPolicy string `protobuf:"bytes,12,opt,name=restart_policy,json=restartPolicy,proto3" json:"restart_policy,omitempty"`
// labels // labels
Labels string `protobuf:"bytes,13,opt,name=labels,proto3" json:"labels,omitempty"` Labels string `protobuf:"bytes,13,opt,name=labels,proto3" json:"labels,omitempty"`
// 请求源,如果是从pcm sdk 过来的则单独生成tenanters实体 //请求源,如果是从pcm sdk 过来的则单独生成tenanters实体
RequestSource string `protobuf:"bytes,14,opt,name=requestSource,proto3" json:"requestSource,omitempty"` RequestSource string `protobuf:"bytes,14,opt,name=requestSource,proto3" json:"requestSource,omitempty"`
} }
@ -1312,9 +1312,9 @@ type ListPodReq struct {
// cloud name // cloud name
Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pod.CloudProvider" json:"provider,omitempty"` Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pod.CloudProvider" json:"provider,omitempty"`
// 命名空间 //命名空间
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
// 请求源,如果是从pcm sdk 过来的则单独生成tenanters实体 //请求源,如果是从pcm sdk 过来的则单独生成tenanters实体
RequestSource string `protobuf:"bytes,3,opt,name=requestSource,proto3" json:"requestSource,omitempty"` RequestSource string `protobuf:"bytes,3,opt,name=requestSource,proto3" json:"requestSource,omitempty"`
} }

View File

@ -34,7 +34,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"provider": { "provider": {
"$ref": "#/definitions/podCloudProvider" "$ref": "#/definitions/podCloudProvider",
"title": "云类型"
}, },
"accountName": { "accountName": {
"type": "string", "type": "string",
@ -199,7 +200,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"provider": { "provider": {
"$ref": "#/definitions/podCloudProvider" "$ref": "#/definitions/podCloudProvider",
"title": "云类型"
}, },
"accountName": { "accountName": {
"type": "string", "type": "string",
@ -288,11 +290,14 @@
"protobufAny": { "protobufAny": {
"type": "object", "type": "object",
"properties": { "properties": {
"@type": { "typeUrl": {
"type": "string" "type": "string"
}
}, },
"additionalProperties": {} "value": {
"type": "string",
"format": "byte"
}
}
}, },
"rpcStatus": { "rpcStatus": {
"type": "object", "type": "object",

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.26.0 // protoc-gen-go v1.28.0
// protoc (unknown) // protoc (unknown)
// source: idl/slurm.proto // source: idl/slurm.proto

View File

@ -20,11 +20,14 @@
"protobufAny": { "protobufAny": {
"type": "object", "type": "object",
"properties": { "properties": {
"@type": { "typeUrl": {
"type": "string" "type": "string"
}
}, },
"additionalProperties": {} "value": {
"type": "string",
"format": "byte"
}
}
}, },
"rpcStatus": { "rpcStatus": {
"type": "object", "type": "object",

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.26.0 // protoc-gen-go v1.28.0
// protoc (unknown) // protoc (unknown)
// source: idl/ecs.proto // source: idl/ecs.proto
@ -85,9 +85,9 @@ func (CloudProvider) EnumDescriptor() ([]byte, []int) {
type InternetChargeType int32 type InternetChargeType int32
const ( const (
// 按固定带宽计费。 //按固定带宽计费。
InternetChargeType_PayByBandwidth InternetChargeType = 0 InternetChargeType_PayByBandwidth InternetChargeType = 0
// (默认):按使用流量计费 //(默认):按使用流量计费
InternetChargeType_PayByTraffic InternetChargeType = 1 InternetChargeType_PayByTraffic InternetChargeType = 1
) )
@ -134,11 +134,11 @@ func (InternetChargeType) EnumDescriptor() ([]byte, []int) {
type ActionType int32 type ActionType int32
const ( const (
// 启动 //启动
ActionType_start ActionType = 0 ActionType_start ActionType = 0
// 停止 //停止
ActionType_stop ActionType = 1 ActionType_stop ActionType = 1
// 重启 //重启
ActionType_restart ActionType = 2 ActionType_restart ActionType = 2
) )
@ -224,9 +224,9 @@ type EcsInstance struct {
// 收费类型 // 收费类型
InstanceChargeType string `protobuf:"bytes,17,opt,name=instance_charge_type,json=instanceChargeType,proto3" json:"instance_charge_type,omitempty"` InstanceChargeType string `protobuf:"bytes,17,opt,name=instance_charge_type,json=instanceChargeType,proto3" json:"instance_charge_type,omitempty"`
// -----------harvester--------- // -----------harvester---------
// 虚拟机所在的节点 //虚拟机所在的节点
Node string `protobuf:"bytes,18,opt,name=node,proto3" json:"node,omitempty"` Node string `protobuf:"bytes,18,opt,name=node,proto3" json:"node,omitempty"`
// namespace //namespace
Namespace string `protobuf:"bytes,20,opt,name=namespace,proto3" json:"namespace,omitempty"` Namespace string `protobuf:"bytes,20,opt,name=namespace,proto3" json:"namespace,omitempty"`
} }
@ -513,76 +513,76 @@ type CreateEcsReq struct {
AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
// 地域,数据中心 // 地域,数据中心
RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
// 镜像id //镜像id
ImageId string `protobuf:"bytes,4,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"` ImageId string `protobuf:"bytes,4,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"`
// 实例的付费方式 // 实例的付费方式
InstanceChargeType string `protobuf:"bytes,5,opt,name=instance_charge_type,json=instanceChargeType,proto3" json:"instance_charge_type,omitempty"` InstanceChargeType string `protobuf:"bytes,5,opt,name=instance_charge_type,json=instanceChargeType,proto3" json:"instance_charge_type,omitempty"`
// 实例的资源规格 //实例的资源规格
InstanceType string `protobuf:"bytes,6,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"` InstanceType string `protobuf:"bytes,6,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"`
// 安全组id // 安全组id
SecurityGroupId string `protobuf:"bytes,7,opt,name=security_group_id,json=securityGroupId,proto3" json:"security_group_id,omitempty"` SecurityGroupId string `protobuf:"bytes,7,opt,name=security_group_id,json=securityGroupId,proto3" json:"security_group_id,omitempty"`
// 交换机id //交换机id
VSwitchId string `protobuf:"bytes,8,opt,name=v_switch_id,json=vSwitchId,proto3" json:"v_switch_id,omitempty"` VSwitchId string `protobuf:"bytes,8,opt,name=v_switch_id,json=vSwitchId,proto3" json:"v_switch_id,omitempty"`
// 实例名称 //实例名称
InstanceName string `protobuf:"bytes,9,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` InstanceName string `protobuf:"bytes,9,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"`
// 实例描述 //实例描述
Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"` Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"`
// 可用区id //可用区id
ZoneId string `protobuf:"bytes,11,opt,name=zone_id,json=zoneId,proto3" json:"zone_id,omitempty"` ZoneId string `protobuf:"bytes,11,opt,name=zone_id,json=zoneId,proto3" json:"zone_id,omitempty"`
// 系统磁盘 //系统磁盘
SystemDisk *SystemDisk `protobuf:"bytes,12,opt,name=system_disk,json=systemDisk,proto3" json:"system_disk,omitempty"` SystemDisk *SystemDisk `protobuf:"bytes,12,opt,name=system_disk,json=systemDisk,proto3" json:"system_disk,omitempty"`
// 创建ECS的数量 //创建ECS的数量
Amount int32 `protobuf:"varint,13,opt,name=amount,proto3" json:"amount,omitempty"` Amount int32 `protobuf:"varint,13,opt,name=amount,proto3" json:"amount,omitempty"`
// 预检此次请求,为true时请求通过则返回 Request validation has been passed with DryRun flag set //预检此次请求,为true时请求通过则返回 Request validation has been passed with DryRun flag set
DryRun string `protobuf:"bytes,14,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` DryRun string `protobuf:"bytes,14,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"`
// 数据盘N的云盘种类。取值范围cloud_efficiency高效云盘cloud_ssdSSD云盘cloud_essdESSD云盘cloud普通云盘。 //数据盘N的云盘种类。取值范围cloud_efficiency高效云盘cloud_ssdSSD云盘cloud_essdESSD云盘cloud普通云盘。
Category string `protobuf:"bytes,15,opt,name=category,proto3" json:"category,omitempty"` Category string `protobuf:"bytes,15,opt,name=category,proto3" json:"category,omitempty"`
// 网络计费类型。取值范围PayByBandwidth按固定带宽计费。PayByTraffic默认按使用流量计费 //网络计费类型。取值范围PayByBandwidth按固定带宽计费。PayByTraffic默认按使用流量计费
InternetChargeType InternetChargeType `protobuf:"varint,16,opt,name=internet_charge_type,json=internetChargeType,proto3,enum=ecs.InternetChargeType" json:"internet_charge_type,omitempty"` InternetChargeType InternetChargeType `protobuf:"varint,16,opt,name=internet_charge_type,json=internetChargeType,proto3,enum=ecs.InternetChargeType" json:"internet_charge_type,omitempty"`
// 公网入带宽最大值单位为Mbit/s。创建的实例如果参数InternetMaxBandwidthOut的值大于0则自动为实例分配公网IP。 //公网入带宽最大值单位为Mbit/s。创建的实例如果参数InternetMaxBandwidthOut的值大于0则自动为实例分配公网IP。
InternetMaxBandwidthOut int32 `protobuf:"varint,17,opt,name=internet_max_bandwidth_out,json=internetMaxBandwidthOut,proto3" json:"internet_max_bandwidth_out,omitempty"` InternetMaxBandwidthOut int32 `protobuf:"varint,17,opt,name=internet_max_bandwidth_out,json=internetMaxBandwidthOut,proto3" json:"internet_max_bandwidth_out,omitempty"`
// vpc id 华为云必需 // vpc id 华为云必需
VpcId string `protobuf:"bytes,18,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` VpcId string `protobuf:"bytes,18,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"`
// 待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网subnet的网络IDUUID格式。华为云必需 //待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网subnet的网络IDUUID格式。华为云必需
SubnetId string `protobuf:"bytes,19,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` SubnetId string `protobuf:"bytes,19,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"`
// -------------harvester--------------- //-------------harvester---------------
// 命名空间 //命名空间
Namespace string `protobuf:"bytes,20,opt,name=namespace,proto3" json:"namespace,omitempty"` Namespace string `protobuf:"bytes,20,opt,name=namespace,proto3" json:"namespace,omitempty"`
// vCpu //vCpu
Cpu int32 `protobuf:"varint,21,opt,name=cpu,proto3" json:"cpu,omitempty"` Cpu int32 `protobuf:"varint,21,opt,name=cpu,proto3" json:"cpu,omitempty"`
// memory //memory
Memory string `protobuf:"bytes,22,opt,name=memory,proto3" json:"memory,omitempty"` Memory string `protobuf:"bytes,22,opt,name=memory,proto3" json:"memory,omitempty"`
// ssh_key //ssh_key
SshKey string `protobuf:"bytes,23,opt,name=ssh_key,json=sshKey,proto3" json:"ssh_key,omitempty"` SshKey string `protobuf:"bytes,23,opt,name=ssh_key,json=sshKey,proto3" json:"ssh_key,omitempty"`
// diskName //diskName
DiskName string `protobuf:"bytes,24,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"` DiskName string `protobuf:"bytes,24,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"`
// disk类型 disk,cd-rom //disk类型 disk,cd-rom
DiskType string `protobuf:"bytes,25,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` DiskType string `protobuf:"bytes,25,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"`
// 卷大小 //卷大小
DiskSize string `protobuf:"bytes,26,opt,name=disk_size,json=diskSize,proto3" json:"disk_size,omitempty"` DiskSize string `protobuf:"bytes,26,opt,name=disk_size,json=diskSize,proto3" json:"disk_size,omitempty"`
// bus 总线指示要模拟的磁盘设备的类型支持virtio, sata, scsi. //bus 总线指示要模拟的磁盘设备的类型支持virtio, sata, scsi.
Bus string `protobuf:"bytes,27,opt,name=bus,proto3" json:"bus,omitempty"` Bus string `protobuf:"bytes,27,opt,name=bus,proto3" json:"bus,omitempty"`
// 网络名称 //网络名称
NetworkName string `protobuf:"bytes,28,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"` NetworkName string `protobuf:"bytes,28,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"`
// network_model 网络模式支持e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio. //network_model 网络模式支持e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio.
NetworkModel string `protobuf:"bytes,29,opt,name=network_model,json=networkModel,proto3" json:"network_model,omitempty"` NetworkModel string `protobuf:"bytes,29,opt,name=network_model,json=networkModel,proto3" json:"network_model,omitempty"`
// 网络 //网络
Network string `protobuf:"bytes,30,opt,name=network,proto3" json:"network,omitempty"` Network string `protobuf:"bytes,30,opt,name=network,proto3" json:"network,omitempty"`
// 网络连接方法默认bridge //网络连接方法默认bridge
NetworkType string `protobuf:"bytes,31,opt,name=network_type,json=networkType,proto3" json:"network_type,omitempty"` NetworkType string `protobuf:"bytes,31,opt,name=network_type,json=networkType,proto3" json:"network_type,omitempty"`
// osType //系统类型 //osType //系统类型
OsType string `protobuf:"bytes,32,opt,name=os_type,json=osType,proto3" json:"os_type,omitempty"` OsType string `protobuf:"bytes,32,opt,name=os_type,json=osType,proto3" json:"os_type,omitempty"`
// machineType //机器类型 none、q35、pc //machineType //机器类型 none、q35、pc
MachineType string `protobuf:"bytes,33,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` MachineType string `protobuf:"bytes,33,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"`
// machineName //主机名称,默认为虚拟机名称 //machineName //主机名称,默认为虚拟机名称
MachineName string `protobuf:"bytes,34,opt,name=machine_name,json=machineName,proto3" json:"machine_name,omitempty"` MachineName string `protobuf:"bytes,34,opt,name=machine_name,json=machineName,proto3" json:"machine_name,omitempty"`
// userDataTemplate //用户数据模板 //userDataTemplate //用户数据模板
UserDataTemplate string `protobuf:"bytes,35,opt,name=user_data_template,json=userDataTemplate,proto3" json:"user_data_template,omitempty"` UserDataTemplate string `protobuf:"bytes,35,opt,name=user_data_template,json=userDataTemplate,proto3" json:"user_data_template,omitempty"`
// networkDataTemplate //网络数据模板 //networkDataTemplate //网络数据模板
NetworkDataTemplate string `protobuf:"bytes,36,opt,name=network_data_template,json=networkDataTemplate,proto3" json:"network_data_template,omitempty"` NetworkDataTemplate string `protobuf:"bytes,36,opt,name=network_data_template,json=networkDataTemplate,proto3" json:"network_data_template,omitempty"`
// vmTemplateName //模板名称 //vmTemplateName //模板名称
VmTemplateName string `protobuf:"bytes,37,opt,name=vm_template_name,json=vmTemplateName,proto3" json:"vm_template_name,omitempty"` VmTemplateName string `protobuf:"bytes,37,opt,name=vm_template_name,json=vmTemplateName,proto3" json:"vm_template_name,omitempty"`
// vmTemplateVersion //版本号 //vmTemplateVersion //版本号
VmTemplateVersion string `protobuf:"bytes,38,opt,name=vm_template_version,json=vmTemplateVersion,proto3" json:"vm_template_version,omitempty"` VmTemplateVersion string `protobuf:"bytes,38,opt,name=vm_template_version,json=vmTemplateVersion,proto3" json:"vm_template_version,omitempty"`
} }
@ -890,17 +890,17 @@ type SystemDisk struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
// 系统盘大小单位为GiB。取值范围20~500。该参数的取值必须大于或者等于max{20, ImageSize}。默认值max{40, 参数ImageId对应的镜像大小} //系统盘大小单位为GiB。取值范围20~500。该参数的取值必须大于或者等于max{20, ImageSize}。默认值max{40, 参数ImageId对应的镜像大小}
Size string `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"` Size string `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"`
// 系统盘类型。系统盘的云盘种类。取值范围cloud_efficiency高效云盘。cloud_ssdSSD云盘。cloud_essdESSD云盘。cloud普通云盘。 //系统盘类型。系统盘的云盘种类。取值范围cloud_efficiency高效云盘。cloud_ssdSSD云盘。cloud_essdESSD云盘。cloud普通云盘。
Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"`
// 系统盘名称 //系统盘名称
DiskName string `protobuf:"bytes,3,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"` DiskName string `protobuf:"bytes,3,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"`
// 系统盘描述 //系统盘描述
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
// 创建ESSD云盘作为系统盘使用时设置云盘的性能等级。取值范围PL0单盘最高随机读写IOPS 1万。PL1默认单盘最高随机读写IOPS 5万。PL2单盘最高随机读写IOPS 10万。PL3单盘最高随机读写IOPS 100万。 //创建ESSD云盘作为系统盘使用时设置云盘的性能等级。取值范围PL0单盘最高随机读写IOPS 1万。PL1默认单盘最高随机读写IOPS 5万。PL2单盘最高随机读写IOPS 10万。PL3单盘最高随机读写IOPS 100万。
PerformanceLevel string `protobuf:"bytes,5,opt,name=performance_level,json=performanceLevel,proto3" json:"performance_level,omitempty"` PerformanceLevel string `protobuf:"bytes,5,opt,name=performance_level,json=performanceLevel,proto3" json:"performance_level,omitempty"`
// 系统盘采用的自动快照策略ID。 //系统盘采用的自动快照策略ID。
AutoSnapshotPolicyId string `protobuf:"bytes,6,opt,name=auto_snapshot_policy_id,json=autoSnapshotPolicyId,proto3" json:"auto_snapshot_policy_id,omitempty"` AutoSnapshotPolicyId string `protobuf:"bytes,6,opt,name=auto_snapshot_policy_id,json=autoSnapshotPolicyId,proto3" json:"auto_snapshot_policy_id,omitempty"`
} }
@ -996,7 +996,7 @@ type CreateEcsResp struct {
OrderId string `protobuf:"bytes,5,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` OrderId string `protobuf:"bytes,5,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
// 订单成交价 // 订单成交价
TradePrice float32 `protobuf:"fixed32,6,opt,name=trade_price,json=tradePrice,proto3" json:"trade_price,omitempty"` TradePrice float32 `protobuf:"fixed32,6,opt,name=trade_price,json=tradePrice,proto3" json:"trade_price,omitempty"`
// 实例IDInstanceIdSet列表 //实例IDInstanceIdSet列表
InstanceIdSets []string `protobuf:"bytes,7,rep,name=instance_id_sets,json=instanceIdSets,proto3" json:"instance_id_sets,omitempty"` InstanceIdSets []string `protobuf:"bytes,7,rep,name=instance_id_sets,json=instanceIdSets,proto3" json:"instance_id_sets,omitempty"`
// 查询是否完成,如果为否-false则可以将下面三个分页参数填入到请求中继续查询 // 查询是否完成,如果为否-false则可以将下面三个分页参数填入到请求中继续查询
Finished bool `protobuf:"varint,8,opt,name=finished,proto3" json:"finished,omitempty"` Finished bool `protobuf:"varint,8,opt,name=finished,proto3" json:"finished,omitempty"`
@ -1102,28 +1102,28 @@ type DeleteEcsReq struct {
AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
// 地域,数据中心 // 地域,数据中心
RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
// 是否只预检此次请求是否只预检此次请求。true发送检查请求不会查询资源状况。检查项包括AccessKey是否有效、RAM用户的授权情况和是否填写了必需参数。如果检查不通过则返回对应错误。如果检查通过会返回错误码DRYRUN.SUCCESS。 //是否只预检此次请求是否只预检此次请求。true发送检查请求不会查询资源状况。检查项包括AccessKey是否有效、RAM用户的授权情况和是否填写了必需参数。如果检查不通过则返回对应错误。如果检查通过会返回错误码DRYRUN.SUCCESS。
// false默认值发送正常请求通过检查后返回2XX HTTP状态码并直接查询资源状况。 //false默认值发送正常请求通过检查后返回2XX HTTP状态码并直接查询资源状况。
DryRun string `protobuf:"bytes,4,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` DryRun string `protobuf:"bytes,4,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"`
// Force是否强制释放**运行中**true强制释放运行中Running的实例。强制释放相当于断电实例内存以及存储中的临时数据都会被擦除无法恢复。 //Force是否强制释放**运行中**true强制释放运行中Running的实例。强制释放相当于断电实例内存以及存储中的临时数据都会被擦除无法恢复。
// false默认值正常释放实例此时实例必须处于已停止Stopped状态 //false默认值正常释放实例此时实例必须处于已停止Stopped状态
Force string `protobuf:"bytes,5,opt,name=force,proto3" json:"force,omitempty"` Force string `protobuf:"bytes,5,opt,name=force,proto3" json:"force,omitempty"`
// 是否释放已到期的包年包月实例 true,false //是否释放已到期的包年包月实例 true,false
TerminateSubscription string `protobuf:"bytes,6,opt,name=terminate_subscription,json=terminateSubscription,proto3" json:"terminate_subscription,omitempty"` TerminateSubscription string `protobuf:"bytes,6,opt,name=terminate_subscription,json=terminateSubscription,proto3" json:"terminate_subscription,omitempty"`
// 实例ID数组以”,“分割。列i-8vb2nlubkow0fxbq2218,i-8vb2nlubkow0fxbq2216 //实例ID数组以”,“分割。列i-8vb2nlubkow0fxbq2218,i-8vb2nlubkow0fxbq2216
InstanceIds string `protobuf:"bytes,7,opt,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"` InstanceIds string `protobuf:"bytes,7,opt,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"`
// 配置删除云服务器是否删除云服务器绑定的弹性IP。如果选择不删除则系统仅做解绑定操作保留弹性IP资源。 //配置删除云服务器是否删除云服务器绑定的弹性IP。如果选择不删除则系统仅做解绑定操作保留弹性IP资源。
// 取值为true或false。默认false华为云 //取值为true或false。默认false华为云
DeletePublicip string `protobuf:"bytes,8,opt,name=delete_publicip,json=deletePublicip,proto3" json:"delete_publicip,omitempty"` DeletePublicip string `protobuf:"bytes,8,opt,name=delete_publicip,json=deletePublicip,proto3" json:"delete_publicip,omitempty"`
// 配置删除云服务器是否删除云服务器对应的数据盘如果选择不删除则系统仅做卸载操作保留云硬盘资源。默认为false。 //配置删除云服务器是否删除云服务器对应的数据盘如果选择不删除则系统仅做卸载操作保留云硬盘资源。默认为false。
// 取值为true或false。默认false华为云 //取值为true或false。默认false华为云
DeleteVolume string `protobuf:"bytes,9,opt,name=delete_volume,json=deleteVolume,proto3" json:"delete_volume,omitempty"` DeleteVolume string `protobuf:"bytes,9,opt,name=delete_volume,json=deleteVolume,proto3" json:"delete_volume,omitempty"`
// ----------------harvester---------------- //----------------harvester----------------
// 虚拟机名称 //虚拟机名称
InstanceName string `protobuf:"bytes,10,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` InstanceName string `protobuf:"bytes,10,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"`
// namespace //namespace
Namespace string `protobuf:"bytes,11,opt,name=namespace,proto3" json:"namespace,omitempty"` Namespace string `protobuf:"bytes,11,opt,name=namespace,proto3" json:"namespace,omitempty"`
// diskName,以“,” 分割 //diskName,以“,” 分割
DiskName string `protobuf:"bytes,12,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"` DiskName string `protobuf:"bytes,12,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"`
} }
@ -1331,26 +1331,26 @@ type UpdateEcsReq struct {
AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
// 地域,数据中心 // 地域,数据中心
RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
// 实例id //实例id
InstanceIds string `protobuf:"bytes,4,opt,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"` InstanceIds string `protobuf:"bytes,4,opt,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"`
// 实例状态不能为启动中Starting。重启实例后重置生效且必须是在ECS控制台重启或者调用API RebootInstance重启新密码才能生效。在操作系统内部重启不能生效。 // 实例状态不能为启动中Starting。重启实例后重置生效且必须是在ECS控制台重启或者调用API RebootInstance重启新密码才能生效。在操作系统内部重启不能生效。
Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
// 操作系统的主机名 //操作系统的主机名
HostName string `protobuf:"bytes,6,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"` HostName string `protobuf:"bytes,6,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"`
// 实例名称 //实例名称
InstanceName string `protobuf:"bytes,7,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` InstanceName string `protobuf:"bytes,7,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"`
// 实例描述 //实例描述
Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"`
// 实例重新加入的安全组列表安全组ID不能重复。以”,“分割 //实例重新加入的安全组列表安全组ID不能重复。以”,“分割
SecurityGroupIds string `protobuf:"bytes,9,opt,name=security_group_ids,json=securityGroupIds,proto3" json:"security_group_ids,omitempty"` SecurityGroupIds string `protobuf:"bytes,9,opt,name=security_group_ids,json=securityGroupIds,proto3" json:"security_group_ids,omitempty"`
// ---------------harvester----------------- //---------------harvester-----------------
// namespace //namespace
Namespace string `protobuf:"bytes,10,opt,name=namespace,proto3" json:"namespace,omitempty"` Namespace string `protobuf:"bytes,10,opt,name=namespace,proto3" json:"namespace,omitempty"`
// cpu //cpu
Cpu string `protobuf:"bytes,11,opt,name=cpu,proto3" json:"cpu,omitempty"` Cpu string `protobuf:"bytes,11,opt,name=cpu,proto3" json:"cpu,omitempty"`
// memory //memory
Memory string `protobuf:"bytes,12,opt,name=memory,proto3" json:"memory,omitempty"` Memory string `protobuf:"bytes,12,opt,name=memory,proto3" json:"memory,omitempty"`
// 修改配置后是否重启 //修改配置后是否重启
IsRestart bool `protobuf:"varint,13,opt,name=is_restart,json=isRestart,proto3" json:"is_restart,omitempty"` IsRestart bool `protobuf:"varint,13,opt,name=is_restart,json=isRestart,proto3" json:"is_restart,omitempty"`
} }
@ -1571,8 +1571,8 @@ type ListDetailReq struct {
PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// 分页相关参数下一页的token // 分页相关参数下一页的token
NextToken string `protobuf:"bytes,6,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` NextToken string `protobuf:"bytes,6,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"`
// --------harvester--------- //--------harvester---------
// namespace //namespace
Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"` Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"`
} }
@ -1762,11 +1762,11 @@ type ActionReq struct {
AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
// 区域Id参考 tenant.proto 中的各个云的区域 // 区域Id参考 tenant.proto 中的各个云的区域
RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
// 命名空间 //命名空间
Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"`
// 虚拟机名称 //虚拟机名称
VmName string `protobuf:"bytes,5,opt,name=vm_name,json=vmName,proto3" json:"vm_name,omitempty"` VmName string `protobuf:"bytes,5,opt,name=vm_name,json=vmName,proto3" json:"vm_name,omitempty"`
// 虚拟机操作状态 //虚拟机操作状态
ActionType ActionType `protobuf:"varint,6,opt,name=action_type,json=actionType,proto3,enum=ecs.ActionType" json:"action_type,omitempty"` ActionType ActionType `protobuf:"varint,6,opt,name=action_type,json=actionType,proto3,enum=ecs.ActionType" json:"action_type,omitempty"`
} }
@ -1857,7 +1857,7 @@ type ActionResp struct {
Ecses []*EcsInstance `protobuf:"bytes,3,rep,name=ecses,proto3" json:"ecses,omitempty"` Ecses []*EcsInstance `protobuf:"bytes,3,rep,name=ecses,proto3" json:"ecses,omitempty"`
// 查询是否完成,如果为否-false则可以将下面三个分页参数填入到请求中继续查询 // 查询是否完成,如果为否-false则可以将下面三个分页参数填入到请求中继续查询
Finished bool `protobuf:"varint,4,opt,name=finished,proto3" json:"finished,omitempty"` Finished bool `protobuf:"varint,4,opt,name=finished,proto3" json:"finished,omitempty"`
// vm状态 //vm状态
Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
} }
@ -2062,6 +2062,249 @@ func (*ListAllReq) Descriptor() ([]byte, []int) {
return file_idl_ecs_proto_rawDescGZIP(), []int{16} return file_idl_ecs_proto_rawDescGZIP(), []int{16}
} }
type ListImagesReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 云名称
Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"`
// 账户名称根据config.yaml中的配置默认为第一个配置的账户
AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
// 区域Id参考 tenant.proto 中的各个云的区域
RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
//命名空间
Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"`
// 分页相关参数,页码
PageNumber int32 `protobuf:"varint,5,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"`
// 分页相关参数,每页数量
PageSize int32 `protobuf:"varint,6,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
}
func (x *ListImagesReq) Reset() {
*x = ListImagesReq{}
if protoimpl.UnsafeEnabled {
mi := &file_idl_ecs_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListImagesReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListImagesReq) ProtoMessage() {}
func (x *ListImagesReq) ProtoReflect() protoreflect.Message {
mi := &file_idl_ecs_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListImagesReq.ProtoReflect.Descriptor instead.
func (*ListImagesReq) Descriptor() ([]byte, []int) {
return file_idl_ecs_proto_rawDescGZIP(), []int{17}
}
func (x *ListImagesReq) GetProvider() CloudProvider {
if x != nil {
return x.Provider
}
return CloudProvider_ali
}
func (x *ListImagesReq) GetAccountName() string {
if x != nil {
return x.AccountName
}
return ""
}
func (x *ListImagesReq) GetRegionId() int32 {
if x != nil {
return x.RegionId
}
return 0
}
func (x *ListImagesReq) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *ListImagesReq) GetPageNumber() int32 {
if x != nil {
return x.PageNumber
}
return 0
}
func (x *ListImagesReq) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
type Image struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 云名称
Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"`
// 账户名称根据config.yaml中的配置默认为第一个配置的账户
AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
//镜像状态
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
//镜像名称
DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
//命名空间
Namespace string `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty"`
//镜像id
Id string `protobuf:"bytes,6,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *Image) Reset() {
*x = Image{}
if protoimpl.UnsafeEnabled {
mi := &file_idl_ecs_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Image) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Image) ProtoMessage() {}
func (x *Image) ProtoReflect() protoreflect.Message {
mi := &file_idl_ecs_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Image.ProtoReflect.Descriptor instead.
func (*Image) Descriptor() ([]byte, []int) {
return file_idl_ecs_proto_rawDescGZIP(), []int{18}
}
func (x *Image) GetProvider() CloudProvider {
if x != nil {
return x.Provider
}
return CloudProvider_ali
}
func (x *Image) GetAccountName() string {
if x != nil {
return x.AccountName
}
return ""
}
func (x *Image) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *Image) GetDisplayName() string {
if x != nil {
return x.DisplayName
}
return ""
}
func (x *Image) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *Image) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type ListImagesResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 云名称
Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=ecs.CloudProvider" json:"provider,omitempty"`
// 镜像集合
Images []*Image `protobuf:"bytes,2,rep,name=images,proto3" json:"images,omitempty"`
}
func (x *ListImagesResp) Reset() {
*x = ListImagesResp{}
if protoimpl.UnsafeEnabled {
mi := &file_idl_ecs_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListImagesResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListImagesResp) ProtoMessage() {}
func (x *ListImagesResp) ProtoReflect() protoreflect.Message {
mi := &file_idl_ecs_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListImagesResp.ProtoReflect.Descriptor instead.
func (*ListImagesResp) Descriptor() ([]byte, []int) {
return file_idl_ecs_proto_rawDescGZIP(), []int{19}
}
func (x *ListImagesResp) GetProvider() CloudProvider {
if x != nil {
return x.Provider
}
return CloudProvider_ali
}
func (x *ListImagesResp) GetImages() []*Image {
if x != nil {
return x.Images
}
return nil
}
var File_idl_ecs_proto protoreflect.FileDescriptor var File_idl_ecs_proto protoreflect.FileDescriptor
var file_idl_ecs_proto_rawDesc = []byte{ var file_idl_ecs_proto_rawDesc = []byte{
@ -2371,47 +2614,83 @@ var file_idl_ecs_proto_rawDesc = []byte{
0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x65, 0x05, 0x65, 0x63, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x65,
0x63, 0x73, 0x2e, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x63, 0x73, 0x2e, 0x45, 0x63, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x05,
0x65, 0x63, 0x73, 0x65, 0x73, 0x22, 0x0c, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x65, 0x63, 0x73, 0x65, 0x73, 0x22, 0x0c, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c,
0x52, 0x65, 0x71, 0x2a, 0x49, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x52, 0x65, 0x71, 0x22, 0xdb, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67,
0x69, 0x64, 0x65, 0x72, 0x12, 0x07, 0x0a, 0x03, 0x61, 0x6c, 0x69, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
0x07, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x68, 0x75, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x6c,
0x61, 0x77, 0x65, 0x69, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x6b, 0x38, 0x73, 0x10, 0x03, 0x12, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f,
0x0d, 0x0a, 0x09, 0x68, 0x61, 0x72, 0x76, 0x65, 0x73, 0x74, 0x65, 0x72, 0x10, 0x04, 0x2a, 0x3a, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x0a, 0x12, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63,
0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x61, 0x79, 0x42, 0x79, 0x42, 0x61, 0x6e, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69,
0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x61, 0x79, 0x42, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x67,
0x79, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x10, 0x01, 0x2a, 0x2e, 0x0a, 0x0a, 0x41, 0x63, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x74, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62,
0x07, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x10, 0x02, 0x32, 0xb2, 0x03, 0x0a, 0x0a, 0x45, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75,
0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a,
0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x45, 0x63, 0x73, 0x12, 0x19, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a,
0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x70,
0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x72, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61,
0x63, 0x73, 0x12, 0x11, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16,
0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x11, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61,
0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d,
0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x11, 0x2e, 0x65, 0x63, 0x73, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x06, 0x20,
0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x64, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x49,
0x70, 0x12, 0x38, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x44, 0x65, 0x74, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f,
0x69, 0x6c, 0x12, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x63,
0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x73, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52,
0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x07, 0x4c, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x06, 0x69, 0x6d, 0x61,
0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x12, 0x0c, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x65, 0x63, 0x73, 0x2e,
0x74, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2a, 0x49, 0x0a,
0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x41, 0x6c, 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x07,
0x6c, 0x12, 0x0f, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x0a, 0x03, 0x61, 0x6c, 0x69, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x74, 0x65, 0x6e, 0x63, 0x65,
0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x68, 0x75, 0x61, 0x77, 0x65, 0x69, 0x10, 0x02,
0x70, 0x12, 0x2c, 0x0a, 0x09, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x63, 0x73, 0x12, 0x0e, 0x12, 0x07, 0x0a, 0x03, 0x6b, 0x38, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x68, 0x61, 0x72,
0x2e, 0x65, 0x63, 0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x76, 0x65, 0x73, 0x74, 0x65, 0x72, 0x10, 0x04, 0x2a, 0x3a, 0x0a, 0x12, 0x49, 0x6e, 0x74, 0x65,
0x2e, 0x65, 0x63, 0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x42, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12,
0x08, 0x5a, 0x06, 0x2f, 0x65, 0x63, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x0e, 0x50, 0x61, 0x79, 0x42, 0x79, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68,
0x33, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x61, 0x79, 0x42, 0x79, 0x54, 0x72, 0x61, 0x66, 0x66,
0x69, 0x63, 0x10, 0x01, 0x2a, 0x2e, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79,
0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x10, 0x00, 0x12, 0x08, 0x0a,
0x04, 0x73, 0x74, 0x6f, 0x70, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x61,
0x72, 0x74, 0x10, 0x02, 0x32, 0xec, 0x03, 0x0a, 0x0a, 0x45, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c,
0x74, 0x69, 0x70, 0x6c, 0x65, 0x45, 0x63, 0x73, 0x12, 0x19, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65,
0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x45, 0x63, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
0x32, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x12, 0x11, 0x2e, 0x65,
0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a,
0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52,
0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73,
0x12, 0x11, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x63, 0x73,
0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x45, 0x63, 0x73, 0x12, 0x11, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x45, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x0d, 0x4c,
0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x12, 0x2e, 0x65,
0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71,
0x1a, 0x13, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73,
0x12, 0x0c, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0d,
0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a,
0x0a, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x63, 0x73, 0x41, 0x6c, 0x6c, 0x12, 0x0f, 0x2e, 0x65, 0x63,
0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x65,
0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x09, 0x41,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x63, 0x73, 0x12, 0x0e, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x41,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x65, 0x63, 0x73, 0x2e, 0x41,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x0d, 0x4c, 0x69, 0x73,
0x74, 0x45, 0x63, 0x73, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, 0x12, 0x2e, 0x65, 0x63, 0x73,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x13,
0x2e, 0x65, 0x63, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52,
0x65, 0x73, 0x70, 0x42, 0x08, 0x5a, 0x06, 0x2f, 0x65, 0x63, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -2427,7 +2706,7 @@ func file_idl_ecs_proto_rawDescGZIP() []byte {
} }
var file_idl_ecs_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_idl_ecs_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_idl_ecs_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_idl_ecs_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_idl_ecs_proto_goTypes = []interface{}{ var file_idl_ecs_proto_goTypes = []interface{}{
(CloudProvider)(0), // 0: ecs.CloudProvider (CloudProvider)(0), // 0: ecs.CloudProvider
(InternetChargeType)(0), // 1: ecs.InternetChargeType (InternetChargeType)(0), // 1: ecs.InternetChargeType
@ -2449,6 +2728,9 @@ var file_idl_ecs_proto_goTypes = []interface{}{
(*ListReq)(nil), // 17: ecs.ListReq (*ListReq)(nil), // 17: ecs.ListReq
(*ListResp)(nil), // 18: ecs.ListResp (*ListResp)(nil), // 18: ecs.ListResp
(*ListAllReq)(nil), // 19: ecs.ListAllReq (*ListAllReq)(nil), // 19: ecs.ListAllReq
(*ListImagesReq)(nil), // 20: ecs.ListImagesReq
(*Image)(nil), // 21: ecs.Image
(*ListImagesResp)(nil), // 22: ecs.ListImagesResp
} }
var file_idl_ecs_proto_depIdxs = []int32{ var file_idl_ecs_proto_depIdxs = []int32{
0, // 0: ecs.EcsInstance.provider:type_name -> ecs.CloudProvider 0, // 0: ecs.EcsInstance.provider:type_name -> ecs.CloudProvider
@ -2469,27 +2751,33 @@ var file_idl_ecs_proto_depIdxs = []int32{
3, // 15: ecs.ActionResp.ecses:type_name -> ecs.EcsInstance 3, // 15: ecs.ActionResp.ecses:type_name -> ecs.EcsInstance
0, // 16: ecs.ListReq.provider:type_name -> ecs.CloudProvider 0, // 16: ecs.ListReq.provider:type_name -> ecs.CloudProvider
3, // 17: ecs.ListResp.ecses:type_name -> ecs.EcsInstance 3, // 17: ecs.ListResp.ecses:type_name -> ecs.EcsInstance
4, // 18: ecs.EcsService.CreateMultipleEcs:input_type -> ecs.CreateEcsMultipleReq 0, // 18: ecs.ListImagesReq.provider:type_name -> ecs.CloudProvider
6, // 19: ecs.EcsService.CreateEcs:input_type -> ecs.CreateEcsReq 0, // 19: ecs.Image.provider:type_name -> ecs.CloudProvider
9, // 20: ecs.EcsService.DeleteEcs:input_type -> ecs.DeleteEcsReq 0, // 20: ecs.ListImagesResp.provider:type_name -> ecs.CloudProvider
11, // 21: ecs.EcsService.UpdateEcs:input_type -> ecs.UpdateEcsReq 21, // 21: ecs.ListImagesResp.images:type_name -> ecs.Image
13, // 22: ecs.EcsService.ListEcsDetail:input_type -> ecs.ListDetailReq 4, // 22: ecs.EcsService.CreateMultipleEcs:input_type -> ecs.CreateEcsMultipleReq
17, // 23: ecs.EcsService.ListEcs:input_type -> ecs.ListReq 6, // 23: ecs.EcsService.CreateEcs:input_type -> ecs.CreateEcsReq
19, // 24: ecs.EcsService.ListEcsAll:input_type -> ecs.ListAllReq 9, // 24: ecs.EcsService.DeleteEcs:input_type -> ecs.DeleteEcsReq
15, // 25: ecs.EcsService.ActionEcs:input_type -> ecs.ActionReq 11, // 25: ecs.EcsService.UpdateEcs:input_type -> ecs.UpdateEcsReq
5, // 26: ecs.EcsService.CreateMultipleEcs:output_type -> ecs.CreateEcsMultipleResp 13, // 26: ecs.EcsService.ListEcsDetail:input_type -> ecs.ListDetailReq
8, // 27: ecs.EcsService.CreateEcs:output_type -> ecs.CreateEcsResp 17, // 27: ecs.EcsService.ListEcs:input_type -> ecs.ListReq
10, // 28: ecs.EcsService.DeleteEcs:output_type -> ecs.DeleteEcsResp 19, // 28: ecs.EcsService.ListEcsAll:input_type -> ecs.ListAllReq
12, // 29: ecs.EcsService.UpdateEcs:output_type -> ecs.UpdateEcsResp 15, // 29: ecs.EcsService.ActionEcs:input_type -> ecs.ActionReq
14, // 30: ecs.EcsService.ListEcsDetail:output_type -> ecs.ListDetailResp 20, // 30: ecs.EcsService.ListEcsImages:input_type -> ecs.ListImagesReq
18, // 31: ecs.EcsService.ListEcs:output_type -> ecs.ListResp 5, // 31: ecs.EcsService.CreateMultipleEcs:output_type -> ecs.CreateEcsMultipleResp
18, // 32: ecs.EcsService.ListEcsAll:output_type -> ecs.ListResp 8, // 32: ecs.EcsService.CreateEcs:output_type -> ecs.CreateEcsResp
16, // 33: ecs.EcsService.ActionEcs:output_type -> ecs.ActionResp 10, // 33: ecs.EcsService.DeleteEcs:output_type -> ecs.DeleteEcsResp
26, // [26:34] is the sub-list for method output_type 12, // 34: ecs.EcsService.UpdateEcs:output_type -> ecs.UpdateEcsResp
18, // [18:26] is the sub-list for method input_type 14, // 35: ecs.EcsService.ListEcsDetail:output_type -> ecs.ListDetailResp
18, // [18:18] is the sub-list for extension type_name 18, // 36: ecs.EcsService.ListEcs:output_type -> ecs.ListResp
18, // [18:18] is the sub-list for extension extendee 18, // 37: ecs.EcsService.ListEcsAll:output_type -> ecs.ListResp
0, // [0:18] is the sub-list for field type_name 16, // 38: ecs.EcsService.ActionEcs:output_type -> ecs.ActionResp
22, // 39: ecs.EcsService.ListEcsImages:output_type -> ecs.ListImagesResp
31, // [31:40] is the sub-list for method output_type
22, // [22:31] is the sub-list for method input_type
22, // [22:22] is the sub-list for extension type_name
22, // [22:22] is the sub-list for extension extendee
0, // [0:22] is the sub-list for field type_name
} }
func init() { file_idl_ecs_proto_init() } func init() { file_idl_ecs_proto_init() }
@ -2702,6 +2990,42 @@ func file_idl_ecs_proto_init() {
return nil return nil
} }
} }
file_idl_ecs_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListImagesReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_idl_ecs_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Image); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_idl_ecs_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListImagesResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
} }
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@ -2709,7 +3033,7 @@ func file_idl_ecs_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_idl_ecs_proto_rawDesc, RawDescriptor: file_idl_ecs_proto_rawDesc,
NumEnums: 3, NumEnums: 3,
NumMessages: 17, NumMessages: 20,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },

View File

@ -291,6 +291,42 @@ func local_request_EcsService_ActionEcs_0(ctx context.Context, marshaler runtime
} }
var (
filter_EcsService_ListEcsImages_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_EcsService_ListEcsImages_0(ctx context.Context, marshaler runtime.Marshaler, client EcsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListImagesReq
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EcsService_ListEcsImages_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ListEcsImages(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_EcsService_ListEcsImages_0(ctx context.Context, marshaler runtime.Marshaler, server EcsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListImagesReq
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EcsService_ListEcsImages_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ListEcsImages(ctx, &protoReq)
return msg, metadata, err
}
// RegisterEcsServiceHandlerServer registers the http handlers for service EcsService to "mux". // RegisterEcsServiceHandlerServer registers the http handlers for service EcsService to "mux".
// UnaryRPC :call EcsServiceServer directly. // UnaryRPC :call EcsServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@ -497,6 +533,31 @@ func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
}) })
mux.Handle("GET", pattern_EcsService_ListEcsImages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ecs.EcsService/ListEcsImages", runtime.WithHTTPPathPattern("/apis/ecs/listImages"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_EcsService_ListEcsImages_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_EcsService_ListEcsImages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil return nil
} }
@ -714,6 +775,28 @@ func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
}) })
mux.Handle("GET", pattern_EcsService_ListEcsImages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ecs.EcsService/ListEcsImages", runtime.WithHTTPPathPattern("/apis/ecs/listImages"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_EcsService_ListEcsImages_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_EcsService_ListEcsImages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil return nil
} }
@ -733,6 +816,8 @@ var (
pattern_EcsService_ListEcsAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "all"}, "")) pattern_EcsService_ListEcsAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "all"}, ""))
pattern_EcsService_ActionEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "action"}, "")) pattern_EcsService_ActionEcs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "action"}, ""))
pattern_EcsService_ListEcsImages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "ecs", "listImages"}, ""))
) )
var ( var (
@ -751,4 +836,6 @@ var (
forward_EcsService_ListEcsAll_0 = runtime.ForwardResponseMessage forward_EcsService_ListEcsAll_0 = runtime.ForwardResponseMessage
forward_EcsService_ActionEcs_0 = runtime.ForwardResponseMessage forward_EcsService_ActionEcs_0 = runtime.ForwardResponseMessage
forward_EcsService_ListEcsImages_0 = runtime.ForwardResponseMessage
) )

View File

@ -36,8 +36,10 @@ type EcsServiceClient interface {
ListEcs(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) ListEcs(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error)
// 查询所有云的ECS // 查询所有云的ECS
ListEcsAll(ctx context.Context, in *ListAllReq, opts ...grpc.CallOption) (*ListResp, error) ListEcsAll(ctx context.Context, in *ListAllReq, opts ...grpc.CallOption) (*ListResp, error)
// 操作ecs(start-stop-restart) //操作ecs(start-stop-restart)
ActionEcs(ctx context.Context, in *ActionReq, opts ...grpc.CallOption) (*ActionResp, error) ActionEcs(ctx context.Context, in *ActionReq, opts ...grpc.CallOption) (*ActionResp, error)
//查询ecs镜像
ListEcsImages(ctx context.Context, in *ListImagesReq, opts ...grpc.CallOption) (*ListImagesResp, error)
} }
type ecsServiceClient struct { type ecsServiceClient struct {
@ -120,6 +122,15 @@ func (c *ecsServiceClient) ActionEcs(ctx context.Context, in *ActionReq, opts ..
return out, nil return out, nil
} }
func (c *ecsServiceClient) ListEcsImages(ctx context.Context, in *ListImagesReq, opts ...grpc.CallOption) (*ListImagesResp, error) {
out := new(ListImagesResp)
err := c.cc.Invoke(ctx, "/ecs.EcsService/ListEcsImages", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EcsServiceServer is the server API for EcsService service. // EcsServiceServer is the server API for EcsService service.
// All implementations must embed UnimplementedEcsServiceServer // All implementations must embed UnimplementedEcsServiceServer
// for forward compatibility // for forward compatibility
@ -138,8 +149,10 @@ type EcsServiceServer interface {
ListEcs(context.Context, *ListReq) (*ListResp, error) ListEcs(context.Context, *ListReq) (*ListResp, error)
// 查询所有云的ECS // 查询所有云的ECS
ListEcsAll(context.Context, *ListAllReq) (*ListResp, error) ListEcsAll(context.Context, *ListAllReq) (*ListResp, error)
// 操作ecs(start-stop-restart) //操作ecs(start-stop-restart)
ActionEcs(context.Context, *ActionReq) (*ActionResp, error) ActionEcs(context.Context, *ActionReq) (*ActionResp, error)
//查询ecs镜像
ListEcsImages(context.Context, *ListImagesReq) (*ListImagesResp, error)
mustEmbedUnimplementedEcsServiceServer() mustEmbedUnimplementedEcsServiceServer()
} }
@ -171,6 +184,9 @@ func (UnimplementedEcsServiceServer) ListEcsAll(context.Context, *ListAllReq) (*
func (UnimplementedEcsServiceServer) ActionEcs(context.Context, *ActionReq) (*ActionResp, error) { func (UnimplementedEcsServiceServer) ActionEcs(context.Context, *ActionReq) (*ActionResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method ActionEcs not implemented") return nil, status.Errorf(codes.Unimplemented, "method ActionEcs not implemented")
} }
func (UnimplementedEcsServiceServer) ListEcsImages(context.Context, *ListImagesReq) (*ListImagesResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListEcsImages not implemented")
}
func (UnimplementedEcsServiceServer) mustEmbedUnimplementedEcsServiceServer() {} func (UnimplementedEcsServiceServer) mustEmbedUnimplementedEcsServiceServer() {}
// UnsafeEcsServiceServer may be embedded to opt out of forward compatibility for this service. // UnsafeEcsServiceServer may be embedded to opt out of forward compatibility for this service.
@ -328,6 +344,24 @@ func _EcsService_ActionEcs_Handler(srv interface{}, ctx context.Context, dec fun
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _EcsService_ListEcsImages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListImagesReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EcsServiceServer).ListEcsImages(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ecs.EcsService/ListEcsImages",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EcsServiceServer).ListEcsImages(ctx, req.(*ListImagesReq))
}
return interceptor(ctx, in, info, handler)
}
// EcsService_ServiceDesc is the grpc.ServiceDesc for EcsService service. // EcsService_ServiceDesc is the grpc.ServiceDesc for EcsService service.
// It's only intended for direct use with grpc.RegisterService, // It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
@ -367,6 +401,10 @@ var EcsService_ServiceDesc = grpc.ServiceDesc{
MethodName: "ActionEcs", MethodName: "ActionEcs",
Handler: _EcsService_ActionEcs_Handler, Handler: _EcsService_ActionEcs_Handler,
}, },
{
MethodName: "ListEcsImages",
Handler: _EcsService_ListEcsImages_Handler,
},
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "idl/ecs.proto", Metadata: "idl/ecs.proto",

View File

@ -21,7 +21,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"provider": { "provider": {
"$ref": "#/definitions/ecsCloudProvider" "$ref": "#/definitions/ecsCloudProvider",
"title": "云名称"
}, },
"accountName": { "accountName": {
"type": "string", "type": "string",
@ -89,7 +90,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"provider": { "provider": {
"$ref": "#/definitions/ecsCloudProvider" "$ref": "#/definitions/ecsCloudProvider",
"title": "云类型"
}, },
"accountName": { "accountName": {
"type": "string", "type": "string",
@ -133,7 +135,8 @@
"title": "可用区id" "title": "可用区id"
}, },
"systemDisk": { "systemDisk": {
"$ref": "#/definitions/ecsSystemDisk" "$ref": "#/definitions/ecsSystemDisk",
"title": "系统磁盘"
}, },
"amount": { "amount": {
"type": "integer", "type": "integer",
@ -149,7 +152,8 @@
"title": "数据盘N的云盘种类。取值范围cloud_efficiency高效云盘cloud_ssdSSD云盘cloud_essdESSD云盘cloud普通云盘。" "title": "数据盘N的云盘种类。取值范围cloud_efficiency高效云盘cloud_ssdSSD云盘cloud_essdESSD云盘cloud普通云盘。"
}, },
"internetChargeType": { "internetChargeType": {
"$ref": "#/definitions/ecsInternetChargeType" "$ref": "#/definitions/ecsInternetChargeType",
"title": "网络计费类型。取值范围PayByBandwidth按固定带宽计费。PayByTraffic默认按使用流量计费"
}, },
"internetMaxBandwidthOut": { "internetMaxBandwidthOut": {
"type": "integer", "type": "integer",
@ -248,7 +252,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"provider": { "provider": {
"$ref": "#/definitions/ecsCloudProvider" "$ref": "#/definitions/ecsCloudProvider",
"title": "云名称"
}, },
"accountName": { "accountName": {
"type": "string", "type": "string",
@ -290,7 +295,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"provider": { "provider": {
"$ref": "#/definitions/ecsCloudProvider" "$ref": "#/definitions/ecsCloudProvider",
"title": "云名称"
}, },
"accountName": { "accountName": {
"type": "string", "type": "string",
@ -312,7 +318,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"provider": { "provider": {
"$ref": "#/definitions/ecsCloudProvider" "$ref": "#/definitions/ecsCloudProvider",
"title": "云类型"
}, },
"accountName": { "accountName": {
"type": "string", "type": "string",
@ -395,6 +402,35 @@
}, },
"title": "ECS 实例" "title": "ECS 实例"
}, },
"ecsImage": {
"type": "object",
"properties": {
"provider": {
"$ref": "#/definitions/ecsCloudProvider",
"title": "云名称"
},
"accountName": {
"type": "string",
"title": "账户名称根据config.yaml中的配置默认为第一个配置的账户"
},
"status": {
"type": "string",
"title": "镜像状态"
},
"displayName": {
"type": "string",
"title": "镜像名称"
},
"namespace": {
"type": "string",
"title": "命名空间"
},
"id": {
"type": "string",
"title": "镜像id"
}
}
},
"ecsInternetChargeType": { "ecsInternetChargeType": {
"type": "string", "type": "string",
"enum": [ "enum": [
@ -440,6 +476,22 @@
}, },
"title": "查询ECS返回值" "title": "查询ECS返回值"
}, },
"ecsListImagesResp": {
"type": "object",
"properties": {
"provider": {
"$ref": "#/definitions/ecsCloudProvider",
"title": "云名称"
},
"images": {
"type": "array",
"items": {
"$ref": "#/definitions/ecsImage"
},
"title": "镜像集合"
}
}
},
"ecsListResp": { "ecsListResp": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -486,7 +538,8 @@
"type": "object", "type": "object",
"properties": { "properties": {
"provider": { "provider": {
"$ref": "#/definitions/ecsCloudProvider" "$ref": "#/definitions/ecsCloudProvider",
"title": "云名称"
}, },
"accountName": { "accountName": {
"type": "string", "type": "string",
@ -507,11 +560,14 @@
"protobufAny": { "protobufAny": {
"type": "object", "type": "object",
"properties": { "properties": {
"@type": { "typeUrl": {
"type": "string" "type": "string"
}
}, },
"additionalProperties": {} "value": {
"type": "string",
"format": "byte"
}
}
}, },
"rpcStatus": { "rpcStatus": {
"type": "object", "type": "object",

View File

@ -371,6 +371,43 @@ message ListResp {
message ListAllReq{} message ListAllReq{}
message ListImagesReq {
//
CloudProvider provider = 1;
// config.yaml中的配置
string account_name = 2;
// Id tenant.proto
int32 region_id = 3;
//
string namespace= 4;
//
int32 page_number = 5;
//
int32 page_size = 6;
}
message Image {
//
CloudProvider provider = 1;
// config.yaml中的配置
string account_name = 2;
//
string status = 3 ;
//
string display_name= 4;
//
string namespace= 5;
//id
string id= 6;
}
message ListImagesResp {
//
CloudProvider provider = 1;
//
repeated Image images = 2;
}
// ECS类产品接口 // ECS类产品接口
// - ECS // - ECS
@ -402,4 +439,7 @@ service EcsService {
//ecs(start-stop-restart) //ecs(start-stop-restart)
rpc ActionEcs(ActionReq) returns (ActionResp); rpc ActionEcs(ActionReq) returns (ActionResp);
//ecs镜像
rpc ListEcsImages(ListImagesReq) returns (ListImagesResp);
} }

View File

@ -24,3 +24,5 @@ http:
- selector: ecs.EcsService.ActionEcs - selector: ecs.EcsService.ActionEcs
post: "/apis/ecs/action" post: "/apis/ecs/action"
body: "*" body: "*"
- selector: ecs.EcsService.ListEcsImages
get: "/apis/ecs/listImages"

View File

@ -91,3 +91,13 @@ func (s *Server) ActionEcs(ctx context.Context, req *ecspb.ActionReq) (*ecspb.Ac
} }
return resp, nil return resp, nil
} }
// ListEcsImages return ecs image list
func (s *Server) ListEcsImages(ctx context.Context, req *ecspb.ListImagesReq) (*ecspb.ListImagesResp, error) {
resp, err := ListImages(ctx, req)
if err != nil {
glog.Errorf("ListImages error %+v", err)
return nil, status.Errorf(codes.Internal, err.Error())
}
return resp, nil
}

View File

@ -242,3 +242,23 @@ func ActionEcs(ctx context.Context, req *pbecs.ActionReq) (*pbecs.ActionResp, er
} }
return ecs.ActionEcs(ctx, req) return ecs.ActionEcs(ctx, req)
} }
func ListImages(ctx context.Context, req *pbecs.ListImagesReq) (*pbecs.ListImagesResp, error) {
var (
ecs ecser.Ecser
)
tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider))
region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId)
if err != nil {
return nil, errors.Wrap(err, "get tenanters failed")
}
for _, tenanter := range tenanters {
if req.AccountName == "" || tenanter.AccountName() == req.AccountName {
if ecs, err = ecser.NewEcsClient(req.Provider, region, tenanter); err != nil {
return nil, errors.WithMessage(err, "NewEcsClient error")
}
break
}
}
return ecs.ListEcsImages(ctx, req)
}

View File

@ -237,3 +237,7 @@ func (ecs *AliEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*p
func (ecs *AliEcs) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) { func (ecs *AliEcs) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) {
return nil, nil return nil, nil
} }
func (ecs *AliEcs) ListEcsImages(ctx context.Context, req *pbecs.ListImagesReq) (resp *pbecs.ListImagesResp, err error) {
return nil, nil
}

View File

@ -20,6 +20,7 @@ type Ecser interface {
UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (resp *pbecs.UpdateEcsResp, err error) //修改ecs UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (resp *pbecs.UpdateEcsResp, err error) //修改ecs
ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (resp *pbecs.ListDetailResp, err error) //查询ecs详情 ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (resp *pbecs.ListDetailResp, err error) //查询ecs详情
ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) //操作ecs ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) //操作ecs
ListEcsImages(ctx context.Context, req *pbecs.ListImagesReq) (resp *pbecs.ListImagesResp, err error) //查询镜像列表
} }
func NewEcsClient(provider pbecs.CloudProvider, region tenanter.Region, tenant tenanter.Tenanter) (ecser Ecser, err error) { func NewEcsClient(provider pbecs.CloudProvider, region tenanter.Region, tenant tenanter.Tenanter) (ecser Ecser, err error) {

View File

@ -3,6 +3,7 @@ package service
import ( import (
pbecs "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl" pbecs "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_vm/gen/idl"
"code.gitlink.org.cn/JCCE/PCM.git/common/tenanter" "code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl"
"context" "context"
"fmt" "fmt"
"github.com/harvester/harvester/pkg/apis/harvesterhci.io/v1beta1" "github.com/harvester/harvester/pkg/apis/harvesterhci.io/v1beta1"
@ -568,3 +569,27 @@ func restartVmByName(c *harvClient.Clientset, namespace, vmName string) error {
return startVmByName(c, namespace, vm.Name) return startVmByName(c, namespace, vm.Name)
} }
} }
func (h *HarVMer) ListEcsImages(ctx context.Context, req *pbecs.ListImagesReq) (resp *pbecs.ListImagesResp, err error) {
//harvester查询默认命名空间
namespace := "default"
images, err := h.harvCli.HarvesterhciV1beta1().VirtualMachineImages(namespace).List(ctx, k8smetav1.ListOptions{})
if err != nil {
return nil, err
}
imageList := make([]*pbecs.Image, 0)
for _, im := range images.Items {
image := pbecs.Image{
Provider: pbecs.CloudProvider(pbtenant.CloudProvider_harvester),
Id: im.Name,
DisplayName: im.Spec.DisplayName,
Namespace: im.Namespace,
}
imageList = append(imageList, &image)
}
return &pbecs.ListImagesResp{
Provider: pbecs.CloudProvider(pbtenant.CloudProvider_harvester),
Images: imageList,
}, nil
}

View File

@ -264,3 +264,7 @@ func (ecs *HuaweiEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq)
func (ecs *HuaweiEcs) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) { func (ecs *HuaweiEcs) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) {
return nil, nil return nil, nil
} }
func (ecs *HuaweiEcs) ListEcsImages(ctx context.Context, req *pbecs.ListImagesReq) (resp *pbecs.ListImagesResp, err error) {
return nil, nil
}

View File

@ -188,3 +188,7 @@ func (ecs *TencentCvm) ListDetail(ctx context.Context, req *pbecs.ListDetailReq)
func (ecs *TencentCvm) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) { func (ecs *TencentCvm) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) {
return nil, nil return nil, nil
} }
func (ecs *TencentCvm) ListEcsImages(ctx context.Context, req *pbecs.ListImagesReq) (resp *pbecs.ListImagesResp, err error) {
return nil, nil
}

1
go.mod
View File

@ -119,6 +119,7 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.22.3 // indirect k8s.io/apiextensions-apiserver v0.22.3 // indirect
k8s.io/component-base v0.21.4 // indirect k8s.io/component-base v0.21.4 // indirect
k8s.io/klog/v2 v2.10.0 // indirect k8s.io/klog/v2 v2.10.0 // indirect

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.26.0 // protoc-gen-go v1.28.0
// protoc (unknown) // protoc (unknown)
// source: idl/tenant.proto // source: idl/tenant.proto
@ -740,9 +740,9 @@ type Region struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
// id //id
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// name //name
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
} }

View File

@ -15,11 +15,14 @@
"protobufAny": { "protobufAny": {
"type": "object", "type": "object",
"properties": { "properties": {
"@type": { "typeUrl": {
"type": "string" "type": "string"
}
}, },
"additionalProperties": {} "value": {
"type": "string",
"format": "byte"
}
}
}, },
"rpcStatus": { "rpcStatus": {
"type": "object", "type": "object",