From 384f0e577ad454f6993b9d492634892568292e5b Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Sun, 6 Nov 2022 23:16:08 -0800 Subject: [PATCH 01/11] slurmdb api for list user&list association --- adaptor/pcm_pod/server/tencent/models.go | 6 +- .../cgo_tianhe/example/get_user_info.go | 16 + .../cgo_tianhe/src/slurm/qos/get_qos_info.go | 36 + .../pcm_slurm/cgo_tianhe/src/slurm/slurm.go | 2 +- .../src/slurm/user/get_user_info.go | 90 +++ .../src/slurm/user/get_user_info_bak.go | 80 +++ .../src/slurm/user/get_user_info_new.go | 92 +++ adaptor/pcm_slurm/gen/idl/node.pb.go | 323 +++++++++ adaptor/pcm_slurm/gen/idl/slurm.pb.go | 354 +--------- adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go | 174 +++++ adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go | 76 +++ .../pcm_slurm/gen/idl/slurmdb_account.pb.go | 171 +++++ adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go | 640 ++++++++++++++++++ .../pcm_slurm/gen/idl/slurmdb_cluster.pb.go | 280 ++++++++ adaptor/pcm_slurm/gen/idl/slurmdb_coord.pb.go | 156 +++++ adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go | 470 +++++++++++++ adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go | 567 ++++++++++++++++ adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go | 210 ++++++ adaptor/pcm_slurm/gen/idl/static.pb.go | 130 ++++ .../gen/openapiv2/idl/node.swagger.json | 43 ++ .../gen/openapiv2/idl/slurm.swagger.json | 385 +++++++++++ .../idl/slurmdb_account.swagger.json | 43 ++ .../openapiv2/idl/slurmdb_assoc.swagger.json | 43 ++ .../idl/slurmdb_cluster.swagger.json | 43 ++ .../openapiv2/idl/slurmdb_coord.swagger.json | 43 ++ .../openapiv2/idl/slurmdb_qos.swagger.json | 43 ++ .../openapiv2/idl/slurmdb_user.swagger.json | 43 ++ .../openapiv2/idl/slurmdb_wckey.swagger.json | 43 ++ .../gen/openapiv2/idl/static.swagger.json | 43 ++ adaptor/pcm_slurm/idl/node.proto | 22 + adaptor/pcm_slurm/idl/slurm.proto | 30 +- adaptor/pcm_slurm/idl/slurm.yaml | 6 +- adaptor/pcm_slurm/idl/slurmdb_account.proto | 12 + adaptor/pcm_slurm/idl/slurmdb_assoc.proto | 53 ++ adaptor/pcm_slurm/idl/slurmdb_cluster.proto | 25 + adaptor/pcm_slurm/idl/slurmdb_coord.proto | 12 + adaptor/pcm_slurm/idl/slurmdb_qos.proto | 41 ++ adaptor/pcm_slurm/idl/slurmdb_user.proto | 37 + adaptor/pcm_slurm/idl/slurmdb_wckey.proto | 17 + adaptor/pcm_slurm/idl/static.proto | 12 + adaptor/pcm_slurm/server/slurm.go | 20 + adaptor/pcm_slurm/server/slurmImpl.go | 21 + adaptor/pcm_slurm/service/slurm_node.go | 227 +++++++ .../pcm_slurm/service/slurmdb_association.go | 126 ++++ adaptor/pcm_slurm/service/slurmdb_user.go | 102 +++ adaptor/pcm_slurm/service/slurmer.go | 10 +- adaptor/pcm_vm/service/harvester_util.go | 6 +- examples/slurm/get_partitions.go | 13 +- .../submit_example/submit_mpi_and_update.go | 249 +++---- .../submit_example/submit_mpi_containier.go | 217 +++--- .../submit_example/submit_openmp_container.go | 318 ++++----- tenant/gen/openapiv2/idl/tenant.swagger.json | 9 +- 52 files changed, 5478 insertions(+), 752 deletions(-) create mode 100644 adaptor/pcm_slurm/cgo_tianhe/example/get_user_info.go create mode 100644 adaptor/pcm_slurm/cgo_tianhe/src/slurm/qos/get_qos_info.go create mode 100644 adaptor/pcm_slurm/cgo_tianhe/src/slurm/user/get_user_info.go create mode 100644 adaptor/pcm_slurm/cgo_tianhe/src/slurm/user/get_user_info_bak.go create mode 100644 adaptor/pcm_slurm/cgo_tianhe/src/slurm/user/get_user_info_new.go create mode 100644 adaptor/pcm_slurm/gen/idl/node.pb.go create mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go create mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go create mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go create mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_coord.pb.go create mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go create mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go create mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go create mode 100644 adaptor/pcm_slurm/gen/idl/static.pb.go create mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/node.swagger.json create mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_account.swagger.json create mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_assoc.swagger.json create mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_cluster.swagger.json create mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_coord.swagger.json create mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_qos.swagger.json create mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_user.swagger.json create mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_wckey.swagger.json create mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/static.swagger.json create mode 100644 adaptor/pcm_slurm/idl/node.proto create mode 100644 adaptor/pcm_slurm/idl/slurmdb_account.proto create mode 100644 adaptor/pcm_slurm/idl/slurmdb_assoc.proto create mode 100644 adaptor/pcm_slurm/idl/slurmdb_cluster.proto create mode 100644 adaptor/pcm_slurm/idl/slurmdb_coord.proto create mode 100644 adaptor/pcm_slurm/idl/slurmdb_qos.proto create mode 100644 adaptor/pcm_slurm/idl/slurmdb_user.proto create mode 100644 adaptor/pcm_slurm/idl/slurmdb_wckey.proto create mode 100644 adaptor/pcm_slurm/idl/static.proto create mode 100644 adaptor/pcm_slurm/service/slurm_node.go create mode 100644 adaptor/pcm_slurm/service/slurmdb_association.go create mode 100644 adaptor/pcm_slurm/service/slurmdb_user.go diff --git a/adaptor/pcm_pod/server/tencent/models.go b/adaptor/pcm_pod/server/tencent/models.go index 637f5462..5edd6eeb 100644 --- a/adaptor/pcm_pod/server/tencent/models.go +++ b/adaptor/pcm_pod/server/tencent/models.go @@ -1285,7 +1285,7 @@ func (r *CreateClusterNodePoolFromExistingAsgResponse) FromJsonString(s string) type CreateClusterNodePoolRequest struct { *tchttp.BaseRequest - // cluster id + // user id ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` // AutoScalingGroupPara AS组参数 @@ -7604,7 +7604,7 @@ type PrometheusTemplate struct { // 模板维度,支持以下类型 // instance 实例级别 - // cluster 集群级别 + // user 集群级别 Level *string `json:"Level,omitempty" name:"Level"` // 模板描述 @@ -8210,7 +8210,7 @@ type Tag struct { type TagSpecification struct { - // 标签绑定的资源类型,当前支持类型:"cluster" + // 标签绑定的资源类型,当前支持类型:"user" // 注意:此字段可能返回 null,表示取不到有效值。 ResourceType *string `json:"ResourceType,omitempty" name:"ResourceType"` diff --git a/adaptor/pcm_slurm/cgo_tianhe/example/get_user_info.go b/adaptor/pcm_slurm/cgo_tianhe/example/get_user_info.go new file mode 100644 index 00000000..54933d64 --- /dev/null +++ b/adaptor/pcm_slurm/cgo_tianhe/example/get_user_info.go @@ -0,0 +1,16 @@ +package main + +// +//import ( +// user_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/user" +// "fmt" +//) +// +//func main() { +// +// fmt.Printf("Found user") +// +// userList := user_info.Get_all_users() +// fmt.Printf("Found %d user \n", userList.WithoutDefaults) +// +//} diff --git a/adaptor/pcm_slurm/cgo_tianhe/src/slurm/qos/get_qos_info.go b/adaptor/pcm_slurm/cgo_tianhe/src/slurm/qos/get_qos_info.go new file mode 100644 index 00000000..8b115d47 --- /dev/null +++ b/adaptor/pcm_slurm/cgo_tianhe/src/slurm/qos/get_qos_info.go @@ -0,0 +1,36 @@ +package main + +/* +#cgo LDFLAGS: -lslurmdb + +#include +#include +#include + +slurmdb_qos_rec_t Get_qos() { + + slurmdb_qos_cond_t *qos_cond = NULL; + void *conn = slurmdb_connection_get(); + List asdlist = slurmdb_qos_get(conn, qos_cond); + uint16_t size = slurm_list_count(asdlist); + slurmdb_qos_rec_t QosArray[size]; + + slurmdb_qos_rec_t *rec = NULL; + ListIterator itr = slurm_list_iterator_create(asdlist); + + int i = 0; + while ((rec = slurm_list_next(itr))) { + QosArray[i] = *rec; + i++; + } + slurm_list_destroy(asdlist); + return *QosArray; +} +*/ +import "C" +import "fmt" + +func main() { + a := C.Get_qos() + fmt.Println("name: ", C.GoString(a.name)) +} diff --git a/adaptor/pcm_slurm/cgo_tianhe/src/slurm/slurm.go b/adaptor/pcm_slurm/cgo_tianhe/src/slurm/slurm.go index 05ca7d1e..9c74545a 100644 --- a/adaptor/pcm_slurm/cgo_tianhe/src/slurm/slurm.go +++ b/adaptor/pcm_slurm/cgo_tianhe/src/slurm/slurm.go @@ -405,7 +405,7 @@ func Print_Ctl_conf(go_struct Ctl_conf) { fmt.Printf("%s:\t %d\n", "batch start timeout", go_struct.Batch_start_timeout) fmt.Printf("%s:\t %d\n", "boot time", go_struct.Boot_time) fmt.Printf("%s:\t %s\n", "checkpoint type", go_struct.Checkpoint_type) - fmt.Printf("%s:\t %s\n", "cluster name", go_struct.Cluster_name) + fmt.Printf("%s:\t %s\n", "user name", go_struct.Cluster_name) fmt.Printf("%s:\t %d\n", "complete wait", go_struct.Complete_wait) fmt.Printf("%s:\t %d\n", "debug flags", go_struct.Debug_flags) fmt.Printf("%s:\t %d\n", "def mem per cpu", go_struct.Def_mem_per_cpu) diff --git a/adaptor/pcm_slurm/cgo_tianhe/src/slurm/user/get_user_info.go b/adaptor/pcm_slurm/cgo_tianhe/src/slurm/user/get_user_info.go new file mode 100644 index 00000000..43ad2b39 --- /dev/null +++ b/adaptor/pcm_slurm/cgo_tianhe/src/slurm/user/get_user_info.go @@ -0,0 +1,90 @@ +package user + +// +///* +//#cgo LDFLAGS: -lslurmdb +// +//#include +//#include +//#include +//#include +//#include +// +//typedef struct user_info_msg { +// uint32_t record_count; +// slurmdb_user_rec_t *user_array; +//} user_info_msg_t; +// +//typedef struct slurmdb_user_rec{ +// uint16_t admin_level; +// List assoc_list; +// List coord_accts; +// char *default_acct; +// char *default_wckey; +// char *name; +// char *old_name; +// uint32_t uid; +// List wckey_list; +//} slurmdb_user_rec_t_f; +// +//struct user_info_msg get_user_info() { +// struct user_info_msg userinfo; +// List userList = NULL; +// slurmdb_user_cond_t *user_cond = NULL; +// void *db_conn; +// db_conn = slurmdb_connection_get(); +// userList = slurmdb_users_get(db_conn, user_cond); +// slurmdb_connection_close(&db_conn); +// +// slurmdb_user_rec_t *rec = NULL; +// ListIterator itr = slurm_list_iterator_create(userList); +// int i = 0; +// uint32_t length; +// length = slurm_list_count(userList); +// userinfo.record_count = length; +// userinfo.user_array = malloc(length * sizeof(slurmdb_user_rec_t)); +// while ((rec = slurm_list_next(itr))) { +// userinfo.user_array[i] = *rec; +// i++; +// } +// return userinfo; +//} +// +//struct slurmdb_user_rec *user_from_list(struct user_info_msg *list, int i) { +// return (struct slurmdb_user_rec *) &list->user_array[i]; +//} +// +//*/ +//import "C" +// +//type UserInfo struct { +// Name string +// OldName string +//} +// +//type UserInfoMsg struct { +// Last_update int64 +// Record_count uint32 +// UserInfoList []UserInfo +//} +// +//func User_descriptor_convert_c_to_go(c_struct *C.struct_slurmdb_user_rec) UserInfo { +// var go_struct UserInfo +// go_struct.Name = C.GoString(c_struct.name) +// return go_struct +//} +// +//// []slurmpb.UserInfo +//func GetUserInfo() UserInfoMsg { +// var go_user_buffer UserInfoMsg +// c_user_buffer := C.get_user_info() +// go_user_buffer.Record_count = uint32(c_user_buffer.record_count) +// go_user_buffer.UserInfoList = make([]UserInfo, c_user_buffer.record_count, c_user_buffer.record_count) +// +// for i := uint32(0); i < go_user_buffer.Record_count; i++ { +// user := C.user_from_list(&c_user_buffer, C.int(i)) +// go_user := User_descriptor_convert_c_to_go(user) +// go_user_buffer.UserInfoList[i] = go_user +// } +// return go_user_buffer +//} diff --git a/adaptor/pcm_slurm/cgo_tianhe/src/slurm/user/get_user_info_bak.go b/adaptor/pcm_slurm/cgo_tianhe/src/slurm/user/get_user_info_bak.go new file mode 100644 index 00000000..127e78fc --- /dev/null +++ b/adaptor/pcm_slurm/cgo_tianhe/src/slurm/user/get_user_info_bak.go @@ -0,0 +1,80 @@ +package user + +// +///* +//#cgo LDFLAGS: -lslurmdb +// +//#include +//#include +//#include +// +//List Get_user_List() { +// __attribute__((unused)) List slurmdb_user_rec_t = NULL; +// slurmdb_user_cond_t *user_cond = NULL; +// slurmdb_user_rec_t = slurmdb_users_get(slurmdb_connection_get(), user_cond); +// return slurmdb_user_rec_t; +//} +// +//slurmdb_user_rec_t UserArray[900]; +// +//struct slurmdb_user_rec_t *user_from_list() { +// __attribute__((unused)) List userList = NULL; +// slurmdb_user_cond_t *user_cond = NULL; +// userList = slurmdb_users_get(slurmdb_connection_get(), user_cond); +// slurmdb_user_rec_t *rec = NULL; +// ListIterator itr = slurm_list_iterator_create(userList); +// int i = 0; +// while ((rec = slurm_list_next(itr))) { +// UserArray[i] = *rec; +// i++; +// } +// return (struct slurmdb_user_rec_t *) UserArray; +//} +//*/ +//import "C" +//import ( +// "fmt" +//) +// +//type SlurmdbUsers struct { +// slurm_user []SlurmdbUser +//} +//type SlurmdbUser struct { +// admin_level uint16 /* really slurmdb_admin_level_t but for +// packing purposes needs to be uint16_t */ +// //assoc_list List /* list of slurmdb_association_rec_t *'s */ +// //coord_accts List /* list of slurmdb_coord_rec_t *'s */ +// default_acct string +// default_wckey string +// name string +// old_name string +// uid uint32 +// //wckey_list List /* list of slurmdb_wckey_rec_t *'s */ +//} +// +//func User_descriptor_convert_c_to_go(c_struct *C.slurmdb_user_rec_t) SlurmdbUser { +// var go_struct SlurmdbUser +// go_struct.name = C.GoString(c_struct.name) +// return go_struct +//} +// +//func GetUserInfo() SlurmdbUsers { +// var go_struct SlurmdbUser +// var users SlurmdbUsers +// userCount := int(C.slurm_list_count(C.Get_user_List())) +// C.user_from_list() +// SlurmdbUserList := make([]SlurmdbUser, 0) +// for i := 0; i < userCount; i++ { +// C.user_from_list() +// user := C.UserArray[i] +// go_struct = User_descriptor_convert_c_to_go(&user) +// SlurmdbUserList = append(SlurmdbUserList, go_struct) +// users.slurm_user = append(users.slurm_user, go_struct) +// } +// return users +//} +// +//func main() { +// slurmdbUser := GetUserInfo() +// fmt.Println(slurmdbUser.slurm_user[0].name) +//} diff --git a/adaptor/pcm_slurm/cgo_tianhe/src/slurm/user/get_user_info_new.go b/adaptor/pcm_slurm/cgo_tianhe/src/slurm/user/get_user_info_new.go new file mode 100644 index 00000000..d2ae8037 --- /dev/null +++ b/adaptor/pcm_slurm/cgo_tianhe/src/slurm/user/get_user_info_new.go @@ -0,0 +1,92 @@ +package user + +// +//import "C" +//import slurmpb "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" +// +///* +//#cgo LDFLAGS: -lslurmdb +// +//#include +//#include +//#include +// +// +////slurmdb_user_rec_t UserArray[10]; +// +////struct slurmdb_user_rec_t *user_from_list() { +//// +//// __attribute__((unused)) List userList = NULL; +//// slurmdb_user_cond_t *user_cond = NULL; +//// userList = slurmdb_users_get(slurmdb_connection_get(), user_cond); +//// //slurmdb_user_rec_t *rec = NULL; +//// //ListIterator itr = slurm_list_iterator_create(userList); +//// //int i = 0; +//// //while ((rec = slurm_list_next(itr))) { +//// // UserArray[i] = *rec; +//// // i++; +//// //} +//// //return (struct slurmdb_user_rec_t *) UserArray; +//// return +////} +// +//typedef struct user_info_msg { +// time_t last_update; +// uint32_t record_count; +// slurmdb_user_rec_t *user_array[10]; +//} user_info_msg_t; +// +// +//struct user_info_msg_t *user_from_list() { +// user_info_msg_t* user_buffer; +// __attribute__((unused)) List userList = NULL; +// slurmdb_user_cond_t *user_cond = NULL; +// userList = slurmdb_users_get(slurmdb_connection_get(), user_cond); +// +// slurmdb_user_rec_t *rec = NULL; +// ListIterator itr = slurm_list_iterator_create(userList); +// int i = 0; +// int length; +// length = slurm_list_count(userList); +// slurmdb_user_rec_t UserArray[length]; +// while ((rec = slurm_list_next(itr))) { +// UserArray[i]=*rec; +// user_buffer->user_array[i] = &UserArray[i]; +// i++; +// } +// return user_buffer; +//} +// +// +//*/ +//import "C" +// +//func ConvertCToGo(cStruct *C.slurmdb_user_rec_t) slurmpb.UserInfo { +// var goStruct slurmpb.UserInfo +// goStruct.Name = C.GoString(cStruct.name) +// return goStruct +//} +// +//func GetUserInfo() slurmpb.UserInfoList { +// var users slurmpb.UserInfoList +// var goStruct slurmpb.UserInfo +// //userCount := int(C.slurm_list_count(C.Get_user_List())) +// c_users_buffer := C.user_from_list() +// println(c_users_buffer) +// SlurmUserList := make([]slurmpb.UserInfo, 0) +// for i := 0; i < 2; i++ { +// //c_users_buffer := C.user_from_list() +// //println(c_users_buffer) +// C.user_from_list() +// //user := C.UserArray[i] +// //goStruct = ConvertCToGo(&user) +// SlurmUserList = append(SlurmUserList, goStruct) +// users.UserInfos = append(users.UserInfos, &goStruct) +// } +// return users +//} +// +//func main() { +// users := GetUserInfo() +// println(users.UserInfos[0].Name) +//} diff --git a/adaptor/pcm_slurm/gen/idl/node.pb.go b/adaptor/pcm_slurm/gen/idl/node.pb.go new file mode 100644 index 00000000..33d0b4a8 --- /dev/null +++ b/adaptor/pcm_slurm/gen/idl/node.pb.go @@ -0,0 +1,323 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc (unknown) +// source: idl/node.proto + +package slurmpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ListNodesReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` +} + +func (x *ListNodesReq) Reset() { + *x = ListNodesReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_node_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNodesReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNodesReq) ProtoMessage() {} + +func (x *ListNodesReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_node_proto_msgTypes[0] + 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 ListNodesReq.ProtoReflect.Descriptor instead. +func (*ListNodesReq) Descriptor() ([]byte, []int) { + return file_idl_node_proto_rawDescGZIP(), []int{0} +} + +func (x *ListNodesReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +type NodeInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Boards int32 `protobuf:"varint,1,opt,name=boards,proto3" json:"boards,omitempty"` + Cpus int32 `protobuf:"varint,2,opt,name=cpus,proto3" json:"cpus,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + RealMemory int32 `protobuf:"varint,4,opt,name=realMemory,proto3" json:"realMemory,omitempty"` + Sockets int32 `protobuf:"varint,5,opt,name=sockets,proto3" json:"sockets,omitempty"` + Threads int32 `protobuf:"varint,6,opt,name=threads,proto3" json:"threads,omitempty"` +} + +func (x *NodeInfo) Reset() { + *x = NodeInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_node_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeInfo) ProtoMessage() {} + +func (x *NodeInfo) ProtoReflect() protoreflect.Message { + mi := &file_idl_node_proto_msgTypes[1] + 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 NodeInfo.ProtoReflect.Descriptor instead. +func (*NodeInfo) Descriptor() ([]byte, []int) { + return file_idl_node_proto_rawDescGZIP(), []int{1} +} + +func (x *NodeInfo) GetBoards() int32 { + if x != nil { + return x.Boards + } + return 0 +} + +func (x *NodeInfo) GetCpus() int32 { + if x != nil { + return x.Cpus + } + return 0 +} + +func (x *NodeInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *NodeInfo) GetRealMemory() int32 { + if x != nil { + return x.RealMemory + } + return 0 +} + +func (x *NodeInfo) GetSockets() int32 { + if x != nil { + return x.Sockets + } + return 0 +} + +func (x *NodeInfo) GetThreads() int32 { + if x != nil { + return x.Threads + } + return 0 +} + +type ListNodesResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeInfos []*NodeInfo `protobuf:"bytes,1,rep,name=node_infos,json=nodeInfos,proto3" json:"node_infos,omitempty"` +} + +func (x *ListNodesResp) Reset() { + *x = ListNodesResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_node_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNodesResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNodesResp) ProtoMessage() {} + +func (x *ListNodesResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_node_proto_msgTypes[2] + 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 ListNodesResp.ProtoReflect.Descriptor instead. +func (*ListNodesResp) Descriptor() ([]byte, []int) { + return file_idl_node_proto_rawDescGZIP(), []int{2} +} + +func (x *ListNodesResp) GetNodeInfos() []*NodeInfo { + if x != nil { + return x.NodeInfos + } + return nil +} + +var File_idl_node_proto protoreflect.FileDescriptor + +var file_idl_node_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x69, 0x64, 0x6c, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x48, 0x0a, 0x0c, 0x4c, 0x69, 0x73, + 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 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, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_idl_node_proto_rawDescOnce sync.Once + file_idl_node_proto_rawDescData = file_idl_node_proto_rawDesc +) + +func file_idl_node_proto_rawDescGZIP() []byte { + file_idl_node_proto_rawDescOnce.Do(func() { + file_idl_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_node_proto_rawDescData) + }) + return file_idl_node_proto_rawDescData +} + +var file_idl_node_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_idl_node_proto_goTypes = []interface{}{ + (*ListNodesReq)(nil), // 0: slurm.ListNodesReq + (*NodeInfo)(nil), // 1: slurm.NodeInfo + (*ListNodesResp)(nil), // 2: slurm.ListNodesResp + (SlurmVersion)(0), // 3: slurm.SlurmVersion +} +var file_idl_node_proto_depIdxs = []int32{ + 3, // 0: slurm.ListNodesReq.slurm_version:type_name -> slurm.SlurmVersion + 1, // 1: slurm.ListNodesResp.node_infos:type_name -> slurm.NodeInfo + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_idl_node_proto_init() } +func file_idl_node_proto_init() { + if File_idl_node_proto != nil { + return + } + file_idl_static_proto_init() + if !protoimpl.UnsafeEnabled { + file_idl_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNodesReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_node_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_node_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNodesResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_idl_node_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_idl_node_proto_goTypes, + DependencyIndexes: file_idl_node_proto_depIdxs, + MessageInfos: file_idl_node_proto_msgTypes, + }.Build() + File_idl_node_proto = out.File + file_idl_node_proto_rawDesc = nil + file_idl_node_proto_goTypes = nil + file_idl_node_proto_depIdxs = nil +} diff --git a/adaptor/pcm_slurm/gen/idl/slurm.pb.go b/adaptor/pcm_slurm/gen/idl/slurm.pb.go index d4aba9e4..925c362b 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurm.pb.go @@ -10,7 +10,6 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" - sync "sync" ) const ( @@ -20,293 +19,51 @@ 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() { - *x = ListNodesReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurm_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNodesReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNodesReq) ProtoMessage() {} - -func (x *ListNodesReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurm_proto_msgTypes[0] - 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 ListNodesReq.ProtoReflect.Descriptor instead. -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 - unknownFields protoimpl.UnknownFields - - Boards int32 `protobuf:"varint,1,opt,name=boards,proto3" json:"boards,omitempty"` - Cpus int32 `protobuf:"varint,2,opt,name=cpus,proto3" json:"cpus,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - RealMemory int32 `protobuf:"varint,4,opt,name=realMemory,proto3" json:"realMemory,omitempty"` - Sockets int32 `protobuf:"varint,5,opt,name=sockets,proto3" json:"sockets,omitempty"` - Threads int32 `protobuf:"varint,6,opt,name=threads,proto3" json:"threads,omitempty"` -} - -func (x *NodeInfo) Reset() { - *x = NodeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurm_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeInfo) ProtoMessage() {} - -func (x *NodeInfo) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurm_proto_msgTypes[1] - 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 NodeInfo.ProtoReflect.Descriptor instead. -func (*NodeInfo) Descriptor() ([]byte, []int) { - return file_idl_slurm_proto_rawDescGZIP(), []int{1} -} - -func (x *NodeInfo) GetBoards() int32 { - if x != nil { - return x.Boards - } - return 0 -} - -func (x *NodeInfo) GetCpus() int32 { - if x != nil { - return x.Cpus - } - return 0 -} - -func (x *NodeInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *NodeInfo) GetRealMemory() int32 { - if x != nil { - return x.RealMemory - } - return 0 -} - -func (x *NodeInfo) GetSockets() int32 { - if x != nil { - return x.Sockets - } - return 0 -} - -func (x *NodeInfo) GetThreads() int32 { - if x != nil { - return x.Threads - } - return 0 -} - -type ListNodesResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NodeInfos []*NodeInfo `protobuf:"bytes,1,rep,name=node_infos,json=nodeInfos,proto3" json:"node_infos,omitempty"` -} - -func (x *ListNodesResp) Reset() { - *x = ListNodesResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurm_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNodesResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNodesResp) ProtoMessage() {} - -func (x *ListNodesResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurm_proto_msgTypes[2] - 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 ListNodesResp.ProtoReflect.Descriptor instead. -func (*ListNodesResp) Descriptor() ([]byte, []int) { - return file_idl_slurm_proto_rawDescGZIP(), []int{2} -} - -func (x *ListNodesResp) GetNodeInfos() []*NodeInfo { - if x != nil { - return x.NodeInfos - } - return nil -} - 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, 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, + 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x1a, 0x0e, 0x69, 0x64, 0x6c, 0x2f, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xcb, 0x01, 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, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x70, 0x12, 0x36, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, + 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x10, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, + 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, + 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var ( - file_idl_slurm_proto_rawDescOnce sync.Once - file_idl_slurm_proto_rawDescData = file_idl_slurm_proto_rawDesc -) - -func file_idl_slurm_proto_rawDescGZIP() []byte { - file_idl_slurm_proto_rawDescOnce.Do(func() { - file_idl_slurm_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurm_proto_rawDescData) - }) - 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{}{ - (SlurmVersion)(0), // 0: slurm.SlurmVersion - (*ListNodesReq)(nil), // 1: slurm.ListNodesReq - (*NodeInfo)(nil), // 2: slurm.NodeInfo - (*ListNodesResp)(nil), // 3: slurm.ListNodesResp + (*ListNodesReq)(nil), // 0: slurm.ListNodesReq + (*ListUsersReq)(nil), // 1: slurm.ListUsersReq + (*ListAssociationsReq)(nil), // 2: slurm.ListAssociationsReq + (*ListNodesResp)(nil), // 3: slurm.ListNodesResp + (*ListUsersResp)(nil), // 4: slurm.ListUsersResp + (*ListAssociationsResp)(nil), // 5: slurm.ListAssociationsResp } var file_idl_slurm_proto_depIdxs = []int32{ - 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 - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 0, // 0: slurm.SlurmService.ListNodes:input_type -> slurm.ListNodesReq + 1, // 1: slurm.SlurmService.ListUsers:input_type -> slurm.ListUsersReq + 2, // 2: slurm.SlurmService.ListAssociations:input_type -> slurm.ListAssociationsReq + 3, // 3: slurm.SlurmService.ListNodes:output_type -> slurm.ListNodesResp + 4, // 4: slurm.SlurmService.ListUsers:output_type -> slurm.ListUsersResp + 5, // 5: slurm.SlurmService.ListAssociations:output_type -> slurm.ListAssociationsResp + 3, // [3:6] is the sub-list for method output_type + 0, // [0:3] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_idl_slurm_proto_init() } @@ -314,58 +71,21 @@ func file_idl_slurm_proto_init() { if File_idl_slurm_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_idl_slurm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodesReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurm_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodesResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } + file_idl_node_proto_init() + file_idl_slurmdb_user_proto_init() + file_idl_slurmdb_assoc_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_slurm_proto_rawDesc, - NumEnums: 1, - NumMessages: 3, + NumEnums: 0, + NumMessages: 0, 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 file_idl_slurm_proto_rawDesc = nil diff --git a/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go b/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go index 81b1967e..3d7cee0e 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go +++ b/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go @@ -67,6 +67,78 @@ func local_request_SlurmService_ListNodes_0(ctx context.Context, marshaler runti } +var ( + filter_SlurmService_ListUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SlurmService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListUsersReq + 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_ListUsers_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SlurmService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListUsersReq + 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_ListUsers_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListUsers(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_SlurmService_ListAssociations_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SlurmService_ListAssociations_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListAssociationsReq + 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_ListAssociations_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListAssociations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SlurmService_ListAssociations_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListAssociationsReq + 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_ListAssociations_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListAssociations(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterSlurmServiceHandlerServer registers the http handlers for service SlurmService to "mux". // UnaryRPC :call SlurmServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -98,6 +170,56 @@ func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_SlurmService_ListUsers_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, "/slurm.SlurmService/ListUsers", runtime.WithHTTPPathPattern("/apis/slurm/listUsers")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SlurmService_ListUsers_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_SlurmService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SlurmService_ListAssociations_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, "/slurm.SlurmService/ListAssociations", runtime.WithHTTPPathPattern("/apis/slurm/listAssociations")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SlurmService_ListAssociations_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_SlurmService_ListAssociations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -161,13 +283,65 @@ func RegisterSlurmServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_SlurmService_ListUsers_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, "/slurm.SlurmService/ListUsers", runtime.WithHTTPPathPattern("/apis/slurm/listUsers")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SlurmService_ListUsers_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SlurmService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SlurmService_ListAssociations_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, "/slurm.SlurmService/ListAssociations", runtime.WithHTTPPathPattern("/apis/slurm/listAssociations")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SlurmService_ListAssociations_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SlurmService_ListAssociations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( pattern_SlurmService_ListNodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listNodes"}, "")) + + pattern_SlurmService_ListUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listUsers"}, "")) + + pattern_SlurmService_ListAssociations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listAssociations"}, "")) ) var ( forward_SlurmService_ListNodes_0 = runtime.ForwardResponseMessage + + forward_SlurmService_ListUsers_0 = runtime.ForwardResponseMessage + + forward_SlurmService_ListAssociations_0 = runtime.ForwardResponseMessage ) diff --git a/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go b/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go index 9701ba9b..31156ec9 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go @@ -24,6 +24,10 @@ const _ = grpc.SupportPackageIsVersion7 type SlurmServiceClient interface { // Echo 样例接口 ListNodes(ctx context.Context, in *ListNodesReq, opts ...grpc.CallOption) (*ListNodesResp, error) + // get user info from slurmdb + ListUsers(ctx context.Context, in *ListUsersReq, opts ...grpc.CallOption) (*ListUsersResp, error) + // get association info from slurmdb + ListAssociations(ctx context.Context, in *ListAssociationsReq, opts ...grpc.CallOption) (*ListAssociationsResp, error) } type slurmServiceClient struct { @@ -43,12 +47,34 @@ func (c *slurmServiceClient) ListNodes(ctx context.Context, in *ListNodesReq, op return out, nil } +func (c *slurmServiceClient) ListUsers(ctx context.Context, in *ListUsersReq, opts ...grpc.CallOption) (*ListUsersResp, error) { + out := new(ListUsersResp) + err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListUsers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *slurmServiceClient) ListAssociations(ctx context.Context, in *ListAssociationsReq, opts ...grpc.CallOption) (*ListAssociationsResp, error) { + out := new(ListAssociationsResp) + err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListAssociations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SlurmServiceServer is the server API for SlurmService service. // All implementations must embed UnimplementedSlurmServiceServer // for forward compatibility type SlurmServiceServer interface { // Echo 样例接口 ListNodes(context.Context, *ListNodesReq) (*ListNodesResp, error) + // get user info from slurmdb + ListUsers(context.Context, *ListUsersReq) (*ListUsersResp, error) + // get association info from slurmdb + ListAssociations(context.Context, *ListAssociationsReq) (*ListAssociationsResp, error) mustEmbedUnimplementedSlurmServiceServer() } @@ -59,6 +85,12 @@ type UnimplementedSlurmServiceServer struct { func (UnimplementedSlurmServiceServer) ListNodes(context.Context, *ListNodesReq) (*ListNodesResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") } +func (UnimplementedSlurmServiceServer) ListUsers(context.Context, *ListUsersReq) (*ListUsersResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented") +} +func (UnimplementedSlurmServiceServer) ListAssociations(context.Context, *ListAssociationsReq) (*ListAssociationsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAssociations not implemented") +} func (UnimplementedSlurmServiceServer) mustEmbedUnimplementedSlurmServiceServer() {} // UnsafeSlurmServiceServer may be embedded to opt out of forward compatibility for this service. @@ -90,6 +122,42 @@ func _SlurmService_ListNodes_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _SlurmService_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListUsersReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmServiceServer).ListUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurm.SlurmService/ListUsers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmServiceServer).ListUsers(ctx, req.(*ListUsersReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _SlurmService_ListAssociations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAssociationsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmServiceServer).ListAssociations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurm.SlurmService/ListAssociations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmServiceServer).ListAssociations(ctx, req.(*ListAssociationsReq)) + } + return interceptor(ctx, in, info, handler) +} + // SlurmService_ServiceDesc is the grpc.ServiceDesc for SlurmService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -101,6 +169,14 @@ var SlurmService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListNodes", Handler: _SlurmService_ListNodes_Handler, }, + { + MethodName: "ListUsers", + Handler: _SlurmService_ListUsers_Handler, + }, + { + MethodName: "ListAssociations", + Handler: _SlurmService_ListAssociations_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "idl/slurm.proto", diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go new file mode 100644 index 00000000..66b251d5 --- /dev/null +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go @@ -0,0 +1,171 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc (unknown) +// source: idl/slurmdb_account.proto + +package slurmpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AccountingInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AllocSecs int64 `protobuf:"varint,1,opt,name=allocSecs,proto3" json:"allocSecs,omitempty"` + Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + PeriodStart *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=periodStart,proto3" json:"periodStart,omitempty"` +} + +func (x *AccountingInfo) Reset() { + *x = AccountingInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_account_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountingInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountingInfo) ProtoMessage() {} + +func (x *AccountingInfo) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_account_proto_msgTypes[0] + 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 AccountingInfo.ProtoReflect.Descriptor instead. +func (*AccountingInfo) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{0} +} + +func (x *AccountingInfo) GetAllocSecs() int64 { + if x != nil { + return x.AllocSecs + } + return 0 +} + +func (x *AccountingInfo) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *AccountingInfo) GetPeriodStart() *timestamppb.Timestamp { + if x != nil { + return x.PeriodStart + } + return nil +} + +var File_idl_slurmdb_account_proto protoreflect.FileDescriptor + +var file_idl_slurmdb_account_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x63, + 0x53, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, + 0x63, 0x53, 0x65, 0x63, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_idl_slurmdb_account_proto_rawDescOnce sync.Once + file_idl_slurmdb_account_proto_rawDescData = file_idl_slurmdb_account_proto_rawDesc +) + +func file_idl_slurmdb_account_proto_rawDescGZIP() []byte { + file_idl_slurmdb_account_proto_rawDescOnce.Do(func() { + file_idl_slurmdb_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_account_proto_rawDescData) + }) + return file_idl_slurmdb_account_proto_rawDescData +} + +var file_idl_slurmdb_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_idl_slurmdb_account_proto_goTypes = []interface{}{ + (*AccountingInfo)(nil), // 0: slurm.AccountingInfo + (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp +} +var file_idl_slurmdb_account_proto_depIdxs = []int32{ + 1, // 0: slurm.AccountingInfo.periodStart:type_name -> google.protobuf.Timestamp + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_idl_slurmdb_account_proto_init() } +func file_idl_slurmdb_account_proto_init() { + if File_idl_slurmdb_account_proto != nil { + return + } + file_idl_static_proto_init() + if !protoimpl.UnsafeEnabled { + file_idl_slurmdb_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountingInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_idl_slurmdb_account_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_idl_slurmdb_account_proto_goTypes, + DependencyIndexes: file_idl_slurmdb_account_proto_depIdxs, + MessageInfos: file_idl_slurmdb_account_proto_msgTypes, + }.Build() + File_idl_slurmdb_account_proto = out.File + file_idl_slurmdb_account_proto_rawDesc = nil + file_idl_slurmdb_account_proto_goTypes = nil + file_idl_slurmdb_account_proto_depIdxs = nil +} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go new file mode 100644 index 00000000..7f1f9cc4 --- /dev/null +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go @@ -0,0 +1,640 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc (unknown) +// source: idl/slurmdb_assoc.proto + +package slurmpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AssocUsageInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AssocUsageInfo) Reset() { + *x = AssocUsageInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssocUsageInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssocUsageInfo) ProtoMessage() {} + +func (x *AssocUsageInfo) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[0] + 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 AssocUsageInfo.ProtoReflect.Descriptor instead. +func (*AssocUsageInfo) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{0} +} + +type AssociationInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountingList []*AccountingInfo `protobuf:"bytes,1,rep,name=accountingList,proto3" json:"accountingList,omitempty"` + Acct string `protobuf:"bytes,2,opt,name=acct,proto3" json:"acct,omitempty"` + Cluster string `protobuf:"bytes,3,opt,name=cluster,proto3" json:"cluster,omitempty"` + DefQosId int32 `protobuf:"varint,4,opt,name=defQosId,proto3" json:"defQosId,omitempty"` + GrpCpuMins int64 `protobuf:"varint,5,opt,name=grpCpuMins,proto3" json:"grpCpuMins,omitempty"` + GrpGpuRunMins int64 `protobuf:"varint,6,opt,name=grpGpuRunMins,proto3" json:"grpGpuRunMins,omitempty"` + GrpCpus int32 `protobuf:"varint,7,opt,name=grpCpus,proto3" json:"grpCpus,omitempty"` + GrpJobs int32 `protobuf:"varint,8,opt,name=grpJobs,proto3" json:"grpJobs,omitempty"` + GrpMem int32 `protobuf:"varint,9,opt,name=grpMem,proto3" json:"grpMem,omitempty"` + GrpNodes int32 `protobuf:"varint,10,opt,name=grpNodes,proto3" json:"grpNodes,omitempty"` + GrpSubmitJobs int32 `protobuf:"varint,11,opt,name=grpSubmitJobs,proto3" json:"grpSubmitJobs,omitempty"` + GrpWall int32 `protobuf:"varint,12,opt,name=grpWall,proto3" json:"grpWall,omitempty"` + Id int32 `protobuf:"varint,13,opt,name=id,proto3" json:"id,omitempty"` + IsDef int32 `protobuf:"varint,14,opt,name=isDef,proto3" json:"isDef,omitempty"` + Lft int32 `protobuf:"varint,15,opt,name=lft,proto3" json:"lft,omitempty"` + MaxCpuMinsPj int64 `protobuf:"varint,16,opt,name=maxCpuMinsPj,proto3" json:"maxCpuMinsPj,omitempty"` + MaxCpuRunMins int64 `protobuf:"varint,17,opt,name=maxCpuRunMins,proto3" json:"maxCpuRunMins,omitempty"` + MaxCpusPj int32 `protobuf:"varint,18,opt,name=maxCpusPj,proto3" json:"maxCpusPj,omitempty"` + MaxJobs int32 `protobuf:"varint,19,opt,name=maxJobs,proto3" json:"maxJobs,omitempty"` + MaxNodesPj int32 `protobuf:"varint,20,opt,name=maxNodesPj,proto3" json:"maxNodesPj,omitempty"` + MaxSubmitJobs int32 `protobuf:"varint,21,opt,name=maxSubmitJobs,proto3" json:"maxSubmitJobs,omitempty"` + MaxWallPj int32 `protobuf:"varint,22,opt,name=maxWallPj,proto3" json:"maxWallPj,omitempty"` + ParentAcct string `protobuf:"bytes,23,opt,name=parentAcct,proto3" json:"parentAcct,omitempty"` + ParentId int32 `protobuf:"varint,24,opt,name=parentId,proto3" json:"parentId,omitempty"` + Partition string `protobuf:"bytes,25,opt,name=partition,proto3" json:"partition,omitempty"` + QosList []*QosInfo `protobuf:"bytes,26,rep,name=qosList,proto3" json:"qosList,omitempty"` + Rgt int32 `protobuf:"varint,27,opt,name=rgt,proto3" json:"rgt,omitempty"` + SharesRaw int32 `protobuf:"varint,28,opt,name=sharesRaw,proto3" json:"sharesRaw,omitempty"` + Uid int32 `protobuf:"varint,29,opt,name=uid,proto3" json:"uid,omitempty"` + AssocUsage *AssocUsageInfo `protobuf:"bytes,30,opt,name=assocUsage,proto3" json:"assocUsage,omitempty"` + User string `protobuf:"bytes,31,opt,name=user,proto3" json:"user,omitempty"` +} + +func (x *AssociationInfo) Reset() { + *x = AssociationInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssociationInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssociationInfo) ProtoMessage() {} + +func (x *AssociationInfo) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[1] + 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 AssociationInfo.ProtoReflect.Descriptor instead. +func (*AssociationInfo) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{1} +} + +func (x *AssociationInfo) GetAccountingList() []*AccountingInfo { + if x != nil { + return x.AccountingList + } + return nil +} + +func (x *AssociationInfo) GetAcct() string { + if x != nil { + return x.Acct + } + return "" +} + +func (x *AssociationInfo) GetCluster() string { + if x != nil { + return x.Cluster + } + return "" +} + +func (x *AssociationInfo) GetDefQosId() int32 { + if x != nil { + return x.DefQosId + } + return 0 +} + +func (x *AssociationInfo) GetGrpCpuMins() int64 { + if x != nil { + return x.GrpCpuMins + } + return 0 +} + +func (x *AssociationInfo) GetGrpGpuRunMins() int64 { + if x != nil { + return x.GrpGpuRunMins + } + return 0 +} + +func (x *AssociationInfo) GetGrpCpus() int32 { + if x != nil { + return x.GrpCpus + } + return 0 +} + +func (x *AssociationInfo) GetGrpJobs() int32 { + if x != nil { + return x.GrpJobs + } + return 0 +} + +func (x *AssociationInfo) GetGrpMem() int32 { + if x != nil { + return x.GrpMem + } + return 0 +} + +func (x *AssociationInfo) GetGrpNodes() int32 { + if x != nil { + return x.GrpNodes + } + return 0 +} + +func (x *AssociationInfo) GetGrpSubmitJobs() int32 { + if x != nil { + return x.GrpSubmitJobs + } + return 0 +} + +func (x *AssociationInfo) GetGrpWall() int32 { + if x != nil { + return x.GrpWall + } + return 0 +} + +func (x *AssociationInfo) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *AssociationInfo) GetIsDef() int32 { + if x != nil { + return x.IsDef + } + return 0 +} + +func (x *AssociationInfo) GetLft() int32 { + if x != nil { + return x.Lft + } + return 0 +} + +func (x *AssociationInfo) GetMaxCpuMinsPj() int64 { + if x != nil { + return x.MaxCpuMinsPj + } + return 0 +} + +func (x *AssociationInfo) GetMaxCpuRunMins() int64 { + if x != nil { + return x.MaxCpuRunMins + } + return 0 +} + +func (x *AssociationInfo) GetMaxCpusPj() int32 { + if x != nil { + return x.MaxCpusPj + } + return 0 +} + +func (x *AssociationInfo) GetMaxJobs() int32 { + if x != nil { + return x.MaxJobs + } + return 0 +} + +func (x *AssociationInfo) GetMaxNodesPj() int32 { + if x != nil { + return x.MaxNodesPj + } + return 0 +} + +func (x *AssociationInfo) GetMaxSubmitJobs() int32 { + if x != nil { + return x.MaxSubmitJobs + } + return 0 +} + +func (x *AssociationInfo) GetMaxWallPj() int32 { + if x != nil { + return x.MaxWallPj + } + return 0 +} + +func (x *AssociationInfo) GetParentAcct() string { + if x != nil { + return x.ParentAcct + } + return "" +} + +func (x *AssociationInfo) GetParentId() int32 { + if x != nil { + return x.ParentId + } + return 0 +} + +func (x *AssociationInfo) GetPartition() string { + if x != nil { + return x.Partition + } + return "" +} + +func (x *AssociationInfo) GetQosList() []*QosInfo { + if x != nil { + return x.QosList + } + return nil +} + +func (x *AssociationInfo) GetRgt() int32 { + if x != nil { + return x.Rgt + } + return 0 +} + +func (x *AssociationInfo) GetSharesRaw() int32 { + if x != nil { + return x.SharesRaw + } + return 0 +} + +func (x *AssociationInfo) GetUid() int32 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *AssociationInfo) GetAssocUsage() *AssocUsageInfo { + if x != nil { + return x.AssocUsage + } + return nil +} + +func (x *AssociationInfo) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +type ListAssociationsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` +} + +func (x *ListAssociationsReq) Reset() { + *x = ListAssociationsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAssociationsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAssociationsReq) ProtoMessage() {} + +func (x *ListAssociationsReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[2] + 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 ListAssociationsReq.ProtoReflect.Descriptor instead. +func (*ListAssociationsReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{2} +} + +func (x *ListAssociationsReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +type ListAssociationsResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AssocInfos []*AssociationInfo `protobuf:"bytes,1,rep,name=assoc_infos,json=assocInfos,proto3" json:"assoc_infos,omitempty"` +} + +func (x *ListAssociationsResp) Reset() { + *x = ListAssociationsResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAssociationsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAssociationsResp) ProtoMessage() {} + +func (x *ListAssociationsResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[3] + 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 ListAssociationsResp.ProtoReflect.Descriptor instead. +func (*ListAssociationsResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{3} +} + +func (x *ListAssociationsResp) GetAssocInfos() []*AssociationInfo { + if x != nil { + return x.AssocInfos + } + return nil +} + +var File_idl_slurmdb_assoc_proto protoreflect.FileDescriptor + +var file_idl_slurmdb_assoc_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, + 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, + 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x71, 0x6f, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x10, 0x0a, 0x0e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x55, 0x73, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xb7, 0x07, 0x0a, 0x0f, 0x41, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x63, + 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x63, 0x63, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x51, + 0x6f, 0x73, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x66, 0x51, + 0x6f, 0x73, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x4d, 0x69, + 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, + 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x47, 0x70, 0x75, 0x52, 0x75, + 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x72, 0x70, + 0x47, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, + 0x70, 0x43, 0x70, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, + 0x43, 0x70, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, 0x62, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x4e, 0x6f, 0x64, + 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x70, 0x4e, 0x6f, 0x64, + 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, + 0x6f, 0x62, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x70, 0x57, + 0x61, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x57, 0x61, + 0x6c, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x44, 0x65, 0x66, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x69, 0x73, 0x44, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x66, 0x74, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6c, 0x66, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61, + 0x78, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x50, 0x6a, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x50, 0x6a, 0x12, 0x24, + 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, + 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x50, + 0x6a, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, + 0x50, 0x6a, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x18, 0x13, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x1e, 0x0a, 0x0a, + 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x12, 0x24, 0x0a, 0x0d, + 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, + 0x62, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, 0x50, 0x6a, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, 0x50, 0x6a, + 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x74, 0x18, 0x17, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x18, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x07, 0x71, 0x6f, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x2e, 0x51, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x71, 0x6f, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x67, 0x74, 0x18, 0x1b, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x72, 0x67, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, + 0x52, 0x61, 0x77, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, + 0x73, 0x52, 0x61, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x55, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, + 0x72, 0x22, 0x4f, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, + 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0x4f, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x49, 0x6e, + 0x66, 0x6f, 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_idl_slurmdb_assoc_proto_rawDescOnce sync.Once + file_idl_slurmdb_assoc_proto_rawDescData = file_idl_slurmdb_assoc_proto_rawDesc +) + +func file_idl_slurmdb_assoc_proto_rawDescGZIP() []byte { + file_idl_slurmdb_assoc_proto_rawDescOnce.Do(func() { + file_idl_slurmdb_assoc_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_assoc_proto_rawDescData) + }) + return file_idl_slurmdb_assoc_proto_rawDescData +} + +var file_idl_slurmdb_assoc_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_idl_slurmdb_assoc_proto_goTypes = []interface{}{ + (*AssocUsageInfo)(nil), // 0: slurm.AssocUsageInfo + (*AssociationInfo)(nil), // 1: slurm.AssociationInfo + (*ListAssociationsReq)(nil), // 2: slurm.ListAssociationsReq + (*ListAssociationsResp)(nil), // 3: slurm.ListAssociationsResp + (*AccountingInfo)(nil), // 4: slurm.AccountingInfo + (*QosInfo)(nil), // 5: slurm.QosInfo + (SlurmVersion)(0), // 6: slurm.SlurmVersion +} +var file_idl_slurmdb_assoc_proto_depIdxs = []int32{ + 4, // 0: slurm.AssociationInfo.accountingList:type_name -> slurm.AccountingInfo + 5, // 1: slurm.AssociationInfo.qosList:type_name -> slurm.QosInfo + 0, // 2: slurm.AssociationInfo.assocUsage:type_name -> slurm.AssocUsageInfo + 6, // 3: slurm.ListAssociationsReq.slurm_version:type_name -> slurm.SlurmVersion + 1, // 4: slurm.ListAssociationsResp.assoc_infos:type_name -> slurm.AssociationInfo + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_idl_slurmdb_assoc_proto_init() } +func file_idl_slurmdb_assoc_proto_init() { + if File_idl_slurmdb_assoc_proto != nil { + return + } + file_idl_static_proto_init() + file_idl_slurmdb_account_proto_init() + file_idl_slurmdb_qos_proto_init() + if !protoimpl.UnsafeEnabled { + file_idl_slurmdb_assoc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssocUsageInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_assoc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssociationInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_assoc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAssociationsReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_assoc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAssociationsResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_idl_slurmdb_assoc_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_idl_slurmdb_assoc_proto_goTypes, + DependencyIndexes: file_idl_slurmdb_assoc_proto_depIdxs, + MessageInfos: file_idl_slurmdb_assoc_proto_msgTypes, + }.Build() + File_idl_slurmdb_assoc_proto = out.File + file_idl_slurmdb_assoc_proto_rawDesc = nil + file_idl_slurmdb_assoc_proto_goTypes = nil + file_idl_slurmdb_assoc_proto_depIdxs = nil +} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go new file mode 100644 index 00000000..25d8c0e4 --- /dev/null +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go @@ -0,0 +1,280 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc (unknown) +// source: idl/slurmdb_cluster.proto + +package slurmpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ClusterInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountingList []*AccountingInfo `protobuf:"bytes,1,rep,name=accountingList,proto3" json:"accountingList,omitempty"` + Classification int32 `protobuf:"varint,2,opt,name=classification,proto3" json:"classification,omitempty"` + // slurm_addr_t control_addr; + ControlHost string `protobuf:"bytes,3,opt,name=controlHost,proto3" json:"controlHost,omitempty"` + ControlPort int32 `protobuf:"varint,4,opt,name=controlPort,proto3" json:"controlPort,omitempty"` + CpuCount int32 `protobuf:"varint,5,opt,name=cpuCount,proto3" json:"cpuCount,omitempty"` + Dimensions int32 `protobuf:"varint,6,opt,name=dimensions,proto3" json:"dimensions,omitempty"` + DimSize int32 `protobuf:"varint,7,opt,name=dimSize,proto3" json:"dimSize,omitempty"` + Flags int32 `protobuf:"varint,8,opt,name=flags,proto3" json:"flags,omitempty"` + Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"` + Nodes string `protobuf:"bytes,10,opt,name=nodes,proto3" json:"nodes,omitempty"` + PluginIdSelect int32 `protobuf:"varint,11,opt,name=pluginIdSelect,proto3" json:"pluginIdSelect,omitempty"` + RootAssoc *AssociationInfo `protobuf:"bytes,12,opt,name=rootAssoc,proto3" json:"rootAssoc,omitempty"` + RpcVersion int32 `protobuf:"varint,13,opt,name=rpcVersion,proto3" json:"rpcVersion,omitempty"` +} + +func (x *ClusterInfo) Reset() { + *x = ClusterInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterInfo) ProtoMessage() {} + +func (x *ClusterInfo) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_cluster_proto_msgTypes[0] + 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 ClusterInfo.ProtoReflect.Descriptor instead. +func (*ClusterInfo) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *ClusterInfo) GetAccountingList() []*AccountingInfo { + if x != nil { + return x.AccountingList + } + return nil +} + +func (x *ClusterInfo) GetClassification() int32 { + if x != nil { + return x.Classification + } + return 0 +} + +func (x *ClusterInfo) GetControlHost() string { + if x != nil { + return x.ControlHost + } + return "" +} + +func (x *ClusterInfo) GetControlPort() int32 { + if x != nil { + return x.ControlPort + } + return 0 +} + +func (x *ClusterInfo) GetCpuCount() int32 { + if x != nil { + return x.CpuCount + } + return 0 +} + +func (x *ClusterInfo) GetDimensions() int32 { + if x != nil { + return x.Dimensions + } + return 0 +} + +func (x *ClusterInfo) GetDimSize() int32 { + if x != nil { + return x.DimSize + } + return 0 +} + +func (x *ClusterInfo) GetFlags() int32 { + if x != nil { + return x.Flags + } + return 0 +} + +func (x *ClusterInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ClusterInfo) GetNodes() string { + if x != nil { + return x.Nodes + } + return "" +} + +func (x *ClusterInfo) GetPluginIdSelect() int32 { + if x != nil { + return x.PluginIdSelect + } + return 0 +} + +func (x *ClusterInfo) GetRootAssoc() *AssociationInfo { + if x != nil { + return x.RootAssoc + } + return nil +} + +func (x *ClusterInfo) GetRpcVersion() int32 { + if x != nil { + return x.RpcVersion + } + return 0 +} + +var File_idl_slurmdb_cluster_proto protoreflect.FileDescriptor + +var file_idl_slurmdb_cluster_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x64, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x03, 0x0a, 0x0b, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x48, 0x6f, + 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x70, 0x75, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x70, 0x75, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x64, 0x69, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, + 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, + 0x6f, 0x6f, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x70, 0x63, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x70, + 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_idl_slurmdb_cluster_proto_rawDescOnce sync.Once + file_idl_slurmdb_cluster_proto_rawDescData = file_idl_slurmdb_cluster_proto_rawDesc +) + +func file_idl_slurmdb_cluster_proto_rawDescGZIP() []byte { + file_idl_slurmdb_cluster_proto_rawDescOnce.Do(func() { + file_idl_slurmdb_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_cluster_proto_rawDescData) + }) + return file_idl_slurmdb_cluster_proto_rawDescData +} + +var file_idl_slurmdb_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_idl_slurmdb_cluster_proto_goTypes = []interface{}{ + (*ClusterInfo)(nil), // 0: slurm.ClusterInfo + (*AccountingInfo)(nil), // 1: slurm.AccountingInfo + (*AssociationInfo)(nil), // 2: slurm.AssociationInfo +} +var file_idl_slurmdb_cluster_proto_depIdxs = []int32{ + 1, // 0: slurm.ClusterInfo.accountingList:type_name -> slurm.AccountingInfo + 2, // 1: slurm.ClusterInfo.rootAssoc:type_name -> slurm.AssociationInfo + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_idl_slurmdb_cluster_proto_init() } +func file_idl_slurmdb_cluster_proto_init() { + if File_idl_slurmdb_cluster_proto != nil { + return + } + file_idl_static_proto_init() + file_idl_slurmdb_account_proto_init() + file_idl_slurmdb_assoc_proto_init() + if !protoimpl.UnsafeEnabled { + file_idl_slurmdb_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_idl_slurmdb_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_idl_slurmdb_cluster_proto_goTypes, + DependencyIndexes: file_idl_slurmdb_cluster_proto_depIdxs, + MessageInfos: file_idl_slurmdb_cluster_proto_msgTypes, + }.Build() + File_idl_slurmdb_cluster_proto = out.File + file_idl_slurmdb_cluster_proto_rawDesc = nil + file_idl_slurmdb_cluster_proto_goTypes = nil + file_idl_slurmdb_cluster_proto_depIdxs = nil +} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_coord.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_coord.pb.go new file mode 100644 index 00000000..e964764c --- /dev/null +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_coord.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc (unknown) +// source: idl/slurmdb_coord.proto + +package slurmpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CoordInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Direct int32 `protobuf:"varint,2,opt,name=direct,proto3" json:"direct,omitempty"` +} + +func (x *CoordInfo) Reset() { + *x = CoordInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_coord_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CoordInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CoordInfo) ProtoMessage() {} + +func (x *CoordInfo) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_coord_proto_msgTypes[0] + 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 CoordInfo.ProtoReflect.Descriptor instead. +func (*CoordInfo) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_coord_proto_rawDescGZIP(), []int{0} +} + +func (x *CoordInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CoordInfo) GetDirect() int32 { + if x != nil { + return x.Direct + } + return 0 +} + +var File_idl_slurmdb_coord_proto protoreflect.FileDescriptor + +var file_idl_slurmdb_coord_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x63, 0x6f, + 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x37, 0x0a, 0x09, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x42, 0x0a, 0x5a, 0x08, + 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_idl_slurmdb_coord_proto_rawDescOnce sync.Once + file_idl_slurmdb_coord_proto_rawDescData = file_idl_slurmdb_coord_proto_rawDesc +) + +func file_idl_slurmdb_coord_proto_rawDescGZIP() []byte { + file_idl_slurmdb_coord_proto_rawDescOnce.Do(func() { + file_idl_slurmdb_coord_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_coord_proto_rawDescData) + }) + return file_idl_slurmdb_coord_proto_rawDescData +} + +var file_idl_slurmdb_coord_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_idl_slurmdb_coord_proto_goTypes = []interface{}{ + (*CoordInfo)(nil), // 0: slurm.CoordInfo +} +var file_idl_slurmdb_coord_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_idl_slurmdb_coord_proto_init() } +func file_idl_slurmdb_coord_proto_init() { + if File_idl_slurmdb_coord_proto != nil { + return + } + file_idl_static_proto_init() + if !protoimpl.UnsafeEnabled { + file_idl_slurmdb_coord_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CoordInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_idl_slurmdb_coord_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_idl_slurmdb_coord_proto_goTypes, + DependencyIndexes: file_idl_slurmdb_coord_proto_depIdxs, + MessageInfos: file_idl_slurmdb_coord_proto_msgTypes, + }.Build() + File_idl_slurmdb_coord_proto = out.File + file_idl_slurmdb_coord_proto_rawDesc = nil + file_idl_slurmdb_coord_proto_goTypes = nil + file_idl_slurmdb_coord_proto_depIdxs = nil +} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go new file mode 100644 index 00000000..9379a99e --- /dev/null +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go @@ -0,0 +1,470 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc (unknown) +// source: idl/slurmdb_qos.proto + +package slurmpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type QosUsageInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QosUsageInfo) Reset() { + *x = QosUsageInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_qos_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QosUsageInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QosUsageInfo) ProtoMessage() {} + +func (x *QosUsageInfo) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_qos_proto_msgTypes[0] + 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 QosUsageInfo.ProtoReflect.Descriptor instead. +func (*QosUsageInfo) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_qos_proto_rawDescGZIP(), []int{0} +} + +type QosInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Flags int32 `protobuf:"varint,3,opt,name=flags,proto3" json:"flags,omitempty"` + GraceTime int32 `protobuf:"varint,4,opt,name=graceTime,proto3" json:"graceTime,omitempty"` + GrpCpuMins int64 `protobuf:"varint,5,opt,name=grpCpuMins,proto3" json:"grpCpuMins,omitempty"` + GrpCpuRunMins int64 `protobuf:"varint,6,opt,name=grpCpuRunMins,proto3" json:"grpCpuRunMins,omitempty"` + GrpCpus int32 `protobuf:"varint,7,opt,name=grpCpus,proto3" json:"grpCpus,omitempty"` + GrpJobs int32 `protobuf:"varint,8,opt,name=grpJobs,proto3" json:"grpJobs,omitempty"` + GrpMem int32 `protobuf:"varint,9,opt,name=grp_mem,json=grpMem,proto3" json:"grp_mem,omitempty"` + GrpNodes int32 `protobuf:"varint,10,opt,name=grp_nodes,json=grpNodes,proto3" json:"grp_nodes,omitempty"` + GrpSubmitJobs int32 `protobuf:"varint,11,opt,name=grp_submitJobs,json=grpSubmitJobs,proto3" json:"grp_submitJobs,omitempty"` + GrpWall int32 `protobuf:"varint,12,opt,name=grp_wall,json=grpWall,proto3" json:"grp_wall,omitempty"` + MaxCpuMinsPj int64 `protobuf:"varint,13,opt,name=maxCpuMinsPj,proto3" json:"maxCpuMinsPj,omitempty"` + MaxCpuRunMinsPu int64 `protobuf:"varint,14,opt,name=maxCpuRunMinsPu,proto3" json:"maxCpuRunMinsPu,omitempty"` + MaxCpusPj int32 `protobuf:"varint,15,opt,name=maxCpusPj,proto3" json:"maxCpusPj,omitempty"` + MaxCpusPu int32 `protobuf:"varint,16,opt,name=maxCpusPu,proto3" json:"maxCpusPu,omitempty"` + MaxJobsPu int32 `protobuf:"varint,17,opt,name=maxJobsPu,proto3" json:"maxJobsPu,omitempty"` + MaxNodesPj int32 `protobuf:"varint,18,opt,name=max_nodesPj,json=maxNodesPj,proto3" json:"max_nodesPj,omitempty"` + MaxSubmitJobsPu int32 `protobuf:"varint,19,opt,name=maxSubmitJobsPu,proto3" json:"maxSubmitJobsPu,omitempty"` + MaxWallPj int32 `protobuf:"varint,20,opt,name=maxWallPj,proto3" json:"maxWallPj,omitempty"` + Name string `protobuf:"bytes,21,opt,name=name,proto3" json:"name,omitempty"` + PreemptBitstr int32 `protobuf:"varint,22,opt,name=preemptBitstr,proto3" json:"preemptBitstr,omitempty"` + PreemptList []string `protobuf:"bytes,23,rep,name=preemptList,proto3" json:"preemptList,omitempty"` + PreemptMode int32 `protobuf:"varint,24,opt,name=preemptMode,proto3" json:"preemptMode,omitempty"` + Priority int32 `protobuf:"varint,25,opt,name=priority,proto3" json:"priority,omitempty"` + Usage *QosUsageInfo `protobuf:"bytes,26,opt,name=usage,proto3" json:"usage,omitempty"` + UsageFactor float64 `protobuf:"fixed64,27,opt,name=usageFactor,proto3" json:"usageFactor,omitempty"` + UsageThres float64 `protobuf:"fixed64,28,opt,name=usageThres,proto3" json:"usageThres,omitempty"` +} + +func (x *QosInfo) Reset() { + *x = QosInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_qos_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QosInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QosInfo) ProtoMessage() {} + +func (x *QosInfo) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_qos_proto_msgTypes[1] + 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 QosInfo.ProtoReflect.Descriptor instead. +func (*QosInfo) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_qos_proto_rawDescGZIP(), []int{1} +} + +func (x *QosInfo) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *QosInfo) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *QosInfo) GetFlags() int32 { + if x != nil { + return x.Flags + } + return 0 +} + +func (x *QosInfo) GetGraceTime() int32 { + if x != nil { + return x.GraceTime + } + return 0 +} + +func (x *QosInfo) GetGrpCpuMins() int64 { + if x != nil { + return x.GrpCpuMins + } + return 0 +} + +func (x *QosInfo) GetGrpCpuRunMins() int64 { + if x != nil { + return x.GrpCpuRunMins + } + return 0 +} + +func (x *QosInfo) GetGrpCpus() int32 { + if x != nil { + return x.GrpCpus + } + return 0 +} + +func (x *QosInfo) GetGrpJobs() int32 { + if x != nil { + return x.GrpJobs + } + return 0 +} + +func (x *QosInfo) GetGrpMem() int32 { + if x != nil { + return x.GrpMem + } + return 0 +} + +func (x *QosInfo) GetGrpNodes() int32 { + if x != nil { + return x.GrpNodes + } + return 0 +} + +func (x *QosInfo) GetGrpSubmitJobs() int32 { + if x != nil { + return x.GrpSubmitJobs + } + return 0 +} + +func (x *QosInfo) GetGrpWall() int32 { + if x != nil { + return x.GrpWall + } + return 0 +} + +func (x *QosInfo) GetMaxCpuMinsPj() int64 { + if x != nil { + return x.MaxCpuMinsPj + } + return 0 +} + +func (x *QosInfo) GetMaxCpuRunMinsPu() int64 { + if x != nil { + return x.MaxCpuRunMinsPu + } + return 0 +} + +func (x *QosInfo) GetMaxCpusPj() int32 { + if x != nil { + return x.MaxCpusPj + } + return 0 +} + +func (x *QosInfo) GetMaxCpusPu() int32 { + if x != nil { + return x.MaxCpusPu + } + return 0 +} + +func (x *QosInfo) GetMaxJobsPu() int32 { + if x != nil { + return x.MaxJobsPu + } + return 0 +} + +func (x *QosInfo) GetMaxNodesPj() int32 { + if x != nil { + return x.MaxNodesPj + } + return 0 +} + +func (x *QosInfo) GetMaxSubmitJobsPu() int32 { + if x != nil { + return x.MaxSubmitJobsPu + } + return 0 +} + +func (x *QosInfo) GetMaxWallPj() int32 { + if x != nil { + return x.MaxWallPj + } + return 0 +} + +func (x *QosInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *QosInfo) GetPreemptBitstr() int32 { + if x != nil { + return x.PreemptBitstr + } + return 0 +} + +func (x *QosInfo) GetPreemptList() []string { + if x != nil { + return x.PreemptList + } + return nil +} + +func (x *QosInfo) GetPreemptMode() int32 { + if x != nil { + return x.PreemptMode + } + return 0 +} + +func (x *QosInfo) GetPriority() int32 { + if x != nil { + return x.Priority + } + return 0 +} + +func (x *QosInfo) GetUsage() *QosUsageInfo { + if x != nil { + return x.Usage + } + return nil +} + +func (x *QosInfo) GetUsageFactor() float64 { + if x != nil { + return x.UsageFactor + } + return 0 +} + +func (x *QosInfo) GetUsageThres() float64 { + if x != nil { + return x.UsageThres + } + return 0 +} + +var File_idl_slurmdb_qos_proto protoreflect.FileDescriptor + +var file_idl_slurmdb_qos_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x71, 0x6f, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x1a, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x0e, 0x0a, 0x0c, 0x51, 0x6f, 0x73, 0x55, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0xf9, 0x06, 0x0a, 0x07, 0x51, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x61, 0x63, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x72, 0x61, 0x63, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x4d, + 0x69, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, + 0x4d, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x43, + 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x70, + 0x43, 0x70, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x43, + 0x70, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, 0x62, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x17, 0x0a, + 0x07, 0x67, 0x72, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x70, 0x5f, 0x6e, 0x6f, + 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x70, 0x4e, 0x6f, + 0x64, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x67, 0x72, 0x70, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x67, 0x72, 0x70, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, + 0x70, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, + 0x70, 0x57, 0x61, 0x6c, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x4d, + 0x69, 0x6e, 0x73, 0x50, 0x6a, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, + 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x50, 0x6a, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x61, 0x78, + 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x50, 0x75, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, + 0x73, 0x50, 0x75, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x50, 0x6a, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x50, + 0x6a, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x50, 0x75, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x50, 0x75, 0x12, + 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x50, 0x75, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x50, 0x75, 0x12, 0x1f, 0x0a, + 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x12, 0x28, + 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x50, + 0x75, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x50, 0x75, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x57, + 0x61, 0x6c, 0x6c, 0x50, 0x6a, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, + 0x57, 0x61, 0x6c, 0x6c, 0x50, 0x6a, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x72, + 0x65, 0x65, 0x6d, 0x70, 0x74, 0x42, 0x69, 0x74, 0x73, 0x74, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x42, 0x69, 0x74, 0x73, 0x74, 0x72, + 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, + 0x17, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x4d, 0x6f, 0x64, + 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x18, 0x19, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x29, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x51, 0x6f, 0x73, 0x55, 0x73, 0x61, 0x67, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x75, + 0x73, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x0b, 0x75, 0x73, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a, + 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x42, 0x0a, 0x5a, + 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_idl_slurmdb_qos_proto_rawDescOnce sync.Once + file_idl_slurmdb_qos_proto_rawDescData = file_idl_slurmdb_qos_proto_rawDesc +) + +func file_idl_slurmdb_qos_proto_rawDescGZIP() []byte { + file_idl_slurmdb_qos_proto_rawDescOnce.Do(func() { + file_idl_slurmdb_qos_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_qos_proto_rawDescData) + }) + return file_idl_slurmdb_qos_proto_rawDescData +} + +var file_idl_slurmdb_qos_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_idl_slurmdb_qos_proto_goTypes = []interface{}{ + (*QosUsageInfo)(nil), // 0: slurm.QosUsageInfo + (*QosInfo)(nil), // 1: slurm.QosInfo +} +var file_idl_slurmdb_qos_proto_depIdxs = []int32{ + 0, // 0: slurm.QosInfo.usage:type_name -> slurm.QosUsageInfo + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_idl_slurmdb_qos_proto_init() } +func file_idl_slurmdb_qos_proto_init() { + if File_idl_slurmdb_qos_proto != nil { + return + } + file_idl_static_proto_init() + if !protoimpl.UnsafeEnabled { + file_idl_slurmdb_qos_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QosUsageInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_qos_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QosInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_idl_slurmdb_qos_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_idl_slurmdb_qos_proto_goTypes, + DependencyIndexes: file_idl_slurmdb_qos_proto_depIdxs, + MessageInfos: file_idl_slurmdb_qos_proto_msgTypes, + }.Build() + File_idl_slurmdb_qos_proto = out.File + file_idl_slurmdb_qos_proto_rawDesc = nil + file_idl_slurmdb_qos_proto_goTypes = nil + file_idl_slurmdb_qos_proto_depIdxs = nil +} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go new file mode 100644 index 00000000..a808c905 --- /dev/null +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go @@ -0,0 +1,567 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc (unknown) +// source: idl/slurmdb_user.proto + +package slurmpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type UserInfoList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserInfos []*UserInfo `protobuf:"bytes,1,rep,name=userInfos,proto3" json:"userInfos,omitempty"` +} + +func (x *UserInfoList) Reset() { + *x = UserInfoList{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_user_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserInfoList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserInfoList) ProtoMessage() {} + +func (x *UserInfoList) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_user_proto_msgTypes[0] + 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 UserInfoList.ProtoReflect.Descriptor instead. +func (*UserInfoList) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{0} +} + +func (x *UserInfoList) GetUserInfos() []*UserInfo { + if x != nil { + return x.UserInfos + } + return nil +} + +type UserInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdminLevel int32 `protobuf:"varint,1,opt,name=adminLevel,proto3" json:"adminLevel,omitempty"` + AssocList []*AssociationInfo `protobuf:"bytes,2,rep,name=assocList,proto3" json:"assocList,omitempty"` + CoordList []*CoordInfo `protobuf:"bytes,3,rep,name=coordList,proto3" json:"coordList,omitempty"` + DefaultAcct string `protobuf:"bytes,4,opt,name=defaultAcct,proto3" json:"defaultAcct,omitempty"` + DefaultWckey string `protobuf:"bytes,5,opt,name=defaultWckey,proto3" json:"defaultWckey,omitempty"` + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` + OldName string `protobuf:"bytes,7,opt,name=oldName,proto3" json:"oldName,omitempty"` + Uid int32 `protobuf:"varint,8,opt,name=uid,proto3" json:"uid,omitempty"` + WckeyList []*WckeyInfo `protobuf:"bytes,9,rep,name=wckeyList,proto3" json:"wckeyList,omitempty"` +} + +func (x *UserInfo) Reset() { + *x = UserInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_user_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserInfo) ProtoMessage() {} + +func (x *UserInfo) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_user_proto_msgTypes[1] + 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 UserInfo.ProtoReflect.Descriptor instead. +func (*UserInfo) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{1} +} + +func (x *UserInfo) GetAdminLevel() int32 { + if x != nil { + return x.AdminLevel + } + return 0 +} + +func (x *UserInfo) GetAssocList() []*AssociationInfo { + if x != nil { + return x.AssocList + } + return nil +} + +func (x *UserInfo) GetCoordList() []*CoordInfo { + if x != nil { + return x.CoordList + } + return nil +} + +func (x *UserInfo) GetDefaultAcct() string { + if x != nil { + return x.DefaultAcct + } + return "" +} + +func (x *UserInfo) GetDefaultWckey() string { + if x != nil { + return x.DefaultWckey + } + return "" +} + +func (x *UserInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UserInfo) GetOldName() string { + if x != nil { + return x.OldName + } + return "" +} + +func (x *UserInfo) GetUid() int32 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *UserInfo) GetWckeyList() []*WckeyInfo { + if x != nil { + return x.WckeyList + } + return nil +} + +type ListUsersReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` +} + +func (x *ListUsersReq) Reset() { + *x = ListUsersReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_user_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListUsersReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListUsersReq) ProtoMessage() {} + +func (x *ListUsersReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_user_proto_msgTypes[2] + 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 ListUsersReq.ProtoReflect.Descriptor instead. +func (*ListUsersReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{2} +} + +func (x *ListUsersReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +type ListUsersResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserInfos []*UserInfo `protobuf:"bytes,1,rep,name=user_infos,json=userInfos,proto3" json:"user_infos,omitempty"` +} + +func (x *ListUsersResp) Reset() { + *x = ListUsersResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_user_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListUsersResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListUsersResp) ProtoMessage() {} + +func (x *ListUsersResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_user_proto_msgTypes[3] + 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 ListUsersResp.ProtoReflect.Descriptor instead. +func (*ListUsersResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{3} +} + +func (x *ListUsersResp) GetUserInfos() []*UserInfo { + if x != nil { + return x.UserInfos + } + return nil +} + +type AddUsersReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserInfo *UserInfo `protobuf:"bytes,1,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"` +} + +func (x *AddUsersReq) Reset() { + *x = AddUsersReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_user_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddUsersReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddUsersReq) ProtoMessage() {} + +func (x *AddUsersReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_user_proto_msgTypes[4] + 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 AddUsersReq.ProtoReflect.Descriptor instead. +func (*AddUsersReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{4} +} + +func (x *AddUsersReq) GetUserInfo() *UserInfo { + if x != nil { + return x.UserInfo + } + return nil +} + +type AddUsersResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` +} + +func (x *AddUsersResp) Reset() { + *x = AddUsersResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_user_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddUsersResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddUsersResp) ProtoMessage() {} + +func (x *AddUsersResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_user_proto_msgTypes[5] + 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 AddUsersResp.ProtoReflect.Descriptor instead. +func (*AddUsersResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{5} +} + +func (x *AddUsersResp) GetResult() int32 { + if x != nil { + return x.Result + } + return 0 +} + +var File_idl_slurmdb_user_proto protoreflect.FileDescriptor + +var file_idl_slurmdb_user_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, + 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, + 0x62, 0x5f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a, + 0x0c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2d, 0x0a, + 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0xc6, 0x02, 0x0a, + 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x09, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x2e, 0x0a, 0x09, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x43, 0x6f, 0x6f, 0x72, 0x64, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x63, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x63, + 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x57, 0x63, 0x6b, 0x65, + 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x57, 0x63, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x6c, 0x64, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x09, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x4c, 0x69, + 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x77, 0x63, 0x6b, 0x65, + 0x79, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, + 0x3f, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x2e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, + 0x22, 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, + 0x2c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x26, 0x0a, + 0x0c, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_idl_slurmdb_user_proto_rawDescOnce sync.Once + file_idl_slurmdb_user_proto_rawDescData = file_idl_slurmdb_user_proto_rawDesc +) + +func file_idl_slurmdb_user_proto_rawDescGZIP() []byte { + file_idl_slurmdb_user_proto_rawDescOnce.Do(func() { + file_idl_slurmdb_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_user_proto_rawDescData) + }) + return file_idl_slurmdb_user_proto_rawDescData +} + +var file_idl_slurmdb_user_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_idl_slurmdb_user_proto_goTypes = []interface{}{ + (*UserInfoList)(nil), // 0: slurm.UserInfoList + (*UserInfo)(nil), // 1: slurm.UserInfo + (*ListUsersReq)(nil), // 2: slurm.ListUsersReq + (*ListUsersResp)(nil), // 3: slurm.ListUsersResp + (*AddUsersReq)(nil), // 4: slurm.AddUsersReq + (*AddUsersResp)(nil), // 5: slurm.AddUsersResp + (*AssociationInfo)(nil), // 6: slurm.AssociationInfo + (*CoordInfo)(nil), // 7: slurm.CoordInfo + (*WckeyInfo)(nil), // 8: slurm.WckeyInfo + (SlurmVersion)(0), // 9: slurm.SlurmVersion +} +var file_idl_slurmdb_user_proto_depIdxs = []int32{ + 1, // 0: slurm.UserInfoList.userInfos:type_name -> slurm.UserInfo + 6, // 1: slurm.UserInfo.assocList:type_name -> slurm.AssociationInfo + 7, // 2: slurm.UserInfo.coordList:type_name -> slurm.CoordInfo + 8, // 3: slurm.UserInfo.wckeyList:type_name -> slurm.WckeyInfo + 9, // 4: slurm.ListUsersReq.slurm_version:type_name -> slurm.SlurmVersion + 1, // 5: slurm.ListUsersResp.user_infos:type_name -> slurm.UserInfo + 1, // 6: slurm.AddUsersReq.user_info:type_name -> slurm.UserInfo + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_idl_slurmdb_user_proto_init() } +func file_idl_slurmdb_user_proto_init() { + if File_idl_slurmdb_user_proto != nil { + return + } + file_idl_static_proto_init() + file_idl_slurmdb_coord_proto_init() + file_idl_slurmdb_wckey_proto_init() + file_idl_slurmdb_assoc_proto_init() + if !protoimpl.UnsafeEnabled { + file_idl_slurmdb_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserInfoList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListUsersReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListUsersResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddUsersReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddUsersResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_idl_slurmdb_user_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_idl_slurmdb_user_proto_goTypes, + DependencyIndexes: file_idl_slurmdb_user_proto_depIdxs, + MessageInfos: file_idl_slurmdb_user_proto_msgTypes, + }.Build() + File_idl_slurmdb_user_proto = out.File + file_idl_slurmdb_user_proto_rawDesc = nil + file_idl_slurmdb_user_proto_goTypes = nil + file_idl_slurmdb_user_proto_depIdxs = nil +} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go new file mode 100644 index 00000000..b7be2044 --- /dev/null +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go @@ -0,0 +1,210 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc (unknown) +// source: idl/slurmdb_wckey.proto + +package slurmpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type WckeyInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountingList []*AccountingInfo `protobuf:"bytes,1,rep,name=accountingList,proto3" json:"accountingList,omitempty"` + Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` + Id int32 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` + IdDef int32 `protobuf:"varint,4,opt,name=idDef,proto3" json:"idDef,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + Uid int32 `protobuf:"varint,6,opt,name=uid,proto3" json:"uid,omitempty"` + User string `protobuf:"bytes,7,opt,name=user,proto3" json:"user,omitempty"` +} + +func (x *WckeyInfo) Reset() { + *x = WckeyInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_wckey_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WckeyInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WckeyInfo) ProtoMessage() {} + +func (x *WckeyInfo) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_wckey_proto_msgTypes[0] + 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 WckeyInfo.ProtoReflect.Descriptor instead. +func (*WckeyInfo) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_wckey_proto_rawDescGZIP(), []int{0} +} + +func (x *WckeyInfo) GetAccountingList() []*AccountingInfo { + if x != nil { + return x.AccountingList + } + return nil +} + +func (x *WckeyInfo) GetCluster() string { + if x != nil { + return x.Cluster + } + return "" +} + +func (x *WckeyInfo) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *WckeyInfo) GetIdDef() int32 { + if x != nil { + return x.IdDef + } + return 0 +} + +func (x *WckeyInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WckeyInfo) GetUid() int32 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *WckeyInfo) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +var File_idl_slurmdb_wckey_proto protoreflect.FileDescriptor + +var file_idl_slurmdb_wckey_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x77, 0x63, + 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, + 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, + 0x01, 0x0a, 0x09, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x64, 0x44, 0x65, 0x66, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x64, 0x44, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_idl_slurmdb_wckey_proto_rawDescOnce sync.Once + file_idl_slurmdb_wckey_proto_rawDescData = file_idl_slurmdb_wckey_proto_rawDesc +) + +func file_idl_slurmdb_wckey_proto_rawDescGZIP() []byte { + file_idl_slurmdb_wckey_proto_rawDescOnce.Do(func() { + file_idl_slurmdb_wckey_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_wckey_proto_rawDescData) + }) + return file_idl_slurmdb_wckey_proto_rawDescData +} + +var file_idl_slurmdb_wckey_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_idl_slurmdb_wckey_proto_goTypes = []interface{}{ + (*WckeyInfo)(nil), // 0: slurm.WckeyInfo + (*AccountingInfo)(nil), // 1: slurm.AccountingInfo +} +var file_idl_slurmdb_wckey_proto_depIdxs = []int32{ + 1, // 0: slurm.WckeyInfo.accountingList:type_name -> slurm.AccountingInfo + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_idl_slurmdb_wckey_proto_init() } +func file_idl_slurmdb_wckey_proto_init() { + if File_idl_slurmdb_wckey_proto != nil { + return + } + file_idl_static_proto_init() + file_idl_slurmdb_account_proto_init() + if !protoimpl.UnsafeEnabled { + file_idl_slurmdb_wckey_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WckeyInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_idl_slurmdb_wckey_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_idl_slurmdb_wckey_proto_goTypes, + DependencyIndexes: file_idl_slurmdb_wckey_proto_depIdxs, + MessageInfos: file_idl_slurmdb_wckey_proto_msgTypes, + }.Build() + File_idl_slurmdb_wckey_proto = out.File + file_idl_slurmdb_wckey_proto_rawDesc = nil + file_idl_slurmdb_wckey_proto_goTypes = nil + file_idl_slurmdb_wckey_proto_depIdxs = nil +} diff --git a/adaptor/pcm_slurm/gen/idl/static.pb.go b/adaptor/pcm_slurm/gen/idl/static.pb.go new file mode 100644 index 00000000..0f2440d8 --- /dev/null +++ b/adaptor/pcm_slurm/gen/idl/static.pb.go @@ -0,0 +1,130 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc (unknown) +// source: idl/static.proto + +package slurmpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// slurm version +type SlurmVersion int32 + +const ( + // 0 - tianhe hpc + SlurmVersion_tianhe SlurmVersion = 0 + // 1 - shenwei hpc + SlurmVersion_shenwei SlurmVersion = 1 +) + +// Enum value maps for SlurmVersion. +var ( + SlurmVersion_name = map[int32]string{ + 0: "tianhe", + 1: "shenwei", + } + SlurmVersion_value = map[string]int32{ + "tianhe": 0, + "shenwei": 1, + } +) + +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_static_proto_enumTypes[0].Descriptor() +} + +func (SlurmVersion) Type() protoreflect.EnumType { + return &file_idl_static_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_static_proto_rawDescGZIP(), []int{0} +} + +var File_idl_static_proto protoreflect.FileDescriptor + +var file_idl_static_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2a, 0x27, 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, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x68, 0x65, 0x6e, 0x77, 0x65, 0x69, + 0x10, 0x01, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_idl_static_proto_rawDescOnce sync.Once + file_idl_static_proto_rawDescData = file_idl_static_proto_rawDesc +) + +func file_idl_static_proto_rawDescGZIP() []byte { + file_idl_static_proto_rawDescOnce.Do(func() { + file_idl_static_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_static_proto_rawDescData) + }) + return file_idl_static_proto_rawDescData +} + +var file_idl_static_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_idl_static_proto_goTypes = []interface{}{ + (SlurmVersion)(0), // 0: slurm.SlurmVersion +} +var file_idl_static_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_idl_static_proto_init() } +func file_idl_static_proto_init() { + if File_idl_static_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_idl_static_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_idl_static_proto_goTypes, + DependencyIndexes: file_idl_static_proto_depIdxs, + EnumInfos: file_idl_static_proto_enumTypes, + }.Build() + File_idl_static_proto = out.File + file_idl_static_proto_rawDesc = nil + file_idl_static_proto_goTypes = nil + file_idl_static_proto_depIdxs = nil +} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/node.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/node.swagger.json new file mode 100644 index 00000000..cbb0c94f --- /dev/null +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/node.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "idl/node.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json index ebe0873c..c03cb46d 100644 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json @@ -44,6 +44,176 @@ } } }, + "slurmAccountingInfo": { + "type": "object", + "properties": { + "allocSecs": { + "type": "string", + "format": "int64" + }, + "id": { + "type": "integer", + "format": "int32" + }, + "periodStart": { + "type": "string", + "format": "date-time" + } + } + }, + "slurmAssocUsageInfo": { + "type": "object" + }, + "slurmAssociationInfo": { + "type": "object", + "properties": { + "accountingList": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmAccountingInfo" + } + }, + "acct": { + "type": "string" + }, + "cluster": { + "type": "string" + }, + "defQosId": { + "type": "integer", + "format": "int32" + }, + "grpCpuMins": { + "type": "string", + "format": "int64" + }, + "grpGpuRunMins": { + "type": "string", + "format": "int64" + }, + "grpCpus": { + "type": "integer", + "format": "int32" + }, + "grpJobs": { + "type": "integer", + "format": "int32" + }, + "grpMem": { + "type": "integer", + "format": "int32" + }, + "grpNodes": { + "type": "integer", + "format": "int32" + }, + "grpSubmitJobs": { + "type": "integer", + "format": "int32" + }, + "grpWall": { + "type": "integer", + "format": "int32" + }, + "id": { + "type": "integer", + "format": "int32" + }, + "isDef": { + "type": "integer", + "format": "int32" + }, + "lft": { + "type": "integer", + "format": "int32" + }, + "maxCpuMinsPj": { + "type": "string", + "format": "int64" + }, + "maxCpuRunMins": { + "type": "string", + "format": "int64" + }, + "maxCpusPj": { + "type": "integer", + "format": "int32" + }, + "maxJobs": { + "type": "integer", + "format": "int32" + }, + "maxNodesPj": { + "type": "integer", + "format": "int32" + }, + "maxSubmitJobs": { + "type": "integer", + "format": "int32" + }, + "maxWallPj": { + "type": "integer", + "format": "int32" + }, + "parentAcct": { + "type": "string" + }, + "parentId": { + "type": "integer", + "format": "int32" + }, + "partition": { + "type": "string" + }, + "qosList": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmQosInfo" + } + }, + "rgt": { + "type": "integer", + "format": "int32" + }, + "sharesRaw": { + "type": "integer", + "format": "int32" + }, + "uid": { + "type": "integer", + "format": "int32" + }, + "assocUsage": { + "$ref": "#/definitions/slurmAssocUsageInfo" + }, + "user": { + "type": "string" + } + } + }, + "slurmCoordInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "direct": { + "type": "integer", + "format": "int32" + } + } + }, + "slurmListAssociationsResp": { + "type": "object", + "properties": { + "assocInfos": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmAssociationInfo" + } + } + } + }, "slurmListNodesResp": { "type": "object", "properties": { @@ -55,6 +225,17 @@ } } }, + "slurmListUsersResp": { + "type": "object", + "properties": { + "userInfos": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmUserInfo" + } + } + } + }, "slurmNodeInfo": { "type": "object", "properties": { @@ -82,6 +263,210 @@ "format": "int32" } } + }, + "slurmQosInfo": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int32" + }, + "flags": { + "type": "integer", + "format": "int32" + }, + "graceTime": { + "type": "integer", + "format": "int32" + }, + "grpCpuMins": { + "type": "string", + "format": "int64" + }, + "grpCpuRunMins": { + "type": "string", + "format": "int64" + }, + "grpCpus": { + "type": "integer", + "format": "int32" + }, + "grpJobs": { + "type": "integer", + "format": "int32" + }, + "grpMem": { + "type": "integer", + "format": "int32" + }, + "grpNodes": { + "type": "integer", + "format": "int32" + }, + "grpSubmitJobs": { + "type": "integer", + "format": "int32" + }, + "grpWall": { + "type": "integer", + "format": "int32" + }, + "maxCpuMinsPj": { + "type": "string", + "format": "int64" + }, + "maxCpuRunMinsPu": { + "type": "string", + "format": "int64" + }, + "maxCpusPj": { + "type": "integer", + "format": "int32" + }, + "maxCpusPu": { + "type": "integer", + "format": "int32" + }, + "maxJobsPu": { + "type": "integer", + "format": "int32" + }, + "maxNodesPj": { + "type": "integer", + "format": "int32" + }, + "maxSubmitJobsPu": { + "type": "integer", + "format": "int32" + }, + "maxWallPj": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "preemptBitstr": { + "type": "integer", + "format": "int32" + }, + "preemptList": { + "type": "array", + "items": { + "type": "string" + } + }, + "preemptMode": { + "type": "integer", + "format": "int32" + }, + "priority": { + "type": "integer", + "format": "int32" + }, + "usage": { + "$ref": "#/definitions/slurmQosUsageInfo" + }, + "usageFactor": { + "type": "number", + "format": "double" + }, + "usageThres": { + "type": "number", + "format": "double" + } + } + }, + "slurmQosUsageInfo": { + "type": "object" + }, + "slurmSlurmVersion": { + "type": "string", + "enum": [ + "tianhe", + "shenwei" + ], + "default": "tianhe", + "description": "- tianhe: 0 - tianhe hpc\n - shenwei: 1 - shenwei hpc", + "title": "slurm version" + }, + "slurmUserInfo": { + "type": "object", + "properties": { + "adminLevel": { + "type": "integer", + "format": "int32" + }, + "assocList": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmAssociationInfo" + } + }, + "coordList": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmCoordInfo" + } + }, + "defaultAcct": { + "type": "string" + }, + "defaultWckey": { + "type": "string" + }, + "name": { + "type": "string" + }, + "oldName": { + "type": "string" + }, + "uid": { + "type": "integer", + "format": "int32" + }, + "wckeyList": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmWckeyInfo" + } + } + } + }, + "slurmWckeyInfo": { + "type": "object", + "properties": { + "accountingList": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmAccountingInfo" + } + }, + "cluster": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int32" + }, + "idDef": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "integer", + "format": "int32" + }, + "user": { + "type": "string" + } + } } } } diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_account.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_account.swagger.json new file mode 100644 index 00000000..5a34e4a1 --- /dev/null +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_account.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "idl/slurmdb_account.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_assoc.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_assoc.swagger.json new file mode 100644 index 00000000..aecb5f94 --- /dev/null +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_assoc.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "idl/slurmdb_assoc.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_cluster.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_cluster.swagger.json new file mode 100644 index 00000000..cb332779 --- /dev/null +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_cluster.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "idl/slurmdb_cluster.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_coord.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_coord.swagger.json new file mode 100644 index 00000000..7bbbcc18 --- /dev/null +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_coord.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "idl/slurmdb_coord.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_qos.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_qos.swagger.json new file mode 100644 index 00000000..5b7b18f8 --- /dev/null +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_qos.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "idl/slurmdb_qos.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_user.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_user.swagger.json new file mode 100644 index 00000000..45dd503b --- /dev/null +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_user.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "idl/slurmdb_user.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_wckey.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_wckey.swagger.json new file mode 100644 index 00000000..5fb54fac --- /dev/null +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_wckey.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "idl/slurmdb_wckey.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/static.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/static.swagger.json new file mode 100644 index 00000000..ab940c60 --- /dev/null +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/static.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "idl/static.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/adaptor/pcm_slurm/idl/node.proto b/adaptor/pcm_slurm/idl/node.proto new file mode 100644 index 00000000..7001c2c3 --- /dev/null +++ b/adaptor/pcm_slurm/idl/node.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "idl/static.proto"; + +message ListNodesReq{ + SlurmVersion slurm_version = 1; +} + +message NodeInfo{ + int32 boards = 1 ; + int32 cpus = 2 ; + string name = 3 ; + int32 realMemory = 4 ; + int32 sockets = 5 ; + int32 threads = 6 ; +} + +message ListNodesResp { + repeated NodeInfo node_infos =1; +} diff --git a/adaptor/pcm_slurm/idl/slurm.proto b/adaptor/pcm_slurm/idl/slurm.proto index 366a46ca..e0a78c97 100644 --- a/adaptor/pcm_slurm/idl/slurm.proto +++ b/adaptor/pcm_slurm/idl/slurm.proto @@ -2,32 +2,20 @@ syntax = "proto3"; package slurm; option go_package = "/slurmpb"; +import "idl/node.proto"; +import "idl/slurmdb_user.proto"; +import "idl/slurmdb_assoc.proto"; -// slurm version -enum SlurmVersion { - // 0 - 阿里云 - tianhe = 0; -} -message ListNodesReq{ - int32 SlurmVersion = 1; -} - -message NodeInfo{ - int32 boards = 1 ; - int32 cpus = 2 ; - string name = 3 ; - int32 realMemory = 4 ; - int32 sockets = 5 ; - int32 threads = 6 ; -} - -message ListNodesResp { - repeated NodeInfo node_infos =1; -} // Slurm Services service SlurmService { // Echo 样例接口 rpc ListNodes(ListNodesReq) returns (ListNodesResp); + + // get user info from slurmdb + rpc ListUsers(ListUsersReq) returns (ListUsersResp); + + // get association info from slurmdb + rpc ListAssociations(ListAssociationsReq) returns (ListAssociationsResp); } diff --git a/adaptor/pcm_slurm/idl/slurm.yaml b/adaptor/pcm_slurm/idl/slurm.yaml index b48afca9..e154cb46 100644 --- a/adaptor/pcm_slurm/idl/slurm.yaml +++ b/adaptor/pcm_slurm/idl/slurm.yaml @@ -4,4 +4,8 @@ config_version: 3 http: rules: - selector: slurm.SlurmService.ListNodes - get: "/apis/slurm/listNodes" \ No newline at end of file + get: "/apis/slurm/listNodes" + - selector: slurm.SlurmService.ListUsers + get: "/apis/slurm/listUsers" + - selector: slurm.SlurmService.ListAssociations + get: "/apis/slurm/listAssociations" diff --git a/adaptor/pcm_slurm/idl/slurmdb_account.proto b/adaptor/pcm_slurm/idl/slurmdb_account.proto new file mode 100644 index 00000000..019a1e43 --- /dev/null +++ b/adaptor/pcm_slurm/idl/slurmdb_account.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "google/protobuf/timestamp.proto"; +import "idl/static.proto"; + +message AccountingInfo{ + int64 allocSecs = 1 ; + int32 id = 2 ; + google.protobuf.Timestamp periodStart = 3; +} diff --git a/adaptor/pcm_slurm/idl/slurmdb_assoc.proto b/adaptor/pcm_slurm/idl/slurmdb_assoc.proto new file mode 100644 index 00000000..9730cee3 --- /dev/null +++ b/adaptor/pcm_slurm/idl/slurmdb_assoc.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "google/protobuf/timestamp.proto"; +import "idl/static.proto"; +import "idl/slurmdb_account.proto"; +import "idl/slurmdb_qos.proto"; + + +message AssocUsageInfo{ + +} + +message AssociationInfo{ + repeated AccountingInfo accountingList = 1 ; + string acct = 2 ; + string cluster = 3 ; + int32 defQosId = 4 ; + int64 grpCpuMins = 5 ; + int64 grpGpuRunMins = 6 ; + int32 grpCpus = 7 ; + int32 grpJobs = 8 ; + int32 grpMem = 9 ; + int32 grpNodes = 10 ; + int32 grpSubmitJobs = 11 ; + int32 grpWall = 12 ; + int32 id = 13 ; + int32 isDef = 14 ; + int32 lft = 15 ; + int64 maxCpuMinsPj = 16 ; + int64 maxCpuRunMins = 17 ; + int32 maxCpusPj = 18 ; + int32 maxJobs = 19 ; + int32 maxNodesPj = 20 ; + int32 maxSubmitJobs = 21 ; + int32 maxWallPj = 22 ; + string parentAcct = 23 ; + int32 parentId = 24 ; + string partition = 25 ; + repeated QosInfo qosList = 26 ; + int32 rgt = 27 ; + int32 sharesRaw = 28 ; + int32 uid = 29 ; + AssocUsageInfo assocUsage = 30 ; + string user = 31 ; +} +message ListAssociationsReq{ + SlurmVersion slurm_version = 1; +} +message ListAssociationsResp { + repeated AssociationInfo assoc_infos =1; +} \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurmdb_cluster.proto b/adaptor/pcm_slurm/idl/slurmdb_cluster.proto new file mode 100644 index 00000000..a575243a --- /dev/null +++ b/adaptor/pcm_slurm/idl/slurmdb_cluster.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "google/protobuf/timestamp.proto"; +import "idl/static.proto"; +import "idl/slurmdb_account.proto"; +import "idl/slurmdb_assoc.proto"; + +message ClusterInfo{ + repeated AccountingInfo accountingList = 1 ; + int32 classification = 2 ; + //slurm_addr_t control_addr; + string controlHost = 3 ; + int32 controlPort = 4 ; + int32 cpuCount = 5 ; + int32 dimensions = 6 ; + int32 dimSize = 7 ; + int32 flags = 8 ; + string name = 9 ; + string nodes = 10 ; + int32 pluginIdSelect = 11 ; + AssociationInfo rootAssoc = 12 ; + int32 rpcVersion = 13 ; +} diff --git a/adaptor/pcm_slurm/idl/slurmdb_coord.proto b/adaptor/pcm_slurm/idl/slurmdb_coord.proto new file mode 100644 index 00000000..607bdad4 --- /dev/null +++ b/adaptor/pcm_slurm/idl/slurmdb_coord.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "google/protobuf/timestamp.proto"; +import "idl/static.proto"; + + +message CoordInfo{ + string name = 1 ; + int32 direct = 2 ; +} diff --git a/adaptor/pcm_slurm/idl/slurmdb_qos.proto b/adaptor/pcm_slurm/idl/slurmdb_qos.proto new file mode 100644 index 00000000..50c29c88 --- /dev/null +++ b/adaptor/pcm_slurm/idl/slurmdb_qos.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "google/protobuf/timestamp.proto"; +import "idl/static.proto"; + +message QosUsageInfo{ + +} + +message QosInfo{ + string description = 1 ; + int32 id = 2 ; + int32 flags = 3 ; + int32 graceTime = 4 ; + int64 grpCpuMins = 5; + int64 grpCpuRunMins = 6; + int32 grpCpus = 7 ; + int32 grpJobs = 8 ; + int32 grp_mem = 9 ; + int32 grp_nodes = 10 ; + int32 grp_submitJobs = 11 ; + int32 grp_wall = 12 ; + int64 maxCpuMinsPj = 13 ; + int64 maxCpuRunMinsPu = 14 ; + int32 maxCpusPj = 15 ; + int32 maxCpusPu = 16 ; + int32 maxJobsPu = 17 ; + int32 max_nodesPj = 18 ; + int32 maxSubmitJobsPu = 19 ; + int32 maxWallPj = 20 ; + string name = 21 ; + int32 preemptBitstr = 22 ; + repeated string preemptList = 23 ; + int32 preemptMode = 24 ; + int32 priority = 25 ; + QosUsageInfo usage = 26 ; + double usageFactor = 27 ; + double usageThres = 28 ; +} diff --git a/adaptor/pcm_slurm/idl/slurmdb_user.proto b/adaptor/pcm_slurm/idl/slurmdb_user.proto new file mode 100644 index 00000000..6a8aedf8 --- /dev/null +++ b/adaptor/pcm_slurm/idl/slurmdb_user.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "google/protobuf/timestamp.proto"; +import "idl/static.proto"; +import "idl/slurmdb_coord.proto"; +import "idl/slurmdb_wckey.proto"; +import "idl/slurmdb_assoc.proto"; + +message UserInfoList{ + repeated UserInfo userInfos = 1 ; +} +message UserInfo{ + int32 adminLevel = 1 ; + repeated AssociationInfo assocList= 2 ; + repeated CoordInfo coordList = 3 ; + string defaultAcct = 4 ; + string defaultWckey = 5 ; + string name = 6 ; + string oldName = 7 ; + int32 uid = 8 ; + repeated WckeyInfo wckeyList = 9 ; +} + +message ListUsersReq{ + SlurmVersion slurm_version = 1; +} +message ListUsersResp { + repeated UserInfo user_infos =1; +} +message AddUsersReq{ + UserInfo user_info = 1; +} +message AddUsersResp { + int32 result =1; +} \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurmdb_wckey.proto b/adaptor/pcm_slurm/idl/slurmdb_wckey.proto new file mode 100644 index 00000000..4a03a233 --- /dev/null +++ b/adaptor/pcm_slurm/idl/slurmdb_wckey.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "google/protobuf/timestamp.proto"; +import "idl/static.proto"; +import "idl/slurmdb_account.proto"; + +message WckeyInfo{ + repeated AccountingInfo accountingList = 1 ; + string cluster= 2 ; + int32 id = 3 ; + int32 idDef = 4 ; + string name = 5 ; + int32 uid = 6 ; + string user = 7 ; +} diff --git a/adaptor/pcm_slurm/idl/static.proto b/adaptor/pcm_slurm/idl/static.proto new file mode 100644 index 00000000..12d05378 --- /dev/null +++ b/adaptor/pcm_slurm/idl/static.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; + +// slurm version +enum SlurmVersion { + // 0 - tianhe hpc + tianhe = 0; + // 1 - shenwei hpc + shenwei = 1; +} \ No newline at end of file diff --git a/adaptor/pcm_slurm/server/slurm.go b/adaptor/pcm_slurm/server/slurm.go index 68f90415..a7c42141 100644 --- a/adaptor/pcm_slurm/server/slurm.go +++ b/adaptor/pcm_slurm/server/slurm.go @@ -21,3 +21,23 @@ func (s *Server) ListNodes(ctx context.Context, req *slurmpb.ListNodesReq) (*slu } return resp, nil } + +// ListUsers return all slurm users +func (s *Server) ListUsers(ctx context.Context, req *slurmpb.ListUsersReq) (*slurmpb.ListUsersResp, error) { + resp, err := ListUsers(ctx, req) + if err != nil { + glog.Errorf("ListSlurmUsers error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// ListAssociations return all slurm associations +func (s *Server) ListAssociations(ctx context.Context, req *slurmpb.ListAssociationsReq) (*slurmpb.ListAssociationsResp, error) { + resp, err := ListAssociations(ctx, req) + if err != nil { + glog.Errorf("ListSlurmAssociations error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} diff --git a/adaptor/pcm_slurm/server/slurmImpl.go b/adaptor/pcm_slurm/server/slurmImpl.go index efc47bcf..4e790853 100644 --- a/adaptor/pcm_slurm/server/slurmImpl.go +++ b/adaptor/pcm_slurm/server/slurmImpl.go @@ -8,6 +8,27 @@ import ( func ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (*pbslurm.ListNodesResp, error) { slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } resp, _ := slurm.ListNodes(ctx, req) return resp, nil } + +func ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (*pbslurm.ListUsersResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.ListUsers(ctx, req) + return resp, nil +} + +func ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (*pbslurm.ListAssociationsResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.ListAssociations(ctx, req) + return resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurm_node.go b/adaptor/pcm_slurm/service/slurm_node.go new file mode 100644 index 00000000..bf5bed68 --- /dev/null +++ b/adaptor/pcm_slurm/service/slurm_node.go @@ -0,0 +1,227 @@ +package slurmer + +// +///* +//#cgo LDFLAGS: -lslurm +//#include +//#include +//#include +//inline uint8_t uint8_ptr(uint8_t* pointer) { +// if (NULL == pointer) { +// return -1;} +// return *pointer; +//} +//inline int8_t int8_ptr(int8_t* pointer) { +// if (NULL == pointer) { +// return -1;} +// return *pointer; +//} +//uint16_t uint16_ptr(uint16_t* pointer) { +// if (NULL == pointer) { +// return -1;} +// return *pointer; +//} +//inline int16_t int16_ptr(int16_t* pointer) { +// if (NULL == pointer) { +// return -1;} +// return *pointer; +//} +//inline uint32_t uint32_ptr(uint32_t* pointer) { +// if (NULL == pointer) { +// return -1;} +// return *pointer; +//} +//inline int32_t int32_ptr(int32_t* pointer) { +// if (NULL == pointer) { +// return -1;} +// return *pointer; +//} +//inline uint64_t uint64_ptr(uint64_t* pointer) { +// if (NULL == pointer) { +// return -1;} +// return *pointer; +//} +//inline int64_t int64_ptr(int16_t* pointer) { +// if (NULL == pointer) { +// return -1;} +// return *pointer; +//} +// struct node_info_msg *get_node_info(){ +// struct node_info_msg* node_buffer; +// if(slurm_load_node ((time_t) NULL, +// &node_buffer, SHOW_ALL)) +// return NULL; +// return node_buffer; +// } +// struct node_info_msg *get_single_node_info(char* name){ +// struct node_info_msg* node_buffer; +// if( slurm_load_node_single (&node_buffer, name, SHOW_DETAIL)) +// return NULL; +// return node_buffer; +// } +// +// struct node_info* node_from_list(struct node_info_msg *list, int i){ +// return &list->node_array[i]; +//} +// void free_node_buffer(void* buffer){ +// +// slurm_free_node_info_msg ((struct node_info_msg*)buffer); +// } +// +// +//*/ +//import "C" +// +//import ( +// pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" +// "context" +// "unsafe" +//) +// +//type Node_info struct { +// Arch string +// Boards uint16 +// Boot_time int64 +// Cores uint16 +// Cpu_load uint32 +// Cpus uint16 +// Features string +// Gres string +// Name string +// Node_addr string +// Node_hostname string +// Node_state uint32 +// Os string +// Real_memory uint64 +// Reason string +// Reason_time int64 +// Reason_uid uint32 +// Slurmd_start_time int64 +// Sockets uint16 +// Threads uint16 +// Tmp_disk uint32 +// Weight uint32 +//} +// +//func Node_info_convert_c_to_go(c_struct *C.struct_node_info) Node_info { +// var go_struct Node_info +// +// go_struct.Arch = C.GoString(c_struct.arch) +// go_struct.Boards = uint16(c_struct.boards) +// go_struct.Boot_time = int64(c_struct.boot_time) +// go_struct.Cores = uint16(c_struct.cores) +// go_struct.Cpu_load = uint32(c_struct.cpu_load) +// go_struct.Cpus = uint16(c_struct.cpus) +// go_struct.Features = C.GoString(c_struct.features) +// go_struct.Gres = C.GoString(c_struct.gres) +// go_struct.Name = C.GoString(c_struct.name) +// go_struct.Node_addr = C.GoString(c_struct.node_addr) +// go_struct.Node_hostname = C.GoString(c_struct.node_hostname) +// go_struct.Node_state = uint32(c_struct.node_state) +// go_struct.Os = C.GoString(c_struct.os) +// go_struct.Real_memory = uint64(c_struct.real_memory) +// go_struct.Reason = C.GoString(c_struct.reason) +// go_struct.Reason_time = int64(c_struct.reason_time) +// go_struct.Reason_uid = uint32(c_struct.reason_uid) +// go_struct.Slurmd_start_time = int64(c_struct.slurmd_start_time) +// go_struct.Sockets = uint16(c_struct.sockets) +// go_struct.Threads = uint16(c_struct.threads) +// go_struct.Tmp_disk = uint32(c_struct.tmp_disk) +// go_struct.Weight = uint32(c_struct.weight) +// return go_struct +//} +// +//func State_to_string(state uint32) string { +// +// switch s := C.uint16_t(state); s { +// case C.NODE_STATE_UNKNOWN: +// return "node state unknown" +// case C.NODE_STATE_DOWN: +// return "node state down" +// case C.NODE_STATE_IDLE: +// return "node state idle" +// case C.NODE_STATE_ALLOCATED: +// return "node state allocated" +// case C.NODE_STATE_ERROR: +// return "node state error" +// case C.NODE_STATE_MIXED: +// return "node state mixed" +// case C.NODE_STATE_FUTURE: +// return "node state future" +// case C.NODE_STATE_END: +// return "node state end" +// } +// return "Unkown state" +//} +// +//type Node_info_msg struct { +// Last_update int64 +// Record_count uint32 +// Error_code uint32 +// Node_list []Node_info +//} +// +//func Get_all_nodes() Node_info_msg { +// var go_node_buffer Node_info_msg +// c_node_buffer := C.get_node_info() +// if c_node_buffer == nil { +// go_node_buffer.Last_update = int64(0) +// go_node_buffer.Record_count = uint32(0) +// go_node_buffer.Error_code = uint32(C.slurm_get_errno()) +// return go_node_buffer +// } +// go_node_buffer.Last_update = int64(c_node_buffer.last_update) +// go_node_buffer.Record_count = uint32(c_node_buffer.record_count) +// go_node_buffer.Node_list = make([]Node_info, c_node_buffer.record_count, c_node_buffer.record_count) +// for i := uint32(0); i < go_node_buffer.Record_count; i++ { +// node := C.node_from_list(c_node_buffer, C.int(i)) +// go_node := Node_info_convert_c_to_go(node) +// go_node_buffer.Node_list[i] = go_node +// } +// C.slurm_free_node_info_msg(c_node_buffer) +// +// return go_node_buffer +//} +// +//func Get_node_info(name string) Node_info_msg { +// +// var go_node_buffer Node_info_msg +// c_name := C.CString(name) +// defer C.free(unsafe.Pointer(c_name)) +// c_node_buffer := C.get_single_node_info(c_name) +// if c_node_buffer == nil { +// go_node_buffer.Last_update = int64(0) +// go_node_buffer.Record_count = uint32(0) +// go_node_buffer.Error_code = uint32(C.slurm_get_errno()) +// +// return go_node_buffer +// } +// go_node_buffer.Last_update = int64(c_node_buffer.last_update) +// go_node_buffer.Record_count = uint32(c_node_buffer.record_count) +// go_node_buffer.Node_list = make([]Node_info, c_node_buffer.record_count, c_node_buffer.record_count) +// for i := uint32(0); i < go_node_buffer.Record_count; i++ { +// node := C.node_from_list(c_node_buffer, C.int(i)) +// go_node := Node_info_convert_c_to_go(node) +// go_node_buffer.Node_list[i] = go_node +// } +// C.slurm_free_node_info_msg(c_node_buffer) +// +// return go_node_buffer +// +//} +// +//func (s SlurmStruct) ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (*pbslurm.ListNodesResp, error) { +// nodeList := 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 +//} diff --git a/adaptor/pcm_slurm/service/slurmdb_association.go b/adaptor/pcm_slurm/service/slurmdb_association.go new file mode 100644 index 00000000..fa2c8590 --- /dev/null +++ b/adaptor/pcm_slurm/service/slurmdb_association.go @@ -0,0 +1,126 @@ +package slurmer + +import ( + pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" + "context" +) + +/* +#cgo LDFLAGS: -lslurmdb + +#include +#include +#include +#include +#include + +typedef struct assoc_info_msg { + uint32_t record_count; + slurmdb_association_rec_t *assoc_array; +} assoc_info_msg_t; + + +typedef struct slurmdb_association_rec{ + List accounting_list; + char *acct; + char *cluster; + uint32_t def_qos_id; + uint64_t grp_cpu_mins; + uint64_t grp_cpu_run_mins; + uint32_t grp_cpus; + uint32_t grp_jobs; + uint32_t grp_mem; + uint32_t grp_nodes; + uint32_t grp_submit_jobs; + uint32_t grp_wall; + uint32_t id; + uint16_t is_def; + uint32_t lft; + uint64_t max_cpu_mins_pj; + uint64_t max_cpu_run_mins; + uint32_t max_cpus_pj; + uint32_t max_jobs; + uint32_t max_nodes_pj; + uint32_t max_submit_jobs; + uint32_t max_wall_pj; + char *parent_acct; + uint32_t parent_id; + char *partition; + List qos_list; + uint32_t rgt; + uint32_t shares_raw; + uint32_t uid; + assoc_mgr_association_usage_t *usage; + char *assoc; +} slurmdb_association_rec_pcm; + +struct assoc_info_msg get_assoc_info() { + struct assoc_info_msg associnfo; + List assocList = NULL; + slurmdb_association_cond_t *assoc_cond = NULL; + void *db_conn; + db_conn = slurmdb_connection_get(); + assocList = slurmdb_associations_get(db_conn, assoc_cond); + slurmdb_connection_close(&db_conn); + + slurmdb_association_rec_t *rec = NULL; + ListIterator itr = slurm_list_iterator_create(assocList); + int i = 0; + uint32_t length; + length = slurm_list_count(assocList); + associnfo.record_count = length; + associnfo.assoc_array = malloc(length * sizeof(slurmdb_association_rec_t)); + while ((rec = slurm_list_next(itr))) { + associnfo.assoc_array[i] = *rec; + i++; + } + return associnfo; +} + +struct slurmdb_association_rec *assoc_from_list(struct assoc_info_msg *list, int i) { + return (struct slurmdb_association_rec *) &list->assoc_array[i]; +} + +*/ +import "C" + +type AssocInfoMsg struct { + LastUpdate int64 + RecordCount uint32 + AssocInfoList []pbslurm.AssociationInfo +} + +func AssocDescriptorConvertCToGo(cStruct *C.struct_slurmdb_association_rec) pbslurm.AssociationInfo { + var goStruct pbslurm.AssociationInfo + goStruct.Id = int32(cStruct.id) + return goStruct +} + +func GetAssociationInfo() AssocInfoMsg { + var goAssocBuffer AssocInfoMsg + cAssocBuffer := C.get_assoc_info() + goAssocBuffer.RecordCount = uint32(cAssocBuffer.record_count) + goAssocBuffer.AssocInfoList = make([]pbslurm.AssociationInfo, cAssocBuffer.record_count, cAssocBuffer.record_count) + + for i := uint32(0); i < goAssocBuffer.RecordCount; i++ { + assoc := C.assoc_from_list(&cAssocBuffer, C.int(i)) + goAssociation := AssocDescriptorConvertCToGo(assoc) + goAssocBuffer.AssocInfoList[i] = goAssociation + } + return goAssocBuffer +} + +func (slurmStruct SlurmStruct) ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (*pbslurm.ListAssociationsResp, error) { + + assocList := GetAssociationInfo() + + resp := pbslurm.ListAssociationsResp{} + for _, assoc := range assocList.AssocInfoList { + assocInfoResult := pbslurm.AssociationInfo{} + assocInfoResult.Id = assoc.Id + + resp.AssocInfos = append(resp.AssocInfos, &assocInfoResult) + } + + return &resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurmdb_user.go b/adaptor/pcm_slurm/service/slurmdb_user.go new file mode 100644 index 00000000..7dc3b522 --- /dev/null +++ b/adaptor/pcm_slurm/service/slurmdb_user.go @@ -0,0 +1,102 @@ +package slurmer + +/* +#cgo LDFLAGS: -lslurmdb + +#include +#include +#include +#include +#include + +typedef struct user_info_msg { + uint32_t record_count; + slurmdb_user_rec_t *user_array; +} user_info_msg_t; + +typedef struct slurmdb_user_rec{ + uint16_t admin_level; + List assoc_list; + List coord_accts; + char *default_acct; + char *default_wckey; + char *name; + char *old_name; + uint32_t uid; + List wckey_list; +} slurmdb_user_rec_pcm; + +struct user_info_msg get_user_info() { + struct user_info_msg userinfo; + List userList = NULL; + slurmdb_user_cond_t *user_cond = NULL; + void *db_conn; + db_conn = slurmdb_connection_get(); + userList = slurmdb_users_get(db_conn, user_cond); + slurmdb_connection_close(&db_conn); + + slurmdb_user_rec_t *rec = NULL; + ListIterator itr = slurm_list_iterator_create(userList); + int i = 0; + uint32_t length; + length = slurm_list_count(userList); + userinfo.record_count = length; + userinfo.user_array = malloc(length * sizeof(slurmdb_user_rec_t)); + while ((rec = slurm_list_next(itr))) { + userinfo.user_array[i] = *rec; + i++; + } + return userinfo; +} + +struct slurmdb_user_rec *user_from_list(struct user_info_msg *list, int i) { + return (struct slurmdb_user_rec *) &list->user_array[i]; +} + +*/ +import "C" +import ( + pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" + "context" +) + +type UserInfoMsg struct { + Last_update int64 + Record_count uint32 + UserInfoList []pbslurm.UserInfo +} + +func User_descriptor_convert_c_to_go(c_struct *C.struct_slurmdb_user_rec) pbslurm.UserInfo { + var go_struct pbslurm.UserInfo + go_struct.Name = C.GoString(c_struct.name) + return go_struct +} + +func GetUserInfo() UserInfoMsg { + var go_user_buffer UserInfoMsg + c_user_buffer := C.get_user_info() + go_user_buffer.Record_count = uint32(c_user_buffer.record_count) + go_user_buffer.UserInfoList = make([]pbslurm.UserInfo, c_user_buffer.record_count, c_user_buffer.record_count) + + for i := uint32(0); i < go_user_buffer.Record_count; i++ { + user := C.user_from_list(&c_user_buffer, C.int(i)) + go_user := User_descriptor_convert_c_to_go(user) + go_user_buffer.UserInfoList[i] = go_user + } + return go_user_buffer +} + +func (slurmStruct SlurmStruct) ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (*pbslurm.ListUsersResp, error) { + + userList := GetUserInfo() + + resp := pbslurm.ListUsersResp{} + for _, user := range userList.UserInfoList { + userInfoResult := pbslurm.UserInfo{} + userInfoResult.Name = user.Name + + resp.UserInfos = append(resp.UserInfos, &userInfoResult) + } + + return &resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurmer.go b/adaptor/pcm_slurm/service/slurmer.go index b723467b..2869df86 100644 --- a/adaptor/pcm_slurm/service/slurmer.go +++ b/adaptor/pcm_slurm/service/slurmer.go @@ -6,14 +6,18 @@ import ( ) type Slurmer interface { - ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (resp *pbslurm.ListNodesResp, err error) //list slurm nodes + ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (resp *pbslurm.ListNodesResp, err error) //list slurm nodes + ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (resp *pbslurm.ListUsersResp, err error) //list slurm users + ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (resp *pbslurm.ListAssociationsResp, err error) //list slurm associations } -func SelectSlurmVersion(slurmVersion int32) (slurmer Slurmer, err error) { +func SelectSlurmVersion(slurmVersion pbslurm.SlurmVersion) (slurmer Slurmer, err error) { switch slurmVersion { - case int32(pbslurm.SlurmVersion_tianhe): + case pbslurm.SlurmVersion_tianhe: return SelectTianhe() + case pbslurm.SlurmVersion_shenwei: + print("no adaptor for shenwei right now") } return } diff --git a/adaptor/pcm_vm/service/harvester_util.go b/adaptor/pcm_vm/service/harvester_util.go index b98003fa..2883d436 100644 --- a/adaptor/pcm_vm/service/harvester_util.go +++ b/adaptor/pcm_vm/service/harvester_util.go @@ -37,8 +37,8 @@ const ( var ( // ManagementResourceTypes lists the types we use the management client for - ManagementResourceTypes = []string{"cluster", "node", "project"} - // ProjectResourceTypes lists the types we use the cluster client for + ManagementResourceTypes = []string{"user", "node", "project"} + // ProjectResourceTypes lists the types we use the user client for ProjectResourceTypes = []string{"secret", "namespacedSecret", "workload"} // ClusterResourceTypes lists the types we use the project client for ClusterResourceTypes = []string{"persistentVolume", "storageClass", "namespace"} @@ -322,7 +322,7 @@ func parseClusterAndProjectID(id string) (string, string, error) { return "", "", fmt.Errorf("unable to extract clusterid and projectid from [%s]", id) } -// getClusterNames maps cluster ID to name and defaults to ID if name is blank +// getClusterNames maps user ID to name and defaults to ID if name is blank func getClusterNames(ctx *cli.Context, c *cliclient.MasterClient) (map[string]string, error) { clusterNames := make(map[string]string) clusterCollection, err := c.ManagementClient.Cluster.List(defaultListOpts(ctx)) diff --git a/examples/slurm/get_partitions.go b/examples/slurm/get_partitions.go index e5699ff8..7f9ed497 100644 --- a/examples/slurm/get_partitions.go +++ b/examples/slurm/get_partitions.go @@ -1,19 +1,20 @@ package main -import "slurm/partitioninfo" -import "fmt" +import ( + partition_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo_tianhe/src/slurm/partitioninfo" + "fmt" +) -func main(){ +func main() { partition_list := partition_info.Get_partitions() fmt.Printf("Found %d partions \n", partition_list.Record_count) - -/* a little bit nicer */ + /* a little bit nicer */ fmt.Printf("Name\t Nodes\t\t\t Max_time(min)\t\t Tres\n") fmt.Printf("________________________________________\n") for i := range partition_list.Partition_list { partition := partition_list.Partition_list[i] - fmt.Printf("%s\t %s\t %d\t %d\n", partition.Name, partition.Nodes, partition.Max_time, partition.Node_inx ) + fmt.Printf("%s\t %s\t %d\t %d\n", partition.Name, partition.Nodes, partition.Max_time, partition.Node_inx) } diff --git a/examples/slurm/submit_example/submit_mpi_and_update.go b/examples/slurm/submit_example/submit_mpi_and_update.go index c9549066..429933c4 100644 --- a/examples/slurm/submit_example/submit_mpi_and_update.go +++ b/examples/slurm/submit_example/submit_mpi_and_update.go @@ -1,127 +1,128 @@ package main - -import "slurm/submitjob" -import "slurm" -import "os" -import "strconv" -import "fmt" -import "os/exec" -import "path/filepath" -import "slurm/jobinfo" -import "time" -import "os/user" - - - -func fileExists(filename string) bool { - info, err := os.Stat(filename) - if os.IsNotExist(err) { - return false - } - return !info.IsDir() -} -func build_container(file_name,container_name string){ - - cmd := exec.Command("sudo", "/usr/local/bin/singularity", "build",container_name, file_name) - fmt.Print("Now build new container") - fmt.Printf("%s\n", cmd.String()) - stdoutStderr, err := cmd.CombinedOutput() - if err != nil { - fmt.Printf("error in creating container %s \n", err); +// +// +//import "slurm/submitjob" +//import "slurm" +//import "os" +//import "strconv" +//import "fmt" +//import "os/exec" +//import "path/filepath" +//import "slurm/jobinfo" +//import "time" +//import "os/user" +// +// +// +//func fileExists(filename string) bool { +// info, err := os.Stat(filename) +// if os.IsNotExist(err) { +// return false +// } +// return !info.IsDir() +//} +//func build_container(file_name,container_name string){ +// +// cmd := exec.Command("sudo", "/usr/local/bin/singularity", "build",container_name, file_name) +// fmt.Print("Now build new container") +// fmt.Printf("%s\n", cmd.String()) +// stdoutStderr, err := cmd.CombinedOutput() +// if err != nil { +// fmt.Printf("error in creating container %s \n", err); +//// return +// } +// fmt.Printf("%s\n", stdoutStderr) +//} +// +//func main(){ +// job_desc := submit_job.Job_descriptor{} +// +// dir, _ := os.Getwd() +// container := filepath.Join(dir, "mpi_container.img") +// definition := filepath.Join(dir, "mpi_container.def") +// if !fileExists(container){ +// build_container(definition,container) +// } +// +// if !fileExists(container){ // return - } - fmt.Printf("%s\n", stdoutStderr) -} - -func main(){ - job_desc := submit_job.Job_descriptor{} - - dir, _ := os.Getwd() - container := filepath.Join(dir, "mpi_container.img") - definition := filepath.Join(dir, "mpi_container.def") - if !fileExists(container){ - build_container(definition,container) - } - - if !fileExists(container){ - return - } - /* use Cmd to create our script */ - - job_desc.Script = "#!/bin/bash\n export PATH=$PATH:/usr/local/bin\n srun hostname \n" - cmd := exec.Command( "/home0/opt/openmpi/bin/mpirun", "-mca btl_tcp_if_include eth1", "/usr/local/bin/singularity", "exec",container, "/opt/mpi_pingpong" ) - job_desc.Script+= cmd.String() - fmt.Printf("cmd %s\n", job_desc.Script) - user, _:= user.Current() - userid , _ := strconv.Atoi(user.Uid) - job_desc.User_id= uint32(userid) - groupid , _ := strconv.Atoi(user.Gid) - - job_desc.Group_id= uint32(groupid) - job_desc.Name = "flex_mpi_job" - job_desc.Partition="long" - job_desc.Time_limit = uint32(60) - job_desc.Ntasks_per_node = uint16(1) - job_desc.Num_tasks = uint32(2) - job_desc.Std_out = ("./%j-out.txt") - job_desc.Std_err = ("./%j-err.txt") - job_desc.Work_dir = dir - - time.Sleep(3 * time.Second) - answer := submit_job.Submit_job(&job_desc) - if(answer.Error_code != 0) { - msg := slurm.GetErrorString(answer.Error_code) - fmt.Printf("Error: %s\n" ,msg) - return - } - fmt.Printf("Submitted Job %d\n", answer.Job_id) - - time.Sleep(5 * time.Second) - - job_list := job_info.Get_job(answer.Job_id) - if job_list.Error_code != 0 { - msg := slurm.GetErrorString(job_list.Error_code) - fmt.Printf("Error: %s\n" ,msg) - return - - } - job := job_list.Job_list[0] - - fmt.Printf("job %d is %s\n", answer.Job_id, job.Job_stateS) - state := job.Job_stateS - if state == "Pending" { - fmt.Printf("Move job %d to another partition \n", answer.Job_id) - var ops submit_job.Update_job_options - - ops.Qos = "shortjobs" - ops.Partition = "short" - err2 := submit_job.Update_job(ops, uint32(answer.Job_id)) - if err2!= uint32(0) { - fmt.Printf("error %s \n", slurm.GetErrorString(err2)) - } - } - - for state == "Pending" || state == "Running" { - time.Sleep(2 * time.Second) - job_list = job_info.Get_job(answer.Job_id) - if job_list.Error_code != 0 { - msg := slurm.GetErrorString(job_list.Error_code) - fmt.Printf("Error: %s\n" ,msg) - return - - } - job = job_list.Job_list[0] - - state = job.Job_stateS - - fmt.Printf("job %d is %s\n",answer.Job_id, job.Job_stateS) - - - } - - fmt.Printf("Total runtime Job %d %s\n",job.Job_id, job_info.Get_job_runtime(job).String() ) -} - - - +// } +// /* use Cmd to create our script */ +// +// job_desc.Script = "#!/bin/bash\n export PATH=$PATH:/usr/local/bin\n srun hostname \n" +// cmd := exec.Command( "/home0/opt/openmpi/bin/mpirun", "-mca btl_tcp_if_include eth1", "/usr/local/bin/singularity", "exec",container, "/opt/mpi_pingpong" ) +// job_desc.Script+= cmd.String() +// fmt.Printf("cmd %s\n", job_desc.Script) +// user, _:= user.Current() +// userid , _ := strconv.Atoi(user.Uid) +// job_desc.User_id= uint32(userid) +// groupid , _ := strconv.Atoi(user.Gid) +// +// job_desc.Group_id= uint32(groupid) +// job_desc.Name = "flex_mpi_job" +// job_desc.Partition="long" +// job_desc.Time_limit = uint32(60) +// job_desc.Ntasks_per_node = uint16(1) +// job_desc.Num_tasks = uint32(2) +// job_desc.Std_out = ("./%j-out.txt") +// job_desc.Std_err = ("./%j-err.txt") +// job_desc.Work_dir = dir +// +// time.Sleep(3 * time.Second) +// answer := submit_job.Submit_job(&job_desc) +// if(answer.Error_code != 0) { +// msg := slurm.GetErrorString(answer.Error_code) +// fmt.Printf("Error: %s\n" ,msg) +// return +// } +// fmt.Printf("Submitted Job %d\n", answer.Job_id) +// +// time.Sleep(5 * time.Second) +// +// job_list := job_info.Get_job(answer.Job_id) +// if job_list.Error_code != 0 { +// msg := slurm.GetErrorString(job_list.Error_code) +// fmt.Printf("Error: %s\n" ,msg) +// return +// +// } +// job := job_list.Job_list[0] +// +// fmt.Printf("job %d is %s\n", answer.Job_id, job.Job_stateS) +// state := job.Job_stateS +// if state == "Pending" { +// fmt.Printf("Move job %d to another partition \n", answer.Job_id) +// var ops submit_job.Update_job_options +// +// ops.Qos = "shortjobs" +// ops.Partition = "short" +// err2 := submit_job.Update_job(ops, uint32(answer.Job_id)) +// if err2!= uint32(0) { +// fmt.Printf("error %s \n", slurm.GetErrorString(err2)) +// } +// } +// +// for state == "Pending" || state == "Running" { +// time.Sleep(2 * time.Second) +// job_list = job_info.Get_job(answer.Job_id) +// if job_list.Error_code != 0 { +// msg := slurm.GetErrorString(job_list.Error_code) +// fmt.Printf("Error: %s\n" ,msg) +// return +// +// } +// job = job_list.Job_list[0] +// +// state = job.Job_stateS +// +// fmt.Printf("job %d is %s\n",answer.Job_id, job.Job_stateS) +// +// +// } +// +// fmt.Printf("Total runtime Job %d %s\n",job.Job_id, job_info.Get_job_runtime(job).String() ) +//} +// +// +// diff --git a/examples/slurm/submit_example/submit_mpi_containier.go b/examples/slurm/submit_example/submit_mpi_containier.go index 64b85e7a..24256fa6 100644 --- a/examples/slurm/submit_example/submit_mpi_containier.go +++ b/examples/slurm/submit_example/submit_mpi_containier.go @@ -1,111 +1,112 @@ package main -import "slurm/submitjob" -import "slurm" -import "os/user" -import "os" -import "strconv" -import "fmt" -import "os/exec" -import "path/filepath" -import "slurm/jobinfo" -import "time" - - -func fileExists(filename string) bool { - info, err := os.Stat(filename) - if os.IsNotExist(err) { - return false - } - return !info.IsDir() -} -func build_container(file_name,container_name string){ - - cmd := exec.Command("sudo","/usr/local/bin/singularity", "build",container_name, file_name) - fmt.Print("Now build new container") - fmt.Printf("%s\n", cmd.String()) - stdoutStderr, err := cmd.CombinedOutput() - if err != nil { - fmt.Printf("error in creating container %s \n", err) - - fmt.Printf("%s\n", stdoutStderr) +// +//import "slurm/submitjob" +//import "slurm" +//import "os/user" +//import "os" +//import "strconv" +//import "fmt" +//import "os/exec" +//import "path/filepath" +//import "slurm/jobinfo" +//import "time" +// +// +//func fileExists(filename string) bool { +// info, err := os.Stat(filename) +// if os.IsNotExist(err) { +// return false +// } +// return !info.IsDir() +//} +//func build_container(file_name,container_name string){ +// +// cmd := exec.Command("sudo","/usr/local/bin/singularity", "build",container_name, file_name) +// fmt.Print("Now build new container") +// fmt.Printf("%s\n", cmd.String()) +// stdoutStderr, err := cmd.CombinedOutput() +// if err != nil { +// fmt.Printf("error in creating container %s \n", err) +// +// fmt.Printf("%s\n", stdoutStderr) +//// return +// } +// fmt.Printf("%s\n", stdoutStderr) +//} +// +//func main(){ +// job_desc := submit_job.Job_descriptor{} +// +// dir, _ := os.Getwd() +// container := filepath.Join(dir, "mpi_container.img") +// definition := filepath.Join(dir, "mpi_container.def") +// if !fileExists(container){ +// build_container(definition,container) +// } +// +// if !fileExists(container){ // return - } - fmt.Printf("%s\n", stdoutStderr) -} - -func main(){ - job_desc := submit_job.Job_descriptor{} - - dir, _ := os.Getwd() - container := filepath.Join(dir, "mpi_container.img") - definition := filepath.Join(dir, "mpi_container.def") - if !fileExists(container){ - build_container(definition,container) - } - - if !fileExists(container){ - return - } - /* use Cmd to create our script */ - - job_desc.Script = "#!/bin/bash\n export PATH=$PATH:/usr/local/bin\n hostname \n" - cmd := exec.Command( "/home0/opt/openmpi/bin/mpirun", "-mca btl_tcp_if_include eth1", "/usr/local/bin/singularity", "exec",container, "/opt/mpi_pingpong" ) - job_desc.Script+= cmd.String() - fmt.Printf("cmd %s\n", job_desc.Script) - user, _:= user.Current() - userid , _ := strconv.Atoi(user.Uid) - job_desc.User_id= uint32(userid) - groupid , _ := strconv.Atoi(user.Gid) - - job_desc.Group_id= uint32(groupid) - job_desc.Name = "mpi_job" - job_desc.Partition="long" - job_desc.Time_limit = uint32(60) - job_desc.Min_nodes =uint32(2) - job_desc.Num_tasks = uint32(2) - job_desc.Std_out = ("./%j-out.txt") - job_desc.Std_err = ("./%j-err.txt") - job_desc.Work_dir = dir - - answer := submit_job.Submit_job(&job_desc) - if(answer.Error_code != 0) { - msg := slurm.GetErrorString(answer.Error_code) - fmt.Printf("Error: %s\n" ,msg) - return - } - fmt.Printf("Submitted Job %d\n", answer.Job_id) - - - job_list := job_info.Get_job(answer.Job_id) - if job_list.Error_code != 0 { - msg := slurm.GetErrorString(job_list.Error_code) - fmt.Printf("Error: %s\n" ,msg) - return - - } - job := job_list.Job_list[0] - - fmt.Printf("job %d is %s\n",answer.Job_id, job.Job_stateS) - state := job.Job_stateS - for state == "Pending" || state == "Running" { - time.Sleep(2 * time.Second) - job_list = job_info.Get_job(answer.Job_id) - if job_list.Error_code != 0 { - msg := slurm.GetErrorString(job_list.Error_code) - fmt.Printf("Error: %s\n" ,msg) - return - - } - job = job_list.Job_list[0] - - state = job.Job_stateS - - fmt.Printf("job %d is %s\n",answer.Job_id, job.Job_stateS) - - - } - - fmt.Printf("Total runtime Job %d: %s\n",job.Job_id, job_info.Get_job_runtime(job).String() ) - -} +// } +// /* use Cmd to create our script */ +// +// job_desc.Script = "#!/bin/bash\n export PATH=$PATH:/usr/local/bin\n hostname \n" +// cmd := exec.Command( "/home0/opt/openmpi/bin/mpirun", "-mca btl_tcp_if_include eth1", "/usr/local/bin/singularity", "exec",container, "/opt/mpi_pingpong" ) +// job_desc.Script+= cmd.String() +// fmt.Printf("cmd %s\n", job_desc.Script) +// user, _:= user.Current() +// userid , _ := strconv.Atoi(user.Uid) +// job_desc.User_id= uint32(userid) +// groupid , _ := strconv.Atoi(user.Gid) +// +// job_desc.Group_id= uint32(groupid) +// job_desc.Name = "mpi_job" +// job_desc.Partition="long" +// job_desc.Time_limit = uint32(60) +// job_desc.Min_nodes =uint32(2) +// job_desc.Num_tasks = uint32(2) +// job_desc.Std_out = ("./%j-out.txt") +// job_desc.Std_err = ("./%j-err.txt") +// job_desc.Work_dir = dir +// +// answer := submit_job.Submit_job(&job_desc) +// if(answer.Error_code != 0) { +// msg := slurm.GetErrorString(answer.Error_code) +// fmt.Printf("Error: %s\n" ,msg) +// return +// } +// fmt.Printf("Submitted Job %d\n", answer.Job_id) +// +// +// job_list := job_info.Get_job(answer.Job_id) +// if job_list.Error_code != 0 { +// msg := slurm.GetErrorString(job_list.Error_code) +// fmt.Printf("Error: %s\n" ,msg) +// return +// +// } +// job := job_list.Job_list[0] +// +// fmt.Printf("job %d is %s\n",answer.Job_id, job.Job_stateS) +// state := job.Job_stateS +// for state == "Pending" || state == "Running" { +// time.Sleep(2 * time.Second) +// job_list = job_info.Get_job(answer.Job_id) +// if job_list.Error_code != 0 { +// msg := slurm.GetErrorString(job_list.Error_code) +// fmt.Printf("Error: %s\n" ,msg) +// return +// +// } +// job = job_list.Job_list[0] +// +// state = job.Job_stateS +// +// fmt.Printf("job %d is %s\n",answer.Job_id, job.Job_stateS) +// +// +// } +// +// fmt.Printf("Total runtime Job %d: %s\n",job.Job_id, job_info.Get_job_runtime(job).String() ) +// +//} diff --git a/examples/slurm/submit_example/submit_openmp_container.go b/examples/slurm/submit_example/submit_openmp_container.go index 80afa886..b7d8eb46 100644 --- a/examples/slurm/submit_example/submit_openmp_container.go +++ b/examples/slurm/submit_example/submit_openmp_container.go @@ -1,162 +1,162 @@ package main -import "slurm/submitjob" -import "slurm" -import "os/user" -import "os" -import "strconv" -import "fmt" -import "os/exec" -import "path/filepath" -import "slurm/jobinfo" -import "time" - - -func fileExists(filename string) bool { - info, err := os.Stat(filename) - if os.IsNotExist(err) { - return false - } - return !info.IsDir() -} -func build_container(file_name,container_name string){ - - cmd := exec.Command("sudo", "/usr/local/bin/singularity", "build",container_name, file_name) - fmt.Print("Now build new container") - fmt.Printf("%s\n", cmd.String()) - stdoutStderr, err := cmd.CombinedOutput() - if err != nil { - fmt.Printf("error in creating container %s \n", err) - - fmt.Printf("%s\n", stdoutStderr) +//import "slurm/submitjob" +//import "slurm" +//import "os/user" +//import "os" +//import "strconv" +//import "fmt" +//import "os/exec" +//import "path/filepath" +//import "slurm/jobinfo" +//import "time" +// +// +//func fileExists(filename string) bool { +// info, err := os.Stat(filename) +// if os.IsNotExist(err) { +// return false +// } +// return !info.IsDir() +//} +//func build_container(file_name,container_name string){ +// +// cmd := exec.Command("sudo", "/usr/local/bin/singularity", "build",container_name, file_name) +// fmt.Print("Now build new container") +// fmt.Printf("%s\n", cmd.String()) +// stdoutStderr, err := cmd.CombinedOutput() +// if err != nil { +// fmt.Printf("error in creating container %s \n", err) +// +// fmt.Printf("%s\n", stdoutStderr) +//// return +// } +// fmt.Printf("%s\n", stdoutStderr) +//} +// +//func main(){ +// job_desc := submit_job.Job_descriptor{} +// +// dir, _ := os.Getwd() +// container := filepath.Join(dir, "openmp_container.img") +// definition := filepath.Join(dir, "openmp_container.def") +// if !fileExists(container){ +// build_container(definition,container) +// } +// +// if !fileExists(container){ // return - } - fmt.Printf("%s\n", stdoutStderr) -} - -func main(){ - job_desc := submit_job.Job_descriptor{} - - dir, _ := os.Getwd() - container := filepath.Join(dir, "openmp_container.img") - definition := filepath.Join(dir, "openmp_container.def") - if !fileExists(container){ - build_container(definition,container) - } - - if !fileExists(container){ - return - } - /* use Cmd to create our script */ - - job_desc.Script = "#!/bin/bash\n export PATH=$PATH:/usr/local/bin\n hostname \n" - job_desc.Script+= "export OMP_NUM_THREADS=$SLURM_JOB_CPUS_PER_NODE\n" - cmd := exec.Command( "/usr/local/bin/singularity", "exec",container, "/opt/openmp_example" ) - - job_desc.Script+= cmd.String() - fmt.Printf("cmd %s\n", job_desc.Script) - user, _:= user.Current() - userid , _ := strconv.Atoi(user.Uid) - job_desc.User_id= uint32(userid) - groupid , _ := strconv.Atoi(user.Gid) - - job_desc.Group_id= uint32(groupid) - job_desc.Name = "test_job" - job_desc.Partition="long" - job_desc.Time_limit = uint32(60) - job_desc.Min_nodes =uint32(1) - job_desc.Num_tasks = uint32(1) - - job_desc.Cpus_per_task = uint16(2) - job_desc.Std_out = ("./%j-out.txt") - job_desc.Std_err = ("./%j-err.txt") - job_desc.Work_dir = dir - - answer := submit_job.Submit_job(&job_desc) - if(answer.Error_code != 0) { - msg := slurm.GetErrorString(answer.Error_code) - fmt.Printf("Error: %s\n" ,msg) - return - } - fmt.Printf("Submitted Job %d\n", answer.Job_id) - - /*Now, we submit the same jon again, ut with some oversubsciption */ - job_desc.Script = "#!/bin/bash\n export PATH=$PATH:/usr/local/bin\n hostname \n" - job_desc.Script+= "export OMP_NUM_THREADS=4\n" - - job_desc.Script+= cmd.String() - fmt.Printf("cmd %s\n", job_desc.Script) - answer2 := submit_job.Submit_job(&job_desc) - if(answer2.Error_code != 0) { - msg := slurm.GetErrorString(answer.Error_code) - fmt.Printf("Error: %s\n" ,msg) - return - } - fmt.Printf("Submitted Job %d\n", answer2.Job_id) - - - - job_list := job_info.Get_job(answer.Job_id) - if job_list.Error_code != 0 { - msg := slurm.GetErrorString(job_list.Error_code) - fmt.Printf("Error: %s\n" ,msg) - return - - } - job := job_list.Job_list[0] - - fmt.Printf("job is %s\n",job.Job_stateS) - state := job.Job_stateS - for state == "Pending" || state == "Running" { - time.Sleep(2 * time.Second) - job_list = job_info.Get_job(answer.Job_id) - if job_list.Error_code != 0 { - msg := slurm.GetErrorString(job_list.Error_code) - fmt.Printf("Error: %s\n" ,msg) - return - - } - job = job_list.Job_list[0] - - state = job.Job_stateS - - fmt.Printf("job is %s\n",job.Job_stateS) - - - } - - fmt.Printf("Total runtime first job %s\n",job_info.Get_job_runtime(job).String() ) - /*wait for second job */ - job_list = job_info.Get_job(answer2.Job_id) - if job_list.Error_code != 0 { - msg := slurm.GetErrorString(job_list.Error_code) - fmt.Printf("Error: %s\n" ,msg) - return - - } - job = job_list.Job_list[0] - - fmt.Printf("job is %s\n",job.Job_stateS) - state = job.Job_stateS - for state == "Pending" || state == "Running" { - time.Sleep(2 * time.Second) - job_list = job_info.Get_job(answer2.Job_id) - if job_list.Error_code != 0 { - msg := slurm.GetErrorString(job_list.Error_code) - fmt.Printf("Error: %s\n" ,msg) - return - - } - job = job_list.Job_list[0] - - state = job.Job_stateS - - fmt.Printf("job is %s\n",job.Job_stateS) - - - } - - - fmt.Printf("Total runtime second job %s\n",job_info.Get_job_runtime(job).String() ) - -} +// } +// /* use Cmd to create our script */ +// +// job_desc.Script = "#!/bin/bash\n export PATH=$PATH:/usr/local/bin\n hostname \n" +// job_desc.Script+= "export OMP_NUM_THREADS=$SLURM_JOB_CPUS_PER_NODE\n" +// cmd := exec.Command( "/usr/local/bin/singularity", "exec",container, "/opt/openmp_example" ) +// +// job_desc.Script+= cmd.String() +// fmt.Printf("cmd %s\n", job_desc.Script) +// user, _:= user.Current() +// userid , _ := strconv.Atoi(user.Uid) +// job_desc.User_id= uint32(userid) +// groupid , _ := strconv.Atoi(user.Gid) +// +// job_desc.Group_id= uint32(groupid) +// job_desc.Name = "test_job" +// job_desc.Partition="long" +// job_desc.Time_limit = uint32(60) +// job_desc.Min_nodes =uint32(1) +// job_desc.Num_tasks = uint32(1) +// +// job_desc.Cpus_per_task = uint16(2) +// job_desc.Std_out = ("./%j-out.txt") +// job_desc.Std_err = ("./%j-err.txt") +// job_desc.Work_dir = dir +// +// answer := submit_job.Submit_job(&job_desc) +// if(answer.Error_code != 0) { +// msg := slurm.GetErrorString(answer.Error_code) +// fmt.Printf("Error: %s\n" ,msg) +// return +// } +// fmt.Printf("Submitted Job %d\n", answer.Job_id) +// +// /*Now, we submit the same jon again, ut with some oversubsciption */ +// job_desc.Script = "#!/bin/bash\n export PATH=$PATH:/usr/local/bin\n hostname \n" +// job_desc.Script+= "export OMP_NUM_THREADS=4\n" +// +// job_desc.Script+= cmd.String() +// fmt.Printf("cmd %s\n", job_desc.Script) +// answer2 := submit_job.Submit_job(&job_desc) +// if(answer2.Error_code != 0) { +// msg := slurm.GetErrorString(answer.Error_code) +// fmt.Printf("Error: %s\n" ,msg) +// return +// } +// fmt.Printf("Submitted Job %d\n", answer2.Job_id) +// +// +// +// job_list := job_info.Get_job(answer.Job_id) +// if job_list.Error_code != 0 { +// msg := slurm.GetErrorString(job_list.Error_code) +// fmt.Printf("Error: %s\n" ,msg) +// return +// +// } +// job := job_list.Job_list[0] +// +// fmt.Printf("job is %s\n",job.Job_stateS) +// state := job.Job_stateS +// for state == "Pending" || state == "Running" { +// time.Sleep(2 * time.Second) +// job_list = job_info.Get_job(answer.Job_id) +// if job_list.Error_code != 0 { +// msg := slurm.GetErrorString(job_list.Error_code) +// fmt.Printf("Error: %s\n" ,msg) +// return +// +// } +// job = job_list.Job_list[0] +// +// state = job.Job_stateS +// +// fmt.Printf("job is %s\n",job.Job_stateS) +// +// +// } +// +// fmt.Printf("Total runtime first job %s\n",job_info.Get_job_runtime(job).String() ) +// /*wait for second job */ +// job_list = job_info.Get_job(answer2.Job_id) +// if job_list.Error_code != 0 { +// msg := slurm.GetErrorString(job_list.Error_code) +// fmt.Printf("Error: %s\n" ,msg) +// return +// +// } +// job = job_list.Job_list[0] +// +// fmt.Printf("job is %s\n",job.Job_stateS) +// state = job.Job_stateS +// for state == "Pending" || state == "Running" { +// time.Sleep(2 * time.Second) +// job_list = job_info.Get_job(answer2.Job_id) +// if job_list.Error_code != 0 { +// msg := slurm.GetErrorString(job_list.Error_code) +// fmt.Printf("Error: %s\n" ,msg) +// return +// +// } +// job = job_list.Job_list[0] +// +// state = job.Job_stateS +// +// fmt.Printf("job is %s\n",job.Job_stateS) +// +// +// } +// +// +// fmt.Printf("Total runtime second job %s\n",job_info.Get_job_runtime(job).String() ) +// +//} diff --git a/tenant/gen/openapiv2/idl/tenant.swagger.json b/tenant/gen/openapiv2/idl/tenant.swagger.json index 99e1518b..727eb16e 100644 --- a/tenant/gen/openapiv2/idl/tenant.swagger.json +++ b/tenant/gen/openapiv2/idl/tenant.swagger.json @@ -15,14 +15,11 @@ "protobufAny": { "type": "object", "properties": { - "typeUrl": { + "@type": { "type": "string" - }, - "value": { - "type": "string", - "format": "byte" } - } + }, + "additionalProperties": {} }, "rpcStatus": { "type": "object", From bb3fa0703ee08a9a6b5ae8478d2bd504de2b0bc5 Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Tue, 8 Nov 2022 01:11:10 -0800 Subject: [PATCH 02/11] list/get for user/account/association --- .../cgo_tianhe/src/slurm/test/test.go | 103 ++++ adaptor/pcm_slurm/gen/idl/slurm.pb.go | 89 ++-- adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go | 435 ++++++++++++--- adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go | 192 +++++-- .../pcm_slurm/gen/idl/slurmdb_account.pb.go | 385 ++++++++++++-- .../gen/idl/slurmdb_accounting.pb.go | 171 ++++++ adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go | 494 ++++++++++++++---- .../pcm_slurm/gen/idl/slurmdb_cluster.pb.go | 70 +-- adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go | 210 ++++++-- adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go | 34 +- .../gen/openapiv2/idl/slurm.swagger.json | 95 ++-- .../idl/slurmdb_accounting.swagger.json | 43 ++ adaptor/pcm_slurm/idl/slurm.proto | 21 +- adaptor/pcm_slurm/idl/slurm.yaml | 11 +- adaptor/pcm_slurm/idl/slurmdb_account.proto | 29 +- .../pcm_slurm/idl/slurmdb_accounting.proto | 12 + adaptor/pcm_slurm/idl/slurmdb_assoc.proto | 29 +- adaptor/pcm_slurm/idl/slurmdb_cluster.proto | 2 +- adaptor/pcm_slurm/idl/slurmdb_user.proto | 11 + adaptor/pcm_slurm/idl/slurmdb_wckey.proto | 2 +- adaptor/pcm_slurm/server/slurm.go | 50 +- adaptor/pcm_slurm/server/slurmImpl.go | 45 +- adaptor/pcm_slurm/service/slurm_node.go | 227 -------- adaptor/pcm_slurm/service/slurmdb_account.go | 113 ++++ .../pcm_slurm/service/slurmdb_association.go | 95 +++- adaptor/pcm_slurm/service/slurmdb_user.go | 45 +- adaptor/pcm_slurm/service/slurmer.go | 5 +- adaptor/pcm_slurm/service/tianhe.go | 23 - 28 files changed, 2323 insertions(+), 718 deletions(-) create mode 100644 adaptor/pcm_slurm/cgo_tianhe/src/slurm/test/test.go create mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_accounting.pb.go create mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_accounting.swagger.json create mode 100644 adaptor/pcm_slurm/idl/slurmdb_accounting.proto delete mode 100644 adaptor/pcm_slurm/service/slurm_node.go create mode 100644 adaptor/pcm_slurm/service/slurmdb_account.go diff --git a/adaptor/pcm_slurm/cgo_tianhe/src/slurm/test/test.go b/adaptor/pcm_slurm/cgo_tianhe/src/slurm/test/test.go new file mode 100644 index 00000000..70a343db --- /dev/null +++ b/adaptor/pcm_slurm/cgo_tianhe/src/slurm/test/test.go @@ -0,0 +1,103 @@ +package test + +// +///* +//#cgo LDFLAGS: -lslurmdb +// +//#include +//#include +//#include +//#include +//#include +// +//typedef struct user_info_msg { +// uint32_t record_count; +// slurmdb_user_rec_t *user_array; +//} user_info_msg_t; +// +//typedef struct slurmdb_user_rec{ +// uint16_t admin_level; +// List assoc_list; +// List coord_accts; +// char *default_acct; +// char *default_wckey; +// char *name; +// char *old_name; +// uint32_t uid; +// List wckey_list; +//} slurmdb_user_rec_t_f; +// +//struct user_info_msg get_user_info() { +// struct user_info_msg userinfo; +// List userList = NULL; +// slurmdb_user_cond_t *user_cond = NULL; +// void *db_conn; +// db_conn = slurmdb_connection_get(); +// userList = slurmdb_users_get(db_conn, user_cond); +// slurmdb_connection_close(&db_conn); +// +// slurmdb_user_rec_t *rec = NULL; +// ListIterator itr = slurm_list_iterator_create(userList); +// int i = 0; +// uint32_t length; +// length = slurm_list_count(userList); +// userinfo.record_count = length; +// userinfo.user_array = malloc(length * sizeof(slurmdb_user_rec_t)); +// while ((rec = slurm_list_next(itr))) { +// userinfo.user_array[i] = *rec; +// i++; +// } +// return userinfo; +//} +// +//struct slurmdb_user_rec *user_from_list(struct user_info_msg *list, int i) { +// return (struct slurmdb_user_rec *) &list->user_array[i]; +//} +// +//*/ +//import "C" +// +//type UserInfo struct { +// //uint16_t admin_level; /* really slurmdb_admin_level_t but for +// //packing purposes needs to be uint16_t */ +// //List assoc_list; /* list of slurmdb_association_rec_t *'s */ +// //List coord_accts; /* list of slurmdb_coord_rec_t *'s */ +// //char *default_acct; +// //char *default_wckey; +// Name string +// OldName string +// //uint32_t uid; +// //List wckey_list; /* list of slurmdb_wckey_rec_t *'s */ +//} +// +//type UserInfoMsg struct { +// Last_update int64 +// Record_count uint32 +// UserInfoList []UserInfo +//} +// +//func User_descriptor_convert_c_to_go(c_struct *C.struct_slurmdb_user_rec) UserInfo { +// var go_struct UserInfo +// go_struct.Name = C.GoString(c_struct.name) +// return go_struct +//} +// +//// []slurmpb.UserInfo +//func GetUserInfo() UserInfoMsg { +// var go_user_buffer UserInfoMsg +// c_user_buffer := C.get_user_info() +// go_user_buffer.Record_count = uint32(c_user_buffer.record_count) +// go_user_buffer.UserInfoList = make([]UserInfo, c_user_buffer.record_count, c_user_buffer.record_count) +// +// for i := uint32(0); i < go_user_buffer.Record_count; i++ { +// user := C.user_from_list(&c_user_buffer, C.int(i)) +// go_user := User_descriptor_convert_c_to_go(user) +// go_user_buffer.UserInfoList[i] = go_user +// } +// return go_user_buffer +//} +// +//func main() { +// userInfoMsg := GetUserInfo() +// println(userInfoMsg.UserInfoList[0].Name) +//} diff --git a/adaptor/pcm_slurm/gen/idl/slurm.pb.go b/adaptor/pcm_slurm/gen/idl/slurm.pb.go index 925c362b..834124da 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurm.pb.go @@ -27,43 +27,69 @@ var file_idl_slurm_proto_rawDesc = []byte{ 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x73, - 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xcb, 0x01, 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, - 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x36, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, - 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x10, 0x4c, 0x69, - 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, - 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, - 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, - 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x88, 0x03, 0x0a, 0x0c, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x12, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, + 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x11, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x4b, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, + 0x1b, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, + 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, + 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var file_idl_slurm_proto_goTypes = []interface{}{ - (*ListNodesReq)(nil), // 0: slurm.ListNodesReq - (*ListUsersReq)(nil), // 1: slurm.ListUsersReq + (*ListUsersReq)(nil), // 0: slurm.ListUsersReq + (*GetUserReq)(nil), // 1: slurm.GetUserReq (*ListAssociationsReq)(nil), // 2: slurm.ListAssociationsReq - (*ListNodesResp)(nil), // 3: slurm.ListNodesResp - (*ListUsersResp)(nil), // 4: slurm.ListUsersResp - (*ListAssociationsResp)(nil), // 5: slurm.ListAssociationsResp + (*GetAssociationReq)(nil), // 3: slurm.GetAssociationReq + (*ListAccountsReq)(nil), // 4: slurm.ListAccountsReq + (*GetAccountReq)(nil), // 5: slurm.GetAccountReq + (*ListUsersResp)(nil), // 6: slurm.ListUsersResp + (*GetUserResp)(nil), // 7: slurm.GetUserResp + (*ListAssociationsResp)(nil), // 8: slurm.ListAssociationsResp + (*GetAssociationResp)(nil), // 9: slurm.GetAssociationResp + (*ListAccountsResp)(nil), // 10: slurm.ListAccountsResp + (*GetAccountResp)(nil), // 11: slurm.GetAccountResp } var file_idl_slurm_proto_depIdxs = []int32{ - 0, // 0: slurm.SlurmService.ListNodes:input_type -> slurm.ListNodesReq - 1, // 1: slurm.SlurmService.ListUsers:input_type -> slurm.ListUsersReq - 2, // 2: slurm.SlurmService.ListAssociations:input_type -> slurm.ListAssociationsReq - 3, // 3: slurm.SlurmService.ListNodes:output_type -> slurm.ListNodesResp - 4, // 4: slurm.SlurmService.ListUsers:output_type -> slurm.ListUsersResp - 5, // 5: slurm.SlurmService.ListAssociations:output_type -> slurm.ListAssociationsResp - 3, // [3:6] is the sub-list for method output_type - 0, // [0:3] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 0, // 0: slurm.SlurmService.ListUsers:input_type -> slurm.ListUsersReq + 1, // 1: slurm.SlurmService.GetUser:input_type -> slurm.GetUserReq + 2, // 2: slurm.SlurmService.ListAssociations:input_type -> slurm.ListAssociationsReq + 3, // 3: slurm.SlurmService.GetAssociation:input_type -> slurm.GetAssociationReq + 4, // 4: slurm.SlurmService.ListAccounts:input_type -> slurm.ListAccountsReq + 5, // 5: slurm.SlurmService.GetAccount:input_type -> slurm.GetAccountReq + 6, // 6: slurm.SlurmService.ListUsers:output_type -> slurm.ListUsersResp + 7, // 7: slurm.SlurmService.GetUser:output_type -> slurm.GetUserResp + 8, // 8: slurm.SlurmService.ListAssociations:output_type -> slurm.ListAssociationsResp + 9, // 9: slurm.SlurmService.GetAssociation:output_type -> slurm.GetAssociationResp + 10, // 10: slurm.SlurmService.ListAccounts:output_type -> slurm.ListAccountsResp + 11, // 11: slurm.SlurmService.GetAccount:output_type -> slurm.GetAccountResp + 6, // [6:12] is the sub-list for method output_type + 0, // [0:6] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_idl_slurm_proto_init() } @@ -74,6 +100,7 @@ func file_idl_slurm_proto_init() { file_idl_node_proto_init() file_idl_slurmdb_user_proto_init() file_idl_slurmdb_assoc_proto_init() + file_idl_slurmdb_account_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go b/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go index 3d7cee0e..dc31f233 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go +++ b/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go @@ -31,42 +31,6 @@ 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 - -} - -func local_request_SlurmService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, 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 := server.ListNodes(ctx, &protoReq) - return msg, metadata, err - -} - var ( filter_SlurmService_ListUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -103,6 +67,42 @@ func local_request_SlurmService_ListUsers_0(ctx context.Context, marshaler runti } +var ( + filter_SlurmService_GetUser_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SlurmService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUserReq + 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_GetUser_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SlurmService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUserReq + 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_GetUser_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetUser(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_SlurmService_ListAssociations_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -139,37 +139,120 @@ func local_request_SlurmService_ListAssociations_0(ctx context.Context, marshale } +var ( + filter_SlurmService_GetAssociation_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SlurmService_GetAssociation_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAssociationReq + 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_GetAssociation_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetAssociation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SlurmService_GetAssociation_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAssociationReq + 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_GetAssociation_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetAssociation(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_SlurmService_ListAccounts_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SlurmService_ListAccounts_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListAccountsReq + 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_ListAccounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListAccounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SlurmService_ListAccounts_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListAccountsReq + 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_ListAccounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListAccounts(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_SlurmService_GetAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SlurmService_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAccountReq + 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_GetAccount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SlurmService_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAccountReq + 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_GetAccount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetAccount(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterSlurmServiceHandlerServer registers the http handlers for service SlurmService to "mux". // UnaryRPC :call SlurmServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSlurmServiceHandlerFromEndpoint instead. func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SlurmServiceServer) error { - mux.Handle("GET", pattern_SlurmService_ListNodes_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, "/slurm.SlurmService/ListNodes", runtime.WithHTTPPathPattern("/apis/slurm/listNodes")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlurmService_ListNodes_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_SlurmService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_SlurmService_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -195,6 +278,31 @@ func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_SlurmService_GetUser_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, "/slurm.SlurmService/GetUser", runtime.WithHTTPPathPattern("/apis/slurm/getUser")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SlurmService_GetUser_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_SlurmService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_SlurmService_ListAssociations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -220,6 +328,81 @@ func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_SlurmService_GetAssociation_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, "/slurm.SlurmService/GetAssociation", runtime.WithHTTPPathPattern("/apis/slurm/getAssociation")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SlurmService_GetAssociation_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_SlurmService_GetAssociation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SlurmService_ListAccounts_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, "/slurm.SlurmService/ListAccounts", runtime.WithHTTPPathPattern("/apis/slurm/listAccounts")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SlurmService_ListAccounts_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_SlurmService_ListAccounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SlurmService_GetAccount_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, "/slurm.SlurmService/GetAccount", runtime.WithHTTPPathPattern("/apis/slurm/getAccount")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SlurmService_GetAccount_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_SlurmService_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -261,28 +444,6 @@ func RegisterSlurmServiceHandler(ctx context.Context, mux *runtime.ServeMux, con // "SlurmServiceClient" to call the correct interceptors. func RegisterSlurmServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SlurmServiceClient) error { - mux.Handle("GET", pattern_SlurmService_ListNodes_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, "/slurm.SlurmService/ListNodes", runtime.WithHTTPPathPattern("/apis/slurm/listNodes")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlurmService_ListNodes_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlurmService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_SlurmService_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -305,6 +466,28 @@ func RegisterSlurmServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_SlurmService_GetUser_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, "/slurm.SlurmService/GetUser", runtime.WithHTTPPathPattern("/apis/slurm/getUser")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SlurmService_GetUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SlurmService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_SlurmService_ListAssociations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -327,21 +510,99 @@ func RegisterSlurmServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_SlurmService_GetAssociation_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, "/slurm.SlurmService/GetAssociation", runtime.WithHTTPPathPattern("/apis/slurm/getAssociation")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SlurmService_GetAssociation_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SlurmService_GetAssociation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SlurmService_ListAccounts_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, "/slurm.SlurmService/ListAccounts", runtime.WithHTTPPathPattern("/apis/slurm/listAccounts")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SlurmService_ListAccounts_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SlurmService_ListAccounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SlurmService_GetAccount_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, "/slurm.SlurmService/GetAccount", runtime.WithHTTPPathPattern("/apis/slurm/getAccount")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SlurmService_GetAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SlurmService_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( - pattern_SlurmService_ListNodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listNodes"}, "")) - pattern_SlurmService_ListUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listUsers"}, "")) + pattern_SlurmService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "getUser"}, "")) + pattern_SlurmService_ListAssociations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listAssociations"}, "")) + + pattern_SlurmService_GetAssociation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "getAssociation"}, "")) + + pattern_SlurmService_ListAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listAccounts"}, "")) + + pattern_SlurmService_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "getAccount"}, "")) ) var ( - forward_SlurmService_ListNodes_0 = runtime.ForwardResponseMessage - forward_SlurmService_ListUsers_0 = runtime.ForwardResponseMessage + forward_SlurmService_GetUser_0 = runtime.ForwardResponseMessage + forward_SlurmService_ListAssociations_0 = runtime.ForwardResponseMessage + + forward_SlurmService_GetAssociation_0 = runtime.ForwardResponseMessage + + forward_SlurmService_ListAccounts_0 = runtime.ForwardResponseMessage + + forward_SlurmService_GetAccount_0 = runtime.ForwardResponseMessage ) diff --git a/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go b/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go index 31156ec9..7e4cdec6 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go @@ -22,12 +22,18 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type SlurmServiceClient interface { - // Echo 样例接口 - ListNodes(ctx context.Context, in *ListNodesReq, opts ...grpc.CallOption) (*ListNodesResp, error) - // get user info from slurmdb + // list all users from slurmdb ListUsers(ctx context.Context, in *ListUsersReq, opts ...grpc.CallOption) (*ListUsersResp, error) - // get association info from slurmdb + // get specific user info from slurmdb + GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserResp, error) + // list all associations from slurmdb ListAssociations(ctx context.Context, in *ListAssociationsReq, opts ...grpc.CallOption) (*ListAssociationsResp, error) + // get specific association info from slurmdb + GetAssociation(ctx context.Context, in *GetAssociationReq, opts ...grpc.CallOption) (*GetAssociationResp, error) + // list all accounts info from slurmdb + ListAccounts(ctx context.Context, in *ListAccountsReq, opts ...grpc.CallOption) (*ListAccountsResp, error) + // get specific account info from slurmdb + GetAccount(ctx context.Context, in *GetAccountReq, opts ...grpc.CallOption) (*GetAccountResp, error) } type slurmServiceClient struct { @@ -38,18 +44,18 @@ func NewSlurmServiceClient(cc grpc.ClientConnInterface) SlurmServiceClient { return &slurmServiceClient{cc} } -func (c *slurmServiceClient) ListNodes(ctx context.Context, in *ListNodesReq, opts ...grpc.CallOption) (*ListNodesResp, error) { - out := new(ListNodesResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListNodes", in, out, opts...) +func (c *slurmServiceClient) ListUsers(ctx context.Context, in *ListUsersReq, opts ...grpc.CallOption) (*ListUsersResp, error) { + out := new(ListUsersResp) + err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListUsers", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *slurmServiceClient) ListUsers(ctx context.Context, in *ListUsersReq, opts ...grpc.CallOption) (*ListUsersResp, error) { - out := new(ListUsersResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListUsers", in, out, opts...) +func (c *slurmServiceClient) GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserResp, error) { + out := new(GetUserResp) + err := c.cc.Invoke(ctx, "/slurm.SlurmService/GetUser", in, out, opts...) if err != nil { return nil, err } @@ -65,16 +71,49 @@ func (c *slurmServiceClient) ListAssociations(ctx context.Context, in *ListAssoc return out, nil } +func (c *slurmServiceClient) GetAssociation(ctx context.Context, in *GetAssociationReq, opts ...grpc.CallOption) (*GetAssociationResp, error) { + out := new(GetAssociationResp) + err := c.cc.Invoke(ctx, "/slurm.SlurmService/GetAssociation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *slurmServiceClient) ListAccounts(ctx context.Context, in *ListAccountsReq, opts ...grpc.CallOption) (*ListAccountsResp, error) { + out := new(ListAccountsResp) + err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListAccounts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *slurmServiceClient) GetAccount(ctx context.Context, in *GetAccountReq, opts ...grpc.CallOption) (*GetAccountResp, error) { + out := new(GetAccountResp) + err := c.cc.Invoke(ctx, "/slurm.SlurmService/GetAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SlurmServiceServer is the server API for SlurmService service. // All implementations must embed UnimplementedSlurmServiceServer // for forward compatibility type SlurmServiceServer interface { - // Echo 样例接口 - ListNodes(context.Context, *ListNodesReq) (*ListNodesResp, error) - // get user info from slurmdb + // list all users from slurmdb ListUsers(context.Context, *ListUsersReq) (*ListUsersResp, error) - // get association info from slurmdb + // get specific user info from slurmdb + GetUser(context.Context, *GetUserReq) (*GetUserResp, error) + // list all associations from slurmdb ListAssociations(context.Context, *ListAssociationsReq) (*ListAssociationsResp, error) + // get specific association info from slurmdb + GetAssociation(context.Context, *GetAssociationReq) (*GetAssociationResp, error) + // list all accounts info from slurmdb + ListAccounts(context.Context, *ListAccountsReq) (*ListAccountsResp, error) + // get specific account info from slurmdb + GetAccount(context.Context, *GetAccountReq) (*GetAccountResp, error) mustEmbedUnimplementedSlurmServiceServer() } @@ -82,15 +121,24 @@ type SlurmServiceServer interface { type UnimplementedSlurmServiceServer struct { } -func (UnimplementedSlurmServiceServer) ListNodes(context.Context, *ListNodesReq) (*ListNodesResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") -} func (UnimplementedSlurmServiceServer) ListUsers(context.Context, *ListUsersReq) (*ListUsersResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented") } +func (UnimplementedSlurmServiceServer) GetUser(context.Context, *GetUserReq) (*GetUserResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") +} func (UnimplementedSlurmServiceServer) ListAssociations(context.Context, *ListAssociationsReq) (*ListAssociationsResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAssociations not implemented") } +func (UnimplementedSlurmServiceServer) GetAssociation(context.Context, *GetAssociationReq) (*GetAssociationResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAssociation not implemented") +} +func (UnimplementedSlurmServiceServer) ListAccounts(context.Context, *ListAccountsReq) (*ListAccountsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAccounts not implemented") +} +func (UnimplementedSlurmServiceServer) GetAccount(context.Context, *GetAccountReq) (*GetAccountResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") +} func (UnimplementedSlurmServiceServer) mustEmbedUnimplementedSlurmServiceServer() {} // UnsafeSlurmServiceServer may be embedded to opt out of forward compatibility for this service. @@ -104,24 +152,6 @@ func RegisterSlurmServiceServer(s grpc.ServiceRegistrar, srv SlurmServiceServer) s.RegisterService(&SlurmService_ServiceDesc, srv) } -func _SlurmService_ListNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNodesReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlurmServiceServer).ListNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/slurm.SlurmService/ListNodes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlurmServiceServer).ListNodes(ctx, req.(*ListNodesReq)) - } - return interceptor(ctx, in, info, handler) -} - func _SlurmService_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListUsersReq) if err := dec(in); err != nil { @@ -140,6 +170,24 @@ func _SlurmService_ListUsers_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _SlurmService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmServiceServer).GetUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurm.SlurmService/GetUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmServiceServer).GetUser(ctx, req.(*GetUserReq)) + } + return interceptor(ctx, in, info, handler) +} + func _SlurmService_ListAssociations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListAssociationsReq) if err := dec(in); err != nil { @@ -158,6 +206,60 @@ func _SlurmService_ListAssociations_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _SlurmService_GetAssociation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAssociationReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmServiceServer).GetAssociation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurm.SlurmService/GetAssociation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmServiceServer).GetAssociation(ctx, req.(*GetAssociationReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _SlurmService_ListAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAccountsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmServiceServer).ListAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurm.SlurmService/ListAccounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmServiceServer).ListAccounts(ctx, req.(*ListAccountsReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _SlurmService_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmServiceServer).GetAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurm.SlurmService/GetAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmServiceServer).GetAccount(ctx, req.(*GetAccountReq)) + } + return interceptor(ctx, in, info, handler) +} + // SlurmService_ServiceDesc is the grpc.ServiceDesc for SlurmService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -165,18 +267,30 @@ var SlurmService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "slurm.SlurmService", HandlerType: (*SlurmServiceServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "ListNodes", - Handler: _SlurmService_ListNodes_Handler, - }, { MethodName: "ListUsers", Handler: _SlurmService_ListUsers_Handler, }, + { + MethodName: "GetUser", + Handler: _SlurmService_GetUser_Handler, + }, { MethodName: "ListAssociations", Handler: _SlurmService_ListAssociations_Handler, }, + { + MethodName: "GetAssociation", + Handler: _SlurmService_GetAssociation_Handler, + }, + { + MethodName: "ListAccounts", + Handler: _SlurmService_ListAccounts_Handler, + }, + { + MethodName: "GetAccount", + Handler: _SlurmService_GetAccount_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "idl/slurm.proto", diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go index 66b251d5..0773b375 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go @@ -9,7 +9,7 @@ package slurmpb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" + _ "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -21,18 +21,20 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type AccountingInfo struct { +type AccountInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AllocSecs int64 `protobuf:"varint,1,opt,name=allocSecs,proto3" json:"allocSecs,omitempty"` - Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - PeriodStart *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=periodStart,proto3" json:"periodStart,omitempty"` + AssocList []*AssociationInfo `protobuf:"bytes,1,rep,name=assocList,proto3" json:"assocList,omitempty"` + Coordinators []*CoordInfo `protobuf:"bytes,2,rep,name=coordinators,proto3" json:"coordinators,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Organization string `protobuf:"bytes,5,opt,name=organization,proto3" json:"organization,omitempty"` } -func (x *AccountingInfo) Reset() { - *x = AccountingInfo{} +func (x *AccountInfo) Reset() { + *x = AccountInfo{} if protoimpl.UnsafeEnabled { mi := &file_idl_slurmdb_account_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -40,13 +42,13 @@ func (x *AccountingInfo) Reset() { } } -func (x *AccountingInfo) String() string { +func (x *AccountInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AccountingInfo) ProtoMessage() {} +func (*AccountInfo) ProtoMessage() {} -func (x *AccountingInfo) ProtoReflect() protoreflect.Message { +func (x *AccountInfo) ProtoReflect() protoreflect.Message { mi := &file_idl_slurmdb_account_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -58,28 +60,238 @@ func (x *AccountingInfo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AccountingInfo.ProtoReflect.Descriptor instead. -func (*AccountingInfo) Descriptor() ([]byte, []int) { +// Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead. +func (*AccountInfo) Descriptor() ([]byte, []int) { return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{0} } -func (x *AccountingInfo) GetAllocSecs() int64 { +func (x *AccountInfo) GetAssocList() []*AssociationInfo { if x != nil { - return x.AllocSecs + return x.AssocList } - return 0 + return nil } -func (x *AccountingInfo) GetId() int32 { +func (x *AccountInfo) GetCoordinators() []*CoordInfo { if x != nil { - return x.Id + return x.Coordinators } - return 0 + return nil } -func (x *AccountingInfo) GetPeriodStart() *timestamppb.Timestamp { +func (x *AccountInfo) GetDescription() string { if x != nil { - return x.PeriodStart + return x.Description + } + return "" +} + +func (x *AccountInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AccountInfo) GetOrganization() string { + if x != nil { + return x.Organization + } + return "" +} + +type ListAccountsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` +} + +func (x *ListAccountsReq) Reset() { + *x = ListAccountsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_account_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccountsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountsReq) ProtoMessage() {} + +func (x *ListAccountsReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_account_proto_msgTypes[1] + 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 ListAccountsReq.ProtoReflect.Descriptor instead. +func (*ListAccountsReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{1} +} + +func (x *ListAccountsReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +type ListAccountsResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountInfos []*AccountInfo `protobuf:"bytes,1,rep,name=account_infos,json=accountInfos,proto3" json:"account_infos,omitempty"` +} + +func (x *ListAccountsResp) Reset() { + *x = ListAccountsResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_account_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccountsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountsResp) ProtoMessage() {} + +func (x *ListAccountsResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_account_proto_msgTypes[2] + 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 ListAccountsResp.ProtoReflect.Descriptor instead. +func (*ListAccountsResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{2} +} + +func (x *ListAccountsResp) GetAccountInfos() []*AccountInfo { + if x != nil { + return x.AccountInfos + } + return nil +} + +type GetAccountReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` + AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` +} + +func (x *GetAccountReq) Reset() { + *x = GetAccountReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_account_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccountReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountReq) ProtoMessage() {} + +func (x *GetAccountReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_account_proto_msgTypes[3] + 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 GetAccountReq.ProtoReflect.Descriptor instead. +func (*GetAccountReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{3} +} + +func (x *GetAccountReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +func (x *GetAccountReq) GetAccountName() string { + if x != nil { + return x.AccountName + } + return "" +} + +type GetAccountResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountInfos []*AccountInfo `protobuf:"bytes,1,rep,name=account_infos,json=accountInfos,proto3" json:"account_infos,omitempty"` +} + +func (x *GetAccountResp) Reset() { + *x = GetAccountResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_account_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccountResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountResp) ProtoMessage() {} + +func (x *GetAccountResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_account_proto_msgTypes[4] + 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 GetAccountResp.ProtoReflect.Descriptor instead. +func (*GetAccountResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{4} +} + +func (x *GetAccountResp) GetAccountInfos() []*AccountInfo { + if x != nil { + return x.AccountInfos } return nil } @@ -92,16 +304,46 @@ var file_idl_slurmdb_account_proto_rawDesc = []byte{ 0x72, 0x6d, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x63, - 0x53, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, - 0x63, 0x53, 0x65, 0x63, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x64, 0x62, 0x5f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x63, 0x6f, 0x6f, 0x72, + 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd3, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x6f, 0x63, + 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x09, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x34, 0x0a, + 0x0c, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x43, 0x6f, 0x6f, 0x72, + 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x0a, + 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, + 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x0a, 0x10, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, + 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x6c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, + 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x49, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x73, + 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -116,18 +358,29 @@ func file_idl_slurmdb_account_proto_rawDescGZIP() []byte { return file_idl_slurmdb_account_proto_rawDescData } -var file_idl_slurmdb_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_idl_slurmdb_account_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_idl_slurmdb_account_proto_goTypes = []interface{}{ - (*AccountingInfo)(nil), // 0: slurm.AccountingInfo - (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp + (*AccountInfo)(nil), // 0: slurm.AccountInfo + (*ListAccountsReq)(nil), // 1: slurm.ListAccountsReq + (*ListAccountsResp)(nil), // 2: slurm.ListAccountsResp + (*GetAccountReq)(nil), // 3: slurm.GetAccountReq + (*GetAccountResp)(nil), // 4: slurm.GetAccountResp + (*AssociationInfo)(nil), // 5: slurm.AssociationInfo + (*CoordInfo)(nil), // 6: slurm.CoordInfo + (SlurmVersion)(0), // 7: slurm.SlurmVersion } var file_idl_slurmdb_account_proto_depIdxs = []int32{ - 1, // 0: slurm.AccountingInfo.periodStart:type_name -> google.protobuf.Timestamp - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 5, // 0: slurm.AccountInfo.assocList:type_name -> slurm.AssociationInfo + 6, // 1: slurm.AccountInfo.coordinators:type_name -> slurm.CoordInfo + 7, // 2: slurm.ListAccountsReq.slurm_version:type_name -> slurm.SlurmVersion + 0, // 3: slurm.ListAccountsResp.account_infos:type_name -> slurm.AccountInfo + 7, // 4: slurm.GetAccountReq.slurm_version:type_name -> slurm.SlurmVersion + 0, // 5: slurm.GetAccountResp.account_infos:type_name -> slurm.AccountInfo + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_idl_slurmdb_account_proto_init() } @@ -136,9 +389,59 @@ func file_idl_slurmdb_account_proto_init() { return } file_idl_static_proto_init() + file_idl_slurmdb_assoc_proto_init() + file_idl_slurmdb_coord_proto_init() if !protoimpl.UnsafeEnabled { file_idl_slurmdb_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountingInfo); i { + switch v := v.(*AccountInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_account_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAccountsReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_account_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAccountsResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_account_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccountReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_account_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccountResp); i { case 0: return &v.state case 1: @@ -156,7 +459,7 @@ func file_idl_slurmdb_account_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_slurmdb_account_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_accounting.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_accounting.pb.go new file mode 100644 index 00000000..564fd699 --- /dev/null +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_accounting.pb.go @@ -0,0 +1,171 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc (unknown) +// source: idl/slurmdb_accounting.proto + +package slurmpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AccountingInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AllocSecs int64 `protobuf:"varint,1,opt,name=allocSecs,proto3" json:"allocSecs,omitempty"` + Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + PeriodStart *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=periodStart,proto3" json:"periodStart,omitempty"` +} + +func (x *AccountingInfo) Reset() { + *x = AccountingInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_accounting_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountingInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountingInfo) ProtoMessage() {} + +func (x *AccountingInfo) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_accounting_proto_msgTypes[0] + 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 AccountingInfo.ProtoReflect.Descriptor instead. +func (*AccountingInfo) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_accounting_proto_rawDescGZIP(), []int{0} +} + +func (x *AccountingInfo) GetAllocSecs() int64 { + if x != nil { + return x.AllocSecs + } + return 0 +} + +func (x *AccountingInfo) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *AccountingInfo) GetPeriodStart() *timestamppb.Timestamp { + if x != nil { + return x.PeriodStart + } + return nil +} + +var File_idl_slurmdb_accounting_proto protoreflect.FileDescriptor + +var file_idl_slurmdb_accounting_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, + 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, + 0x6c, 0x6f, 0x63, 0x53, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, + 0x6c, 0x6c, 0x6f, 0x63, 0x53, 0x65, 0x63, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_idl_slurmdb_accounting_proto_rawDescOnce sync.Once + file_idl_slurmdb_accounting_proto_rawDescData = file_idl_slurmdb_accounting_proto_rawDesc +) + +func file_idl_slurmdb_accounting_proto_rawDescGZIP() []byte { + file_idl_slurmdb_accounting_proto_rawDescOnce.Do(func() { + file_idl_slurmdb_accounting_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_accounting_proto_rawDescData) + }) + return file_idl_slurmdb_accounting_proto_rawDescData +} + +var file_idl_slurmdb_accounting_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_idl_slurmdb_accounting_proto_goTypes = []interface{}{ + (*AccountingInfo)(nil), // 0: slurm.AccountingInfo + (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp +} +var file_idl_slurmdb_accounting_proto_depIdxs = []int32{ + 1, // 0: slurm.AccountingInfo.periodStart:type_name -> google.protobuf.Timestamp + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_idl_slurmdb_accounting_proto_init() } +func file_idl_slurmdb_accounting_proto_init() { + if File_idl_slurmdb_accounting_proto != nil { + return + } + file_idl_static_proto_init() + if !protoimpl.UnsafeEnabled { + file_idl_slurmdb_accounting_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountingInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_idl_slurmdb_accounting_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_idl_slurmdb_accounting_proto_goTypes, + DependencyIndexes: file_idl_slurmdb_accounting_proto_depIdxs, + MessageInfos: file_idl_slurmdb_accounting_proto_msgTypes, + }.Build() + File_idl_slurmdb_accounting_proto = out.File + file_idl_slurmdb_accounting_proto_rawDesc = nil + file_idl_slurmdb_accounting_proto_goTypes = nil + file_idl_slurmdb_accounting_proto_depIdxs = nil +} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go index 7f1f9cc4..3e383a8b 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go @@ -440,6 +440,234 @@ func (x *ListAssociationsResp) GetAssocInfos() []*AssociationInfo { return nil } +type GetAssociationReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` + Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` + Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"` + User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"` + Partition string `protobuf:"bytes,5,opt,name=partition,proto3" json:"partition,omitempty"` +} + +func (x *GetAssociationReq) Reset() { + *x = GetAssociationReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAssociationReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAssociationReq) ProtoMessage() {} + +func (x *GetAssociationReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[4] + 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 GetAssociationReq.ProtoReflect.Descriptor instead. +func (*GetAssociationReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{4} +} + +func (x *GetAssociationReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +func (x *GetAssociationReq) GetCluster() string { + if x != nil { + return x.Cluster + } + return "" +} + +func (x *GetAssociationReq) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *GetAssociationReq) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +func (x *GetAssociationReq) GetPartition() string { + if x != nil { + return x.Partition + } + return "" +} + +type GetAssociationResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AssocInfos []*AssociationInfo `protobuf:"bytes,1,rep,name=assoc_infos,json=assocInfos,proto3" json:"assoc_infos,omitempty"` +} + +func (x *GetAssociationResp) Reset() { + *x = GetAssociationResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAssociationResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAssociationResp) ProtoMessage() {} + +func (x *GetAssociationResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[5] + 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 GetAssociationResp.ProtoReflect.Descriptor instead. +func (*GetAssociationResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{5} +} + +func (x *GetAssociationResp) GetAssocInfos() []*AssociationInfo { + if x != nil { + return x.AssocInfos + } + return nil +} + +type SetAssociationReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` + AssocInfo *AssociationInfo `protobuf:"bytes,2,opt,name=assoc_info,json=assocInfo,proto3" json:"assoc_info,omitempty"` +} + +func (x *SetAssociationReq) Reset() { + *x = SetAssociationReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetAssociationReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetAssociationReq) ProtoMessage() {} + +func (x *SetAssociationReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[6] + 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 SetAssociationReq.ProtoReflect.Descriptor instead. +func (*SetAssociationReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{6} +} + +func (x *SetAssociationReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +func (x *SetAssociationReq) GetAssocInfo() *AssociationInfo { + if x != nil { + return x.AssocInfo + } + return nil +} + +type SetAssociationResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` +} + +func (x *SetAssociationResp) Reset() { + *x = SetAssociationResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetAssociationResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetAssociationResp) ProtoMessage() {} + +func (x *SetAssociationResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_assoc_proto_msgTypes[7] + 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 SetAssociationResp.ProtoReflect.Descriptor instead. +func (*SetAssociationResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{7} +} + +func (x *SetAssociationResp) GetResult() bool { + if x != nil { + return x.Result + } + return false +} + var File_idl_slurmdb_assoc_proto protoreflect.FileDescriptor var file_idl_slurmdb_assoc_proto_rawDesc = []byte{ @@ -448,82 +676,110 @@ var file_idl_slurmdb_assoc_proto_rawDesc = []byte{ 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, - 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, - 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x71, 0x6f, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x10, 0x0a, 0x0e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x55, 0x73, - 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xb7, 0x07, 0x0a, 0x0f, 0x41, 0x73, 0x73, 0x6f, - 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x63, - 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x63, 0x63, 0x74, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x51, - 0x6f, 0x73, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x66, 0x51, - 0x6f, 0x73, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x4d, 0x69, - 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, - 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x47, 0x70, 0x75, 0x52, 0x75, - 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x72, 0x70, - 0x47, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, - 0x70, 0x43, 0x70, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, - 0x43, 0x70, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, 0x62, 0x73, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x4e, 0x6f, 0x64, - 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x70, 0x4e, 0x6f, 0x64, - 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, - 0x6f, 0x62, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x70, 0x57, - 0x61, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x57, 0x61, - 0x6c, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x44, 0x65, 0x66, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x69, 0x73, 0x44, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x66, 0x74, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6c, 0x66, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61, - 0x78, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x50, 0x6a, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x50, 0x6a, 0x12, 0x24, - 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, - 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x50, - 0x6a, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, - 0x50, 0x6a, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x18, 0x13, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x1e, 0x0a, 0x0a, - 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x12, 0x24, 0x0a, 0x0d, - 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, - 0x62, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, 0x50, 0x6a, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, 0x50, 0x6a, - 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x74, 0x18, 0x17, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x18, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, - 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x07, 0x71, 0x6f, - 0x73, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x2e, 0x51, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x71, 0x6f, 0x73, - 0x4c, 0x69, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x67, 0x74, 0x18, 0x1b, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x72, 0x67, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, - 0x52, 0x61, 0x77, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, - 0x73, 0x52, 0x61, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x55, - 0x73, 0x61, 0x67, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x22, 0x4f, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, - 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0x4f, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x73, - 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, + 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x15, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x71, + 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x10, 0x0a, 0x0e, 0x41, 0x73, 0x73, 0x6f, + 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xb7, 0x07, 0x0a, 0x0f, 0x41, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, + 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x61, 0x63, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x63, 0x63, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, + 0x65, 0x66, 0x51, 0x6f, 0x73, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, + 0x65, 0x66, 0x51, 0x6f, 0x73, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, + 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x72, 0x70, + 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x47, 0x70, + 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, + 0x67, 0x72, 0x70, 0x47, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, + 0x62, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, 0x62, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x70, + 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x70, + 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x67, 0x72, + 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, + 0x72, 0x70, 0x57, 0x61, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, + 0x70, 0x57, 0x61, 0x6c, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x44, 0x65, 0x66, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x73, 0x44, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x6c, + 0x66, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6c, 0x66, 0x74, 0x12, 0x22, 0x0a, + 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x50, 0x6a, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x50, + 0x6a, 0x12, 0x24, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, + 0x6e, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, + 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, + 0x75, 0x73, 0x50, 0x6a, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, + 0x70, 0x75, 0x73, 0x50, 0x6a, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, + 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x12, + 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x12, + 0x24, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, + 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, + 0x50, 0x6a, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, + 0x6c, 0x50, 0x6a, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, + 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x41, + 0x63, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, + 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, + 0x07, 0x71, 0x6f, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x51, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, + 0x71, 0x6f, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x67, 0x74, 0x18, 0x1b, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x67, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x68, 0x61, + 0x72, 0x65, 0x73, 0x52, 0x61, 0x77, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x68, + 0x61, 0x72, 0x65, 0x73, 0x52, 0x61, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x1d, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x75, 0x73, 0x65, 0x72, 0x22, 0x4f, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4f, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, + 0x0b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x6f, + 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, + 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, + 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1c, + 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4d, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, + 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x11, + 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0a, 0x61, + 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x49, 0x6e, - 0x66, 0x6f, 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x2c, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -538,27 +794,35 @@ func file_idl_slurmdb_assoc_proto_rawDescGZIP() []byte { return file_idl_slurmdb_assoc_proto_rawDescData } -var file_idl_slurmdb_assoc_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_idl_slurmdb_assoc_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_idl_slurmdb_assoc_proto_goTypes = []interface{}{ (*AssocUsageInfo)(nil), // 0: slurm.AssocUsageInfo (*AssociationInfo)(nil), // 1: slurm.AssociationInfo (*ListAssociationsReq)(nil), // 2: slurm.ListAssociationsReq (*ListAssociationsResp)(nil), // 3: slurm.ListAssociationsResp - (*AccountingInfo)(nil), // 4: slurm.AccountingInfo - (*QosInfo)(nil), // 5: slurm.QosInfo - (SlurmVersion)(0), // 6: slurm.SlurmVersion + (*GetAssociationReq)(nil), // 4: slurm.GetAssociationReq + (*GetAssociationResp)(nil), // 5: slurm.GetAssociationResp + (*SetAssociationReq)(nil), // 6: slurm.SetAssociationReq + (*SetAssociationResp)(nil), // 7: slurm.SetAssociationResp + (*AccountingInfo)(nil), // 8: slurm.AccountingInfo + (*QosInfo)(nil), // 9: slurm.QosInfo + (SlurmVersion)(0), // 10: slurm.SlurmVersion } var file_idl_slurmdb_assoc_proto_depIdxs = []int32{ - 4, // 0: slurm.AssociationInfo.accountingList:type_name -> slurm.AccountingInfo - 5, // 1: slurm.AssociationInfo.qosList:type_name -> slurm.QosInfo - 0, // 2: slurm.AssociationInfo.assocUsage:type_name -> slurm.AssocUsageInfo - 6, // 3: slurm.ListAssociationsReq.slurm_version:type_name -> slurm.SlurmVersion - 1, // 4: slurm.ListAssociationsResp.assoc_infos:type_name -> slurm.AssociationInfo - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 8, // 0: slurm.AssociationInfo.accountingList:type_name -> slurm.AccountingInfo + 9, // 1: slurm.AssociationInfo.qosList:type_name -> slurm.QosInfo + 0, // 2: slurm.AssociationInfo.assocUsage:type_name -> slurm.AssocUsageInfo + 10, // 3: slurm.ListAssociationsReq.slurm_version:type_name -> slurm.SlurmVersion + 1, // 4: slurm.ListAssociationsResp.assoc_infos:type_name -> slurm.AssociationInfo + 10, // 5: slurm.GetAssociationReq.slurm_version:type_name -> slurm.SlurmVersion + 1, // 6: slurm.GetAssociationResp.assoc_infos:type_name -> slurm.AssociationInfo + 10, // 7: slurm.SetAssociationReq.slurm_version:type_name -> slurm.SlurmVersion + 1, // 8: slurm.SetAssociationReq.assoc_info:type_name -> slurm.AssociationInfo + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_idl_slurmdb_assoc_proto_init() } @@ -567,7 +831,7 @@ func file_idl_slurmdb_assoc_proto_init() { return } file_idl_static_proto_init() - file_idl_slurmdb_account_proto_init() + file_idl_slurmdb_accounting_proto_init() file_idl_slurmdb_qos_proto_init() if !protoimpl.UnsafeEnabled { file_idl_slurmdb_assoc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { @@ -618,6 +882,54 @@ func file_idl_slurmdb_assoc_proto_init() { return nil } } + file_idl_slurmdb_assoc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAssociationReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_assoc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAssociationResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_assoc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetAssociationReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_assoc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetAssociationResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -625,7 +937,7 @@ func file_idl_slurmdb_assoc_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_slurmdb_assoc_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go index 25d8c0e4..e775c4aa 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go @@ -173,40 +173,40 @@ var file_idl_slurmdb_cluster_proto_rawDesc = []byte{ 0x72, 0x6d, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x64, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x73, - 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x03, 0x0a, 0x0b, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x48, 0x6f, - 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x70, 0x75, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x70, 0x75, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x07, 0x64, 0x69, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, - 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, - 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, - 0x6f, 0x6f, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x70, 0x63, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x70, - 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x64, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, + 0x5f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x03, 0x0a, + 0x0b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x48, 0x6f, + 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x70, 0x75, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x70, 0x75, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x69, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x66, 0x6c, + 0x61, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x0a, + 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x41, 0x73, 0x73, + 0x6f, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x72, + 0x70, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x72, 0x70, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x5a, 0x08, 0x2f, + 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -243,7 +243,7 @@ func file_idl_slurmdb_cluster_proto_init() { return } file_idl_static_proto_init() - file_idl_slurmdb_account_proto_init() + file_idl_slurmdb_accounting_proto_init() file_idl_slurmdb_assoc_proto_init() if !protoimpl.UnsafeEnabled { file_idl_slurmdb_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go index a808c905..61839fac 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go @@ -273,6 +273,108 @@ func (x *ListUsersResp) GetUserInfos() []*UserInfo { return nil } +type GetUserReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` + UserName string `protobuf:"bytes,2,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` +} + +func (x *GetUserReq) Reset() { + *x = GetUserReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_user_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserReq) ProtoMessage() {} + +func (x *GetUserReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_user_proto_msgTypes[4] + 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 GetUserReq.ProtoReflect.Descriptor instead. +func (*GetUserReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{4} +} + +func (x *GetUserReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +func (x *GetUserReq) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +type GetUserResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserInfo []*UserInfo `protobuf:"bytes,1,rep,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"` +} + +func (x *GetUserResp) Reset() { + *x = GetUserResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_user_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserResp) ProtoMessage() {} + +func (x *GetUserResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_user_proto_msgTypes[5] + 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 GetUserResp.ProtoReflect.Descriptor instead. +func (*GetUserResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{5} +} + +func (x *GetUserResp) GetUserInfo() []*UserInfo { + if x != nil { + return x.UserInfo + } + return nil +} + type AddUsersReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -284,7 +386,7 @@ type AddUsersReq struct { func (x *AddUsersReq) Reset() { *x = AddUsersReq{} if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_user_proto_msgTypes[4] + mi := &file_idl_slurmdb_user_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -297,7 +399,7 @@ func (x *AddUsersReq) String() string { func (*AddUsersReq) ProtoMessage() {} func (x *AddUsersReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_user_proto_msgTypes[4] + mi := &file_idl_slurmdb_user_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -310,7 +412,7 @@ func (x *AddUsersReq) ProtoReflect() protoreflect.Message { // Deprecated: Use AddUsersReq.ProtoReflect.Descriptor instead. func (*AddUsersReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{4} + return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{6} } func (x *AddUsersReq) GetUserInfo() *UserInfo { @@ -331,7 +433,7 @@ type AddUsersResp struct { func (x *AddUsersResp) Reset() { *x = AddUsersResp{} if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_user_proto_msgTypes[5] + mi := &file_idl_slurmdb_user_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -344,7 +446,7 @@ func (x *AddUsersResp) String() string { func (*AddUsersResp) ProtoMessage() {} func (x *AddUsersResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_user_proto_msgTypes[5] + mi := &file_idl_slurmdb_user_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -357,7 +459,7 @@ func (x *AddUsersResp) ProtoReflect() protoreflect.Message { // Deprecated: Use AddUsersResp.ProtoReflect.Descriptor instead. func (*AddUsersResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{5} + return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{7} } func (x *AddUsersResp) GetResult() int32 { @@ -413,14 +515,24 @@ var file_idl_slurmdb_user_proto_rawDesc = []byte{ 0x12, 0x2e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, - 0x22, 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, - 0x2c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x26, 0x0a, - 0x0c, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x63, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x38, + 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, + 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, + 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x12, 0x2c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, + 0x26, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, + 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -435,32 +547,36 @@ func file_idl_slurmdb_user_proto_rawDescGZIP() []byte { return file_idl_slurmdb_user_proto_rawDescData } -var file_idl_slurmdb_user_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_idl_slurmdb_user_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_idl_slurmdb_user_proto_goTypes = []interface{}{ (*UserInfoList)(nil), // 0: slurm.UserInfoList (*UserInfo)(nil), // 1: slurm.UserInfo (*ListUsersReq)(nil), // 2: slurm.ListUsersReq (*ListUsersResp)(nil), // 3: slurm.ListUsersResp - (*AddUsersReq)(nil), // 4: slurm.AddUsersReq - (*AddUsersResp)(nil), // 5: slurm.AddUsersResp - (*AssociationInfo)(nil), // 6: slurm.AssociationInfo - (*CoordInfo)(nil), // 7: slurm.CoordInfo - (*WckeyInfo)(nil), // 8: slurm.WckeyInfo - (SlurmVersion)(0), // 9: slurm.SlurmVersion + (*GetUserReq)(nil), // 4: slurm.GetUserReq + (*GetUserResp)(nil), // 5: slurm.GetUserResp + (*AddUsersReq)(nil), // 6: slurm.AddUsersReq + (*AddUsersResp)(nil), // 7: slurm.AddUsersResp + (*AssociationInfo)(nil), // 8: slurm.AssociationInfo + (*CoordInfo)(nil), // 9: slurm.CoordInfo + (*WckeyInfo)(nil), // 10: slurm.WckeyInfo + (SlurmVersion)(0), // 11: slurm.SlurmVersion } var file_idl_slurmdb_user_proto_depIdxs = []int32{ - 1, // 0: slurm.UserInfoList.userInfos:type_name -> slurm.UserInfo - 6, // 1: slurm.UserInfo.assocList:type_name -> slurm.AssociationInfo - 7, // 2: slurm.UserInfo.coordList:type_name -> slurm.CoordInfo - 8, // 3: slurm.UserInfo.wckeyList:type_name -> slurm.WckeyInfo - 9, // 4: slurm.ListUsersReq.slurm_version:type_name -> slurm.SlurmVersion - 1, // 5: slurm.ListUsersResp.user_infos:type_name -> slurm.UserInfo - 1, // 6: slurm.AddUsersReq.user_info:type_name -> slurm.UserInfo - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 1, // 0: slurm.UserInfoList.userInfos:type_name -> slurm.UserInfo + 8, // 1: slurm.UserInfo.assocList:type_name -> slurm.AssociationInfo + 9, // 2: slurm.UserInfo.coordList:type_name -> slurm.CoordInfo + 10, // 3: slurm.UserInfo.wckeyList:type_name -> slurm.WckeyInfo + 11, // 4: slurm.ListUsersReq.slurm_version:type_name -> slurm.SlurmVersion + 1, // 5: slurm.ListUsersResp.user_infos:type_name -> slurm.UserInfo + 11, // 6: slurm.GetUserReq.slurm_version:type_name -> slurm.SlurmVersion + 1, // 7: slurm.GetUserResp.user_info:type_name -> slurm.UserInfo + 1, // 8: slurm.AddUsersReq.user_info:type_name -> slurm.UserInfo + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_idl_slurmdb_user_proto_init() } @@ -522,7 +638,7 @@ func file_idl_slurmdb_user_proto_init() { } } file_idl_slurmdb_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddUsersReq); i { + switch v := v.(*GetUserReq); i { case 0: return &v.state case 1: @@ -534,6 +650,30 @@ func file_idl_slurmdb_user_proto_init() { } } file_idl_slurmdb_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddUsersReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddUsersResp); i { case 0: return &v.state @@ -552,7 +692,7 @@ func file_idl_slurmdb_user_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_slurmdb_user_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go index b7be2044..9dfc0dd7 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go @@ -124,22 +124,22 @@ var file_idl_slurmdb_wckey_proto_rawDesc = []byte{ 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, - 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, - 0x01, 0x0a, 0x09, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x64, 0x44, 0x65, 0x66, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x64, 0x44, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, + 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xc4, 0x01, 0x0a, 0x09, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x3d, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x64, 0x44, 0x65, + 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x64, 0x44, 0x65, 0x66, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -174,7 +174,7 @@ func file_idl_slurmdb_wckey_proto_init() { return } file_idl_static_proto_init() - file_idl_slurmdb_account_proto_init() + file_idl_slurmdb_accounting_proto_init() if !protoimpl.UnsafeEnabled { file_idl_slurmdb_wckey_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WckeyInfo); i { diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json index c03cb46d..e85c1680 100644 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json @@ -44,6 +44,32 @@ } } }, + "slurmAccountInfo": { + "type": "object", + "properties": { + "assocList": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmAssociationInfo" + } + }, + "coordinators": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmCoordInfo" + } + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "organization": { + "type": "string" + } + } + }, "slurmAccountingInfo": { "type": "object", "properties": { @@ -203,7 +229,18 @@ } } }, - "slurmListAssociationsResp": { + "slurmGetAccountResp": { + "type": "object", + "properties": { + "accountInfos": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmAccountInfo" + } + } + } + }, + "slurmGetAssociationResp": { "type": "object", "properties": { "assocInfos": { @@ -214,13 +251,35 @@ } } }, - "slurmListNodesResp": { + "slurmGetUserResp": { "type": "object", "properties": { - "nodeInfos": { + "userInfo": { "type": "array", "items": { - "$ref": "#/definitions/slurmNodeInfo" + "$ref": "#/definitions/slurmUserInfo" + } + } + } + }, + "slurmListAccountsResp": { + "type": "object", + "properties": { + "accountInfos": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmAccountInfo" + } + } + } + }, + "slurmListAssociationsResp": { + "type": "object", + "properties": { + "assocInfos": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmAssociationInfo" } } } @@ -236,34 +295,6 @@ } } }, - "slurmNodeInfo": { - "type": "object", - "properties": { - "boards": { - "type": "integer", - "format": "int32" - }, - "cpus": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string" - }, - "realMemory": { - "type": "integer", - "format": "int32" - }, - "sockets": { - "type": "integer", - "format": "int32" - }, - "threads": { - "type": "integer", - "format": "int32" - } - } - }, "slurmQosInfo": { "type": "object", "properties": { diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_accounting.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_accounting.swagger.json new file mode 100644 index 00000000..6ba6c1da --- /dev/null +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_accounting.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "idl/slurmdb_accounting.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/adaptor/pcm_slurm/idl/slurm.proto b/adaptor/pcm_slurm/idl/slurm.proto index e0a78c97..2c7e5eeb 100644 --- a/adaptor/pcm_slurm/idl/slurm.proto +++ b/adaptor/pcm_slurm/idl/slurm.proto @@ -5,17 +5,28 @@ option go_package = "/slurmpb"; import "idl/node.proto"; import "idl/slurmdb_user.proto"; import "idl/slurmdb_assoc.proto"; +import "idl/slurmdb_account.proto"; // Slurm Services service SlurmService { - // Echo 样例接口 - rpc ListNodes(ListNodesReq) returns (ListNodesResp); - - // get user info from slurmdb + // list all users from slurmdb rpc ListUsers(ListUsersReq) returns (ListUsersResp); - // get association info from slurmdb + // get specific user info from slurmdb + rpc GetUser(GetUserReq) returns (GetUserResp); + + // list all associations from slurmdb rpc ListAssociations(ListAssociationsReq) returns (ListAssociationsResp); + + // get specific association info from slurmdb + rpc GetAssociation(GetAssociationReq) returns (GetAssociationResp); + + // list all accounts info from slurmdb + rpc ListAccounts(ListAccountsReq) returns (ListAccountsResp); + + // get specific account info from slurmdb + rpc GetAccount(GetAccountReq) returns (GetAccountResp); + } diff --git a/adaptor/pcm_slurm/idl/slurm.yaml b/adaptor/pcm_slurm/idl/slurm.yaml index e154cb46..d00d0305 100644 --- a/adaptor/pcm_slurm/idl/slurm.yaml +++ b/adaptor/pcm_slurm/idl/slurm.yaml @@ -3,9 +3,16 @@ config_version: 3 http: rules: - - selector: slurm.SlurmService.ListNodes - get: "/apis/slurm/listNodes" - selector: slurm.SlurmService.ListUsers get: "/apis/slurm/listUsers" + - selector: slurm.SlurmService.GetUser + get: "/apis/slurm/getUser" - selector: slurm.SlurmService.ListAssociations get: "/apis/slurm/listAssociations" + - selector: slurm.SlurmService.GetAssociation + get: "/apis/slurm/getAssociation" + - selector: slurm.SlurmService.ListAccounts + get: "/apis/slurm/listAccounts" + - selector: slurm.SlurmService.GetAccount + get: "/apis/slurm/getAccount" + diff --git a/adaptor/pcm_slurm/idl/slurmdb_account.proto b/adaptor/pcm_slurm/idl/slurmdb_account.proto index 019a1e43..b26a7892 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_account.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_account.proto @@ -4,9 +4,30 @@ package slurm; option go_package = "/slurmpb"; import "google/protobuf/timestamp.proto"; import "idl/static.proto"; +import "idl/slurmdb_assoc.proto"; +import "idl/slurmdb_coord.proto"; -message AccountingInfo{ - int64 allocSecs = 1 ; - int32 id = 2 ; - google.protobuf.Timestamp periodStart = 3; +message AccountInfo{ + repeated AssociationInfo assocList = 1; + repeated CoordInfo coordinators = 2; + string description = 3; + string name = 4; + string organization = 5; } + +message ListAccountsReq{ + SlurmVersion slurm_version = 1; +} + +message ListAccountsResp { + repeated AccountInfo account_infos = 1; +} + +message GetAccountReq{ + SlurmVersion slurm_version = 1; + string account_name = 2; +} + +message GetAccountResp { + repeated AccountInfo account_infos = 1; +} \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurmdb_accounting.proto b/adaptor/pcm_slurm/idl/slurmdb_accounting.proto new file mode 100644 index 00000000..019a1e43 --- /dev/null +++ b/adaptor/pcm_slurm/idl/slurmdb_accounting.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "google/protobuf/timestamp.proto"; +import "idl/static.proto"; + +message AccountingInfo{ + int64 allocSecs = 1 ; + int32 id = 2 ; + google.protobuf.Timestamp periodStart = 3; +} diff --git a/adaptor/pcm_slurm/idl/slurmdb_assoc.proto b/adaptor/pcm_slurm/idl/slurmdb_assoc.proto index 9730cee3..ee13cf09 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_assoc.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_assoc.proto @@ -4,7 +4,7 @@ package slurm; option go_package = "/slurmpb"; import "google/protobuf/timestamp.proto"; import "idl/static.proto"; -import "idl/slurmdb_account.proto"; +import "idl/slurmdb_accounting.proto"; import "idl/slurmdb_qos.proto"; @@ -45,9 +45,32 @@ message AssociationInfo{ AssocUsageInfo assocUsage = 30 ; string user = 31 ; } + message ListAssociationsReq{ SlurmVersion slurm_version = 1; } + message ListAssociationsResp { - repeated AssociationInfo assoc_infos =1; -} \ No newline at end of file + repeated AssociationInfo assoc_infos = 1; +} + +message GetAssociationReq{ + SlurmVersion slurm_version = 1; + string cluster = 2; + string account = 3; + string user = 4; + string partition = 5; +} + +message GetAssociationResp { + repeated AssociationInfo assoc_infos = 1; +} + +message SetAssociationReq{ + SlurmVersion slurm_version = 1; + AssociationInfo assoc_info = 2; +} + +message SetAssociationResp { + bool result = 1; +} diff --git a/adaptor/pcm_slurm/idl/slurmdb_cluster.proto b/adaptor/pcm_slurm/idl/slurmdb_cluster.proto index a575243a..c7ee0a04 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_cluster.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_cluster.proto @@ -4,7 +4,7 @@ package slurm; option go_package = "/slurmpb"; import "google/protobuf/timestamp.proto"; import "idl/static.proto"; -import "idl/slurmdb_account.proto"; +import "idl/slurmdb_accounting.proto"; import "idl/slurmdb_assoc.proto"; message ClusterInfo{ diff --git a/adaptor/pcm_slurm/idl/slurmdb_user.proto b/adaptor/pcm_slurm/idl/slurmdb_user.proto index 6a8aedf8..6e64d2f4 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_user.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_user.proto @@ -26,9 +26,20 @@ message UserInfo{ message ListUsersReq{ SlurmVersion slurm_version = 1; } + message ListUsersResp { repeated UserInfo user_infos =1; } + +message GetUserReq{ + SlurmVersion slurm_version = 1; + string user_name = 2; +} + +message GetUserResp { + repeated UserInfo user_info = 1; +} + message AddUsersReq{ UserInfo user_info = 1; } diff --git a/adaptor/pcm_slurm/idl/slurmdb_wckey.proto b/adaptor/pcm_slurm/idl/slurmdb_wckey.proto index 4a03a233..6808346e 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_wckey.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_wckey.proto @@ -4,7 +4,7 @@ package slurm; option go_package = "/slurmpb"; import "google/protobuf/timestamp.proto"; import "idl/static.proto"; -import "idl/slurmdb_account.proto"; +import "idl/slurmdb_accounting.proto"; message WckeyInfo{ repeated AccountingInfo accountingList = 1 ; diff --git a/adaptor/pcm_slurm/server/slurm.go b/adaptor/pcm_slurm/server/slurm.go index a7c42141..537377d1 100644 --- a/adaptor/pcm_slurm/server/slurm.go +++ b/adaptor/pcm_slurm/server/slurm.go @@ -12,16 +12,6 @@ type Server struct { slurmpb.UnimplementedSlurmServiceServer } -// ListNodes return all slurm nodes -func (s *Server) ListNodes(ctx context.Context, req *slurmpb.ListNodesReq) (*slurmpb.ListNodesResp, error) { - resp, err := ListNodes(ctx, req) - if err != nil { - glog.Errorf("ListSlurmNodes error %+v", err) - return nil, status.Errorf(codes.Internal, err.Error()) - } - return resp, nil -} - // ListUsers return all slurm users func (s *Server) ListUsers(ctx context.Context, req *slurmpb.ListUsersReq) (*slurmpb.ListUsersResp, error) { resp, err := ListUsers(ctx, req) @@ -32,6 +22,16 @@ func (s *Server) ListUsers(ctx context.Context, req *slurmpb.ListUsersReq) (*slu return resp, nil } +// GetUser return specific slurm user +func (s *Server) GetUser(ctx context.Context, req *slurmpb.GetUserReq) (*slurmpb.GetUserResp, error) { + resp, err := GetUser(ctx, req) + if err != nil { + glog.Errorf("GetSlurmUser error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + // ListAssociations return all slurm associations func (s *Server) ListAssociations(ctx context.Context, req *slurmpb.ListAssociationsReq) (*slurmpb.ListAssociationsResp, error) { resp, err := ListAssociations(ctx, req) @@ -41,3 +41,33 @@ func (s *Server) ListAssociations(ctx context.Context, req *slurmpb.ListAssociat } return resp, nil } + +// GetAssociation return specific slurm associations +func (s *Server) GetAssociation(ctx context.Context, req *slurmpb.GetAssociationReq) (*slurmpb.GetAssociationResp, error) { + resp, err := GetAssociation(ctx, req) + if err != nil { + glog.Errorf("GetSlurmAssociations error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// ListAccounts return all slurm accounts +func (s *Server) ListAccounts(ctx context.Context, req *slurmpb.ListAccountsReq) (*slurmpb.ListAccountsResp, error) { + resp, err := ListAccounts(ctx, req) + if err != nil { + glog.Errorf("ListSlurmAccounts error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// GetAccount return specific slurm account +func (s *Server) GetAccount(ctx context.Context, req *slurmpb.GetAccountReq) (*slurmpb.GetAccountResp, error) { + resp, err := GetAccount(ctx, req) + if err != nil { + glog.Errorf("GetSlurmAccount error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} diff --git a/adaptor/pcm_slurm/server/slurmImpl.go b/adaptor/pcm_slurm/server/slurmImpl.go index 4e790853..e8434402 100644 --- a/adaptor/pcm_slurm/server/slurmImpl.go +++ b/adaptor/pcm_slurm/server/slurmImpl.go @@ -6,15 +6,6 @@ import ( "context" ) -func ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (*pbslurm.ListNodesResp, error) { - slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) - if slurm == nil { - return nil, nil - } - resp, _ := slurm.ListNodes(ctx, req) - return resp, nil -} - func ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (*pbslurm.ListUsersResp, error) { slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) if slurm == nil { @@ -24,6 +15,15 @@ func ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (*pbslurm.ListUse return resp, nil } +func GetUser(ctx context.Context, req *pbslurm.GetUserReq) (*pbslurm.GetUserResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.GetUser(ctx, req) + return resp, nil +} + func ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (*pbslurm.ListAssociationsResp, error) { slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) if slurm == nil { @@ -32,3 +32,30 @@ func ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (*p resp, _ := slurm.ListAssociations(ctx, req) return resp, nil } + +func GetAssociation(ctx context.Context, req *pbslurm.GetAssociationReq) (*pbslurm.GetAssociationResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.GetAssociation(ctx, req) + return resp, nil +} + +func ListAccounts(ctx context.Context, req *pbslurm.ListAccountsReq) (*pbslurm.ListAccountsResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.ListAccounts(ctx, req) + return resp, nil +} + +func GetAccount(ctx context.Context, req *pbslurm.GetAccountReq) (*pbslurm.GetAccountResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.GetAccount(ctx, req) + return resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurm_node.go b/adaptor/pcm_slurm/service/slurm_node.go deleted file mode 100644 index bf5bed68..00000000 --- a/adaptor/pcm_slurm/service/slurm_node.go +++ /dev/null @@ -1,227 +0,0 @@ -package slurmer - -// -///* -//#cgo LDFLAGS: -lslurm -//#include -//#include -//#include -//inline uint8_t uint8_ptr(uint8_t* pointer) { -// if (NULL == pointer) { -// return -1;} -// return *pointer; -//} -//inline int8_t int8_ptr(int8_t* pointer) { -// if (NULL == pointer) { -// return -1;} -// return *pointer; -//} -//uint16_t uint16_ptr(uint16_t* pointer) { -// if (NULL == pointer) { -// return -1;} -// return *pointer; -//} -//inline int16_t int16_ptr(int16_t* pointer) { -// if (NULL == pointer) { -// return -1;} -// return *pointer; -//} -//inline uint32_t uint32_ptr(uint32_t* pointer) { -// if (NULL == pointer) { -// return -1;} -// return *pointer; -//} -//inline int32_t int32_ptr(int32_t* pointer) { -// if (NULL == pointer) { -// return -1;} -// return *pointer; -//} -//inline uint64_t uint64_ptr(uint64_t* pointer) { -// if (NULL == pointer) { -// return -1;} -// return *pointer; -//} -//inline int64_t int64_ptr(int16_t* pointer) { -// if (NULL == pointer) { -// return -1;} -// return *pointer; -//} -// struct node_info_msg *get_node_info(){ -// struct node_info_msg* node_buffer; -// if(slurm_load_node ((time_t) NULL, -// &node_buffer, SHOW_ALL)) -// return NULL; -// return node_buffer; -// } -// struct node_info_msg *get_single_node_info(char* name){ -// struct node_info_msg* node_buffer; -// if( slurm_load_node_single (&node_buffer, name, SHOW_DETAIL)) -// return NULL; -// return node_buffer; -// } -// -// struct node_info* node_from_list(struct node_info_msg *list, int i){ -// return &list->node_array[i]; -//} -// void free_node_buffer(void* buffer){ -// -// slurm_free_node_info_msg ((struct node_info_msg*)buffer); -// } -// -// -//*/ -//import "C" -// -//import ( -// pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" -// "context" -// "unsafe" -//) -// -//type Node_info struct { -// Arch string -// Boards uint16 -// Boot_time int64 -// Cores uint16 -// Cpu_load uint32 -// Cpus uint16 -// Features string -// Gres string -// Name string -// Node_addr string -// Node_hostname string -// Node_state uint32 -// Os string -// Real_memory uint64 -// Reason string -// Reason_time int64 -// Reason_uid uint32 -// Slurmd_start_time int64 -// Sockets uint16 -// Threads uint16 -// Tmp_disk uint32 -// Weight uint32 -//} -// -//func Node_info_convert_c_to_go(c_struct *C.struct_node_info) Node_info { -// var go_struct Node_info -// -// go_struct.Arch = C.GoString(c_struct.arch) -// go_struct.Boards = uint16(c_struct.boards) -// go_struct.Boot_time = int64(c_struct.boot_time) -// go_struct.Cores = uint16(c_struct.cores) -// go_struct.Cpu_load = uint32(c_struct.cpu_load) -// go_struct.Cpus = uint16(c_struct.cpus) -// go_struct.Features = C.GoString(c_struct.features) -// go_struct.Gres = C.GoString(c_struct.gres) -// go_struct.Name = C.GoString(c_struct.name) -// go_struct.Node_addr = C.GoString(c_struct.node_addr) -// go_struct.Node_hostname = C.GoString(c_struct.node_hostname) -// go_struct.Node_state = uint32(c_struct.node_state) -// go_struct.Os = C.GoString(c_struct.os) -// go_struct.Real_memory = uint64(c_struct.real_memory) -// go_struct.Reason = C.GoString(c_struct.reason) -// go_struct.Reason_time = int64(c_struct.reason_time) -// go_struct.Reason_uid = uint32(c_struct.reason_uid) -// go_struct.Slurmd_start_time = int64(c_struct.slurmd_start_time) -// go_struct.Sockets = uint16(c_struct.sockets) -// go_struct.Threads = uint16(c_struct.threads) -// go_struct.Tmp_disk = uint32(c_struct.tmp_disk) -// go_struct.Weight = uint32(c_struct.weight) -// return go_struct -//} -// -//func State_to_string(state uint32) string { -// -// switch s := C.uint16_t(state); s { -// case C.NODE_STATE_UNKNOWN: -// return "node state unknown" -// case C.NODE_STATE_DOWN: -// return "node state down" -// case C.NODE_STATE_IDLE: -// return "node state idle" -// case C.NODE_STATE_ALLOCATED: -// return "node state allocated" -// case C.NODE_STATE_ERROR: -// return "node state error" -// case C.NODE_STATE_MIXED: -// return "node state mixed" -// case C.NODE_STATE_FUTURE: -// return "node state future" -// case C.NODE_STATE_END: -// return "node state end" -// } -// return "Unkown state" -//} -// -//type Node_info_msg struct { -// Last_update int64 -// Record_count uint32 -// Error_code uint32 -// Node_list []Node_info -//} -// -//func Get_all_nodes() Node_info_msg { -// var go_node_buffer Node_info_msg -// c_node_buffer := C.get_node_info() -// if c_node_buffer == nil { -// go_node_buffer.Last_update = int64(0) -// go_node_buffer.Record_count = uint32(0) -// go_node_buffer.Error_code = uint32(C.slurm_get_errno()) -// return go_node_buffer -// } -// go_node_buffer.Last_update = int64(c_node_buffer.last_update) -// go_node_buffer.Record_count = uint32(c_node_buffer.record_count) -// go_node_buffer.Node_list = make([]Node_info, c_node_buffer.record_count, c_node_buffer.record_count) -// for i := uint32(0); i < go_node_buffer.Record_count; i++ { -// node := C.node_from_list(c_node_buffer, C.int(i)) -// go_node := Node_info_convert_c_to_go(node) -// go_node_buffer.Node_list[i] = go_node -// } -// C.slurm_free_node_info_msg(c_node_buffer) -// -// return go_node_buffer -//} -// -//func Get_node_info(name string) Node_info_msg { -// -// var go_node_buffer Node_info_msg -// c_name := C.CString(name) -// defer C.free(unsafe.Pointer(c_name)) -// c_node_buffer := C.get_single_node_info(c_name) -// if c_node_buffer == nil { -// go_node_buffer.Last_update = int64(0) -// go_node_buffer.Record_count = uint32(0) -// go_node_buffer.Error_code = uint32(C.slurm_get_errno()) -// -// return go_node_buffer -// } -// go_node_buffer.Last_update = int64(c_node_buffer.last_update) -// go_node_buffer.Record_count = uint32(c_node_buffer.record_count) -// go_node_buffer.Node_list = make([]Node_info, c_node_buffer.record_count, c_node_buffer.record_count) -// for i := uint32(0); i < go_node_buffer.Record_count; i++ { -// node := C.node_from_list(c_node_buffer, C.int(i)) -// go_node := Node_info_convert_c_to_go(node) -// go_node_buffer.Node_list[i] = go_node -// } -// C.slurm_free_node_info_msg(c_node_buffer) -// -// return go_node_buffer -// -//} -// -//func (s SlurmStruct) ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (*pbslurm.ListNodesResp, error) { -// nodeList := 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 -//} diff --git a/adaptor/pcm_slurm/service/slurmdb_account.go b/adaptor/pcm_slurm/service/slurmdb_account.go new file mode 100644 index 00000000..3f87e067 --- /dev/null +++ b/adaptor/pcm_slurm/service/slurmdb_account.go @@ -0,0 +1,113 @@ +package slurmer + +/* +#cgo LDFLAGS: -lslurmdb + +#include +#include +#include +#include +#include + +typedef struct account_info_msg { + uint32_t record_count; + slurmdb_account_rec_t *account_array; +} account_info_msg_t; + +typedef struct slurmdb_account_rec{ + List assoc_list; + List coord_accts; + char *description; + char *name; + char *organization; +} slurmdb_account_rec_pcm; + +struct account_info_msg get_account_info() { + struct account_info_msg accountinfo; + List accountList = NULL; + slurmdb_account_cond_t *account_cond = NULL; + void *db_conn; + db_conn = slurmdb_connection_get(); + accountList = slurmdb_accounts_get(db_conn, account_cond); + slurmdb_connection_close(&db_conn); + + slurmdb_account_rec_t *rec = NULL; + ListIterator itr = slurm_list_iterator_create(accountList); + int i = 0; + uint32_t length; + length = slurm_list_count(accountList); + accountinfo.record_count = length; + accountinfo.account_array = malloc(length * sizeof(slurmdb_account_rec_t)); + while ((rec = slurm_list_next(itr))) { + accountinfo.account_array[i] = *rec; + i++; + } + return accountinfo; +} + +struct slurmdb_account_rec *account_from_list(struct account_info_msg *list, int i) { + return (struct slurmdb_account_rec *) &list->account_array[i]; +} + +*/ +import "C" +import ( + pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" + "context" +) + +type AcctInfoMsg struct { + LastUpdate int64 + RecordCount uint32 + AcctInfoList []pbslurm.AccountInfo +} + +func AcctDescriptorConvertCToGo(cStruct *C.struct_slurmdb_account_rec) pbslurm.AccountInfo { + var goStruct pbslurm.AccountInfo + goStruct.Name = C.GoString(cStruct.name) + return goStruct +} + +func GetAcctInfo() AcctInfoMsg { + var goAcctBuffer AcctInfoMsg + cAcctBuffer := C.get_account_info() + goAcctBuffer.RecordCount = uint32(cAcctBuffer.record_count) + goAcctBuffer.AcctInfoList = make([]pbslurm.AccountInfo, cAcctBuffer.record_count, cAcctBuffer.record_count) + + for i := uint32(0); i < goAcctBuffer.RecordCount; i++ { + Acct := C.account_from_list(&cAcctBuffer, C.int(i)) + goAcct := AcctDescriptorConvertCToGo(Acct) + goAcctBuffer.AcctInfoList[i] = goAcct + } + return goAcctBuffer +} + +func (slurmStruct SlurmStruct) ListAccounts(ctx context.Context, req *pbslurm.ListAccountsReq) (*pbslurm.ListAccountsResp, error) { + + AcctList := GetAcctInfo() + + resp := pbslurm.ListAccountsResp{} + for _, Acct := range AcctList.AcctInfoList { + AcctInfoResult := pbslurm.AccountInfo{} + AcctInfoResult.Name = Acct.Name + + resp.AccountInfos = append(resp.AccountInfos, &AcctInfoResult) + } + + return &resp, nil +} + +func (slurmStruct SlurmStruct) GetAccount(ctx context.Context, req *pbslurm.GetAccountReq) (*pbslurm.GetAccountResp, error) { + + AcctList := GetAcctInfo() + + resp := pbslurm.GetAccountResp{} + for _, Acct := range AcctList.AcctInfoList { + AcctInfoResult := pbslurm.AccountInfo{} + AcctInfoResult.Name = Acct.Name + + resp.AccountInfos = append(resp.AccountInfos, &AcctInfoResult) + } + + return &resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurmdb_association.go b/adaptor/pcm_slurm/service/slurmdb_association.go index fa2c8590..a86f75c7 100644 --- a/adaptor/pcm_slurm/service/slurmdb_association.go +++ b/adaptor/pcm_slurm/service/slurmdb_association.go @@ -19,6 +19,13 @@ typedef struct assoc_info_msg { slurmdb_association_rec_t *assoc_array; } assoc_info_msg_t; +typedef struct list_assoc_req { + uint32_t slurm_version; + char *cluster; + char *account; + char *user; + char *partition; +} list_assoc_req_t; typedef struct slurmdb_association_rec{ List accounting_list; @@ -51,10 +58,10 @@ typedef struct slurmdb_association_rec{ uint32_t shares_raw; uint32_t uid; assoc_mgr_association_usage_t *usage; - char *assoc; + char *user; } slurmdb_association_rec_pcm; -struct assoc_info_msg get_assoc_info() { +struct assoc_info_msg get_assoc_infos() { struct assoc_info_msg associnfo; List assocList = NULL; slurmdb_association_cond_t *assoc_cond = NULL; @@ -92,13 +99,44 @@ type AssocInfoMsg struct { func AssocDescriptorConvertCToGo(cStruct *C.struct_slurmdb_association_rec) pbslurm.AssociationInfo { var goStruct pbslurm.AssociationInfo + //goStruct.AccountingList = cStruct.accounting_list + goStruct.Acct = C.GoString(cStruct.acct) + goStruct.Cluster = C.GoString(cStruct.cluster) + goStruct.DefQosId = int32(cStruct.def_qos_id) + goStruct.GrpCpuMins = int64(cStruct.grp_cpu_mins) + goStruct.GrpGpuRunMins = int64(cStruct.grp_cpu_run_mins) + goStruct.GrpCpus = int32(cStruct.grp_cpus) + goStruct.GrpJobs = int32(cStruct.grp_jobs) + goStruct.GrpMem = int32(cStruct.grp_mem) + goStruct.GrpNodes = int32(cStruct.grp_nodes) + goStruct.GrpSubmitJobs = int32(cStruct.grp_submit_jobs) + goStruct.GrpWall = int32(cStruct.grp_wall) goStruct.Id = int32(cStruct.id) + goStruct.IsDef = int32(cStruct.is_def) + goStruct.Lft = int32(cStruct.lft) + goStruct.MaxCpuMinsPj = int64(cStruct.max_cpu_mins_pj) + goStruct.MaxCpuRunMins = int64(cStruct.max_cpu_run_mins) + goStruct.MaxCpusPj = int32(cStruct.max_cpus_pj) + goStruct.MaxJobs = int32(cStruct.max_jobs) + goStruct.MaxNodesPj = int32(cStruct.max_nodes_pj) + goStruct.MaxSubmitJobs = int32(cStruct.max_submit_jobs) + goStruct.MaxWallPj = int32(cStruct.max_wall_pj) + goStruct.ParentAcct = C.GoString(cStruct.parent_acct) + goStruct.ParentId = int32(cStruct.parent_id) + goStruct.Partition = C.GoString(cStruct.partition) + //goStruct.QosList = cStruct.qos_list + goStruct.Rgt = int32(cStruct.rgt) + goStruct.SharesRaw = int32(cStruct.shares_raw) + goStruct.Uid = int32(cStruct.uid) + //goStruct.AssocUsage = cStruct.usage + goStruct.User = C.GoString(cStruct.user) return goStruct } -func GetAssociationInfo() AssocInfoMsg { +// GetAssociationInfos list info for all associations +func GetAssociationInfos() AssocInfoMsg { var goAssocBuffer AssocInfoMsg - cAssocBuffer := C.get_assoc_info() + cAssocBuffer := C.get_assoc_infos() goAssocBuffer.RecordCount = uint32(cAssocBuffer.record_count) goAssocBuffer.AssocInfoList = make([]pbslurm.AssociationInfo, cAssocBuffer.record_count, cAssocBuffer.record_count) @@ -110,16 +148,55 @@ func GetAssociationInfo() AssocInfoMsg { return goAssocBuffer } +// SetAssociation set association info +func SetAssociation(accocInfo pbslurm.AssociationInfo) bool { + var goAssocBuffer AssocInfoMsg + cAssocBuffer := C.get_assoc_infos() + goAssocBuffer.RecordCount = uint32(cAssocBuffer.record_count) + goAssocBuffer.AssocInfoList = make([]pbslurm.AssociationInfo, cAssocBuffer.record_count, cAssocBuffer.record_count) + + for i := uint32(0); i < goAssocBuffer.RecordCount; i++ { + assoc := C.assoc_from_list(&cAssocBuffer, C.int(i)) + goAssociation := AssocDescriptorConvertCToGo(assoc) + goAssocBuffer.AssocInfoList[i] = goAssociation + } + return true +} + func (slurmStruct SlurmStruct) ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (*pbslurm.ListAssociationsResp, error) { - assocList := GetAssociationInfo() + assocList := GetAssociationInfos() resp := pbslurm.ListAssociationsResp{} for _, assoc := range assocList.AssocInfoList { - assocInfoResult := pbslurm.AssociationInfo{} - assocInfoResult.Id = assoc.Id - - resp.AssocInfos = append(resp.AssocInfos, &assocInfoResult) + assocResult := assoc + resp.AssocInfos = append(resp.AssocInfos, &assocResult) + } + + return &resp, nil +} + +func (slurmStruct SlurmStruct) SetAssociation(ctx context.Context, req *pbslurm.SetAssociationReq) (*pbslurm.SetAssociationResp, error) { + + result := SetAssociation(*req.AssocInfo) + + resp := pbslurm.SetAssociationResp{} + resp.Result = result + + return &resp, nil +} + +func (slurmStruct SlurmStruct) GetAssociation(ctx context.Context, req *pbslurm.GetAssociationReq) (*pbslurm.GetAssociationResp, error) { + + assocList := GetAssociationInfos() + + resp := pbslurm.GetAssociationResp{} + for _, assoc := range assocList.AssocInfoList { + assocResult := assoc + //todo logic rewrite + if assocResult.Cluster == req.Cluster && assocResult.User == req.User && assocResult.Acct == assocResult.Acct && assocResult.Partition == req.Partition { + resp.AssocInfos = append(resp.AssocInfos, &assocResult) + } } return &resp, nil diff --git a/adaptor/pcm_slurm/service/slurmdb_user.go b/adaptor/pcm_slurm/service/slurmdb_user.go index 7dc3b522..cd681730 100644 --- a/adaptor/pcm_slurm/service/slurmdb_user.go +++ b/adaptor/pcm_slurm/service/slurmdb_user.go @@ -61,29 +61,29 @@ import ( ) type UserInfoMsg struct { - Last_update int64 - Record_count uint32 + LastUpdate int64 + RecordCount uint32 UserInfoList []pbslurm.UserInfo } -func User_descriptor_convert_c_to_go(c_struct *C.struct_slurmdb_user_rec) pbslurm.UserInfo { - var go_struct pbslurm.UserInfo - go_struct.Name = C.GoString(c_struct.name) - return go_struct +func UserDescriptorConvertCToGo(cStruct *C.struct_slurmdb_user_rec) pbslurm.UserInfo { + var goStruct pbslurm.UserInfo + goStruct.Name = C.GoString(cStruct.name) + return goStruct } func GetUserInfo() UserInfoMsg { - var go_user_buffer UserInfoMsg - c_user_buffer := C.get_user_info() - go_user_buffer.Record_count = uint32(c_user_buffer.record_count) - go_user_buffer.UserInfoList = make([]pbslurm.UserInfo, c_user_buffer.record_count, c_user_buffer.record_count) + var goUserBuffer UserInfoMsg + cUserBuffer := C.get_user_info() + goUserBuffer.RecordCount = uint32(cUserBuffer.record_count) + goUserBuffer.UserInfoList = make([]pbslurm.UserInfo, cUserBuffer.record_count, cUserBuffer.record_count) - for i := uint32(0); i < go_user_buffer.Record_count; i++ { - user := C.user_from_list(&c_user_buffer, C.int(i)) - go_user := User_descriptor_convert_c_to_go(user) - go_user_buffer.UserInfoList[i] = go_user + for i := uint32(0); i < goUserBuffer.RecordCount; i++ { + user := C.user_from_list(&cUserBuffer, C.int(i)) + goUser := UserDescriptorConvertCToGo(user) + goUserBuffer.UserInfoList[i] = goUser } - return go_user_buffer + return goUserBuffer } func (slurmStruct SlurmStruct) ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (*pbslurm.ListUsersResp, error) { @@ -100,3 +100,18 @@ func (slurmStruct SlurmStruct) ListUsers(ctx context.Context, req *pbslurm.ListU return &resp, nil } + +func (slurmStruct SlurmStruct) GetUser(ctx context.Context, req *pbslurm.GetUserReq) (*pbslurm.GetUserResp, error) { + + userList := GetUserInfo() + + resp := pbslurm.GetUserResp{} + for _, user := range userList.UserInfoList { + userInfoResult := pbslurm.UserInfo{} + userInfoResult.Name = user.Name + + resp.UserInfo = append(resp.UserInfo, &userInfoResult) + } + + return &resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurmer.go b/adaptor/pcm_slurm/service/slurmer.go index 2869df86..f882f880 100644 --- a/adaptor/pcm_slurm/service/slurmer.go +++ b/adaptor/pcm_slurm/service/slurmer.go @@ -6,9 +6,12 @@ import ( ) type Slurmer interface { - ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (resp *pbslurm.ListNodesResp, err error) //list slurm nodes ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (resp *pbslurm.ListUsersResp, err error) //list slurm users + GetUser(ctx context.Context, req *pbslurm.GetUserReq) (resp *pbslurm.GetUserResp, err error) //get specific slurm user ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (resp *pbslurm.ListAssociationsResp, err error) //list slurm associations + GetAssociation(ctx context.Context, req *pbslurm.GetAssociationReq) (resp *pbslurm.GetAssociationResp, err error) //get specific slurm associations + ListAccounts(ctx context.Context, req *pbslurm.ListAccountsReq) (resp *pbslurm.ListAccountsResp, err error) //list slurm accounts + GetAccount(ctx context.Context, req *pbslurm.GetAccountReq) (resp *pbslurm.GetAccountResp, err error) //get specific slurm account } func SelectSlurmVersion(slurmVersion pbslurm.SlurmVersion) (slurmer Slurmer, err error) { diff --git a/adaptor/pcm_slurm/service/tianhe.go b/adaptor/pcm_slurm/service/tianhe.go index 1818e37b..5f73d284 100644 --- a/adaptor/pcm_slurm/service/tianhe.go +++ b/adaptor/pcm_slurm/service/tianhe.go @@ -1,11 +1,5 @@ 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 } @@ -16,20 +10,3 @@ func SelectTianhe() (Slurmer, error) { 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 -} From 2d79caefac860f813815695a16c1682068ff20dd Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Tue, 8 Nov 2022 01:20:31 -0800 Subject: [PATCH 03/11] list/get for user/account/association --- adaptor/pcm_slurm/service/slurmdb_account.go | 22 +++++++++---------- .../pcm_slurm/service/slurmdb_association.go | 2 +- adaptor/pcm_slurm/service/slurmdb_user.go | 10 +++++---- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/adaptor/pcm_slurm/service/slurmdb_account.go b/adaptor/pcm_slurm/service/slurmdb_account.go index 3f87e067..c2bce49e 100644 --- a/adaptor/pcm_slurm/service/slurmdb_account.go +++ b/adaptor/pcm_slurm/service/slurmdb_account.go @@ -84,14 +84,15 @@ func GetAcctInfo() AcctInfoMsg { func (slurmStruct SlurmStruct) ListAccounts(ctx context.Context, req *pbslurm.ListAccountsReq) (*pbslurm.ListAccountsResp, error) { - AcctList := GetAcctInfo() + acctList := GetAcctInfo() resp := pbslurm.ListAccountsResp{} - for _, Acct := range AcctList.AcctInfoList { - AcctInfoResult := pbslurm.AccountInfo{} - AcctInfoResult.Name = Acct.Name + for _, acct := range acctList.AcctInfoList { + //AcctInfoResult := pbslurm.AccountInfo{} + //AcctInfoResult.Name = Acct.Name + acctInfoResult := acct - resp.AccountInfos = append(resp.AccountInfos, &AcctInfoResult) + resp.AccountInfos = append(resp.AccountInfos, &acctInfoResult) } return &resp, nil @@ -99,14 +100,13 @@ func (slurmStruct SlurmStruct) ListAccounts(ctx context.Context, req *pbslurm.Li func (slurmStruct SlurmStruct) GetAccount(ctx context.Context, req *pbslurm.GetAccountReq) (*pbslurm.GetAccountResp, error) { - AcctList := GetAcctInfo() + acctList := GetAcctInfo() resp := pbslurm.GetAccountResp{} - for _, Acct := range AcctList.AcctInfoList { - AcctInfoResult := pbslurm.AccountInfo{} - AcctInfoResult.Name = Acct.Name - - resp.AccountInfos = append(resp.AccountInfos, &AcctInfoResult) + for _, acct := range acctList.AcctInfoList { + acctInfoResult := acct + //todo add filter logic + resp.AccountInfos = append(resp.AccountInfos, &acctInfoResult) } return &resp, nil diff --git a/adaptor/pcm_slurm/service/slurmdb_association.go b/adaptor/pcm_slurm/service/slurmdb_association.go index a86f75c7..ae6cc1a5 100644 --- a/adaptor/pcm_slurm/service/slurmdb_association.go +++ b/adaptor/pcm_slurm/service/slurmdb_association.go @@ -193,7 +193,7 @@ func (slurmStruct SlurmStruct) GetAssociation(ctx context.Context, req *pbslurm. resp := pbslurm.GetAssociationResp{} for _, assoc := range assocList.AssocInfoList { assocResult := assoc - //todo logic rewrite + //todo add filter logic if assocResult.Cluster == req.Cluster && assocResult.User == req.User && assocResult.Acct == assocResult.Acct && assocResult.Partition == req.Partition { resp.AssocInfos = append(resp.AssocInfos, &assocResult) } diff --git a/adaptor/pcm_slurm/service/slurmdb_user.go b/adaptor/pcm_slurm/service/slurmdb_user.go index cd681730..596ea628 100644 --- a/adaptor/pcm_slurm/service/slurmdb_user.go +++ b/adaptor/pcm_slurm/service/slurmdb_user.go @@ -92,8 +92,8 @@ func (slurmStruct SlurmStruct) ListUsers(ctx context.Context, req *pbslurm.ListU resp := pbslurm.ListUsersResp{} for _, user := range userList.UserInfoList { - userInfoResult := pbslurm.UserInfo{} - userInfoResult.Name = user.Name + userInfoResult := user + //userInfoResult.Name = user.Name resp.UserInfos = append(resp.UserInfos, &userInfoResult) } @@ -107,8 +107,10 @@ func (slurmStruct SlurmStruct) GetUser(ctx context.Context, req *pbslurm.GetUser resp := pbslurm.GetUserResp{} for _, user := range userList.UserInfoList { - userInfoResult := pbslurm.UserInfo{} - userInfoResult.Name = user.Name + //userInfoResult := pbslurm.UserInfo{} + //todo add filter logic + userInfoResult := user + //userInfoResult.Name = user.Name resp.UserInfo = append(resp.UserInfo, &userInfoResult) } From bd23c6d01e8c620d5e0b3b63a85108f8b053661d Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Tue, 8 Nov 2022 02:02:40 -0800 Subject: [PATCH 04/11] list qos --- adaptor/pcm_slurm/gen/idl/slurm.pb.go | 91 +++++----- adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go | 87 ++++++++++ adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go | 38 +++++ adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go | 151 +++++++++++++++-- .../gen/openapiv2/idl/slurm.swagger.json | 11 ++ adaptor/pcm_slurm/idl/slurm.proto | 4 + adaptor/pcm_slurm/idl/slurm.yaml | 2 + adaptor/pcm_slurm/idl/slurmdb_qos.proto | 8 + adaptor/pcm_slurm/server/slurm.go | 10 ++ adaptor/pcm_slurm/server/slurmImpl.go | 9 + adaptor/pcm_slurm/service/slurmdb_qos.go | 158 ++++++++++++++++++ adaptor/pcm_slurm/service/slurmer.go | 1 + 12 files changed, 519 insertions(+), 51 deletions(-) create mode 100644 adaptor/pcm_slurm/service/slurmdb_qos.go diff --git a/adaptor/pcm_slurm/gen/idl/slurm.pb.go b/adaptor/pcm_slurm/gen/idl/slurm.pb.go index 834124da..19d7d20e 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurm.pb.go @@ -29,33 +29,37 @@ var file_idl_slurm_proto_rawDesc = []byte{ 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x88, 0x03, 0x0a, 0x0c, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x12, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, - 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x11, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x4b, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, - 0x1b, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, - 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, - 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, - 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, - 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, + 0x62, 0x5f, 0x71, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xbd, 0x03, 0x0a, 0x0c, + 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x09, + 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, + 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, + 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x11, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, + 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, + 0x19, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0c, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, + 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, + 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, + 0x73, 0x73, 0x12, 0x12, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, + 0x6f, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2f, + 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_idl_slurm_proto_goTypes = []interface{}{ @@ -65,12 +69,14 @@ var file_idl_slurm_proto_goTypes = []interface{}{ (*GetAssociationReq)(nil), // 3: slurm.GetAssociationReq (*ListAccountsReq)(nil), // 4: slurm.ListAccountsReq (*GetAccountReq)(nil), // 5: slurm.GetAccountReq - (*ListUsersResp)(nil), // 6: slurm.ListUsersResp - (*GetUserResp)(nil), // 7: slurm.GetUserResp - (*ListAssociationsResp)(nil), // 8: slurm.ListAssociationsResp - (*GetAssociationResp)(nil), // 9: slurm.GetAssociationResp - (*ListAccountsResp)(nil), // 10: slurm.ListAccountsResp - (*GetAccountResp)(nil), // 11: slurm.GetAccountResp + (*ListQossReq)(nil), // 6: slurm.ListQossReq + (*ListUsersResp)(nil), // 7: slurm.ListUsersResp + (*GetUserResp)(nil), // 8: slurm.GetUserResp + (*ListAssociationsResp)(nil), // 9: slurm.ListAssociationsResp + (*GetAssociationResp)(nil), // 10: slurm.GetAssociationResp + (*ListAccountsResp)(nil), // 11: slurm.ListAccountsResp + (*GetAccountResp)(nil), // 12: slurm.GetAccountResp + (*ListQossResp)(nil), // 13: slurm.ListQossResp } var file_idl_slurm_proto_depIdxs = []int32{ 0, // 0: slurm.SlurmService.ListUsers:input_type -> slurm.ListUsersReq @@ -79,14 +85,16 @@ var file_idl_slurm_proto_depIdxs = []int32{ 3, // 3: slurm.SlurmService.GetAssociation:input_type -> slurm.GetAssociationReq 4, // 4: slurm.SlurmService.ListAccounts:input_type -> slurm.ListAccountsReq 5, // 5: slurm.SlurmService.GetAccount:input_type -> slurm.GetAccountReq - 6, // 6: slurm.SlurmService.ListUsers:output_type -> slurm.ListUsersResp - 7, // 7: slurm.SlurmService.GetUser:output_type -> slurm.GetUserResp - 8, // 8: slurm.SlurmService.ListAssociations:output_type -> slurm.ListAssociationsResp - 9, // 9: slurm.SlurmService.GetAssociation:output_type -> slurm.GetAssociationResp - 10, // 10: slurm.SlurmService.ListAccounts:output_type -> slurm.ListAccountsResp - 11, // 11: slurm.SlurmService.GetAccount:output_type -> slurm.GetAccountResp - 6, // [6:12] is the sub-list for method output_type - 0, // [0:6] is the sub-list for method input_type + 6, // 6: slurm.SlurmService.ListQoss:input_type -> slurm.ListQossReq + 7, // 7: slurm.SlurmService.ListUsers:output_type -> slurm.ListUsersResp + 8, // 8: slurm.SlurmService.GetUser:output_type -> slurm.GetUserResp + 9, // 9: slurm.SlurmService.ListAssociations:output_type -> slurm.ListAssociationsResp + 10, // 10: slurm.SlurmService.GetAssociation:output_type -> slurm.GetAssociationResp + 11, // 11: slurm.SlurmService.ListAccounts:output_type -> slurm.ListAccountsResp + 12, // 12: slurm.SlurmService.GetAccount:output_type -> slurm.GetAccountResp + 13, // 13: slurm.SlurmService.ListQoss:output_type -> slurm.ListQossResp + 7, // [7:14] is the sub-list for method output_type + 0, // [0:7] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -101,6 +109,7 @@ func file_idl_slurm_proto_init() { file_idl_slurmdb_user_proto_init() file_idl_slurmdb_assoc_proto_init() file_idl_slurmdb_account_proto_init() + file_idl_slurmdb_qos_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go b/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go index dc31f233..47c93bc2 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go +++ b/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go @@ -247,6 +247,42 @@ func local_request_SlurmService_GetAccount_0(ctx context.Context, marshaler runt } +var ( + filter_SlurmService_ListQoss_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SlurmService_ListQoss_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListQossReq + 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_ListQoss_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListQoss(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SlurmService_ListQoss_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListQossReq + 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_ListQoss_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListQoss(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterSlurmServiceHandlerServer registers the http handlers for service SlurmService to "mux". // UnaryRPC :call SlurmServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -403,6 +439,31 @@ func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_SlurmService_ListQoss_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, "/slurm.SlurmService/ListQoss", runtime.WithHTTPPathPattern("/apis/slurm/listQoss")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SlurmService_ListQoss_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_SlurmService_ListQoss_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -576,6 +637,28 @@ func RegisterSlurmServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_SlurmService_ListQoss_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, "/slurm.SlurmService/ListQoss", runtime.WithHTTPPathPattern("/apis/slurm/listQoss")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SlurmService_ListQoss_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SlurmService_ListQoss_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -591,6 +674,8 @@ var ( pattern_SlurmService_ListAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listAccounts"}, "")) pattern_SlurmService_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "getAccount"}, "")) + + pattern_SlurmService_ListQoss_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listQoss"}, "")) ) var ( @@ -605,4 +690,6 @@ var ( forward_SlurmService_ListAccounts_0 = runtime.ForwardResponseMessage forward_SlurmService_GetAccount_0 = runtime.ForwardResponseMessage + + forward_SlurmService_ListQoss_0 = runtime.ForwardResponseMessage ) diff --git a/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go b/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go index 7e4cdec6..b5dcd0bb 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go @@ -34,6 +34,8 @@ type SlurmServiceClient interface { ListAccounts(ctx context.Context, in *ListAccountsReq, opts ...grpc.CallOption) (*ListAccountsResp, error) // get specific account info from slurmdb GetAccount(ctx context.Context, in *GetAccountReq, opts ...grpc.CallOption) (*GetAccountResp, error) + // list all qos info from slurmdb + ListQoss(ctx context.Context, in *ListQossReq, opts ...grpc.CallOption) (*ListQossResp, error) } type slurmServiceClient struct { @@ -98,6 +100,15 @@ func (c *slurmServiceClient) GetAccount(ctx context.Context, in *GetAccountReq, return out, nil } +func (c *slurmServiceClient) ListQoss(ctx context.Context, in *ListQossReq, opts ...grpc.CallOption) (*ListQossResp, error) { + out := new(ListQossResp) + err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListQoss", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SlurmServiceServer is the server API for SlurmService service. // All implementations must embed UnimplementedSlurmServiceServer // for forward compatibility @@ -114,6 +125,8 @@ type SlurmServiceServer interface { ListAccounts(context.Context, *ListAccountsReq) (*ListAccountsResp, error) // get specific account info from slurmdb GetAccount(context.Context, *GetAccountReq) (*GetAccountResp, error) + // list all qos info from slurmdb + ListQoss(context.Context, *ListQossReq) (*ListQossResp, error) mustEmbedUnimplementedSlurmServiceServer() } @@ -139,6 +152,9 @@ func (UnimplementedSlurmServiceServer) ListAccounts(context.Context, *ListAccoun func (UnimplementedSlurmServiceServer) GetAccount(context.Context, *GetAccountReq) (*GetAccountResp, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") } +func (UnimplementedSlurmServiceServer) ListQoss(context.Context, *ListQossReq) (*ListQossResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListQoss not implemented") +} func (UnimplementedSlurmServiceServer) mustEmbedUnimplementedSlurmServiceServer() {} // UnsafeSlurmServiceServer may be embedded to opt out of forward compatibility for this service. @@ -260,6 +276,24 @@ func _SlurmService_GetAccount_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _SlurmService_ListQoss_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListQossReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmServiceServer).ListQoss(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurm.SlurmService/ListQoss", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmServiceServer).ListQoss(ctx, req.(*ListQossReq)) + } + return interceptor(ctx, in, info, handler) +} + // SlurmService_ServiceDesc is the grpc.ServiceDesc for SlurmService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -291,6 +325,10 @@ var SlurmService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetAccount", Handler: _SlurmService_GetAccount_Handler, }, + { + MethodName: "ListQoss", + Handler: _SlurmService_ListQoss_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "idl/slurm.proto", diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go index 9379a99e..528e5f24 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go @@ -322,6 +322,100 @@ func (x *QosInfo) GetUsageThres() float64 { return 0 } +type ListQossReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` +} + +func (x *ListQossReq) Reset() { + *x = ListQossReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_qos_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListQossReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListQossReq) ProtoMessage() {} + +func (x *ListQossReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_qos_proto_msgTypes[2] + 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 ListQossReq.ProtoReflect.Descriptor instead. +func (*ListQossReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_qos_proto_rawDescGZIP(), []int{2} +} + +func (x *ListQossReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +type ListQossResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QosInfos []*QosInfo `protobuf:"bytes,1,rep,name=qos_infos,json=qosInfos,proto3" json:"qos_infos,omitempty"` +} + +func (x *ListQossResp) Reset() { + *x = ListQossResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_qos_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListQossResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListQossResp) ProtoMessage() {} + +func (x *ListQossResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_qos_proto_msgTypes[3] + 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 ListQossResp.ProtoReflect.Descriptor instead. +func (*ListQossResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_qos_proto_rawDescGZIP(), []int{3} +} + +func (x *ListQossResp) GetQosInfos() []*QosInfo { + if x != nil { + return x.QosInfos + } + return nil +} + var File_idl_slurmdb_qos_proto protoreflect.FileDescriptor var file_idl_slurmdb_qos_proto_rawDesc = []byte{ @@ -386,9 +480,17 @@ var file_idl_slurmdb_qos_proto_rawDesc = []byte{ 0x73, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x75, 0x73, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x42, 0x0a, 0x5a, - 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x01, 0x52, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x22, 0x47, 0x0a, + 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, + 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, + 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, + 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x09, 0x71, 0x6f, 0x73, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x6c, 0x75, 0x72, + 0x6d, 0x2e, 0x51, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x71, 0x6f, 0x73, 0x49, 0x6e, + 0x66, 0x6f, 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -403,18 +505,23 @@ func file_idl_slurmdb_qos_proto_rawDescGZIP() []byte { return file_idl_slurmdb_qos_proto_rawDescData } -var file_idl_slurmdb_qos_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_idl_slurmdb_qos_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_idl_slurmdb_qos_proto_goTypes = []interface{}{ (*QosUsageInfo)(nil), // 0: slurm.QosUsageInfo (*QosInfo)(nil), // 1: slurm.QosInfo + (*ListQossReq)(nil), // 2: slurm.ListQossReq + (*ListQossResp)(nil), // 3: slurm.ListQossResp + (SlurmVersion)(0), // 4: slurm.SlurmVersion } var file_idl_slurmdb_qos_proto_depIdxs = []int32{ 0, // 0: slurm.QosInfo.usage:type_name -> slurm.QosUsageInfo - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 4, // 1: slurm.ListQossReq.slurm_version:type_name -> slurm.SlurmVersion + 1, // 2: slurm.ListQossResp.qos_infos:type_name -> slurm.QosInfo + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_idl_slurmdb_qos_proto_init() } @@ -448,6 +555,30 @@ func file_idl_slurmdb_qos_proto_init() { return nil } } + file_idl_slurmdb_qos_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListQossReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_qos_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListQossResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -455,7 +586,7 @@ func file_idl_slurmdb_qos_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_slurmdb_qos_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json index e85c1680..03416bbf 100644 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json @@ -284,6 +284,17 @@ } } }, + "slurmListQossResp": { + "type": "object", + "properties": { + "qosInfos": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmQosInfo" + } + } + } + }, "slurmListUsersResp": { "type": "object", "properties": { diff --git a/adaptor/pcm_slurm/idl/slurm.proto b/adaptor/pcm_slurm/idl/slurm.proto index 2c7e5eeb..2400e30c 100644 --- a/adaptor/pcm_slurm/idl/slurm.proto +++ b/adaptor/pcm_slurm/idl/slurm.proto @@ -6,6 +6,7 @@ import "idl/node.proto"; import "idl/slurmdb_user.proto"; import "idl/slurmdb_assoc.proto"; import "idl/slurmdb_account.proto"; +import "idl/slurmdb_qos.proto"; // Slurm Services @@ -29,4 +30,7 @@ service SlurmService { // get specific account info from slurmdb rpc GetAccount(GetAccountReq) returns (GetAccountResp); + // list all qos info from slurmdb + rpc ListQoss(ListQossReq) returns (ListQossResp); + } diff --git a/adaptor/pcm_slurm/idl/slurm.yaml b/adaptor/pcm_slurm/idl/slurm.yaml index d00d0305..56e9f552 100644 --- a/adaptor/pcm_slurm/idl/slurm.yaml +++ b/adaptor/pcm_slurm/idl/slurm.yaml @@ -15,4 +15,6 @@ http: get: "/apis/slurm/listAccounts" - selector: slurm.SlurmService.GetAccount get: "/apis/slurm/getAccount" + - selector: slurm.SlurmService.ListQoss + get: "/apis/slurm/listQoss" diff --git a/adaptor/pcm_slurm/idl/slurmdb_qos.proto b/adaptor/pcm_slurm/idl/slurmdb_qos.proto index 50c29c88..6ee0e044 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_qos.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_qos.proto @@ -39,3 +39,11 @@ message QosInfo{ double usageFactor = 27 ; double usageThres = 28 ; } + +message ListQossReq{ + SlurmVersion slurm_version = 1; +} + +message ListQossResp { + repeated QosInfo qos_infos =1; +} diff --git a/adaptor/pcm_slurm/server/slurm.go b/adaptor/pcm_slurm/server/slurm.go index 537377d1..f0867ef8 100644 --- a/adaptor/pcm_slurm/server/slurm.go +++ b/adaptor/pcm_slurm/server/slurm.go @@ -71,3 +71,13 @@ func (s *Server) GetAccount(ctx context.Context, req *slurmpb.GetAccountReq) (*s } return resp, nil } + +// ListQoss return all slurm qos +func (s *Server) ListQoss(ctx context.Context, req *slurmpb.ListQossReq) (*slurmpb.ListQossResp, error) { + resp, err := ListQoss(ctx, req) + if err != nil { + glog.Errorf("ListSlurmQoss error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} diff --git a/adaptor/pcm_slurm/server/slurmImpl.go b/adaptor/pcm_slurm/server/slurmImpl.go index e8434402..dc569e8f 100644 --- a/adaptor/pcm_slurm/server/slurmImpl.go +++ b/adaptor/pcm_slurm/server/slurmImpl.go @@ -59,3 +59,12 @@ func GetAccount(ctx context.Context, req *pbslurm.GetAccountReq) (*pbslurm.GetAc resp, _ := slurm.GetAccount(ctx, req) return resp, nil } + +func ListQoss(ctx context.Context, req *pbslurm.ListQossReq) (*pbslurm.ListQossResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.ListQoss(ctx, req) + return resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurmdb_qos.go b/adaptor/pcm_slurm/service/slurmdb_qos.go new file mode 100644 index 00000000..773d42a4 --- /dev/null +++ b/adaptor/pcm_slurm/service/slurmdb_qos.go @@ -0,0 +1,158 @@ +package slurmer + +import "C" +import pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" + +/* +#cgo LDFLAGS: -lslurmdb + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef struct slurmdb_qos_rec { + char *description; + uint32_t id; + uint32_t flags; + uint32_t grace_time; + uint64_t grp_cpu_mins; + uint64_t grp_cpu_run_mins; + uint32_t grp_cpus; + uint32_t grp_jobs; + uint32_t grp_mem; + uint32_t grp_nodes; + uint32_t grp_submit_jobs; + uint32_t grp_wall; + uint64_t max_cpu_mins_pj; + uint64_t max_cpu_run_mins_pu; + uint32_t max_cpus_pj; + uint32_t max_cpus_pu; + uint32_t max_jobs_pu; + uint32_t max_nodes_pj; + uint32_t max_nodes_pu; + uint32_t max_submit_jobs_pu; + uint32_t max_wall_pj; + char *name; + bitstr_t *preempt_bitstr; + List preempt_list; + uint16_t preempt_mode; + uint32_t priority; + assoc_mgr_qos_usage_t *usage; + double usage_factor; + double usage_thres; +} slurmdb_qos_rec_a; + +typedef struct qos_info { + uint32_t record_count; + slurmdb_qos_rec_t *array; +} qos_info_t; + +struct qos_info get_qos_list() { + struct qos_info qosinfo; + + slurmdb_qos_cond_t *qos_cond = NULL; + void *conn = slurmdb_connection_get(); + List qoslist = slurmdb_qos_get(conn, qos_cond); + + + uint16_t size = slurm_list_count(qoslist); + qosinfo.record_count = size; + qosinfo.array = malloc(size * sizeof(slurmdb_qos_rec_t)); + //slurmdb_qos_rec_t qosArray[size]; + + slurmdb_qos_rec_t *rec = NULL; + ListIterator itr = slurm_list_iterator_create(qoslist); + + int i = 0; + while ((rec = slurm_list_next(itr))) { + qosinfo.array[i] = *rec; + i++; + } + slurmdb_connection_close(&conn); + slurm_list_destroy(qoslist); + + return qosinfo; +} + +struct slurmdb_qos_rec *qos_from_list(struct qos_info *qos_rec_t, int i) { + return (struct slurmdb_qos_rec *) &qos_rec_t->array[i]; +} +*/ +import "C" +import ( + "context" +) + +type Slurmdb_qos_rec struct { + Description string + Id uint32 + Flags uint32 + GraceTime uint32 + GrpCpuMins uint64 + GrpCpuRunMins uint64 + GrpCpus uint32 + GrpJobs uint32 + GrpMem uint32 + GrpNodes uint32 + GrpSubmitJobs uint32 + MaxCpuMinsPj uint64 + MaxCpuRunMinsPu uint64 + MaxCpusPj uint32 + MaxCpusPu uint32 + MaxJobsPu uint32 + MaxNodesPj uint32 + MaxNodesPu uint32 + MaxSubmitJobsPu uint32 + MaxWallPj uint32 + Name string + preemptList []string + preempt_mode uint16 + priority uint32 + usage_factor float64 + usage_thres float64 +} + +type QosInfoMsg struct { + RecordCount uint32 + QosList []pbslurm.QosInfo +} + +func QosDescriptorConvertCToGo(cStruct *C.struct_slurmdb_qos_rec) pbslurm.QosInfo { + var goStruct pbslurm.QosInfo + goStruct.Name = C.GoString(cStruct.name) + return goStruct +} + +func GetQosInfo() QosInfoMsg { + var goQosBuffer QosInfoMsg + cQosBuffer := C.get_qos_list() + goQosBuffer.RecordCount = uint32(cQosBuffer.record_count) + goQosBuffer.QosList = make([]pbslurm.QosInfo, cQosBuffer.record_count, cQosBuffer.record_count) + + for i := uint32(0); i < goQosBuffer.RecordCount; i++ { + qos := C.qos_from_list(&cQosBuffer, C.int(i)) + goQos := QosDescriptorConvertCToGo(qos) + goQosBuffer.QosList[i] = goQos + } + return goQosBuffer +} + +func (slurmStruct SlurmStruct) ListQoss(ctx context.Context, req *pbslurm.ListQossReq) (*pbslurm.ListQossResp, error) { + + qosList := GetQosInfo() + + resp := pbslurm.ListQossResp{} + for _, qos := range qosList.QosList { + qosInfoResult := qos + //userInfoResult.Name = user.Name + + resp.QosInfos = append(resp.QosInfos, &qosInfoResult) + } + + return &resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurmer.go b/adaptor/pcm_slurm/service/slurmer.go index f882f880..a295b8f3 100644 --- a/adaptor/pcm_slurm/service/slurmer.go +++ b/adaptor/pcm_slurm/service/slurmer.go @@ -12,6 +12,7 @@ type Slurmer interface { GetAssociation(ctx context.Context, req *pbslurm.GetAssociationReq) (resp *pbslurm.GetAssociationResp, err error) //get specific slurm associations ListAccounts(ctx context.Context, req *pbslurm.ListAccountsReq) (resp *pbslurm.ListAccountsResp, err error) //list slurm accounts GetAccount(ctx context.Context, req *pbslurm.GetAccountReq) (resp *pbslurm.GetAccountResp, err error) //get specific slurm account + ListQoss(ctx context.Context, req *pbslurm.ListQossReq) (resp *pbslurm.ListQossResp, err error) //list slurm accounts } func SelectSlurmVersion(slurmVersion pbslurm.SlurmVersion) (slurmer Slurmer, err error) { From 985566038571b2c8e9580894220ec8611ab9a2f2 Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Tue, 8 Nov 2022 03:33:13 -0800 Subject: [PATCH 05/11] list/get wckeys --- adaptor/pcm_slurm/gen/idl/node.pb.go | 26 +- adaptor/pcm_slurm/gen/idl/slurm.pb.go | 110 +++--- adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go | 174 ++++++++++ adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go | 76 ++++ .../pcm_slurm/gen/idl/slurmdb_account.pb.go | 78 ++--- .../gen/idl/slurmdb_accounting.pb.go | 26 +- adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go | 250 +++++++------- .../pcm_slurm/gen/idl/slurmdb_cluster.pb.go | 92 ++--- adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go | 138 ++++---- adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go | 111 +++--- adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go | 326 ++++++++++++++++-- .../gen/openapiv2/idl/slurm.swagger.json | 26 +- adaptor/pcm_slurm/idl/node.proto | 2 +- adaptor/pcm_slurm/idl/slurm.proto | 6 + adaptor/pcm_slurm/idl/slurm.yaml | 4 + adaptor/pcm_slurm/idl/slurmdb_account.proto | 2 +- .../pcm_slurm/idl/slurmdb_accounting.proto | 4 +- adaptor/pcm_slurm/idl/slurmdb_assoc.proto | 46 +-- adaptor/pcm_slurm/idl/slurmdb_cluster.proto | 17 +- adaptor/pcm_slurm/idl/slurmdb_qos.proto | 36 +- adaptor/pcm_slurm/idl/slurmdb_user.proto | 10 +- adaptor/pcm_slurm/idl/slurmdb_wckey.proto | 21 +- adaptor/pcm_slurm/server/slurm.go | 20 ++ adaptor/pcm_slurm/server/slurmImpl.go | 17 + .../pcm_slurm/service/slurmdb_association.go | 1 + adaptor/pcm_slurm/service/slurmdb_wckey.go | 119 +++++++ adaptor/pcm_slurm/service/slurmer.go | 4 +- 27 files changed, 1247 insertions(+), 495 deletions(-) create mode 100644 adaptor/pcm_slurm/service/slurmdb_wckey.go diff --git a/adaptor/pcm_slurm/gen/idl/node.pb.go b/adaptor/pcm_slurm/gen/idl/node.pb.go index 33d0b4a8..606e9ebd 100644 --- a/adaptor/pcm_slurm/gen/idl/node.pb.go +++ b/adaptor/pcm_slurm/gen/idl/node.pb.go @@ -75,7 +75,7 @@ type NodeInfo struct { Boards int32 `protobuf:"varint,1,opt,name=boards,proto3" json:"boards,omitempty"` Cpus int32 `protobuf:"varint,2,opt,name=cpus,proto3" json:"cpus,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - RealMemory int32 `protobuf:"varint,4,opt,name=realMemory,proto3" json:"realMemory,omitempty"` + RealMemory int32 `protobuf:"varint,4,opt,name=real_memory,json=realMemory,proto3" json:"real_memory,omitempty"` Sockets int32 `protobuf:"varint,5,opt,name=sockets,proto3" json:"sockets,omitempty"` Threads int32 `protobuf:"varint,6,opt,name=threads,proto3" json:"threads,omitempty"` } @@ -211,22 +211,22 @@ var file_idl_node_proto_rawDesc = []byte{ 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x9e, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x69, 0x6f, 0x6e, 0x22, 0x9f, 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, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x6c, 0x5f, 0x6d, 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, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/adaptor/pcm_slurm/gen/idl/slurm.pb.go b/adaptor/pcm_slurm/gen/idl/slurm.pb.go index 19d7d20e..ba1b3f2d 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurm.pb.go @@ -30,36 +30,45 @@ var file_idl_slurm_proto_rawDesc = []byte{ 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, - 0x62, 0x5f, 0x71, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xbd, 0x03, 0x0a, 0x0c, - 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x09, - 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, - 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, - 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, - 0x11, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, - 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, - 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, - 0x19, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, - 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0c, 0x4c, 0x69, - 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x47, - 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, - 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, - 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, - 0x73, 0x73, 0x12, 0x12, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, - 0x6f, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2f, - 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x5f, 0x71, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, + 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xad, 0x04, 0x0a, 0x0c, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x12, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, + 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x11, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x4b, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, + 0x1b, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, + 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x33, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x12, 0x12, 0x2e, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, + 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x63, 0x6b, 0x65, + 0x79, 0x73, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, + 0x63, 0x6b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x33, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x2e, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, + 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_idl_slurm_proto_goTypes = []interface{}{ @@ -70,13 +79,17 @@ var file_idl_slurm_proto_goTypes = []interface{}{ (*ListAccountsReq)(nil), // 4: slurm.ListAccountsReq (*GetAccountReq)(nil), // 5: slurm.GetAccountReq (*ListQossReq)(nil), // 6: slurm.ListQossReq - (*ListUsersResp)(nil), // 7: slurm.ListUsersResp - (*GetUserResp)(nil), // 8: slurm.GetUserResp - (*ListAssociationsResp)(nil), // 9: slurm.ListAssociationsResp - (*GetAssociationResp)(nil), // 10: slurm.GetAssociationResp - (*ListAccountsResp)(nil), // 11: slurm.ListAccountsResp - (*GetAccountResp)(nil), // 12: slurm.GetAccountResp - (*ListQossResp)(nil), // 13: slurm.ListQossResp + (*ListWckeysReq)(nil), // 7: slurm.ListWckeysReq + (*GetWckeyReq)(nil), // 8: slurm.GetWckeyReq + (*ListUsersResp)(nil), // 9: slurm.ListUsersResp + (*GetUserResp)(nil), // 10: slurm.GetUserResp + (*ListAssociationsResp)(nil), // 11: slurm.ListAssociationsResp + (*GetAssociationResp)(nil), // 12: slurm.GetAssociationResp + (*ListAccountsResp)(nil), // 13: slurm.ListAccountsResp + (*GetAccountResp)(nil), // 14: slurm.GetAccountResp + (*ListQossResp)(nil), // 15: slurm.ListQossResp + (*ListWckeysResp)(nil), // 16: slurm.ListWckeysResp + (*GetWckeyResp)(nil), // 17: slurm.GetWckeyResp } var file_idl_slurm_proto_depIdxs = []int32{ 0, // 0: slurm.SlurmService.ListUsers:input_type -> slurm.ListUsersReq @@ -86,15 +99,19 @@ var file_idl_slurm_proto_depIdxs = []int32{ 4, // 4: slurm.SlurmService.ListAccounts:input_type -> slurm.ListAccountsReq 5, // 5: slurm.SlurmService.GetAccount:input_type -> slurm.GetAccountReq 6, // 6: slurm.SlurmService.ListQoss:input_type -> slurm.ListQossReq - 7, // 7: slurm.SlurmService.ListUsers:output_type -> slurm.ListUsersResp - 8, // 8: slurm.SlurmService.GetUser:output_type -> slurm.GetUserResp - 9, // 9: slurm.SlurmService.ListAssociations:output_type -> slurm.ListAssociationsResp - 10, // 10: slurm.SlurmService.GetAssociation:output_type -> slurm.GetAssociationResp - 11, // 11: slurm.SlurmService.ListAccounts:output_type -> slurm.ListAccountsResp - 12, // 12: slurm.SlurmService.GetAccount:output_type -> slurm.GetAccountResp - 13, // 13: slurm.SlurmService.ListQoss:output_type -> slurm.ListQossResp - 7, // [7:14] is the sub-list for method output_type - 0, // [0:7] is the sub-list for method input_type + 7, // 7: slurm.SlurmService.ListWckeys:input_type -> slurm.ListWckeysReq + 8, // 8: slurm.SlurmService.GetWckey:input_type -> slurm.GetWckeyReq + 9, // 9: slurm.SlurmService.ListUsers:output_type -> slurm.ListUsersResp + 10, // 10: slurm.SlurmService.GetUser:output_type -> slurm.GetUserResp + 11, // 11: slurm.SlurmService.ListAssociations:output_type -> slurm.ListAssociationsResp + 12, // 12: slurm.SlurmService.GetAssociation:output_type -> slurm.GetAssociationResp + 13, // 13: slurm.SlurmService.ListAccounts:output_type -> slurm.ListAccountsResp + 14, // 14: slurm.SlurmService.GetAccount:output_type -> slurm.GetAccountResp + 15, // 15: slurm.SlurmService.ListQoss:output_type -> slurm.ListQossResp + 16, // 16: slurm.SlurmService.ListWckeys:output_type -> slurm.ListWckeysResp + 17, // 17: slurm.SlurmService.GetWckey:output_type -> slurm.GetWckeyResp + 9, // [9:18] is the sub-list for method output_type + 0, // [0:9] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -110,6 +127,7 @@ func file_idl_slurm_proto_init() { file_idl_slurmdb_assoc_proto_init() file_idl_slurmdb_account_proto_init() file_idl_slurmdb_qos_proto_init() + file_idl_slurmdb_wckey_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go b/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go index 47c93bc2..df266524 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go +++ b/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go @@ -283,6 +283,78 @@ func local_request_SlurmService_ListQoss_0(ctx context.Context, marshaler runtim } +var ( + filter_SlurmService_ListWckeys_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SlurmService_ListWckeys_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWckeysReq + 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_ListWckeys_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListWckeys(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SlurmService_ListWckeys_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWckeysReq + 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_ListWckeys_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListWckeys(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_SlurmService_GetWckey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SlurmService_GetWckey_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWckeyReq + 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_GetWckey_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetWckey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SlurmService_GetWckey_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWckeyReq + 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_GetWckey_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetWckey(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterSlurmServiceHandlerServer registers the http handlers for service SlurmService to "mux". // UnaryRPC :call SlurmServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -464,6 +536,56 @@ func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_SlurmService_ListWckeys_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, "/slurm.SlurmService/ListWckeys", runtime.WithHTTPPathPattern("/apis/slurm/listWckeys")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SlurmService_ListWckeys_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_SlurmService_ListWckeys_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SlurmService_GetWckey_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, "/slurm.SlurmService/GetWckey", runtime.WithHTTPPathPattern("/apis/slurm/getWckey")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SlurmService_GetWckey_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_SlurmService_GetWckey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -659,6 +781,50 @@ func RegisterSlurmServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_SlurmService_ListWckeys_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, "/slurm.SlurmService/ListWckeys", runtime.WithHTTPPathPattern("/apis/slurm/listWckeys")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SlurmService_ListWckeys_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SlurmService_ListWckeys_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SlurmService_GetWckey_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, "/slurm.SlurmService/GetWckey", runtime.WithHTTPPathPattern("/apis/slurm/getWckey")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SlurmService_GetWckey_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SlurmService_GetWckey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -676,6 +842,10 @@ var ( pattern_SlurmService_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "getAccount"}, "")) pattern_SlurmService_ListQoss_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listQoss"}, "")) + + pattern_SlurmService_ListWckeys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listWckeys"}, "")) + + pattern_SlurmService_GetWckey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "getWckey"}, "")) ) var ( @@ -692,4 +862,8 @@ var ( forward_SlurmService_GetAccount_0 = runtime.ForwardResponseMessage forward_SlurmService_ListQoss_0 = runtime.ForwardResponseMessage + + forward_SlurmService_ListWckeys_0 = runtime.ForwardResponseMessage + + forward_SlurmService_GetWckey_0 = runtime.ForwardResponseMessage ) diff --git a/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go b/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go index b5dcd0bb..741fa9df 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go @@ -36,6 +36,10 @@ type SlurmServiceClient interface { GetAccount(ctx context.Context, in *GetAccountReq, opts ...grpc.CallOption) (*GetAccountResp, error) // list all qos info from slurmdb ListQoss(ctx context.Context, in *ListQossReq, opts ...grpc.CallOption) (*ListQossResp, error) + // list all wckeys info from slurmdb + ListWckeys(ctx context.Context, in *ListWckeysReq, opts ...grpc.CallOption) (*ListWckeysResp, error) + // get specific wckey info from slurmdb + GetWckey(ctx context.Context, in *GetWckeyReq, opts ...grpc.CallOption) (*GetWckeyResp, error) } type slurmServiceClient struct { @@ -109,6 +113,24 @@ func (c *slurmServiceClient) ListQoss(ctx context.Context, in *ListQossReq, opts return out, nil } +func (c *slurmServiceClient) ListWckeys(ctx context.Context, in *ListWckeysReq, opts ...grpc.CallOption) (*ListWckeysResp, error) { + out := new(ListWckeysResp) + err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListWckeys", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *slurmServiceClient) GetWckey(ctx context.Context, in *GetWckeyReq, opts ...grpc.CallOption) (*GetWckeyResp, error) { + out := new(GetWckeyResp) + err := c.cc.Invoke(ctx, "/slurm.SlurmService/GetWckey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SlurmServiceServer is the server API for SlurmService service. // All implementations must embed UnimplementedSlurmServiceServer // for forward compatibility @@ -127,6 +149,10 @@ type SlurmServiceServer interface { GetAccount(context.Context, *GetAccountReq) (*GetAccountResp, error) // list all qos info from slurmdb ListQoss(context.Context, *ListQossReq) (*ListQossResp, error) + // list all wckeys info from slurmdb + ListWckeys(context.Context, *ListWckeysReq) (*ListWckeysResp, error) + // get specific wckey info from slurmdb + GetWckey(context.Context, *GetWckeyReq) (*GetWckeyResp, error) mustEmbedUnimplementedSlurmServiceServer() } @@ -155,6 +181,12 @@ func (UnimplementedSlurmServiceServer) GetAccount(context.Context, *GetAccountRe func (UnimplementedSlurmServiceServer) ListQoss(context.Context, *ListQossReq) (*ListQossResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListQoss not implemented") } +func (UnimplementedSlurmServiceServer) ListWckeys(context.Context, *ListWckeysReq) (*ListWckeysResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListWckeys not implemented") +} +func (UnimplementedSlurmServiceServer) GetWckey(context.Context, *GetWckeyReq) (*GetWckeyResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWckey not implemented") +} func (UnimplementedSlurmServiceServer) mustEmbedUnimplementedSlurmServiceServer() {} // UnsafeSlurmServiceServer may be embedded to opt out of forward compatibility for this service. @@ -294,6 +326,42 @@ func _SlurmService_ListQoss_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _SlurmService_ListWckeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWckeysReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmServiceServer).ListWckeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurm.SlurmService/ListWckeys", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmServiceServer).ListWckeys(ctx, req.(*ListWckeysReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _SlurmService_GetWckey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWckeyReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmServiceServer).GetWckey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurm.SlurmService/GetWckey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmServiceServer).GetWckey(ctx, req.(*GetWckeyReq)) + } + return interceptor(ctx, in, info, handler) +} + // SlurmService_ServiceDesc is the grpc.ServiceDesc for SlurmService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -329,6 +397,14 @@ var SlurmService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListQoss", Handler: _SlurmService_ListQoss_Handler, }, + { + MethodName: "ListWckeys", + Handler: _SlurmService_ListWckeys_Handler, + }, + { + MethodName: "GetWckey", + Handler: _SlurmService_GetWckey_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "idl/slurm.proto", diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go index 0773b375..7e266a63 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go @@ -26,7 +26,7 @@ type AccountInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AssocList []*AssociationInfo `protobuf:"bytes,1,rep,name=assocList,proto3" json:"assocList,omitempty"` + AssocList []*AssociationInfo `protobuf:"bytes,1,rep,name=assoc_list,json=assocList,proto3" json:"assoc_list,omitempty"` Coordinators []*CoordInfo `protobuf:"bytes,2,rep,name=coordinators,proto3" json:"coordinators,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` @@ -307,43 +307,43 @@ var file_idl_slurmdb_account_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x63, 0x6f, 0x6f, 0x72, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd3, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x6f, 0x63, - 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x09, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x34, 0x0a, - 0x0c, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x43, 0x6f, 0x6f, 0x72, - 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x0a, - 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, - 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x0a, 0x10, 0x4c, 0x69, - 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, - 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x6c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, - 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x49, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x73, - 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x35, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x34, + 0x0a, 0x0c, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x43, 0x6f, 0x6f, + 0x72, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, + 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x0a, 0x10, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x37, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x6c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x49, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -370,7 +370,7 @@ var file_idl_slurmdb_account_proto_goTypes = []interface{}{ (SlurmVersion)(0), // 7: slurm.SlurmVersion } var file_idl_slurmdb_account_proto_depIdxs = []int32{ - 5, // 0: slurm.AccountInfo.assocList:type_name -> slurm.AssociationInfo + 5, // 0: slurm.AccountInfo.assoc_list:type_name -> slurm.AssociationInfo 6, // 1: slurm.AccountInfo.coordinators:type_name -> slurm.CoordInfo 7, // 2: slurm.ListAccountsReq.slurm_version:type_name -> slurm.SlurmVersion 0, // 3: slurm.ListAccountsResp.account_infos:type_name -> slurm.AccountInfo diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_accounting.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_accounting.pb.go index 564fd699..dff8eacf 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_accounting.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_accounting.pb.go @@ -26,9 +26,9 @@ type AccountingInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AllocSecs int64 `protobuf:"varint,1,opt,name=allocSecs,proto3" json:"allocSecs,omitempty"` + AllocSecs int64 `protobuf:"varint,1,opt,name=alloc_secs,json=allocSecs,proto3" json:"alloc_secs,omitempty"` Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - PeriodStart *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=periodStart,proto3" json:"periodStart,omitempty"` + PeriodStart *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=period_start,json=periodStart,proto3" json:"period_start,omitempty"` } func (x *AccountingInfo) Reset() { @@ -92,16 +92,16 @@ var file_idl_slurmdb_accounting_proto_rawDesc = []byte{ 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, - 0x6c, 0x6f, 0x63, 0x53, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, - 0x6c, 0x6c, 0x6f, 0x63, 0x53, 0x65, 0x63, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7e, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, + 0x6c, 0x6f, 0x63, 0x5f, 0x73, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x53, 0x65, 0x63, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x0c, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -122,7 +122,7 @@ var file_idl_slurmdb_accounting_proto_goTypes = []interface{}{ (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp } var file_idl_slurmdb_accounting_proto_depIdxs = []int32{ - 1, // 0: slurm.AccountingInfo.periodStart:type_name -> google.protobuf.Timestamp + 1, // 0: slurm.AccountingInfo.period_start:type_name -> google.protobuf.Timestamp 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go index 3e383a8b..70ab09b5 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go @@ -64,36 +64,36 @@ type AssociationInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AccountingList []*AccountingInfo `protobuf:"bytes,1,rep,name=accountingList,proto3" json:"accountingList,omitempty"` + AccountingList []*AccountingInfo `protobuf:"bytes,1,rep,name=accounting_list,json=accountingList,proto3" json:"accounting_list,omitempty"` Acct string `protobuf:"bytes,2,opt,name=acct,proto3" json:"acct,omitempty"` Cluster string `protobuf:"bytes,3,opt,name=cluster,proto3" json:"cluster,omitempty"` - DefQosId int32 `protobuf:"varint,4,opt,name=defQosId,proto3" json:"defQosId,omitempty"` - GrpCpuMins int64 `protobuf:"varint,5,opt,name=grpCpuMins,proto3" json:"grpCpuMins,omitempty"` - GrpGpuRunMins int64 `protobuf:"varint,6,opt,name=grpGpuRunMins,proto3" json:"grpGpuRunMins,omitempty"` - GrpCpus int32 `protobuf:"varint,7,opt,name=grpCpus,proto3" json:"grpCpus,omitempty"` - GrpJobs int32 `protobuf:"varint,8,opt,name=grpJobs,proto3" json:"grpJobs,omitempty"` - GrpMem int32 `protobuf:"varint,9,opt,name=grpMem,proto3" json:"grpMem,omitempty"` - GrpNodes int32 `protobuf:"varint,10,opt,name=grpNodes,proto3" json:"grpNodes,omitempty"` - GrpSubmitJobs int32 `protobuf:"varint,11,opt,name=grpSubmitJobs,proto3" json:"grpSubmitJobs,omitempty"` - GrpWall int32 `protobuf:"varint,12,opt,name=grpWall,proto3" json:"grpWall,omitempty"` + DefQosId int32 `protobuf:"varint,4,opt,name=def_qos_id,json=defQosId,proto3" json:"def_qos_id,omitempty"` + GrpCpuMins int64 `protobuf:"varint,5,opt,name=grp_cpu_mins,json=grpCpuMins,proto3" json:"grp_cpu_mins,omitempty"` + GrpGpuRunMins int64 `protobuf:"varint,6,opt,name=grp_gpu_run_mins,json=grpGpuRunMins,proto3" json:"grp_gpu_run_mins,omitempty"` + GrpCpus int32 `protobuf:"varint,7,opt,name=grp_cpus,json=grpCpus,proto3" json:"grp_cpus,omitempty"` + GrpJobs int32 `protobuf:"varint,8,opt,name=grp_jobs,json=grpJobs,proto3" json:"grp_jobs,omitempty"` + GrpMem int32 `protobuf:"varint,9,opt,name=grp_mem,json=grpMem,proto3" json:"grp_mem,omitempty"` + GrpNodes int32 `protobuf:"varint,10,opt,name=grp_nodes,json=grpNodes,proto3" json:"grp_nodes,omitempty"` + GrpSubmitJobs int32 `protobuf:"varint,11,opt,name=grp_submit_jobs,json=grpSubmitJobs,proto3" json:"grp_submit_jobs,omitempty"` + GrpWall int32 `protobuf:"varint,12,opt,name=grp_wall,json=grpWall,proto3" json:"grp_wall,omitempty"` Id int32 `protobuf:"varint,13,opt,name=id,proto3" json:"id,omitempty"` - IsDef int32 `protobuf:"varint,14,opt,name=isDef,proto3" json:"isDef,omitempty"` + IsDef int32 `protobuf:"varint,14,opt,name=is_def,json=isDef,proto3" json:"is_def,omitempty"` Lft int32 `protobuf:"varint,15,opt,name=lft,proto3" json:"lft,omitempty"` - MaxCpuMinsPj int64 `protobuf:"varint,16,opt,name=maxCpuMinsPj,proto3" json:"maxCpuMinsPj,omitempty"` - MaxCpuRunMins int64 `protobuf:"varint,17,opt,name=maxCpuRunMins,proto3" json:"maxCpuRunMins,omitempty"` - MaxCpusPj int32 `protobuf:"varint,18,opt,name=maxCpusPj,proto3" json:"maxCpusPj,omitempty"` - MaxJobs int32 `protobuf:"varint,19,opt,name=maxJobs,proto3" json:"maxJobs,omitempty"` - MaxNodesPj int32 `protobuf:"varint,20,opt,name=maxNodesPj,proto3" json:"maxNodesPj,omitempty"` - MaxSubmitJobs int32 `protobuf:"varint,21,opt,name=maxSubmitJobs,proto3" json:"maxSubmitJobs,omitempty"` - MaxWallPj int32 `protobuf:"varint,22,opt,name=maxWallPj,proto3" json:"maxWallPj,omitempty"` - ParentAcct string `protobuf:"bytes,23,opt,name=parentAcct,proto3" json:"parentAcct,omitempty"` - ParentId int32 `protobuf:"varint,24,opt,name=parentId,proto3" json:"parentId,omitempty"` + MaxCpuMinsPj int64 `protobuf:"varint,16,opt,name=max_cpu_mins_pj,json=maxCpuMinsPj,proto3" json:"max_cpu_mins_pj,omitempty"` + MaxCpuRunMins int64 `protobuf:"varint,17,opt,name=max_cpu_run_mins,json=maxCpuRunMins,proto3" json:"max_cpu_run_mins,omitempty"` + MaxCpusPj int32 `protobuf:"varint,18,opt,name=max_cpus_pj,json=maxCpusPj,proto3" json:"max_cpus_pj,omitempty"` + MaxJobs int32 `protobuf:"varint,19,opt,name=max_jobs,json=maxJobs,proto3" json:"max_jobs,omitempty"` + MaxNodesPj int32 `protobuf:"varint,20,opt,name=max_nodes_pj,json=maxNodesPj,proto3" json:"max_nodes_pj,omitempty"` + MaxSubmitJobs int32 `protobuf:"varint,21,opt,name=max_submit_jobs,json=maxSubmitJobs,proto3" json:"max_submit_jobs,omitempty"` + MaxWallPj int32 `protobuf:"varint,22,opt,name=max_wall_pj,json=maxWallPj,proto3" json:"max_wall_pj,omitempty"` + ParentAcct string `protobuf:"bytes,23,opt,name=parent_acct,json=parentAcct,proto3" json:"parent_acct,omitempty"` + ParentId int32 `protobuf:"varint,24,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` Partition string `protobuf:"bytes,25,opt,name=partition,proto3" json:"partition,omitempty"` - QosList []*QosInfo `protobuf:"bytes,26,rep,name=qosList,proto3" json:"qosList,omitempty"` + QosList []*QosInfo `protobuf:"bytes,26,rep,name=qos_list,json=qosList,proto3" json:"qos_list,omitempty"` Rgt int32 `protobuf:"varint,27,opt,name=rgt,proto3" json:"rgt,omitempty"` - SharesRaw int32 `protobuf:"varint,28,opt,name=sharesRaw,proto3" json:"sharesRaw,omitempty"` + SharesRaw int32 `protobuf:"varint,28,opt,name=shares_raw,json=sharesRaw,proto3" json:"shares_raw,omitempty"` Uid int32 `protobuf:"varint,29,opt,name=uid,proto3" json:"uid,omitempty"` - AssocUsage *AssocUsageInfo `protobuf:"bytes,30,opt,name=assocUsage,proto3" json:"assocUsage,omitempty"` + AssocUsage *AssocUsageInfo `protobuf:"bytes,30,opt,name=assoc_usage,json=assocUsage,proto3" json:"assoc_usage,omitempty"` User string `protobuf:"bytes,31,opt,name=user,proto3" json:"user,omitempty"` } @@ -680,106 +680,108 @@ var file_idl_slurmdb_assoc_proto_rawDesc = []byte{ 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x71, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x10, 0x0a, 0x0e, 0x41, 0x73, 0x73, 0x6f, - 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xb7, 0x07, 0x0a, 0x0f, 0x41, - 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, - 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x61, 0x63, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x63, 0x63, - 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, - 0x65, 0x66, 0x51, 0x6f, 0x73, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, - 0x65, 0x66, 0x51, 0x6f, 0x73, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, - 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x72, 0x70, - 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x47, 0x70, - 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, - 0x67, 0x72, 0x70, 0x47, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x18, 0x0a, - 0x07, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, - 0x62, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, 0x62, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x70, - 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x70, - 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x67, 0x72, - 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, - 0x72, 0x70, 0x57, 0x61, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, - 0x70, 0x57, 0x61, 0x6c, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x44, 0x65, 0x66, 0x18, 0x0e, + 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xdb, 0x07, 0x0a, 0x0f, 0x41, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3e, + 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x61, 0x63, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x63, + 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x0a, + 0x64, 0x65, 0x66, 0x5f, 0x71, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x64, 0x65, 0x66, 0x51, 0x6f, 0x73, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x67, 0x72, + 0x70, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x10, + 0x67, 0x72, 0x70, 0x5f, 0x67, 0x70, 0x75, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x47, 0x70, 0x75, 0x52, 0x75, + 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x5f, 0x63, 0x70, 0x75, + 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x73, + 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x67, + 0x72, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x72, + 0x70, 0x4d, 0x65, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x70, 0x5f, 0x6e, 0x6f, 0x64, 0x65, + 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x70, 0x4e, 0x6f, 0x64, 0x65, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x67, 0x72, 0x70, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, + 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, + 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, + 0x57, 0x61, 0x6c, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x73, 0x44, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x6c, - 0x66, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6c, 0x66, 0x74, 0x12, 0x22, 0x0a, - 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x50, 0x6a, 0x18, 0x10, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x50, - 0x6a, 0x12, 0x24, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, - 0x6e, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, - 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, - 0x75, 0x73, 0x50, 0x6a, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, - 0x70, 0x75, 0x73, 0x50, 0x6a, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, - 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x12, - 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x18, 0x14, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x12, - 0x24, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, - 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, - 0x50, 0x6a, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, - 0x6c, 0x50, 0x6a, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, + 0x66, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6c, 0x66, 0x74, 0x12, 0x25, 0x0a, + 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x5f, 0x70, 0x6a, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x4d, 0x69, + 0x6e, 0x73, 0x50, 0x6a, 0x12, 0x27, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x5f, + 0x72, 0x75, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, + 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x1e, 0x0a, + 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x5f, 0x70, 0x6a, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x50, 0x6a, 0x12, 0x19, 0x0a, + 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, + 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x70, 0x6a, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, + 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, + 0x78, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, + 0x62, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x5f, 0x70, + 0x6a, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, + 0x50, 0x6a, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x41, - 0x63, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, - 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, - 0x07, 0x71, 0x6f, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x51, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, - 0x71, 0x6f, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x67, 0x74, 0x18, 0x1b, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x67, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x68, 0x61, - 0x72, 0x65, 0x73, 0x52, 0x61, 0x77, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x68, - 0x61, 0x72, 0x65, 0x73, 0x52, 0x61, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x1d, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x61, 0x73, 0x73, - 0x6f, 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x22, 0x4f, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, - 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, - 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4f, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, - 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, - 0x0b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, - 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x6f, - 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x73, - 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, - 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, - 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1c, - 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4d, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, - 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x11, - 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, - 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x0a, 0x61, - 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x49, 0x6e, - 0x66, 0x6f, 0x22, 0x2c, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x63, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x19, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, + 0x0a, 0x08, 0x71, 0x6f, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x51, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x07, 0x71, 0x6f, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x67, 0x74, + 0x18, 0x1b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x67, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x68, 0x61, 0x72, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x52, 0x61, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0b, + 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x55, + 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x55, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x4f, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, + 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, + 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4f, 0x0a, 0x14, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, + 0x61, 0x73, 0x73, 0x6f, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, + 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x4d, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, + 0x84, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x35, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x2c, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -809,9 +811,9 @@ var file_idl_slurmdb_assoc_proto_goTypes = []interface{}{ (SlurmVersion)(0), // 10: slurm.SlurmVersion } var file_idl_slurmdb_assoc_proto_depIdxs = []int32{ - 8, // 0: slurm.AssociationInfo.accountingList:type_name -> slurm.AccountingInfo - 9, // 1: slurm.AssociationInfo.qosList:type_name -> slurm.QosInfo - 0, // 2: slurm.AssociationInfo.assocUsage:type_name -> slurm.AssocUsageInfo + 8, // 0: slurm.AssociationInfo.accounting_list:type_name -> slurm.AccountingInfo + 9, // 1: slurm.AssociationInfo.qos_list:type_name -> slurm.QosInfo + 0, // 2: slurm.AssociationInfo.assoc_usage:type_name -> slurm.AssocUsageInfo 10, // 3: slurm.ListAssociationsReq.slurm_version:type_name -> slurm.SlurmVersion 1, // 4: slurm.ListAssociationsResp.assoc_infos:type_name -> slurm.AssociationInfo 10, // 5: slurm.GetAssociationReq.slurm_version:type_name -> slurm.SlurmVersion diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go index e775c4aa..7e29fcfe 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go @@ -26,20 +26,19 @@ type ClusterInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AccountingList []*AccountingInfo `protobuf:"bytes,1,rep,name=accountingList,proto3" json:"accountingList,omitempty"` + AccountingList []*AccountingInfo `protobuf:"bytes,1,rep,name=accounting_list,json=accountingList,proto3" json:"accounting_list,omitempty"` Classification int32 `protobuf:"varint,2,opt,name=classification,proto3" json:"classification,omitempty"` - // slurm_addr_t control_addr; - ControlHost string `protobuf:"bytes,3,opt,name=controlHost,proto3" json:"controlHost,omitempty"` - ControlPort int32 `protobuf:"varint,4,opt,name=controlPort,proto3" json:"controlPort,omitempty"` - CpuCount int32 `protobuf:"varint,5,opt,name=cpuCount,proto3" json:"cpuCount,omitempty"` - Dimensions int32 `protobuf:"varint,6,opt,name=dimensions,proto3" json:"dimensions,omitempty"` - DimSize int32 `protobuf:"varint,7,opt,name=dimSize,proto3" json:"dimSize,omitempty"` - Flags int32 `protobuf:"varint,8,opt,name=flags,proto3" json:"flags,omitempty"` - Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"` - Nodes string `protobuf:"bytes,10,opt,name=nodes,proto3" json:"nodes,omitempty"` - PluginIdSelect int32 `protobuf:"varint,11,opt,name=pluginIdSelect,proto3" json:"pluginIdSelect,omitempty"` - RootAssoc *AssociationInfo `protobuf:"bytes,12,opt,name=rootAssoc,proto3" json:"rootAssoc,omitempty"` - RpcVersion int32 `protobuf:"varint,13,opt,name=rpcVersion,proto3" json:"rpcVersion,omitempty"` + ControlHost string `protobuf:"bytes,3,opt,name=control_host,json=controlHost,proto3" json:"control_host,omitempty"` + ControlPort int32 `protobuf:"varint,4,opt,name=control_port,json=controlPort,proto3" json:"control_port,omitempty"` + CpuCount int32 `protobuf:"varint,5,opt,name=cpu_count,json=cpuCount,proto3" json:"cpu_count,omitempty"` + Dimensions int32 `protobuf:"varint,6,opt,name=dimensions,proto3" json:"dimensions,omitempty"` + DimSize int32 `protobuf:"varint,7,opt,name=dim_size,json=dimSize,proto3" json:"dim_size,omitempty"` + Flags int32 `protobuf:"varint,8,opt,name=flags,proto3" json:"flags,omitempty"` + Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"` + Nodes string `protobuf:"bytes,10,opt,name=nodes,proto3" json:"nodes,omitempty"` + PluginIdSelect int32 `protobuf:"varint,11,opt,name=plugin_id_select,json=pluginIdSelect,proto3" json:"plugin_id_select,omitempty"` + RootAssoc *AssociationInfo `protobuf:"bytes,12,opt,name=root_assoc,json=rootAssoc,proto3" json:"root_assoc,omitempty"` + RpcVersion int32 `protobuf:"varint,13,opt,name=rpc_version,json=rpcVersion,proto3" json:"rpc_version,omitempty"` } func (x *ClusterInfo) Reset() { @@ -176,37 +175,38 @@ var file_idl_slurmdb_cluster_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, - 0x5f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x03, 0x0a, - 0x0b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x63, - 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x48, 0x6f, - 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x50, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x70, 0x75, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x70, 0x75, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x69, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x66, 0x6c, - 0x61, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x0a, - 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x41, 0x73, 0x73, - 0x6f, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x72, - 0x70, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x72, 0x70, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x5a, 0x08, 0x2f, - 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x03, 0x0a, + 0x0b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3e, 0x0a, 0x0f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, + 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x70, + 0x75, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, + 0x70, 0x75, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x6d, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x69, 0x6d, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x69, 0x6d, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x64, + 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x5f, + 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x35, 0x0a, 0x0a, + 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x41, 0x73, + 0x73, 0x6f, 0x63, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x70, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x70, 0x63, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -228,8 +228,8 @@ var file_idl_slurmdb_cluster_proto_goTypes = []interface{}{ (*AssociationInfo)(nil), // 2: slurm.AssociationInfo } var file_idl_slurmdb_cluster_proto_depIdxs = []int32{ - 1, // 0: slurm.ClusterInfo.accountingList:type_name -> slurm.AccountingInfo - 2, // 1: slurm.ClusterInfo.rootAssoc:type_name -> slurm.AssociationInfo + 1, // 0: slurm.ClusterInfo.accounting_list:type_name -> slurm.AccountingInfo + 2, // 1: slurm.ClusterInfo.root_assoc:type_name -> slurm.AssociationInfo 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go index 528e5f24..6a1f284e 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go @@ -67,31 +67,31 @@ type QosInfo struct { Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` Flags int32 `protobuf:"varint,3,opt,name=flags,proto3" json:"flags,omitempty"` - GraceTime int32 `protobuf:"varint,4,opt,name=graceTime,proto3" json:"graceTime,omitempty"` - GrpCpuMins int64 `protobuf:"varint,5,opt,name=grpCpuMins,proto3" json:"grpCpuMins,omitempty"` - GrpCpuRunMins int64 `protobuf:"varint,6,opt,name=grpCpuRunMins,proto3" json:"grpCpuRunMins,omitempty"` - GrpCpus int32 `protobuf:"varint,7,opt,name=grpCpus,proto3" json:"grpCpus,omitempty"` - GrpJobs int32 `protobuf:"varint,8,opt,name=grpJobs,proto3" json:"grpJobs,omitempty"` + GraceTime int32 `protobuf:"varint,4,opt,name=grace_time,json=graceTime,proto3" json:"grace_time,omitempty"` + GrpCpuMins int64 `protobuf:"varint,5,opt,name=grp_cpu_mins,json=grpCpuMins,proto3" json:"grp_cpu_mins,omitempty"` + GrpCpuRunMins int64 `protobuf:"varint,6,opt,name=grp_cpu_run_mins,json=grpCpuRunMins,proto3" json:"grp_cpu_run_mins,omitempty"` + GrpCpus int32 `protobuf:"varint,7,opt,name=grp_cpus,json=grpCpus,proto3" json:"grp_cpus,omitempty"` + GrpJobs int32 `protobuf:"varint,8,opt,name=grp_jobs,json=grpJobs,proto3" json:"grp_jobs,omitempty"` GrpMem int32 `protobuf:"varint,9,opt,name=grp_mem,json=grpMem,proto3" json:"grp_mem,omitempty"` GrpNodes int32 `protobuf:"varint,10,opt,name=grp_nodes,json=grpNodes,proto3" json:"grp_nodes,omitempty"` - GrpSubmitJobs int32 `protobuf:"varint,11,opt,name=grp_submitJobs,json=grpSubmitJobs,proto3" json:"grp_submitJobs,omitempty"` + GrpSubmitJobs int32 `protobuf:"varint,11,opt,name=grp_submit_jobs,json=grpSubmitJobs,proto3" json:"grp_submit_jobs,omitempty"` GrpWall int32 `protobuf:"varint,12,opt,name=grp_wall,json=grpWall,proto3" json:"grp_wall,omitempty"` - MaxCpuMinsPj int64 `protobuf:"varint,13,opt,name=maxCpuMinsPj,proto3" json:"maxCpuMinsPj,omitempty"` - MaxCpuRunMinsPu int64 `protobuf:"varint,14,opt,name=maxCpuRunMinsPu,proto3" json:"maxCpuRunMinsPu,omitempty"` - MaxCpusPj int32 `protobuf:"varint,15,opt,name=maxCpusPj,proto3" json:"maxCpusPj,omitempty"` - MaxCpusPu int32 `protobuf:"varint,16,opt,name=maxCpusPu,proto3" json:"maxCpusPu,omitempty"` - MaxJobsPu int32 `protobuf:"varint,17,opt,name=maxJobsPu,proto3" json:"maxJobsPu,omitempty"` - MaxNodesPj int32 `protobuf:"varint,18,opt,name=max_nodesPj,json=maxNodesPj,proto3" json:"max_nodesPj,omitempty"` - MaxSubmitJobsPu int32 `protobuf:"varint,19,opt,name=maxSubmitJobsPu,proto3" json:"maxSubmitJobsPu,omitempty"` - MaxWallPj int32 `protobuf:"varint,20,opt,name=maxWallPj,proto3" json:"maxWallPj,omitempty"` + MaxCpuMinsPj int64 `protobuf:"varint,13,opt,name=max_cpu_mins_pj,json=maxCpuMinsPj,proto3" json:"max_cpu_mins_pj,omitempty"` + MaxCpuRunMinsPu int64 `protobuf:"varint,14,opt,name=max_cpu_run_mins_pu,json=maxCpuRunMinsPu,proto3" json:"max_cpu_run_mins_pu,omitempty"` + MaxCpusPj int32 `protobuf:"varint,15,opt,name=max_cpus_pj,json=maxCpusPj,proto3" json:"max_cpus_pj,omitempty"` + MaxCpusPu int32 `protobuf:"varint,16,opt,name=max_cpus_pu,json=maxCpusPu,proto3" json:"max_cpus_pu,omitempty"` + MaxJobsPu int32 `protobuf:"varint,17,opt,name=max_jobs_pu,json=maxJobsPu,proto3" json:"max_jobs_pu,omitempty"` + MaxNodesPj int32 `protobuf:"varint,18,opt,name=max_nodes_pj,json=maxNodesPj,proto3" json:"max_nodes_pj,omitempty"` + MaxSubmitJobsPu int32 `protobuf:"varint,19,opt,name=max_submit_jobs_pu,json=maxSubmitJobsPu,proto3" json:"max_submit_jobs_pu,omitempty"` + MaxWallPj int32 `protobuf:"varint,20,opt,name=max_wall_pj,json=maxWallPj,proto3" json:"max_wall_pj,omitempty"` Name string `protobuf:"bytes,21,opt,name=name,proto3" json:"name,omitempty"` - PreemptBitstr int32 `protobuf:"varint,22,opt,name=preemptBitstr,proto3" json:"preemptBitstr,omitempty"` - PreemptList []string `protobuf:"bytes,23,rep,name=preemptList,proto3" json:"preemptList,omitempty"` - PreemptMode int32 `protobuf:"varint,24,opt,name=preemptMode,proto3" json:"preemptMode,omitempty"` + PreemptBitstr int32 `protobuf:"varint,22,opt,name=preempt_bitstr,json=preemptBitstr,proto3" json:"preempt_bitstr,omitempty"` + PreemptList []string `protobuf:"bytes,23,rep,name=preempt_list,json=preemptList,proto3" json:"preempt_list,omitempty"` + PreemptMode int32 `protobuf:"varint,24,opt,name=preempt_mode,json=preemptMode,proto3" json:"preempt_mode,omitempty"` Priority int32 `protobuf:"varint,25,opt,name=priority,proto3" json:"priority,omitempty"` Usage *QosUsageInfo `protobuf:"bytes,26,opt,name=usage,proto3" json:"usage,omitempty"` UsageFactor float64 `protobuf:"fixed64,27,opt,name=usageFactor,proto3" json:"usageFactor,omitempty"` - UsageThres float64 `protobuf:"fixed64,28,opt,name=usageThres,proto3" json:"usageThres,omitempty"` + UsageThres float64 `protobuf:"fixed64,28,opt,name=usage_thres,json=usageThres,proto3" json:"usage_thres,omitempty"` } func (x *QosInfo) Reset() { @@ -425,61 +425,63 @@ var file_idl_slurmdb_qos_proto_rawDesc = []byte{ 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0e, 0x0a, 0x0c, 0x51, 0x6f, 0x73, 0x55, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x22, 0xf9, 0x06, 0x0a, 0x07, 0x51, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, + 0x6f, 0x22, 0x99, 0x07, 0x0a, 0x07, 0x51, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x61, 0x63, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x72, 0x61, 0x63, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x4d, - 0x69, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, - 0x4d, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x43, - 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x70, - 0x43, 0x70, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x43, - 0x70, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, 0x62, 0x73, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x17, 0x0a, - 0x07, 0x67, 0x72, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x70, 0x5f, 0x6e, 0x6f, - 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x70, 0x4e, 0x6f, - 0x64, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x67, 0x72, 0x70, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x67, 0x72, 0x70, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, - 0x70, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, - 0x70, 0x57, 0x61, 0x6c, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x4d, - 0x69, 0x6e, 0x73, 0x50, 0x6a, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, - 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x50, 0x6a, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x61, 0x78, - 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x50, 0x75, 0x18, 0x0e, 0x20, 0x01, + 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x72, 0x61, 0x63, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x5f, 0x63, 0x70, 0x75, 0x5f, + 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x72, 0x70, 0x43, + 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x10, 0x67, 0x72, 0x70, 0x5f, 0x63, 0x70, + 0x75, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, + 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, + 0x70, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, + 0x70, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x67, 0x72, 0x70, 0x5f, 0x6d, 0x65, 0x6d, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x12, 0x1b, + 0x0a, 0x09, 0x67, 0x72, 0x70, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x67, 0x72, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x67, + 0x72, 0x70, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, + 0x6f, 0x62, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x57, 0x61, 0x6c, 0x6c, 0x12, 0x25, + 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x5f, 0x70, + 0x6a, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x4d, + 0x69, 0x6e, 0x73, 0x50, 0x6a, 0x12, 0x2c, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, + 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x5f, 0x70, 0x75, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, - 0x73, 0x50, 0x75, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x50, 0x6a, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x50, - 0x6a, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x50, 0x75, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x50, 0x75, 0x12, - 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x50, 0x75, 0x18, 0x11, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x50, 0x75, 0x12, 0x1f, 0x0a, - 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x12, 0x28, - 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x50, - 0x75, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x50, 0x75, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x57, - 0x61, 0x6c, 0x6c, 0x50, 0x6a, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, - 0x57, 0x61, 0x6c, 0x6c, 0x50, 0x6a, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x15, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x72, - 0x65, 0x65, 0x6d, 0x70, 0x74, 0x42, 0x69, 0x74, 0x73, 0x74, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x42, 0x69, 0x74, 0x73, 0x74, 0x72, - 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, - 0x17, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x4d, 0x6f, 0x64, - 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, - 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x18, 0x19, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x29, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x51, 0x6f, 0x73, 0x55, 0x73, 0x61, 0x67, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x75, - 0x73, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x0b, 0x75, 0x73, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a, - 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, + 0x73, 0x50, 0x75, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x5f, + 0x70, 0x6a, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, + 0x73, 0x50, 0x6a, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x5f, + 0x70, 0x75, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, + 0x73, 0x50, 0x75, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x5f, + 0x70, 0x75, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, + 0x73, 0x50, 0x75, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, + 0x5f, 0x70, 0x6a, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x6f, + 0x64, 0x65, 0x73, 0x50, 0x6a, 0x12, 0x2b, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x5f, 0x70, 0x75, 0x18, 0x13, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, + 0x50, 0x75, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x5f, 0x70, + 0x6a, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, + 0x50, 0x6a, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, + 0x74, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x74, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, + 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x42, 0x69, 0x74, 0x73, 0x74, 0x72, 0x12, 0x21, 0x0a, + 0x0c, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x17, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x19, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, + 0x29, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x51, 0x6f, 0x73, 0x55, 0x73, 0x61, 0x67, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x73, + 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x0b, 0x75, 0x73, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, + 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x22, 0x47, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go index 61839fac..4fb482da 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go @@ -73,15 +73,15 @@ type UserInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AdminLevel int32 `protobuf:"varint,1,opt,name=adminLevel,proto3" json:"adminLevel,omitempty"` - AssocList []*AssociationInfo `protobuf:"bytes,2,rep,name=assocList,proto3" json:"assocList,omitempty"` - CoordList []*CoordInfo `protobuf:"bytes,3,rep,name=coordList,proto3" json:"coordList,omitempty"` - DefaultAcct string `protobuf:"bytes,4,opt,name=defaultAcct,proto3" json:"defaultAcct,omitempty"` - DefaultWckey string `protobuf:"bytes,5,opt,name=defaultWckey,proto3" json:"defaultWckey,omitempty"` - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - OldName string `protobuf:"bytes,7,opt,name=oldName,proto3" json:"oldName,omitempty"` - Uid int32 `protobuf:"varint,8,opt,name=uid,proto3" json:"uid,omitempty"` - WckeyList []*WckeyInfo `protobuf:"bytes,9,rep,name=wckeyList,proto3" json:"wckeyList,omitempty"` + AdminLevel int32 `protobuf:"varint,1,opt,name=adminLevel,proto3" json:"adminLevel,omitempty"` + AssociationList []*AssociationInfo `protobuf:"bytes,2,rep,name=association_list,json=associationList,proto3" json:"association_list,omitempty"` + CoordList []*CoordInfo `protobuf:"bytes,3,rep,name=coord_list,json=coordList,proto3" json:"coord_list,omitempty"` + DefaultAcct string `protobuf:"bytes,4,opt,name=default_acct,json=defaultAcct,proto3" json:"default_acct,omitempty"` + DefaultWckey string `protobuf:"bytes,5,opt,name=default_wckey,json=defaultWckey,proto3" json:"default_wckey,omitempty"` + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` + OldName string `protobuf:"bytes,7,opt,name=oldName,proto3" json:"oldName,omitempty"` + Uid int32 `protobuf:"varint,8,opt,name=uid,proto3" json:"uid,omitempty"` + WckeyList []*WckeyInfo `protobuf:"bytes,9,rep,name=wckey_list,json=wckeyList,proto3" json:"wckey_list,omitempty"` } func (x *UserInfo) Reset() { @@ -123,9 +123,9 @@ func (x *UserInfo) GetAdminLevel() int32 { return 0 } -func (x *UserInfo) GetAssocList() []*AssociationInfo { +func (x *UserInfo) GetAssociationList() []*AssociationInfo { if x != nil { - return x.AssocList + return x.AssociationList } return nil } @@ -485,54 +485,55 @@ var file_idl_slurmdb_user_proto_rawDesc = []byte{ 0x0c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0xc6, 0x02, 0x0a, + 0x6f, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0xd7, 0x02, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x34, 0x0a, 0x09, 0x61, 0x73, 0x73, - 0x6f, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, - 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x2e, 0x0a, 0x09, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x43, 0x6f, 0x6f, 0x72, 0x64, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x63, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x63, - 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x57, 0x63, 0x6b, 0x65, + 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x41, 0x0a, 0x10, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0a, + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x09, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x63, 0x74, + 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x09, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x4c, 0x69, - 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x77, 0x63, 0x6b, 0x65, - 0x79, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, - 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0x3f, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x2e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, - 0x22, 0x63, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x38, - 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, - 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, - 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x22, 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x12, 0x2c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, - 0x26, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, - 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x5f, 0x6c, + 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x6c, 0x75, 0x72, + 0x6d, 0x2e, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x77, 0x63, 0x6b, + 0x65, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, + 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0x3f, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x2e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x73, 0x22, 0x63, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, + 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, + 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x22, 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x12, 0x2c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x26, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -564,9 +565,9 @@ var file_idl_slurmdb_user_proto_goTypes = []interface{}{ } var file_idl_slurmdb_user_proto_depIdxs = []int32{ 1, // 0: slurm.UserInfoList.userInfos:type_name -> slurm.UserInfo - 8, // 1: slurm.UserInfo.assocList:type_name -> slurm.AssociationInfo - 9, // 2: slurm.UserInfo.coordList:type_name -> slurm.CoordInfo - 10, // 3: slurm.UserInfo.wckeyList:type_name -> slurm.WckeyInfo + 8, // 1: slurm.UserInfo.association_list:type_name -> slurm.AssociationInfo + 9, // 2: slurm.UserInfo.coord_list:type_name -> slurm.CoordInfo + 10, // 3: slurm.UserInfo.wckey_list:type_name -> slurm.WckeyInfo 11, // 4: slurm.ListUsersReq.slurm_version:type_name -> slurm.SlurmVersion 1, // 5: slurm.ListUsersResp.user_infos:type_name -> slurm.UserInfo 11, // 6: slurm.GetUserReq.slurm_version:type_name -> slurm.SlurmVersion diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go index 9dfc0dd7..d69f1f3d 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go @@ -26,10 +26,10 @@ type WckeyInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AccountingList []*AccountingInfo `protobuf:"bytes,1,rep,name=accountingList,proto3" json:"accountingList,omitempty"` + AccountingList []*AccountingInfo `protobuf:"bytes,1,rep,name=accounting_list,json=accountingList,proto3" json:"accounting_list,omitempty"` Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` Id int32 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` - IdDef int32 `protobuf:"varint,4,opt,name=idDef,proto3" json:"idDef,omitempty"` + IsDef int32 `protobuf:"varint,4,opt,name=is_def,json=isDef,proto3" json:"is_def,omitempty"` Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` Uid int32 `protobuf:"varint,6,opt,name=uid,proto3" json:"uid,omitempty"` User string `protobuf:"bytes,7,opt,name=user,proto3" json:"user,omitempty"` @@ -88,9 +88,9 @@ func (x *WckeyInfo) GetId() int32 { return 0 } -func (x *WckeyInfo) GetIdDef() int32 { +func (x *WckeyInfo) GetIsDef() int32 { if x != nil { - return x.IdDef + return x.IsDef } return 0 } @@ -116,6 +116,202 @@ func (x *WckeyInfo) GetUser() string { return "" } +type ListWckeysReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` +} + +func (x *ListWckeysReq) Reset() { + *x = ListWckeysReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_wckey_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWckeysReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWckeysReq) ProtoMessage() {} + +func (x *ListWckeysReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_wckey_proto_msgTypes[1] + 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 ListWckeysReq.ProtoReflect.Descriptor instead. +func (*ListWckeysReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_wckey_proto_rawDescGZIP(), []int{1} +} + +func (x *ListWckeysReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +type ListWckeysResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WckeyInfos []*WckeyInfo `protobuf:"bytes,1,rep,name=wckey_infos,json=wckeyInfos,proto3" json:"wckey_infos,omitempty"` +} + +func (x *ListWckeysResp) Reset() { + *x = ListWckeysResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_wckey_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWckeysResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWckeysResp) ProtoMessage() {} + +func (x *ListWckeysResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_wckey_proto_msgTypes[2] + 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 ListWckeysResp.ProtoReflect.Descriptor instead. +func (*ListWckeysResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_wckey_proto_rawDescGZIP(), []int{2} +} + +func (x *ListWckeysResp) GetWckeyInfos() []*WckeyInfo { + if x != nil { + return x.WckeyInfos + } + return nil +} + +type GetWckeyReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` + Wckey string `protobuf:"bytes,2,opt,name=wckey,proto3" json:"wckey,omitempty"` +} + +func (x *GetWckeyReq) Reset() { + *x = GetWckeyReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_wckey_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWckeyReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWckeyReq) ProtoMessage() {} + +func (x *GetWckeyReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_wckey_proto_msgTypes[3] + 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 GetWckeyReq.ProtoReflect.Descriptor instead. +func (*GetWckeyReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_wckey_proto_rawDescGZIP(), []int{3} +} + +func (x *GetWckeyReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +func (x *GetWckeyReq) GetWckey() string { + if x != nil { + return x.Wckey + } + return "" +} + +type GetWckeyResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WckeyInfo []*WckeyInfo `protobuf:"bytes,1,rep,name=wckey_info,json=wckeyInfo,proto3" json:"wckey_info,omitempty"` +} + +func (x *GetWckeyResp) Reset() { + *x = GetWckeyResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_wckey_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWckeyResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWckeyResp) ProtoMessage() {} + +func (x *GetWckeyResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_wckey_proto_msgTypes[4] + 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 GetWckeyResp.ProtoReflect.Descriptor instead. +func (*GetWckeyResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_wckey_proto_rawDescGZIP(), []int{4} +} + +func (x *GetWckeyResp) GetWckeyInfo() []*WckeyInfo { + if x != nil { + return x.WckeyInfo + } + return nil +} + var File_idl_slurmdb_wckey_proto protoreflect.FileDescriptor var file_idl_slurmdb_wckey_proto_rawDesc = []byte{ @@ -126,20 +322,39 @@ var file_idl_slurmdb_wckey_proto_rawDesc = []byte{ 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xc4, 0x01, 0x0a, 0x09, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x3d, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x64, 0x44, 0x65, - 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x64, 0x44, 0x65, 0x66, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x22, 0xc6, 0x01, 0x0a, 0x09, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x3e, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, + 0x64, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x73, 0x44, 0x65, 0x66, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x49, 0x0a, 0x0d, 0x4c, 0x69, + 0x73, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x63, 0x6b, + 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x0b, 0x77, 0x63, 0x6b, 0x65, 0x79, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, + 0x77, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x5d, 0x0a, 0x0b, 0x47, 0x65, + 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x22, 0x3f, 0x0a, 0x0c, 0x47, 0x65, 0x74, + 0x57, 0x63, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x0a, 0x77, 0x63, 0x6b, + 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x09, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -154,18 +369,27 @@ func file_idl_slurmdb_wckey_proto_rawDescGZIP() []byte { return file_idl_slurmdb_wckey_proto_rawDescData } -var file_idl_slurmdb_wckey_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_idl_slurmdb_wckey_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_idl_slurmdb_wckey_proto_goTypes = []interface{}{ (*WckeyInfo)(nil), // 0: slurm.WckeyInfo - (*AccountingInfo)(nil), // 1: slurm.AccountingInfo + (*ListWckeysReq)(nil), // 1: slurm.ListWckeysReq + (*ListWckeysResp)(nil), // 2: slurm.ListWckeysResp + (*GetWckeyReq)(nil), // 3: slurm.GetWckeyReq + (*GetWckeyResp)(nil), // 4: slurm.GetWckeyResp + (*AccountingInfo)(nil), // 5: slurm.AccountingInfo + (SlurmVersion)(0), // 6: slurm.SlurmVersion } var file_idl_slurmdb_wckey_proto_depIdxs = []int32{ - 1, // 0: slurm.WckeyInfo.accountingList:type_name -> slurm.AccountingInfo - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 5, // 0: slurm.WckeyInfo.accounting_list:type_name -> slurm.AccountingInfo + 6, // 1: slurm.ListWckeysReq.slurm_version:type_name -> slurm.SlurmVersion + 0, // 2: slurm.ListWckeysResp.wckey_infos:type_name -> slurm.WckeyInfo + 6, // 3: slurm.GetWckeyReq.slurm_version:type_name -> slurm.SlurmVersion + 0, // 4: slurm.GetWckeyResp.wckey_info:type_name -> slurm.WckeyInfo + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_idl_slurmdb_wckey_proto_init() } @@ -188,6 +412,54 @@ func file_idl_slurmdb_wckey_proto_init() { return nil } } + file_idl_slurmdb_wckey_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWckeysReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_wckey_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWckeysResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_wckey_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWckeyReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_wckey_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWckeyResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -195,7 +467,7 @@ func file_idl_slurmdb_wckey_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_slurmdb_wckey_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json index 03416bbf..9c05e389 100644 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json @@ -262,6 +262,17 @@ } } }, + "slurmGetWckeyResp": { + "type": "object", + "properties": { + "wckeyInfo": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmWckeyInfo" + } + } + } + }, "slurmListAccountsResp": { "type": "object", "properties": { @@ -306,6 +317,17 @@ } } }, + "slurmListWckeysResp": { + "type": "object", + "properties": { + "wckeyInfos": { + "type": "array", + "items": { + "$ref": "#/definitions/slurmWckeyInfo" + } + } + } + }, "slurmQosInfo": { "type": "object", "properties": { @@ -442,7 +464,7 @@ "type": "integer", "format": "int32" }, - "assocList": { + "associationList": { "type": "array", "items": { "$ref": "#/definitions/slurmAssociationInfo" @@ -494,7 +516,7 @@ "type": "integer", "format": "int32" }, - "idDef": { + "isDef": { "type": "integer", "format": "int32" }, diff --git a/adaptor/pcm_slurm/idl/node.proto b/adaptor/pcm_slurm/idl/node.proto index 7001c2c3..a160c188 100644 --- a/adaptor/pcm_slurm/idl/node.proto +++ b/adaptor/pcm_slurm/idl/node.proto @@ -12,7 +12,7 @@ message NodeInfo{ int32 boards = 1 ; int32 cpus = 2 ; string name = 3 ; - int32 realMemory = 4 ; + int32 real_memory = 4 ; int32 sockets = 5 ; int32 threads = 6 ; } diff --git a/adaptor/pcm_slurm/idl/slurm.proto b/adaptor/pcm_slurm/idl/slurm.proto index 2400e30c..09a7cc8a 100644 --- a/adaptor/pcm_slurm/idl/slurm.proto +++ b/adaptor/pcm_slurm/idl/slurm.proto @@ -7,6 +7,7 @@ import "idl/slurmdb_user.proto"; import "idl/slurmdb_assoc.proto"; import "idl/slurmdb_account.proto"; import "idl/slurmdb_qos.proto"; +import "idl/slurmdb_wckey.proto"; // Slurm Services @@ -33,4 +34,9 @@ service SlurmService { // list all qos info from slurmdb rpc ListQoss(ListQossReq) returns (ListQossResp); + // list all wckeys info from slurmdb + rpc ListWckeys(ListWckeysReq) returns (ListWckeysResp); + + // get specific wckey info from slurmdb + rpc GetWckey(GetWckeyReq) returns (GetWckeyResp); } diff --git a/adaptor/pcm_slurm/idl/slurm.yaml b/adaptor/pcm_slurm/idl/slurm.yaml index 56e9f552..3b93af68 100644 --- a/adaptor/pcm_slurm/idl/slurm.yaml +++ b/adaptor/pcm_slurm/idl/slurm.yaml @@ -17,4 +17,8 @@ http: get: "/apis/slurm/getAccount" - selector: slurm.SlurmService.ListQoss get: "/apis/slurm/listQoss" + - selector: slurm.SlurmService.ListWckeys + get: "/apis/slurm/listWckeys" + - selector: slurm.SlurmService.GetWckey + get: "/apis/slurm/getWckey" diff --git a/adaptor/pcm_slurm/idl/slurmdb_account.proto b/adaptor/pcm_slurm/idl/slurmdb_account.proto index b26a7892..228a4c0b 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_account.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_account.proto @@ -8,7 +8,7 @@ import "idl/slurmdb_assoc.proto"; import "idl/slurmdb_coord.proto"; message AccountInfo{ - repeated AssociationInfo assocList = 1; + repeated AssociationInfo assoc_list = 1; repeated CoordInfo coordinators = 2; string description = 3; string name = 4; diff --git a/adaptor/pcm_slurm/idl/slurmdb_accounting.proto b/adaptor/pcm_slurm/idl/slurmdb_accounting.proto index 019a1e43..f97d5b5d 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_accounting.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_accounting.proto @@ -6,7 +6,7 @@ import "google/protobuf/timestamp.proto"; import "idl/static.proto"; message AccountingInfo{ - int64 allocSecs = 1 ; + int64 alloc_secs = 1 ; int32 id = 2 ; - google.protobuf.Timestamp periodStart = 3; + google.protobuf.Timestamp period_start = 3; } diff --git a/adaptor/pcm_slurm/idl/slurmdb_assoc.proto b/adaptor/pcm_slurm/idl/slurmdb_assoc.proto index ee13cf09..f9b7b053 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_assoc.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_assoc.proto @@ -13,36 +13,36 @@ message AssocUsageInfo{ } message AssociationInfo{ - repeated AccountingInfo accountingList = 1 ; + repeated AccountingInfo accounting_list = 1 ; string acct = 2 ; string cluster = 3 ; - int32 defQosId = 4 ; - int64 grpCpuMins = 5 ; - int64 grpGpuRunMins = 6 ; - int32 grpCpus = 7 ; - int32 grpJobs = 8 ; - int32 grpMem = 9 ; - int32 grpNodes = 10 ; - int32 grpSubmitJobs = 11 ; - int32 grpWall = 12 ; + int32 def_qos_id = 4 ; + int64 grp_cpu_mins = 5 ; + int64 grp_gpu_run_mins = 6 ; + int32 grp_cpus = 7 ; + int32 grp_jobs = 8 ; + int32 grp_mem = 9 ; + int32 grp_nodes = 10 ; + int32 grp_submit_jobs = 11 ; + int32 grp_wall = 12 ; int32 id = 13 ; - int32 isDef = 14 ; + int32 is_def = 14 ; int32 lft = 15 ; - int64 maxCpuMinsPj = 16 ; - int64 maxCpuRunMins = 17 ; - int32 maxCpusPj = 18 ; - int32 maxJobs = 19 ; - int32 maxNodesPj = 20 ; - int32 maxSubmitJobs = 21 ; - int32 maxWallPj = 22 ; - string parentAcct = 23 ; - int32 parentId = 24 ; + int64 max_cpu_mins_pj = 16 ; + int64 max_cpu_run_mins = 17 ; + int32 max_cpus_pj = 18 ; + int32 max_jobs = 19 ; + int32 max_nodes_pj = 20 ; + int32 max_submit_jobs = 21 ; + int32 max_wall_pj = 22 ; + string parent_acct = 23 ; + int32 parent_id = 24 ; string partition = 25 ; - repeated QosInfo qosList = 26 ; + repeated QosInfo qos_list = 26 ; int32 rgt = 27 ; - int32 sharesRaw = 28 ; + int32 shares_raw = 28 ; int32 uid = 29 ; - AssocUsageInfo assocUsage = 30 ; + AssocUsageInfo assoc_usage = 30 ; string user = 31 ; } diff --git a/adaptor/pcm_slurm/idl/slurmdb_cluster.proto b/adaptor/pcm_slurm/idl/slurmdb_cluster.proto index c7ee0a04..9322df4b 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_cluster.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_cluster.proto @@ -8,18 +8,17 @@ import "idl/slurmdb_accounting.proto"; import "idl/slurmdb_assoc.proto"; message ClusterInfo{ - repeated AccountingInfo accountingList = 1 ; + repeated AccountingInfo accounting_list = 1 ; int32 classification = 2 ; - //slurm_addr_t control_addr; - string controlHost = 3 ; - int32 controlPort = 4 ; - int32 cpuCount = 5 ; + string control_host = 3 ; + int32 control_port = 4 ; + int32 cpu_count = 5 ; int32 dimensions = 6 ; - int32 dimSize = 7 ; + int32 dim_size = 7 ; int32 flags = 8 ; string name = 9 ; string nodes = 10 ; - int32 pluginIdSelect = 11 ; - AssociationInfo rootAssoc = 12 ; - int32 rpcVersion = 13 ; + int32 plugin_id_select = 11 ; + AssociationInfo root_assoc = 12 ; + int32 rpc_version = 13 ; } diff --git a/adaptor/pcm_slurm/idl/slurmdb_qos.proto b/adaptor/pcm_slurm/idl/slurmdb_qos.proto index 6ee0e044..1229c31e 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_qos.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_qos.proto @@ -13,31 +13,31 @@ message QosInfo{ string description = 1 ; int32 id = 2 ; int32 flags = 3 ; - int32 graceTime = 4 ; - int64 grpCpuMins = 5; - int64 grpCpuRunMins = 6; - int32 grpCpus = 7 ; - int32 grpJobs = 8 ; + int32 grace_time = 4 ; + int64 grp_cpu_mins = 5; + int64 grp_cpu_run_mins = 6; + int32 grp_cpus = 7 ; + int32 grp_jobs = 8 ; int32 grp_mem = 9 ; int32 grp_nodes = 10 ; - int32 grp_submitJobs = 11 ; + int32 grp_submit_jobs = 11 ; int32 grp_wall = 12 ; - int64 maxCpuMinsPj = 13 ; - int64 maxCpuRunMinsPu = 14 ; - int32 maxCpusPj = 15 ; - int32 maxCpusPu = 16 ; - int32 maxJobsPu = 17 ; - int32 max_nodesPj = 18 ; - int32 maxSubmitJobsPu = 19 ; - int32 maxWallPj = 20 ; + int64 max_cpu_mins_pj = 13 ; + int64 max_cpu_run_mins_pu = 14 ; + int32 max_cpus_pj = 15 ; + int32 max_cpus_pu = 16 ; + int32 max_jobs_pu = 17 ; + int32 max_nodes_pj = 18 ; + int32 max_submit_jobs_pu = 19 ; + int32 max_wall_pj = 20 ; string name = 21 ; - int32 preemptBitstr = 22 ; - repeated string preemptList = 23 ; - int32 preemptMode = 24 ; + int32 preempt_bitstr = 22 ; + repeated string preempt_list = 23 ; + int32 preempt_mode = 24 ; int32 priority = 25 ; QosUsageInfo usage = 26 ; double usageFactor = 27 ; - double usageThres = 28 ; + double usage_thres = 28 ; } message ListQossReq{ diff --git a/adaptor/pcm_slurm/idl/slurmdb_user.proto b/adaptor/pcm_slurm/idl/slurmdb_user.proto index 6e64d2f4..d517fee2 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_user.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_user.proto @@ -13,14 +13,14 @@ message UserInfoList{ } message UserInfo{ int32 adminLevel = 1 ; - repeated AssociationInfo assocList= 2 ; - repeated CoordInfo coordList = 3 ; - string defaultAcct = 4 ; - string defaultWckey = 5 ; + repeated AssociationInfo association_list= 2 ; + repeated CoordInfo coord_list = 3 ; + string default_acct = 4 ; + string default_wckey = 5 ; string name = 6 ; string oldName = 7 ; int32 uid = 8 ; - repeated WckeyInfo wckeyList = 9 ; + repeated WckeyInfo wckey_list = 9 ; } message ListUsersReq{ diff --git a/adaptor/pcm_slurm/idl/slurmdb_wckey.proto b/adaptor/pcm_slurm/idl/slurmdb_wckey.proto index 6808346e..f3db6aee 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_wckey.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_wckey.proto @@ -7,11 +7,28 @@ import "idl/static.proto"; import "idl/slurmdb_accounting.proto"; message WckeyInfo{ - repeated AccountingInfo accountingList = 1 ; + repeated AccountingInfo accounting_list = 1 ; string cluster= 2 ; int32 id = 3 ; - int32 idDef = 4 ; + int32 is_def = 4 ; string name = 5 ; int32 uid = 6 ; string user = 7 ; } + +message ListWckeysReq{ + SlurmVersion slurm_version = 1; +} + +message ListWckeysResp { + repeated WckeyInfo wckey_infos =1; +} + +message GetWckeyReq{ + SlurmVersion slurm_version = 1; + string wckey = 2; +} + +message GetWckeyResp { + repeated WckeyInfo wckey_info = 1; +} \ No newline at end of file diff --git a/adaptor/pcm_slurm/server/slurm.go b/adaptor/pcm_slurm/server/slurm.go index f0867ef8..fb06b324 100644 --- a/adaptor/pcm_slurm/server/slurm.go +++ b/adaptor/pcm_slurm/server/slurm.go @@ -81,3 +81,23 @@ func (s *Server) ListQoss(ctx context.Context, req *slurmpb.ListQossReq) (*slurm } return resp, nil } + +// ListWckeys return all slurm wckeys +func (s *Server) ListWckeys(ctx context.Context, req *slurmpb.ListWckeysReq) (*slurmpb.ListWckeysResp, error) { + resp, err := ListWckeys(ctx, req) + if err != nil { + glog.Errorf("ListSlurmWckeys error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// GetWckey return specific slurm wckey +func (s *Server) GetWckey(ctx context.Context, req *slurmpb.GetWckeyReq) (*slurmpb.GetWckeyResp, error) { + resp, err := GetWckey(ctx, req) + if err != nil { + glog.Errorf("GetSlurmWckey error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} diff --git a/adaptor/pcm_slurm/server/slurmImpl.go b/adaptor/pcm_slurm/server/slurmImpl.go index dc569e8f..061c2714 100644 --- a/adaptor/pcm_slurm/server/slurmImpl.go +++ b/adaptor/pcm_slurm/server/slurmImpl.go @@ -68,3 +68,20 @@ func ListQoss(ctx context.Context, req *pbslurm.ListQossReq) (*pbslurm.ListQossR resp, _ := slurm.ListQoss(ctx, req) return resp, nil } +func ListWckeys(ctx context.Context, req *pbslurm.ListWckeysReq) (*pbslurm.ListWckeysResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.ListWckeys(ctx, req) + return resp, nil +} + +func GetWckey(ctx context.Context, req *pbslurm.GetWckeyReq) (*pbslurm.GetWckeyResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.GetWckey(ctx, req) + return resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurmdb_association.go b/adaptor/pcm_slurm/service/slurmdb_association.go index ae6cc1a5..d0639225 100644 --- a/adaptor/pcm_slurm/service/slurmdb_association.go +++ b/adaptor/pcm_slurm/service/slurmdb_association.go @@ -194,6 +194,7 @@ func (slurmStruct SlurmStruct) GetAssociation(ctx context.Context, req *pbslurm. for _, assoc := range assocList.AssocInfoList { assocResult := assoc //todo add filter logic + if assocResult.Cluster == req.Cluster && assocResult.User == req.User && assocResult.Acct == assocResult.Acct && assocResult.Partition == req.Partition { resp.AssocInfos = append(resp.AssocInfos, &assocResult) } diff --git a/adaptor/pcm_slurm/service/slurmdb_wckey.go b/adaptor/pcm_slurm/service/slurmdb_wckey.go new file mode 100644 index 00000000..039601d0 --- /dev/null +++ b/adaptor/pcm_slurm/service/slurmdb_wckey.go @@ -0,0 +1,119 @@ +package slurmer + +/* +#cgo LDFLAGS: -lslurmdb + +#include +#include +#include +#include +#include + +typedef struct wckey_info_msg { + uint32_t record_count; + slurmdb_wckey_rec_t *wckey_array; +} wckey_info_msg_t; + +typedef struct slurmdb_wckey_rec{ + uint16_t admin_level; + List assoc_list; + List coord_accts; + char *default_acct; + char *default_wckey; + char *name; + char *old_name; + uint32_t uid; + List wckey_list; +} slurmdb_wckey_rec_pcm; + +struct wckey_info_msg get_wckey_info() { + struct wckey_info_msg wckeyinfo; + List wckeyList = NULL; + slurmdb_wckey_cond_t *wckey_cond = NULL; + void *db_conn; + db_conn = slurmdb_connection_get(); + wckeyList = slurmdb_wckeys_get(db_conn, wckey_cond); + slurmdb_connection_close(&db_conn); + + slurmdb_wckey_rec_t *rec = NULL; + ListIterator itr = slurm_list_iterator_create(wckeyList); + int i = 0; + uint32_t length; + length = slurm_list_count(wckeyList); + wckeyinfo.record_count = length; + wckeyinfo.wckey_array = malloc(length * sizeof(slurmdb_wckey_rec_t)); + while ((rec = slurm_list_next(itr))) { + wckeyinfo.wckey_array[i] = *rec; + i++; + } + return wckeyinfo; +} + +struct slurmdb_wckey_rec *wckey_from_list(struct wckey_info_msg *list, int i) { + return (struct slurmdb_wckey_rec *) &list->wckey_array[i]; +} + +*/ +import "C" +import ( + pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" + "context" +) + +type WckeyInfoMsg struct { + LastUpdate int64 + RecordCount uint32 + WckeyInfoList []pbslurm.WckeyInfo +} + +func WckeyDescriptorConvertCToGo(cStruct *C.struct_slurmdb_wckey_rec) pbslurm.WckeyInfo { + var goStruct pbslurm.WckeyInfo + goStruct.Name = C.GoString(cStruct.name) + return goStruct +} + +func GetWckeyInfo() WckeyInfoMsg { + var goWckeyBuffer WckeyInfoMsg + cWckeyBuffer := C.get_wckey_info() + goWckeyBuffer.RecordCount = uint32(cWckeyBuffer.record_count) + goWckeyBuffer.WckeyInfoList = make([]pbslurm.WckeyInfo, cWckeyBuffer.record_count, cWckeyBuffer.record_count) + + for i := uint32(0); i < goWckeyBuffer.RecordCount; i++ { + wckey := C.wckey_from_list(&cWckeyBuffer, C.int(i)) + goWckey := WckeyDescriptorConvertCToGo(wckey) + goWckeyBuffer.WckeyInfoList[i] = goWckey + } + return goWckeyBuffer +} + +func (slurmStruct SlurmStruct) ListWckeys(ctx context.Context, req *pbslurm.ListWckeysReq) (*pbslurm.ListWckeysResp, error) { + + wckeyList := GetWckeyInfo() + + resp := pbslurm.ListWckeysResp{} + for _, wckey := range wckeyList.WckeyInfoList { + wckeyInfoResult := wckey + //wckeyInfoResult.Name = wckey.Name + + resp.WckeyInfos = append(resp.WckeyInfos, &wckeyInfoResult) + } + + return &resp, nil +} + +func (slurmStruct SlurmStruct) GetWckey(ctx context.Context, req *pbslurm.GetWckeyReq) (*pbslurm.GetWckeyResp, error) { + + wckeyList := GetWckeyInfo() + + resp := pbslurm.GetWckeyResp{} + for _, wckey := range wckeyList.WckeyInfoList { + //wckeyInfoResult := pbslurm.WckeyInfo{} + //todo add filter logic + wckeyInfoResult := wckey + //wckeyInfoResult.Name = wckey.Name + + resp.WckeyInfo = append(resp.WckeyInfo, &wckeyInfoResult) + } + + return &resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurmer.go b/adaptor/pcm_slurm/service/slurmer.go index a295b8f3..cff82ebd 100644 --- a/adaptor/pcm_slurm/service/slurmer.go +++ b/adaptor/pcm_slurm/service/slurmer.go @@ -12,7 +12,9 @@ type Slurmer interface { GetAssociation(ctx context.Context, req *pbslurm.GetAssociationReq) (resp *pbslurm.GetAssociationResp, err error) //get specific slurm associations ListAccounts(ctx context.Context, req *pbslurm.ListAccountsReq) (resp *pbslurm.ListAccountsResp, err error) //list slurm accounts GetAccount(ctx context.Context, req *pbslurm.GetAccountReq) (resp *pbslurm.GetAccountResp, err error) //get specific slurm account - ListQoss(ctx context.Context, req *pbslurm.ListQossReq) (resp *pbslurm.ListQossResp, err error) //list slurm accounts + ListQoss(ctx context.Context, req *pbslurm.ListQossReq) (resp *pbslurm.ListQossResp, err error) //list slurm qoss + ListWckeys(ctx context.Context, req *pbslurm.ListWckeysReq) (resp *pbslurm.ListWckeysResp, err error) //list slurm wckeys + GetWckey(ctx context.Context, req *pbslurm.GetWckeyReq) (resp *pbslurm.GetWckeyResp, err error) //list slurm wckeys } func SelectSlurmVersion(slurmVersion pbslurm.SlurmVersion) (slurmer Slurmer, err error) { From 2500395ddf532981c30f18865f10f3a2ad7dd485 Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Thu, 10 Nov 2022 23:03:21 -0800 Subject: [PATCH 06/11] add/delete account --- adaptor/pcm_slurm/gen/idl/slurm.pb.go | 94 ++-- adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go | 174 ++++++ adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go | 76 +++ .../pcm_slurm/gen/idl/slurmdb_account.pb.go | 520 +++++++++++++++++- adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go | 362 ++++++++++-- .../gen/openapiv2/idl/slurm.swagger.json | 16 + adaptor/pcm_slurm/idl/slurm.proto | 6 + adaptor/pcm_slurm/idl/slurm.yaml | 4 + adaptor/pcm_slurm/idl/slurmdb_account.proto | 38 ++ adaptor/pcm_slurm/idl/slurmdb_user.proto | 31 +- adaptor/pcm_slurm/server/slurm.go | 20 + adaptor/pcm_slurm/server/slurmImpl.go | 19 + adaptor/pcm_slurm/service/slurmdb_account.go | 91 +++ adaptor/pcm_slurm/service/slurmdb_user.go | 43 ++ adaptor/pcm_slurm/service/slurmer.go | 2 + common/ssh/ssh_util.go | 70 +++ examples/slurm/submit_example/update_job.go | 20 +- 17 files changed, 1481 insertions(+), 105 deletions(-) create mode 100644 common/ssh/ssh_util.go diff --git a/adaptor/pcm_slurm/gen/idl/slurm.pb.go b/adaptor/pcm_slurm/gen/idl/slurm.pb.go index ba1b3f2d..6cf1a00e 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurm.pb.go @@ -32,7 +32,7 @@ var file_idl_slurm_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x71, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xad, 0x04, 0x0a, 0x0c, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x65, + 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xac, 0x05, 0x0a, 0x0c, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, @@ -57,18 +57,26 @@ var file_idl_slurm_proto_rawDesc = []byte{ 0x6e, 0x74, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x33, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x12, 0x12, 0x2e, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, - 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x63, 0x6b, 0x65, - 0x79, 0x73, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, - 0x63, 0x6b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x33, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x2e, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, - 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x39, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x2e, + 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x64, 0x64, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0d, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x2e, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, + 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x12, 0x12, 0x2e, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x13, + 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, + 0x73, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x63, + 0x6b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, + 0x0a, 0x08, 0x47, 0x65, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x2e, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x13, + 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_idl_slurm_proto_goTypes = []interface{}{ @@ -78,18 +86,22 @@ var file_idl_slurm_proto_goTypes = []interface{}{ (*GetAssociationReq)(nil), // 3: slurm.GetAssociationReq (*ListAccountsReq)(nil), // 4: slurm.ListAccountsReq (*GetAccountReq)(nil), // 5: slurm.GetAccountReq - (*ListQossReq)(nil), // 6: slurm.ListQossReq - (*ListWckeysReq)(nil), // 7: slurm.ListWckeysReq - (*GetWckeyReq)(nil), // 8: slurm.GetWckeyReq - (*ListUsersResp)(nil), // 9: slurm.ListUsersResp - (*GetUserResp)(nil), // 10: slurm.GetUserResp - (*ListAssociationsResp)(nil), // 11: slurm.ListAssociationsResp - (*GetAssociationResp)(nil), // 12: slurm.GetAssociationResp - (*ListAccountsResp)(nil), // 13: slurm.ListAccountsResp - (*GetAccountResp)(nil), // 14: slurm.GetAccountResp - (*ListQossResp)(nil), // 15: slurm.ListQossResp - (*ListWckeysResp)(nil), // 16: slurm.ListWckeysResp - (*GetWckeyResp)(nil), // 17: slurm.GetWckeyResp + (*AddAccountReq)(nil), // 6: slurm.AddAccountReq + (*DeleteAccountReq)(nil), // 7: slurm.DeleteAccountReq + (*ListQossReq)(nil), // 8: slurm.ListQossReq + (*ListWckeysReq)(nil), // 9: slurm.ListWckeysReq + (*GetWckeyReq)(nil), // 10: slurm.GetWckeyReq + (*ListUsersResp)(nil), // 11: slurm.ListUsersResp + (*GetUserResp)(nil), // 12: slurm.GetUserResp + (*ListAssociationsResp)(nil), // 13: slurm.ListAssociationsResp + (*GetAssociationResp)(nil), // 14: slurm.GetAssociationResp + (*ListAccountsResp)(nil), // 15: slurm.ListAccountsResp + (*GetAccountResp)(nil), // 16: slurm.GetAccountResp + (*AddAccountResp)(nil), // 17: slurm.AddAccountResp + (*DeleteAccountResp)(nil), // 18: slurm.DeleteAccountResp + (*ListQossResp)(nil), // 19: slurm.ListQossResp + (*ListWckeysResp)(nil), // 20: slurm.ListWckeysResp + (*GetWckeyResp)(nil), // 21: slurm.GetWckeyResp } var file_idl_slurm_proto_depIdxs = []int32{ 0, // 0: slurm.SlurmService.ListUsers:input_type -> slurm.ListUsersReq @@ -98,20 +110,24 @@ var file_idl_slurm_proto_depIdxs = []int32{ 3, // 3: slurm.SlurmService.GetAssociation:input_type -> slurm.GetAssociationReq 4, // 4: slurm.SlurmService.ListAccounts:input_type -> slurm.ListAccountsReq 5, // 5: slurm.SlurmService.GetAccount:input_type -> slurm.GetAccountReq - 6, // 6: slurm.SlurmService.ListQoss:input_type -> slurm.ListQossReq - 7, // 7: slurm.SlurmService.ListWckeys:input_type -> slurm.ListWckeysReq - 8, // 8: slurm.SlurmService.GetWckey:input_type -> slurm.GetWckeyReq - 9, // 9: slurm.SlurmService.ListUsers:output_type -> slurm.ListUsersResp - 10, // 10: slurm.SlurmService.GetUser:output_type -> slurm.GetUserResp - 11, // 11: slurm.SlurmService.ListAssociations:output_type -> slurm.ListAssociationsResp - 12, // 12: slurm.SlurmService.GetAssociation:output_type -> slurm.GetAssociationResp - 13, // 13: slurm.SlurmService.ListAccounts:output_type -> slurm.ListAccountsResp - 14, // 14: slurm.SlurmService.GetAccount:output_type -> slurm.GetAccountResp - 15, // 15: slurm.SlurmService.ListQoss:output_type -> slurm.ListQossResp - 16, // 16: slurm.SlurmService.ListWckeys:output_type -> slurm.ListWckeysResp - 17, // 17: slurm.SlurmService.GetWckey:output_type -> slurm.GetWckeyResp - 9, // [9:18] is the sub-list for method output_type - 0, // [0:9] is the sub-list for method input_type + 6, // 6: slurm.SlurmService.AddAccount:input_type -> slurm.AddAccountReq + 7, // 7: slurm.SlurmService.DeleteAccount:input_type -> slurm.DeleteAccountReq + 8, // 8: slurm.SlurmService.ListQoss:input_type -> slurm.ListQossReq + 9, // 9: slurm.SlurmService.ListWckeys:input_type -> slurm.ListWckeysReq + 10, // 10: slurm.SlurmService.GetWckey:input_type -> slurm.GetWckeyReq + 11, // 11: slurm.SlurmService.ListUsers:output_type -> slurm.ListUsersResp + 12, // 12: slurm.SlurmService.GetUser:output_type -> slurm.GetUserResp + 13, // 13: slurm.SlurmService.ListAssociations:output_type -> slurm.ListAssociationsResp + 14, // 14: slurm.SlurmService.GetAssociation:output_type -> slurm.GetAssociationResp + 15, // 15: slurm.SlurmService.ListAccounts:output_type -> slurm.ListAccountsResp + 16, // 16: slurm.SlurmService.GetAccount:output_type -> slurm.GetAccountResp + 17, // 17: slurm.SlurmService.AddAccount:output_type -> slurm.AddAccountResp + 18, // 18: slurm.SlurmService.DeleteAccount:output_type -> slurm.DeleteAccountResp + 19, // 19: slurm.SlurmService.ListQoss:output_type -> slurm.ListQossResp + 20, // 20: slurm.SlurmService.ListWckeys:output_type -> slurm.ListWckeysResp + 21, // 21: slurm.SlurmService.GetWckey:output_type -> slurm.GetWckeyResp + 11, // [11:22] is the sub-list for method output_type + 0, // [0:11] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go b/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go index df266524..47b79d19 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go +++ b/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go @@ -247,6 +247,78 @@ func local_request_SlurmService_GetAccount_0(ctx context.Context, marshaler runt } +var ( + filter_SlurmService_AddAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SlurmService_AddAccount_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddAccountReq + 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_AddAccount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AddAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SlurmService_AddAccount_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddAccountReq + 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_AddAccount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AddAccount(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_SlurmService_DeleteAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SlurmService_DeleteAccount_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteAccountReq + 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_DeleteAccount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SlurmService_DeleteAccount_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteAccountReq + 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_DeleteAccount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteAccount(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_SlurmService_ListQoss_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -511,6 +583,56 @@ func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_SlurmService_AddAccount_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, "/slurm.SlurmService/AddAccount", runtime.WithHTTPPathPattern("/apis/slurm/addAccount")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SlurmService_AddAccount_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_SlurmService_AddAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SlurmService_DeleteAccount_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, "/slurm.SlurmService/DeleteAccount", runtime.WithHTTPPathPattern("/apis/slurm/deleteAccount")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SlurmService_DeleteAccount_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_SlurmService_DeleteAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_SlurmService_ListQoss_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -759,6 +881,50 @@ func RegisterSlurmServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu }) + mux.Handle("GET", pattern_SlurmService_AddAccount_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, "/slurm.SlurmService/AddAccount", runtime.WithHTTPPathPattern("/apis/slurm/addAccount")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SlurmService_AddAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SlurmService_AddAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SlurmService_DeleteAccount_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, "/slurm.SlurmService/DeleteAccount", runtime.WithHTTPPathPattern("/apis/slurm/deleteAccount")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SlurmService_DeleteAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SlurmService_DeleteAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_SlurmService_ListQoss_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -841,6 +1007,10 @@ var ( pattern_SlurmService_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "getAccount"}, "")) + pattern_SlurmService_AddAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "addAccount"}, "")) + + pattern_SlurmService_DeleteAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "deleteAccount"}, "")) + pattern_SlurmService_ListQoss_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listQoss"}, "")) pattern_SlurmService_ListWckeys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listWckeys"}, "")) @@ -861,6 +1031,10 @@ var ( forward_SlurmService_GetAccount_0 = runtime.ForwardResponseMessage + forward_SlurmService_AddAccount_0 = runtime.ForwardResponseMessage + + forward_SlurmService_DeleteAccount_0 = runtime.ForwardResponseMessage + forward_SlurmService_ListQoss_0 = runtime.ForwardResponseMessage forward_SlurmService_ListWckeys_0 = runtime.ForwardResponseMessage diff --git a/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go b/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go index 741fa9df..66c9912b 100644 --- a/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go @@ -34,6 +34,10 @@ type SlurmServiceClient interface { ListAccounts(ctx context.Context, in *ListAccountsReq, opts ...grpc.CallOption) (*ListAccountsResp, error) // get specific account info from slurmdb GetAccount(ctx context.Context, in *GetAccountReq, opts ...grpc.CallOption) (*GetAccountResp, error) + // add account + AddAccount(ctx context.Context, in *AddAccountReq, opts ...grpc.CallOption) (*AddAccountResp, error) + // delete account + DeleteAccount(ctx context.Context, in *DeleteAccountReq, opts ...grpc.CallOption) (*DeleteAccountResp, error) // list all qos info from slurmdb ListQoss(ctx context.Context, in *ListQossReq, opts ...grpc.CallOption) (*ListQossResp, error) // list all wckeys info from slurmdb @@ -104,6 +108,24 @@ func (c *slurmServiceClient) GetAccount(ctx context.Context, in *GetAccountReq, return out, nil } +func (c *slurmServiceClient) AddAccount(ctx context.Context, in *AddAccountReq, opts ...grpc.CallOption) (*AddAccountResp, error) { + out := new(AddAccountResp) + err := c.cc.Invoke(ctx, "/slurm.SlurmService/AddAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *slurmServiceClient) DeleteAccount(ctx context.Context, in *DeleteAccountReq, opts ...grpc.CallOption) (*DeleteAccountResp, error) { + out := new(DeleteAccountResp) + err := c.cc.Invoke(ctx, "/slurm.SlurmService/DeleteAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *slurmServiceClient) ListQoss(ctx context.Context, in *ListQossReq, opts ...grpc.CallOption) (*ListQossResp, error) { out := new(ListQossResp) err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListQoss", in, out, opts...) @@ -147,6 +169,10 @@ type SlurmServiceServer interface { ListAccounts(context.Context, *ListAccountsReq) (*ListAccountsResp, error) // get specific account info from slurmdb GetAccount(context.Context, *GetAccountReq) (*GetAccountResp, error) + // add account + AddAccount(context.Context, *AddAccountReq) (*AddAccountResp, error) + // delete account + DeleteAccount(context.Context, *DeleteAccountReq) (*DeleteAccountResp, error) // list all qos info from slurmdb ListQoss(context.Context, *ListQossReq) (*ListQossResp, error) // list all wckeys info from slurmdb @@ -178,6 +204,12 @@ func (UnimplementedSlurmServiceServer) ListAccounts(context.Context, *ListAccoun func (UnimplementedSlurmServiceServer) GetAccount(context.Context, *GetAccountReq) (*GetAccountResp, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") } +func (UnimplementedSlurmServiceServer) AddAccount(context.Context, *AddAccountReq) (*AddAccountResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddAccount not implemented") +} +func (UnimplementedSlurmServiceServer) DeleteAccount(context.Context, *DeleteAccountReq) (*DeleteAccountResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAccount not implemented") +} func (UnimplementedSlurmServiceServer) ListQoss(context.Context, *ListQossReq) (*ListQossResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListQoss not implemented") } @@ -308,6 +340,42 @@ func _SlurmService_GetAccount_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _SlurmService_AddAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddAccountReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmServiceServer).AddAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurm.SlurmService/AddAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmServiceServer).AddAccount(ctx, req.(*AddAccountReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _SlurmService_DeleteAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAccountReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmServiceServer).DeleteAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurm.SlurmService/DeleteAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmServiceServer).DeleteAccount(ctx, req.(*DeleteAccountReq)) + } + return interceptor(ctx, in, info, handler) +} + func _SlurmService_ListQoss_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListQossReq) if err := dec(in); err != nil { @@ -393,6 +461,14 @@ var SlurmService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetAccount", Handler: _SlurmService_GetAccount_Handler, }, + { + MethodName: "AddAccount", + Handler: _SlurmService_AddAccount_Handler, + }, + { + MethodName: "DeleteAccount", + Handler: _SlurmService_DeleteAccount_Handler, + }, { MethodName: "ListQoss", Handler: _SlurmService_ListQoss_Handler, diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go index 7e266a63..f856392b 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go @@ -296,6 +296,370 @@ func (x *GetAccountResp) GetAccountInfos() []*AccountInfo { return nil } +type AddAccountReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` + Clusters string `protobuf:"bytes,2,opt,name=clusters,proto3" json:"clusters,omitempty"` + DefaultQos string `protobuf:"bytes,3,opt,name=default_qos,json=defaultQos,proto3" json:"default_qos,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + FairShare string `protobuf:"bytes,5,opt,name=fair_share,json=fairShare,proto3" json:"fair_share,omitempty"` + GrpCpuMins string `protobuf:"bytes,6,opt,name=grp_cpu_mins,json=grpCpuMins,proto3" json:"grp_cpu_mins,omitempty"` + GrpCpus string `protobuf:"bytes,7,opt,name=grp_cpus,json=grpCpus,proto3" json:"grp_cpus,omitempty"` + GrpJobs string `protobuf:"bytes,8,opt,name=grp_jobs,json=grpJobs,proto3" json:"grp_jobs,omitempty"` + GrpMemory string `protobuf:"bytes,9,opt,name=grp_memory,json=grpMemory,proto3" json:"grp_memory,omitempty"` + GrpNodes string `protobuf:"bytes,10,opt,name=grp_nodes,json=grpNodes,proto3" json:"grp_nodes,omitempty"` + GrpSubmitJobs string `protobuf:"bytes,11,opt,name=grp_submit_jobs,json=grpSubmitJobs,proto3" json:"grp_submit_jobs,omitempty"` + GrpWall string `protobuf:"bytes,12,opt,name=grp_wall,json=grpWall,proto3" json:"grp_wall,omitempty"` + MaxCpuMins string `protobuf:"bytes,13,opt,name=max_cpu_mins,json=maxCpuMins,proto3" json:"max_cpu_mins,omitempty"` + MaxCpus string `protobuf:"bytes,14,opt,name=max_cpus,json=maxCpus,proto3" json:"max_cpus,omitempty"` + MaxJobs string `protobuf:"bytes,15,opt,name=max_jobs,json=maxJobs,proto3" json:"max_jobs,omitempty"` + MaxNodes string `protobuf:"bytes,16,opt,name=max_nodes,json=maxNodes,proto3" json:"max_nodes,omitempty"` + MaxSubmitJobs string `protobuf:"bytes,17,opt,name=max_submit_jobs,json=maxSubmitJobs,proto3" json:"max_submit_jobs,omitempty"` + MaxWall string `protobuf:"bytes,18,opt,name=max_wall,json=maxWall,proto3" json:"max_wall,omitempty"` + Names string `protobuf:"bytes,19,opt,name=names,proto3" json:"names,omitempty"` + Organization string `protobuf:"bytes,20,opt,name=organization,proto3" json:"organization,omitempty"` + Parent string `protobuf:"bytes,21,opt,name=parent,proto3" json:"parent,omitempty"` + QosLevel string `protobuf:"bytes,22,opt,name=qos_level,json=qosLevel,proto3" json:"qos_level,omitempty"` +} + +func (x *AddAccountReq) Reset() { + *x = AddAccountReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_account_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddAccountReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddAccountReq) ProtoMessage() {} + +func (x *AddAccountReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_account_proto_msgTypes[5] + 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 AddAccountReq.ProtoReflect.Descriptor instead. +func (*AddAccountReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{5} +} + +func (x *AddAccountReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +func (x *AddAccountReq) GetClusters() string { + if x != nil { + return x.Clusters + } + return "" +} + +func (x *AddAccountReq) GetDefaultQos() string { + if x != nil { + return x.DefaultQos + } + return "" +} + +func (x *AddAccountReq) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *AddAccountReq) GetFairShare() string { + if x != nil { + return x.FairShare + } + return "" +} + +func (x *AddAccountReq) GetGrpCpuMins() string { + if x != nil { + return x.GrpCpuMins + } + return "" +} + +func (x *AddAccountReq) GetGrpCpus() string { + if x != nil { + return x.GrpCpus + } + return "" +} + +func (x *AddAccountReq) GetGrpJobs() string { + if x != nil { + return x.GrpJobs + } + return "" +} + +func (x *AddAccountReq) GetGrpMemory() string { + if x != nil { + return x.GrpMemory + } + return "" +} + +func (x *AddAccountReq) GetGrpNodes() string { + if x != nil { + return x.GrpNodes + } + return "" +} + +func (x *AddAccountReq) GetGrpSubmitJobs() string { + if x != nil { + return x.GrpSubmitJobs + } + return "" +} + +func (x *AddAccountReq) GetGrpWall() string { + if x != nil { + return x.GrpWall + } + return "" +} + +func (x *AddAccountReq) GetMaxCpuMins() string { + if x != nil { + return x.MaxCpuMins + } + return "" +} + +func (x *AddAccountReq) GetMaxCpus() string { + if x != nil { + return x.MaxCpus + } + return "" +} + +func (x *AddAccountReq) GetMaxJobs() string { + if x != nil { + return x.MaxJobs + } + return "" +} + +func (x *AddAccountReq) GetMaxNodes() string { + if x != nil { + return x.MaxNodes + } + return "" +} + +func (x *AddAccountReq) GetMaxSubmitJobs() string { + if x != nil { + return x.MaxSubmitJobs + } + return "" +} + +func (x *AddAccountReq) GetMaxWall() string { + if x != nil { + return x.MaxWall + } + return "" +} + +func (x *AddAccountReq) GetNames() string { + if x != nil { + return x.Names + } + return "" +} + +func (x *AddAccountReq) GetOrganization() string { + if x != nil { + return x.Organization + } + return "" +} + +func (x *AddAccountReq) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *AddAccountReq) GetQosLevel() string { + if x != nil { + return x.QosLevel + } + return "" +} + +type AddAccountResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` +} + +func (x *AddAccountResp) Reset() { + *x = AddAccountResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_account_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddAccountResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddAccountResp) ProtoMessage() {} + +func (x *AddAccountResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_account_proto_msgTypes[6] + 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 AddAccountResp.ProtoReflect.Descriptor instead. +func (*AddAccountResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{6} +} + +func (x *AddAccountResp) GetResult() string { + if x != nil { + return x.Result + } + return "" +} + +type DeleteAccountReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` + Names string `protobuf:"bytes,2,opt,name=names,proto3" json:"names,omitempty"` +} + +func (x *DeleteAccountReq) Reset() { + *x = DeleteAccountReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_account_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAccountReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAccountReq) ProtoMessage() {} + +func (x *DeleteAccountReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_account_proto_msgTypes[7] + 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 DeleteAccountReq.ProtoReflect.Descriptor instead. +func (*DeleteAccountReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteAccountReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +func (x *DeleteAccountReq) GetNames() string { + if x != nil { + return x.Names + } + return "" +} + +type DeleteAccountResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` +} + +func (x *DeleteAccountResp) Reset() { + *x = DeleteAccountResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_account_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAccountResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAccountResp) ProtoMessage() {} + +func (x *DeleteAccountResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_account_proto_msgTypes[8] + 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 DeleteAccountResp.ProtoReflect.Descriptor instead. +func (*DeleteAccountResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{8} +} + +func (x *DeleteAccountResp) GetResult() string { + if x != nil { + return x.Result + } + return "" +} + var File_idl_slurmdb_account_proto protoreflect.FileDescriptor var file_idl_slurmdb_account_proto_rawDesc = []byte{ @@ -342,8 +706,64 @@ var file_idl_slurmdb_account_proto_rawDesc = []byte{ 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x22, 0xc5, 0x05, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, + 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x71, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x51, 0x6f, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, + 0x66, 0x61, 0x69, 0x72, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x66, 0x61, 0x69, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x67, + 0x72, 0x70, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x19, 0x0a, + 0x08, 0x67, 0x72, 0x70, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x5f, + 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x70, 0x4a, + 0x6f, 0x62, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, + 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x6f, + 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x70, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x67, 0x72, 0x70, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x6f, + 0x62, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x5f, 0x77, + 0x61, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x70, 0x57, 0x61, + 0x6c, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, + 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, + 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x73, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x12, + 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, + 0x78, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x73, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, + 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x71, 0x6f, 0x73, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x71, 0x6f, 0x73, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x28, 0x0a, 0x0e, 0x41, 0x64, 0x64, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0x62, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, + 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x2b, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -358,29 +778,35 @@ func file_idl_slurmdb_account_proto_rawDescGZIP() []byte { return file_idl_slurmdb_account_proto_rawDescData } -var file_idl_slurmdb_account_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_idl_slurmdb_account_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_idl_slurmdb_account_proto_goTypes = []interface{}{ - (*AccountInfo)(nil), // 0: slurm.AccountInfo - (*ListAccountsReq)(nil), // 1: slurm.ListAccountsReq - (*ListAccountsResp)(nil), // 2: slurm.ListAccountsResp - (*GetAccountReq)(nil), // 3: slurm.GetAccountReq - (*GetAccountResp)(nil), // 4: slurm.GetAccountResp - (*AssociationInfo)(nil), // 5: slurm.AssociationInfo - (*CoordInfo)(nil), // 6: slurm.CoordInfo - (SlurmVersion)(0), // 7: slurm.SlurmVersion + (*AccountInfo)(nil), // 0: slurm.AccountInfo + (*ListAccountsReq)(nil), // 1: slurm.ListAccountsReq + (*ListAccountsResp)(nil), // 2: slurm.ListAccountsResp + (*GetAccountReq)(nil), // 3: slurm.GetAccountReq + (*GetAccountResp)(nil), // 4: slurm.GetAccountResp + (*AddAccountReq)(nil), // 5: slurm.AddAccountReq + (*AddAccountResp)(nil), // 6: slurm.AddAccountResp + (*DeleteAccountReq)(nil), // 7: slurm.DeleteAccountReq + (*DeleteAccountResp)(nil), // 8: slurm.DeleteAccountResp + (*AssociationInfo)(nil), // 9: slurm.AssociationInfo + (*CoordInfo)(nil), // 10: slurm.CoordInfo + (SlurmVersion)(0), // 11: slurm.SlurmVersion } var file_idl_slurmdb_account_proto_depIdxs = []int32{ - 5, // 0: slurm.AccountInfo.assoc_list:type_name -> slurm.AssociationInfo - 6, // 1: slurm.AccountInfo.coordinators:type_name -> slurm.CoordInfo - 7, // 2: slurm.ListAccountsReq.slurm_version:type_name -> slurm.SlurmVersion - 0, // 3: slurm.ListAccountsResp.account_infos:type_name -> slurm.AccountInfo - 7, // 4: slurm.GetAccountReq.slurm_version:type_name -> slurm.SlurmVersion - 0, // 5: slurm.GetAccountResp.account_infos:type_name -> slurm.AccountInfo - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 9, // 0: slurm.AccountInfo.assoc_list:type_name -> slurm.AssociationInfo + 10, // 1: slurm.AccountInfo.coordinators:type_name -> slurm.CoordInfo + 11, // 2: slurm.ListAccountsReq.slurm_version:type_name -> slurm.SlurmVersion + 0, // 3: slurm.ListAccountsResp.account_infos:type_name -> slurm.AccountInfo + 11, // 4: slurm.GetAccountReq.slurm_version:type_name -> slurm.SlurmVersion + 0, // 5: slurm.GetAccountResp.account_infos:type_name -> slurm.AccountInfo + 11, // 6: slurm.AddAccountReq.slurm_version:type_name -> slurm.SlurmVersion + 11, // 7: slurm.DeleteAccountReq.slurm_version:type_name -> slurm.SlurmVersion + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_idl_slurmdb_account_proto_init() } @@ -452,6 +878,54 @@ func file_idl_slurmdb_account_proto_init() { return nil } } + file_idl_slurmdb_account_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddAccountReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_account_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddAccountResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_account_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteAccountReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_account_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteAccountResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -459,7 +933,7 @@ func file_idl_slurmdb_account_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_slurmdb_account_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go index 4fb482da..ea82c466 100644 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go +++ b/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go @@ -380,7 +380,23 @@ type AddUsersReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserInfo *UserInfo `protobuf:"bytes,1,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"` + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` + Accounts string `protobuf:"bytes,2,opt,name=accounts,proto3" json:"accounts,omitempty"` + AdminLevel string `protobuf:"bytes,3,opt,name=admin_level,json=adminLevel,proto3" json:"admin_level,omitempty"` + Clusters string `protobuf:"bytes,4,opt,name=clusters,proto3" json:"clusters,omitempty"` + DefaultAccount string `protobuf:"bytes,5,opt,name=default_account,json=defaultAccount,proto3" json:"default_account,omitempty"` + DefaultQos string `protobuf:"bytes,6,opt,name=default_qos,json=defaultQos,proto3" json:"default_qos,omitempty"` + DefaultWckey string `protobuf:"bytes,7,opt,name=default_wckey,json=defaultWckey,proto3" json:"default_wckey,omitempty"` + FairShare string `protobuf:"bytes,8,opt,name=fair_share,json=fairShare,proto3" json:"fair_share,omitempty"` + MaxCpuMins string `protobuf:"bytes,9,opt,name=max_cpu_mins,json=maxCpuMins,proto3" json:"max_cpu_mins,omitempty"` + MaxCpus string `protobuf:"bytes,10,opt,name=max_cpus,json=maxCpus,proto3" json:"max_cpus,omitempty"` + MaxJobs string `protobuf:"bytes,11,opt,name=max_jobs,json=maxJobs,proto3" json:"max_jobs,omitempty"` + MaxNodes string `protobuf:"bytes,12,opt,name=max_nodes,json=maxNodes,proto3" json:"max_nodes,omitempty"` + MaxSubmitJobs string `protobuf:"bytes,13,opt,name=max_submit_jobs,json=maxSubmitJobs,proto3" json:"max_submit_jobs,omitempty"` + MaxWall string `protobuf:"bytes,14,opt,name=max_wall,json=maxWall,proto3" json:"max_wall,omitempty"` + Names string `protobuf:"bytes,15,opt,name=names,proto3" json:"names,omitempty"` + Partition string `protobuf:"bytes,16,opt,name=partition,proto3" json:"partition,omitempty"` + QosLevel string `protobuf:"bytes,17,opt,name=qos_level,json=qosLevel,proto3" json:"qos_level,omitempty"` } func (x *AddUsersReq) Reset() { @@ -415,11 +431,123 @@ func (*AddUsersReq) Descriptor() ([]byte, []int) { return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{6} } -func (x *AddUsersReq) GetUserInfo() *UserInfo { +func (x *AddUsersReq) GetSlurmVersion() SlurmVersion { if x != nil { - return x.UserInfo + return x.SlurmVersion } - return nil + return SlurmVersion_tianhe +} + +func (x *AddUsersReq) GetAccounts() string { + if x != nil { + return x.Accounts + } + return "" +} + +func (x *AddUsersReq) GetAdminLevel() string { + if x != nil { + return x.AdminLevel + } + return "" +} + +func (x *AddUsersReq) GetClusters() string { + if x != nil { + return x.Clusters + } + return "" +} + +func (x *AddUsersReq) GetDefaultAccount() string { + if x != nil { + return x.DefaultAccount + } + return "" +} + +func (x *AddUsersReq) GetDefaultQos() string { + if x != nil { + return x.DefaultQos + } + return "" +} + +func (x *AddUsersReq) GetDefaultWckey() string { + if x != nil { + return x.DefaultWckey + } + return "" +} + +func (x *AddUsersReq) GetFairShare() string { + if x != nil { + return x.FairShare + } + return "" +} + +func (x *AddUsersReq) GetMaxCpuMins() string { + if x != nil { + return x.MaxCpuMins + } + return "" +} + +func (x *AddUsersReq) GetMaxCpus() string { + if x != nil { + return x.MaxCpus + } + return "" +} + +func (x *AddUsersReq) GetMaxJobs() string { + if x != nil { + return x.MaxJobs + } + return "" +} + +func (x *AddUsersReq) GetMaxNodes() string { + if x != nil { + return x.MaxNodes + } + return "" +} + +func (x *AddUsersReq) GetMaxSubmitJobs() string { + if x != nil { + return x.MaxSubmitJobs + } + return "" +} + +func (x *AddUsersReq) GetMaxWall() string { + if x != nil { + return x.MaxWall + } + return "" +} + +func (x *AddUsersReq) GetNames() string { + if x != nil { + return x.Names + } + return "" +} + +func (x *AddUsersReq) GetPartition() string { + if x != nil { + return x.Partition + } + return "" +} + +func (x *AddUsersReq) GetQosLevel() string { + if x != nil { + return x.QosLevel + } + return "" } type AddUsersResp struct { @@ -427,7 +555,7 @@ type AddUsersResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` + Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` } func (x *AddUsersResp) Reset() { @@ -462,11 +590,113 @@ func (*AddUsersResp) Descriptor() ([]byte, []int) { return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{7} } -func (x *AddUsersResp) GetResult() int32 { +func (x *AddUsersResp) GetResult() string { if x != nil { return x.Result } - return 0 + return "" +} + +type DeleteUsersReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` + Names string `protobuf:"bytes,2,opt,name=names,proto3" json:"names,omitempty"` +} + +func (x *DeleteUsersReq) Reset() { + *x = DeleteUsersReq{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_user_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteUsersReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUsersReq) ProtoMessage() {} + +func (x *DeleteUsersReq) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_user_proto_msgTypes[8] + 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 DeleteUsersReq.ProtoReflect.Descriptor instead. +func (*DeleteUsersReq) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{8} +} + +func (x *DeleteUsersReq) GetSlurmVersion() SlurmVersion { + if x != nil { + return x.SlurmVersion + } + return SlurmVersion_tianhe +} + +func (x *DeleteUsersReq) GetNames() string { + if x != nil { + return x.Names + } + return "" +} + +type DeleteUsersResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` +} + +func (x *DeleteUsersResp) Reset() { + *x = DeleteUsersResp{} + if protoimpl.UnsafeEnabled { + mi := &file_idl_slurmdb_user_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteUsersResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUsersResp) ProtoMessage() {} + +func (x *DeleteUsersResp) ProtoReflect() protoreflect.Message { + mi := &file_idl_slurmdb_user_proto_msgTypes[9] + 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 DeleteUsersResp.ProtoReflect.Descriptor instead. +func (*DeleteUsersResp) Descriptor() ([]byte, []int) { + return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{9} +} + +func (x *DeleteUsersResp) GetResult() string { + if x != nil { + return x.Result + } + return "" } var File_idl_slurmdb_user_proto protoreflect.FileDescriptor @@ -526,14 +756,55 @@ var file_idl_slurmdb_user_proto_rawDesc = []byte{ 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x22, 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x12, 0x2c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x22, 0x26, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x66, 0x6f, 0x22, 0xb7, 0x04, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, + 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x71, 0x6f, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x51, 0x6f, 0x73, + 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x77, 0x63, 0x6b, 0x65, + 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x57, 0x63, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x61, 0x69, 0x72, 0x5f, 0x73, 0x68, + 0x61, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x61, 0x69, 0x72, 0x53, + 0x68, 0x61, 0x72, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x5f, + 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x43, + 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, + 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, + 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, + 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, + 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1b, 0x0a, 0x09, 0x71, 0x6f, 0x73, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x6f, 0x73, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x26, 0x0a, + 0x0c, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x60, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, + 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x29, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -548,7 +819,7 @@ func file_idl_slurmdb_user_proto_rawDescGZIP() []byte { return file_idl_slurmdb_user_proto_rawDescData } -var file_idl_slurmdb_user_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_idl_slurmdb_user_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_idl_slurmdb_user_proto_goTypes = []interface{}{ (*UserInfoList)(nil), // 0: slurm.UserInfoList (*UserInfo)(nil), // 1: slurm.UserInfo @@ -558,26 +829,29 @@ var file_idl_slurmdb_user_proto_goTypes = []interface{}{ (*GetUserResp)(nil), // 5: slurm.GetUserResp (*AddUsersReq)(nil), // 6: slurm.AddUsersReq (*AddUsersResp)(nil), // 7: slurm.AddUsersResp - (*AssociationInfo)(nil), // 8: slurm.AssociationInfo - (*CoordInfo)(nil), // 9: slurm.CoordInfo - (*WckeyInfo)(nil), // 10: slurm.WckeyInfo - (SlurmVersion)(0), // 11: slurm.SlurmVersion + (*DeleteUsersReq)(nil), // 8: slurm.DeleteUsersReq + (*DeleteUsersResp)(nil), // 9: slurm.DeleteUsersResp + (*AssociationInfo)(nil), // 10: slurm.AssociationInfo + (*CoordInfo)(nil), // 11: slurm.CoordInfo + (*WckeyInfo)(nil), // 12: slurm.WckeyInfo + (SlurmVersion)(0), // 13: slurm.SlurmVersion } var file_idl_slurmdb_user_proto_depIdxs = []int32{ 1, // 0: slurm.UserInfoList.userInfos:type_name -> slurm.UserInfo - 8, // 1: slurm.UserInfo.association_list:type_name -> slurm.AssociationInfo - 9, // 2: slurm.UserInfo.coord_list:type_name -> slurm.CoordInfo - 10, // 3: slurm.UserInfo.wckey_list:type_name -> slurm.WckeyInfo - 11, // 4: slurm.ListUsersReq.slurm_version:type_name -> slurm.SlurmVersion + 10, // 1: slurm.UserInfo.association_list:type_name -> slurm.AssociationInfo + 11, // 2: slurm.UserInfo.coord_list:type_name -> slurm.CoordInfo + 12, // 3: slurm.UserInfo.wckey_list:type_name -> slurm.WckeyInfo + 13, // 4: slurm.ListUsersReq.slurm_version:type_name -> slurm.SlurmVersion 1, // 5: slurm.ListUsersResp.user_infos:type_name -> slurm.UserInfo - 11, // 6: slurm.GetUserReq.slurm_version:type_name -> slurm.SlurmVersion + 13, // 6: slurm.GetUserReq.slurm_version:type_name -> slurm.SlurmVersion 1, // 7: slurm.GetUserResp.user_info:type_name -> slurm.UserInfo - 1, // 8: slurm.AddUsersReq.user_info:type_name -> slurm.UserInfo - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 13, // 8: slurm.AddUsersReq.slurm_version:type_name -> slurm.SlurmVersion + 13, // 9: slurm.DeleteUsersReq.slurm_version:type_name -> slurm.SlurmVersion + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_idl_slurmdb_user_proto_init() } @@ -686,6 +960,30 @@ func file_idl_slurmdb_user_proto_init() { return nil } } + file_idl_slurmdb_user_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteUsersReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_idl_slurmdb_user_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteUsersResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -693,7 +991,7 @@ func file_idl_slurmdb_user_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_idl_slurmdb_user_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json index 9c05e389..a311ebd8 100644 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json +++ b/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json @@ -87,6 +87,14 @@ } } }, + "slurmAddAccountResp": { + "type": "object", + "properties": { + "result": { + "type": "string" + } + } + }, "slurmAssocUsageInfo": { "type": "object" }, @@ -229,6 +237,14 @@ } } }, + "slurmDeleteAccountResp": { + "type": "object", + "properties": { + "result": { + "type": "string" + } + } + }, "slurmGetAccountResp": { "type": "object", "properties": { diff --git a/adaptor/pcm_slurm/idl/slurm.proto b/adaptor/pcm_slurm/idl/slurm.proto index 09a7cc8a..bd65f724 100644 --- a/adaptor/pcm_slurm/idl/slurm.proto +++ b/adaptor/pcm_slurm/idl/slurm.proto @@ -31,6 +31,12 @@ service SlurmService { // get specific account info from slurmdb rpc GetAccount(GetAccountReq) returns (GetAccountResp); + // add account + rpc AddAccount(AddAccountReq) returns (AddAccountResp); + + // delete account + rpc DeleteAccount(DeleteAccountReq) returns (DeleteAccountResp); + // list all qos info from slurmdb rpc ListQoss(ListQossReq) returns (ListQossResp); diff --git a/adaptor/pcm_slurm/idl/slurm.yaml b/adaptor/pcm_slurm/idl/slurm.yaml index 3b93af68..2640d460 100644 --- a/adaptor/pcm_slurm/idl/slurm.yaml +++ b/adaptor/pcm_slurm/idl/slurm.yaml @@ -15,6 +15,10 @@ http: get: "/apis/slurm/listAccounts" - selector: slurm.SlurmService.GetAccount get: "/apis/slurm/getAccount" + - selector: slurm.SlurmService.AddAccount + get: "/apis/slurm/addAccount" + - selector: slurm.SlurmService.DeleteAccount + get: "/apis/slurm/deleteAccount" - selector: slurm.SlurmService.ListQoss get: "/apis/slurm/listQoss" - selector: slurm.SlurmService.ListWckeys diff --git a/adaptor/pcm_slurm/idl/slurmdb_account.proto b/adaptor/pcm_slurm/idl/slurmdb_account.proto index 228a4c0b..23313b43 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_account.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_account.proto @@ -30,4 +30,42 @@ message GetAccountReq{ message GetAccountResp { repeated AccountInfo account_infos = 1; +} + +message AddAccountReq{ + SlurmVersion slurm_version = 1; + string clusters =2; + string default_qos=3; + string description=4; + string fair_share=5; + string grp_cpu_mins=6; + string grp_cpus=7; + string grp_jobs=8; + string grp_memory=9; + string grp_nodes=10; + string grp_submit_jobs=11; + string grp_wall=12; + string max_cpu_mins=13; + string max_cpus=14; + string max_jobs=15; + string max_nodes=16; + string max_submit_jobs=17; + string max_wall=18; + string names=19; + string organization=20; + string parent=21; + string qos_level=22; +} + +message AddAccountResp { + string result = 1; +} + +message DeleteAccountReq{ + SlurmVersion slurm_version = 1; + string names=2; +} + +message DeleteAccountResp { + string result = 1; } \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurmdb_user.proto b/adaptor/pcm_slurm/idl/slurmdb_user.proto index d517fee2..813bb260 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_user.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_user.proto @@ -41,8 +41,35 @@ message GetUserResp { } message AddUsersReq{ - UserInfo user_info = 1; + SlurmVersion slurm_version = 1; + string accounts=2; + string admin_level=3; + string clusters=4; + string default_account=5; + string default_qos=6; + string default_wckey=7; + string fair_share=8; + string max_cpu_mins=9; + string max_cpus=10; + string max_jobs=11; + string max_nodes=12; + string max_submit_jobs=13; + string max_wall=14; + string names=15; + string partition=16; + string qos_level=17; } + message AddUsersResp { - int32 result =1; + string result =1; +} + + +message DeleteUsersReq{ + SlurmVersion slurm_version = 1; + string names=2; +} + +message DeleteUsersResp { + string result =1; } \ No newline at end of file diff --git a/adaptor/pcm_slurm/server/slurm.go b/adaptor/pcm_slurm/server/slurm.go index fb06b324..180e86f7 100644 --- a/adaptor/pcm_slurm/server/slurm.go +++ b/adaptor/pcm_slurm/server/slurm.go @@ -72,6 +72,26 @@ func (s *Server) GetAccount(ctx context.Context, req *slurmpb.GetAccountReq) (*s return resp, nil } +// AddAccount return result +func (s *Server) AddAccount(ctx context.Context, req *slurmpb.AddAccountReq) (*slurmpb.AddAccountResp, error) { + resp, err := AddAccount(ctx, req) + if err != nil { + glog.Errorf("Add error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// DeleteAccount return result +func (s *Server) DeleteAccount(ctx context.Context, req *slurmpb.DeleteAccountReq) (*slurmpb.DeleteAccountResp, error) { + resp, err := DeleteAccount(ctx, req) + if err != nil { + glog.Errorf("Delete error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + // ListQoss return all slurm qos func (s *Server) ListQoss(ctx context.Context, req *slurmpb.ListQossReq) (*slurmpb.ListQossResp, error) { resp, err := ListQoss(ctx, req) diff --git a/adaptor/pcm_slurm/server/slurmImpl.go b/adaptor/pcm_slurm/server/slurmImpl.go index 061c2714..046dc5d0 100644 --- a/adaptor/pcm_slurm/server/slurmImpl.go +++ b/adaptor/pcm_slurm/server/slurmImpl.go @@ -60,6 +60,24 @@ func GetAccount(ctx context.Context, req *pbslurm.GetAccountReq) (*pbslurm.GetAc return resp, nil } +func AddAccount(ctx context.Context, req *pbslurm.AddAccountReq) (*pbslurm.AddAccountResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.AddAccount(ctx, req) + return resp, nil +} + +func DeleteAccount(ctx context.Context, req *pbslurm.DeleteAccountReq) (*pbslurm.DeleteAccountResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.DeleteAccount(ctx, req) + return resp, nil +} + func ListQoss(ctx context.Context, req *pbslurm.ListQossReq) (*pbslurm.ListQossResp, error) { slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) if slurm == nil { @@ -68,6 +86,7 @@ func ListQoss(ctx context.Context, req *pbslurm.ListQossReq) (*pbslurm.ListQossR resp, _ := slurm.ListQoss(ctx, req) return resp, nil } + func ListWckeys(ctx context.Context, req *pbslurm.ListWckeysReq) (*pbslurm.ListWckeysResp, error) { slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) if slurm == nil { diff --git a/adaptor/pcm_slurm/service/slurmdb_account.go b/adaptor/pcm_slurm/service/slurmdb_account.go index c2bce49e..4a66ce92 100644 --- a/adaptor/pcm_slurm/service/slurmdb_account.go +++ b/adaptor/pcm_slurm/service/slurmdb_account.go @@ -53,6 +53,7 @@ struct slurmdb_account_rec *account_from_list(struct account_info_msg *list, int import "C" import ( pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" + "code.gitlink.org.cn/JCCE/PCM.git/common/ssh" "context" ) @@ -111,3 +112,93 @@ func (slurmStruct SlurmStruct) GetAccount(ctx context.Context, req *pbslurm.GetA return &resp, nil } + +func (slurmStruct SlurmStruct) AddAccount(ctx context.Context, req *pbslurm.AddAccountReq) (*pbslurm.AddAccountResp, error) { + + cmd := "/usr/local/bin/sacctmgr add account " + + cmd = cmd + req.Names + if len(req.Clusters) != 0 { + cmd = cmd + " Clusters=" + req.Clusters + } + if len(req.DefaultQos) != 0 { + cmd = cmd + " DefaultQOS=" + req.DefaultQos + } + if len(req.Description) != 0 { + cmd = cmd + " Description=\"" + req.Description + "\"" + } + if len(req.FairShare) != 0 { + cmd = cmd + " Fairshare=" + req.FairShare + } + if len(req.GrpCpuMins) != 0 { + cmd = cmd + " GrpCPUMins=" + req.GrpCpuMins + } + if len(req.GrpCpus) != 0 { + cmd = cmd + " GrpCPUs=" + req.GrpCpus + } + if len(req.GrpJobs) != 0 { + cmd = cmd + " GrpJobs=" + req.GrpJobs + } + if len(req.GrpMemory) != 0 { + cmd = cmd + " GrpMemory=" + req.GrpMemory + } + if len(req.GrpNodes) != 0 { + cmd = cmd + " GrpNodes=" + req.GrpNodes + } + if len(req.GrpSubmitJobs) != 0 { + cmd = cmd + " GrpSubmitJob=" + req.GrpSubmitJobs + } + if len(req.GrpWall) != 0 { + cmd = cmd + " GrpWall=" + req.GrpWall + } + if len(req.MaxCpuMins) != 0 { + cmd = cmd + " MaxCPUMins=" + req.MaxCpuMins + } + if len(req.MaxCpus) != 0 { + cmd = cmd + " MaxCPUs=" + req.MaxCpus + } + if len(req.MaxJobs) != 0 { + cmd = cmd + " MaxJobs=" + req.MaxJobs + } + if len(req.MaxNodes) != 0 { + cmd = cmd + " MaxNodes=" + req.MaxNodes + } + if len(req.MaxSubmitJobs) != 0 { + cmd = cmd + " MaxSubmitJobs=" + req.MaxSubmitJobs + } + if len(req.MaxWall) != 0 { + cmd = cmd + " MaxWall=" + req.MaxWall + } + if len(req.Organization) != 0 { + cmd = cmd + " Organization=" + req.Organization + } + if len(req.Parent) != 0 { + cmd = cmd + " Parent=" + req.Parent + } + if len(req.QosLevel) != 0 { + cmd = cmd + " QosLevel=" + req.QosLevel + } + + cmd = cmd + " -i" + + result := ssh.ExecCommand(cmd) + + resp := pbslurm.AddAccountResp{} + resp.Result = result + + return &resp, nil +} + +func (slurmStruct SlurmStruct) DeleteAccount(ctx context.Context, req *pbslurm.DeleteAccountReq) (*pbslurm.DeleteAccountResp, error) { + + cmd := "/usr/local/bin/sacctmgr delete account " + cmd = cmd + req.Names + cmd = cmd + " -i" + + result := ssh.ExecCommand(cmd) + + resp := pbslurm.DeleteAccountResp{} + resp.Result = result + + return &resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurmdb_user.go b/adaptor/pcm_slurm/service/slurmdb_user.go index 596ea628..5ac2bdf8 100644 --- a/adaptor/pcm_slurm/service/slurmdb_user.go +++ b/adaptor/pcm_slurm/service/slurmdb_user.go @@ -57,6 +57,7 @@ struct slurmdb_user_rec *user_from_list(struct user_info_msg *list, int i) { import "C" import ( pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" + ssh "code.gitlink.org.cn/JCCE/PCM.git/common/ssh" "context" ) @@ -117,3 +118,45 @@ func (slurmStruct SlurmStruct) GetUser(ctx context.Context, req *pbslurm.GetUser return &resp, nil } + +func Queue() { + cli := ssh.Cli{ + Addr: "25.8.2.1:22", + User: "nudt_ysz", + Pwd: "nudt_ysz", + } + // 建立连接对象 + cl, _ := cli.Connect() + // 退出时关闭连接 + defer cl.Client.Close() + _, err := cl.Run(`yhqueue`) + if err != nil { + print("error") + return + } +} + +func (slurmStruct SlurmStruct) AddUser(ctx context.Context, req *pbslurm.AddUsersReq) (*pbslurm.AddUsersResp, error) { + + cli := ssh.Cli{ + Addr: "localhost:22", + User: "root", + Pwd: "123123", + } + // 建立连接对象 + cl, _ := cli.Connect() + // 退出时关闭连接 + defer cl.Client.Close() + + cmd := "sacctmgr add user" + + _, err := cl.Run(cmd) + if err != nil { + print("error") + } + + resp := pbslurm.AddUsersResp{} + resp.Result = "" + + return &resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurmer.go b/adaptor/pcm_slurm/service/slurmer.go index cff82ebd..906fa6c1 100644 --- a/adaptor/pcm_slurm/service/slurmer.go +++ b/adaptor/pcm_slurm/service/slurmer.go @@ -12,6 +12,8 @@ type Slurmer interface { GetAssociation(ctx context.Context, req *pbslurm.GetAssociationReq) (resp *pbslurm.GetAssociationResp, err error) //get specific slurm associations ListAccounts(ctx context.Context, req *pbslurm.ListAccountsReq) (resp *pbslurm.ListAccountsResp, err error) //list slurm accounts GetAccount(ctx context.Context, req *pbslurm.GetAccountReq) (resp *pbslurm.GetAccountResp, err error) //get specific slurm account + AddAccount(ctx context.Context, req *pbslurm.AddAccountReq) (resp *pbslurm.AddAccountResp, err error) //add slurm account + DeleteAccount(ctx context.Context, req *pbslurm.DeleteAccountReq) (resp *pbslurm.DeleteAccountResp, err error) //delete slurm account ListQoss(ctx context.Context, req *pbslurm.ListQossReq) (resp *pbslurm.ListQossResp, err error) //list slurm qoss ListWckeys(ctx context.Context, req *pbslurm.ListWckeysReq) (resp *pbslurm.ListWckeysResp, err error) //list slurm wckeys GetWckey(ctx context.Context, req *pbslurm.GetWckeyReq) (resp *pbslurm.GetWckeyResp, err error) //list slurm wckeys diff --git a/common/ssh/ssh_util.go b/common/ssh/ssh_util.go new file mode 100644 index 00000000..98c5dc88 --- /dev/null +++ b/common/ssh/ssh_util.go @@ -0,0 +1,70 @@ +package ssh + +import ( + "fmt" + gossh "golang.org/x/crypto/ssh" + "io" + "log" + "net" + "os/exec" +) + +// Cli 连接信息 +type Cli struct { + User string + Pwd string + Addr string + Client *gossh.Client + Session *gossh.Session + LastResult string +} + +// Connect 连接对象 +func (c *Cli) Connect() (*Cli, error) { + config := &gossh.ClientConfig{} + config.SetDefaults() + config.User = c.User + config.Auth = []gossh.AuthMethod{gossh.Password(c.Pwd)} + config.HostKeyCallback = func(hostname string, remote net.Addr, key gossh.PublicKey) error { return nil } + client, err := gossh.Dial("tcp", c.Addr, config) + if nil != err { + return c, err + } + c.Client = client + return c, nil +} + +// Run 执行shell +func (c Cli) Run(shell string) (string, error) { + if c.Client == nil { + if _, err := c.Connect(); err != nil { + return "", err + } + } + session, err := c.Client.NewSession() + if err != nil { + return "", err + } + // 关闭会话 + defer session.Close() + buf, err := session.CombinedOutput(shell) + + c.LastResult = string(buf) + return c.LastResult, err +} + +func ExecCommand(strCommand string) string { + cmd := exec.Command("/bin/bash", "-c", strCommand) + stdout, _ := cmd.StdoutPipe() + errReader, _ := cmd.StderrPipe() + defer stdout.Close() + if err := cmd.Start(); err != nil { + log.Fatal(err) + } + cmdReader := io.MultiReader(stdout, errReader) + outBytes, _ := io.ReadAll(cmdReader) + if err := cmd.Wait(); err != nil { + fmt.Println("err:", err.Error()) + } + return string(outBytes) +} diff --git a/examples/slurm/submit_example/update_job.go b/examples/slurm/submit_example/update_job.go index 70fe3788..7cbe85e2 100644 --- a/examples/slurm/submit_example/update_job.go +++ b/examples/slurm/submit_example/update_job.go @@ -1,20 +1,22 @@ package main - -import "slurm/submitjob" -import "slurm" +import ( + "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" import "fmt" -func main(){ - if len(os.Args)<4 { + +func main() { + if len(os.Args) < 4 { fmt.Printf("Synthax specify JobID, qos and partition \n") return } var ops submit_job.Update_job_options - id,err := strconv.Atoi(os.Args[1]) - if err != nil { - fmt.Printf("Invalid job id (no int) %s\n", os.Args[1] ) + id, err := strconv.Atoi(os.Args[1]) + if err != nil { + fmt.Printf("Invalid job id (no int) %s\n", os.Args[1]) return } @@ -22,7 +24,7 @@ func main(){ ops.Partition = os.Args[3] err2 := submit_job.Update_job(ops, uint32(id)) - if err2!= uint32(0) { + if err2 != uint32(0) { fmt.Printf("error %s \n", slurm.GetErrorString(err2)) } } From 69ea34a890cb630a18b7d53f93e7323fa6720aff Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Sat, 12 Nov 2022 01:29:51 -0800 Subject: [PATCH 07/11] add/delete user --- adaptor/pcm_slurm/gen/idl/node.pb.go | 323 ----- adaptor/pcm_slurm/gen/idl/slurm.pb.go | 164 --- adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go | 1043 ----------------- adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go | 487 -------- .../pcm_slurm/gen/idl/slurmdb_account.pb.go | 948 --------------- .../gen/idl/slurmdb_accounting.pb.go | 171 --- adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go | 954 --------------- .../pcm_slurm/gen/idl/slurmdb_cluster.pb.go | 280 ----- adaptor/pcm_slurm/gen/idl/slurmdb_coord.pb.go | 156 --- adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go | 603 ---------- adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go | 1006 ---------------- adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go | 482 -------- adaptor/pcm_slurm/gen/idl/static.pb.go | 130 -- .../gen/openapiv2/idl/node.swagger.json | 43 - .../gen/openapiv2/idl/slurm.swagger.json | 552 --------- .../idl/slurmdb_account.swagger.json | 43 - .../idl/slurmdb_accounting.swagger.json | 43 - .../openapiv2/idl/slurmdb_assoc.swagger.json | 43 - .../idl/slurmdb_cluster.swagger.json | 43 - .../openapiv2/idl/slurmdb_coord.swagger.json | 43 - .../openapiv2/idl/slurmdb_qos.swagger.json | 43 - .../openapiv2/idl/slurmdb_user.swagger.json | 43 - .../openapiv2/idl/slurmdb_wckey.swagger.json | 43 - .../gen/openapiv2/idl/static.swagger.json | 43 - adaptor/pcm_slurm/idl/slurm.proto | 6 + adaptor/pcm_slurm/idl/slurm.yaml | 8 +- adaptor/pcm_slurm/idl/slurmdb_user.proto | 10 +- adaptor/pcm_slurm/server/slurm.go | 20 + adaptor/pcm_slurm/server/slurmImpl.go | 18 + adaptor/pcm_slurm/service/slurmdb_user.go | 99 +- adaptor/pcm_slurm/service/slurmer.go | 3 + 31 files changed, 124 insertions(+), 7769 deletions(-) delete mode 100644 adaptor/pcm_slurm/gen/idl/node.pb.go delete mode 100644 adaptor/pcm_slurm/gen/idl/slurm.pb.go delete mode 100644 adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go delete mode 100644 adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go delete mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go delete mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_accounting.pb.go delete mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go delete mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go delete mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_coord.pb.go delete mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go delete mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go delete mode 100644 adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go delete mode 100644 adaptor/pcm_slurm/gen/idl/static.pb.go delete mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/node.swagger.json delete mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json delete mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_account.swagger.json delete mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_accounting.swagger.json delete mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_assoc.swagger.json delete mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_cluster.swagger.json delete mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_coord.swagger.json delete mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_qos.swagger.json delete mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_user.swagger.json delete mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_wckey.swagger.json delete mode 100644 adaptor/pcm_slurm/gen/openapiv2/idl/static.swagger.json diff --git a/adaptor/pcm_slurm/gen/idl/node.pb.go b/adaptor/pcm_slurm/gen/idl/node.pb.go deleted file mode 100644 index 606e9ebd..00000000 --- a/adaptor/pcm_slurm/gen/idl/node.pb.go +++ /dev/null @@ -1,323 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/node.proto - -package slurmpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ListNodesReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` -} - -func (x *ListNodesReq) Reset() { - *x = ListNodesReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_node_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNodesReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNodesReq) ProtoMessage() {} - -func (x *ListNodesReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_node_proto_msgTypes[0] - 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 ListNodesReq.ProtoReflect.Descriptor instead. -func (*ListNodesReq) Descriptor() ([]byte, []int) { - return file_idl_node_proto_rawDescGZIP(), []int{0} -} - -func (x *ListNodesReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -type NodeInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Boards int32 `protobuf:"varint,1,opt,name=boards,proto3" json:"boards,omitempty"` - Cpus int32 `protobuf:"varint,2,opt,name=cpus,proto3" json:"cpus,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - RealMemory int32 `protobuf:"varint,4,opt,name=real_memory,json=realMemory,proto3" json:"real_memory,omitempty"` - Sockets int32 `protobuf:"varint,5,opt,name=sockets,proto3" json:"sockets,omitempty"` - Threads int32 `protobuf:"varint,6,opt,name=threads,proto3" json:"threads,omitempty"` -} - -func (x *NodeInfo) Reset() { - *x = NodeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_node_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeInfo) ProtoMessage() {} - -func (x *NodeInfo) ProtoReflect() protoreflect.Message { - mi := &file_idl_node_proto_msgTypes[1] - 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 NodeInfo.ProtoReflect.Descriptor instead. -func (*NodeInfo) Descriptor() ([]byte, []int) { - return file_idl_node_proto_rawDescGZIP(), []int{1} -} - -func (x *NodeInfo) GetBoards() int32 { - if x != nil { - return x.Boards - } - return 0 -} - -func (x *NodeInfo) GetCpus() int32 { - if x != nil { - return x.Cpus - } - return 0 -} - -func (x *NodeInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *NodeInfo) GetRealMemory() int32 { - if x != nil { - return x.RealMemory - } - return 0 -} - -func (x *NodeInfo) GetSockets() int32 { - if x != nil { - return x.Sockets - } - return 0 -} - -func (x *NodeInfo) GetThreads() int32 { - if x != nil { - return x.Threads - } - return 0 -} - -type ListNodesResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NodeInfos []*NodeInfo `protobuf:"bytes,1,rep,name=node_infos,json=nodeInfos,proto3" json:"node_infos,omitempty"` -} - -func (x *ListNodesResp) Reset() { - *x = ListNodesResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_node_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNodesResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNodesResp) ProtoMessage() {} - -func (x *ListNodesResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_node_proto_msgTypes[2] - 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 ListNodesResp.ProtoReflect.Descriptor instead. -func (*ListNodesResp) Descriptor() ([]byte, []int) { - return file_idl_node_proto_rawDescGZIP(), []int{2} -} - -func (x *ListNodesResp) GetNodeInfos() []*NodeInfo { - if x != nil { - return x.NodeInfos - } - return nil -} - -var File_idl_node_proto protoreflect.FileDescriptor - -var file_idl_node_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x69, 0x64, 0x6c, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x48, 0x0a, 0x0c, 0x4c, 0x69, 0x73, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x9f, 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, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x6c, 0x5f, 0x6d, 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, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_node_proto_rawDescOnce sync.Once - file_idl_node_proto_rawDescData = file_idl_node_proto_rawDesc -) - -func file_idl_node_proto_rawDescGZIP() []byte { - file_idl_node_proto_rawDescOnce.Do(func() { - file_idl_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_node_proto_rawDescData) - }) - return file_idl_node_proto_rawDescData -} - -var file_idl_node_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_idl_node_proto_goTypes = []interface{}{ - (*ListNodesReq)(nil), // 0: slurm.ListNodesReq - (*NodeInfo)(nil), // 1: slurm.NodeInfo - (*ListNodesResp)(nil), // 2: slurm.ListNodesResp - (SlurmVersion)(0), // 3: slurm.SlurmVersion -} -var file_idl_node_proto_depIdxs = []int32{ - 3, // 0: slurm.ListNodesReq.slurm_version:type_name -> slurm.SlurmVersion - 1, // 1: slurm.ListNodesResp.node_infos:type_name -> slurm.NodeInfo - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_idl_node_proto_init() } -func file_idl_node_proto_init() { - if File_idl_node_proto != nil { - return - } - file_idl_static_proto_init() - if !protoimpl.UnsafeEnabled { - file_idl_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodesReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_node_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_node_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNodesResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_node_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_idl_node_proto_goTypes, - DependencyIndexes: file_idl_node_proto_depIdxs, - MessageInfos: file_idl_node_proto_msgTypes, - }.Build() - File_idl_node_proto = out.File - file_idl_node_proto_rawDesc = nil - file_idl_node_proto_goTypes = nil - file_idl_node_proto_depIdxs = nil -} diff --git a/adaptor/pcm_slurm/gen/idl/slurm.pb.go b/adaptor/pcm_slurm/gen/idl/slurm.pb.go deleted file mode 100644 index 6cf1a00e..00000000 --- a/adaptor/pcm_slurm/gen/idl/slurm.pb.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/slurm.proto - -package slurmpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -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, 0x1a, 0x0e, 0x69, 0x64, 0x6c, 0x2f, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x73, - 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, - 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, - 0x62, 0x5f, 0x71, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, - 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xac, 0x05, 0x0a, 0x0c, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x12, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, - 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x11, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x4b, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, - 0x1b, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, - 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, - 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, - 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x39, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x2e, - 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x64, 0x64, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0d, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x2e, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, - 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x12, 0x12, 0x2e, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x13, - 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, - 0x73, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x63, - 0x6b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, - 0x0a, 0x08, 0x47, 0x65, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x2e, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x13, - 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_idl_slurm_proto_goTypes = []interface{}{ - (*ListUsersReq)(nil), // 0: slurm.ListUsersReq - (*GetUserReq)(nil), // 1: slurm.GetUserReq - (*ListAssociationsReq)(nil), // 2: slurm.ListAssociationsReq - (*GetAssociationReq)(nil), // 3: slurm.GetAssociationReq - (*ListAccountsReq)(nil), // 4: slurm.ListAccountsReq - (*GetAccountReq)(nil), // 5: slurm.GetAccountReq - (*AddAccountReq)(nil), // 6: slurm.AddAccountReq - (*DeleteAccountReq)(nil), // 7: slurm.DeleteAccountReq - (*ListQossReq)(nil), // 8: slurm.ListQossReq - (*ListWckeysReq)(nil), // 9: slurm.ListWckeysReq - (*GetWckeyReq)(nil), // 10: slurm.GetWckeyReq - (*ListUsersResp)(nil), // 11: slurm.ListUsersResp - (*GetUserResp)(nil), // 12: slurm.GetUserResp - (*ListAssociationsResp)(nil), // 13: slurm.ListAssociationsResp - (*GetAssociationResp)(nil), // 14: slurm.GetAssociationResp - (*ListAccountsResp)(nil), // 15: slurm.ListAccountsResp - (*GetAccountResp)(nil), // 16: slurm.GetAccountResp - (*AddAccountResp)(nil), // 17: slurm.AddAccountResp - (*DeleteAccountResp)(nil), // 18: slurm.DeleteAccountResp - (*ListQossResp)(nil), // 19: slurm.ListQossResp - (*ListWckeysResp)(nil), // 20: slurm.ListWckeysResp - (*GetWckeyResp)(nil), // 21: slurm.GetWckeyResp -} -var file_idl_slurm_proto_depIdxs = []int32{ - 0, // 0: slurm.SlurmService.ListUsers:input_type -> slurm.ListUsersReq - 1, // 1: slurm.SlurmService.GetUser:input_type -> slurm.GetUserReq - 2, // 2: slurm.SlurmService.ListAssociations:input_type -> slurm.ListAssociationsReq - 3, // 3: slurm.SlurmService.GetAssociation:input_type -> slurm.GetAssociationReq - 4, // 4: slurm.SlurmService.ListAccounts:input_type -> slurm.ListAccountsReq - 5, // 5: slurm.SlurmService.GetAccount:input_type -> slurm.GetAccountReq - 6, // 6: slurm.SlurmService.AddAccount:input_type -> slurm.AddAccountReq - 7, // 7: slurm.SlurmService.DeleteAccount:input_type -> slurm.DeleteAccountReq - 8, // 8: slurm.SlurmService.ListQoss:input_type -> slurm.ListQossReq - 9, // 9: slurm.SlurmService.ListWckeys:input_type -> slurm.ListWckeysReq - 10, // 10: slurm.SlurmService.GetWckey:input_type -> slurm.GetWckeyReq - 11, // 11: slurm.SlurmService.ListUsers:output_type -> slurm.ListUsersResp - 12, // 12: slurm.SlurmService.GetUser:output_type -> slurm.GetUserResp - 13, // 13: slurm.SlurmService.ListAssociations:output_type -> slurm.ListAssociationsResp - 14, // 14: slurm.SlurmService.GetAssociation:output_type -> slurm.GetAssociationResp - 15, // 15: slurm.SlurmService.ListAccounts:output_type -> slurm.ListAccountsResp - 16, // 16: slurm.SlurmService.GetAccount:output_type -> slurm.GetAccountResp - 17, // 17: slurm.SlurmService.AddAccount:output_type -> slurm.AddAccountResp - 18, // 18: slurm.SlurmService.DeleteAccount:output_type -> slurm.DeleteAccountResp - 19, // 19: slurm.SlurmService.ListQoss:output_type -> slurm.ListQossResp - 20, // 20: slurm.SlurmService.ListWckeys:output_type -> slurm.ListWckeysResp - 21, // 21: slurm.SlurmService.GetWckey:output_type -> slurm.GetWckeyResp - 11, // [11:22] is the sub-list for method output_type - 0, // [0:11] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_idl_slurm_proto_init() } -func file_idl_slurm_proto_init() { - if File_idl_slurm_proto != nil { - return - } - file_idl_node_proto_init() - file_idl_slurmdb_user_proto_init() - file_idl_slurmdb_assoc_proto_init() - file_idl_slurmdb_account_proto_init() - file_idl_slurmdb_qos_proto_init() - file_idl_slurmdb_wckey_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_slurm_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_idl_slurm_proto_goTypes, - DependencyIndexes: file_idl_slurm_proto_depIdxs, - }.Build() - File_idl_slurm_proto = out.File - file_idl_slurm_proto_rawDesc = nil - file_idl_slurm_proto_goTypes = nil - file_idl_slurm_proto_depIdxs = nil -} diff --git a/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go b/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go deleted file mode 100644 index 47b79d19..00000000 --- a/adaptor/pcm_slurm/gen/idl/slurm.pb.gw.go +++ /dev/null @@ -1,1043 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: idl/slurm.proto - -/* -Package slurmpb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package slurmpb - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -var ( - filter_SlurmService_ListUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SlurmService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListUsersReq - 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_ListUsers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlurmService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListUsersReq - 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_ListUsers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListUsers(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_SlurmService_GetUser_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SlurmService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserReq - 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_GetUser_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlurmService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserReq - 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_GetUser_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetUser(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_SlurmService_ListAssociations_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SlurmService_ListAssociations_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListAssociationsReq - 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_ListAssociations_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListAssociations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlurmService_ListAssociations_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListAssociationsReq - 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_ListAssociations_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListAssociations(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_SlurmService_GetAssociation_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SlurmService_GetAssociation_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAssociationReq - 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_GetAssociation_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAssociation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlurmService_GetAssociation_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAssociationReq - 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_GetAssociation_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAssociation(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_SlurmService_ListAccounts_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SlurmService_ListAccounts_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListAccountsReq - 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_ListAccounts_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListAccounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlurmService_ListAccounts_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListAccountsReq - 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_ListAccounts_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListAccounts(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_SlurmService_GetAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SlurmService_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccountReq - 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_GetAccount_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlurmService_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccountReq - 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_GetAccount_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAccount(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_SlurmService_AddAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SlurmService_AddAccount_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddAccountReq - 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_AddAccount_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.AddAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlurmService_AddAccount_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddAccountReq - 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_AddAccount_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.AddAccount(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_SlurmService_DeleteAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SlurmService_DeleteAccount_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteAccountReq - 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_DeleteAccount_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DeleteAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlurmService_DeleteAccount_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteAccountReq - 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_DeleteAccount_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DeleteAccount(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_SlurmService_ListQoss_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SlurmService_ListQoss_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListQossReq - 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_ListQoss_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListQoss(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlurmService_ListQoss_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListQossReq - 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_ListQoss_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListQoss(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_SlurmService_ListWckeys_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SlurmService_ListWckeys_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWckeysReq - 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_ListWckeys_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListWckeys(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlurmService_ListWckeys_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWckeysReq - 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_ListWckeys_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListWckeys(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_SlurmService_GetWckey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SlurmService_GetWckey_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWckeyReq - 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_GetWckey_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetWckey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SlurmService_GetWckey_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWckeyReq - 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_GetWckey_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetWckey(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterSlurmServiceHandlerServer registers the http handlers for service SlurmService to "mux". -// UnaryRPC :call SlurmServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSlurmServiceHandlerFromEndpoint instead. -func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SlurmServiceServer) error { - - mux.Handle("GET", pattern_SlurmService_ListUsers_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, "/slurm.SlurmService/ListUsers", runtime.WithHTTPPathPattern("/apis/slurm/listUsers")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlurmService_ListUsers_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_SlurmService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_GetUser_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, "/slurm.SlurmService/GetUser", runtime.WithHTTPPathPattern("/apis/slurm/getUser")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlurmService_GetUser_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_SlurmService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_ListAssociations_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, "/slurm.SlurmService/ListAssociations", runtime.WithHTTPPathPattern("/apis/slurm/listAssociations")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlurmService_ListAssociations_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_SlurmService_ListAssociations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_GetAssociation_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, "/slurm.SlurmService/GetAssociation", runtime.WithHTTPPathPattern("/apis/slurm/getAssociation")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlurmService_GetAssociation_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_SlurmService_GetAssociation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_ListAccounts_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, "/slurm.SlurmService/ListAccounts", runtime.WithHTTPPathPattern("/apis/slurm/listAccounts")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlurmService_ListAccounts_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_SlurmService_ListAccounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_GetAccount_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, "/slurm.SlurmService/GetAccount", runtime.WithHTTPPathPattern("/apis/slurm/getAccount")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlurmService_GetAccount_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_SlurmService_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_AddAccount_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, "/slurm.SlurmService/AddAccount", runtime.WithHTTPPathPattern("/apis/slurm/addAccount")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlurmService_AddAccount_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_SlurmService_AddAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_DeleteAccount_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, "/slurm.SlurmService/DeleteAccount", runtime.WithHTTPPathPattern("/apis/slurm/deleteAccount")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlurmService_DeleteAccount_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_SlurmService_DeleteAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_ListQoss_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, "/slurm.SlurmService/ListQoss", runtime.WithHTTPPathPattern("/apis/slurm/listQoss")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlurmService_ListQoss_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_SlurmService_ListQoss_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_ListWckeys_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, "/slurm.SlurmService/ListWckeys", runtime.WithHTTPPathPattern("/apis/slurm/listWckeys")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlurmService_ListWckeys_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_SlurmService_ListWckeys_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_GetWckey_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, "/slurm.SlurmService/GetWckey", runtime.WithHTTPPathPattern("/apis/slurm/getWckey")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SlurmService_GetWckey_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_SlurmService_GetWckey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterSlurmServiceHandlerFromEndpoint is same as RegisterSlurmServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterSlurmServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterSlurmServiceHandler(ctx, mux, conn) -} - -// RegisterSlurmServiceHandler registers the http handlers for service SlurmService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterSlurmServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterSlurmServiceHandlerClient(ctx, mux, NewSlurmServiceClient(conn)) -} - -// RegisterSlurmServiceHandlerClient registers the http handlers for service SlurmService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SlurmServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SlurmServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "SlurmServiceClient" to call the correct interceptors. -func RegisterSlurmServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SlurmServiceClient) error { - - mux.Handle("GET", pattern_SlurmService_ListUsers_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, "/slurm.SlurmService/ListUsers", runtime.WithHTTPPathPattern("/apis/slurm/listUsers")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlurmService_ListUsers_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlurmService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_GetUser_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, "/slurm.SlurmService/GetUser", runtime.WithHTTPPathPattern("/apis/slurm/getUser")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlurmService_GetUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlurmService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_ListAssociations_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, "/slurm.SlurmService/ListAssociations", runtime.WithHTTPPathPattern("/apis/slurm/listAssociations")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlurmService_ListAssociations_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlurmService_ListAssociations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_GetAssociation_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, "/slurm.SlurmService/GetAssociation", runtime.WithHTTPPathPattern("/apis/slurm/getAssociation")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlurmService_GetAssociation_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlurmService_GetAssociation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_ListAccounts_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, "/slurm.SlurmService/ListAccounts", runtime.WithHTTPPathPattern("/apis/slurm/listAccounts")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlurmService_ListAccounts_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlurmService_ListAccounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_GetAccount_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, "/slurm.SlurmService/GetAccount", runtime.WithHTTPPathPattern("/apis/slurm/getAccount")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlurmService_GetAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlurmService_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_AddAccount_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, "/slurm.SlurmService/AddAccount", runtime.WithHTTPPathPattern("/apis/slurm/addAccount")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlurmService_AddAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlurmService_AddAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_DeleteAccount_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, "/slurm.SlurmService/DeleteAccount", runtime.WithHTTPPathPattern("/apis/slurm/deleteAccount")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlurmService_DeleteAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlurmService_DeleteAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_ListQoss_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, "/slurm.SlurmService/ListQoss", runtime.WithHTTPPathPattern("/apis/slurm/listQoss")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlurmService_ListQoss_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlurmService_ListQoss_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_ListWckeys_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, "/slurm.SlurmService/ListWckeys", runtime.WithHTTPPathPattern("/apis/slurm/listWckeys")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlurmService_ListWckeys_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlurmService_ListWckeys_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SlurmService_GetWckey_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, "/slurm.SlurmService/GetWckey", runtime.WithHTTPPathPattern("/apis/slurm/getWckey")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SlurmService_GetWckey_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SlurmService_GetWckey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_SlurmService_ListUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listUsers"}, "")) - - pattern_SlurmService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "getUser"}, "")) - - pattern_SlurmService_ListAssociations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listAssociations"}, "")) - - pattern_SlurmService_GetAssociation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "getAssociation"}, "")) - - pattern_SlurmService_ListAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listAccounts"}, "")) - - pattern_SlurmService_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "getAccount"}, "")) - - pattern_SlurmService_AddAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "addAccount"}, "")) - - pattern_SlurmService_DeleteAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "deleteAccount"}, "")) - - pattern_SlurmService_ListQoss_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listQoss"}, "")) - - pattern_SlurmService_ListWckeys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "listWckeys"}, "")) - - pattern_SlurmService_GetWckey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "slurm", "getWckey"}, "")) -) - -var ( - forward_SlurmService_ListUsers_0 = runtime.ForwardResponseMessage - - forward_SlurmService_GetUser_0 = runtime.ForwardResponseMessage - - forward_SlurmService_ListAssociations_0 = runtime.ForwardResponseMessage - - forward_SlurmService_GetAssociation_0 = runtime.ForwardResponseMessage - - forward_SlurmService_ListAccounts_0 = runtime.ForwardResponseMessage - - forward_SlurmService_GetAccount_0 = runtime.ForwardResponseMessage - - forward_SlurmService_AddAccount_0 = runtime.ForwardResponseMessage - - forward_SlurmService_DeleteAccount_0 = runtime.ForwardResponseMessage - - forward_SlurmService_ListQoss_0 = runtime.ForwardResponseMessage - - forward_SlurmService_ListWckeys_0 = runtime.ForwardResponseMessage - - forward_SlurmService_GetWckey_0 = runtime.ForwardResponseMessage -) diff --git a/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go b/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go deleted file mode 100644 index 66c9912b..00000000 --- a/adaptor/pcm_slurm/gen/idl/slurm_grpc.pb.go +++ /dev/null @@ -1,487 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: idl/slurm.proto - -package slurmpb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// SlurmServiceClient is the client API for SlurmService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type SlurmServiceClient interface { - // list all users from slurmdb - ListUsers(ctx context.Context, in *ListUsersReq, opts ...grpc.CallOption) (*ListUsersResp, error) - // get specific user info from slurmdb - GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserResp, error) - // list all associations from slurmdb - ListAssociations(ctx context.Context, in *ListAssociationsReq, opts ...grpc.CallOption) (*ListAssociationsResp, error) - // get specific association info from slurmdb - GetAssociation(ctx context.Context, in *GetAssociationReq, opts ...grpc.CallOption) (*GetAssociationResp, error) - // list all accounts info from slurmdb - ListAccounts(ctx context.Context, in *ListAccountsReq, opts ...grpc.CallOption) (*ListAccountsResp, error) - // get specific account info from slurmdb - GetAccount(ctx context.Context, in *GetAccountReq, opts ...grpc.CallOption) (*GetAccountResp, error) - // add account - AddAccount(ctx context.Context, in *AddAccountReq, opts ...grpc.CallOption) (*AddAccountResp, error) - // delete account - DeleteAccount(ctx context.Context, in *DeleteAccountReq, opts ...grpc.CallOption) (*DeleteAccountResp, error) - // list all qos info from slurmdb - ListQoss(ctx context.Context, in *ListQossReq, opts ...grpc.CallOption) (*ListQossResp, error) - // list all wckeys info from slurmdb - ListWckeys(ctx context.Context, in *ListWckeysReq, opts ...grpc.CallOption) (*ListWckeysResp, error) - // get specific wckey info from slurmdb - GetWckey(ctx context.Context, in *GetWckeyReq, opts ...grpc.CallOption) (*GetWckeyResp, error) -} - -type slurmServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewSlurmServiceClient(cc grpc.ClientConnInterface) SlurmServiceClient { - return &slurmServiceClient{cc} -} - -func (c *slurmServiceClient) ListUsers(ctx context.Context, in *ListUsersReq, opts ...grpc.CallOption) (*ListUsersResp, error) { - out := new(ListUsersResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListUsers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *slurmServiceClient) GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserResp, error) { - out := new(GetUserResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/GetUser", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *slurmServiceClient) ListAssociations(ctx context.Context, in *ListAssociationsReq, opts ...grpc.CallOption) (*ListAssociationsResp, error) { - out := new(ListAssociationsResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListAssociations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *slurmServiceClient) GetAssociation(ctx context.Context, in *GetAssociationReq, opts ...grpc.CallOption) (*GetAssociationResp, error) { - out := new(GetAssociationResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/GetAssociation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *slurmServiceClient) ListAccounts(ctx context.Context, in *ListAccountsReq, opts ...grpc.CallOption) (*ListAccountsResp, error) { - out := new(ListAccountsResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListAccounts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *slurmServiceClient) GetAccount(ctx context.Context, in *GetAccountReq, opts ...grpc.CallOption) (*GetAccountResp, error) { - out := new(GetAccountResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/GetAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *slurmServiceClient) AddAccount(ctx context.Context, in *AddAccountReq, opts ...grpc.CallOption) (*AddAccountResp, error) { - out := new(AddAccountResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/AddAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *slurmServiceClient) DeleteAccount(ctx context.Context, in *DeleteAccountReq, opts ...grpc.CallOption) (*DeleteAccountResp, error) { - out := new(DeleteAccountResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/DeleteAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *slurmServiceClient) ListQoss(ctx context.Context, in *ListQossReq, opts ...grpc.CallOption) (*ListQossResp, error) { - out := new(ListQossResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListQoss", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *slurmServiceClient) ListWckeys(ctx context.Context, in *ListWckeysReq, opts ...grpc.CallOption) (*ListWckeysResp, error) { - out := new(ListWckeysResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/ListWckeys", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *slurmServiceClient) GetWckey(ctx context.Context, in *GetWckeyReq, opts ...grpc.CallOption) (*GetWckeyResp, error) { - out := new(GetWckeyResp) - err := c.cc.Invoke(ctx, "/slurm.SlurmService/GetWckey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SlurmServiceServer is the server API for SlurmService service. -// All implementations must embed UnimplementedSlurmServiceServer -// for forward compatibility -type SlurmServiceServer interface { - // list all users from slurmdb - ListUsers(context.Context, *ListUsersReq) (*ListUsersResp, error) - // get specific user info from slurmdb - GetUser(context.Context, *GetUserReq) (*GetUserResp, error) - // list all associations from slurmdb - ListAssociations(context.Context, *ListAssociationsReq) (*ListAssociationsResp, error) - // get specific association info from slurmdb - GetAssociation(context.Context, *GetAssociationReq) (*GetAssociationResp, error) - // list all accounts info from slurmdb - ListAccounts(context.Context, *ListAccountsReq) (*ListAccountsResp, error) - // get specific account info from slurmdb - GetAccount(context.Context, *GetAccountReq) (*GetAccountResp, error) - // add account - AddAccount(context.Context, *AddAccountReq) (*AddAccountResp, error) - // delete account - DeleteAccount(context.Context, *DeleteAccountReq) (*DeleteAccountResp, error) - // list all qos info from slurmdb - ListQoss(context.Context, *ListQossReq) (*ListQossResp, error) - // list all wckeys info from slurmdb - ListWckeys(context.Context, *ListWckeysReq) (*ListWckeysResp, error) - // get specific wckey info from slurmdb - GetWckey(context.Context, *GetWckeyReq) (*GetWckeyResp, error) - mustEmbedUnimplementedSlurmServiceServer() -} - -// UnimplementedSlurmServiceServer must be embedded to have forward compatible implementations. -type UnimplementedSlurmServiceServer struct { -} - -func (UnimplementedSlurmServiceServer) ListUsers(context.Context, *ListUsersReq) (*ListUsersResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented") -} -func (UnimplementedSlurmServiceServer) GetUser(context.Context, *GetUserReq) (*GetUserResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") -} -func (UnimplementedSlurmServiceServer) ListAssociations(context.Context, *ListAssociationsReq) (*ListAssociationsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListAssociations not implemented") -} -func (UnimplementedSlurmServiceServer) GetAssociation(context.Context, *GetAssociationReq) (*GetAssociationResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAssociation not implemented") -} -func (UnimplementedSlurmServiceServer) ListAccounts(context.Context, *ListAccountsReq) (*ListAccountsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListAccounts not implemented") -} -func (UnimplementedSlurmServiceServer) GetAccount(context.Context, *GetAccountReq) (*GetAccountResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") -} -func (UnimplementedSlurmServiceServer) AddAccount(context.Context, *AddAccountReq) (*AddAccountResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddAccount not implemented") -} -func (UnimplementedSlurmServiceServer) DeleteAccount(context.Context, *DeleteAccountReq) (*DeleteAccountResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteAccount not implemented") -} -func (UnimplementedSlurmServiceServer) ListQoss(context.Context, *ListQossReq) (*ListQossResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListQoss not implemented") -} -func (UnimplementedSlurmServiceServer) ListWckeys(context.Context, *ListWckeysReq) (*ListWckeysResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListWckeys not implemented") -} -func (UnimplementedSlurmServiceServer) GetWckey(context.Context, *GetWckeyReq) (*GetWckeyResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWckey not implemented") -} -func (UnimplementedSlurmServiceServer) mustEmbedUnimplementedSlurmServiceServer() {} - -// UnsafeSlurmServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to SlurmServiceServer will -// result in compilation errors. -type UnsafeSlurmServiceServer interface { - mustEmbedUnimplementedSlurmServiceServer() -} - -func RegisterSlurmServiceServer(s grpc.ServiceRegistrar, srv SlurmServiceServer) { - s.RegisterService(&SlurmService_ServiceDesc, srv) -} - -func _SlurmService_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListUsersReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlurmServiceServer).ListUsers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/slurm.SlurmService/ListUsers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlurmServiceServer).ListUsers(ctx, req.(*ListUsersReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _SlurmService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlurmServiceServer).GetUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/slurm.SlurmService/GetUser", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlurmServiceServer).GetUser(ctx, req.(*GetUserReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _SlurmService_ListAssociations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListAssociationsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlurmServiceServer).ListAssociations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/slurm.SlurmService/ListAssociations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlurmServiceServer).ListAssociations(ctx, req.(*ListAssociationsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _SlurmService_GetAssociation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAssociationReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlurmServiceServer).GetAssociation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/slurm.SlurmService/GetAssociation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlurmServiceServer).GetAssociation(ctx, req.(*GetAssociationReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _SlurmService_ListAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListAccountsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlurmServiceServer).ListAccounts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/slurm.SlurmService/ListAccounts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlurmServiceServer).ListAccounts(ctx, req.(*ListAccountsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _SlurmService_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAccountReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlurmServiceServer).GetAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/slurm.SlurmService/GetAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlurmServiceServer).GetAccount(ctx, req.(*GetAccountReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _SlurmService_AddAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddAccountReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlurmServiceServer).AddAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/slurm.SlurmService/AddAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlurmServiceServer).AddAccount(ctx, req.(*AddAccountReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _SlurmService_DeleteAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteAccountReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlurmServiceServer).DeleteAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/slurm.SlurmService/DeleteAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlurmServiceServer).DeleteAccount(ctx, req.(*DeleteAccountReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _SlurmService_ListQoss_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListQossReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlurmServiceServer).ListQoss(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/slurm.SlurmService/ListQoss", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlurmServiceServer).ListQoss(ctx, req.(*ListQossReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _SlurmService_ListWckeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListWckeysReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlurmServiceServer).ListWckeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/slurm.SlurmService/ListWckeys", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlurmServiceServer).ListWckeys(ctx, req.(*ListWckeysReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _SlurmService_GetWckey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetWckeyReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SlurmServiceServer).GetWckey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/slurm.SlurmService/GetWckey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SlurmServiceServer).GetWckey(ctx, req.(*GetWckeyReq)) - } - return interceptor(ctx, in, info, handler) -} - -// SlurmService_ServiceDesc is the grpc.ServiceDesc for SlurmService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var SlurmService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "slurm.SlurmService", - HandlerType: (*SlurmServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListUsers", - Handler: _SlurmService_ListUsers_Handler, - }, - { - MethodName: "GetUser", - Handler: _SlurmService_GetUser_Handler, - }, - { - MethodName: "ListAssociations", - Handler: _SlurmService_ListAssociations_Handler, - }, - { - MethodName: "GetAssociation", - Handler: _SlurmService_GetAssociation_Handler, - }, - { - MethodName: "ListAccounts", - Handler: _SlurmService_ListAccounts_Handler, - }, - { - MethodName: "GetAccount", - Handler: _SlurmService_GetAccount_Handler, - }, - { - MethodName: "AddAccount", - Handler: _SlurmService_AddAccount_Handler, - }, - { - MethodName: "DeleteAccount", - Handler: _SlurmService_DeleteAccount_Handler, - }, - { - MethodName: "ListQoss", - Handler: _SlurmService_ListQoss_Handler, - }, - { - MethodName: "ListWckeys", - Handler: _SlurmService_ListWckeys_Handler, - }, - { - MethodName: "GetWckey", - Handler: _SlurmService_GetWckey_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "idl/slurm.proto", -} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go deleted file mode 100644 index f856392b..00000000 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_account.pb.go +++ /dev/null @@ -1,948 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/slurmdb_account.proto - -package slurmpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type AccountInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AssocList []*AssociationInfo `protobuf:"bytes,1,rep,name=assoc_list,json=assocList,proto3" json:"assoc_list,omitempty"` - Coordinators []*CoordInfo `protobuf:"bytes,2,rep,name=coordinators,proto3" json:"coordinators,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Organization string `protobuf:"bytes,5,opt,name=organization,proto3" json:"organization,omitempty"` -} - -func (x *AccountInfo) Reset() { - *x = AccountInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_account_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccountInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountInfo) ProtoMessage() {} - -func (x *AccountInfo) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_account_proto_msgTypes[0] - 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 AccountInfo.ProtoReflect.Descriptor instead. -func (*AccountInfo) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{0} -} - -func (x *AccountInfo) GetAssocList() []*AssociationInfo { - if x != nil { - return x.AssocList - } - return nil -} - -func (x *AccountInfo) GetCoordinators() []*CoordInfo { - if x != nil { - return x.Coordinators - } - return nil -} - -func (x *AccountInfo) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *AccountInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *AccountInfo) GetOrganization() string { - if x != nil { - return x.Organization - } - return "" -} - -type ListAccountsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` -} - -func (x *ListAccountsReq) Reset() { - *x = ListAccountsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_account_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListAccountsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAccountsReq) ProtoMessage() {} - -func (x *ListAccountsReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_account_proto_msgTypes[1] - 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 ListAccountsReq.ProtoReflect.Descriptor instead. -func (*ListAccountsReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{1} -} - -func (x *ListAccountsReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -type ListAccountsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AccountInfos []*AccountInfo `protobuf:"bytes,1,rep,name=account_infos,json=accountInfos,proto3" json:"account_infos,omitempty"` -} - -func (x *ListAccountsResp) Reset() { - *x = ListAccountsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_account_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListAccountsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAccountsResp) ProtoMessage() {} - -func (x *ListAccountsResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_account_proto_msgTypes[2] - 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 ListAccountsResp.ProtoReflect.Descriptor instead. -func (*ListAccountsResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{2} -} - -func (x *ListAccountsResp) GetAccountInfos() []*AccountInfo { - if x != nil { - return x.AccountInfos - } - return nil -} - -type GetAccountReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` - AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` -} - -func (x *GetAccountReq) Reset() { - *x = GetAccountReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_account_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAccountReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccountReq) ProtoMessage() {} - -func (x *GetAccountReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_account_proto_msgTypes[3] - 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 GetAccountReq.ProtoReflect.Descriptor instead. -func (*GetAccountReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{3} -} - -func (x *GetAccountReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -func (x *GetAccountReq) GetAccountName() string { - if x != nil { - return x.AccountName - } - return "" -} - -type GetAccountResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AccountInfos []*AccountInfo `protobuf:"bytes,1,rep,name=account_infos,json=accountInfos,proto3" json:"account_infos,omitempty"` -} - -func (x *GetAccountResp) Reset() { - *x = GetAccountResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_account_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAccountResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccountResp) ProtoMessage() {} - -func (x *GetAccountResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_account_proto_msgTypes[4] - 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 GetAccountResp.ProtoReflect.Descriptor instead. -func (*GetAccountResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{4} -} - -func (x *GetAccountResp) GetAccountInfos() []*AccountInfo { - if x != nil { - return x.AccountInfos - } - return nil -} - -type AddAccountReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` - Clusters string `protobuf:"bytes,2,opt,name=clusters,proto3" json:"clusters,omitempty"` - DefaultQos string `protobuf:"bytes,3,opt,name=default_qos,json=defaultQos,proto3" json:"default_qos,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - FairShare string `protobuf:"bytes,5,opt,name=fair_share,json=fairShare,proto3" json:"fair_share,omitempty"` - GrpCpuMins string `protobuf:"bytes,6,opt,name=grp_cpu_mins,json=grpCpuMins,proto3" json:"grp_cpu_mins,omitempty"` - GrpCpus string `protobuf:"bytes,7,opt,name=grp_cpus,json=grpCpus,proto3" json:"grp_cpus,omitempty"` - GrpJobs string `protobuf:"bytes,8,opt,name=grp_jobs,json=grpJobs,proto3" json:"grp_jobs,omitempty"` - GrpMemory string `protobuf:"bytes,9,opt,name=grp_memory,json=grpMemory,proto3" json:"grp_memory,omitempty"` - GrpNodes string `protobuf:"bytes,10,opt,name=grp_nodes,json=grpNodes,proto3" json:"grp_nodes,omitempty"` - GrpSubmitJobs string `protobuf:"bytes,11,opt,name=grp_submit_jobs,json=grpSubmitJobs,proto3" json:"grp_submit_jobs,omitempty"` - GrpWall string `protobuf:"bytes,12,opt,name=grp_wall,json=grpWall,proto3" json:"grp_wall,omitempty"` - MaxCpuMins string `protobuf:"bytes,13,opt,name=max_cpu_mins,json=maxCpuMins,proto3" json:"max_cpu_mins,omitempty"` - MaxCpus string `protobuf:"bytes,14,opt,name=max_cpus,json=maxCpus,proto3" json:"max_cpus,omitempty"` - MaxJobs string `protobuf:"bytes,15,opt,name=max_jobs,json=maxJobs,proto3" json:"max_jobs,omitempty"` - MaxNodes string `protobuf:"bytes,16,opt,name=max_nodes,json=maxNodes,proto3" json:"max_nodes,omitempty"` - MaxSubmitJobs string `protobuf:"bytes,17,opt,name=max_submit_jobs,json=maxSubmitJobs,proto3" json:"max_submit_jobs,omitempty"` - MaxWall string `protobuf:"bytes,18,opt,name=max_wall,json=maxWall,proto3" json:"max_wall,omitempty"` - Names string `protobuf:"bytes,19,opt,name=names,proto3" json:"names,omitempty"` - Organization string `protobuf:"bytes,20,opt,name=organization,proto3" json:"organization,omitempty"` - Parent string `protobuf:"bytes,21,opt,name=parent,proto3" json:"parent,omitempty"` - QosLevel string `protobuf:"bytes,22,opt,name=qos_level,json=qosLevel,proto3" json:"qos_level,omitempty"` -} - -func (x *AddAccountReq) Reset() { - *x = AddAccountReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_account_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddAccountReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddAccountReq) ProtoMessage() {} - -func (x *AddAccountReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_account_proto_msgTypes[5] - 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 AddAccountReq.ProtoReflect.Descriptor instead. -func (*AddAccountReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{5} -} - -func (x *AddAccountReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -func (x *AddAccountReq) GetClusters() string { - if x != nil { - return x.Clusters - } - return "" -} - -func (x *AddAccountReq) GetDefaultQos() string { - if x != nil { - return x.DefaultQos - } - return "" -} - -func (x *AddAccountReq) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *AddAccountReq) GetFairShare() string { - if x != nil { - return x.FairShare - } - return "" -} - -func (x *AddAccountReq) GetGrpCpuMins() string { - if x != nil { - return x.GrpCpuMins - } - return "" -} - -func (x *AddAccountReq) GetGrpCpus() string { - if x != nil { - return x.GrpCpus - } - return "" -} - -func (x *AddAccountReq) GetGrpJobs() string { - if x != nil { - return x.GrpJobs - } - return "" -} - -func (x *AddAccountReq) GetGrpMemory() string { - if x != nil { - return x.GrpMemory - } - return "" -} - -func (x *AddAccountReq) GetGrpNodes() string { - if x != nil { - return x.GrpNodes - } - return "" -} - -func (x *AddAccountReq) GetGrpSubmitJobs() string { - if x != nil { - return x.GrpSubmitJobs - } - return "" -} - -func (x *AddAccountReq) GetGrpWall() string { - if x != nil { - return x.GrpWall - } - return "" -} - -func (x *AddAccountReq) GetMaxCpuMins() string { - if x != nil { - return x.MaxCpuMins - } - return "" -} - -func (x *AddAccountReq) GetMaxCpus() string { - if x != nil { - return x.MaxCpus - } - return "" -} - -func (x *AddAccountReq) GetMaxJobs() string { - if x != nil { - return x.MaxJobs - } - return "" -} - -func (x *AddAccountReq) GetMaxNodes() string { - if x != nil { - return x.MaxNodes - } - return "" -} - -func (x *AddAccountReq) GetMaxSubmitJobs() string { - if x != nil { - return x.MaxSubmitJobs - } - return "" -} - -func (x *AddAccountReq) GetMaxWall() string { - if x != nil { - return x.MaxWall - } - return "" -} - -func (x *AddAccountReq) GetNames() string { - if x != nil { - return x.Names - } - return "" -} - -func (x *AddAccountReq) GetOrganization() string { - if x != nil { - return x.Organization - } - return "" -} - -func (x *AddAccountReq) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *AddAccountReq) GetQosLevel() string { - if x != nil { - return x.QosLevel - } - return "" -} - -type AddAccountResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *AddAccountResp) Reset() { - *x = AddAccountResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_account_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddAccountResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddAccountResp) ProtoMessage() {} - -func (x *AddAccountResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_account_proto_msgTypes[6] - 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 AddAccountResp.ProtoReflect.Descriptor instead. -func (*AddAccountResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{6} -} - -func (x *AddAccountResp) GetResult() string { - if x != nil { - return x.Result - } - return "" -} - -type DeleteAccountReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` - Names string `protobuf:"bytes,2,opt,name=names,proto3" json:"names,omitempty"` -} - -func (x *DeleteAccountReq) Reset() { - *x = DeleteAccountReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_account_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteAccountReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteAccountReq) ProtoMessage() {} - -func (x *DeleteAccountReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_account_proto_msgTypes[7] - 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 DeleteAccountReq.ProtoReflect.Descriptor instead. -func (*DeleteAccountReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{7} -} - -func (x *DeleteAccountReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -func (x *DeleteAccountReq) GetNames() string { - if x != nil { - return x.Names - } - return "" -} - -type DeleteAccountResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *DeleteAccountResp) Reset() { - *x = DeleteAccountResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_account_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteAccountResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteAccountResp) ProtoMessage() {} - -func (x *DeleteAccountResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_account_proto_msgTypes[8] - 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 DeleteAccountResp.ProtoReflect.Descriptor instead. -func (*DeleteAccountResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_account_proto_rawDescGZIP(), []int{8} -} - -func (x *DeleteAccountResp) GetResult() string { - if x != nil { - return x.Result - } - return "" -} - -var File_idl_slurmdb_account_proto protoreflect.FileDescriptor - -var file_idl_slurmdb_account_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x64, 0x62, 0x5f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x63, 0x6f, 0x6f, 0x72, - 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x35, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x34, - 0x0a, 0x0c, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x43, 0x6f, 0x6f, - 0x72, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, - 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, - 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x0a, 0x10, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x37, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x6c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x49, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x73, 0x22, 0xc5, 0x05, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, - 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x71, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x51, 0x6f, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, - 0x66, 0x61, 0x69, 0x72, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x66, 0x61, 0x69, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x67, - 0x72, 0x70, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x19, 0x0a, - 0x08, 0x67, 0x72, 0x70, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x5f, - 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x70, 0x4a, - 0x6f, 0x62, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, - 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x6f, - 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x70, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, - 0x26, 0x0a, 0x0f, 0x67, 0x72, 0x70, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x6f, - 0x62, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x5f, 0x77, - 0x61, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x70, 0x57, 0x61, - 0x6c, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, - 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, - 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x73, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, - 0x78, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, - 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x73, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x15, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x71, 0x6f, 0x73, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x71, 0x6f, 0x73, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x28, 0x0a, 0x0e, 0x41, 0x64, 0x64, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x22, 0x62, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, - 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x2b, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_slurmdb_account_proto_rawDescOnce sync.Once - file_idl_slurmdb_account_proto_rawDescData = file_idl_slurmdb_account_proto_rawDesc -) - -func file_idl_slurmdb_account_proto_rawDescGZIP() []byte { - file_idl_slurmdb_account_proto_rawDescOnce.Do(func() { - file_idl_slurmdb_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_account_proto_rawDescData) - }) - return file_idl_slurmdb_account_proto_rawDescData -} - -var file_idl_slurmdb_account_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_idl_slurmdb_account_proto_goTypes = []interface{}{ - (*AccountInfo)(nil), // 0: slurm.AccountInfo - (*ListAccountsReq)(nil), // 1: slurm.ListAccountsReq - (*ListAccountsResp)(nil), // 2: slurm.ListAccountsResp - (*GetAccountReq)(nil), // 3: slurm.GetAccountReq - (*GetAccountResp)(nil), // 4: slurm.GetAccountResp - (*AddAccountReq)(nil), // 5: slurm.AddAccountReq - (*AddAccountResp)(nil), // 6: slurm.AddAccountResp - (*DeleteAccountReq)(nil), // 7: slurm.DeleteAccountReq - (*DeleteAccountResp)(nil), // 8: slurm.DeleteAccountResp - (*AssociationInfo)(nil), // 9: slurm.AssociationInfo - (*CoordInfo)(nil), // 10: slurm.CoordInfo - (SlurmVersion)(0), // 11: slurm.SlurmVersion -} -var file_idl_slurmdb_account_proto_depIdxs = []int32{ - 9, // 0: slurm.AccountInfo.assoc_list:type_name -> slurm.AssociationInfo - 10, // 1: slurm.AccountInfo.coordinators:type_name -> slurm.CoordInfo - 11, // 2: slurm.ListAccountsReq.slurm_version:type_name -> slurm.SlurmVersion - 0, // 3: slurm.ListAccountsResp.account_infos:type_name -> slurm.AccountInfo - 11, // 4: slurm.GetAccountReq.slurm_version:type_name -> slurm.SlurmVersion - 0, // 5: slurm.GetAccountResp.account_infos:type_name -> slurm.AccountInfo - 11, // 6: slurm.AddAccountReq.slurm_version:type_name -> slurm.SlurmVersion - 11, // 7: slurm.DeleteAccountReq.slurm_version:type_name -> slurm.SlurmVersion - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_idl_slurmdb_account_proto_init() } -func file_idl_slurmdb_account_proto_init() { - if File_idl_slurmdb_account_proto != nil { - return - } - file_idl_static_proto_init() - file_idl_slurmdb_assoc_proto_init() - file_idl_slurmdb_coord_proto_init() - if !protoimpl.UnsafeEnabled { - file_idl_slurmdb_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_account_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAccountsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_account_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAccountsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_account_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAccountReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_account_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAccountResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_account_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddAccountReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_account_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddAccountResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_account_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteAccountReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_account_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteAccountResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_slurmdb_account_proto_rawDesc, - NumEnums: 0, - NumMessages: 9, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_idl_slurmdb_account_proto_goTypes, - DependencyIndexes: file_idl_slurmdb_account_proto_depIdxs, - MessageInfos: file_idl_slurmdb_account_proto_msgTypes, - }.Build() - File_idl_slurmdb_account_proto = out.File - file_idl_slurmdb_account_proto_rawDesc = nil - file_idl_slurmdb_account_proto_goTypes = nil - file_idl_slurmdb_account_proto_depIdxs = nil -} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_accounting.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_accounting.pb.go deleted file mode 100644 index dff8eacf..00000000 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_accounting.pb.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/slurmdb_accounting.proto - -package slurmpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type AccountingInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AllocSecs int64 `protobuf:"varint,1,opt,name=alloc_secs,json=allocSecs,proto3" json:"alloc_secs,omitempty"` - Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - PeriodStart *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=period_start,json=periodStart,proto3" json:"period_start,omitempty"` -} - -func (x *AccountingInfo) Reset() { - *x = AccountingInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_accounting_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccountingInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountingInfo) ProtoMessage() {} - -func (x *AccountingInfo) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_accounting_proto_msgTypes[0] - 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 AccountingInfo.ProtoReflect.Descriptor instead. -func (*AccountingInfo) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_accounting_proto_rawDescGZIP(), []int{0} -} - -func (x *AccountingInfo) GetAllocSecs() int64 { - if x != nil { - return x.AllocSecs - } - return 0 -} - -func (x *AccountingInfo) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *AccountingInfo) GetPeriodStart() *timestamppb.Timestamp { - if x != nil { - return x.PeriodStart - } - return nil -} - -var File_idl_slurmdb_accounting_proto protoreflect.FileDescriptor - -var file_idl_slurmdb_accounting_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, - 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7e, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, - 0x6c, 0x6f, 0x63, 0x5f, 0x73, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x53, 0x65, 0x63, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x0c, 0x70, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x70, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_slurmdb_accounting_proto_rawDescOnce sync.Once - file_idl_slurmdb_accounting_proto_rawDescData = file_idl_slurmdb_accounting_proto_rawDesc -) - -func file_idl_slurmdb_accounting_proto_rawDescGZIP() []byte { - file_idl_slurmdb_accounting_proto_rawDescOnce.Do(func() { - file_idl_slurmdb_accounting_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_accounting_proto_rawDescData) - }) - return file_idl_slurmdb_accounting_proto_rawDescData -} - -var file_idl_slurmdb_accounting_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_idl_slurmdb_accounting_proto_goTypes = []interface{}{ - (*AccountingInfo)(nil), // 0: slurm.AccountingInfo - (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp -} -var file_idl_slurmdb_accounting_proto_depIdxs = []int32{ - 1, // 0: slurm.AccountingInfo.period_start:type_name -> google.protobuf.Timestamp - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_idl_slurmdb_accounting_proto_init() } -func file_idl_slurmdb_accounting_proto_init() { - if File_idl_slurmdb_accounting_proto != nil { - return - } - file_idl_static_proto_init() - if !protoimpl.UnsafeEnabled { - file_idl_slurmdb_accounting_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountingInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_slurmdb_accounting_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_idl_slurmdb_accounting_proto_goTypes, - DependencyIndexes: file_idl_slurmdb_accounting_proto_depIdxs, - MessageInfos: file_idl_slurmdb_accounting_proto_msgTypes, - }.Build() - File_idl_slurmdb_accounting_proto = out.File - file_idl_slurmdb_accounting_proto_rawDesc = nil - file_idl_slurmdb_accounting_proto_goTypes = nil - file_idl_slurmdb_accounting_proto_depIdxs = nil -} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go deleted file mode 100644 index 70ab09b5..00000000 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_assoc.pb.go +++ /dev/null @@ -1,954 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/slurmdb_assoc.proto - -package slurmpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type AssocUsageInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AssocUsageInfo) Reset() { - *x = AssocUsageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AssocUsageInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AssocUsageInfo) ProtoMessage() {} - -func (x *AssocUsageInfo) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[0] - 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 AssocUsageInfo.ProtoReflect.Descriptor instead. -func (*AssocUsageInfo) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{0} -} - -type AssociationInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AccountingList []*AccountingInfo `protobuf:"bytes,1,rep,name=accounting_list,json=accountingList,proto3" json:"accounting_list,omitempty"` - Acct string `protobuf:"bytes,2,opt,name=acct,proto3" json:"acct,omitempty"` - Cluster string `protobuf:"bytes,3,opt,name=cluster,proto3" json:"cluster,omitempty"` - DefQosId int32 `protobuf:"varint,4,opt,name=def_qos_id,json=defQosId,proto3" json:"def_qos_id,omitempty"` - GrpCpuMins int64 `protobuf:"varint,5,opt,name=grp_cpu_mins,json=grpCpuMins,proto3" json:"grp_cpu_mins,omitempty"` - GrpGpuRunMins int64 `protobuf:"varint,6,opt,name=grp_gpu_run_mins,json=grpGpuRunMins,proto3" json:"grp_gpu_run_mins,omitempty"` - GrpCpus int32 `protobuf:"varint,7,opt,name=grp_cpus,json=grpCpus,proto3" json:"grp_cpus,omitempty"` - GrpJobs int32 `protobuf:"varint,8,opt,name=grp_jobs,json=grpJobs,proto3" json:"grp_jobs,omitempty"` - GrpMem int32 `protobuf:"varint,9,opt,name=grp_mem,json=grpMem,proto3" json:"grp_mem,omitempty"` - GrpNodes int32 `protobuf:"varint,10,opt,name=grp_nodes,json=grpNodes,proto3" json:"grp_nodes,omitempty"` - GrpSubmitJobs int32 `protobuf:"varint,11,opt,name=grp_submit_jobs,json=grpSubmitJobs,proto3" json:"grp_submit_jobs,omitempty"` - GrpWall int32 `protobuf:"varint,12,opt,name=grp_wall,json=grpWall,proto3" json:"grp_wall,omitempty"` - Id int32 `protobuf:"varint,13,opt,name=id,proto3" json:"id,omitempty"` - IsDef int32 `protobuf:"varint,14,opt,name=is_def,json=isDef,proto3" json:"is_def,omitempty"` - Lft int32 `protobuf:"varint,15,opt,name=lft,proto3" json:"lft,omitempty"` - MaxCpuMinsPj int64 `protobuf:"varint,16,opt,name=max_cpu_mins_pj,json=maxCpuMinsPj,proto3" json:"max_cpu_mins_pj,omitempty"` - MaxCpuRunMins int64 `protobuf:"varint,17,opt,name=max_cpu_run_mins,json=maxCpuRunMins,proto3" json:"max_cpu_run_mins,omitempty"` - MaxCpusPj int32 `protobuf:"varint,18,opt,name=max_cpus_pj,json=maxCpusPj,proto3" json:"max_cpus_pj,omitempty"` - MaxJobs int32 `protobuf:"varint,19,opt,name=max_jobs,json=maxJobs,proto3" json:"max_jobs,omitempty"` - MaxNodesPj int32 `protobuf:"varint,20,opt,name=max_nodes_pj,json=maxNodesPj,proto3" json:"max_nodes_pj,omitempty"` - MaxSubmitJobs int32 `protobuf:"varint,21,opt,name=max_submit_jobs,json=maxSubmitJobs,proto3" json:"max_submit_jobs,omitempty"` - MaxWallPj int32 `protobuf:"varint,22,opt,name=max_wall_pj,json=maxWallPj,proto3" json:"max_wall_pj,omitempty"` - ParentAcct string `protobuf:"bytes,23,opt,name=parent_acct,json=parentAcct,proto3" json:"parent_acct,omitempty"` - ParentId int32 `protobuf:"varint,24,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` - Partition string `protobuf:"bytes,25,opt,name=partition,proto3" json:"partition,omitempty"` - QosList []*QosInfo `protobuf:"bytes,26,rep,name=qos_list,json=qosList,proto3" json:"qos_list,omitempty"` - Rgt int32 `protobuf:"varint,27,opt,name=rgt,proto3" json:"rgt,omitempty"` - SharesRaw int32 `protobuf:"varint,28,opt,name=shares_raw,json=sharesRaw,proto3" json:"shares_raw,omitempty"` - Uid int32 `protobuf:"varint,29,opt,name=uid,proto3" json:"uid,omitempty"` - AssocUsage *AssocUsageInfo `protobuf:"bytes,30,opt,name=assoc_usage,json=assocUsage,proto3" json:"assoc_usage,omitempty"` - User string `protobuf:"bytes,31,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *AssociationInfo) Reset() { - *x = AssociationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AssociationInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AssociationInfo) ProtoMessage() {} - -func (x *AssociationInfo) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[1] - 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 AssociationInfo.ProtoReflect.Descriptor instead. -func (*AssociationInfo) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{1} -} - -func (x *AssociationInfo) GetAccountingList() []*AccountingInfo { - if x != nil { - return x.AccountingList - } - return nil -} - -func (x *AssociationInfo) GetAcct() string { - if x != nil { - return x.Acct - } - return "" -} - -func (x *AssociationInfo) GetCluster() string { - if x != nil { - return x.Cluster - } - return "" -} - -func (x *AssociationInfo) GetDefQosId() int32 { - if x != nil { - return x.DefQosId - } - return 0 -} - -func (x *AssociationInfo) GetGrpCpuMins() int64 { - if x != nil { - return x.GrpCpuMins - } - return 0 -} - -func (x *AssociationInfo) GetGrpGpuRunMins() int64 { - if x != nil { - return x.GrpGpuRunMins - } - return 0 -} - -func (x *AssociationInfo) GetGrpCpus() int32 { - if x != nil { - return x.GrpCpus - } - return 0 -} - -func (x *AssociationInfo) GetGrpJobs() int32 { - if x != nil { - return x.GrpJobs - } - return 0 -} - -func (x *AssociationInfo) GetGrpMem() int32 { - if x != nil { - return x.GrpMem - } - return 0 -} - -func (x *AssociationInfo) GetGrpNodes() int32 { - if x != nil { - return x.GrpNodes - } - return 0 -} - -func (x *AssociationInfo) GetGrpSubmitJobs() int32 { - if x != nil { - return x.GrpSubmitJobs - } - return 0 -} - -func (x *AssociationInfo) GetGrpWall() int32 { - if x != nil { - return x.GrpWall - } - return 0 -} - -func (x *AssociationInfo) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *AssociationInfo) GetIsDef() int32 { - if x != nil { - return x.IsDef - } - return 0 -} - -func (x *AssociationInfo) GetLft() int32 { - if x != nil { - return x.Lft - } - return 0 -} - -func (x *AssociationInfo) GetMaxCpuMinsPj() int64 { - if x != nil { - return x.MaxCpuMinsPj - } - return 0 -} - -func (x *AssociationInfo) GetMaxCpuRunMins() int64 { - if x != nil { - return x.MaxCpuRunMins - } - return 0 -} - -func (x *AssociationInfo) GetMaxCpusPj() int32 { - if x != nil { - return x.MaxCpusPj - } - return 0 -} - -func (x *AssociationInfo) GetMaxJobs() int32 { - if x != nil { - return x.MaxJobs - } - return 0 -} - -func (x *AssociationInfo) GetMaxNodesPj() int32 { - if x != nil { - return x.MaxNodesPj - } - return 0 -} - -func (x *AssociationInfo) GetMaxSubmitJobs() int32 { - if x != nil { - return x.MaxSubmitJobs - } - return 0 -} - -func (x *AssociationInfo) GetMaxWallPj() int32 { - if x != nil { - return x.MaxWallPj - } - return 0 -} - -func (x *AssociationInfo) GetParentAcct() string { - if x != nil { - return x.ParentAcct - } - return "" -} - -func (x *AssociationInfo) GetParentId() int32 { - if x != nil { - return x.ParentId - } - return 0 -} - -func (x *AssociationInfo) GetPartition() string { - if x != nil { - return x.Partition - } - return "" -} - -func (x *AssociationInfo) GetQosList() []*QosInfo { - if x != nil { - return x.QosList - } - return nil -} - -func (x *AssociationInfo) GetRgt() int32 { - if x != nil { - return x.Rgt - } - return 0 -} - -func (x *AssociationInfo) GetSharesRaw() int32 { - if x != nil { - return x.SharesRaw - } - return 0 -} - -func (x *AssociationInfo) GetUid() int32 { - if x != nil { - return x.Uid - } - return 0 -} - -func (x *AssociationInfo) GetAssocUsage() *AssocUsageInfo { - if x != nil { - return x.AssocUsage - } - return nil -} - -func (x *AssociationInfo) GetUser() string { - if x != nil { - return x.User - } - return "" -} - -type ListAssociationsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` -} - -func (x *ListAssociationsReq) Reset() { - *x = ListAssociationsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListAssociationsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAssociationsReq) ProtoMessage() {} - -func (x *ListAssociationsReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[2] - 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 ListAssociationsReq.ProtoReflect.Descriptor instead. -func (*ListAssociationsReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{2} -} - -func (x *ListAssociationsReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -type ListAssociationsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AssocInfos []*AssociationInfo `protobuf:"bytes,1,rep,name=assoc_infos,json=assocInfos,proto3" json:"assoc_infos,omitempty"` -} - -func (x *ListAssociationsResp) Reset() { - *x = ListAssociationsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListAssociationsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAssociationsResp) ProtoMessage() {} - -func (x *ListAssociationsResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[3] - 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 ListAssociationsResp.ProtoReflect.Descriptor instead. -func (*ListAssociationsResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{3} -} - -func (x *ListAssociationsResp) GetAssocInfos() []*AssociationInfo { - if x != nil { - return x.AssocInfos - } - return nil -} - -type GetAssociationReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` - Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` - Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"` - User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"` - Partition string `protobuf:"bytes,5,opt,name=partition,proto3" json:"partition,omitempty"` -} - -func (x *GetAssociationReq) Reset() { - *x = GetAssociationReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAssociationReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAssociationReq) ProtoMessage() {} - -func (x *GetAssociationReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[4] - 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 GetAssociationReq.ProtoReflect.Descriptor instead. -func (*GetAssociationReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{4} -} - -func (x *GetAssociationReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -func (x *GetAssociationReq) GetCluster() string { - if x != nil { - return x.Cluster - } - return "" -} - -func (x *GetAssociationReq) GetAccount() string { - if x != nil { - return x.Account - } - return "" -} - -func (x *GetAssociationReq) GetUser() string { - if x != nil { - return x.User - } - return "" -} - -func (x *GetAssociationReq) GetPartition() string { - if x != nil { - return x.Partition - } - return "" -} - -type GetAssociationResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AssocInfos []*AssociationInfo `protobuf:"bytes,1,rep,name=assoc_infos,json=assocInfos,proto3" json:"assoc_infos,omitempty"` -} - -func (x *GetAssociationResp) Reset() { - *x = GetAssociationResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAssociationResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAssociationResp) ProtoMessage() {} - -func (x *GetAssociationResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[5] - 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 GetAssociationResp.ProtoReflect.Descriptor instead. -func (*GetAssociationResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{5} -} - -func (x *GetAssociationResp) GetAssocInfos() []*AssociationInfo { - if x != nil { - return x.AssocInfos - } - return nil -} - -type SetAssociationReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` - AssocInfo *AssociationInfo `protobuf:"bytes,2,opt,name=assoc_info,json=assocInfo,proto3" json:"assoc_info,omitempty"` -} - -func (x *SetAssociationReq) Reset() { - *x = SetAssociationReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetAssociationReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetAssociationReq) ProtoMessage() {} - -func (x *SetAssociationReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[6] - 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 SetAssociationReq.ProtoReflect.Descriptor instead. -func (*SetAssociationReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{6} -} - -func (x *SetAssociationReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -func (x *SetAssociationReq) GetAssocInfo() *AssociationInfo { - if x != nil { - return x.AssocInfo - } - return nil -} - -type SetAssociationResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *SetAssociationResp) Reset() { - *x = SetAssociationResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetAssociationResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetAssociationResp) ProtoMessage() {} - -func (x *SetAssociationResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_assoc_proto_msgTypes[7] - 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 SetAssociationResp.ProtoReflect.Descriptor instead. -func (*SetAssociationResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_assoc_proto_rawDescGZIP(), []int{7} -} - -func (x *SetAssociationResp) GetResult() bool { - if x != nil { - return x.Result - } - return false -} - -var File_idl_slurmdb_assoc_proto protoreflect.FileDescriptor - -var file_idl_slurmdb_assoc_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x61, 0x73, - 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, - 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x15, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x71, - 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x10, 0x0a, 0x0e, 0x41, 0x73, 0x73, 0x6f, - 0x63, 0x55, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xdb, 0x07, 0x0a, 0x0f, 0x41, - 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3e, - 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x61, 0x63, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x63, - 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x0a, - 0x64, 0x65, 0x66, 0x5f, 0x71, 0x6f, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x64, 0x65, 0x66, 0x51, 0x6f, 0x73, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x67, 0x72, - 0x70, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x10, - 0x67, 0x72, 0x70, 0x5f, 0x67, 0x70, 0x75, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x47, 0x70, 0x75, 0x52, 0x75, - 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x5f, 0x63, 0x70, 0x75, - 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x73, - 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x67, - 0x72, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x72, - 0x70, 0x4d, 0x65, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x70, 0x5f, 0x6e, 0x6f, 0x64, 0x65, - 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x70, 0x4e, 0x6f, 0x64, 0x65, - 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x67, 0x72, 0x70, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, - 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, - 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, - 0x57, 0x61, 0x6c, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x73, 0x44, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x6c, - 0x66, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6c, 0x66, 0x74, 0x12, 0x25, 0x0a, - 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x5f, 0x70, 0x6a, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x4d, 0x69, - 0x6e, 0x73, 0x50, 0x6a, 0x12, 0x27, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x5f, - 0x72, 0x75, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, - 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x1e, 0x0a, - 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x5f, 0x70, 0x6a, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x50, 0x6a, 0x12, 0x19, 0x0a, - 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, - 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x5f, 0x70, 0x6a, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x50, 0x6a, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, - 0x78, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, - 0x62, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x5f, 0x70, - 0x6a, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, - 0x50, 0x6a, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, - 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x41, - 0x63, 0x63, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, - 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x19, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, - 0x0a, 0x08, 0x71, 0x6f, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x51, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x07, 0x71, 0x6f, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x67, 0x74, - 0x18, 0x1b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x67, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, - 0x68, 0x61, 0x72, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x52, 0x61, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0b, - 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x55, - 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x55, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x4f, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, - 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, - 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4f, 0x0a, 0x14, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, - 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, - 0x61, 0x73, 0x73, 0x6f, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x11, 0x47, - 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, - 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x4d, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, - 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, - 0x84, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, - 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x35, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, - 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x61, 0x73, 0x73, - 0x6f, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x2c, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x41, 0x73, 0x73, - 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_slurmdb_assoc_proto_rawDescOnce sync.Once - file_idl_slurmdb_assoc_proto_rawDescData = file_idl_slurmdb_assoc_proto_rawDesc -) - -func file_idl_slurmdb_assoc_proto_rawDescGZIP() []byte { - file_idl_slurmdb_assoc_proto_rawDescOnce.Do(func() { - file_idl_slurmdb_assoc_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_assoc_proto_rawDescData) - }) - return file_idl_slurmdb_assoc_proto_rawDescData -} - -var file_idl_slurmdb_assoc_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_idl_slurmdb_assoc_proto_goTypes = []interface{}{ - (*AssocUsageInfo)(nil), // 0: slurm.AssocUsageInfo - (*AssociationInfo)(nil), // 1: slurm.AssociationInfo - (*ListAssociationsReq)(nil), // 2: slurm.ListAssociationsReq - (*ListAssociationsResp)(nil), // 3: slurm.ListAssociationsResp - (*GetAssociationReq)(nil), // 4: slurm.GetAssociationReq - (*GetAssociationResp)(nil), // 5: slurm.GetAssociationResp - (*SetAssociationReq)(nil), // 6: slurm.SetAssociationReq - (*SetAssociationResp)(nil), // 7: slurm.SetAssociationResp - (*AccountingInfo)(nil), // 8: slurm.AccountingInfo - (*QosInfo)(nil), // 9: slurm.QosInfo - (SlurmVersion)(0), // 10: slurm.SlurmVersion -} -var file_idl_slurmdb_assoc_proto_depIdxs = []int32{ - 8, // 0: slurm.AssociationInfo.accounting_list:type_name -> slurm.AccountingInfo - 9, // 1: slurm.AssociationInfo.qos_list:type_name -> slurm.QosInfo - 0, // 2: slurm.AssociationInfo.assoc_usage:type_name -> slurm.AssocUsageInfo - 10, // 3: slurm.ListAssociationsReq.slurm_version:type_name -> slurm.SlurmVersion - 1, // 4: slurm.ListAssociationsResp.assoc_infos:type_name -> slurm.AssociationInfo - 10, // 5: slurm.GetAssociationReq.slurm_version:type_name -> slurm.SlurmVersion - 1, // 6: slurm.GetAssociationResp.assoc_infos:type_name -> slurm.AssociationInfo - 10, // 7: slurm.SetAssociationReq.slurm_version:type_name -> slurm.SlurmVersion - 1, // 8: slurm.SetAssociationReq.assoc_info:type_name -> slurm.AssociationInfo - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_idl_slurmdb_assoc_proto_init() } -func file_idl_slurmdb_assoc_proto_init() { - if File_idl_slurmdb_assoc_proto != nil { - return - } - file_idl_static_proto_init() - file_idl_slurmdb_accounting_proto_init() - file_idl_slurmdb_qos_proto_init() - if !protoimpl.UnsafeEnabled { - file_idl_slurmdb_assoc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssocUsageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_assoc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssociationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_assoc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAssociationsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_assoc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAssociationsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_assoc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAssociationReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_assoc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAssociationResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_assoc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetAssociationReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_assoc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetAssociationResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_slurmdb_assoc_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_idl_slurmdb_assoc_proto_goTypes, - DependencyIndexes: file_idl_slurmdb_assoc_proto_depIdxs, - MessageInfos: file_idl_slurmdb_assoc_proto_msgTypes, - }.Build() - File_idl_slurmdb_assoc_proto = out.File - file_idl_slurmdb_assoc_proto_rawDesc = nil - file_idl_slurmdb_assoc_proto_goTypes = nil - file_idl_slurmdb_assoc_proto_depIdxs = nil -} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go deleted file mode 100644 index 7e29fcfe..00000000 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_cluster.pb.go +++ /dev/null @@ -1,280 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/slurmdb_cluster.proto - -package slurmpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ClusterInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AccountingList []*AccountingInfo `protobuf:"bytes,1,rep,name=accounting_list,json=accountingList,proto3" json:"accounting_list,omitempty"` - Classification int32 `protobuf:"varint,2,opt,name=classification,proto3" json:"classification,omitempty"` - ControlHost string `protobuf:"bytes,3,opt,name=control_host,json=controlHost,proto3" json:"control_host,omitempty"` - ControlPort int32 `protobuf:"varint,4,opt,name=control_port,json=controlPort,proto3" json:"control_port,omitempty"` - CpuCount int32 `protobuf:"varint,5,opt,name=cpu_count,json=cpuCount,proto3" json:"cpu_count,omitempty"` - Dimensions int32 `protobuf:"varint,6,opt,name=dimensions,proto3" json:"dimensions,omitempty"` - DimSize int32 `protobuf:"varint,7,opt,name=dim_size,json=dimSize,proto3" json:"dim_size,omitempty"` - Flags int32 `protobuf:"varint,8,opt,name=flags,proto3" json:"flags,omitempty"` - Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"` - Nodes string `protobuf:"bytes,10,opt,name=nodes,proto3" json:"nodes,omitempty"` - PluginIdSelect int32 `protobuf:"varint,11,opt,name=plugin_id_select,json=pluginIdSelect,proto3" json:"plugin_id_select,omitempty"` - RootAssoc *AssociationInfo `protobuf:"bytes,12,opt,name=root_assoc,json=rootAssoc,proto3" json:"root_assoc,omitempty"` - RpcVersion int32 `protobuf:"varint,13,opt,name=rpc_version,json=rpcVersion,proto3" json:"rpc_version,omitempty"` -} - -func (x *ClusterInfo) Reset() { - *x = ClusterInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_cluster_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterInfo) ProtoMessage() {} - -func (x *ClusterInfo) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_cluster_proto_msgTypes[0] - 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 ClusterInfo.ProtoReflect.Descriptor instead. -func (*ClusterInfo) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_cluster_proto_rawDescGZIP(), []int{0} -} - -func (x *ClusterInfo) GetAccountingList() []*AccountingInfo { - if x != nil { - return x.AccountingList - } - return nil -} - -func (x *ClusterInfo) GetClassification() int32 { - if x != nil { - return x.Classification - } - return 0 -} - -func (x *ClusterInfo) GetControlHost() string { - if x != nil { - return x.ControlHost - } - return "" -} - -func (x *ClusterInfo) GetControlPort() int32 { - if x != nil { - return x.ControlPort - } - return 0 -} - -func (x *ClusterInfo) GetCpuCount() int32 { - if x != nil { - return x.CpuCount - } - return 0 -} - -func (x *ClusterInfo) GetDimensions() int32 { - if x != nil { - return x.Dimensions - } - return 0 -} - -func (x *ClusterInfo) GetDimSize() int32 { - if x != nil { - return x.DimSize - } - return 0 -} - -func (x *ClusterInfo) GetFlags() int32 { - if x != nil { - return x.Flags - } - return 0 -} - -func (x *ClusterInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ClusterInfo) GetNodes() string { - if x != nil { - return x.Nodes - } - return "" -} - -func (x *ClusterInfo) GetPluginIdSelect() int32 { - if x != nil { - return x.PluginIdSelect - } - return 0 -} - -func (x *ClusterInfo) GetRootAssoc() *AssociationInfo { - if x != nil { - return x.RootAssoc - } - return nil -} - -func (x *ClusterInfo) GetRpcVersion() int32 { - if x != nil { - return x.RpcVersion - } - return 0 -} - -var File_idl_slurmdb_cluster_proto protoreflect.FileDescriptor - -var file_idl_slurmdb_cluster_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x64, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, - 0x5f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x03, 0x0a, - 0x0b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3e, 0x0a, 0x0f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, - 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x70, - 0x75, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, - 0x70, 0x75, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x6d, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x69, 0x6d, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x69, 0x6d, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x64, - 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x5f, - 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x35, 0x0a, 0x0a, - 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x41, 0x73, - 0x73, 0x6f, 0x63, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x70, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x70, 0x63, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_slurmdb_cluster_proto_rawDescOnce sync.Once - file_idl_slurmdb_cluster_proto_rawDescData = file_idl_slurmdb_cluster_proto_rawDesc -) - -func file_idl_slurmdb_cluster_proto_rawDescGZIP() []byte { - file_idl_slurmdb_cluster_proto_rawDescOnce.Do(func() { - file_idl_slurmdb_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_cluster_proto_rawDescData) - }) - return file_idl_slurmdb_cluster_proto_rawDescData -} - -var file_idl_slurmdb_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_idl_slurmdb_cluster_proto_goTypes = []interface{}{ - (*ClusterInfo)(nil), // 0: slurm.ClusterInfo - (*AccountingInfo)(nil), // 1: slurm.AccountingInfo - (*AssociationInfo)(nil), // 2: slurm.AssociationInfo -} -var file_idl_slurmdb_cluster_proto_depIdxs = []int32{ - 1, // 0: slurm.ClusterInfo.accounting_list:type_name -> slurm.AccountingInfo - 2, // 1: slurm.ClusterInfo.root_assoc:type_name -> slurm.AssociationInfo - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_idl_slurmdb_cluster_proto_init() } -func file_idl_slurmdb_cluster_proto_init() { - if File_idl_slurmdb_cluster_proto != nil { - return - } - file_idl_static_proto_init() - file_idl_slurmdb_accounting_proto_init() - file_idl_slurmdb_assoc_proto_init() - if !protoimpl.UnsafeEnabled { - file_idl_slurmdb_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_slurmdb_cluster_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_idl_slurmdb_cluster_proto_goTypes, - DependencyIndexes: file_idl_slurmdb_cluster_proto_depIdxs, - MessageInfos: file_idl_slurmdb_cluster_proto_msgTypes, - }.Build() - File_idl_slurmdb_cluster_proto = out.File - file_idl_slurmdb_cluster_proto_rawDesc = nil - file_idl_slurmdb_cluster_proto_goTypes = nil - file_idl_slurmdb_cluster_proto_depIdxs = nil -} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_coord.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_coord.pb.go deleted file mode 100644 index e964764c..00000000 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_coord.pb.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/slurmdb_coord.proto - -package slurmpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CoordInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Direct int32 `protobuf:"varint,2,opt,name=direct,proto3" json:"direct,omitempty"` -} - -func (x *CoordInfo) Reset() { - *x = CoordInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_coord_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CoordInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CoordInfo) ProtoMessage() {} - -func (x *CoordInfo) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_coord_proto_msgTypes[0] - 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 CoordInfo.ProtoReflect.Descriptor instead. -func (*CoordInfo) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_coord_proto_rawDescGZIP(), []int{0} -} - -func (x *CoordInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CoordInfo) GetDirect() int32 { - if x != nil { - return x.Direct - } - return 0 -} - -var File_idl_slurmdb_coord_proto protoreflect.FileDescriptor - -var file_idl_slurmdb_coord_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x63, 0x6f, - 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x37, 0x0a, 0x09, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x42, 0x0a, 0x5a, 0x08, - 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_slurmdb_coord_proto_rawDescOnce sync.Once - file_idl_slurmdb_coord_proto_rawDescData = file_idl_slurmdb_coord_proto_rawDesc -) - -func file_idl_slurmdb_coord_proto_rawDescGZIP() []byte { - file_idl_slurmdb_coord_proto_rawDescOnce.Do(func() { - file_idl_slurmdb_coord_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_coord_proto_rawDescData) - }) - return file_idl_slurmdb_coord_proto_rawDescData -} - -var file_idl_slurmdb_coord_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_idl_slurmdb_coord_proto_goTypes = []interface{}{ - (*CoordInfo)(nil), // 0: slurm.CoordInfo -} -var file_idl_slurmdb_coord_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_idl_slurmdb_coord_proto_init() } -func file_idl_slurmdb_coord_proto_init() { - if File_idl_slurmdb_coord_proto != nil { - return - } - file_idl_static_proto_init() - if !protoimpl.UnsafeEnabled { - file_idl_slurmdb_coord_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CoordInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_slurmdb_coord_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_idl_slurmdb_coord_proto_goTypes, - DependencyIndexes: file_idl_slurmdb_coord_proto_depIdxs, - MessageInfos: file_idl_slurmdb_coord_proto_msgTypes, - }.Build() - File_idl_slurmdb_coord_proto = out.File - file_idl_slurmdb_coord_proto_rawDesc = nil - file_idl_slurmdb_coord_proto_goTypes = nil - file_idl_slurmdb_coord_proto_depIdxs = nil -} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go deleted file mode 100644 index 6a1f284e..00000000 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_qos.pb.go +++ /dev/null @@ -1,603 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/slurmdb_qos.proto - -package slurmpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type QosUsageInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QosUsageInfo) Reset() { - *x = QosUsageInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_qos_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QosUsageInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QosUsageInfo) ProtoMessage() {} - -func (x *QosUsageInfo) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_qos_proto_msgTypes[0] - 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 QosUsageInfo.ProtoReflect.Descriptor instead. -func (*QosUsageInfo) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_qos_proto_rawDescGZIP(), []int{0} -} - -type QosInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - Flags int32 `protobuf:"varint,3,opt,name=flags,proto3" json:"flags,omitempty"` - GraceTime int32 `protobuf:"varint,4,opt,name=grace_time,json=graceTime,proto3" json:"grace_time,omitempty"` - GrpCpuMins int64 `protobuf:"varint,5,opt,name=grp_cpu_mins,json=grpCpuMins,proto3" json:"grp_cpu_mins,omitempty"` - GrpCpuRunMins int64 `protobuf:"varint,6,opt,name=grp_cpu_run_mins,json=grpCpuRunMins,proto3" json:"grp_cpu_run_mins,omitempty"` - GrpCpus int32 `protobuf:"varint,7,opt,name=grp_cpus,json=grpCpus,proto3" json:"grp_cpus,omitempty"` - GrpJobs int32 `protobuf:"varint,8,opt,name=grp_jobs,json=grpJobs,proto3" json:"grp_jobs,omitempty"` - GrpMem int32 `protobuf:"varint,9,opt,name=grp_mem,json=grpMem,proto3" json:"grp_mem,omitempty"` - GrpNodes int32 `protobuf:"varint,10,opt,name=grp_nodes,json=grpNodes,proto3" json:"grp_nodes,omitempty"` - GrpSubmitJobs int32 `protobuf:"varint,11,opt,name=grp_submit_jobs,json=grpSubmitJobs,proto3" json:"grp_submit_jobs,omitempty"` - GrpWall int32 `protobuf:"varint,12,opt,name=grp_wall,json=grpWall,proto3" json:"grp_wall,omitempty"` - MaxCpuMinsPj int64 `protobuf:"varint,13,opt,name=max_cpu_mins_pj,json=maxCpuMinsPj,proto3" json:"max_cpu_mins_pj,omitempty"` - MaxCpuRunMinsPu int64 `protobuf:"varint,14,opt,name=max_cpu_run_mins_pu,json=maxCpuRunMinsPu,proto3" json:"max_cpu_run_mins_pu,omitempty"` - MaxCpusPj int32 `protobuf:"varint,15,opt,name=max_cpus_pj,json=maxCpusPj,proto3" json:"max_cpus_pj,omitempty"` - MaxCpusPu int32 `protobuf:"varint,16,opt,name=max_cpus_pu,json=maxCpusPu,proto3" json:"max_cpus_pu,omitempty"` - MaxJobsPu int32 `protobuf:"varint,17,opt,name=max_jobs_pu,json=maxJobsPu,proto3" json:"max_jobs_pu,omitempty"` - MaxNodesPj int32 `protobuf:"varint,18,opt,name=max_nodes_pj,json=maxNodesPj,proto3" json:"max_nodes_pj,omitempty"` - MaxSubmitJobsPu int32 `protobuf:"varint,19,opt,name=max_submit_jobs_pu,json=maxSubmitJobsPu,proto3" json:"max_submit_jobs_pu,omitempty"` - MaxWallPj int32 `protobuf:"varint,20,opt,name=max_wall_pj,json=maxWallPj,proto3" json:"max_wall_pj,omitempty"` - Name string `protobuf:"bytes,21,opt,name=name,proto3" json:"name,omitempty"` - PreemptBitstr int32 `protobuf:"varint,22,opt,name=preempt_bitstr,json=preemptBitstr,proto3" json:"preempt_bitstr,omitempty"` - PreemptList []string `protobuf:"bytes,23,rep,name=preempt_list,json=preemptList,proto3" json:"preempt_list,omitempty"` - PreemptMode int32 `protobuf:"varint,24,opt,name=preempt_mode,json=preemptMode,proto3" json:"preempt_mode,omitempty"` - Priority int32 `protobuf:"varint,25,opt,name=priority,proto3" json:"priority,omitempty"` - Usage *QosUsageInfo `protobuf:"bytes,26,opt,name=usage,proto3" json:"usage,omitempty"` - UsageFactor float64 `protobuf:"fixed64,27,opt,name=usageFactor,proto3" json:"usageFactor,omitempty"` - UsageThres float64 `protobuf:"fixed64,28,opt,name=usage_thres,json=usageThres,proto3" json:"usage_thres,omitempty"` -} - -func (x *QosInfo) Reset() { - *x = QosInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_qos_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QosInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QosInfo) ProtoMessage() {} - -func (x *QosInfo) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_qos_proto_msgTypes[1] - 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 QosInfo.ProtoReflect.Descriptor instead. -func (*QosInfo) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_qos_proto_rawDescGZIP(), []int{1} -} - -func (x *QosInfo) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *QosInfo) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *QosInfo) GetFlags() int32 { - if x != nil { - return x.Flags - } - return 0 -} - -func (x *QosInfo) GetGraceTime() int32 { - if x != nil { - return x.GraceTime - } - return 0 -} - -func (x *QosInfo) GetGrpCpuMins() int64 { - if x != nil { - return x.GrpCpuMins - } - return 0 -} - -func (x *QosInfo) GetGrpCpuRunMins() int64 { - if x != nil { - return x.GrpCpuRunMins - } - return 0 -} - -func (x *QosInfo) GetGrpCpus() int32 { - if x != nil { - return x.GrpCpus - } - return 0 -} - -func (x *QosInfo) GetGrpJobs() int32 { - if x != nil { - return x.GrpJobs - } - return 0 -} - -func (x *QosInfo) GetGrpMem() int32 { - if x != nil { - return x.GrpMem - } - return 0 -} - -func (x *QosInfo) GetGrpNodes() int32 { - if x != nil { - return x.GrpNodes - } - return 0 -} - -func (x *QosInfo) GetGrpSubmitJobs() int32 { - if x != nil { - return x.GrpSubmitJobs - } - return 0 -} - -func (x *QosInfo) GetGrpWall() int32 { - if x != nil { - return x.GrpWall - } - return 0 -} - -func (x *QosInfo) GetMaxCpuMinsPj() int64 { - if x != nil { - return x.MaxCpuMinsPj - } - return 0 -} - -func (x *QosInfo) GetMaxCpuRunMinsPu() int64 { - if x != nil { - return x.MaxCpuRunMinsPu - } - return 0 -} - -func (x *QosInfo) GetMaxCpusPj() int32 { - if x != nil { - return x.MaxCpusPj - } - return 0 -} - -func (x *QosInfo) GetMaxCpusPu() int32 { - if x != nil { - return x.MaxCpusPu - } - return 0 -} - -func (x *QosInfo) GetMaxJobsPu() int32 { - if x != nil { - return x.MaxJobsPu - } - return 0 -} - -func (x *QosInfo) GetMaxNodesPj() int32 { - if x != nil { - return x.MaxNodesPj - } - return 0 -} - -func (x *QosInfo) GetMaxSubmitJobsPu() int32 { - if x != nil { - return x.MaxSubmitJobsPu - } - return 0 -} - -func (x *QosInfo) GetMaxWallPj() int32 { - if x != nil { - return x.MaxWallPj - } - return 0 -} - -func (x *QosInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *QosInfo) GetPreemptBitstr() int32 { - if x != nil { - return x.PreemptBitstr - } - return 0 -} - -func (x *QosInfo) GetPreemptList() []string { - if x != nil { - return x.PreemptList - } - return nil -} - -func (x *QosInfo) GetPreemptMode() int32 { - if x != nil { - return x.PreemptMode - } - return 0 -} - -func (x *QosInfo) GetPriority() int32 { - if x != nil { - return x.Priority - } - return 0 -} - -func (x *QosInfo) GetUsage() *QosUsageInfo { - if x != nil { - return x.Usage - } - return nil -} - -func (x *QosInfo) GetUsageFactor() float64 { - if x != nil { - return x.UsageFactor - } - return 0 -} - -func (x *QosInfo) GetUsageThres() float64 { - if x != nil { - return x.UsageThres - } - return 0 -} - -type ListQossReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` -} - -func (x *ListQossReq) Reset() { - *x = ListQossReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_qos_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListQossReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListQossReq) ProtoMessage() {} - -func (x *ListQossReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_qos_proto_msgTypes[2] - 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 ListQossReq.ProtoReflect.Descriptor instead. -func (*ListQossReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_qos_proto_rawDescGZIP(), []int{2} -} - -func (x *ListQossReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -type ListQossResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - QosInfos []*QosInfo `protobuf:"bytes,1,rep,name=qos_infos,json=qosInfos,proto3" json:"qos_infos,omitempty"` -} - -func (x *ListQossResp) Reset() { - *x = ListQossResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_qos_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListQossResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListQossResp) ProtoMessage() {} - -func (x *ListQossResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_qos_proto_msgTypes[3] - 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 ListQossResp.ProtoReflect.Descriptor instead. -func (*ListQossResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_qos_proto_rawDescGZIP(), []int{3} -} - -func (x *ListQossResp) GetQosInfos() []*QosInfo { - if x != nil { - return x.QosInfos - } - return nil -} - -var File_idl_slurmdb_qos_proto protoreflect.FileDescriptor - -var file_idl_slurmdb_qos_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x71, 0x6f, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x0e, 0x0a, 0x0c, 0x51, 0x6f, 0x73, 0x55, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x22, 0x99, 0x07, 0x0a, 0x07, 0x51, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x72, 0x61, 0x63, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x5f, 0x63, 0x70, 0x75, 0x5f, - 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x72, 0x70, 0x43, - 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x10, 0x67, 0x72, 0x70, 0x5f, 0x63, 0x70, - 0x75, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0d, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x43, 0x70, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, - 0x70, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, - 0x70, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x67, 0x72, 0x70, 0x5f, 0x6d, 0x65, 0x6d, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x72, 0x70, 0x4d, 0x65, 0x6d, 0x12, 0x1b, - 0x0a, 0x09, 0x67, 0x72, 0x70, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x08, 0x67, 0x72, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x67, - 0x72, 0x70, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, - 0x6f, 0x62, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x70, 0x57, 0x61, 0x6c, 0x6c, 0x12, 0x25, - 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x5f, 0x70, - 0x6a, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x4d, - 0x69, 0x6e, 0x73, 0x50, 0x6a, 0x12, 0x2c, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, - 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x73, 0x5f, 0x70, 0x75, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x52, 0x75, 0x6e, 0x4d, 0x69, 0x6e, - 0x73, 0x50, 0x75, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x5f, - 0x70, 0x6a, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, - 0x73, 0x50, 0x6a, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x5f, - 0x70, 0x75, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, - 0x73, 0x50, 0x75, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x5f, - 0x70, 0x75, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, - 0x73, 0x50, 0x75, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, - 0x5f, 0x70, 0x6a, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x6f, - 0x64, 0x65, 0x73, 0x50, 0x6a, 0x12, 0x2b, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x5f, 0x70, 0x75, 0x18, 0x13, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, 0x73, - 0x50, 0x75, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x5f, 0x70, - 0x6a, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, - 0x50, 0x6a, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, - 0x74, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x74, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, - 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x42, 0x69, 0x74, 0x73, 0x74, 0x72, 0x12, 0x21, 0x0a, - 0x0c, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x17, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, - 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x4d, - 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x19, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, - 0x29, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x51, 0x6f, 0x73, 0x55, 0x73, 0x61, 0x67, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x73, - 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x0b, 0x75, 0x73, 0x61, 0x67, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, - 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x22, 0x47, 0x0a, - 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, - 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, - 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x6f, - 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x09, 0x71, 0x6f, 0x73, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x6c, 0x75, 0x72, - 0x6d, 0x2e, 0x51, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x71, 0x6f, 0x73, 0x49, 0x6e, - 0x66, 0x6f, 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_slurmdb_qos_proto_rawDescOnce sync.Once - file_idl_slurmdb_qos_proto_rawDescData = file_idl_slurmdb_qos_proto_rawDesc -) - -func file_idl_slurmdb_qos_proto_rawDescGZIP() []byte { - file_idl_slurmdb_qos_proto_rawDescOnce.Do(func() { - file_idl_slurmdb_qos_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_qos_proto_rawDescData) - }) - return file_idl_slurmdb_qos_proto_rawDescData -} - -var file_idl_slurmdb_qos_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_idl_slurmdb_qos_proto_goTypes = []interface{}{ - (*QosUsageInfo)(nil), // 0: slurm.QosUsageInfo - (*QosInfo)(nil), // 1: slurm.QosInfo - (*ListQossReq)(nil), // 2: slurm.ListQossReq - (*ListQossResp)(nil), // 3: slurm.ListQossResp - (SlurmVersion)(0), // 4: slurm.SlurmVersion -} -var file_idl_slurmdb_qos_proto_depIdxs = []int32{ - 0, // 0: slurm.QosInfo.usage:type_name -> slurm.QosUsageInfo - 4, // 1: slurm.ListQossReq.slurm_version:type_name -> slurm.SlurmVersion - 1, // 2: slurm.ListQossResp.qos_infos:type_name -> slurm.QosInfo - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_idl_slurmdb_qos_proto_init() } -func file_idl_slurmdb_qos_proto_init() { - if File_idl_slurmdb_qos_proto != nil { - return - } - file_idl_static_proto_init() - if !protoimpl.UnsafeEnabled { - file_idl_slurmdb_qos_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QosUsageInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_qos_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QosInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_qos_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListQossReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_qos_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListQossResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_slurmdb_qos_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_idl_slurmdb_qos_proto_goTypes, - DependencyIndexes: file_idl_slurmdb_qos_proto_depIdxs, - MessageInfos: file_idl_slurmdb_qos_proto_msgTypes, - }.Build() - File_idl_slurmdb_qos_proto = out.File - file_idl_slurmdb_qos_proto_rawDesc = nil - file_idl_slurmdb_qos_proto_goTypes = nil - file_idl_slurmdb_qos_proto_depIdxs = nil -} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go deleted file mode 100644 index ea82c466..00000000 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_user.pb.go +++ /dev/null @@ -1,1006 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/slurmdb_user.proto - -package slurmpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type UserInfoList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserInfos []*UserInfo `protobuf:"bytes,1,rep,name=userInfos,proto3" json:"userInfos,omitempty"` -} - -func (x *UserInfoList) Reset() { - *x = UserInfoList{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_user_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserInfoList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserInfoList) ProtoMessage() {} - -func (x *UserInfoList) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_user_proto_msgTypes[0] - 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 UserInfoList.ProtoReflect.Descriptor instead. -func (*UserInfoList) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{0} -} - -func (x *UserInfoList) GetUserInfos() []*UserInfo { - if x != nil { - return x.UserInfos - } - return nil -} - -type UserInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AdminLevel int32 `protobuf:"varint,1,opt,name=adminLevel,proto3" json:"adminLevel,omitempty"` - AssociationList []*AssociationInfo `protobuf:"bytes,2,rep,name=association_list,json=associationList,proto3" json:"association_list,omitempty"` - CoordList []*CoordInfo `protobuf:"bytes,3,rep,name=coord_list,json=coordList,proto3" json:"coord_list,omitempty"` - DefaultAcct string `protobuf:"bytes,4,opt,name=default_acct,json=defaultAcct,proto3" json:"default_acct,omitempty"` - DefaultWckey string `protobuf:"bytes,5,opt,name=default_wckey,json=defaultWckey,proto3" json:"default_wckey,omitempty"` - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - OldName string `protobuf:"bytes,7,opt,name=oldName,proto3" json:"oldName,omitempty"` - Uid int32 `protobuf:"varint,8,opt,name=uid,proto3" json:"uid,omitempty"` - WckeyList []*WckeyInfo `protobuf:"bytes,9,rep,name=wckey_list,json=wckeyList,proto3" json:"wckey_list,omitempty"` -} - -func (x *UserInfo) Reset() { - *x = UserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_user_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserInfo) ProtoMessage() {} - -func (x *UserInfo) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_user_proto_msgTypes[1] - 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 UserInfo.ProtoReflect.Descriptor instead. -func (*UserInfo) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{1} -} - -func (x *UserInfo) GetAdminLevel() int32 { - if x != nil { - return x.AdminLevel - } - return 0 -} - -func (x *UserInfo) GetAssociationList() []*AssociationInfo { - if x != nil { - return x.AssociationList - } - return nil -} - -func (x *UserInfo) GetCoordList() []*CoordInfo { - if x != nil { - return x.CoordList - } - return nil -} - -func (x *UserInfo) GetDefaultAcct() string { - if x != nil { - return x.DefaultAcct - } - return "" -} - -func (x *UserInfo) GetDefaultWckey() string { - if x != nil { - return x.DefaultWckey - } - return "" -} - -func (x *UserInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *UserInfo) GetOldName() string { - if x != nil { - return x.OldName - } - return "" -} - -func (x *UserInfo) GetUid() int32 { - if x != nil { - return x.Uid - } - return 0 -} - -func (x *UserInfo) GetWckeyList() []*WckeyInfo { - if x != nil { - return x.WckeyList - } - return nil -} - -type ListUsersReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` -} - -func (x *ListUsersReq) Reset() { - *x = ListUsersReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_user_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListUsersReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListUsersReq) ProtoMessage() {} - -func (x *ListUsersReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_user_proto_msgTypes[2] - 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 ListUsersReq.ProtoReflect.Descriptor instead. -func (*ListUsersReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{2} -} - -func (x *ListUsersReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -type ListUsersResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserInfos []*UserInfo `protobuf:"bytes,1,rep,name=user_infos,json=userInfos,proto3" json:"user_infos,omitempty"` -} - -func (x *ListUsersResp) Reset() { - *x = ListUsersResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_user_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListUsersResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListUsersResp) ProtoMessage() {} - -func (x *ListUsersResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_user_proto_msgTypes[3] - 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 ListUsersResp.ProtoReflect.Descriptor instead. -func (*ListUsersResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{3} -} - -func (x *ListUsersResp) GetUserInfos() []*UserInfo { - if x != nil { - return x.UserInfos - } - return nil -} - -type GetUserReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` - UserName string `protobuf:"bytes,2,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` -} - -func (x *GetUserReq) Reset() { - *x = GetUserReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_user_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUserReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserReq) ProtoMessage() {} - -func (x *GetUserReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_user_proto_msgTypes[4] - 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 GetUserReq.ProtoReflect.Descriptor instead. -func (*GetUserReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{4} -} - -func (x *GetUserReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -func (x *GetUserReq) GetUserName() string { - if x != nil { - return x.UserName - } - return "" -} - -type GetUserResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserInfo []*UserInfo `protobuf:"bytes,1,rep,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"` -} - -func (x *GetUserResp) Reset() { - *x = GetUserResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_user_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUserResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserResp) ProtoMessage() {} - -func (x *GetUserResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_user_proto_msgTypes[5] - 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 GetUserResp.ProtoReflect.Descriptor instead. -func (*GetUserResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{5} -} - -func (x *GetUserResp) GetUserInfo() []*UserInfo { - if x != nil { - return x.UserInfo - } - return nil -} - -type AddUsersReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` - Accounts string `protobuf:"bytes,2,opt,name=accounts,proto3" json:"accounts,omitempty"` - AdminLevel string `protobuf:"bytes,3,opt,name=admin_level,json=adminLevel,proto3" json:"admin_level,omitempty"` - Clusters string `protobuf:"bytes,4,opt,name=clusters,proto3" json:"clusters,omitempty"` - DefaultAccount string `protobuf:"bytes,5,opt,name=default_account,json=defaultAccount,proto3" json:"default_account,omitempty"` - DefaultQos string `protobuf:"bytes,6,opt,name=default_qos,json=defaultQos,proto3" json:"default_qos,omitempty"` - DefaultWckey string `protobuf:"bytes,7,opt,name=default_wckey,json=defaultWckey,proto3" json:"default_wckey,omitempty"` - FairShare string `protobuf:"bytes,8,opt,name=fair_share,json=fairShare,proto3" json:"fair_share,omitempty"` - MaxCpuMins string `protobuf:"bytes,9,opt,name=max_cpu_mins,json=maxCpuMins,proto3" json:"max_cpu_mins,omitempty"` - MaxCpus string `protobuf:"bytes,10,opt,name=max_cpus,json=maxCpus,proto3" json:"max_cpus,omitempty"` - MaxJobs string `protobuf:"bytes,11,opt,name=max_jobs,json=maxJobs,proto3" json:"max_jobs,omitempty"` - MaxNodes string `protobuf:"bytes,12,opt,name=max_nodes,json=maxNodes,proto3" json:"max_nodes,omitempty"` - MaxSubmitJobs string `protobuf:"bytes,13,opt,name=max_submit_jobs,json=maxSubmitJobs,proto3" json:"max_submit_jobs,omitempty"` - MaxWall string `protobuf:"bytes,14,opt,name=max_wall,json=maxWall,proto3" json:"max_wall,omitempty"` - Names string `protobuf:"bytes,15,opt,name=names,proto3" json:"names,omitempty"` - Partition string `protobuf:"bytes,16,opt,name=partition,proto3" json:"partition,omitempty"` - QosLevel string `protobuf:"bytes,17,opt,name=qos_level,json=qosLevel,proto3" json:"qos_level,omitempty"` -} - -func (x *AddUsersReq) Reset() { - *x = AddUsersReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_user_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddUsersReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddUsersReq) ProtoMessage() {} - -func (x *AddUsersReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_user_proto_msgTypes[6] - 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 AddUsersReq.ProtoReflect.Descriptor instead. -func (*AddUsersReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{6} -} - -func (x *AddUsersReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -func (x *AddUsersReq) GetAccounts() string { - if x != nil { - return x.Accounts - } - return "" -} - -func (x *AddUsersReq) GetAdminLevel() string { - if x != nil { - return x.AdminLevel - } - return "" -} - -func (x *AddUsersReq) GetClusters() string { - if x != nil { - return x.Clusters - } - return "" -} - -func (x *AddUsersReq) GetDefaultAccount() string { - if x != nil { - return x.DefaultAccount - } - return "" -} - -func (x *AddUsersReq) GetDefaultQos() string { - if x != nil { - return x.DefaultQos - } - return "" -} - -func (x *AddUsersReq) GetDefaultWckey() string { - if x != nil { - return x.DefaultWckey - } - return "" -} - -func (x *AddUsersReq) GetFairShare() string { - if x != nil { - return x.FairShare - } - return "" -} - -func (x *AddUsersReq) GetMaxCpuMins() string { - if x != nil { - return x.MaxCpuMins - } - return "" -} - -func (x *AddUsersReq) GetMaxCpus() string { - if x != nil { - return x.MaxCpus - } - return "" -} - -func (x *AddUsersReq) GetMaxJobs() string { - if x != nil { - return x.MaxJobs - } - return "" -} - -func (x *AddUsersReq) GetMaxNodes() string { - if x != nil { - return x.MaxNodes - } - return "" -} - -func (x *AddUsersReq) GetMaxSubmitJobs() string { - if x != nil { - return x.MaxSubmitJobs - } - return "" -} - -func (x *AddUsersReq) GetMaxWall() string { - if x != nil { - return x.MaxWall - } - return "" -} - -func (x *AddUsersReq) GetNames() string { - if x != nil { - return x.Names - } - return "" -} - -func (x *AddUsersReq) GetPartition() string { - if x != nil { - return x.Partition - } - return "" -} - -func (x *AddUsersReq) GetQosLevel() string { - if x != nil { - return x.QosLevel - } - return "" -} - -type AddUsersResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *AddUsersResp) Reset() { - *x = AddUsersResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_user_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddUsersResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddUsersResp) ProtoMessage() {} - -func (x *AddUsersResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_user_proto_msgTypes[7] - 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 AddUsersResp.ProtoReflect.Descriptor instead. -func (*AddUsersResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{7} -} - -func (x *AddUsersResp) GetResult() string { - if x != nil { - return x.Result - } - return "" -} - -type DeleteUsersReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` - Names string `protobuf:"bytes,2,opt,name=names,proto3" json:"names,omitempty"` -} - -func (x *DeleteUsersReq) Reset() { - *x = DeleteUsersReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_user_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteUsersReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteUsersReq) ProtoMessage() {} - -func (x *DeleteUsersReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_user_proto_msgTypes[8] - 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 DeleteUsersReq.ProtoReflect.Descriptor instead. -func (*DeleteUsersReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{8} -} - -func (x *DeleteUsersReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -func (x *DeleteUsersReq) GetNames() string { - if x != nil { - return x.Names - } - return "" -} - -type DeleteUsersResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` -} - -func (x *DeleteUsersResp) Reset() { - *x = DeleteUsersResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_user_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteUsersResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteUsersResp) ProtoMessage() {} - -func (x *DeleteUsersResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_user_proto_msgTypes[9] - 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 DeleteUsersResp.ProtoReflect.Descriptor instead. -func (*DeleteUsersResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_user_proto_rawDescGZIP(), []int{9} -} - -func (x *DeleteUsersResp) GetResult() string { - if x != nil { - return x.Result - } - return "" -} - -var File_idl_slurmdb_user_proto protoreflect.FileDescriptor - -var file_idl_slurmdb_user_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x1a, - 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, - 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, - 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, - 0x62, 0x5f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a, - 0x0c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2d, 0x0a, - 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0xd7, 0x02, 0x0a, - 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x41, 0x0a, 0x10, 0x61, 0x73, 0x73, - 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x41, 0x73, 0x73, 0x6f, - 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x61, 0x73, 0x73, - 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0a, - 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x09, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x21, 0x0a, - 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x63, 0x74, - 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x77, 0x63, 0x6b, 0x65, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x57, 0x63, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x6c, 0x64, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x5f, 0x6c, - 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x6c, 0x75, 0x72, - 0x6d, 0x2e, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x77, 0x63, 0x6b, - 0x65, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, - 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x22, 0x3f, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x2e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x73, 0x22, 0x63, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, - 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, - 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x22, 0xb7, 0x04, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, - 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x71, 0x6f, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x51, 0x6f, 0x73, - 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x77, 0x63, 0x6b, 0x65, - 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x57, 0x63, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x61, 0x69, 0x72, 0x5f, 0x73, 0x68, - 0x61, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x61, 0x69, 0x72, 0x53, - 0x68, 0x61, 0x72, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x5f, - 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x43, - 0x70, 0x75, 0x4d, 0x69, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, - 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, - 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x1b, 0x0a, 0x09, - 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, - 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4a, 0x6f, 0x62, - 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x57, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1b, 0x0a, 0x09, 0x71, 0x6f, 0x73, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x71, 0x6f, 0x73, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x26, 0x0a, - 0x0c, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x60, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, - 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x29, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_slurmdb_user_proto_rawDescOnce sync.Once - file_idl_slurmdb_user_proto_rawDescData = file_idl_slurmdb_user_proto_rawDesc -) - -func file_idl_slurmdb_user_proto_rawDescGZIP() []byte { - file_idl_slurmdb_user_proto_rawDescOnce.Do(func() { - file_idl_slurmdb_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_user_proto_rawDescData) - }) - return file_idl_slurmdb_user_proto_rawDescData -} - -var file_idl_slurmdb_user_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_idl_slurmdb_user_proto_goTypes = []interface{}{ - (*UserInfoList)(nil), // 0: slurm.UserInfoList - (*UserInfo)(nil), // 1: slurm.UserInfo - (*ListUsersReq)(nil), // 2: slurm.ListUsersReq - (*ListUsersResp)(nil), // 3: slurm.ListUsersResp - (*GetUserReq)(nil), // 4: slurm.GetUserReq - (*GetUserResp)(nil), // 5: slurm.GetUserResp - (*AddUsersReq)(nil), // 6: slurm.AddUsersReq - (*AddUsersResp)(nil), // 7: slurm.AddUsersResp - (*DeleteUsersReq)(nil), // 8: slurm.DeleteUsersReq - (*DeleteUsersResp)(nil), // 9: slurm.DeleteUsersResp - (*AssociationInfo)(nil), // 10: slurm.AssociationInfo - (*CoordInfo)(nil), // 11: slurm.CoordInfo - (*WckeyInfo)(nil), // 12: slurm.WckeyInfo - (SlurmVersion)(0), // 13: slurm.SlurmVersion -} -var file_idl_slurmdb_user_proto_depIdxs = []int32{ - 1, // 0: slurm.UserInfoList.userInfos:type_name -> slurm.UserInfo - 10, // 1: slurm.UserInfo.association_list:type_name -> slurm.AssociationInfo - 11, // 2: slurm.UserInfo.coord_list:type_name -> slurm.CoordInfo - 12, // 3: slurm.UserInfo.wckey_list:type_name -> slurm.WckeyInfo - 13, // 4: slurm.ListUsersReq.slurm_version:type_name -> slurm.SlurmVersion - 1, // 5: slurm.ListUsersResp.user_infos:type_name -> slurm.UserInfo - 13, // 6: slurm.GetUserReq.slurm_version:type_name -> slurm.SlurmVersion - 1, // 7: slurm.GetUserResp.user_info:type_name -> slurm.UserInfo - 13, // 8: slurm.AddUsersReq.slurm_version:type_name -> slurm.SlurmVersion - 13, // 9: slurm.DeleteUsersReq.slurm_version:type_name -> slurm.SlurmVersion - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_idl_slurmdb_user_proto_init() } -func file_idl_slurmdb_user_proto_init() { - if File_idl_slurmdb_user_proto != nil { - return - } - file_idl_static_proto_init() - file_idl_slurmdb_coord_proto_init() - file_idl_slurmdb_wckey_proto_init() - file_idl_slurmdb_assoc_proto_init() - if !protoimpl.UnsafeEnabled { - file_idl_slurmdb_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserInfoList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListUsersReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListUsersResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddUsersReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddUsersResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_user_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteUsersReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_user_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteUsersResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_slurmdb_user_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_idl_slurmdb_user_proto_goTypes, - DependencyIndexes: file_idl_slurmdb_user_proto_depIdxs, - MessageInfos: file_idl_slurmdb_user_proto_msgTypes, - }.Build() - File_idl_slurmdb_user_proto = out.File - file_idl_slurmdb_user_proto_rawDesc = nil - file_idl_slurmdb_user_proto_goTypes = nil - file_idl_slurmdb_user_proto_depIdxs = nil -} diff --git a/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go b/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go deleted file mode 100644 index d69f1f3d..00000000 --- a/adaptor/pcm_slurm/gen/idl/slurmdb_wckey.pb.go +++ /dev/null @@ -1,482 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/slurmdb_wckey.proto - -package slurmpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type WckeyInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AccountingList []*AccountingInfo `protobuf:"bytes,1,rep,name=accounting_list,json=accountingList,proto3" json:"accounting_list,omitempty"` - Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` - Id int32 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` - IsDef int32 `protobuf:"varint,4,opt,name=is_def,json=isDef,proto3" json:"is_def,omitempty"` - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - Uid int32 `protobuf:"varint,6,opt,name=uid,proto3" json:"uid,omitempty"` - User string `protobuf:"bytes,7,opt,name=user,proto3" json:"user,omitempty"` -} - -func (x *WckeyInfo) Reset() { - *x = WckeyInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_wckey_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WckeyInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WckeyInfo) ProtoMessage() {} - -func (x *WckeyInfo) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_wckey_proto_msgTypes[0] - 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 WckeyInfo.ProtoReflect.Descriptor instead. -func (*WckeyInfo) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_wckey_proto_rawDescGZIP(), []int{0} -} - -func (x *WckeyInfo) GetAccountingList() []*AccountingInfo { - if x != nil { - return x.AccountingList - } - return nil -} - -func (x *WckeyInfo) GetCluster() string { - if x != nil { - return x.Cluster - } - return "" -} - -func (x *WckeyInfo) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *WckeyInfo) GetIsDef() int32 { - if x != nil { - return x.IsDef - } - return 0 -} - -func (x *WckeyInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *WckeyInfo) GetUid() int32 { - if x != nil { - return x.Uid - } - return 0 -} - -func (x *WckeyInfo) GetUser() string { - if x != nil { - return x.User - } - return "" -} - -type ListWckeysReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` -} - -func (x *ListWckeysReq) Reset() { - *x = ListWckeysReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_wckey_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWckeysReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWckeysReq) ProtoMessage() {} - -func (x *ListWckeysReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_wckey_proto_msgTypes[1] - 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 ListWckeysReq.ProtoReflect.Descriptor instead. -func (*ListWckeysReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_wckey_proto_rawDescGZIP(), []int{1} -} - -func (x *ListWckeysReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -type ListWckeysResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WckeyInfos []*WckeyInfo `protobuf:"bytes,1,rep,name=wckey_infos,json=wckeyInfos,proto3" json:"wckey_infos,omitempty"` -} - -func (x *ListWckeysResp) Reset() { - *x = ListWckeysResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_wckey_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWckeysResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWckeysResp) ProtoMessage() {} - -func (x *ListWckeysResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_wckey_proto_msgTypes[2] - 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 ListWckeysResp.ProtoReflect.Descriptor instead. -func (*ListWckeysResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_wckey_proto_rawDescGZIP(), []int{2} -} - -func (x *ListWckeysResp) GetWckeyInfos() []*WckeyInfo { - if x != nil { - return x.WckeyInfos - } - return nil -} - -type GetWckeyReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SlurmVersion SlurmVersion `protobuf:"varint,1,opt,name=slurm_version,json=slurmVersion,proto3,enum=slurm.SlurmVersion" json:"slurm_version,omitempty"` - Wckey string `protobuf:"bytes,2,opt,name=wckey,proto3" json:"wckey,omitempty"` -} - -func (x *GetWckeyReq) Reset() { - *x = GetWckeyReq{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_wckey_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWckeyReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWckeyReq) ProtoMessage() {} - -func (x *GetWckeyReq) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_wckey_proto_msgTypes[3] - 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 GetWckeyReq.ProtoReflect.Descriptor instead. -func (*GetWckeyReq) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_wckey_proto_rawDescGZIP(), []int{3} -} - -func (x *GetWckeyReq) GetSlurmVersion() SlurmVersion { - if x != nil { - return x.SlurmVersion - } - return SlurmVersion_tianhe -} - -func (x *GetWckeyReq) GetWckey() string { - if x != nil { - return x.Wckey - } - return "" -} - -type GetWckeyResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WckeyInfo []*WckeyInfo `protobuf:"bytes,1,rep,name=wckey_info,json=wckeyInfo,proto3" json:"wckey_info,omitempty"` -} - -func (x *GetWckeyResp) Reset() { - *x = GetWckeyResp{} - if protoimpl.UnsafeEnabled { - mi := &file_idl_slurmdb_wckey_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWckeyResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWckeyResp) ProtoMessage() {} - -func (x *GetWckeyResp) ProtoReflect() protoreflect.Message { - mi := &file_idl_slurmdb_wckey_proto_msgTypes[4] - 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 GetWckeyResp.ProtoReflect.Descriptor instead. -func (*GetWckeyResp) Descriptor() ([]byte, []int) { - return file_idl_slurmdb_wckey_proto_rawDescGZIP(), []int{4} -} - -func (x *GetWckeyResp) GetWckeyInfo() []*WckeyInfo { - if x != nil { - return x.WckeyInfo - } - return nil -} - -var File_idl_slurmdb_wckey_proto protoreflect.FileDescriptor - -var file_idl_slurmdb_wckey_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, 0x5f, 0x77, 0x63, - 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x64, 0x62, - 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xc6, 0x01, 0x0a, 0x09, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x3e, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, - 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, - 0x64, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x73, 0x44, 0x65, 0x66, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x49, 0x0a, 0x0d, 0x4c, 0x69, - 0x73, 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, - 0x6c, 0x75, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x63, 0x6b, - 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x0b, 0x77, 0x63, 0x6b, 0x65, 0x79, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, - 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, - 0x77, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x5d, 0x0a, 0x0b, 0x47, 0x65, - 0x74, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x13, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x22, 0x3f, 0x0a, 0x0c, 0x47, 0x65, 0x74, - 0x57, 0x63, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x0a, 0x77, 0x63, 0x6b, - 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x57, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x09, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, - 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_slurmdb_wckey_proto_rawDescOnce sync.Once - file_idl_slurmdb_wckey_proto_rawDescData = file_idl_slurmdb_wckey_proto_rawDesc -) - -func file_idl_slurmdb_wckey_proto_rawDescGZIP() []byte { - file_idl_slurmdb_wckey_proto_rawDescOnce.Do(func() { - file_idl_slurmdb_wckey_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurmdb_wckey_proto_rawDescData) - }) - return file_idl_slurmdb_wckey_proto_rawDescData -} - -var file_idl_slurmdb_wckey_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_idl_slurmdb_wckey_proto_goTypes = []interface{}{ - (*WckeyInfo)(nil), // 0: slurm.WckeyInfo - (*ListWckeysReq)(nil), // 1: slurm.ListWckeysReq - (*ListWckeysResp)(nil), // 2: slurm.ListWckeysResp - (*GetWckeyReq)(nil), // 3: slurm.GetWckeyReq - (*GetWckeyResp)(nil), // 4: slurm.GetWckeyResp - (*AccountingInfo)(nil), // 5: slurm.AccountingInfo - (SlurmVersion)(0), // 6: slurm.SlurmVersion -} -var file_idl_slurmdb_wckey_proto_depIdxs = []int32{ - 5, // 0: slurm.WckeyInfo.accounting_list:type_name -> slurm.AccountingInfo - 6, // 1: slurm.ListWckeysReq.slurm_version:type_name -> slurm.SlurmVersion - 0, // 2: slurm.ListWckeysResp.wckey_infos:type_name -> slurm.WckeyInfo - 6, // 3: slurm.GetWckeyReq.slurm_version:type_name -> slurm.SlurmVersion - 0, // 4: slurm.GetWckeyResp.wckey_info:type_name -> slurm.WckeyInfo - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_idl_slurmdb_wckey_proto_init() } -func file_idl_slurmdb_wckey_proto_init() { - if File_idl_slurmdb_wckey_proto != nil { - return - } - file_idl_static_proto_init() - file_idl_slurmdb_accounting_proto_init() - if !protoimpl.UnsafeEnabled { - file_idl_slurmdb_wckey_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WckeyInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_wckey_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWckeysReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_wckey_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWckeysResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_wckey_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWckeyReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_idl_slurmdb_wckey_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWckeyResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_slurmdb_wckey_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_idl_slurmdb_wckey_proto_goTypes, - DependencyIndexes: file_idl_slurmdb_wckey_proto_depIdxs, - MessageInfos: file_idl_slurmdb_wckey_proto_msgTypes, - }.Build() - File_idl_slurmdb_wckey_proto = out.File - file_idl_slurmdb_wckey_proto_rawDesc = nil - file_idl_slurmdb_wckey_proto_goTypes = nil - file_idl_slurmdb_wckey_proto_depIdxs = nil -} diff --git a/adaptor/pcm_slurm/gen/idl/static.pb.go b/adaptor/pcm_slurm/gen/idl/static.pb.go deleted file mode 100644 index 0f2440d8..00000000 --- a/adaptor/pcm_slurm/gen/idl/static.pb.go +++ /dev/null @@ -1,130 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc (unknown) -// source: idl/static.proto - -package slurmpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// slurm version -type SlurmVersion int32 - -const ( - // 0 - tianhe hpc - SlurmVersion_tianhe SlurmVersion = 0 - // 1 - shenwei hpc - SlurmVersion_shenwei SlurmVersion = 1 -) - -// Enum value maps for SlurmVersion. -var ( - SlurmVersion_name = map[int32]string{ - 0: "tianhe", - 1: "shenwei", - } - SlurmVersion_value = map[string]int32{ - "tianhe": 0, - "shenwei": 1, - } -) - -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_static_proto_enumTypes[0].Descriptor() -} - -func (SlurmVersion) Type() protoreflect.EnumType { - return &file_idl_static_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_static_proto_rawDescGZIP(), []int{0} -} - -var File_idl_static_proto protoreflect.FileDescriptor - -var file_idl_static_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2a, 0x27, 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, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x68, 0x65, 0x6e, 0x77, 0x65, 0x69, - 0x10, 0x01, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_idl_static_proto_rawDescOnce sync.Once - file_idl_static_proto_rawDescData = file_idl_static_proto_rawDesc -) - -func file_idl_static_proto_rawDescGZIP() []byte { - file_idl_static_proto_rawDescOnce.Do(func() { - file_idl_static_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_static_proto_rawDescData) - }) - return file_idl_static_proto_rawDescData -} - -var file_idl_static_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_idl_static_proto_goTypes = []interface{}{ - (SlurmVersion)(0), // 0: slurm.SlurmVersion -} -var file_idl_static_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_idl_static_proto_init() } -func file_idl_static_proto_init() { - if File_idl_static_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_idl_static_proto_rawDesc, - NumEnums: 1, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_idl_static_proto_goTypes, - DependencyIndexes: file_idl_static_proto_depIdxs, - EnumInfos: file_idl_static_proto_enumTypes, - }.Build() - File_idl_static_proto = out.File - file_idl_static_proto_rawDesc = nil - file_idl_static_proto_goTypes = nil - file_idl_static_proto_depIdxs = nil -} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/node.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/node.swagger.json deleted file mode 100644 index cbb0c94f..00000000 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/node.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/node.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json deleted file mode 100644 index a311ebd8..00000000 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurm.swagger.json +++ /dev/null @@ -1,552 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/slurm.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "SlurmService" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "slurmAccountInfo": { - "type": "object", - "properties": { - "assocList": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmAssociationInfo" - } - }, - "coordinators": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmCoordInfo" - } - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "organization": { - "type": "string" - } - } - }, - "slurmAccountingInfo": { - "type": "object", - "properties": { - "allocSecs": { - "type": "string", - "format": "int64" - }, - "id": { - "type": "integer", - "format": "int32" - }, - "periodStart": { - "type": "string", - "format": "date-time" - } - } - }, - "slurmAddAccountResp": { - "type": "object", - "properties": { - "result": { - "type": "string" - } - } - }, - "slurmAssocUsageInfo": { - "type": "object" - }, - "slurmAssociationInfo": { - "type": "object", - "properties": { - "accountingList": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmAccountingInfo" - } - }, - "acct": { - "type": "string" - }, - "cluster": { - "type": "string" - }, - "defQosId": { - "type": "integer", - "format": "int32" - }, - "grpCpuMins": { - "type": "string", - "format": "int64" - }, - "grpGpuRunMins": { - "type": "string", - "format": "int64" - }, - "grpCpus": { - "type": "integer", - "format": "int32" - }, - "grpJobs": { - "type": "integer", - "format": "int32" - }, - "grpMem": { - "type": "integer", - "format": "int32" - }, - "grpNodes": { - "type": "integer", - "format": "int32" - }, - "grpSubmitJobs": { - "type": "integer", - "format": "int32" - }, - "grpWall": { - "type": "integer", - "format": "int32" - }, - "id": { - "type": "integer", - "format": "int32" - }, - "isDef": { - "type": "integer", - "format": "int32" - }, - "lft": { - "type": "integer", - "format": "int32" - }, - "maxCpuMinsPj": { - "type": "string", - "format": "int64" - }, - "maxCpuRunMins": { - "type": "string", - "format": "int64" - }, - "maxCpusPj": { - "type": "integer", - "format": "int32" - }, - "maxJobs": { - "type": "integer", - "format": "int32" - }, - "maxNodesPj": { - "type": "integer", - "format": "int32" - }, - "maxSubmitJobs": { - "type": "integer", - "format": "int32" - }, - "maxWallPj": { - "type": "integer", - "format": "int32" - }, - "parentAcct": { - "type": "string" - }, - "parentId": { - "type": "integer", - "format": "int32" - }, - "partition": { - "type": "string" - }, - "qosList": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmQosInfo" - } - }, - "rgt": { - "type": "integer", - "format": "int32" - }, - "sharesRaw": { - "type": "integer", - "format": "int32" - }, - "uid": { - "type": "integer", - "format": "int32" - }, - "assocUsage": { - "$ref": "#/definitions/slurmAssocUsageInfo" - }, - "user": { - "type": "string" - } - } - }, - "slurmCoordInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "direct": { - "type": "integer", - "format": "int32" - } - } - }, - "slurmDeleteAccountResp": { - "type": "object", - "properties": { - "result": { - "type": "string" - } - } - }, - "slurmGetAccountResp": { - "type": "object", - "properties": { - "accountInfos": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmAccountInfo" - } - } - } - }, - "slurmGetAssociationResp": { - "type": "object", - "properties": { - "assocInfos": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmAssociationInfo" - } - } - } - }, - "slurmGetUserResp": { - "type": "object", - "properties": { - "userInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmUserInfo" - } - } - } - }, - "slurmGetWckeyResp": { - "type": "object", - "properties": { - "wckeyInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmWckeyInfo" - } - } - } - }, - "slurmListAccountsResp": { - "type": "object", - "properties": { - "accountInfos": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmAccountInfo" - } - } - } - }, - "slurmListAssociationsResp": { - "type": "object", - "properties": { - "assocInfos": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmAssociationInfo" - } - } - } - }, - "slurmListQossResp": { - "type": "object", - "properties": { - "qosInfos": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmQosInfo" - } - } - } - }, - "slurmListUsersResp": { - "type": "object", - "properties": { - "userInfos": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmUserInfo" - } - } - } - }, - "slurmListWckeysResp": { - "type": "object", - "properties": { - "wckeyInfos": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmWckeyInfo" - } - } - } - }, - "slurmQosInfo": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int32" - }, - "flags": { - "type": "integer", - "format": "int32" - }, - "graceTime": { - "type": "integer", - "format": "int32" - }, - "grpCpuMins": { - "type": "string", - "format": "int64" - }, - "grpCpuRunMins": { - "type": "string", - "format": "int64" - }, - "grpCpus": { - "type": "integer", - "format": "int32" - }, - "grpJobs": { - "type": "integer", - "format": "int32" - }, - "grpMem": { - "type": "integer", - "format": "int32" - }, - "grpNodes": { - "type": "integer", - "format": "int32" - }, - "grpSubmitJobs": { - "type": "integer", - "format": "int32" - }, - "grpWall": { - "type": "integer", - "format": "int32" - }, - "maxCpuMinsPj": { - "type": "string", - "format": "int64" - }, - "maxCpuRunMinsPu": { - "type": "string", - "format": "int64" - }, - "maxCpusPj": { - "type": "integer", - "format": "int32" - }, - "maxCpusPu": { - "type": "integer", - "format": "int32" - }, - "maxJobsPu": { - "type": "integer", - "format": "int32" - }, - "maxNodesPj": { - "type": "integer", - "format": "int32" - }, - "maxSubmitJobsPu": { - "type": "integer", - "format": "int32" - }, - "maxWallPj": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string" - }, - "preemptBitstr": { - "type": "integer", - "format": "int32" - }, - "preemptList": { - "type": "array", - "items": { - "type": "string" - } - }, - "preemptMode": { - "type": "integer", - "format": "int32" - }, - "priority": { - "type": "integer", - "format": "int32" - }, - "usage": { - "$ref": "#/definitions/slurmQosUsageInfo" - }, - "usageFactor": { - "type": "number", - "format": "double" - }, - "usageThres": { - "type": "number", - "format": "double" - } - } - }, - "slurmQosUsageInfo": { - "type": "object" - }, - "slurmSlurmVersion": { - "type": "string", - "enum": [ - "tianhe", - "shenwei" - ], - "default": "tianhe", - "description": "- tianhe: 0 - tianhe hpc\n - shenwei: 1 - shenwei hpc", - "title": "slurm version" - }, - "slurmUserInfo": { - "type": "object", - "properties": { - "adminLevel": { - "type": "integer", - "format": "int32" - }, - "associationList": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmAssociationInfo" - } - }, - "coordList": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmCoordInfo" - } - }, - "defaultAcct": { - "type": "string" - }, - "defaultWckey": { - "type": "string" - }, - "name": { - "type": "string" - }, - "oldName": { - "type": "string" - }, - "uid": { - "type": "integer", - "format": "int32" - }, - "wckeyList": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmWckeyInfo" - } - } - } - }, - "slurmWckeyInfo": { - "type": "object", - "properties": { - "accountingList": { - "type": "array", - "items": { - "$ref": "#/definitions/slurmAccountingInfo" - } - }, - "cluster": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int32" - }, - "isDef": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string" - }, - "uid": { - "type": "integer", - "format": "int32" - }, - "user": { - "type": "string" - } - } - } - } -} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_account.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_account.swagger.json deleted file mode 100644 index 5a34e4a1..00000000 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_account.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/slurmdb_account.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_accounting.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_accounting.swagger.json deleted file mode 100644 index 6ba6c1da..00000000 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_accounting.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/slurmdb_accounting.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_assoc.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_assoc.swagger.json deleted file mode 100644 index aecb5f94..00000000 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_assoc.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/slurmdb_assoc.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_cluster.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_cluster.swagger.json deleted file mode 100644 index cb332779..00000000 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_cluster.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/slurmdb_cluster.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_coord.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_coord.swagger.json deleted file mode 100644 index 7bbbcc18..00000000 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_coord.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/slurmdb_coord.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_qos.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_qos.swagger.json deleted file mode 100644 index 5b7b18f8..00000000 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_qos.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/slurmdb_qos.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_user.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_user.swagger.json deleted file mode 100644 index 45dd503b..00000000 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_user.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/slurmdb_user.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_wckey.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_wckey.swagger.json deleted file mode 100644 index 5fb54fac..00000000 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/slurmdb_wckey.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/slurmdb_wckey.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/adaptor/pcm_slurm/gen/openapiv2/idl/static.swagger.json b/adaptor/pcm_slurm/gen/openapiv2/idl/static.swagger.json deleted file mode 100644 index ab940c60..00000000 --- a/adaptor/pcm_slurm/gen/openapiv2/idl/static.swagger.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "idl/static.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/adaptor/pcm_slurm/idl/slurm.proto b/adaptor/pcm_slurm/idl/slurm.proto index bd65f724..6bbb4244 100644 --- a/adaptor/pcm_slurm/idl/slurm.proto +++ b/adaptor/pcm_slurm/idl/slurm.proto @@ -19,6 +19,12 @@ service SlurmService { // get specific user info from slurmdb rpc GetUser(GetUserReq) returns (GetUserResp); + // add new user + rpc AddUser(AddUserReq) returns (AddUserResp); + + // delete specific user + rpc DeleteUser(DeleteUserReq) returns (DeleteUserResp); + // list all associations from slurmdb rpc ListAssociations(ListAssociationsReq) returns (ListAssociationsResp); diff --git a/adaptor/pcm_slurm/idl/slurm.yaml b/adaptor/pcm_slurm/idl/slurm.yaml index 2640d460..12ab4fc8 100644 --- a/adaptor/pcm_slurm/idl/slurm.yaml +++ b/adaptor/pcm_slurm/idl/slurm.yaml @@ -7,6 +7,10 @@ http: get: "/apis/slurm/listUsers" - selector: slurm.SlurmService.GetUser get: "/apis/slurm/getUser" + - selector: slurm.SlurmService.AddUser + post: "/apis/slurm/addUser" + - selector: slurm.SlurmService.DeleteUser + delete: "/apis/slurm/deleteUser" - selector: slurm.SlurmService.ListAssociations get: "/apis/slurm/listAssociations" - selector: slurm.SlurmService.GetAssociation @@ -16,9 +20,9 @@ http: - selector: slurm.SlurmService.GetAccount get: "/apis/slurm/getAccount" - selector: slurm.SlurmService.AddAccount - get: "/apis/slurm/addAccount" + post: "/apis/slurm/addAccount" - selector: slurm.SlurmService.DeleteAccount - get: "/apis/slurm/deleteAccount" + delete: "/apis/slurm/deleteAccount" - selector: slurm.SlurmService.ListQoss get: "/apis/slurm/listQoss" - selector: slurm.SlurmService.ListWckeys diff --git a/adaptor/pcm_slurm/idl/slurmdb_user.proto b/adaptor/pcm_slurm/idl/slurmdb_user.proto index 813bb260..d769c4f4 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_user.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_user.proto @@ -40,7 +40,7 @@ message GetUserResp { repeated UserInfo user_info = 1; } -message AddUsersReq{ +message AddUserReq{ SlurmVersion slurm_version = 1; string accounts=2; string admin_level=3; @@ -56,20 +56,20 @@ message AddUsersReq{ string max_submit_jobs=13; string max_wall=14; string names=15; - string partition=16; + string partitions=16; string qos_level=17; } -message AddUsersResp { +message AddUserResp { string result =1; } -message DeleteUsersReq{ +message DeleteUserReq{ SlurmVersion slurm_version = 1; string names=2; } -message DeleteUsersResp { +message DeleteUserResp { string result =1; } \ No newline at end of file diff --git a/adaptor/pcm_slurm/server/slurm.go b/adaptor/pcm_slurm/server/slurm.go index 180e86f7..d0258484 100644 --- a/adaptor/pcm_slurm/server/slurm.go +++ b/adaptor/pcm_slurm/server/slurm.go @@ -32,6 +32,26 @@ func (s *Server) GetUser(ctx context.Context, req *slurmpb.GetUserReq) (*slurmpb return resp, nil } +// AddUser add slurm user +func (s *Server) AddUser(ctx context.Context, req *slurmpb.AddUserReq) (*slurmpb.AddUserResp, error) { + resp, err := AddUser(ctx, req) + if err != nil { + glog.Errorf("AddSlurmUser error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// DeleteUser delete specific slurm user +func (s *Server) DeleteUser(ctx context.Context, req *slurmpb.DeleteUserReq) (*slurmpb.DeleteUserResp, error) { + resp, err := DeleteUser(ctx, req) + if err != nil { + glog.Errorf("DeleteSlurmUser error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + // ListAssociations return all slurm associations func (s *Server) ListAssociations(ctx context.Context, req *slurmpb.ListAssociationsReq) (*slurmpb.ListAssociationsResp, error) { resp, err := ListAssociations(ctx, req) diff --git a/adaptor/pcm_slurm/server/slurmImpl.go b/adaptor/pcm_slurm/server/slurmImpl.go index 046dc5d0..a0a5dfb0 100644 --- a/adaptor/pcm_slurm/server/slurmImpl.go +++ b/adaptor/pcm_slurm/server/slurmImpl.go @@ -24,6 +24,24 @@ func GetUser(ctx context.Context, req *pbslurm.GetUserReq) (*pbslurm.GetUserResp return resp, nil } +func AddUser(ctx context.Context, req *pbslurm.AddUserReq) (*pbslurm.AddUserResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.AddUser(ctx, req) + return resp, nil +} + +func DeleteUser(ctx context.Context, req *pbslurm.DeleteUserReq) (*pbslurm.DeleteUserResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.DeleteUser(ctx, req) + return resp, nil +} + func ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (*pbslurm.ListAssociationsResp, error) { slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) if slurm == nil { diff --git a/adaptor/pcm_slurm/service/slurmdb_user.go b/adaptor/pcm_slurm/service/slurmdb_user.go index 5ac2bdf8..35ff46f0 100644 --- a/adaptor/pcm_slurm/service/slurmdb_user.go +++ b/adaptor/pcm_slurm/service/slurmdb_user.go @@ -119,44 +119,77 @@ func (slurmStruct SlurmStruct) GetUser(ctx context.Context, req *pbslurm.GetUser return &resp, nil } -func Queue() { - cli := ssh.Cli{ - Addr: "25.8.2.1:22", - User: "nudt_ysz", - Pwd: "nudt_ysz", +func (slurmStruct SlurmStruct) AddUser(ctx context.Context, req *pbslurm.AddUserReq) (*pbslurm.AddUserResp, error) { + + cmd := "/usr/local/bin/sacctmgr add user " + + cmd = cmd + req.Names + if len(req.Accounts) != 0 { + cmd = cmd + " Accounts=" + req.Accounts } - // 建立连接对象 - cl, _ := cli.Connect() - // 退出时关闭连接 - defer cl.Client.Close() - _, err := cl.Run(`yhqueue`) - if err != nil { - print("error") - return + if len(req.AdminLevel) != 0 { + cmd = cmd + " AdminLevel=" + req.AdminLevel } -} - -func (slurmStruct SlurmStruct) AddUser(ctx context.Context, req *pbslurm.AddUsersReq) (*pbslurm.AddUsersResp, error) { - - cli := ssh.Cli{ - Addr: "localhost:22", - User: "root", - Pwd: "123123", + if len(req.Clusters) != 0 { + cmd = cmd + " Clusters=" + req.Clusters } - // 建立连接对象 - cl, _ := cli.Connect() - // 退出时关闭连接 - defer cl.Client.Close() - - cmd := "sacctmgr add user" - - _, err := cl.Run(cmd) - if err != nil { - print("error") + if len(req.DefaultAccount) != 0 { + cmd = cmd + " DefaultAccount=" + req.DefaultAccount + } + if len(req.DefaultQos) != 0 { + cmd = cmd + " DefaultQOS=" + req.DefaultQos + } + if len(req.DefaultWckey) != 0 { + cmd = cmd + " DefaultWCKey=" + req.DefaultWckey + } + if len(req.FairShare) != 0 { + cmd = cmd + " Fairshare=" + req.FairShare + } + if len(req.MaxCpuMins) != 0 { + cmd = cmd + " MaxCPUMins=" + req.MaxCpuMins + } + if len(req.MaxCpus) != 0 { + cmd = cmd + " MaxCPUs=" + req.MaxCpus + } + if len(req.MaxJobs) != 0 { + cmd = cmd + " MaxJobs=" + req.MaxJobs + } + if len(req.MaxNodes) != 0 { + cmd = cmd + " MaxNodes=" + req.MaxNodes + } + if len(req.MaxSubmitJobs) != 0 { + cmd = cmd + " MaxSubmitJobs=" + req.MaxSubmitJobs + } + if len(req.MaxWall) != 0 { + cmd = cmd + " MaxWall=" + req.MaxWall + } + if len(req.Partitions) != 0 { + cmd = cmd + " Partitions=" + req.Partitions + } + if len(req.QosLevel) != 0 { + cmd = cmd + " QosLevel=" + req.QosLevel } - resp := pbslurm.AddUsersResp{} - resp.Result = "" + cmd = cmd + " -i" + + result := ssh.ExecCommand(cmd) + + resp := pbslurm.AddUserResp{} + resp.Result = result + + return &resp, nil +} + +func (slurmStruct SlurmStruct) DeleteUser(ctx context.Context, req *pbslurm.DeleteUserReq) (*pbslurm.DeleteUserResp, error) { + + cmd := "/usr/local/bin/sacctmgr delete user " + cmd = cmd + req.Names + cmd = cmd + " -i" + + result := ssh.ExecCommand(cmd) + + resp := pbslurm.DeleteUserResp{} + resp.Result = result return &resp, nil } diff --git a/adaptor/pcm_slurm/service/slurmer.go b/adaptor/pcm_slurm/service/slurmer.go index 906fa6c1..bed1b147 100644 --- a/adaptor/pcm_slurm/service/slurmer.go +++ b/adaptor/pcm_slurm/service/slurmer.go @@ -8,6 +8,9 @@ import ( type Slurmer interface { ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (resp *pbslurm.ListUsersResp, err error) //list slurm users GetUser(ctx context.Context, req *pbslurm.GetUserReq) (resp *pbslurm.GetUserResp, err error) //get specific slurm user + AddUser(ctx context.Context, req *pbslurm.AddUserReq) (resp *pbslurm.AddUserResp, err error) //add slurm user + DeleteUser(ctx context.Context, req *pbslurm.DeleteUserReq) (resp *pbslurm.DeleteUserResp, err error) //delete slurm user + ListClusters(ctx context.Context, req *pbslurm.ClusterInfoMsgReq) (resp *pbslurm.ClusterInfoMsgResp, err error) //list slurm users ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (resp *pbslurm.ListAssociationsResp, err error) //list slurm associations GetAssociation(ctx context.Context, req *pbslurm.GetAssociationReq) (resp *pbslurm.GetAssociationResp, err error) //get specific slurm associations ListAccounts(ctx context.Context, req *pbslurm.ListAccountsReq) (resp *pbslurm.ListAccountsResp, err error) //list slurm accounts From 8349c58d7653f9084d3e71d0f2ebfd297264dad6 Mon Sep 17 00:00:00 2001 From: zhouqunjie <450705171@qq.com> Date: Sun, 13 Nov 2022 06:31:02 -0800 Subject: [PATCH 08/11] filter for get logic --- adaptor/pcm_slurm/service/slurmdb_account.go | 6 ++++-- adaptor/pcm_slurm/service/slurmdb_association.go | 8 ++++---- adaptor/pcm_slurm/service/slurmdb_user.go | 10 +++++----- adaptor/pcm_slurm/service/slurmer.go | 1 - 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/adaptor/pcm_slurm/service/slurmdb_account.go b/adaptor/pcm_slurm/service/slurmdb_account.go index 4a66ce92..a44cd6b4 100644 --- a/adaptor/pcm_slurm/service/slurmdb_account.go +++ b/adaptor/pcm_slurm/service/slurmdb_account.go @@ -55,6 +55,7 @@ import ( pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" "code.gitlink.org.cn/JCCE/PCM.git/common/ssh" "context" + "strings" ) type AcctInfoMsg struct { @@ -106,8 +107,9 @@ func (slurmStruct SlurmStruct) GetAccount(ctx context.Context, req *pbslurm.GetA resp := pbslurm.GetAccountResp{} for _, acct := range acctList.AcctInfoList { acctInfoResult := acct - //todo add filter logic - resp.AccountInfos = append(resp.AccountInfos, &acctInfoResult) + if strings.Contains(acct.Name, req.AccountName) { + resp.AccountInfos = append(resp.AccountInfos, &acctInfoResult) + } } return &resp, nil diff --git a/adaptor/pcm_slurm/service/slurmdb_association.go b/adaptor/pcm_slurm/service/slurmdb_association.go index d0639225..242f0c3d 100644 --- a/adaptor/pcm_slurm/service/slurmdb_association.go +++ b/adaptor/pcm_slurm/service/slurmdb_association.go @@ -3,6 +3,7 @@ package slurmer import ( pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" "context" + "strings" ) /* @@ -191,11 +192,10 @@ func (slurmStruct SlurmStruct) GetAssociation(ctx context.Context, req *pbslurm. assocList := GetAssociationInfos() resp := pbslurm.GetAssociationResp{} - for _, assoc := range assocList.AssocInfoList { - assocResult := assoc - //todo add filter logic - if assocResult.Cluster == req.Cluster && assocResult.User == req.User && assocResult.Acct == assocResult.Acct && assocResult.Partition == req.Partition { + for _, assoc := range assocList.AssocInfoList { + if (len(req.Cluster) != 0 || len(req.User) != 0 || len(req.Account) != 0 || len(req.Partition) != 0) && strings.Contains(assoc.Cluster, req.Cluster) && strings.Contains(assoc.Acct, req.Account) && strings.Contains(assoc.User, req.User) && strings.Contains(assoc.Partition, req.Partition) { + assocResult := assoc resp.AssocInfos = append(resp.AssocInfos, &assocResult) } } diff --git a/adaptor/pcm_slurm/service/slurmdb_user.go b/adaptor/pcm_slurm/service/slurmdb_user.go index 35ff46f0..2b6a7fcc 100644 --- a/adaptor/pcm_slurm/service/slurmdb_user.go +++ b/adaptor/pcm_slurm/service/slurmdb_user.go @@ -59,6 +59,7 @@ import ( pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" ssh "code.gitlink.org.cn/JCCE/PCM.git/common/ssh" "context" + "strings" ) type UserInfoMsg struct { @@ -108,12 +109,11 @@ func (slurmStruct SlurmStruct) GetUser(ctx context.Context, req *pbslurm.GetUser resp := pbslurm.GetUserResp{} for _, user := range userList.UserInfoList { - //userInfoResult := pbslurm.UserInfo{} - //todo add filter logic - userInfoResult := user - //userInfoResult.Name = user.Name + if strings.Contains(user.Name, req.UserName) { + userInfoResult := user + resp.UserInfo = append(resp.UserInfo, &userInfoResult) + } - resp.UserInfo = append(resp.UserInfo, &userInfoResult) } return &resp, nil diff --git a/adaptor/pcm_slurm/service/slurmer.go b/adaptor/pcm_slurm/service/slurmer.go index bed1b147..6ed09730 100644 --- a/adaptor/pcm_slurm/service/slurmer.go +++ b/adaptor/pcm_slurm/service/slurmer.go @@ -10,7 +10,6 @@ type Slurmer interface { GetUser(ctx context.Context, req *pbslurm.GetUserReq) (resp *pbslurm.GetUserResp, err error) //get specific slurm user AddUser(ctx context.Context, req *pbslurm.AddUserReq) (resp *pbslurm.AddUserResp, err error) //add slurm user DeleteUser(ctx context.Context, req *pbslurm.DeleteUserReq) (resp *pbslurm.DeleteUserResp, err error) //delete slurm user - ListClusters(ctx context.Context, req *pbslurm.ClusterInfoMsgReq) (resp *pbslurm.ClusterInfoMsgResp, err error) //list slurm users ListAssociations(ctx context.Context, req *pbslurm.ListAssociationsReq) (resp *pbslurm.ListAssociationsResp, err error) //list slurm associations GetAssociation(ctx context.Context, req *pbslurm.GetAssociationReq) (resp *pbslurm.GetAssociationResp, err error) //get specific slurm associations ListAccounts(ctx context.Context, req *pbslurm.ListAccountsReq) (resp *pbslurm.ListAccountsResp, err error) //list slurm accounts From e0bc81f47ef37a0994d90d07551f80baf56fea07 Mon Sep 17 00:00:00 2001 From: qiwang <1364512070@qq.com> Date: Mon, 14 Nov 2022 06:42:39 -0800 Subject: [PATCH 09/11] fix:add cluster interface --- adaptor/pcm_slurm/idl/slurmdb_cluster.proto | 45 +++++ adaptor/pcm_slurm/service/slurmdb_cluster.go | 169 +++++++++++++++++++ 2 files changed, 214 insertions(+) create mode 100644 adaptor/pcm_slurm/service/slurmdb_cluster.go diff --git a/adaptor/pcm_slurm/idl/slurmdb_cluster.proto b/adaptor/pcm_slurm/idl/slurmdb_cluster.proto index 9322df4b..2c90c29d 100644 --- a/adaptor/pcm_slurm/idl/slurmdb_cluster.proto +++ b/adaptor/pcm_slurm/idl/slurmdb_cluster.proto @@ -22,3 +22,48 @@ message ClusterInfo{ AssociationInfo root_assoc = 12 ; int32 rpc_version = 13 ; } + +message ListClustersReq{ + SlurmVersion slurm_version = 1; +} + +message ListClustersResp { + repeated ClusterInfo cluster_infos = 1; +} + +message GetClusterReq{ + SlurmVersion slurm_version = 1; + string cluster_name = 2; +} + +message GetClusterResp { + repeated ClusterInfo cluster_infos = 1; +} + +message AddClusterReq{ + SlurmVersion slurm_version = 1; + string name =2; + string nodes =3; + string control_port = 4 ; + string cpu_count = 5 ; + string dimensions = 6 ; + string dim_size = 7 ; + string flags = 8 ; + string classification = 9 ; + string control_host = 10 ; + string plugin_id_select = 11 ; + string rpc_version = 13 ; +} + +message AddClusterResp { + string result = 1; +} + +message DeleteClusterReq{ + SlurmVersion slurm_version = 1; + string names=2; +} + +message DeleteClusterResp { + string result = 1; +} \ No newline at end of file diff --git a/adaptor/pcm_slurm/service/slurmdb_cluster.go b/adaptor/pcm_slurm/service/slurmdb_cluster.go new file mode 100644 index 00000000..a84d082f --- /dev/null +++ b/adaptor/pcm_slurm/service/slurmdb_cluster.go @@ -0,0 +1,169 @@ +package slurmer + +/* +#cgo LDFLAGS: -lslurmdb + +#include +#include +#include +#include +#include + +typedef struct cluster_info_msg { + uint32_t record_count; + slurmdb_cluster_rec_t *cluster_array; +} cluster_info_msg_t; + +typedef struct slurmdb_cluster_rec{ + char *name; +} slurmdb_cluster_rec_pcm; + +struct cluster_info_msg get_cluster_info() { + struct cluster_info_msg clusterinfo; + List clusterList = NULL; + slurmdb_cluster_cond_t *cluster_cond = NULL; + void *db_conn; + db_conn = slurmdb_connection_get(); + clusterList = slurmdb_clusters_get(db_conn, cluster_cond); + slurmdb_connection_close(&db_conn); + + slurmdb_cluster_rec_t *rec = NULL; + ListIterator itr = slurm_list_iterator_create(clusterList); + int i = 0; + uint32_t length; + length = slurm_list_count(clusterList); + clusterinfo.record_count = length; + clusterinfo.cluster_array = malloc(length * sizeof(slurmdb_cluster_rec_t)); + while ((rec = slurm_list_next(itr))) { + clusterinfo.cluster_array[i] = *rec; + i++; + } + return clusterinfo; +} + +struct slurmdb_cluster_rec *cluster_from_list(struct cluster_info_msg *list, int i) { + return (struct slurmdb_cluster_rec *) &list->cluster_array[i]; +} + +*/ +import "C" +import ( + pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" + "code.gitlink.org.cn/JCCE/PCM.git/common/ssh" + "context" + "strings" +) + +type ClusterInfoMsg struct { + Last_update int64 + Record_count uint32 + ClusterInfoList []pbslurm.ClusterInfo +} + +func Cluster_descriptor_convert_c_to_go(c_struct *C.struct_slurmdb_cluster_rec) pbslurm.ClusterInfo { + var go_struct pbslurm.ClusterInfo + go_struct.Name = C.GoString(c_struct.name) + return go_struct +} + +func GetClusterInfo() ClusterInfoMsg { + var go_cluster_buffer ClusterInfoMsg + c_cluster_buffer := C.get_cluster_info() + go_cluster_buffer.Record_count = uint32(c_cluster_buffer.record_count) + go_cluster_buffer.ClusterInfoList = make([]pbslurm.ClusterInfo, c_cluster_buffer.record_count, c_cluster_buffer.record_count) + + for i := uint32(0); i < go_cluster_buffer.Record_count; i++ { + cluster := C.cluster_from_list(&c_cluster_buffer, C.int(i)) + go_cluster := Cluster_descriptor_convert_c_to_go(cluster) + go_cluster_buffer.ClusterInfoList[i] = go_cluster + } + return go_cluster_buffer +} + +func (slurmStruct SlurmStruct) GetAllClusters(ctx context.Context, req *pbslurm.ListClustersReq) (*pbslurm.ListClustersResp, error) { + + clusterList := GetClusterInfo() + + resp := pbslurm.ListClustersResp{} + for _, cluster := range clusterList.ClusterInfoList { + clusterInfoResult := pbslurm.ClusterInfo{} + clusterInfoResult = cluster + resp.ClusterInfos = append(resp.ClusterInfos, &clusterInfoResult) + } + return &resp, nil +} + +func (slurmStruct SlurmStruct) DeleteCluster(ctx context.Context, req *pbslurm.DeleteClusterReq) (*pbslurm.DeleteClusterResp, error) { + + cmd := "usr/local/bin/sacctmgr delete cluster" + cmd = cmd + req.Names + cmd = cmd + "-i" + + result := ssh.ExecCommand(cmd) + //var go_cluster_buffer ClusterInfoMsg + resp := pbslurm.DeleteClusterResp{} + resp.Result = result + return &resp, nil + +} + +func (slurmStruct SlurmStruct) AddCluster(ctx context.Context, req *pbslurm.AddClusterReq) (*pbslurm.AddClusterResp, error) { + + cmd := "/usr/local/bin/sacctmgr add cluster " + + cmd = cmd + req.Name + if len(req.Nodes) != 0 { + cmd = cmd + " Nodes=" + req.Nodes + } + if len(req.Classification) != 0 { + cmd = cmd + " Classification=" + req.Classification + } + if len(req.ControlHost) != 0 { + cmd = cmd + " ControlHost=\"" + req.ControlHost + "\"" + } + if len(req.ControlPort) != 0 { + cmd = cmd + " ControlPort=" + req.ControlPort + } + if len(req.CpuCount) != 0 { + cmd = cmd + " CpuCount=" + req.CpuCount + } + if len(req.Dimensions) != 0 { + cmd = cmd + " Dimensions=" + req.Dimensions + } + if len(req.DimSize) != 0 { + cmd = cmd + " DimSize=" + req.DimSize + } + if len(req.Flags) != 0 { + cmd = cmd + " Flags=" + req.Flags + } + if len(req.PluginIdSelect) != 0 { + cmd = cmd + " GrpNodes=" + req.PluginIdSelect + } + if len(req.RpcVersion) != 0 { + cmd = cmd + " RpcVersion=" + req.RpcVersion + } + + cmd = cmd + " -i" + + result := ssh.ExecCommand(cmd) + + resp := pbslurm.AddClusterResp{} + resp.Result = result + + return &resp, nil +} + +func (slurmStruct SlurmStruct) GetCluster(ctx context.Context, req *pbslurm.GetClusterReq) (*pbslurm.GetClusterResp, error) { + + clusterList := GetClusterInfo() + + resp := pbslurm.GetClusterResp{} + for _, cluster := range clusterList.ClusterInfoList { + clusterInfoResult := cluster + if strings.Contains(cluster.Name, req.ClusterName) { + resp.ClusterInfos = append(resp.ClusterInfos, &clusterInfoResult) + } + } + + return &resp, nil +} From 536abfdd51a00189303ead41e7b95bedf726e8f9 Mon Sep 17 00:00:00 2001 From: qiwang <1364512070@qq.com> Date: Tue, 15 Nov 2022 01:39:19 -0800 Subject: [PATCH 10/11] fix:add cluster interface --- adaptor/pcm_slurm/idl/node.proto | 22 -- adaptor/pcm_slurm/idl/slurm.proto | 2 +- adaptor/pcm_slurm/idl/slurm_node.proto | 56 +++++ adaptor/pcm_slurm/idl/slurm_partition.proto | 54 +++++ adaptor/pcm_slurm/idl/slurm_ping.proto | 14 ++ adaptor/pcm_slurm/idl/slurm_reservation.proto | 46 ++++ adaptor/pcm_slurm/service/slurm_node.go | 198 ++++++++++++++++++ adaptor/pcm_slurm/service/slurm_partition.go | 133 ++++++++++++ adaptor/pcm_slurm/service/slurm_ping.go | 31 +++ .../pcm_slurm/service/slurm_reservation.go | 161 ++++++++++++++ adaptor/pcm_slurm/service/slurmdb_cluster.go | 2 +- adaptor/pcm_slurm/service/slurmer.go | 10 + 12 files changed, 705 insertions(+), 24 deletions(-) delete mode 100644 adaptor/pcm_slurm/idl/node.proto create mode 100644 adaptor/pcm_slurm/idl/slurm_node.proto create mode 100644 adaptor/pcm_slurm/idl/slurm_partition.proto create mode 100644 adaptor/pcm_slurm/idl/slurm_ping.proto create mode 100644 adaptor/pcm_slurm/idl/slurm_reservation.proto create mode 100644 adaptor/pcm_slurm/service/slurm_node.go create mode 100644 adaptor/pcm_slurm/service/slurm_partition.go create mode 100644 adaptor/pcm_slurm/service/slurm_ping.go create mode 100644 adaptor/pcm_slurm/service/slurm_reservation.go diff --git a/adaptor/pcm_slurm/idl/node.proto b/adaptor/pcm_slurm/idl/node.proto deleted file mode 100644 index a160c188..00000000 --- a/adaptor/pcm_slurm/idl/node.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package slurm; - -option go_package = "/slurmpb"; -import "idl/static.proto"; - -message ListNodesReq{ - SlurmVersion slurm_version = 1; -} - -message NodeInfo{ - int32 boards = 1 ; - int32 cpus = 2 ; - string name = 3 ; - int32 real_memory = 4 ; - int32 sockets = 5 ; - int32 threads = 6 ; -} - -message ListNodesResp { - repeated NodeInfo node_infos =1; -} diff --git a/adaptor/pcm_slurm/idl/slurm.proto b/adaptor/pcm_slurm/idl/slurm.proto index 6bbb4244..3ded6df6 100644 --- a/adaptor/pcm_slurm/idl/slurm.proto +++ b/adaptor/pcm_slurm/idl/slurm.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package slurm; option go_package = "/slurmpb"; -import "idl/node.proto"; +import "idl/slurm_node.proto"; import "idl/slurmdb_user.proto"; import "idl/slurmdb_assoc.proto"; import "idl/slurmdb_account.proto"; diff --git a/adaptor/pcm_slurm/idl/slurm_node.proto b/adaptor/pcm_slurm/idl/slurm_node.proto new file mode 100644 index 00000000..ffb37efb --- /dev/null +++ b/adaptor/pcm_slurm/idl/slurm_node.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "idl/static.proto"; + +message NodeInfo{ + string Arch = 1 ; + uint32 Boards = 2 ; + int64 Boot_time = 3 ; + uint32 Cores = 4 ; + uint32 Cpu_load = 5 ; + uint32 Cpus = 6 ; + string Features = 7; + string Gres = 8 ; + string Name = 9 ; + string Node_addr = 10 ; + string Node_hostname = 11 ; + uint32 Node_state = 12 ; + string Os = 13 ; + uint64 Real_memory = 14 ; + string Reason = 15 ; + int64 Reason_time = 16 ; + uint32 Reason_uid = 17 ; + int64 Slurmd_start_time = 18 ; + uint32 Sockets = 19 ; + uint32 Threads = 20 ; + uint32 Tmp_disk = 21 ; + uint32 Weight = 22 ; +} + +message ListNodesReq{ + SlurmVersion slurm_version = 1; +} + + +message ListNodesResp { + repeated NodeInfo node_infos = 1; +} + +message GetNodeReq{ + SlurmVersion slurm_version = 1; + string node_name = 2; +} + +message GetNodeResp { + repeated NodeInfo node_infos = 1; +} + +/*message Nodes_info_msg{ + int64 Last_update =1; + uint32 Record_count =2; + uint32 Error_code =3; + repeated NodeInfo node_infos =4; +}*/ + diff --git a/adaptor/pcm_slurm/idl/slurm_partition.proto b/adaptor/pcm_slurm/idl/slurm_partition.proto new file mode 100644 index 00000000..21be1e83 --- /dev/null +++ b/adaptor/pcm_slurm/idl/slurm_partition.proto @@ -0,0 +1,54 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "idl/static.proto"; + +message PartitionInfo{ + string Allow_alloc_nodes =1; + string Allow_groups =2; + string Alternate =3; + uint32 Cr_type =4; + uint64 Def_mem_per_cpu =5; + uint32 Default_time = 6; + uint32 Flags =7; + uint32 Grace_time =8; + uint32 Max_cpus_per_node =9; + uint64 Max_mem_per_cpu =10; + uint32 Max_nodes =11; + uint32 Max_share =12; + uint32 Max_time =13; + uint32 Min_nodes =14; + string Name =15; + int32 Node_inx =16; + string Nodes =17; + uint32 Preempt_mode =18; + uint32 State_up =19; + uint32 Total_cpus =20; + uint32 Total_nodes =21; +} + +message ListPartitionsReq{ + SlurmVersion SlurmVersion = 1; +} + +message ListPartitionsResp{ + repeated PartitionInfo Partition_list =1; +} + +message GetPartitionReq{ + SlurmVersion slurm_version = 1; + string partition_name = 2; +} + +message GetPartitionResp { + repeated PartitionInfo partition_infos = 1; +} + +/*message Partition_info_msg{ + int64 Last_update =1; + uint32 Record_count =2; + uint32 Error_code =3; + repeated PartitionInfo Partition_list =4; +}*/ + diff --git a/adaptor/pcm_slurm/idl/slurm_ping.proto b/adaptor/pcm_slurm/idl/slurm_ping.proto new file mode 100644 index 00000000..315286e4 --- /dev/null +++ b/adaptor/pcm_slurm/idl/slurm_ping.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "idl/static.proto"; + +message PingInfoMsgReq{ + SlurmVersion SlurmVersion = 1; + int32 controller = 2; +} + +message PingInfoMsgResp{ + int32 Ping_result =1; +} \ No newline at end of file diff --git a/adaptor/pcm_slurm/idl/slurm_reservation.proto b/adaptor/pcm_slurm/idl/slurm_reservation.proto new file mode 100644 index 00000000..ca6c4298 --- /dev/null +++ b/adaptor/pcm_slurm/idl/slurm_reservation.proto @@ -0,0 +1,46 @@ +syntax = "proto3"; +package slurm; + +option go_package = "/slurmpb"; +import "idl/static.proto"; + +message ReservationInfo{ + string Accounts = 1; + int64 End_time =2; + string Features =3; + uint32 Flags =4; + string Licenses =5; + string Name =6; + uint32 Node_cnt =7; + uint32 Core_cnt =8; + int32 Node_inx =9; + string Node_list =10; + string Partition =11; + int64 Start_time =12; + string Users =13; +} + +message ListReservationsReq{ + SlurmVersion SlurmVersion = 1; +} + +message ListReservationsResp{ + repeated ReservationInfo Reservation_list =1; +} + +message GetReservationReq{ + SlurmVersion slurm_version = 1; + string reservation_name = 2; +} + +message GetReservationResp { + repeated ReservationInfo reservation_infos = 1; +} + +/*message Partition_info_msg{ + int64 Last_update =1; + uint32 Record_count =2; + uint32 Error_code =3; + repeated PartitionInfo Partition_list =4; +}*/ + diff --git a/adaptor/pcm_slurm/service/slurm_node.go b/adaptor/pcm_slurm/service/slurm_node.go new file mode 100644 index 00000000..1fb1709a --- /dev/null +++ b/adaptor/pcm_slurm/service/slurm_node.go @@ -0,0 +1,198 @@ +package slurmer + +/* +#cgo LDFLAGS: -lslurm +#include +#include +#include +inline uint8_t uint8_ptr(uint8_t* pointer) { + if (NULL == pointer) { + return -1;} + return *pointer; +} +inline int8_t int8_ptr(int8_t* pointer) { + if (NULL == pointer) { + return -1;} + return *pointer; +} +uint16_t uint16_ptr(uint16_t* pointer) { + if (NULL == pointer) { + return -1;} + return *pointer; +} +inline int16_t int16_ptr(int16_t* pointer) { + if (NULL == pointer) { + return -1;} + return *pointer; +} +inline uint32_t uint32_ptr(uint32_t* pointer) { + if (NULL == pointer) { + return -1;} + return *pointer; +} +inline int32_t int32_ptr(int32_t* pointer) { + if (NULL == pointer) { + return -1;} + return *pointer; +} +inline uint64_t uint64_ptr(uint64_t* pointer) { + if (NULL == pointer) { + return -1;} + return *pointer; +} +inline int64_t int64_ptr(int16_t* pointer) { + if (NULL == pointer) { + return -1;} + return *pointer; +} + struct node_info_msg *get_node_info(){ + struct node_info_msg* node_buffer; + if(slurm_load_node ((time_t) NULL, + &node_buffer, SHOW_ALL)) + return NULL; + return node_buffer; + } + struct node_info_msg *get_single_node_info(char* name){ + struct node_info_msg* node_buffer; + if( slurm_load_node_single (&node_buffer, name, SHOW_DETAIL)) + return NULL; + return node_buffer; + } + + struct node_info* node_from_list(struct node_info_msg *list, int i){ + return &list->node_array[i]; +} + void free_node_buffer(void* buffer){ + + slurm_free_node_info_msg ((struct node_info_msg*)buffer); + } + + +*/ +import "C" +import ( + pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" + "context" + "strings" +) + +type NodeInfoMsg struct { + LastUpdate int64 + RecordCount uint32 + ErrorCode uint32 + NodeInfoList []pbslurm.NodeInfo +} + +func Node_info_convert_c_to_go(c_struct *C.struct_node_info) pbslurm.NodeInfo { + var go_struct pbslurm.NodeInfo + + go_struct.Arch = C.GoString(c_struct.arch) + go_struct.Boards = uint32(c_struct.boards) + go_struct.BootTime = int64(c_struct.boot_time) + go_struct.Cores = uint32(c_struct.cores) + go_struct.CpuLoad = uint32(c_struct.cpu_load) + go_struct.Cpus = uint32(c_struct.cpus) + go_struct.Features = C.GoString(c_struct.features) + go_struct.Gres = C.GoString(c_struct.gres) + go_struct.Name = C.GoString(c_struct.name) + go_struct.NodeAddr = C.GoString(c_struct.node_addr) + go_struct.NodeHostname = C.GoString(c_struct.node_hostname) + go_struct.NodeState = uint32(c_struct.node_state) + go_struct.Os = C.GoString(c_struct.os) + go_struct.RealMemory = uint64(c_struct.real_memory) + go_struct.Reason = C.GoString(c_struct.reason) + go_struct.ReasonTime = int64(c_struct.reason_time) + go_struct.ReasonUid = uint32(c_struct.reason_uid) + go_struct.SlurmdStartTime = int64(c_struct.slurmd_start_time) + go_struct.Sockets = uint32(c_struct.sockets) + go_struct.Threads = uint32(c_struct.threads) + go_struct.TmpDisk = uint32(c_struct.tmp_disk) + go_struct.Weight = uint32(c_struct.weight) + return go_struct +} + +func (slurmStruct SlurmStruct) ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (*pbslurm.ListNodesResp, error) { + nodeList := Get_all_nodes() + var resp = pbslurm.ListNodesResp{} + for _, node := range nodeList.NodeInfoList { + nodeInfoResult := pbslurm.NodeInfo{} + nodeInfoResult.Cpus = uint32(node.Cpus) + nodeInfoResult.Boards = uint32(node.Boards) + nodeInfoResult.RealMemory = node.RealMemory + nodeInfoResult.Sockets = uint32(node.Sockets) + nodeInfoResult.Threads = uint32(node.Threads) + resp.NodeInfos = append(resp.NodeInfos, &nodeInfoResult) + } + + return &resp, nil +} + +func Get_all_nodes() NodeInfoMsg { + var go_node_buffer NodeInfoMsg + c_node_buffer := C.get_node_info() + if c_node_buffer == nil { + go_node_buffer.LastUpdate = int64(0) + go_node_buffer.RecordCount = uint32(0) + go_node_buffer.ErrorCode = uint32(C.slurm_get_errno()) + return go_node_buffer + } + go_node_buffer.LastUpdate = int64(c_node_buffer.last_update) + go_node_buffer.RecordCount = uint32(c_node_buffer.record_count) + go_node_buffer.NodeInfoList = make([]pbslurm.NodeInfo, c_node_buffer.record_count, c_node_buffer.record_count) + for i := uint32(0); i < go_node_buffer.RecordCount; i++ { + node := C.node_from_list(c_node_buffer, C.int(i)) + go_node := Node_info_convert_c_to_go(node) + go_node_buffer.NodeInfoList[i] = go_node + } + C.slurm_free_node_info_msg(c_node_buffer) + + return go_node_buffer +} + +func NodeDescriptorConvertCToGo(cStruct *C.struct_slurmdb_account_rec) pbslurm.NodeInfo { + var goStruct pbslurm.NodeInfo + goStruct.Name = C.GoString(cStruct.name) + return goStruct +} + +func GetNodeInfo() NodeInfoMsg { + var goNodeBuffer NodeInfoMsg + cNodeBuffer := C.get_node_info() + goNodeBuffer.RecordCount = uint32(cNodeBuffer.record_count) + goNodeBuffer.NodeInfoList = make([]pbslurm.NodeInfo, cNodeBuffer.record_count, cNodeBuffer.record_count) + + for i := uint32(0); i < goNodeBuffer.RecordCount; i++ { + Node := C.node_from_list(&cNodeBuffer, C.int(i)) + goNode := NodeDescriptorConvertCToGo(Node) + goNodeBuffer.NodeInfoList[i] = goNode + } + return goNodeBuffer +} + +func (slurmStruct SlurmStruct) GetNode(ctx context.Context, req *pbslurm.GetNodeReq) (*pbslurm.GetNodeResp, error) { + NodeList := GetNodeInfo() + resp := pbslurm.GetNodeResp{} + for _, node := range NodeList.NodeInfoList { + nodeInfoResult := node + if strings.Contains(node.Name, req.NodeName) { + resp.NodeInfos = append(resp.NodeInfos, &nodeInfoResult) + } + } + return &resp, nil +} + +/*func (slurmStruct SlurmStruct) GetNodeByName(ctx context.Context, req *pbnode.NodeInfoMsgReq) (*pbnode.NodeInfoMsgResp, error) { + node := Get_node_info(req.NodeName) + var resp = pbnode.NodeInfoMsgResp{} + for _, node := range node.Node_list { + nodeInfoResult := pbnode.Node_Info{} + nodeInfoResult.Cpus = uint32(node.Cpus) + nodeInfoResult.Boards = uint32(node.Boards) + nodeInfoResult.RealMemory = node.RealMemory + nodeInfoResult.Sockets = uint32(node.Sockets) + nodeInfoResult.Threads = uint32(node.Threads) + resp.NodeList = append(resp.NodeList, &nodeInfoResult) + } + + return &resp, nil +}*/ diff --git a/adaptor/pcm_slurm/service/slurm_partition.go b/adaptor/pcm_slurm/service/slurm_partition.go new file mode 100644 index 00000000..8e0f4677 --- /dev/null +++ b/adaptor/pcm_slurm/service/slurm_partition.go @@ -0,0 +1,133 @@ +package slurmer + +/* +#cgo LDFLAGS: -lslurm +#include +#include + + + + struct partition_info_msg *get_partition_info(){ + struct partition_info_msg* partition_buffer; + if( slurm_load_partitions ((time_t) NULL, + &partition_buffer, SHOW_ALL)) + return NULL; + return partition_buffer; + } + struct partition_info* partition_from_list(struct partition_info_msg *list, int i){ + return &list->partition_array[i]; +} + void free_partition_buffer(void* buffer){ + + slurm_free_partition_info_msg ((struct partition_info_msg*)buffer); + } +*/ +import "C" +import ( + pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" + "context" + "strings" +) + +func Partition_info_convert_c_to_go(c_struct *C.struct_partition_info) pbslurm.PartitionInfo { + var go_struct pbslurm.PartitionInfo + + go_struct.AllowAllocNodes = C.GoString(c_struct.allow_alloc_nodes) + go_struct.AllowGroups = C.GoString(c_struct.allow_groups) + go_struct.Alternate = C.GoString(c_struct.alternate) + go_struct.CrType = uint32(c_struct.cr_type) + go_struct.DefMemPerCpu = uint64(c_struct.def_mem_per_cpu) + go_struct.DefaultTime = uint32(c_struct.default_time) + go_struct.Flags = uint32(c_struct.flags) + go_struct.GraceTime = uint32(c_struct.grace_time) + go_struct.MaxCpusPerNode = uint32(c_struct.max_cpus_per_node) + go_struct.MaxMemPerCpu = uint64(c_struct.max_mem_per_cpu) + go_struct.MaxNodes = uint32(c_struct.max_nodes) + go_struct.MaxShare = uint32(c_struct.max_share) + go_struct.MaxTime = uint32(c_struct.max_time) + go_struct.MinNodes = uint32(c_struct.min_nodes) + go_struct.Name = C.GoString(c_struct.name) + //go_struct.Node_inx = int32(C.int32_ptr(c_struct.node_inx)) + /*t := C.find_node_inx(c_struct.node_inx) + fmt.Printf("%d", t) + go_struct.Node_inx = make([]int32, t, t) + for i := int32(0); i < int32(t); i++ { + go_struct.Node_inx[i] = int32(C.int32_ptr(c_struct.node_inx, C.int(i))) + + }*/ + go_struct.Nodes = C.GoString(c_struct.nodes) + go_struct.PreemptMode = uint32(c_struct.preempt_mode) + go_struct.StateUp = uint32(c_struct.state_up) + go_struct.TotalCpus = uint32(c_struct.total_cpus) + go_struct.TotalNodes = uint32(c_struct.total_nodes) + return go_struct +} + +type PartitionInfoMsg struct { + LastUpdate int64 + RecordCount uint32 + PartitionInfoList []pbslurm.PartitionInfo +} + +func Get_partitions() PartitionInfoMsg { + var go_partition_buffer PartitionInfoMsg + c_partition_buffer := C.get_partition_info() + if c_partition_buffer == nil { + go_partition_buffer.LastUpdate = int64(0) + go_partition_buffer.RecordCount = uint32(0) + return go_partition_buffer + } + go_partition_buffer.LastUpdate = int64(c_partition_buffer.last_update) + go_partition_buffer.RecordCount = uint32(c_partition_buffer.record_count) + go_partition_buffer.PartitionInfoList = make([]pbslurm.PartitionInfo, c_partition_buffer.record_count, c_partition_buffer.record_count) + for i := uint32(0); i < go_partition_buffer.RecordCount; i++ { + partition := C.partition_from_list(c_partition_buffer, C.int(i)) + go_partition := Partition_info_convert_c_to_go(partition) + go_partition_buffer.PartitionInfoList[i] = go_partition + } + C.slurm_free_partition_info_msg(c_partition_buffer) + + return go_partition_buffer +} + +func (slurmStruct SlurmStruct) ListPartitions(ctx context.Context, req *pbslurm.ListPartitionsReq) (*pbslurm.ListPartitionsResp, error) { + partitionList := Get_partitions() + var resp = pbslurm.ListPartitionsResp{} + for _, partition := range partitionList.PartitionInfoList { + partitionInfoResult := partition + resp.PartitionList = append(resp.PartitionList, &partitionInfoResult) + } + return &resp, nil +} + +func GetPartitionsInfo() PartitionInfoMsg { + var goPartitionBuffer PartitionInfoMsg + cPartitionBuffer := C.get_partition_info() + goPartitionBuffer.RecordCount = uint32(cPartitionBuffer.record_count) + goPartitionBuffer.PartitionInfoList = make([]pbslurm.PartitionInfo, cPartitionBuffer.record_count, cPartitionBuffer.record_count) + + for i := uint32(0); i < goPartitionBuffer.RecordCount; i++ { + partition := C.partition_from_list(&cPartitionBuffer, C.int(i)) + goPartition := PartitionDescriptorConvertCToGo(partition) + goPartitionBuffer.PartitionInfoList[i] = goPartition + } + return goPartitionBuffer +} + +func PartitionDescriptorConvertCToGo(cStruct *C.struct_slurmdb_partition_rec) pbslurm.PartitionInfo { + var goStruct pbslurm.PartitionInfo + goStruct.Name = C.GoString(cStruct.name) + return goStruct +} + +func (slurmStruct SlurmStruct) GetPartition(ctx context.Context, req *pbslurm.GetPartitionReq) (*pbslurm.GetPartitionResp, error) { + PartitionList := GetPartitionsInfo() + resp := pbslurm.GetPartitionResp{} + for _, partition := range PartitionList.PartitionInfoList { + partitionInfoResult := partition + if strings.Contains(partition.Name, req.PartitionName) { + resp.PartitionInfos = append(resp.PartitionInfos, &partitionInfoResult) + } + } + return &resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurm_ping.go b/adaptor/pcm_slurm/service/slurm_ping.go new file mode 100644 index 00000000..d16abf1a --- /dev/null +++ b/adaptor/pcm_slurm/service/slurm_ping.go @@ -0,0 +1,31 @@ +package slurmer + +/* +#cgo LDFLAGS: -lslurm +#include +#include +#include + + // int ping_result; + // ping_result = slurm_ping(int ping) + int slurm_ping(int controller){ + int ping_result; + ping_result = slurm_ping(controller); + return ping_result; + } + +*/ +import "C" +import ( + pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" + "context" +) + +func (slurmStruct SlurmStruct) GetPingResult(ctx context.Context, req *pbslurm.PingInfoMsgReq) (*pbslurm.PingInfoMsgResp, error) { + cgoIntA := C.int(req.Controller) + Ping_result := C.slurm_ping(cgoIntA) + //C.free(unsafe.Pointer(cgoIntA)) + var resp = pbslurm.PingInfoMsgResp{} + resp.PingResult = int32(Ping_result) + return &resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurm_reservation.go b/adaptor/pcm_slurm/service/slurm_reservation.go new file mode 100644 index 00000000..b7eb912b --- /dev/null +++ b/adaptor/pcm_slurm/service/slurm_reservation.go @@ -0,0 +1,161 @@ +package slurmer + +/* +#cgo LDFLAGS: -lslurm +#include +#include +#include + struct reserve_info_msg *get_reserve_info(){ + struct reserve_info_msg* reservation_buffer; + if(slurm_load_reservations ((time_t) NULL, + &reservation_buffer)) + return NULL; + return reservation_buffer; + } + struct reserve_info* reservation_from_list(struct reserve_info_msg *list, int i){ + return &list->reservation_array[i]; +} + void free_reservation_buffer(void* buffer){ + slurm_free_reservation_info_msg ((struct reserve_info_msg*)buffer); + } +*/ +import "C" +import ( + pbslurm "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/gen/idl" + "context" + "strings" +) + +type ReservationInfoMsg struct { + LastUpdate int64 + RecordCount uint32 + ReservationList []pbslurm.ReservationInfo + ErrorCode uint32 +} + +func Reservation_info_convert_c_to_go(c_struct *C.struct_reserve_info) pbslurm.ReservationInfo { + var go_struct pbslurm.ReservationInfo + + go_struct.Accounts = C.GoString(c_struct.accounts) + go_struct.EndTime = int64(c_struct.end_time) + go_struct.Features = C.GoString(c_struct.features) + go_struct.Flags = uint32(c_struct.flags) + go_struct.Licenses = C.GoString(c_struct.licenses) + go_struct.Name = C.GoString(c_struct.name) + go_struct.Features = C.GoString(c_struct.features) + go_struct.NodeCnt = uint32(c_struct.node_cnt) + go_struct.CoreCnt = uint32(c_struct.core_cnt) + /*t := C.find_node_inx(c_struct.node_inx) + + fmt.Printf("%d", t) + go_struct.Node_inx = make([]int32, t, t) + for i := int32(0); i < int32(t); i++ { + go_struct.Node_inx[i] = int32(C.int32_ptr(c_struct.node_inx, C.int(i))) + + }*/ + go_struct.NodeList = C.GoString(c_struct.node_list) + go_struct.Partition = C.GoString(c_struct.partition) + go_struct.StartTime = int64(c_struct.start_time) + //go_struct.clusters = C.GoString(c_struct.clusters) + return go_struct +} + +func Get_all_reservation() ReservationInfoMsg { + var go_reservation_buffer ReservationInfoMsg + c_reservation_buffer := C.get_reserve_info() + if c_reservation_buffer == nil { + go_reservation_buffer.LastUpdate = int64(0) + go_reservation_buffer.RecordCount = uint32(0) + go_reservation_buffer.ErrorCode = uint32(C.slurm_get_errno()) + return go_reservation_buffer + } + go_reservation_buffer.LastUpdate = int64(c_reservation_buffer.last_update) + go_reservation_buffer.RecordCount = uint32(c_reservation_buffer.record_count) + go_reservation_buffer.ReservationList = make([]pbslurm.ReservationInfo, c_reservation_buffer.record_count, c_reservation_buffer.record_count) + for i := uint32(0); i < go_reservation_buffer.RecordCount; i++ { + reservation := C.reservation_from_list(c_reservation_buffer, C.int(i)) + go_reservation := Reservation_info_convert_c_to_go(reservation) + go_reservation_buffer.ReservationList[i] = go_reservation + } + C.slurm_free_reservation_info_msg(c_reservation_buffer) + + return go_reservation_buffer +} + +func (slurmStruct SlurmStruct) ListReservations(ctx context.Context, req *pbslurm.ListReservationsReq) (*pbslurm.ListReservationsResp, error) { + reservationList := Get_all_reservation() + + var resp = pbslurm.ListReservationsResp{} + for _, reservation := range reservationList.ReservationList { + reservationInfoResult := reservation + resp.ReservationList = append(resp.ReservationList, &reservationInfoResult) + } + return &resp, nil +} + +func GetReservationsInfo() ReservationInfoMsg { + var goReservationBuffer ReservationInfoMsg + cReservationBuffer := C.get_reservation_info() + goReservationBuffer.RecordCount = uint32(cReservationBuffer.record_count) + goReservationBuffer.ReservationList = make([]pbslurm.ReservationInfo, cReservationBuffer.record_count, cReservationBuffer.record_count) + + for i := uint32(0); i < goReservationBuffer.RecordCount; i++ { + Reservation := C.reservation_from_list(&cReservationBuffer, C.int(i)) + goReservation := ReservationDescriptorConvertCToGo(Reservation) + goReservationBuffer.ReservationList[i] = goReservation + } + return goReservationBuffer +} + +func ReservationDescriptorConvertCToGo(cStruct *C.struct_slurmdb_reservation_rec) pbslurm.ReservationInfo { + var goStruct pbslurm.ReservationInfo + goStruct.Name = C.GoString(cStruct.name) + return goStruct +} + +func (slurmStruct SlurmStruct) GetReservation(ctx context.Context, req *pbslurm.GetReservationReq) (*pbslurm.GetReservationResp, error) { + ReservationList := GetReservationsInfo() + resp := pbslurm.GetReservationResp{} + for _, reservation := range ReservationList.ReservationList { + reservationInfoResult := reservation + if strings.Contains(reservation.Name, req.ReservationName) { + resp.ReservationInfos = append(resp.ReservationInfos, &reservationInfoResult) + } + } + return &resp, nil +} + +/*func (slurmStruct SlurmStruct) GetReservationByName(ctx context.Context, req *pbslurm.ReservationInfoMsgReq) (*pbslurm.ReservationInfoMsgResp, error) { + reservation := Get_reservation_info(req.ReservationName) + var resp = pbslurm.ReservationInfoMsgResp{} + for _, reservation := range reservation.Reservation_list { + reservationInfoResult := pbslurm.Reservation_Info{} + reservationInfoResult.Name = reservation.Name + /*nodeInfoResult.Boards = uint32(node.Boards) + nodeInfoResult.RealMemory = node.Real_memory + nodeInfoResult.Sockets = uint32(node.Sockets) + nodeInfoResult.Threads = uint32(node.Threads)* + resp.ReservationList = append(resp.ReservationList, &reservationInfoResult) + } + return &resp, nil +} + +func Get_reservation_info(name string) ReserveInfoMsg { + go_reservation_buffer := Get_all_reservation() + //partitionList := list.New() + for i := range go_reservation_buffer.ReservationList { + //遍历nodeList集合 + reservation := go_reservation_buffer.ReservationList[i] + fmt.Println("reservationName: " + reservation.Name) + //当集合中的名字等于传过来的值 + if name == reservation.Name { + /*partitionList.PushFront(partition.Name) + partitionList.PushFront(partition.Nodes)* + } else { + + } + //fmt.Println(partition.Node_inx) + } + return go_reservation_buffer + +}*/ diff --git a/adaptor/pcm_slurm/service/slurmdb_cluster.go b/adaptor/pcm_slurm/service/slurmdb_cluster.go index a84d082f..f7773ca1 100644 --- a/adaptor/pcm_slurm/service/slurmdb_cluster.go +++ b/adaptor/pcm_slurm/service/slurmdb_cluster.go @@ -80,7 +80,7 @@ func GetClusterInfo() ClusterInfoMsg { return go_cluster_buffer } -func (slurmStruct SlurmStruct) GetAllClusters(ctx context.Context, req *pbslurm.ListClustersReq) (*pbslurm.ListClustersResp, error) { +func (slurmStruct SlurmStruct) ListClusters(ctx context.Context, req *pbslurm.ListClustersReq) (*pbslurm.ListClustersResp, error) { clusterList := GetClusterInfo() diff --git a/adaptor/pcm_slurm/service/slurmer.go b/adaptor/pcm_slurm/service/slurmer.go index 6ed09730..ddd5edf2 100644 --- a/adaptor/pcm_slurm/service/slurmer.go +++ b/adaptor/pcm_slurm/service/slurmer.go @@ -19,6 +19,16 @@ type Slurmer interface { ListQoss(ctx context.Context, req *pbslurm.ListQossReq) (resp *pbslurm.ListQossResp, err error) //list slurm qoss ListWckeys(ctx context.Context, req *pbslurm.ListWckeysReq) (resp *pbslurm.ListWckeysResp, err error) //list slurm wckeys GetWckey(ctx context.Context, req *pbslurm.GetWckeyReq) (resp *pbslurm.GetWckeyResp, err error) //list slurm wckeys + ListClusters(ctx context.Context, req *pbslurm.ListClustersReq) (resp *pbslurm.ListClustersResp, err error) + GetCluster(ctx context.Context, req *pbslurm.GetClusterReq) (resp *pbslurm.GetClusterResp, err error) + DeleteCluster(ctx context.Context, req *pbslurm.DeleteClusterReq) (resp *pbslurm.DeleteClusterResp, err error) + AddCluster(ctx context.Context, req *pbslurm.AddClusterReq) (resp *pbslurm.AddClusterResp, err error) + ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (resp *pbslurm.ListNodesResp, err error) + GetNode(ctx context.Context, req *pbslurm.GetNodeResp) (resp *pbslurm.GetNodeResp, err error) + ListPartitions(ctx context.Context, req *pbslurm.ListPartitionsReq) (resp *pbslurm.ListPartitionsResp, err error) + GetPartition(ctx context.Context, req *pbslurm.GetPartitionReq) (resp *pbslurm.GetPartitionResp, err error) + ListReservations(ctx context.Context, req *pbslurm.ListReservationsReq) (resp *pbslurm.ListReservationsResp, err error) + GetReservation(ctx context.Context, req *pbslurm.GetReservationReq) (resp *pbslurm.GetReservationResp, err error) } func SelectSlurmVersion(slurmVersion pbslurm.SlurmVersion) (slurmer Slurmer, err error) { From c957c4112931468fbbf705e1e8f42bc1aae8310e Mon Sep 17 00:00:00 2001 From: qiwang <1364512070@qq.com> Date: Tue, 15 Nov 2022 21:05:09 -0800 Subject: [PATCH 11/11] fix:add interface --- adaptor/pcm_slurm/idl/slurm.proto | 35 ++++++ adaptor/pcm_slurm/idl/slurm.yaml | 21 +++- adaptor/pcm_slurm/server/slurm.go | 100 ++++++++++++++++++ adaptor/pcm_slurm/server/slurmImpl.go | 90 ++++++++++++++++ adaptor/pcm_slurm/service/slurm_node.go | 5 +- adaptor/pcm_slurm/service/slurm_partition.go | 4 +- .../pcm_slurm/service/slurm_reservation.go | 6 +- adaptor/pcm_slurm/service/slurmer.go | 2 +- 8 files changed, 253 insertions(+), 10 deletions(-) diff --git a/adaptor/pcm_slurm/idl/slurm.proto b/adaptor/pcm_slurm/idl/slurm.proto index 3ded6df6..13d68d14 100644 --- a/adaptor/pcm_slurm/idl/slurm.proto +++ b/adaptor/pcm_slurm/idl/slurm.proto @@ -3,6 +3,10 @@ package slurm; option go_package = "/slurmpb"; import "idl/slurm_node.proto"; +import "idl/slurm_partition.proto"; +import "idl/slurm_reservation.proto"; +import "idl/slurm_ping.proto"; +import "idl/slurmdb_cluster.proto"; import "idl/slurmdb_user.proto"; import "idl/slurmdb_assoc.proto"; import "idl/slurmdb_account.proto"; @@ -10,6 +14,7 @@ import "idl/slurmdb_qos.proto"; import "idl/slurmdb_wckey.proto"; + // Slurm Services service SlurmService { @@ -51,4 +56,34 @@ service SlurmService { // get specific wckey info from slurmdb rpc GetWckey(GetWckeyReq) returns (GetWckeyResp); + + // list all Cluster from slurmdb + rpc ListClusters(ListClustersReq) returns (ListClustersResp); + + // get specific user info from slurmdb + rpc GetCluster(GetClusterReq) returns (GetClusterResp); + + // add new user + rpc AddCluster(AddClusterReq) returns (AddClusterResp); + + // delete specific user + rpc DeleteCluster(DeleteClusterReq) returns (DeleteClusterResp); + + // list all Node from slurm + rpc ListNodes(ListNodesReq) returns (ListNodesResp); + + // get specific Node info from slurm + rpc GetNode(GetNodeReq) returns (GetNodeResp); + + // list all Partition from slurm + rpc ListPartitions(ListPartitionsReq) returns (ListPartitionsResp); + + // get specific Partition info from slurm + rpc GetPartition(GetPartitionReq) returns (GetPartitionResp); + + // list all Reservation from slurm + rpc ListReservations(ListReservationsReq) returns (ListReservationsResp); + + // get specific Reservation info from slurm + rpc GetReservation(GetReservationReq) returns (GetReservationResp); } diff --git a/adaptor/pcm_slurm/idl/slurm.yaml b/adaptor/pcm_slurm/idl/slurm.yaml index 12ab4fc8..6301f57b 100644 --- a/adaptor/pcm_slurm/idl/slurm.yaml +++ b/adaptor/pcm_slurm/idl/slurm.yaml @@ -29,4 +29,23 @@ http: get: "/apis/slurm/listWckeys" - selector: slurm.SlurmService.GetWckey get: "/apis/slurm/getWckey" - + - selector: slurm.SlurmService.ListClusters + get: "/apis/slurm/listClusters" + - selector: slurm.SlurmService.GetCluster + get: "/apis/slurm/getCluster" + - selector: slurm.SlurmService.AddCluster + post: "/apis/slurm/addCluster" + - selector: slurm.SlurmService.DeleteCluster + delete: "/apis/slurm/deleteCluster" + - selector: slurm.SlurmService.ListNodes + get: "/apis/slurm/listNodes" + - selector: slurm.SlurmService.GetNode + get: "/apis/slurm/getNode" + - selector: slurm.SlurmService.ListPartitions + get: "/apis/slurm/listPartitions" + - selector: slurm.SlurmService.GetPartition + get: "/apis/slurm/getPartition" + - selector: slurm.SlurmService.ListReservations + get: "/apis/slurm/listReservations" + - selector: slurm.SlurmService.GetReservation + get: "/apis/slurm/getReservation" diff --git a/adaptor/pcm_slurm/server/slurm.go b/adaptor/pcm_slurm/server/slurm.go index d0258484..5d108b76 100644 --- a/adaptor/pcm_slurm/server/slurm.go +++ b/adaptor/pcm_slurm/server/slurm.go @@ -141,3 +141,103 @@ func (s *Server) GetWckey(ctx context.Context, req *slurmpb.GetWckeyReq) (*slurm } return resp, nil } + +// ListUsers return all slurm Clusters +func (s *Server) ListClusters(ctx context.Context, req *slurmpb.ListClustersReq) (*slurmpb.ListClustersResp, error) { + resp, err := ListClusters(ctx, req) + if err != nil { + glog.Errorf("ListSlurmUsers error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// GetUser return specific slurm user +func (s *Server) GetCluster(ctx context.Context, req *slurmpb.GetClusterReq) (*slurmpb.GetClusterResp, error) { + resp, err := GetCluster(ctx, req) + if err != nil { + glog.Errorf("GetSlurmUser error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// DeleteUser delete specific slurm user +func (s *Server) DeleteCluster(ctx context.Context, req *slurmpb.DeleteClusterReq) (*slurmpb.DeleteClusterResp, error) { + resp, err := DeleteCluster(ctx, req) + if err != nil { + glog.Errorf("DeleteSlurmUser error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// AddCluster add slurm user +func (s *Server) AddCluster(ctx context.Context, req *slurmpb.AddClusterReq) (*slurmpb.AddClusterResp, error) { + resp, err := AddCluster(ctx, req) + if err != nil { + glog.Errorf("AddSlurmCluster error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// GetNode return specific slurm user +func (s *Server) GetNode(ctx context.Context, req *slurmpb.GetNodeReq) (*slurmpb.GetNodeResp, error) { + resp, err := GetNode(ctx, req) + if err != nil { + glog.Errorf("GetSlurmUser error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// ListUsers return all slurm Clusters +func (s *Server) ListNodes(ctx context.Context, req *slurmpb.ListNodesReq) (*slurmpb.ListNodesResp, error) { + resp, err := ListNodes(ctx, req) + if err != nil { + glog.Errorf("ListSlurmNodes error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// ListUsers return all slurm Clusters +func (s *Server) ListPartitions(ctx context.Context, req *slurmpb.ListPartitionsReq) (*slurmpb.ListPartitionsResp, error) { + resp, err := ListPartitions(ctx, req) + if err != nil { + glog.Errorf("ListPartitions error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// GetNode return specific slurm user +func (s *Server) GetPartition(ctx context.Context, req *slurmpb.GetPartitionReq) (*slurmpb.GetPartitionResp, error) { + resp, err := GetPartition(ctx, req) + if err != nil { + glog.Errorf("GetPartition error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// GetReservation return specific slurm user +func (s *Server) GetReservation(ctx context.Context, req *slurmpb.GetReservationReq) (*slurmpb.GetReservationResp, error) { + resp, err := GetReservation(ctx, req) + if err != nil { + glog.Errorf("GetPartition error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} + +// ListUsers return all slurm Clusters +func (s *Server) ListReservations(ctx context.Context, req *slurmpb.ListReservationsReq) (*slurmpb.ListReservationsResp, error) { + resp, err := ListReservations(ctx, req) + if err != nil { + glog.Errorf("ListReservations error %+v", err) + return nil, status.Errorf(codes.Internal, err.Error()) + } + return resp, nil +} diff --git a/adaptor/pcm_slurm/server/slurmImpl.go b/adaptor/pcm_slurm/server/slurmImpl.go index a0a5dfb0..51893bab 100644 --- a/adaptor/pcm_slurm/server/slurmImpl.go +++ b/adaptor/pcm_slurm/server/slurmImpl.go @@ -122,3 +122,93 @@ func GetWckey(ctx context.Context, req *pbslurm.GetWckeyReq) (*pbslurm.GetWckeyR resp, _ := slurm.GetWckey(ctx, req) return resp, nil } + +func ListClusters(ctx context.Context, req *pbslurm.ListClustersReq) (*pbslurm.ListClustersResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.ListClusters(ctx, req) + return resp, nil +} + +func GetCluster(ctx context.Context, req *pbslurm.GetClusterReq) (*pbslurm.GetClusterResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.GetCluster(ctx, req) + return resp, nil +} + +func DeleteCluster(ctx context.Context, req *pbslurm.DeleteClusterReq) (*pbslurm.DeleteClusterResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.DeleteCluster(ctx, req) + return resp, nil +} + +func AddCluster(ctx context.Context, req *pbslurm.AddClusterReq) (*pbslurm.AddClusterResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.AddCluster(ctx, req) + return resp, nil +} + +func ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (*pbslurm.ListNodesResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.ListNodes(ctx, req) + return resp, nil +} + +func GetNode(ctx context.Context, req *pbslurm.GetNodeReq) (*pbslurm.GetNodeResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.GetNode(ctx, req) + return resp, nil +} + +func ListPartitions(ctx context.Context, req *pbslurm.ListPartitionsReq) (*pbslurm.ListPartitionsResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.ListPartitions(ctx, req) + return resp, nil +} + +func GetPartition(ctx context.Context, req *pbslurm.GetPartitionReq) (*pbslurm.GetPartitionResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.GetPartition(ctx, req) + return resp, nil +} + +func GetReservation(ctx context.Context, req *pbslurm.GetReservationReq) (*pbslurm.GetReservationResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.GetReservation(ctx, req) + return resp, nil +} + +func ListReservations(ctx context.Context, req *pbslurm.ListReservationsReq) (*pbslurm.ListReservationsResp, error) { + slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) + if slurm == nil { + return nil, nil + } + resp, _ := slurm.ListReservations(ctx, req) + return resp, nil +} diff --git a/adaptor/pcm_slurm/service/slurm_node.go b/adaptor/pcm_slurm/service/slurm_node.go index 1fb1709a..64c73d56 100644 --- a/adaptor/pcm_slurm/service/slurm_node.go +++ b/adaptor/pcm_slurm/service/slurm_node.go @@ -149,7 +149,7 @@ func Get_all_nodes() NodeInfoMsg { return go_node_buffer } -func NodeDescriptorConvertCToGo(cStruct *C.struct_slurmdb_account_rec) pbslurm.NodeInfo { +func NodeDescriptorConvertCToGo(cStruct *C.struct_node_info) pbslurm.NodeInfo { var goStruct pbslurm.NodeInfo goStruct.Name = C.GoString(cStruct.name) return goStruct @@ -160,9 +160,8 @@ func GetNodeInfo() NodeInfoMsg { cNodeBuffer := C.get_node_info() goNodeBuffer.RecordCount = uint32(cNodeBuffer.record_count) goNodeBuffer.NodeInfoList = make([]pbslurm.NodeInfo, cNodeBuffer.record_count, cNodeBuffer.record_count) - for i := uint32(0); i < goNodeBuffer.RecordCount; i++ { - Node := C.node_from_list(&cNodeBuffer, C.int(i)) + Node := C.node_from_list(cNodeBuffer, C.int(i)) goNode := NodeDescriptorConvertCToGo(Node) goNodeBuffer.NodeInfoList[i] = goNode } diff --git a/adaptor/pcm_slurm/service/slurm_partition.go b/adaptor/pcm_slurm/service/slurm_partition.go index 8e0f4677..a6ad98ec 100644 --- a/adaptor/pcm_slurm/service/slurm_partition.go +++ b/adaptor/pcm_slurm/service/slurm_partition.go @@ -107,14 +107,14 @@ func GetPartitionsInfo() PartitionInfoMsg { goPartitionBuffer.PartitionInfoList = make([]pbslurm.PartitionInfo, cPartitionBuffer.record_count, cPartitionBuffer.record_count) for i := uint32(0); i < goPartitionBuffer.RecordCount; i++ { - partition := C.partition_from_list(&cPartitionBuffer, C.int(i)) + partition := C.partition_from_list(cPartitionBuffer, C.int(i)) goPartition := PartitionDescriptorConvertCToGo(partition) goPartitionBuffer.PartitionInfoList[i] = goPartition } return goPartitionBuffer } -func PartitionDescriptorConvertCToGo(cStruct *C.struct_slurmdb_partition_rec) pbslurm.PartitionInfo { +func PartitionDescriptorConvertCToGo(cStruct *C.struct_partition_info) pbslurm.PartitionInfo { var goStruct pbslurm.PartitionInfo goStruct.Name = C.GoString(cStruct.name) return goStruct diff --git a/adaptor/pcm_slurm/service/slurm_reservation.go b/adaptor/pcm_slurm/service/slurm_reservation.go index b7eb912b..b8035aaa 100644 --- a/adaptor/pcm_slurm/service/slurm_reservation.go +++ b/adaptor/pcm_slurm/service/slurm_reservation.go @@ -95,19 +95,19 @@ func (slurmStruct SlurmStruct) ListReservations(ctx context.Context, req *pbslur func GetReservationsInfo() ReservationInfoMsg { var goReservationBuffer ReservationInfoMsg - cReservationBuffer := C.get_reservation_info() + cReservationBuffer := C.get_reserve_info() goReservationBuffer.RecordCount = uint32(cReservationBuffer.record_count) goReservationBuffer.ReservationList = make([]pbslurm.ReservationInfo, cReservationBuffer.record_count, cReservationBuffer.record_count) for i := uint32(0); i < goReservationBuffer.RecordCount; i++ { - Reservation := C.reservation_from_list(&cReservationBuffer, C.int(i)) + Reservation := C.reservation_from_list(cReservationBuffer, C.int(i)) goReservation := ReservationDescriptorConvertCToGo(Reservation) goReservationBuffer.ReservationList[i] = goReservation } return goReservationBuffer } -func ReservationDescriptorConvertCToGo(cStruct *C.struct_slurmdb_reservation_rec) pbslurm.ReservationInfo { +func ReservationDescriptorConvertCToGo(cStruct *C.struct_reserve_info) pbslurm.ReservationInfo { var goStruct pbslurm.ReservationInfo goStruct.Name = C.GoString(cStruct.name) return goStruct diff --git a/adaptor/pcm_slurm/service/slurmer.go b/adaptor/pcm_slurm/service/slurmer.go index ddd5edf2..18105b53 100644 --- a/adaptor/pcm_slurm/service/slurmer.go +++ b/adaptor/pcm_slurm/service/slurmer.go @@ -24,7 +24,7 @@ type Slurmer interface { DeleteCluster(ctx context.Context, req *pbslurm.DeleteClusterReq) (resp *pbslurm.DeleteClusterResp, err error) AddCluster(ctx context.Context, req *pbslurm.AddClusterReq) (resp *pbslurm.AddClusterResp, err error) ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (resp *pbslurm.ListNodesResp, err error) - GetNode(ctx context.Context, req *pbslurm.GetNodeResp) (resp *pbslurm.GetNodeResp, err error) + GetNode(ctx context.Context, req *pbslurm.GetNodeReq) (resp *pbslurm.GetNodeResp, err error) ListPartitions(ctx context.Context, req *pbslurm.ListPartitionsReq) (resp *pbslurm.ListPartitionsResp, err error) GetPartition(ctx context.Context, req *pbslurm.GetPartitionReq) (resp *pbslurm.GetPartitionResp, err error) ListReservations(ctx context.Context, req *pbslurm.ListReservationsReq) (resp *pbslurm.ListReservationsResp, err error)