diff --git a/api/desc/pcm.api b/api/desc/pcm.api index 0cf9af1d..d879a7b1 100644 --- a/api/desc/pcm.api +++ b/api/desc/pcm.api @@ -337,7 +337,7 @@ service pcm { @handler DeleteNodeHandler delete /vm/deleteNode (DeleteNodeReq) returns (DeleteNodeResp) @handler ShowNodeDetailsHandler - delete /vm/showNodeDetails (ShowNodeDetailsReq) returns (ShowNodeDetailsResp) + get /vm/showNodeDetails (ShowNodeDetailsReq) returns (ShowNodeDetailsResp) } //存算联动 接口 diff --git a/api/desc/vm/pcm-vm.api b/api/desc/vm/pcm-vm.api index bf40af2c..69267264 100644 --- a/api/desc/vm/pcm-vm.api +++ b/api/desc/vm/pcm-vm.api @@ -236,7 +236,7 @@ type( type ( StartServerReq { ServerId string `json:"server_id" copier:"ServerId"` - Action []map[string]string `json:"Action,optional" copier:"Action"` + Action []map[string]string `json:"action,optional" copier:"Action"` start_action string `json:"start_action" copier:"start_action"` } @@ -250,7 +250,7 @@ type ( type( StopServerReq{ ServerId string `json:"server_id" copier:"ServerId"` - Action []map[string]string `json:"Action,optional" copier:"Action"` + Action []map[string]string `json:"action,optional" copier:"Action"` stop_action string `json:"stop_action" copier:"stop_action"` } StopServerResp { @@ -742,7 +742,7 @@ type ( type( UpdateVolumeReq { Volume Volume `json:"volume" copier:"Volume"` - VolumeTypeId string `json:"volume_type_id" copier:"VolumeTypeId"` + VolumeId string `json:"volume_id" copier:"VolumeId"` } UpdateVolumeResp { Volume Volume `json:"volume" copier:"Volume"` @@ -794,7 +794,7 @@ type( ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` } VolumeType { - VolumeType string `json:"Volume_type" copier:"VolumeType"` + Name string `json:"name" copier:"Name"` Description string `json:"description" copier:"Description"` ExtraSpecs ExtraSpecs `json:"extra_specs" copier:"ExtraSpecs"` Id string `json:"id" copier:"Id"` diff --git a/api/internal/handler/routes.go b/api/internal/handler/routes.go index 39b427ca..cba46acc 100644 --- a/api/internal/handler/routes.go +++ b/api/internal/handler/routes.go @@ -552,7 +552,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Handler: vm.DeleteNodeHandler(serverCtx), }, { - Method: http.MethodDelete, + Method: http.MethodGet, Path: "/vm/showNodeDetails", Handler: vm.ShowNodeDetailsHandler(serverCtx), }, diff --git a/api/internal/types/types.go b/api/internal/types/types.go index b9d3fc45..c2558392 100644 --- a/api/internal/types/types.go +++ b/api/internal/types/types.go @@ -2416,7 +2416,7 @@ type UpdateServerResp struct { type StartServerReq struct { ServerId string `json:"server_id" copier:"ServerId"` - Action []map[string]string `json:"Action,optional" copier:"Action"` + Action []map[string]string `json:"action,optional" copier:"Action"` Start_action string `json:"start_action" copier:"start_action"` } @@ -2428,7 +2428,7 @@ type StartServerResp struct { type StopServerReq struct { ServerId string `json:"server_id" copier:"ServerId"` - Action []map[string]string `json:"Action,optional" copier:"Action"` + Action []map[string]string `json:"action,optional" copier:"Action"` Stop_action string `json:"stop_action" copier:"stop_action"` } @@ -2891,8 +2891,8 @@ type Extra_specs struct { } type UpdateVolumeReq struct { - Volume Volume `json:"volume" copier:"Volume"` - VolumeTypeId string `json:"volume_type_id" copier:"VolumeTypeId"` + Volume Volume `json:"volume" copier:"Volume"` + VolumeId string `json:"volume_id" copier:"VolumeId"` } type UpdateVolumeResp struct { @@ -2945,7 +2945,7 @@ type CreateVolumeTypeResp struct { } type VolumeType struct { - VolumeType string `json:"Volume_type" copier:"VolumeType"` + Name string `json:"name" copier:"Name"` Description string `json:"description" copier:"Description"` ExtraSpecs ExtraSpecs `json:"extra_specs" copier:"ExtraSpecs"` Id string `json:"id" copier:"Id"`