feat:slurm provider support(TianHe)& listNode grpc example
This commit is contained in:
parent
06451fb456
commit
e3643661cc
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc (unknown)
|
||||
// source: idl/pod.proto
|
||||
|
||||
|
@ -86,9 +86,9 @@ type Region struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//id
|
||||
// id
|
||||
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"`
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ type PodInstance struct {
|
|||
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"`
|
||||
//pcm id
|
||||
// pcm id
|
||||
PcmId string `protobuf:"bytes,3,opt,name=pcm_id,json=pcmId,proto3" json:"pcm_id,omitempty"`
|
||||
// 实例id
|
||||
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"`
|
||||
// 内存MB
|
||||
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"`
|
||||
//子网ID 对应腾讯 SubnetId(腾讯必需)
|
||||
// 子网ID 对应腾讯 SubnetId(腾讯必需)
|
||||
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"`
|
||||
//名空间
|
||||
// 名空间
|
||||
Namespace string `protobuf:"bytes,15,opt,name=namespace,proto3" json:"namespace,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"`
|
||||
// 内存MB
|
||||
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"`
|
||||
//子网ID 对应腾讯 SubnetId(腾讯必需)
|
||||
// 子网ID 对应腾讯 SubnetId(腾讯必需)
|
||||
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"`
|
||||
//名空间
|
||||
// 名空间
|
||||
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"`
|
||||
}
|
||||
|
||||
|
@ -681,11 +681,11 @@ type DeletePodReq struct {
|
|||
PodId string `protobuf:"bytes,4,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
|
||||
// podName
|
||||
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"`
|
||||
// 地域,数据中心
|
||||
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"`
|
||||
}
|
||||
|
||||
|
@ -867,7 +867,7 @@ type UpdatePodReq struct {
|
|||
PodId string `protobuf:"bytes,4,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
|
||||
// podName
|
||||
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"`
|
||||
// 地域,数据中心
|
||||
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"`
|
||||
// labels
|
||||
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"`
|
||||
}
|
||||
|
||||
|
@ -1312,9 +1312,9 @@ type ListPodReq struct {
|
|||
|
||||
// cloud name
|
||||
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"`
|
||||
//请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体
|
||||
// 请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体
|
||||
RequestSource string `protobuf:"bytes,3,opt,name=requestSource,proto3" json:"requestSource,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/podCloudProvider",
|
||||
"title": "云类型"
|
||||
"$ref": "#/definitions/podCloudProvider"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
|
@ -200,8 +199,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/podCloudProvider",
|
||||
"title": "云类型"
|
||||
"$ref": "#/definitions/podCloudProvider"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
|
@ -290,14 +288,11 @@
|
|||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"typeUrl": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
package slurm
|
||||
|
||||
//todo
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/extra"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/extra"
|
||||
"fmt"
|
||||
)
|
||||
import "os"
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/extra"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/extra"
|
||||
"fmt"
|
||||
)
|
||||
import "os"
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/jobinfo"
|
||||
"fmt"
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/nodeinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/nodeinfo"
|
||||
"fmt"
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm"
|
||||
"fmt"
|
||||
)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/jobinfo"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/nodeinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/nodeinfo"
|
||||
"fmt"
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/partitioninfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/partitioninfo"
|
||||
"fmt"
|
||||
)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/jobinfo"
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/submitjob"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm"
|
||||
submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/submitjob"
|
||||
)
|
||||
import "os/user"
|
||||
import "os"
|
|
@ -1,9 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/submitjob"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm"
|
||||
job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/jobinfo"
|
||||
submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/submitjob"
|
||||
)
|
||||
import "os"
|
||||
import "strconv"
|
|
@ -2,9 +2,9 @@ package main
|
|||
|
||||
//
|
||||
//import (
|
||||
// "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
// job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
// submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/submitjob"
|
||||
// "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm"
|
||||
// job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/jobinfo"
|
||||
// submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/submitjob"
|
||||
// "fmt"
|
||||
// "os"
|
||||
// "os/exec"
|
|
@ -2,9 +2,9 @@ package main
|
|||
|
||||
//
|
||||
//import (
|
||||
// "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
// job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
// submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/submitjob"
|
||||
// "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm"
|
||||
// job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/jobinfo"
|
||||
// submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/submitjob"
|
||||
// "fmt"
|
||||
// "os"
|
||||
// "os/exec"
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/submitjob"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm"
|
||||
submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/submitjob"
|
||||
)
|
||||
import "os"
|
||||
import "strconv"
|
|
@ -4,8 +4,8 @@
|
|||
package extra
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm"
|
||||
job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/jobinfo"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
|
@ -74,7 +74,7 @@ void free_submit_response_msg(struct submit_response_msg *msg)
|
|||
import "C"
|
||||
|
||||
import (
|
||||
job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/jobinfo"
|
||||
"fmt"
|
||||
)
|
||||
import "unsafe"
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc (unknown)
|
||||
// source: idl/slurm.proto
|
||||
|
||||
|
@ -20,10 +20,57 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// slurm version
|
||||
type SlurmVersion int32
|
||||
|
||||
const (
|
||||
// 0 - 阿里云
|
||||
SlurmVersion_tianhe SlurmVersion = 0
|
||||
)
|
||||
|
||||
// Enum value maps for SlurmVersion.
|
||||
var (
|
||||
SlurmVersion_name = map[int32]string{
|
||||
0: "tianhe",
|
||||
}
|
||||
SlurmVersion_value = map[string]int32{
|
||||
"tianhe": 0,
|
||||
}
|
||||
)
|
||||
|
||||
func (x SlurmVersion) Enum() *SlurmVersion {
|
||||
p := new(SlurmVersion)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x SlurmVersion) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (SlurmVersion) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_idl_slurm_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (SlurmVersion) Type() protoreflect.EnumType {
|
||||
return &file_idl_slurm_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x SlurmVersion) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SlurmVersion.Descriptor instead.
|
||||
func (SlurmVersion) EnumDescriptor() ([]byte, []int) {
|
||||
return file_idl_slurm_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type ListNodesReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SlurmVersion int32 `protobuf:"varint,1,opt,name=SlurmVersion,proto3" json:"SlurmVersion,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListNodesReq) Reset() {
|
||||
|
@ -58,6 +105,13 @@ func (*ListNodesReq) Descriptor() ([]byte, []int) {
|
|||
return file_idl_slurm_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ListNodesReq) GetSlurmVersion() int32 {
|
||||
if x != nil {
|
||||
return x.SlurmVersion
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type NodeInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -196,22 +250,26 @@ var File_idl_slurm_proto protoreflect.FileDescriptor
|
|||
|
||||
var file_idl_slurm_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x22, 0x0e, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x22, 0x9e, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x63, 0x70, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x70, 0x75,
|
||||
0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x6c, 0x4d, 0x65, 0x6d,
|
||||
0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x6c, 0x4d,
|
||||
0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x07, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x22, 0x3f, 0x0a, 0x0d, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x0a, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f,
|
||||
0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x09, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x32, 0x46, 0x0a, 0x0c, 0x53, 0x6c,
|
||||
0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x22, 0x32, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x53, 0x6c, 0x75, 0x72,
|
||||
0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
|
||||
0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x9e, 0x01, 0x0a,
|
||||
0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x61,
|
||||
0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x61, 0x72, 0x64,
|
||||
0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x70, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x04, 0x63, 0x70, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x61,
|
||||
0x6c, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72,
|
||||
0x65, 0x61, 0x6c, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x63,
|
||||
0x6b, 0x65, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6f, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x22, 0x3f, 0x0a,
|
||||
0x0d, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e,
|
||||
0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x2a, 0x1a,
|
||||
0x0a, 0x0c, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0a,
|
||||
0x0a, 0x06, 0x74, 0x69, 0x61, 0x6e, 0x68, 0x65, 0x10, 0x00, 0x32, 0x46, 0x0a, 0x0c, 0x53, 0x6c,
|
||||
0x75, 0x72, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x73,
|
||||
|
@ -232,16 +290,18 @@ func file_idl_slurm_proto_rawDescGZIP() []byte {
|
|||
return file_idl_slurm_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_idl_slurm_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_idl_slurm_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_idl_slurm_proto_goTypes = []interface{}{
|
||||
(*ListNodesReq)(nil), // 0: slurm.ListNodesReq
|
||||
(*NodeInfo)(nil), // 1: slurm.NodeInfo
|
||||
(*ListNodesResp)(nil), // 2: slurm.ListNodesResp
|
||||
(SlurmVersion)(0), // 0: slurm.SlurmVersion
|
||||
(*ListNodesReq)(nil), // 1: slurm.ListNodesReq
|
||||
(*NodeInfo)(nil), // 2: slurm.NodeInfo
|
||||
(*ListNodesResp)(nil), // 3: slurm.ListNodesResp
|
||||
}
|
||||
var file_idl_slurm_proto_depIdxs = []int32{
|
||||
1, // 0: slurm.ListNodesResp.node_infos:type_name -> slurm.NodeInfo
|
||||
0, // 1: slurm.SlurmService.ListNodes:input_type -> slurm.ListNodesReq
|
||||
2, // 2: slurm.SlurmService.ListNodes:output_type -> slurm.ListNodesResp
|
||||
2, // 0: slurm.ListNodesResp.node_infos:type_name -> slurm.NodeInfo
|
||||
1, // 1: slurm.SlurmService.ListNodes:input_type -> slurm.ListNodesReq
|
||||
3, // 2: slurm.SlurmService.ListNodes:output_type -> slurm.ListNodesResp
|
||||
2, // [2:3] is the sub-list for method output_type
|
||||
1, // [1:2] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
|
@ -297,13 +357,14 @@ func file_idl_slurm_proto_init() {
|
|||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_idl_slurm_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumEnums: 1,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_idl_slurm_proto_goTypes,
|
||||
DependencyIndexes: file_idl_slurm_proto_depIdxs,
|
||||
EnumInfos: file_idl_slurm_proto_enumTypes,
|
||||
MessageInfos: file_idl_slurm_proto_msgTypes,
|
||||
}.Build()
|
||||
File_idl_slurm_proto = out.File
|
||||
|
|
|
@ -31,10 +31,21 @@ var _ = runtime.String
|
|||
var _ = utilities.NewDoubleArray
|
||||
var _ = metadata.Join
|
||||
|
||||
var (
|
||||
filter_SlurmService_ListNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_SlurmService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ListNodesReq
|
||||
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_SlurmService_ListNodes_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ListNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
|
@ -44,6 +55,13 @@ func local_request_SlurmService_ListNodes_0(ctx context.Context, marshaler runti
|
|||
var protoReq ListNodesReq
|
||||
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_SlurmService_ListNodes_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ListNodes(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
|
|
|
@ -20,14 +20,11 @@
|
|||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"typeUrl": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
|
|
|
@ -3,7 +3,14 @@ package slurm;
|
|||
|
||||
option go_package = "/slurmpb";
|
||||
|
||||
message ListNodesReq{}
|
||||
// slurm version
|
||||
enum SlurmVersion {
|
||||
// 0 - 阿里云
|
||||
tianhe = 0;
|
||||
}
|
||||
message ListNodesReq{
|
||||
int32 SlurmVersion = 1;
|
||||
}
|
||||
|
||||
message NodeInfo{
|
||||
int32 boards = 1 ;
|
||||
|
|
|
@ -1,24 +1,13 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
nodeinfo "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/nodeinfo"
|
||||
pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl"
|
||||
slurmer "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/service"
|
||||
"context"
|
||||
)
|
||||
|
||||
func ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (*pbslurm.ListNodesResp, error) {
|
||||
nodeList := nodeinfo.Get_all_nodes()
|
||||
|
||||
var resp = pbslurm.ListNodesResp{}
|
||||
for _, node := range nodeList.Node_list {
|
||||
nodeInfoResult := pbslurm.NodeInfo{}
|
||||
nodeInfoResult.Cpus = int32(node.Cpus)
|
||||
nodeInfoResult.Boards = int32(node.Boards)
|
||||
nodeInfoResult.RealMemory = int32(node.Real_memory)
|
||||
nodeInfoResult.Sockets = int32(node.Sockets)
|
||||
nodeInfoResult.Threads = int32(node.Threads)
|
||||
resp.NodeInfos = append(resp.NodeInfos, &nodeInfoResult)
|
||||
}
|
||||
|
||||
return &resp, nil
|
||||
slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion)
|
||||
resp, _ := slurm.ListNodes(ctx, req)
|
||||
return resp, nil
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package service
|
||||
package slurmer
|
||||
|
||||
import (
|
||||
pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl"
|
||||
|
@ -8,3 +8,12 @@ import (
|
|||
type Slurmer interface {
|
||||
ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (resp *pbslurm.ListNodesResp, err error) //list slurm nodes
|
||||
}
|
||||
|
||||
func SelectSlurmVersion(slurmVersion int32) (slurmer Slurmer, err error) {
|
||||
|
||||
switch slurmVersion {
|
||||
case int32(pbslurm.SlurmVersion_tianhe):
|
||||
return SelectTianhe()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package slurmer
|
||||
|
||||
import (
|
||||
nodeinfo "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/nodeinfo"
|
||||
pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl"
|
||||
"context"
|
||||
)
|
||||
|
||||
type SlurmStruct struct {
|
||||
version string
|
||||
}
|
||||
|
||||
func SelectTianhe() (Slurmer, error) {
|
||||
|
||||
return &SlurmStruct{
|
||||
version: "2.6.9.1",
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (slurmStruct SlurmStruct) ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (*pbslurm.ListNodesResp, error) {
|
||||
nodeList := nodeinfo.Get_all_nodes()
|
||||
|
||||
var resp = pbslurm.ListNodesResp{}
|
||||
for _, node := range nodeList.Node_list {
|
||||
nodeInfoResult := pbslurm.NodeInfo{}
|
||||
nodeInfoResult.Cpus = int32(node.Cpus)
|
||||
nodeInfoResult.Boards = int32(node.Boards)
|
||||
nodeInfoResult.RealMemory = int32(node.Real_memory)
|
||||
nodeInfoResult.Sockets = int32(node.Sockets)
|
||||
nodeInfoResult.Threads = int32(node.Threads)
|
||||
resp.NodeInfos = append(resp.NodeInfos, &nodeInfoResult)
|
||||
}
|
||||
|
||||
return &resp, nil
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc (unknown)
|
||||
// source: idl/ecs.proto
|
||||
|
||||
|
@ -85,9 +85,9 @@ func (CloudProvider) EnumDescriptor() ([]byte, []int) {
|
|||
type InternetChargeType int32
|
||||
|
||||
const (
|
||||
//按固定带宽计费。
|
||||
// 按固定带宽计费。
|
||||
InternetChargeType_PayByBandwidth InternetChargeType = 0
|
||||
//(默认):按使用流量计费
|
||||
// (默认):按使用流量计费
|
||||
InternetChargeType_PayByTraffic InternetChargeType = 1
|
||||
)
|
||||
|
||||
|
@ -134,11 +134,11 @@ func (InternetChargeType) EnumDescriptor() ([]byte, []int) {
|
|||
type ActionType int32
|
||||
|
||||
const (
|
||||
//启动
|
||||
// 启动
|
||||
ActionType_start ActionType = 0
|
||||
//停止
|
||||
// 停止
|
||||
ActionType_stop ActionType = 1
|
||||
//重启
|
||||
// 重启
|
||||
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"`
|
||||
// -----------harvester---------
|
||||
//虚拟机所在的节点
|
||||
// 虚拟机所在的节点
|
||||
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"`
|
||||
}
|
||||
|
||||
|
@ -513,76 +513,76 @@ type CreateEcsReq struct {
|
|||
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"`
|
||||
//镜像id
|
||||
// 镜像id
|
||||
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"`
|
||||
//实例的资源规格
|
||||
// 实例的资源规格
|
||||
InstanceType string `protobuf:"bytes,6,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"`
|
||||
// 安全组id
|
||||
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"`
|
||||
//实例名称
|
||||
// 实例名称
|
||||
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"`
|
||||
//可用区id
|
||||
// 可用区id
|
||||
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"`
|
||||
//创建ECS的数量
|
||||
// 创建ECS的数量
|
||||
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"`
|
||||
//数据盘N的云盘种类。取值范围:cloud_efficiency:高效云盘;cloud_ssd:SSD云盘;cloud_essd:ESSD云盘;cloud:普通云盘。
|
||||
// 数据盘N的云盘种类。取值范围:cloud_efficiency:高效云盘;cloud_ssd:SSD云盘;cloud_essd:ESSD云盘;cloud:普通云盘。
|
||||
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"`
|
||||
//公网入带宽最大值,单位为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"`
|
||||
// vpc id 华为云必需
|
||||
VpcId string `protobuf:"bytes,18,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"`
|
||||
//待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需
|
||||
// 待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需
|
||||
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"`
|
||||
//vCpu
|
||||
// vCpu
|
||||
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"`
|
||||
//ssh_key
|
||||
// ssh_key
|
||||
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"`
|
||||
//disk类型 disk,cd-rom
|
||||
// disk类型 disk,cd-rom
|
||||
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"`
|
||||
//bus 总线指示要模拟的磁盘设备的类型,支持virtio, sata, scsi.
|
||||
// bus 总线指示要模拟的磁盘设备的类型,支持virtio, sata, scsi.
|
||||
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"`
|
||||
//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"`
|
||||
//网络
|
||||
// 网络
|
||||
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"`
|
||||
//osType //系统类型
|
||||
// osType //系统类型
|
||||
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"`
|
||||
//machineName //主机名称,默认为虚拟机名称
|
||||
// machineName //主机名称,默认为虚拟机名称
|
||||
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"`
|
||||
//networkDataTemplate //网络数据模板
|
||||
// networkDataTemplate //网络数据模板
|
||||
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"`
|
||||
//vmTemplateVersion //版本号
|
||||
// vmTemplateVersion //版本号
|
||||
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
|
||||
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"`
|
||||
//系统盘类型。系统盘的云盘种类。取值范围:cloud_efficiency:高效云盘。cloud_ssd:SSD云盘。cloud_essd:ESSD云盘。cloud:普通云盘。
|
||||
// 系统盘类型。系统盘的云盘种类。取值范围:cloud_efficiency:高效云盘。cloud_ssd:SSD云盘。cloud_essd:ESSD云盘。cloud:普通云盘。
|
||||
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"`
|
||||
//系统盘描述
|
||||
// 系统盘描述
|
||||
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"`
|
||||
//系统盘采用的自动快照策略ID。
|
||||
// 系统盘采用的自动快照策略ID。
|
||||
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"`
|
||||
// 订单成交价
|
||||
TradePrice float32 `protobuf:"fixed32,6,opt,name=trade_price,json=tradePrice,proto3" json:"trade_price,omitempty"`
|
||||
//实例ID(InstanceIdSet)列表
|
||||
// 实例ID(InstanceIdSet)列表
|
||||
InstanceIdSets []string `protobuf:"bytes,7,rep,name=instance_id_sets,json=instanceIdSets,proto3" json:"instance_id_sets,omitempty"`
|
||||
// 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询
|
||||
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"`
|
||||
// 地域,数据中心
|
||||
RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
|
||||
//是否只预检此次请求是否只预检此次请求。true:发送检查请求,不会查询资源状况。检查项包括AccessKey是否有效、RAM用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DRYRUN.SUCCESS。
|
||||
//false(默认值):发送正常请求,通过检查后返回2XX HTTP状态码并直接查询资源状况。
|
||||
// 是否只预检此次请求是否只预检此次请求。true:发送检查请求,不会查询资源状况。检查项包括AccessKey是否有效、RAM用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DRYRUN.SUCCESS。
|
||||
// false(默认值):发送正常请求,通过检查后返回2XX HTTP状态码并直接查询资源状况。
|
||||
DryRun string `protobuf:"bytes,4,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"`
|
||||
//Force是否强制释放**运行中**;true:强制释放运行中(Running)的实例。强制释放相当于断电,实例内存以及存储中的临时数据都会被擦除,无法恢复。
|
||||
//false(默认值):正常释放实例,此时实例必须处于已停止(Stopped)状态
|
||||
// Force是否强制释放**运行中**;true:强制释放运行中(Running)的实例。强制释放相当于断电,实例内存以及存储中的临时数据都会被擦除,无法恢复。
|
||||
// false(默认值):正常释放实例,此时实例必须处于已停止(Stopped)状态
|
||||
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"`
|
||||
//实例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"`
|
||||
//配置删除云服务器是否删除云服务器绑定的弹性IP。如果选择不删除,则系统仅做解绑定操作,保留弹性IP资源。
|
||||
//取值为true或false。默认false;华为云
|
||||
// 配置删除云服务器是否删除云服务器绑定的弹性IP。如果选择不删除,则系统仅做解绑定操作,保留弹性IP资源。
|
||||
// 取值为true或false。默认false;华为云
|
||||
DeletePublicip string `protobuf:"bytes,8,opt,name=delete_publicip,json=deletePublicip,proto3" json:"delete_publicip,omitempty"`
|
||||
//配置删除云服务器是否删除云服务器对应的数据盘,如果选择不删除,则系统仅做卸载操作,保留云硬盘资源。默认为false。
|
||||
//取值为true或false。默认false;华为云
|
||||
// 配置删除云服务器是否删除云服务器对应的数据盘,如果选择不删除,则系统仅做卸载操作,保留云硬盘资源。默认为false。
|
||||
// 取值为true或false。默认false;华为云
|
||||
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"`
|
||||
//namespace
|
||||
// namespace
|
||||
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"`
|
||||
}
|
||||
|
||||
|
@ -1331,26 +1331,26 @@ type UpdateEcsReq struct {
|
|||
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"`
|
||||
//实例id
|
||||
// 实例id
|
||||
InstanceIds string `protobuf:"bytes,4,opt,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"`
|
||||
// 实例状态不能为启动中(Starting)。重启实例后,重置生效,且必须是在ECS控制台重启或者调用API RebootInstance重启,新密码才能生效。在操作系统内部重启不能生效。
|
||||
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"`
|
||||
//实例名称
|
||||
// 实例名称
|
||||
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"`
|
||||
//实例重新加入的安全组列表,安全组ID不能重复。以”,“分割
|
||||
// 实例重新加入的安全组列表,安全组ID不能重复。以”,“分割
|
||||
SecurityGroupIds string `protobuf:"bytes,9,opt,name=security_group_ids,json=securityGroupIds,proto3" json:"security_group_ids,omitempty"`
|
||||
//---------------harvester-----------------
|
||||
//namespace
|
||||
// ---------------harvester-----------------
|
||||
// namespace
|
||||
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"`
|
||||
//memory
|
||||
// memory
|
||||
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"`
|
||||
}
|
||||
|
||||
|
@ -1571,8 +1571,8 @@ type ListDetailReq struct {
|
|||
PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
||||
// 分页相关参数,下一页的token
|
||||
NextToken string `protobuf:"bytes,6,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"`
|
||||
//--------harvester---------
|
||||
//namespace
|
||||
// --------harvester---------
|
||||
// namespace
|
||||
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"`
|
||||
// 区域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"`
|
||||
//虚拟机名称
|
||||
// 虚拟机名称
|
||||
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"`
|
||||
}
|
||||
|
||||
|
@ -1857,7 +1857,7 @@ type ActionResp struct {
|
|||
Ecses []*EcsInstance `protobuf:"bytes,3,rep,name=ecses,proto3" json:"ecses,omitempty"`
|
||||
// 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询
|
||||
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"`
|
||||
}
|
||||
|
||||
|
@ -2073,7 +2073,7 @@ type ListImagesReq struct {
|
|||
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"`
|
||||
|
@ -2164,13 +2164,13 @@ type Image struct {
|
|||
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
|
||||
Id string `protobuf:"bytes,6,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ type EcsServiceClient interface {
|
|||
ListEcs(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error)
|
||||
// 查询所有云的ECS
|
||||
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)
|
||||
//查询ecs镜像
|
||||
// 查询ecs镜像
|
||||
ListEcsImages(ctx context.Context, in *ListImagesReq, opts ...grpc.CallOption) (*ListImagesResp, error)
|
||||
}
|
||||
|
||||
|
@ -149,9 +149,9 @@ type EcsServiceServer interface {
|
|||
ListEcs(context.Context, *ListReq) (*ListResp, error)
|
||||
// 查询所有云的ECS
|
||||
ListEcsAll(context.Context, *ListAllReq) (*ListResp, error)
|
||||
//操作ecs(start-stop-restart)
|
||||
// 操作ecs(start-stop-restart)
|
||||
ActionEcs(context.Context, *ActionReq) (*ActionResp, error)
|
||||
//查询ecs镜像
|
||||
// 查询ecs镜像
|
||||
ListEcsImages(context.Context, *ListImagesReq) (*ListImagesResp, error)
|
||||
mustEmbedUnimplementedEcsServiceServer()
|
||||
}
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/ecsCloudProvider",
|
||||
"title": "云名称"
|
||||
"$ref": "#/definitions/ecsCloudProvider"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
|
@ -90,8 +89,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/ecsCloudProvider",
|
||||
"title": "云类型"
|
||||
"$ref": "#/definitions/ecsCloudProvider"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
|
@ -135,8 +133,7 @@
|
|||
"title": "可用区id"
|
||||
},
|
||||
"systemDisk": {
|
||||
"$ref": "#/definitions/ecsSystemDisk",
|
||||
"title": "系统磁盘"
|
||||
"$ref": "#/definitions/ecsSystemDisk"
|
||||
},
|
||||
"amount": {
|
||||
"type": "integer",
|
||||
|
@ -152,8 +149,7 @@
|
|||
"title": "数据盘N的云盘种类。取值范围:cloud_efficiency:高效云盘;cloud_ssd:SSD云盘;cloud_essd:ESSD云盘;cloud:普通云盘。"
|
||||
},
|
||||
"internetChargeType": {
|
||||
"$ref": "#/definitions/ecsInternetChargeType",
|
||||
"title": "网络计费类型。取值范围:PayByBandwidth:按固定带宽计费。PayByTraffic(默认):按使用流量计费"
|
||||
"$ref": "#/definitions/ecsInternetChargeType"
|
||||
},
|
||||
"internetMaxBandwidthOut": {
|
||||
"type": "integer",
|
||||
|
@ -252,8 +248,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/ecsCloudProvider",
|
||||
"title": "云名称"
|
||||
"$ref": "#/definitions/ecsCloudProvider"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
|
@ -295,8 +290,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/ecsCloudProvider",
|
||||
"title": "云名称"
|
||||
"$ref": "#/definitions/ecsCloudProvider"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
|
@ -318,8 +312,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/ecsCloudProvider",
|
||||
"title": "云类型"
|
||||
"$ref": "#/definitions/ecsCloudProvider"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
|
@ -406,8 +399,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/ecsCloudProvider",
|
||||
"title": "云名称"
|
||||
"$ref": "#/definitions/ecsCloudProvider"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
|
@ -480,8 +472,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/ecsCloudProvider",
|
||||
"title": "云名称"
|
||||
"$ref": "#/definitions/ecsCloudProvider"
|
||||
},
|
||||
"images": {
|
||||
"type": "array",
|
||||
|
@ -538,8 +529,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/ecsCloudProvider",
|
||||
"title": "云名称"
|
||||
"$ref": "#/definitions/ecsCloudProvider"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
|
@ -560,14 +550,11 @@
|
|||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"typeUrl": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/submitjob"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/submitjob"
|
||||
)
|
||||
import "os/user"
|
||||
import "os"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc (unknown)
|
||||
// source: idl/tenant.proto
|
||||
|
||||
|
@ -740,9 +740,9 @@ type Region struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
//id
|
||||
// id
|
||||
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"`
|
||||
}
|
||||
|
||||
|
|
|
@ -15,14 +15,11 @@
|
|||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"typeUrl": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
|
|
Loading…
Reference in New Issue