feat:vm images list
Signed-off-by: devad <cossjie@gmail.com>
This commit is contained in:
parent
b67aab76d8
commit
06451fb456
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
@ -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,
|
||||||
},
|
},
|
||||||
|
|
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
|
@ -38,6 +38,8 @@ type EcsServiceClient interface {
|
||||||
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
|
||||||
|
@ -140,6 +151,8 @@ type EcsServiceServer interface {
|
||||||
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",
|
||||||
|
|
|
@ -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_ssd:SSD云盘;cloud_essd:ESSD云盘;cloud:普通云盘。"
|
"title": "数据盘N的云盘种类。取值范围:cloud_efficiency:高效云盘;cloud_ssd:SSD云盘;cloud_essd:ESSD云盘;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",
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
|
@ -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"
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
|
@ -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)
|
||||||
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
|
@ -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
1
go.mod
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
Loading…
Reference in New Issue