| @@ -0,0 +1,103 @@ | |||
| package test | |||
| // | |||
| ///* | |||
| //#cgo LDFLAGS: -lslurmdb | |||
| // | |||
| //#include <stdio.h> | |||
| //#include <slurm/slurm.h> | |||
| //#include <slurm/slurmdb.h> | |||
| //#include <memory.h> | |||
| //#include <malloc.h> | |||
| // | |||
| //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) | |||
| //} | |||
| @@ -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{ | |||
| @@ -32,73 +32,73 @@ var _ = utilities.NewDoubleArray | |||
| var _ = metadata.Join | |||
| var ( | |||
| filter_SlurmService_ListNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |||
| filter_SlurmService_ListUsers_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 | |||
| 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_ListNodes_0); err != nil { | |||
| 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.ListNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) | |||
| msg, err := client.ListUsers(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 | |||
| 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_ListNodes_0); err != nil { | |||
| 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.ListNodes(ctx, &protoReq) | |||
| msg, err := server.ListUsers(ctx, &protoReq) | |||
| return msg, metadata, err | |||
| } | |||
| var ( | |||
| filter_SlurmService_ListUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | |||
| filter_SlurmService_GetUser_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 | |||
| 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_ListUsers_0); err != nil { | |||
| 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.ListUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) | |||
| msg, err := client.GetUser(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 | |||
| 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_ListUsers_0); err != nil { | |||
| 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.ListUsers(ctx, &protoReq) | |||
| msg, err := server.GetUser(ctx, &protoReq) | |||
| return msg, metadata, err | |||
| } | |||
| @@ -139,13 +139,121 @@ 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) { | |||
| 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 | |||
| @@ -153,12 +261,12 @@ func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu | |||
| 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")) | |||
| 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_ListNodes_0(annotatedContext, inboundMarshaler, server, req, pathParams) | |||
| 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 { | |||
| @@ -166,11 +274,11 @@ func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu | |||
| return | |||
| } | |||
| forward_SlurmService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |||
| forward_SlurmService_ListUsers_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) { | |||
| 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 | |||
| @@ -178,12 +286,12 @@ func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu | |||
| 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")) | |||
| 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_ListUsers_0(annotatedContext, inboundMarshaler, server, req, pathParams) | |||
| 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 { | |||
| @@ -191,7 +299,7 @@ func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu | |||
| return | |||
| } | |||
| forward_SlurmService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |||
| forward_SlurmService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |||
| }) | |||
| @@ -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,47 +444,47 @@ 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) { | |||
| 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/ListNodes", runtime.WithHTTPPathPattern("/apis/slurm/listNodes")) | |||
| 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_ListNodes_0(annotatedContext, inboundMarshaler, client, req, pathParams) | |||
| 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_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |||
| forward_SlurmService_ListUsers_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) { | |||
| 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/ListUsers", runtime.WithHTTPPathPattern("/apis/slurm/listUsers")) | |||
| 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_ListUsers_0(annotatedContext, inboundMarshaler, client, req, pathParams) | |||
| 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_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |||
| forward_SlurmService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | |||
| }) | |||
| @@ -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 | |||
| ) | |||
| @@ -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,38 +152,38 @@ 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) | |||
| 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).ListNodes(ctx, in) | |||
| return srv.(SlurmServiceServer).ListUsers(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/slurm.SlurmService/ListNodes", | |||
| FullMethod: "/slurm.SlurmService/ListUsers", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(SlurmServiceServer).ListNodes(ctx, req.(*ListNodesReq)) | |||
| return srv.(SlurmServiceServer).ListUsers(ctx, req.(*ListUsersReq)) | |||
| } | |||
| 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) | |||
| 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).ListUsers(ctx, in) | |||
| return srv.(SlurmServiceServer).GetUser(ctx, in) | |||
| } | |||
| info := &grpc.UnaryServerInfo{ | |||
| Server: srv, | |||
| FullMethod: "/slurm.SlurmService/ListUsers", | |||
| FullMethod: "/slurm.SlurmService/GetUser", | |||
| } | |||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||
| return srv.(SlurmServiceServer).ListUsers(ctx, req.(*ListUsersReq)) | |||
| return srv.(SlurmServiceServer).GetUser(ctx, req.(*GetUserReq)) | |||
| } | |||
| return interceptor(ctx, in, info, handler) | |||
| } | |||
| @@ -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", | |||
| @@ -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 *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 *AccountingInfo) GetId() int32 { | |||
| func (x *ListAccountsReq) GetSlurmVersion() SlurmVersion { | |||
| if x != nil { | |||
| return x.Id | |||
| return x.SlurmVersion | |||
| } | |||
| return 0 | |||
| return SlurmVersion_tianhe | |||
| } | |||
| func (x *AccountingInfo) GetPeriodStart() *timestamppb.Timestamp { | |||
| 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.PeriodStart | |||
| 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, | |||
| }, | |||
| @@ -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 | |||
| } | |||
| @@ -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, | |||
| }, | |||
| @@ -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{} { | |||
| @@ -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, | |||
| }, | |||
| @@ -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 { | |||
| @@ -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,53 +251,47 @@ | |||
| } | |||
| } | |||
| }, | |||
| "slurmListNodesResp": { | |||
| "slurmGetUserResp": { | |||
| "type": "object", | |||
| "properties": { | |||
| "nodeInfos": { | |||
| "userInfo": { | |||
| "type": "array", | |||
| "items": { | |||
| "$ref": "#/definitions/slurmNodeInfo" | |||
| "$ref": "#/definitions/slurmUserInfo" | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| "slurmListUsersResp": { | |||
| "slurmListAccountsResp": { | |||
| "type": "object", | |||
| "properties": { | |||
| "userInfos": { | |||
| "accountInfos": { | |||
| "type": "array", | |||
| "items": { | |||
| "$ref": "#/definitions/slurmUserInfo" | |||
| "$ref": "#/definitions/slurmAccountInfo" | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| "slurmNodeInfo": { | |||
| "slurmListAssociationsResp": { | |||
| "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" | |||
| "assocInfos": { | |||
| "type": "array", | |||
| "items": { | |||
| "$ref": "#/definitions/slurmAssociationInfo" | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| "slurmListUsersResp": { | |||
| "type": "object", | |||
| "properties": { | |||
| "userInfos": { | |||
| "type": "array", | |||
| "items": { | |||
| "$ref": "#/definitions/slurmUserInfo" | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| @@ -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" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -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); | |||
| } | |||
| @@ -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" | |||
| @@ -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; | |||
| } | |||
| @@ -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; | |||
| } | |||
| @@ -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; | |||
| } | |||
| 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; | |||
| } | |||
| @@ -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{ | |||
| @@ -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; | |||
| } | |||
| @@ -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 ; | |||
| @@ -12,21 +12,21 @@ 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) | |||
| // 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("ListSlurmNodes error %+v", err) | |||
| glog.Errorf("ListSlurmUsers 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) | |||
| // 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("ListSlurmUsers error %+v", err) | |||
| glog.Errorf("GetSlurmUser error %+v", err) | |||
| return nil, status.Errorf(codes.Internal, err.Error()) | |||
| } | |||
| return resp, nil | |||
| @@ -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 | |||
| } | |||
| @@ -6,21 +6,21 @@ import ( | |||
| "context" | |||
| ) | |||
| func ListNodes(ctx context.Context, req *pbslurm.ListNodesReq) (*pbslurm.ListNodesResp, error) { | |||
| func ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (*pbslurm.ListUsersResp, error) { | |||
| slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) | |||
| if slurm == nil { | |||
| return nil, nil | |||
| } | |||
| resp, _ := slurm.ListNodes(ctx, req) | |||
| resp, _ := slurm.ListUsers(ctx, req) | |||
| return resp, nil | |||
| } | |||
| func ListUsers(ctx context.Context, req *pbslurm.ListUsersReq) (*pbslurm.ListUsersResp, error) { | |||
| func GetUser(ctx context.Context, req *pbslurm.GetUserReq) (*pbslurm.GetUserResp, error) { | |||
| slurm, _ := slurmer.SelectSlurmVersion(req.SlurmVersion) | |||
| if slurm == nil { | |||
| return nil, nil | |||
| } | |||
| resp, _ := slurm.ListUsers(ctx, req) | |||
| resp, _ := slurm.GetUser(ctx, req) | |||
| return resp, 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 | |||
| } | |||
| @@ -1,227 +0,0 @@ | |||
| package slurmer | |||
| // | |||
| ///* | |||
| //#cgo LDFLAGS: -lslurm | |||
| //#include<stdlib.h> | |||
| //#include<slurm/slurm.h> | |||
| //#include<slurm/slurm_errno.h> | |||
| //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 | |||
| //} | |||
| @@ -0,0 +1,113 @@ | |||
| package slurmer | |||
| /* | |||
| #cgo LDFLAGS: -lslurmdb | |||
| #include <stdio.h> | |||
| #include <slurm/slurm.h> | |||
| #include <slurm/slurmdb.h> | |||
| #include <memory.h> | |||
| #include <malloc.h> | |||
| 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 | |||
| } | |||
| @@ -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 | |||
| assocResult := assoc | |||
| resp.AssocInfos = append(resp.AssocInfos, &assocResult) | |||
| } | |||
| resp.AssocInfos = append(resp.AssocInfos, &assocInfoResult) | |||
| 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 | |||
| @@ -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) | |||
| 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 | |||
| 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 < 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 | |||
| } | |||
| @@ -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) { | |||
| @@ -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 | |||
| } | |||