v1alpha1

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package v1alpha1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.

Package v1alpha1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type Agent

type Agent struct {
	CreatedAt     time.Time          `json:"createdAt"`
	CredentialUrl string             `json:"credentialUrl"`
	Id            openapi_types.UUID `json:"id"`
	Status        AgentStatus        `json:"status"`
	StatusInfo    string             `json:"statusInfo"`
	UpdatedAt     time.Time          `json:"updatedAt"`
	Version       string             `json:"version"`
}

Agent defines model for Agent.

type AgentProxy

type AgentProxy struct {
	HttpUrl  *string `json:"httpUrl" validate:"omitnil,url,startsnotwith=https"`
	HttpsUrl *string `json:"httpsUrl" validate:"omitnil,url,startswith=https"`
	NoProxy  *string `json:"noProxy" validate:"omitnil,max=1000"`
}

AgentProxy defines model for AgentProxy.

type AgentStatus

type AgentStatus string

AgentStatus defines model for Agent.Status.

const (
	AgentStatusError                     AgentStatus = "error"
	AgentStatusGatheringInitialInventory AgentStatus = "gathering-initial-inventory"
	AgentStatusNotConnected              AgentStatus = "not-connected"
	AgentStatusSourceGone                AgentStatus = "source-gone"
	AgentStatusUpToDate                  AgentStatus = "up-to-date"
	AgentStatusWaitingForCredentials     AgentStatus = "waiting-for-credentials"
)

Defines values for AgentStatus.

func StringToAgentStatus

func StringToAgentStatus(s string) AgentStatus

type Assessment

type Assessment struct {
	CreatedAt time.Time          `json:"createdAt"`
	Id        openapi_types.UUID `json:"id"`
	Name      string             `json:"name"`

	// OwnerFirstName Owner's first name
	OwnerFirstName *string `json:"ownerFirstName,omitempty"`

	// OwnerLastName Owner's last name
	OwnerLastName *string              `json:"ownerLastName,omitempty"`
	Snapshots     []Snapshot           `json:"snapshots"`
	SourceId      *openapi_types.UUID  `json:"sourceId,omitempty"`
	SourceType    AssessmentSourceType `json:"sourceType"`
}

Assessment defines model for Assessment.

type AssessmentForm

type AssessmentForm struct {
	Inventory *Inventory          `json:"inventory,omitempty"`
	Name      string              `json:"name" validate:"required,assessment_name,min=1,max=100"`
	SourceId  *openapi_types.UUID `json:"sourceId,omitempty"`

	// SourceType Source of the assessment data:
	//  * `inventory` - Manual inventory upload via JSON
	//  * `agent` - Collected by migration planner agent
	SourceType string `json:"sourceType" validate:"required,oneof=inventory agent"`
}

AssessmentForm defines model for AssessmentForm.

type AssessmentList

type AssessmentList = []Assessment

AssessmentList defines model for AssessmentList.

type AssessmentRvtoolsForm

type AssessmentRvtoolsForm struct {
	// File File upload for assessment data
	File openapi_types.File `json:"file" validate:"required"`

	// Name Name of the assessment
	Name string `json:"name" validate:"required,assessment_name,min=1,max=100"`
}

AssessmentRvtoolsForm defines model for AssessmentRvtoolsForm.

type AssessmentSourceType

type AssessmentSourceType string

AssessmentSourceType defines model for Assessment.SourceType.

const (
	AssessmentSourceTypeInventory AssessmentSourceType = "inventory"
	AssessmentSourceTypeRvtools   AssessmentSourceType = "rvtools"
	AssessmentSourceTypeSource    AssessmentSourceType = "source"
)

Defines values for AssessmentSourceType.

type AssessmentUpdate

type AssessmentUpdate struct {
	// Name Name of the assessment
	Name *string `json:"name,omitempty" validate:"required,assessment_name,min=1,max=100"`
}

AssessmentUpdate Update form of the assessment.

type CreateAssessmentJSONRequestBody

type CreateAssessmentJSONRequestBody = AssessmentForm

CreateAssessmentJSONRequestBody defines body for CreateAssessment for application/json ContentType.

type CreateRVToolsAssessmentMultipartRequestBody added in v0.3.0

type CreateRVToolsAssessmentMultipartRequestBody = AssessmentRvtoolsForm

CreateRVToolsAssessmentMultipartRequestBody defines body for CreateRVToolsAssessment for multipart/form-data ContentType.

type CreateSourceJSONRequestBody

type CreateSourceJSONRequestBody = SourceCreate

CreateSourceJSONRequestBody defines body for CreateSource for application/json ContentType.

type Datastore

