forked from jcce-pcm/pcm-openstack
修改updateServer字段类型
This commit is contained in:
parent
ccda108a3a
commit
621f06a5f1
|
@ -32,7 +32,7 @@ func (l *UpdateServerLogic) UpdateServer(in *openstack.UpdateServerReq) (*openst
|
|||
var resp openstack.UpdateServerResp
|
||||
//println(in)
|
||||
println(in.ServerId)
|
||||
reqByte, err := json.Marshal(in.ServerDouble)
|
||||
reqByte, err := json.Marshal(in.ServerUpdate)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -842,7 +842,7 @@ type UpdateServerReq struct {
|
|||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ServerId string `protobuf:"bytes,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
|
||||
ServerDouble *ServerDouble `protobuf:"bytes,2,opt,name=server_double,json=serverDouble,proto3" json:"server_double,omitempty"`
|
||||
ServerUpdate *ServerUpdate `protobuf:"bytes,2,opt,name=server_update,json=serverUpdate,proto3" json:"server_update,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UpdateServerReq) Reset() {
|
||||
|
@ -884,14 +884,14 @@ func (x *UpdateServerReq) GetServerId() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateServerReq) GetServerDouble() *ServerDouble {
|
||||
func (x *UpdateServerReq) GetServerUpdate() *ServerUpdate {
|
||||
if x != nil {
|
||||
return x.ServerDouble
|
||||
return x.ServerUpdate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ServerDouble struct {
|
||||
type ServerUpdate struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
@ -899,8 +899,8 @@ type ServerDouble struct {
|
|||
Server *Server `protobuf:"bytes,2,opt,name=server,proto3" json:"server,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ServerDouble) Reset() {
|
||||
*x = ServerDouble{}
|
||||
func (x *ServerUpdate) Reset() {
|
||||
*x = ServerUpdate{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pcm_openstack_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
|
@ -908,13 +908,13 @@ func (x *ServerDouble) Reset() {
|
|||
}
|
||||
}
|
||||
|
||||
func (x *ServerDouble) String() string {
|
||||
func (x *ServerUpdate) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ServerDouble) ProtoMessage() {}
|
||||
func (*ServerUpdate) ProtoMessage() {}
|
||||
|
||||
func (x *ServerDouble) ProtoReflect() protoreflect.Message {
|
||||
func (x *ServerUpdate) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pcm_openstack_proto_msgTypes[15]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
|
@ -926,12 +926,12 @@ func (x *ServerDouble) ProtoReflect() protoreflect.Message {
|
|||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ServerDouble.ProtoReflect.Descriptor instead.
|
||||
func (*ServerDouble) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use ServerUpdate.ProtoReflect.Descriptor instead.
|
||||
func (*ServerUpdate) Descriptor() ([]byte, []int) {
|
||||
return file_pcm_openstack_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
func (x *ServerDouble) GetServer() *Server {
|
||||
func (x *ServerUpdate) GetServer() *Server {
|
||||
if x != nil {
|
||||
return x.Server
|
||||
}
|
||||
|
@ -17445,11 +17445,11 @@ var file_pcm_openstack_proto_rawDesc = []byte{
|
|||
0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1b,
|
||||
0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0d, 0x73,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x53,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x0c, 0x73, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x22, 0x39, 0x0a, 0x0c, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x72,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x73, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x39, 0x0a, 0x0c, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
|
||||
0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65,
|
||||
0x72, 0x76, 0x65, 0x72, 0x22, 0xac, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12,
|
||||
|
@ -19615,7 +19615,7 @@ var file_pcm_openstack_proto_goTypes = []interface{}{
|
|||
(*GetServersDetailedByIdReq)(nil), // 12: openstack.GetServersDetailedByIdReq
|
||||
(*GetServersDetailedByIdResp)(nil), // 13: openstack.GetServersDetailedByIdResp
|
||||
(*UpdateServerReq)(nil), // 14: openstack.UpdateServerReq
|
||||
(*ServerDouble)(nil), // 15: openstack.ServerDouble
|
||||
(*ServerUpdate)(nil), // 15: openstack.ServerUpdate
|
||||
(*Server)(nil), // 16: openstack.Server
|
||||
(*UpdateServerResp)(nil), // 17: openstack.UpdateServerResp
|
||||
(*StartServerReq)(nil), // 18: openstack.StartServerReq
|
||||
|
@ -19819,8 +19819,8 @@ var file_pcm_openstack_proto_depIdxs = []int32{
|
|||
105, // 5: openstack.CreateServerReq.server:type_name -> openstack.CreateServerReq.Server
|
||||
109, // 6: openstack.CreateServerResp.server:type_name -> openstack.CreateServerResp.Server
|
||||
121, // 7: openstack.GetServersDetailedByIdResp.server:type_name -> openstack.GetServersDetailedByIdResp.Servers
|
||||
15, // 8: openstack.UpdateServerReq.server_double:type_name -> openstack.ServerDouble
|
||||
16, // 9: openstack.ServerDouble.server:type_name -> openstack.Server
|
||||
15, // 8: openstack.UpdateServerReq.server_update:type_name -> openstack.ServerUpdate
|
||||
16, // 9: openstack.ServerUpdate.server:type_name -> openstack.Server
|
||||
131, // 10: openstack.UpdateServerResp.server:type_name -> openstack.UpdateServerResp.Server
|
||||
132, // 11: openstack.StartServerReq.osStart:type_name -> openstack.StartServerReq.OsStart
|
||||
133, // 12: openstack.StopServerReq.osStop:type_name -> openstack.StopServerReq.OsStop
|
||||
|
@ -20221,7 +20221,7 @@ func file_pcm_openstack_proto_init() {
|
|||
}
|
||||
}
|
||||
file_pcm_openstack_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ServerDouble); i {
|
||||
switch v := v.(*ServerUpdate); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
|
|
@ -167,7 +167,7 @@ type (
|
|||
RebootServerReq_Reboot = openstack.RebootServerReq_Reboot
|
||||
RebootServerResp = openstack.RebootServerResp
|
||||
Server = openstack.Server
|
||||
ServerDouble = openstack.ServerDouble
|
||||
ServerUpdate = openstack.ServerUpdate
|
||||
ShowNetworkDetailsReq = openstack.ShowNetworkDetailsReq
|
||||
ShowNetworkDetailsResp = openstack.ShowNetworkDetailsResp
|
||||
ShowNodeDetailsReq = openstack.ShowNodeDetailsReq
|
||||
|
|
Loading…
Reference in New Issue