Merge pull request 'modify parameters' (#64) from qiwang/pcm-coordinator:master into master

Former-commit-id: d02ffd8d6300ff7a87fbd5a26188baa25235aa5f
This commit is contained in:
qiwang 2024-03-22 16:00:30 +08:00
commit 8be78f4ba6
6 changed files with 86 additions and 87 deletions

View File

@ -114,7 +114,7 @@ type (
NsID string `json:"nsID"`
Replicas int64 `json:"replicas,optional"`
MatchLabels map[string]string `json:"matchLabels,optional"`
server []ServerCommit `json:"server,optional"`
servers []ServerCommit `json:"servers,optional"`
platform string `json:"platform,optional"`
}
ServerCommit {

View File

@ -36,7 +36,7 @@ type (
absolute Absolute `json:"absolute,optional"`
}
GetComputeLimitsReq {
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
GetComputeLimitsResp {
@ -66,7 +66,7 @@ type (
absolute VolumeAbsolute `json:"absolute,optional"`
}
GetVolumeLimitsReq {
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
GetVolumeLimitsResp {
@ -81,7 +81,7 @@ type (
ListServersReq {
Limit int32 `form:"limit,optional"`
OffSet int32 `form:"offSet,optional"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ListServersResp {
TotalNumber uint32 `json:"totalNumber" copier:"TotalNumber"`
@ -111,7 +111,7 @@ type (
type (
ListServersDetailedReq {
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ListServersDetailedResp {
ServersDetailed []ServersDetailed `json:"servers" copier:"ServersDetailed"`
@ -137,7 +137,7 @@ type (
type(
GetServersDetailedByIdReq{
ServerId string `form:"server_id" copier:"ServerId"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
GetServersDetailedByIdResp{
@ -222,7 +222,7 @@ type(
UpdateServerReq{
ServerId string `form:"server_id" copier:"ServerId"`
ServerUpdate ServerUpdate `json:"server_update" copier:"ServerUpdate"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ServerUpdate{
Server Server `json:"server" copier:"Server"`
@ -239,7 +239,7 @@ type (
ServerId string `json:"server_id" copier:"ServerId"`
Action []map[string]string `json:"action,optional" copier:"Action"`
start_action string `json:"start_action" copier:"start_action"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
StartServerResp {
Msg string `json:"msg,omitempty"`
@ -253,19 +253,20 @@ type(
ServerId string `json:"server_id" copier:"ServerId"`
Action []map[string]string `json:"action,optional" copier:"Action"`
stop_action string `json:"stop_action" copier:"stop_action"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
StopServerResp {
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
Code int32 `json:"code,omitempty"` }
Code int32 `json:"code,omitempty"`
}
)
type(
RebootServerReq{
ServerId string `json:"server_id" copier:"ServerId"`
Reboot Reboot `json:"reboot" copier:"Reboot"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
RebootServerResp {
Msg string `json:"msg,omitempty"`
@ -281,7 +282,7 @@ type(
ServerId string `json:"server_id" copier:"ServerId"`
Action []map[string]string `json:"Action,optional" copier:"Action"`
pause_action string `json:"pause_action" copier:"pause_action"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
PauseServerResp {
Msg string `json:"msg,omitempty"`
@ -295,7 +296,7 @@ type(
ServerId string `json:"server_id" copier:"ServerId"`
Action []map[string]string `json:"Action,optional" copier:"Action"`
unpause_action string `json:"unpause_action" copier:"unpause_action"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
UnpauseServerResp {
Msg string `json:"msg,omitempty"`
@ -307,7 +308,7 @@ type(
type (
DeleteServerReq {
ServerId string `form:"server_id" copier:"ServerId"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
DeleteServerResp {
@ -320,7 +321,7 @@ type (
type (
CreateServerReq {
Server Server `json:"server" copier:"Server"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
CreateServerResp {
Server ServerResp `json:"server" copier:"Server"`
@ -361,7 +362,7 @@ type (
type(
RebuildServerReq{
ServerId string `json:"server_id" copier:"ServerId"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
Rebuild Rebuild `json:"rebuild" copier:"Rebuild"`
}
RebuildServerResp {
@ -435,7 +436,7 @@ type(
ServerId string `json:"server_id" copier:"ServerId"`
Action []map[string]string `json:"Action,optional" copier:"Action"`
shelve_action string `json:"shelve_action" copier:"shelve_action"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ShelveServerResp {
Msg string `json:"msg,omitempty"`
@ -447,7 +448,7 @@ type(
type(
RescueServerReq{
ServerId string `json:"server_id" copier:"ServerId"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
Rescue Rescue `json:"rescue" copier:"Rescue"`
}
RescueServerResp {
@ -465,7 +466,7 @@ type(
UnRescueServerReq{
ServerId string `json:"server_id" copier:"ServerId"`
Action []map[string]string `json:"Action,optional" copier:"Action"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
UnRescue_action string `json:"UnRescue_action" copier:"UnRescue_action"`
Rescue Rescue `json:"rescue" copier:"Rescue"`
}
@ -480,7 +481,7 @@ type(
ChangeAdministrativePasswordReq{
ServerId string `json:"server_id" copier:"ServerId"`
Changepassword string `json:"changePassword" copier:"Changepassword"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
ChangePassword ChangePassword `json:"changepassword" copier:"ChangePassword"`
}
ChangeAdministrativePasswordResp {
@ -497,7 +498,7 @@ type(
SuspendServerReq{
ServerId string `json:"server_id" copier:"ServerId"`
Action []map[string]string `json:"Action,optional" copier:"Action"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
UnRescue_action string `json:"UnRescue_action" copier:"UnRescue_action"`
Rescue Rescue `json:"rescue" copier:"Rescue"`
}
@ -512,7 +513,7 @@ type(
AddSecurityGroupToServerReq{
ServerId string `json:"server_id" copier:"ServerId"`
Action []map[string]string `json:"Action,optional" copier:"Action"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
UnRescue_action string `json:"UnRescue_action" copier:"UnRescue_action"`
AddSecurityGroup AddSecurityGroup `json:"addSecurityGroup" copier:"AddSecurityGroup"`
}
@ -529,7 +530,7 @@ type(
type(
removeSecurityGroupReq{
ServerId string `json:"server_id" copier:"ServerId"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
RemoveSecurityGroup RemoveSecurityGroup `json:"removeSecurityGroup" copier:"RemoveSecurityGroup"`
}
removeSecurityGroupResp {
@ -565,7 +566,7 @@ type(
type(
DeleteFlavorReq{
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
ServerId string `json:"server_id" copier:"ServerId"`
FlavorId string `json:"flavor_id" copier:"FlavorId"`
}
@ -581,8 +582,7 @@ type(
/******************find images end*************************/
type (
ListImagesReq {
Limit int32 `form:"limit,optional"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ListImagesResp {
First string `json:"first" copier:"First"`
@ -651,7 +651,7 @@ type (
type (
UploadOsImageReq {
ImageId string `form:"image_id" copier:"ImageId"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
UploadOsImageResp {
Code int32 `json:"code,omitempty" copier:"Code"`
@ -663,7 +663,7 @@ type (
type (
DeleteImageReq {
ImageId string `form:"image_id" copier:"ImageId"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
DeleteImageResp {
Code int32 `json:"code,omitempty"`
@ -695,7 +695,7 @@ type (
type (
ListNetworksReq {
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ListNetworksResp {
Networks []Network `json:"networks" copier:"Networks"`
@ -734,7 +734,7 @@ type (
type (
DeleteNetworkReq {
NetworkId string `form:"network_id" copier:"NetworkId"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
DeleteNetworkResp {
Code int32 `json:"code,omitempty" copier:"Code"`
@ -745,7 +745,7 @@ type (
type (
CreateNetworkReq {
Network CreateNetwork `json:"network" copier:"Network"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
CreateNetworkResp {
Network Network `json:"network" copier:"Network"`
@ -763,7 +763,7 @@ type (
type (
CreateSubnetReq {
Subnet Subnet `json:"subnet" copier:"Subnet"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
CreateSubnetResp {
Subnet SubnetResp `json:"subnet" copier:"Subnet"`
@ -816,7 +816,7 @@ type (
type(
ShowNetworkDetailsReq{
NetworkId string `form:"network_id" copier:"NetworkId"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ShowNetworkDetailsResp{
Network Networkdetail `json:"network" copier:"Network"`
@ -855,7 +855,7 @@ type(
UpdateNetworkReq {
NetworkId string `form:"network_id" copier:"NetworkId"`
Network Network `json:"network" copier:"Network"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
UpdateNetworkResp {
Network Network `json:"network" copier:"Network"`
@ -882,7 +882,7 @@ type(
ListSubnetsReq {
Limit int32 `json:"limit,optional"`
OffSet int32 `json:"offSet,optional"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ListSubnetsResp {
Subnets []Subnets `json:"subnets" copier:"Subnets"`
@ -923,7 +923,7 @@ type(
type(
DeleteSubnetReq{
subnetId string `json:"subnet_id,optional" copier:"subnetId"`
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
}
DeleteSubnetResp{
Code int32 `json:"code,omitempty" copier:"Code"`
@ -935,7 +935,7 @@ type(
type(
UpdateSubnetReq{
subnetId string `json:"subnet_id,optional" copier:"subnetId"`
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
}
UpdateSubnetResp{
Code int32 `json:"code,omitempty" copier:"Code"`
@ -980,7 +980,7 @@ type (
ListNetworkSegmentRangesReq{
Limit int32 `json:"limit,optional"`
OffSet int32 `json:"offSet,optional"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ListNetworkSegmentRangesResp{
@ -1012,7 +1012,7 @@ type (
type(
DeleteNetworkSegmentRangesReq{
network_segment_range_id string `json:"network_segment_range_id,optional" copier:"network_segment_range_id"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
DeleteNetworkSegmentRangesResp{
Code int32 `json:"code,omitempty" copier:"Code"`
@ -1025,7 +1025,7 @@ type(
UpdateNetworkSegmentRangesReq{
network_segment_range_id string `json:"network_segment_range_id,optional" copier:"network_segment_range_id"`
NetworkSegmentRange Network_segment_range `json:"network_segment_range,optional" copier:"NetworkSegmentRange"`
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
}
UpdateNetworkSegmentRangesResp{
NetworkSegmentRange Network_segment_range `json:"network_segment_range,optional" copier:"NetworkSegmentRange"`
@ -1099,7 +1099,7 @@ type (
ListPortsReq{
Limit int32 `json:"limit,optional"`
OffSet int32 `json:"offSet,optional"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ListPortsResp{
ports []PortLists `json:"ports,optional" copier:"ports"`
@ -1155,7 +1155,7 @@ type (
type(
DeletePortReq{
port_id string `json:"port_id,optional" copier:"port_id"`
platform string `json:"platform,optional" copier:"platform"`
platform string `form:"platform,optional" copier:"platform"`
}
DeletePortResp{
Code int32 `json:"code,omitempty" copier:"Code"`
@ -1168,7 +1168,7 @@ type(
UpdatePortReq{
port_id string `json:"port_id,optional" copier:"port_id"`
port Port `json:"port,optional" copier:"port"`
platform string `json:"platform,optional" copier:"platform"`
platform string `form:"platform,optional" copier:"platform"`
}
UpdatePortResp{
port Port `json:"port,optional" copier:"port"`
@ -1182,7 +1182,7 @@ type(
ShowPortDetailsReq{
port_id string `json:"port_id,optional" copier:"port_id"`
fields string `json:"fields,optional" copier:"fields"`
platform string `json:"platform,optional" copier:"platform"`
platform string `form:"platform,optional" copier:"platform"`
}
ShowPortDetailsResp{
port Port `json:"port,optional" copier:"port"`
@ -1197,7 +1197,7 @@ type(
ListRoutersReq{
Limit int32 `json:"limit,optional"`
OffSet int32 `json:"offSet,optional"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ListRoutersResp{
routers []Routers `json:"routers,optional" copier:"routers"`
@ -1288,7 +1288,7 @@ type(
type(
UpdateRouterReq{
router Router `json:"router,optional" copier:"router"`
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
}
UpdateRouterResp{
@ -1302,7 +1302,7 @@ type(
type(
ShowRouterDetailsReq{
router Router `json:"router,optional" copier:"router"`
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
}
ShowRouterDetailsResp{
@ -1315,7 +1315,7 @@ type(
type(
DeleteRouterReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
router_id string `json:"router_id,optional" copier:"router_id"`
}
DeleteRouterResp{
@ -1328,7 +1328,7 @@ type(
//浮动IPs
type(
ListFloatingIPsReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
Limit int32 `json:"limit,optional" copier:"Limit"`
OffSet int32 `json:"offSet,optional" copier:"OffSet"`
}
@ -1413,7 +1413,7 @@ type(
type (
UpdateFloatingIPReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
floatingip_id string `json:"floatingip_id,optional" copier:"floatingip_id"`
floatingip Floatingip `json:"floatingip,optional" copier:"floatingip"`
}
@ -1427,7 +1427,7 @@ type (
type (
DeleteFloatingIPReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
floatingip_id string `json:"floatingip_id,optional" copier:"floatingip_id"`
}
DeleteFloatingIPResp{
@ -1453,7 +1453,7 @@ type (
//firewall
type (
ListFirewallGroupsReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
fields string `json:"fields,optional" copier:"fields"`
}
ListFirewallGroupsResp{
@ -1480,7 +1480,7 @@ type (
type(
DeleteFirewallGroupReq {
firewall_group_id string `json:"firewall_group_id,optional" copier:"firewall_group_id"`
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
}
DeleteFirewallGroupResp {
Code int32 `json:"code,omitempty" copier:"Code"`
@ -1518,7 +1518,7 @@ type(
type (
UpdateFirewallGroupReq{
firewall_group Firewall_group `json:"firewall_group,optional" copier:"firewall_group"`
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
firewall_group_id string `json:"firewall_group_id,optional" copier:"firewall_group_id"`
}
UpdateFirewallGroupResp{
@ -1531,7 +1531,7 @@ type (
type (
ShowFirewallGroupDetailsReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
firewall_group_id string `json:"firewall_group_id,optional" copier:"firewall_group_id"`
}
ShowFirewallGroupDetailsResp{
@ -1567,7 +1567,7 @@ type(
type(
DeleteFirewallPolicyReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
firewall_policy_id string `json:"firewall_policy_id,optional" copier:"firewall_policy_id"`
}
DeleteFirewallPolicyResp{
@ -1579,7 +1579,7 @@ type(
type(
ListFirewallPoliciesReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
fields string `json:"fields,optional" copier:"fields"`
}
ListFirewallPoliciesResp{
@ -1647,7 +1647,7 @@ type(
type (
DeleteFirewallRuleReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
firewall_rule_id string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"`
}
DeleteFirewallRuleResp{
@ -1659,7 +1659,7 @@ type (
type (
ListFirewallRulesReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
fields string `json:"fields,optional" copier:"fields"`
}
ListFirewallRulesResp{
@ -1690,7 +1690,7 @@ type (
type (
ShowFirewallRuleDetailsReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
firewall_rule_id string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"`
}
ShowFirewallRuleDetailsResp{
@ -1704,7 +1704,7 @@ type (
//Security Group
type (
ListSecurityGroupsReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
fields string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"`
}
ListSecurityGroupsResp{
@ -1730,7 +1730,7 @@ type (
type (
CreateSecurityGroupReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
firewall_rule_id string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"`
}
CreateSecurityGroupResp{
@ -1776,7 +1776,7 @@ type (
type(
DeleteSecurityGroupReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
security_group_id string `json:"security_group_id,optional" copier:"security_group_id"`
}
DeleteSecurityGroupResp{
@ -1788,7 +1788,7 @@ type(
type(
UpdateSecurityGroupReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
security_group_id string `json:"security_group_id,optional" copier:"security_group_id"`
}
UpdateSecurityGroupResp{
@ -1802,7 +1802,7 @@ type(
type(
ShowSecurityGroupReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
security_group_id string `json:"security_group_id,optional" copier:"security_group_id"`
fields string `json:"fields,optional" copier:"fields"`
verbose string `json:"verbose,optional" copier:"verbose"`
@ -1818,7 +1818,7 @@ type(
//SecurityGroupRules
type(
ListSecurityGroupRulesReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
}
ListSecurityGroupRulesResp{
Code int32 `json:"code,omitempty" copier:"Code"`
@ -1861,7 +1861,7 @@ type(
type(
ShowSecurityGroupRuleReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
security_group_rule_id string `json:"security_group_rule_id,optional" copier:"security_group_rule_id"`
}
ShowSecurityGroupRuleResp{
@ -1874,7 +1874,7 @@ type(
type(
DeleteSecurityGroupRuleReq{
Platform string `json:"platform,optional" copier:"Platform"`
Platform string `form:"platform,optional" copier:"Platform"`
security_group_rule_id string `json:"security_group_rule_id,optional" copier:"security_group_rule_id"`
}
DeleteSecurityGroupRuleResp{
@ -1890,7 +1890,7 @@ type(
/******************find ListVolumesDetail start*************************/
type (
ListVolumesDetailReq {
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ListVolumesDetailResp {
VolumeDetail []VolumeDetail `json:"volumes" copier:"VolumeDetail"`
@ -1925,7 +1925,7 @@ type (
VolumeId string `form:"volume_id" copier:"VolumeId"`
Cascade bool `json:"cascade" copier:"Cascade"`
Force bool `json:"force" copier:"force"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
DeleteVolumeResp {
Code int32 `json:"code,omitempty" copier:"Code"`
@ -1976,7 +1976,7 @@ type (
)
type (
ListVolumeTypesReq {
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ListVolumeTypesResp {
VolumeTypes []Volume_types `json:"volume_types" copier:"VolumeTypes"`
@ -2002,7 +2002,7 @@ type(
UpdateVolumeReq {
Volume Volume `json:"volume" copier:"Volume"`
VolumeId string `json:"volume_id" copier:"VolumeId"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
UpdateVolumeResp {
Volume Volume `json:"volume" copier:"Volume"`
@ -2015,7 +2015,7 @@ type(
type(
GetVolumeDetailedByIdReq {
VolumeId string `form:"volume_id" copier:"VolumeId"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
GetVolumeDetailedByIdResp {
Volume VolumeDetailed `json:"volume" copier:"Volume"`
@ -2067,7 +2067,7 @@ type(
type(
DeleteVolumeTypeReq {
VolumeTypeId string `json:"volume_type_id" copier:"VolumeTypeId"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
DeleteVolumeTypeResp {
Code int32 `json:"code,omitempty" copier:"Code"`
@ -2087,7 +2087,7 @@ type(
CreatedAt string `json:"created_at" copier:"CreatedAt"`
ConsumesQuota bool `json:"consumes_quota" copier:"ConsumesQuota"`
UpdatedAt string `json:"updated_at" copier:"UpdatedAt"`
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ListVolumesResp {
Volumes []VolumesList `json:"volumes" copier:"Volumes"`
@ -2106,7 +2106,7 @@ type(
type (
ListFlavorsDetailReq {
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
}
ListFlavorsDetailResp {
@ -2133,7 +2133,7 @@ type (
/******************Bare Metal start*************************/
type(
ListNodesReq {
Platform string `json:"platform,optional"`
Platform string `form:"platform,optional"`
Limit int64 `json:"limit" copier:"Limit"`
Marker string `json:"marker" copier:"Marker"`
SortDir string `json:"sort_dir" copier:"SortDir"`

View File

@ -8,6 +8,7 @@ import (
"gitlink.org.cn/JointCloud/pcm-coordinator/api/pkg/response"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/constants"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models"
tool "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils"
"time"
"github.com/zeromicro/go-zero/core/logx"
@ -41,14 +42,15 @@ func (l *CommitVmTaskLogic) CommitVmTask(req *types.CommitVmTaskReq) (resp *type
if tx.Error != nil {
return nil, tx.Error
}
/* hpc := models.Hpc{}
tool.Convert(req, &hpc)*/
vm := models.Vm{}
tool.Convert(req, &vm)
mqInfo := response.TaskInfo{
TaskId: taskModel.Id,
TaskType: "vm",
MatchLabels: req.MatchLabels,
NsID: req.NsID,
}
//req.TaskId = taskModel.Id
mqs.InsQueue.Beta.Add(&mqInfo)
return
}

View File

@ -3,11 +3,9 @@ package vm
import (
"context"
"fmt"
"github.com/jinzhu/copier"
"github.com/pkg/errors"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/helper/xerr"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils"
"gitlink.org.cn/JointCloud/pcm-openstack/openstack"
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
@ -33,9 +31,10 @@ func NewGetImageNumLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetIm
func (l *GetImageNumLogic) GetImageNum(req *types.ListImagesReq) (resp *types.ImageNum, err error) {
// todo: add your logic here and delete this line
resp = &types.ImageNum{}
ListImagesReq := &openstack.ListImagesReq{}
err = copier.CopyWithOption(ListImagesReq, req, copier.Option{Converters: utils.Converters})
ListImagesResp, err := l.svcCtx.OpenstackRpc.ListImages(l.ctx, ListImagesReq)
listImagesReq := &openstack.ListImagesReq{}
listImagesReq.Platform = req.Platform
//err = copier.CopyWithOption(ListImagesReq, req, copier.Option{Converters: utils.Converters})
ListImagesResp, err := l.svcCtx.OpenstackRpc.ListImages(l.ctx, listImagesReq)
if err != nil {
return nil, errors.Wrapf(xerr.NewErrMsg("Failed to get Networks list"), "Failed to get db Servers list err : %v ,req:%+v", err, req)
}

View File

@ -2,7 +2,6 @@ package vm
import (
"context"
"fmt"
"github.com/jinzhu/copier"
"github.com/pkg/errors"
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/helper/xerr"
@ -41,7 +40,6 @@ func (l *GetNetworkNumLogic) GetNetworkNum(req *types.ListNetworksReq) (resp *ty
}
var count int = len(ListNetworksResp.Networks)
resp.NetworkNum = int32(count)
fmt.Println(count)
if err != nil {
return nil, result.NewDefaultError(err.Error())
}

View File

@ -101,7 +101,7 @@ type CommitVmTaskReq struct {
NsID string `json:"nsID"`
Replicas int64 `json:"replicas,optional"`
MatchLabels map[string]string `json:"matchLabels,optional"`
Server []ServerCommit `json:"server,optional"`
Servers []ServerCommit `json:"servers,optional"`
Platform string `json:"platform,optional"`
}