fix:增加openstack到C端

Former-commit-id: 5d9fe1bd811332ee1393f77e985fe5bc84b46f66
This commit is contained in:
qiwang 2023-10-13 09:47:52 +08:00
parent bf6897872f
commit 7659e46a8d
2 changed files with 655 additions and 1 deletions

View File

@ -461,6 +461,91 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/vm/uploadImage",
Handler: vm.UploadImageHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/vm/getServersDetailedById",
Handler: vm.GetServersDetailedByIdHandler(serverCtx),
},
{
Method: http.MethodPut,
Path: "/vm/updateServer",
Handler: vm.UpdateServerHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/vm/startServer",
Handler: vm.StartServerHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/vm/stopServer",
Handler: vm.StopServerHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/vm/rebootServer",
Handler: vm.RebootServerHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/vm/pauseServer",
Handler: vm.PauseServerHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/vm/showNetworkDetails",
Handler: vm.ShowNetworkDetailsHandler(serverCtx),
},
{
Method: http.MethodPut,
Path: "/vm/updateNetwork",
Handler: vm.UpdateNetworkHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/vm/bulkCreateNetworks",
Handler: vm.BulkCreateNetworksHandler(serverCtx),
},
{
Method: http.MethodPut,
Path: "/vm/updateVolume",
Handler: vm.UpdateVolumeHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/vm/createVolumeTypes",
Handler: vm.CreateVolumeTypesHandler(serverCtx),
},
{
Method: http.MethodDelete,
Path: "/vm/deleteVolumeType",
Handler: vm.DeleteVolumeTypeHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/vm/listVolumes",
Handler: vm.ListVolumesHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/vm/listNodes",
Handler: vm.ListNodesHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/vm/createNode",
Handler: vm.CreateNodeHandler(serverCtx),
},
{
Method: http.MethodDelete,
Path: "/vm/deleteNode",
Handler: vm.DeleteNodeHandler(serverCtx),
},
{
Method: http.MethodDelete,
Path: "/vm/showNodeDetails",
Handler: vm.ShowNodeDetailsHandler(serverCtx),
},
},
rest.WithPrefix("/pcm/v1"),
)

View File