type Datastore struct {
	DiskId                  string `json:"diskId"`
	FreeCapacityGB          int    `json:"freeCapacityGB"`
	HardwareAcceleratedMove bool   `json:"hardwareAcceleratedMove"`

	// HostId Identifier of the host where this datastore is attached
	HostId          *string `json:"hostId"`
	Model           string  `json:"model"`
	ProtocolType    string  `json:"protocolType"`
	TotalCapacityGB int     `json:"totalCapacityGB"`
	Type            string  `json:"type"`
	Vendor          string  `json:"vendor"`
}

Datastore defines model for Datastore.

type DiskSizeTierSummary added in v0.2.1

type DiskSizeTierSummary struct {
	// TotalSizeTB Total disk size in TB for this tier
	TotalSizeTB float64 `json:"totalSizeTB"`

	// VmCount Number of VMs in this tier
	VmCount int `json:"vmCount"`
}

DiskSizeTierSummary defines model for diskSizeTierSummary.

type DiskTypeSummary added in v0.3.0

type DiskTypeSummary struct {
	// TotalSizeTB Total disk size in TB for this disk type
	TotalSizeTB float64 `json:"totalSizeTB"`

	// VmCount Number of VMs that have at least one disk of this type
	VmCount int `json:"vmCount"`
}

DiskTypeSummary defines model for diskTypeSummary.

type Error

type Error struct {
	// Message Error message
	Message string `json:"message"`

	// RequestId Id of the request generating the error
	RequestId *string `json:"requestId,omitempty"`
}

Error defines model for Error.

type Histogram

type Histogram struct {
	Data     []int `json:"data"`
	MinValue int   `json:"minValue"`
	Step     int   `json:"step"`
}

Histogram defines model for Histogram.

type Host

type Host struct {
	// CpuCores Number of CPU cores
	CpuCores *int `json:"cpuCores"`

	// CpuSockets Number of CPU sockets
	CpuSockets *int `json:"cpuSockets"`

	// Id Unique identifier for this host
	Id *string `json:"id,omitempty"`

	// MemoryMB Host memory in MB
	MemoryMB *int64 `json:"memoryMB"`
	Model    string `json:"model"`
	Vendor   string `json:"vendor"`
}

Host defines model for Host.

type Info

type Info struct {
	// GitCommit Git commit hash
	GitCommit string `json:"gitCommit"`

	// VersionName Version name, based on git tag
	VersionName string `json:"versionName"`
}

Info Migration planner information

type Infra

type Infra struct {
	ClustersPerDatacenter *[]int `json:"clustersPerDatacenter,omitempty"`

	// CpuOverCommitment CPU Overcommitment Ratio. Calculated as total Allocated vCPUs / Total Physical Cores
	CpuOverCommitment *float64       `json:"cpuOverCommitment,omitempty"`
	Datastores        []Datastore    `json:"datastores"`
	HostPowerStates   map[string]int `json:"hostPowerStates"`
	Hosts             *[]Host        `json:"hosts,omitempty"`
	// Deprecated:
	HostsPerCluster *[]int    `json:"hostsPerCluster,omitempty"`
	Networks        []Network `json:"networks"`
	// Deprecated:
	TotalClusters    *int `json:"totalClusters,omitempty"`
	TotalDatacenters *int `json:"totalDatacenters,omitempty"`
	TotalHosts       int  `json:"totalHosts"`
	// Deprecated:
	VmsPerCluster *[]int `json:"vmsPerCluster,omitempty"`
}

Infra defines model for Infra.

type Inventory

type Inventory struct {
	// Clusters Map of cluster names to their inventory data
	Clusters map[string]InventoryData `json:"clusters"`
	Vcenter  *InventoryData           `json:"vcenter,omitempty"`

	// VcenterId ID of the vCenter
	VcenterId string `json:"vcenter_id"`
}

Inventory defines model for Inventory.

type InventoryData added in v0.3.0

type InventoryData struct {
	Infra   Infra    `json:"infra"`
	Vcenter *VCenter `json:"vcenter,omitempty"`
	Vms     VMs      `json:"vms"`
}

InventoryData defines model for InventoryData.

type Ipv4Config

type Ipv4Config struct {
	DefaultGateway string `json:"defaultGateway" validate:"required,ip4_addr,max=15"`
	Dns            string `json:"dns" validate:"required,ip4_addr,max=15"`
	IpAddress      string `json:"ipAddress" validate:"required,ip4_addr,max=15"`
	SubnetMask     string `json:"subnetMask" validate:"required,subnet_mask,max=2"`
}

Ipv4Config defines model for Ipv4Config.

type Job added in v0.3.0

