forked from jcce-pcm/pcm-openstack
暂停,启动,停止实例修改
This commit is contained in:
parent
4898d0c030
commit
cbdceff549
|
@ -30,7 +30,10 @@ func NewPauseServerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Pause
|
|||
func (l *PauseServerLogic) PauseServer(in *openstack.PauseServerReq) (*openstack.PauseServerResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.PauseServerResp
|
||||
reqByte, err := json.Marshal(in)
|
||||
in.Action = map[string]string{
|
||||
in.PauseAction: "",
|
||||
}
|
||||
reqByte, err := json.Marshal(in.Action)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -30,7 +30,10 @@ func NewStartServerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Start
|
|||
func (l *StartServerLogic) StartServer(in *openstack.StartServerReq) (*openstack.StartServerResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.StartServerResp
|
||||
reqByte, err := json.Marshal(in)
|
||||
in.Action = map[string]string{
|
||||
in.StartAction: "",
|
||||
}
|
||||
reqByte, err := json.Marshal(in.Action)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -30,7 +30,10 @@ func NewStopServerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *StopSe
|
|||
func (l *StopServerLogic) StopServer(in *openstack.StopServerReq) (*openstack.StopServerResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
var resp openstack.StopServerResp
|
||||
reqByte, err := json.Marshal(in)
|
||||
in.Action = map[string]string{
|
||||
in.StopAction: "",
|
||||
}
|
||||
reqByte, err := json.Marshal(in.Action)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -161,7 +161,6 @@ type (
|
|||
ListVolumesResp_Volumes = openstack.ListVolumesResp_Volumes
|
||||
Network = openstack.Network
|
||||
PauseServerReq = openstack.PauseServerReq
|
||||
PauseServerReq_OsPause = openstack.PauseServerReq_OsPause
|
||||
PauseServerResp = openstack.PauseServerResp
|
||||
RebootServerReq = openstack.RebootServerReq
|
||||
RebootServerReq_Reboot = openstack.RebootServerReq_Reboot
|
||||
|
@ -190,10 +189,8 @@ type (
|
|||
ShowNodeDetailsResp_Traits = openstack.ShowNodeDetailsResp_Traits
|
||||
ShowNodeDetailsResp_Volume = openstack.ShowNodeDetailsResp_Volume
|
||||
StartServerReq = openstack.StartServerReq
|
||||
StartServerReq_OsStart = openstack.StartServerReq_OsStart
|
||||
StartServerResp = openstack.StartServerResp
|
||||
StopServerReq = openstack.StopServerReq
|
||||
StopServerReq_OsStop = openstack.StopServerReq_OsStop
|
||||
StopServerResp = openstack.StopServerResp
|
||||
Subnet = openstack.Subnet
|
||||
SubnetResp = openstack.SubnetResp
|
||||
|
|
|
@ -643,10 +643,8 @@ message UpdateServerResp{
|
|||
|
||||
message StartServerReq{
|
||||
string server_id = 1;
|
||||
OsStart osStart=2;
|
||||
message OsStart{
|
||||
string os_start = 1[json_name = "os-start"];
|
||||
}
|
||||
map<string,string> action =2;
|
||||
string start_action =3;
|
||||
}
|
||||
message StartServerResp{
|
||||
string msg =1; // @gotags: copier:"Msg"
|
||||
|
@ -656,10 +654,8 @@ message StartServerResp{
|
|||
|
||||
message StopServerReq{
|
||||
string server_id = 1;
|
||||
OsStop osStop=2;
|
||||
message OsStop{
|
||||
string os_stop = 1[json_name = "os-stop"];
|
||||
}
|
||||
map<string,string> action =2;
|
||||
string stop_action =3;
|
||||
}
|
||||
message StopServerResp{
|
||||
string msg =1; // @gotags: copier:"Msg"
|
||||
|
@ -682,10 +678,8 @@ message RebootServerResp{
|
|||
|
||||
message PauseServerReq{
|
||||
string server_id = 1;
|
||||
OsPause osPause=2;
|
||||
message OsPause{
|
||||
string pause = 1;
|
||||
}
|
||||
map<string,string> action =2;
|
||||
string pause_action =3;
|
||||
}
|
||||
message PauseServerResp{
|
||||
string msg =1; // @gotags: copier:"Msg"
|
||||
|
@ -2023,8 +2017,7 @@ message CreateVolumeTypeResp{
|
|||
string error_msg =4;// @gotags: copier:"ErrorMsg"
|
||||
}
|
||||
message DeleteVolumeTypeReq{
|
||||
string project_id =1;
|
||||
string volume_type_id =2;
|
||||
string volume_type_id =1;
|
||||
}
|
||||
|
||||
message DeleteVolumeTypeResp{
|
||||
|
|
Loading…
Reference in New Issue