@ -2289,6 +2289,164 @@ type ServersDetailed struct {
User_id string `json:"user_id" copier:"user_id"`
}
type GetServersDetailedByIdReq struct {
ServerId string `form:"server_id" copier:"ServerId"`
}
type GetServersDetailedByIdResp struct {
Servers ServersDetaileResp `json:"server" copier:"Servers"`
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
}
type ServersDetaileResp struct {
AccessIPv4 string `json:"accessIPv4" copier:"AccessIPv4"`
AccessIPv6 string `json:"accessIPv6" copier:"AccessIPv6"`
Addresses Addresses `json:"addresses" copier:"Addresses"`
Name string `json:"name" copier:"Name"`
ConfigDrive string `json:"config_drive" copier:"ConfigDrive"`
Created string `json:"created" copier:"Created"`
Flavor FlavorDetailed `json:"flavor" copier:"Flavor"`
HostId string `json:"hostId" copier:"HostId"`
Id string `json:"id" copier:"Id"`
Image ImageDetailed `json:"image" copier:"Image"`
KeyName string `json:"key_name" copier:"KeyName"`
Links1 []Links1 `json:"links" copier:"Links1"`
Metadata MetadataDetailed `json:"metadata" copier:"Metadata"`
Status string `json:"status" copier:"Status"`
TenantId string `json:"tenant_id" copier:"TenantId"`
Updated string `json:"updated" copier:"Updated"`
UserId string `json:"user_id" copier:"UserId"`
Fault Fault `json:"fault" copier:"Fault"`
Progress uint32 `json:"progress" copier:"Progress"`
Locked bool `json:"locked" copier:"Locked"`
HostStatus string `json:"host_status" copier:"HostStatus"`
Description string `json:"description" copier:"Description"`
Tags []string `json:"tags" copier:"Tags"`
TrustedImageCertificates string `json:"trusted_image_certificates" copier:"TrustedImageCertificates"`
ServerGroups string `json:"server_groups" copier:"ServerGroups"`
LockedReason string `json:"locked_reason" copier:"LockedReason"`
SecurityGroups []Security_groups `json:"security_groups" copier:"SecurityGroups"`
}
type Addresses struct {
Private Private `json:"private" copier:"private"`
}
type FlavorDetailed struct {
Id string `json:"id" copier:"Id"`
Links string `json:"links" copier:"Links"`
Vcpus string `json:"vcpus" copier:"Vcpus"`
Ram uint32 `json:"ram" copier:"Ram"`
Disk uint32 `json:"ram" copier:"Disk"`
Dphemeral uint32 `json:"ephemeral" copier:"Dphemeral"`
Swap uint32 `json:"swap" copier:"Swap"`
OriginalName string `json:"OriginalName" copier:"OriginalName"`
ExtraSpecs ExtraSpecs `json:"Extra_specs" copier:"ExtraSpecs"`
}
type Links1 struct {
Href string `json:"href " copier:"Href"`
Rel string `json:"rel" copier:"Rel"`
}
type ImageDetailed struct {
Id string `json:"id " copier:"Id"`
Links []Links `json:"links" copier:"Links"`
}
type MetadataDetailed struct {
}
type Fault struct {
Code uint32 `json:"code " copier:"Code"`
Created string `json:"created " copier:"Created"`
Message string `json:"message " copier:"Message"`
Details string `json:"details " copier:"Details"`
}
type Private struct {
Addr string `json:"addr" copier:"Addr"`
Version uint32 `json:"version" copier:"Version"`
}
type ExtraSpecs struct {
Capabilities string `json:"capabilities" copier:"Capabilities"`
}
type UpdateServerReq struct {
ServerId string `json:"server_id" copier:"ServerId"`
Server Server `json:"server" copier:"Server"`
}
type UpdateServerResp struct {
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
Server ServersDetaileResp `json:"server" copier:"Server"`
}
type StartServerReq struct {
ServerId string `json:"server_id" copier:"ServerId"`
OsStart OsStart `json:"osStart" copier:"OsStart"`
}
type StartServerResp struct {
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
Code int32 `json:"code,omitempty"`
}
type OsStart struct {
Os_start string `json:"os_start" copier:"os_start"`
}
type StopServerReq struct {
ServerId string `json:"server_id" copier:"ServerId"`
OsStart OsStart `json:"os_start" copier:"OsStart"`
}
type StopServerResp struct {
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
Code int32 `json:"code,omitempty"`
}
type OsStop struct {
OsStop string `json:"os_stop" copier:"OsStop"`
}
type RebootServerReq struct {
ServerId string `json:"server_id" copier:"ServerId"`
OsStart OsStart `json:"os_start" copier:"OsStart"`
}
type RebootServerResp struct {
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
Code int32 `json:"code,omitempty"`
}
type Reboot struct {
Type string `json:"type" copier:"Type"`
}
type PauseServerReq struct {
ServerId string `json:"server_id" copier:"ServerId"`
OsStart OsStart `json:"os_start" copier:"OsStart"`
}
type PauseServerResp struct {
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
Code int32 `json:"code,omitempty"`
}
type OsPause struct {
Pause string `json:"pause" copier:"Pause"`
}
type DeleteServerReq struct {
ServerId string `form:"server_id" copier:"ServerId"`
}
@ -2549,6 +2707,71 @@ type Allocation_pools struct {
End string `json:"end" copier:"End"`
}
type ShowNetworkDetailsReq struct {
NetworkId string `json:"network_id" copier:"NetworkId"`
Fields string `json:"fields" copier:"Fields"`
}
type ShowNetworkDetailsResp struct {
Network Networkdetail `json:"network" copier:"Network"`
Msg string `json:"msg" copier:"msg"`
Code int32 `json:"code" copier:"code"`
ErrorMsg string `json:"error_msg" copier:"ErrorMsg"`
}
type Networkdetail struct {
AdminStateUp bool `json:"admin_state_up" copier:"AdminStateUp"`
AvailabilityZoneHints []string `json:"availability_zone_hints" copier:"AvailabilityZoneHints"`
AvailabilityZones []string `json:"availability_zones" copier:"AvailabilityZones"`
CreatedAt string `json:"created_at" copier:"CreatedAt"`
DnsDomain string `json:"dns_domain" copier:"DnsDomain"`
Id string `json:"id" copier:"Id"`
Ipv4AddressScope string `json:"ipv4_address_scope" copier:"Ipv4AddressScope"`
Ipv6AddressScope string `json:"ipv6_address_scope" copier:"Ipv6AddressScope"`
L2Adjacency bool `json:"l2_adjacency" copier:"L2Adjacency"`
Mtu string `json:"mtu" copier:"Mtu"`
Name string `json:"name" copier:"Name"`
PortSecurityEnabled string `json:"port_security_enabled" copier:"PortSecurityEnabled"`
ProjectId string `json:"project_id" copier:"ProjectId"`
ProviderNetworkType string `json:"provider_network_type" copier:"ProviderNetworkType"`
QosPolicyId string `json:"qos_policy_id" copier:"QosPolicyId"`
RevisionNumber string `json:"revision_number" copier:"RevisionNumber"`
Segments Segment `json:"segments" copier:"Segment"`
Shared bool `json:"shared" copier:"Shared"`
Status bool `json:"status" copier:"Status"`
Subnets []bool `json:"subnets" copier:"Subnets"`
TenantId string `json:"tenant_id" copier:"TenantId"`
VlanTransparent bool `json:"vlan_transparent" copier:"VlanTransparent"`
Description string `json:"description" copier:"Description"`
IsDefault bool `json:"is_default" copier:"IsDefault"`
Tags string `json:"tags" copier:"Tags"`
}
type Segment struct {
}
type UpdateNetworkReq struct {
NetworkId string `json:"network_id" copier:"NetworkId"`
}
type UpdateNetworkResp struct {
Network Networkdetail `json:"network" copier:"Network"`
Msg string `json:"msg" copier:"msg"`
Code int32 `json:"code" copier:"code"`
ErrorMsg string `json:"error_msg" copier:"ErrorMsg"`
}
type BulkCreateNetworksReq struct {
Network []CreateNetwork `json:"network" copier:"Network"`
}
type BulkCreateNetworksResp struct {
Network []Network `json:"network" copier:"Network"`
Code int32 `json:"code,omitempty" copier:"Code"`
Msg string `json:"msg,omitempty" copier:"Msg"`
ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"`
}
type ListVolumesDetailReq struct {
}
@ -2581,7 +2804,7 @@ type VolumeDetail struct {
type DeleteVolumeReq struct {
VolumeId string `form:"volume_id" copier:"VolumeId"`
Cascade bool `json:"cascade" copier:"cascade"`
Cascade bool `json:"cascade" copier:"Cascade"`
Force bool `json:"force" copier:"force"`
}
@ -2654,6 +2877,73 @@ type Extra_specs struct {
Capabilities string `json:"capabilities" copier:"Capabilities"`
}
type UpdateVolumeReq struct {
Volume Volume `json:"volume" copier:"Volume"`
VolumeTypeId string `json:"volume_type_id" copier:"VolumeTypeId"`
}
type UpdateVolumeResp struct {
Volume Volume `json:"volume" copier:"Volume"`
Code int32 `json:"code,omitempty" copier:"Code"`
Msg string `json:"msg,omitempty" copier:"Msg"`
ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"`
}
type CreateVolumeTypeReq struct {
VolumeType VolumeType `json:"volume_type" copier:"VolumeType"`
}
type CreateVolumeTypeResp struct {
VolumeType VolumeType `json:"volume_type" copier:"VolumeType"`
Code int32 `json:"code,omitempty" copier:"Code"`
Msg string `json:"msg,omitempty" copier:"Msg"`
ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"`
}
type VolumeType struct {
VolumeType string `json:"Volume_type" copier:"VolumeType"`
Description string `json:"description" copier:"Description"`
ExtraSpecs ExtraSpecs `json:"extra_specs" copier:"ExtraSpecs"`
Id string `json:"id" copier:"Id"`
IsPublic bool `json:"is_public" copier:"IsPublic"`
}
type DeleteVolumeTypeReq struct {
VolumeTypeId string `json:"volume_type_id" copier:"VolumeTypeId"`
}
type DeleteVolumeTypeResp struct {
Code int32 `json:"code,omitempty" copier:"Code"`
Msg string `json:"msg,omitempty" copier:"Msg"`
ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"`
}
type ListVolumesReq struct {
ProjectId string `json:"project_id" copier:"ProjectId"`
AllTenants string `json:"all_tenants" copier:"AllTenants"`
Sort string `json:"sort" copier:"Sort"`
Limit int32 `json:"limit" copier:"Limit"`
Offset int32 `json:"offset" copier:"Offset"`
Marker string `json:"marker" copier:"Marker"`
WithCount bool `json:"with_count" copier:"WithCount"`
CreatedAt string `json:"created_at" copier:"CreatedAt"`
ConsumesQuota bool `json:"consumes_quota" copier:"ConsumesQuota"`
UpdatedAt string `json:"updated_at" copier:"UpdatedAt"`
}
type ListVolumesResp struct {
Volumes []VolumesList `json:"volumes" copier:"Volumes"`
Code int32 `json:"code,omitempty" copier:"Code"`
Msg string `json:"msg,omitempty" copier:"Msg"`
ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"`
}
type VolumesList struct {
Id string `json:"id" copier:"Id"`
Links Links `json:"links" copier:"Links"`
Name string `json:"name" copier:"Name"`
}
type ListFlavorsDetailReq struct {
}
@ -2678,6 +2968,285 @@ type Flavors struct {
Os_flavor_access_is_public bool `json:"os_flavor_access_is_public" copier:"os_flavor_access_is_public"`
}
type ListNodesReq struct {
Limit int64 `json:"limit" copier:"Limit"`
Marker string `json:"marker" copier:"Marker"`
SortDir string `json:"sort_dir" copier:"SortDir"`
SortKey string `json:"sort_key" copier:"SortKey"`
InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"`
Maintenance bool `json:"maintenance" copier:"Maintenance"`
Associated bool `json:"associated" copier:"Associated"`
ProvisionState string `json:"provision_state" copier:"ProvisionState"`
Sharded bool `json:"sharded" copier:"Sharded"`
Driver string `json:"driver" copier:"Driver"`
ResourceClass string `json:"resource_class" copier:"ResourceClass"`
ConductorGroup string `json:"conductor_group" copier:"ConductorGroup"`
Conductor string `json:"conductor" copier:"Conductor"`
Fault string `json:"fault" copier:"Fault"`
Owner string `json:"owner" copier:"Owner"`
Lessee string `json:"lessee" copier:"Lessee"`
Shard []string `json:"shard" copier:"Shard"`
Detail bool `json:"detail" copier:"Detail"`
ParentNode string `json:"parent_node" copier:"ParentNode"`
IncludeChildren string `json:"include_children" copier:"IncludeChildren"`
}
type ListNodesResp struct {
Nodes []Nodes `json:"nodes" copier:"Nodes"`
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
}
type Nodes struct {
InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"`
Links []Links `json:"links" copier:"Links"`
Maintenance bool `json:"maintenance" copier:"Maintenance"`
Name string `json:"name" copier:"Name"`
PowerState string `json:"name" copier:"PowerState"`
ProvisionState string `json:"provision_state" copier:"ProvisionState"`
Uuid string `json:"uuid" copier:"Uuid"`
}
type CreateNodeReq struct {
Name string `json:"name" copier:"Name"`
Driver string `json:"driver" copier:"Driver"`
DriverInfo DriverInfo `json:"driver_info" copier:"DriverInfo"`
ResourceClass string `json:"resource_class" copier:"ResourceClass"`
BootInterface string `json:"boot_interface" copier:"BootInterface"`
ConductorGroup string `json:"conductor_group" copier:"ConductorGroup"`
ConsoleInterface string `json:"console_interface" copier:"ConsoleInterface"`
DeployInterface string `json:"deploy_interface" copier:"DeployInterface"`
InspectInterface string `json:"inspect_interface" copier:"InspectInterface"`
ManagementInterface string `json:"inspect_interface" copier:"ManagementInterface"`
NetworkInterface string `json:"network_interface" copier:"NetworkInterface"`
RescueInterface string `json:"rescue_interface" copier:"RescueInterface"`
StorageInterface string `json:"storage_interface" copier:"StorageInterface"`
Uuid string `json:"uuid" copier:"Uuid"`
VendorInterface string `json:"vendor_interface" copier:"VendorInterface"`
Owner string `json:"owner" copier:"Owner"`
Description string `json:"description" copier:"Description"`
Lessee string `json:"lessee" copier:"Lessee"`
Shard string `json:"shard" copier:"Shard"`
Properties Properties `json:"properties" copier:"Properties"`
AutomatedClean bool `json:"automated_clean" copier:"AutomatedClean"`
BiosInterface string `json:"bios_interface" copier:"BiosInterface"`
ChassisUuid string `json:"chassis_uuid" copier:"ChassisUuid"`
InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"`
Maintenance bool `json:"maintenance" copier:"Maintenance"`
MaintenanceReason bool `json:"maintenance_reason" copier:"MaintenanceReason"`
NetworkData NetworkData `json:"network_data" copier:"NetworkData"`
Protected bool `json:"protected" copier:"Protected"`
ProtectedReason string `json:"protected_reason" copier:"ProtectedReason"`
Retired bool `json:"retired" copier:"Retired"`
RetiredReason string `json:"retired_reason" copier:"RetiredReason"`
}
type DriverInfo struct {
}
type Properties struct {
}
type NetworkData struct {
}
type CreateNodeResp struct {
AllocationUuid string `json:"allocation_uuid" copier:"AllocationUuid"`
Name string `json:"name" copier:"name"`
PowerState string `json:"power_state" copier:"PowerState"`
TargetPowerState string `json:"target_power_state" copier:"TargetPowerState"`
ProvisionState string `json:"provision_state" copier:"ProvisionState"`
TargetProvisionState string `json:"target_provision_state" copier:"TargetProvisionState"`
Maintenance bool `json:"maintenance" copier:"Maintenance"`
MaintenanceReason string `json:"maintenance_reason" copier:"MaintenanceReason"`
Fault string `json:"fault" copier:"Fault"`
LastError string `json:"last_error" copier:"LastError"`
Reservation string `json:"reservation" copier:"Reservation"`
Driver string `json:"driver" copier:"Driver"`
DriverInfo Driver_info `json:"driver_info" copier:"DriverInfo"`
DriverInternalInfo DriverInternalInfo `json:"driver_internal_info" copier:"DriverInternalInfo"`
Properties Properties `json:"properties" copier:"Properties"`
InstanceInfo InstanceInfo `json:"instance_info" copier:"InstanceInfo"`
InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"`
ChassisUuid string `json:"chassis_uuid" copier:"ChassisUuid"`
Extra Extra `json:"extra" copier:"Extra"`
ConsoleEnabled bool `json:"console_enabled" copier:"ConsoleEnabled"`
RaidConfig RaidConfig `json:"raid_config" copier:"RaidConfig"`
TargetRaidConfig TargetRaidConfig `json:"target_raid_config" copier:"TargetRaidConfig"`
CleanStep CleanStep `json:"clean_step" copier:"CleanStep"`
DeployStep DeployStep `json:"clean_step" copier:"DeployStep"`
Links []Links `json:"links" copier:"Links"`
Ports []Ports `json:"ports" copier:"Ports"`
Portgroups []Portgroups `json:"portgroups" copier:"Portgroups"`
States []States `json:"states" copier:"States"`
ResourceClass string `json:"resource_class" copier:"ResourceClass"`
BootInterface string `json:"boot_interface" copier:"BootInterface"`
ConsoleInterface string `json:"console_interface" copier:"ConsoleInterface"`
DeployInterface string `json:"deploy_interface" copier:"DeployInterface"`
ConductorGroup string `json:"conductor_group" copier:"ConductorGroup"`
InspectInterface string `json:"inspect_interface" copier:"InspectInterface"`
ManagementInterface string `json:"management_interface" copier:"ManagementInterface"`
NetworkInterface string `json:"network_interface" copier:"NetworkInterface"`
PowerInterface string `json:"power_interface" copier:"PowerInterface"`
RaidInterface string `json:"raid_interface" copier:"RaidInterface"`
RescueInterface string `json:"rescue_interface" copier:"RescueInterface"`
StorageInterface string `json:"storage_interface" copier:"StorageInterface"`
Traits []string `json:"traits" copier:"Traits"`
Volume []VolumeNode `json:"volume" copier:"Volume"`
Protected bool `json:"protected" copier:"Protected"`
ProtectedReason string `json:"protected_reason" copier:"ProtectedReason"`
Conductor string `json:"conductor" copier:"Conductor"`
Owner string `json:"owner" copier:"Owner"`
Lessee string `json:"lessee" copier:"Lessee"`
Shard string `json:"shard" copier:"Shard"`
Description string `json:"description" copier:"Description"`
AutomatedClean string `json:"automated_clean" copier:"AutomatedClean"`
BiosInterface string `json:"bios_interface" copier:"BiosInterface"`
NetworkData NetworkData `json:"network_data" copier:"NetworkData"`
Retired bool `json:"retired" copier:"Retired"`
RetiredReason string `json:"retired_reason" copier:"RetiredReason"`
CreatedAt string `json:"created_at" copier:"CreatedAt"`
InspectionFinishedAt string `json:"inspection_finished_at" copier:"InspectionFinishedAt"`
InspectionStartedAt string `json:"inspection_started_at" copier:"InspectionStartedAt"`
UpdatedAt string `json:"updated_at" copier:"UpdatedAt"`
Uuid string `json:"uuid" copier:"uuid"`
ProvisionUpdatedAt string `json:"provision_updated_at" copier:"ProvisionUpdatedAt"`
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
}
type Driver_info struct {
Ipmi_password string `json:"ipmi_password" copier:"ipmi_password"`
Ipmi_username string `json:"ipmi_username" copier:"ipmi_username"`
}
type DriverInternalInfo struct {
}
type InstanceInfo struct {
}
type Extra struct {
}
type RaidConfig struct {
}
type TargetRaidConfig struct {
}
type CleanStep struct {
}
type DeployStep struct {
}
type Ports struct {
Href string `json:"href" copier:"href"`
Rel string `json:"rel" copier:"rel"`
}
type Portgroups struct {
Href string `json:"href" copier:"href"`
Rel string `json:"rel" copier:"rel"`
}
type States struct {
Href string `json:"href" copier:"href"`
Rel string `json:"rel" copier:"rel"`
}
type VolumeNode struct {
Href string `json:"href" copier:"href"`
Rel string `json:"rel" copier:"rel"`
}
type DeleteNodeReq struct {
NodeIdent string `json:"node_ident" copier:"NodeIdent"`
}
type DeleteNodeResp struct {
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
}
type ShowNodeDetailsReq struct {
NodeIdent string `json:"node_ident" copier:"NodeIdent"`
Fields []Fields `json:"fields" copier:"Fields"`
}
type Fields struct {
}
type ShowNodeDetailsResp struct {
AllocationUuid string `json:"allocation_uuid" copier:"AllocationUuid"`
Name string `json:"name" copier:"name"`
PowerState string `json:"power_state" copier:"PowerState"`
TargetPowerState string `json:"target_power_state" copier:"TargetPowerState"`
ProvisionState string `json:"provision_state" copier:"ProvisionState"`
TargetProvisionState string `json:"target_provision_state" copier:"TargetProvisionState"`
Maintenance bool `json:"maintenance" copier:"Maintenance"`
MaintenanceReason string `json:"maintenance_reason" copier:"MaintenanceReason"`
Fault string `json:"fault" copier:"Fault"`
LastError string `json:"last_error" copier:"LastError"`
Reservation string `json:"reservation" copier:"Reservation"`
Driver string `json:"driver" copier:"Driver"`
DriverInfo Driver_info `json:"driver_info" copier:"DriverInfo"`
DriverInternalInfo DriverInternalInfo `json:"driver_internal_info" copier:"DriverInternalInfo"`
Properties Properties `json:"properties" copier:"Properties"`
InstanceInfo InstanceInfo `json:"instance_info" copier:"InstanceInfo"`
InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"`
ChassisUuid string `json:"chassis_uuid" copier:"ChassisUuid"`
Extra Extra `json:"extra" copier:"Extra"`
ConsoleEnabled bool `json:"console_enabled" copier:"ConsoleEnabled"`
RaidConfig RaidConfig `json:"raid_config" copier:"RaidConfig"`
TargetRaidConfig TargetRaidConfig `json:"target_raid_config" copier:"TargetRaidConfig"`
CleanStep CleanStep `json:"clean_step" copier:"CleanStep"`
DeployStep DeployStep `json:"clean_step" copier:"DeployStep"`
Links []Links `json:"links" copier:"Links"`
Ports []Ports `json:"ports" copier:"Ports"`
Portgroups []Portgroups `json:"portgroups" copier:"Portgroups"`
States []States `json:"states" copier:"States"`
ResourceClass string `json:"resource_class" copier:"ResourceClass"`
BootInterface string `json:"boot_interface" copier:"BootInterface"`
ConsoleInterface string `json:"console_interface" copier:"ConsoleInterface"`
DeployInterface string `json:"deploy_interface" copier:"DeployInterface"`
ConductorGroup string `json:"conductor_group" copier:"ConductorGroup"`
InspectInterface string `json:"inspect_interface" copier:"InspectInterface"`
ManagementInterface string `json:"management_interface" copier:"ManagementInterface"`
NetworkInterface string `json:"network_interface" copier:"NetworkInterface"`
PowerInterface string `json:"power_interface" copier:"PowerInterface"`
RaidInterface string `json:"raid_interface" copier:"RaidInterface"`
RescueInterface string `json:"rescue_interface" copier:"RescueInterface"`
StorageInterface string `json:"storage_interface" copier:"StorageInterface"`
Traits []string `json:"traits" copier:"Traits"`
Volume []VolumeNode `json:"volume" copier:"Volume"`
Protected bool `json:"protected" copier:"Protected"`
ProtectedReason string `json:"protected_reason" copier:"ProtectedReason"`
Conductor string `json:"conductor" copier:"Conductor"`
Owner string `json:"owner" copier:"Owner"`
Lessee string `json:"lessee" copier:"Lessee"`
Shard string `json:"shard" copier:"Shard"`
Description string `json:"description" copier:"Description"`
AutomatedClean string `json:"automated_clean" copier:"AutomatedClean"`
BiosInterface string `json:"bios_interface" copier:"BiosInterface"`
NetworkData NetworkData `json:"network_data" copier:"NetworkData"`
Retired bool `json:"retired" copier:"Retired"`
RetiredReason string `json:"retired_reason" copier:"RetiredReason"`
CreatedAt string `json:"created_at" copier:"CreatedAt"`
InspectionFinishedAt string `json:"inspection_finished_at" copier:"InspectionFinishedAt"`
InspectionStartedAt string `json:"inspection_started_at" copier:"InspectionStartedAt"`
UpdatedAt string `json:"updated_at" copier:"UpdatedAt"`
Uuid string `json:"uuid" copier:"uuid"`
ProvisionUpdatedAt string `json:"provision_updated_at" copier:"ProvisionUpdatedAt"`
Code int32 `json:"code,omitempty"`
Msg string `json:"msg,omitempty"`
ErrorMsg string `json:"errorMsg,omitempty"`
}
type ApplyReq struct {
YamlString string `json:"yamlString" copier:"yamlString"`
}