type Job struct {
	// AssessmentId Assessment ID when job completed successfully
	AssessmentId *openapi_types.UUID `json:"assessmentId,omitempty"`

	// Error Error message if job failed
	Error *string `json:"error,omitempty"`

	// Id Job ID
	Id int64 `json:"id"`

	// Status Job status:
	//  * `pending` - Job is queued
	//  * `parsing` - Parsing RVTools Excel file
	//  * `validating` - Running OPA VM validations
	//  * `completed` - Assessment created successfully
	//  * `failed` - Job failed with error
	//  * `cancelled` - Job was cancelled
	Status JobStatus `json:"status"`
}

Job Background job for async assessment creation

type JobStatus added in v0.3.0

type JobStatus string

JobStatus Job status:

  • `pending` - Job is queued
  • `parsing` - Parsing RVTools Excel file
  • `validating` - Running OPA VM validations
  • `completed` - Assessment created successfully
  • `failed` - Job failed with error
  • `cancelled` - Job was cancelled
const (
	Cancelled  JobStatus = "cancelled"
	Completed  JobStatus = "completed"
	Failed     JobStatus = "failed"
	Parsing    JobStatus = "parsing"
	Pending    JobStatus = "pending"
	Validating JobStatus = "validating"
)

Defines values for JobStatus.

type Label

type Label struct {
	Key   string `json:"key" validate:"required,label"`
	Value string `json:"value" validate:"required,label"`
}

Label defines model for Label.

type MigrationIssue

type MigrationIssue struct {
	Assessment string  `json:"assessment"`
	Count      int     `json:"count"`
	Id         *string `json:"id,omitempty"`
	Label      string  `json:"label"`
}

MigrationIssue defines model for MigrationIssue.

type MigrationIssues

type MigrationIssues = []MigrationIssue

MigrationIssues defines model for MigrationIssues.

type Network

type Network struct {
	Dvswitch *string     `json:"dvswitch,omitempty"`
	Name     string      `json:"name"`
	Type     NetworkType `json:"type"`
	VlanId   *string     `json:"vlanId,omitempty"`
	VmsCount *int        `json:"vmsCount,omitempty"`
}

Network defines model for Network.

type NetworkType

type NetworkType string

NetworkType defines model for Network.Type.

const (
	Distributed NetworkType = "distributed"
	Dvswitch    NetworkType = "dvswitch"
	Standard    NetworkType = "standard"
	Unsupported NetworkType = "unsupported"
)

Defines values for NetworkType.

type OsInfo

type OsInfo struct {
	Count     int  `json:"count"`
	Supported bool `json:"supported"`

	// UpgradeRecommendation Recommended OS upgrade for MTV unsupported OS that can be upgraded to a supported OS
	UpgradeRecommendation *string `json:"upgradeRecommendation,omitempty"`
}

OsInfo defines model for osInfo.

type PresignedUrl

type PresignedUrl struct {
	// ExpiresAt Expiration time for the URL token.
	ExpiresAt *time.Time `json:"expires_at,omitempty"`

	// Url Pre-signed URL for downloading the source discovery image.
	Url string `json:"url"`
}

PresignedUrl defines model for presigned-url.

type Snapshot

type Snapshot struct {
	CreatedAt time.Time `json:"createdAt"`
	Inventory Inventory `json:"inventory"`
}

Snapshot defines model for Snapshot.

type Source

type Source struct {
	Agent     *Agent             `json:"agent,omitempty"`
	CreatedAt time.Time          `json:"createdAt"`
	Id        openapi_types.UUID `json:"id"`
	Infra     *struct {
		Proxy        *AgentProxy            `json:"proxy,omitempty"`
		SshPublicKey *ValidatedSSHPublicKey `json:"sshPublicKey" validate:"omitnil,ssh_key"`
		VmNetwork    *VmNetwork             `json:"vmNetwork,omitempty"`
	} `json:"infra,omitempty"`
	Inventory  *Inventory `json:"inventory,omitempty"`
	Labels     *[]Label   `json:"labels,omitempty"`
	Name       string     `json:"name"`
	OnPremises bool       `json:"onPremises"`
	UpdatedAt  time.Time  `json:"updatedAt"`
}

Source defines model for Source.

type SourceCreate

type SourceCreate struct {
	CertificateChain *ValidatedCertificateChain `json:"certificateChain" validate:"omitnil,certs"`
	Labels           *[]Label                   `json:"labels,omitempty" validate:"omitempty,dive,required"`
	Name             ValidatedSourceName        `json:"name" validate:"required,source_name,min=1,max=100"`
	Network          *VmNetwork                 `json:"network,omitempty"`
	Proxy            *AgentProxy                `json:"proxy,omitempty"`
	SshPublicKey     *ValidatedSSHPublicKey     `json:"sshPublicKey" validate:"omitnil,ssh_key"`
}

SourceCreate defines model for SourceCreate.

type SourceList

type SourceList = []Source

SourceList defines model for SourceList.

type SourceUpdate

type SourceUpdate struct {
	CertificateChain *ValidatedCertificateChain   `json:"certificateChain" validate:"omitnil,certs"`
	Labels           *[]Label                     `json:"labels,omitempty" validate:"omitempty,dive,required"`
	Name             *ValidatedOptionalSourceName `json:"name,omitempty" validate:"omitempty,source_name,min=1,max=100"`
	Network          *VmNetwork                   `json:"network,omitempty"`
	Proxy            *AgentProxy                  `json:"proxy,omitempty"`
	SshPublicKey     *ValidatedSSHPublicKey       `json:"sshPublicKey" validate:"omitnil,ssh_key"`
}

SourceUpdate defines model for SourceUpdate.

type Status

type Status struct {
	// Message A human-readable description of the status of this operation.
	Message *string `json:"message,omitempty"`

	// Reason A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
	Reason *string `json:"reason,omitempty"`

	// Status Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	Status *string `json:"status,omitempty"`
}

Status Status is a return value for calls that don't return other objects.

type UpdateAssessmentJSONRequestBody

type UpdateAssessmentJSONRequestBody = AssessmentUpdate

UpdateAssessmentJSONRequestBody defines body for UpdateAssessment for application/json ContentType.

type UpdateInventory

type UpdateInventory struct {
	AgentId   openapi_types.UUID `json:"agentId"`
	Inventory Inventory          `json:"inventory"`
}

UpdateInventory defines model for UpdateInventory.

type UpdateInventoryJSONRequestBody

type UpdateInventoryJSONRequestBody = UpdateInventory

UpdateInventoryJSONRequestBody defines body for UpdateInventory for application/json ContentType.

type UpdateSourceJSONRequestBody

type UpdateSourceJSONRequestBody = SourceUpdate

UpdateSourceJSONRequestBody defines body for UpdateSource for application/json ContentType.

type VCenter

type VCenter struct {
	Id string `json:"id"`
}

VCenter defines model for VCenter.

type VMResourceBreakdown

type VMResourceBreakdown struct {
	Histogram                      Histogram `json:"histogram"`
	Total                          int       `json:"total"`
	TotalForMigratable             int       `json:"totalForMigratable"`
	TotalForMigratableWithWarnings int       `json:"totalForMigratableWithWarnings"`
	TotalForNotMigratable          int       `json:"totalForNotMigratable"`
}

VMResourceBreakdown defines model for VMResourceBreakdown.

type VMs

type VMs struct {
	CpuCores             VMResourceBreakdown             `json:"cpuCores"`
	DiskCount            VMResourceBreakdown             `json:"diskCount"`
	DiskGB               VMResourceBreakdown             `json:"diskGB"`
	DiskSizeTier         *map[string]DiskSizeTierSummary `json:"diskSizeTier,omitempty"`
	DiskTypes            *map[string]DiskTypeSummary     `json:"diskTypes,omitempty"`
	MigrationWarnings    []MigrationIssue                `json:"migrationWarnings"`
	NicCount             *VMResourceBreakdown            `json:"nicCount,omitempty"`
	NotMigratableReasons []MigrationIssue                `json:"notMigratableReasons"`
	// Deprecated:
	Os                          *map[string]int     `json:"os,omitempty"`
	OsInfo                      *map[string]OsInfo  `json:"osInfo,omitempty"`
	PowerStates                 map[string]int      `json:"powerStates"`
	RamGB                       VMResourceBreakdown `json:"ramGB"`
	Total                       int                 `json:"total"`
	TotalMigratable             int                 `json:"totalMigratable"`
	TotalMigratableWithWarnings *int                `json:"totalMigratableWithWarnings,omitempty"`
}

VMs defines model for VMs.

type ValidatedCertificateChain

type ValidatedCertificateChain = string

ValidatedCertificateChain defines model for ValidatedCertificateChain.

type ValidatedOptionalSourceName

type ValidatedOptionalSourceName = string

ValidatedOptionalSourceName defines model for ValidatedOptionalSourceName.

type ValidatedSSHPublicKey

type ValidatedSSHPublicKey = string

ValidatedSSHPublicKey defines model for ValidatedSSHPublicKey.

type ValidatedSourceName

type ValidatedSourceName = string

ValidatedSourceName defines model for ValidatedSourceName.

type VmNetwork

type VmNetwork struct {
	Ipv4 *Ipv4Config `json:"ipv4,omitempty"`
}

VmNetwork defines model for VmNetwork.

Directories

Path Synopsis
Package v1alpha1 provides primitives to interact with the openapi HTTP API.
Package v1alpha1 provides primitives to interact with the openapi HTTP API.
Package v1alpha1 provides primitives to interact with the openapi HTTP API.
Package v1alpha1 provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL