Documentation
¶
Index ¶
- Constants
- Variables
- func GetInstanceTypeMachineUsageMap(instances []cdbm.Instance, machineByID map[string]cdbm.Machine) (itUsed map[uuid.UUID]*APIMachineStatusBreakdown, ...)
- func GetProtoRackFilter(fieldName string, patterns []string) *rlav1.Filter
- func GetProtoRackOrderByFromQueryParam(fieldName, direction string) *rlav1.OrderBy
- func GetProtoTrayFilter(fieldName string, patterns []string) *rlav1.Filter
- func GetProtoTrayOrderByFromQueryParam(fieldName, direction string) *rlav1.OrderBy
- func NormalizeAPIVpcRoutingProfileForSite(routingProfile string) string
- func ProtobufRuleFromAPINetworkSecurityGroupRule(rule *APINetworkSecurityGroupRule) (*cdbm.NetworkSecurityGroupRule, error)
- func ValidateDpuExtensionServiceDeployments(desdrs []APIDpuExtensionServiceDeploymentRequest) error
- func ValidateInfiniBandInterfaces(itIbCaps []cdbm.MachineCapability, ...) error
- func ValidateInterfaces(ifcs *[]APIInterfaceCreateOrUpdateRequest) error
- func ValidateMultiEthernetDeviceInterfaces(itNetworkCaps []cdbm.MachineCapability, dbifcs []cdbm.Interface) error
- func ValidateNVLinkInterfaces(itNvlCaps []cdbm.MachineCapability, ...) error
- type APIAllocation
- type APIAllocationConstraint
- type APIAllocationConstraintCreateRequest
- type APIAllocationConstraintUpdateRequest
- type APIAllocationCreateRequest
- type APIAllocationStats
- type APIAllocationUpdateRequest
- type APIAuditEntry
- type APIBMC
- type APIBMCInfo
- type APIBatchBringUpRackRequest
- type APIBatchInstanceCreateRequest
- type APIBatchRackFirmwareUpdateRequest
- type APIBatchTrayFirmwareUpdateRequest
- type APIBatchUpdateRackPowerStateRequest
- type APIBatchUpdateTrayPowerStateRequest
- type APIBringUpRackRequest
- type APIBringUpRackResponse
- type APIComponentDiff
- type APIDMIData
- type APIDeprecation
- type APIDpuExtensionService
- type APIDpuExtensionServiceCreateRequest
- type APIDpuExtensionServiceCredentials
- type APIDpuExtensionServiceDeployment
- type APIDpuExtensionServiceDeploymentRequest
- type APIDpuExtensionServiceObservability
- func (apiObservability *APIDpuExtensionServiceObservability) FromProto(protoObservability *cwssaws.DpuExtensionServiceObservability)
- func (apiObservability *APIDpuExtensionServiceObservability) ToProto() *cwssaws.DpuExtensionServiceObservability
- func (deso APIDpuExtensionServiceObservability) Validate() error
- type APIDpuExtensionServiceObservabilityConfig
- type APIDpuExtensionServiceObservabilityConfigLogging
- type APIDpuExtensionServiceObservabilityConfigPrometheus
- type APIDpuExtensionServiceSummary
- type APIDpuExtensionServiceUpdateRequest
- type APIDpuExtensionServiceVersionInfo
- type APIExpectedMachine
- type APIExpectedMachineCreateRequest
- type APIExpectedMachineUpdateRequest
- type APIExpectedPowerShelf
- type APIExpectedPowerShelfCreateRequest
- type APIExpectedPowerShelfUpdateRequest
- type APIExpectedSwitch
- type APIExpectedSwitchCreateRequest
- type APIExpectedSwitchUpdateRequest
- type APIFabric
- type APIFabricSummary
- type APIFieldDiff
- type APIGetTaskRequest
- type APIHealthCheck
- type APIIPBlock
- type APIIPBlockCreateRequest
- type APIIPBlockStats
- type APIIPBlockSummary
- type APIIPBlockUpdateRequest
- type APIIPBlockUsageStats
- type APIInfiniBandInterface
- type APIInfiniBandInterfaceCreateOrUpdateRequest
- type APIInfiniBandPartition
- type APIInfiniBandPartitionCreateRequest
- type APIInfiniBandPartitionSummary
- type APIInfiniBandPartitionUpdateRequest
- type APIInfrastructureProvider
- type APIInfrastructureProviderStats
- type APIInfrastructureProviderSummary
- type APIInstance
- type APIInstanceCreateRequest
- func (icr APIInstanceCreateRequest) Validate() error
- func (icr *APIInstanceCreateRequest) ValidateAndSetOperatingSystemData(cfg *config.Config, os *cdbm.OperatingSystem) error
- func (icr *APIInstanceCreateRequest) ValidateDpuExtensionServiceDeployments(desdrs []APIDpuExtensionServiceDeploymentRequest) error
- func (icr *APIInstanceCreateRequest) ValidateInfiniBandInterfaces(itIbCaps []cdbm.MachineCapability) error
- func (icr *APIInstanceCreateRequest) ValidateMultiEthernetDeviceInterfaces(itNetworkCaps []cdbm.MachineCapability, dbifcs []cdbm.Interface) error
- func (icr *APIInstanceCreateRequest) ValidateNVLinkInterfaces(itNvlCaps []cdbm.MachineCapability) error
- type APIInstanceDeleteRequest
- type APIInstanceStats
- type APIInstanceSummary
- type APIInstanceType
- type APIInstanceTypeCreateRequest
- type APIInstanceTypeSummary
- type APIInstanceTypeUpdateRequest
- type APIInstanceUpdateRequest
- func (iur *APIInstanceUpdateRequest) IsInterfaceUpdateRequest() bool
- func (iur *APIInstanceUpdateRequest) IsRebootRequest() bool
- func (iur *APIInstanceUpdateRequest) IsUpdateRequest() bool
- func (iur APIInstanceUpdateRequest) Validate() error
- func (iur *APIInstanceUpdateRequest) ValidateAndSetOperatingSystemData(cfg *config.Config, instance *cdbm.Instance, os *cdbm.OperatingSystem) error
- func (iur *APIInstanceUpdateRequest) ValidateDpuExtensionServiceDeployments(desdrs []APIDpuExtensionServiceDeploymentRequest) error
- func (iur *APIInstanceUpdateRequest) ValidateInfiniBandInterfaces(itIbCaps []cdbm.MachineCapability) error
- func (iur *APIInstanceUpdateRequest) ValidateMultiEthernetDeviceInterfaces(itNetworkCaps []cdbm.MachineCapability, dbifcs []cdbm.Interface) error
- func (iur *APIInstanceUpdateRequest) ValidateNVLinkInterfaces(itNvlCaps []cdbm.MachineCapability) error
- type APIInterface
- type APIInterfaceCreateOrUpdateRequest
- type APIMachine
- type APIMachineCapability
- type APIMachineGPUInfo
- type APIMachineGPUStats
- type APIMachineHealth
- type APIMachineHealthIssueReport
- type APIMachineHealthProbeAlert
- type APIMachineHealthProbeSuccess
- type APIMachineInfiniBandInterface
- type APIMachineInstanceType
- type APIMachineInstanceTypeCreateRequest
- type APIMachineInstanceTypeStats
- type APIMachineInstanceTypeSummary
- type APIMachineInstanceTypeTenant
- type APIMachineInstanceTypeTenantAllocation
- type APIMachineInterface
- type APIMachineMetadata
- type APIMachineNetworkInterface
- type APIMachineStats
- type APIMachineStatusBreakdown
- type APIMachineSummary
- type APIMachineUpdateRequest
- type APIMachineValidationExternalConfig
- type APIMachineValidationExternalConfigCreateRequest
- type APIMachineValidationExternalConfigUpdateRequest
- type APIMachineValidationResult
- type APIMachineValidationRun
- type APIMachineValidationState
- type APIMachineValidationStatus
- type APIMachineValidationTest
- type APIMachineValidationTestCreateRequest
- type APIMachineValidationTestUpdateRequest
- type APIMachineValidationTestsFilter
- type APIMetadata
- type APINVLinkInterface
- type APINVLinkInterfaceCreateOrUpdateRequest
- type APINVLinkInterfaceSummary
- type APINVLinkLogicalPartition
- type APINVLinkLogicalPartitionCreateRequest
- type APINVLinkLogicalPartitionStats
- type APINVLinkLogicalPartitionSummary
- type APINVLinkLogicalPartitionUpdateRequest
- type APINetworkSecurityGroup
- type APINetworkSecurityGroupCreateRequest
- type APINetworkSecurityGroupPropagationDetails
- type APINetworkSecurityGroupRule
- type APINetworkSecurityGroupStats
- type APINetworkSecurityGroupSummary
- type APINetworkSecurityGroupUpdateRequest
- type APIOperatingSystem
- type APIOperatingSystemCreateRequest
- type APIOperatingSystemSiteAssociation
- type APIOperatingSystemSummary
- type APIOperatingSystemUpdateRequest
- type APIRack
- type APIRackComponent
- type APIRackGetAllRequest
- type APIRackGetRequest
- type APIRackLocation
- type APIRackTask
- type APIRackValidateAllRequest
- type APIRackValidationResult
- type APISSHKey
- type APISSHKeyAssociation
- type APISSHKeyCreateRequest
- type APISSHKeyGroup
- type APISSHKeyGroupCreateRequest
- type APISSHKeyGroupSiteAssociation
- type APISSHKeyGroupSummary
- type APISSHKeyGroupUpdateRequest
- type APISSHKeyUpdateRequest
- type APIServiceAccount
- type APISite
- type APISiteCapabilities
- type APISiteContact
- type APISiteCreateRequest
- type APISiteLocation
- type APISiteMachineStats
- type APISiteSummary
- type APISiteUpdateRequest
- type APISku
- type APISkuChassis
- type APISkuComponents
- type APISkuCpu
- type APISkuEthernetDevice
- type APISkuGpu
- type APISkuInfinibandDevice
- type APISkuMemory
- type APISkuStorage
- type APISkuSummary
- type APISkuTpm
- type APIStatusDetail
- type APISubnet
- type APISubnetCreateRequest
- type APISubnetStats
- type APISubnetSummary
- type APISubnetUpdateRequest
- type APITenant
- type APITenantAccount
- type APITenantAccountCreateRequest
- type APITenantAccountStats
- type APITenantAccountUpdateRequest
- type APITenantCapabilities
- type APITenantInstanceTypeAllocation
- type APITenantInstanceTypeStats
- type APITenantInstanceTypeStatsEntry
- type APITenantStats
- type APITenantSummary
- type APITray
- type APITrayGetAllRequest
- type APITrayPosition
- type APITrayValidateAllRequest
- type APIUpdateFirmwareRequest
- type APIUpdateFirmwareResponse
- type APIUpdatePowerStateRequest
- type APIUpdatePowerStateResponse
- type APIUser
- type APIVpc
- type APIVpcCreateRequest
- type APIVpcPeering
- type APIVpcPeeringCreateRequest
- type APIVpcPeeringSummary
- type APIVpcPrefix
- type APIVpcPrefixCreateRequest
- type APIVpcPrefixSummary
- type APIVpcPrefixUpdateRequest
- type APIVpcStats
- type APIVpcSummary
- type APIVpcUpdateRequest
- type APIVpcVirtualizationUpdateRequest
- type DeprecatedEntity
- type RackFilter
- type SSHKeyGroupsSummaryDeprecated
- type TrayFilter
Constants ¶
const ( // ValidationErrorAllocationConstraintResourceType indicates an invalid ResourceType field ValidationErrorAllocationConstraintResourceType = "Resource Type must be InstanceType or IPBlock" // ValidationErrorAllocationConstraintConstraintType indicates an invalid ConstraintType field ValidationErrorAllocationConstraintConstraintType = "Constraint Type should be Reserved, OnDemand or Preemptible" )
const ( // DeprecationTypeAttribute denotes a deprecation of an API model attribute DeprecationTypeAttribute = "Attribute" // DeprecationTypeQueryParam denotes a deprecation of an API query parameter DeprecationTypeQueryParam = "QueryParam" // DeprecationTypeEndpoint denotes a deprecation of an API endpoint DeprecationTypeEndpoint = "Endpoint" )
const ( // DpuExtensionServiceTypeKubernetesPod is the service type for Kubernetes Pod DpuExtensionServiceTypeKubernetesPod = "KubernetesPod" // DpuExtensionServiceMaxObservabilityConfigs is the max number of observability configs allowed per service version DpuExtensionServiceMaxObservabilityConfigs = 20 // DpuExtensionServiceMaxObservabilityConfigNameLength is the max length for an observability config name DpuExtensionServiceMaxObservabilityConfigNameLength = 64 // DpuExtensionServiceMaxObservabilityPropertyLength is the max length for endpoint and path properties DpuExtensionServiceMaxObservabilityPropertyLength = 128 )
const ( // MaxInterfaceCount is the maximum number of Interfaces allowed per Instance MaxInterfaceCount = 16 // MachineIssueCategoryHardware is the category for hardware issues MachineIssueCategoryHardware = "Hardware" // MachineIssueCategoryNetwork is the category for network issues MachineIssueCategoryNetwork = "Network" // MachineIssueCategoryPerformance is the category for performance issues MachineIssueCategoryPerformance = "Performance" // MachineIssueCategoryOther is the category for other issues MachineIssueCategoryOther = "Other" )
const ( // IPv4BlockSizeMin is the minimum value of the IPv4 BlockSize field IPv4BlockSizeMin = 1 // IPv4BlockSizeMax is the maximum value of the IPv4 BlockSize field IPv4BlockSizeMax = 32 // IPv6BlockSizeMin is the minimum value of the IPv6 BlockSize field IPv6BlockSizeMin = 1 // IPv6BlockSizeMax is the maximum value of the IPv6 BlockSize field IPv6BlockSizeMax = 128 )
const ( PowerControlStateOn = "on" PowerControlStateOff = "off" PowerControlStateCycle = "cycle" PowerControlStateForceOff = "forceoff" PowerControlStateForceCycle = "forcecycle" )
const ( SSHKeyValidatorRegex = `^ssh-(rsa|ecdsa|ed25519) AAAA[0-9A-Za-z+/]+[=]{0,3}(\s+.+)?$` SSHKeyInvalid = "SSH key is invalid, must be an SSH key of type: RSA, ECDSA or ED25519" )
const ( // SubnetBlockSizeMin is the minimum value of the SubnetSize field SubnetBlockSizeMin = 8 // SubnetBlockSizeMax is the maximum value of the SubnetSize field SubnetBlockSizeMax = 30 )
const ( APIVpcRoutingProfileExternal = "external" APIVpcRoutingProfileInternal = "internal" APIVpcRoutingProfilePrivilegedInternal = "privileged-internal" )
const ( // VpcPrefixBlockSizeMin is the minimum value of the VpcPrefixSize field VpcPrefixBlockSizeMin = 8 // VpcPrefixBlockSizeMax is the maximum value of the VpcPrefixSize field VpcPrefixBlockSizeMax = 31 )
const APINetworkSecurityGroupPropagationDetailedStatusError = "Error"
const APINetworkSecurityGroupPropagationDetailedStatusFull = "Full"
const APINetworkSecurityGroupPropagationDetailedStatusNone = "None"
const APINetworkSecurityGroupPropagationDetailedStatusPartial = "Partial"
const APINetworkSecurityGroupPropagationDetailedStatusUnknown = "Unknown"
const APINetworkSecurityGroupPropagationStatusError = "Error"
const APINetworkSecurityGroupPropagationStatusSynchronized = "Synchronized"
const APINetworkSecurityGroupPropagationStatusSynchronizing = "Synchronizing"
const APINetworkSecurityGroupRuleActionDeny = "DENY"
const APINetworkSecurityGroupRuleActionEgress = "EGRESS"
const APINetworkSecurityGroupRuleActionPermit = "PERMIT"
const APINetworkSecurityGroupRuleDirectionIngress = "INGRESS"
const APINetworkSecurityGroupRuleProtocolAny = "ANY"
const APINetworkSecurityGroupRuleProtocolIcmp = "ICMP"
const APINetworkSecurityGroupRuleProtocolIcmp6 = "ICMP6"
const APINetworkSecurityGroupRuleProtocolTcp = "TCP"
const APINetworkSecurityGroupRuleProtocolUdp = "UDP"
const (
// ExpectedMachineMaxBatchItems is the maximum number of ExpectedMachines allowed in a single batch operation
ExpectedMachineMaxBatchItems = 100
)
const (
// MachineMaxLabelCount is the maximum number of Labels allowed per Machine
MachineMaxLabelCount = 10
)
const MaxNetworkSecurityGroupRules = 200
const NetworkSecurityGroupRulePriorityMax = 60000
const NetworkSecurityGroupRulePriorityMin = 0
Variables ¶
var ( // errMsgproviderCreateEndpointDeprecated is the error message to indicate that create endpoint is deprecated ErrMsgproviderCreateEndpointDeprecated = "POST '/org/:orgName/carbide/infrastructure-provider' endpoint has been deprecated" // errMsgproviderUpdateEndpointDeprecated is the error message to indicate that update endpoint is deprecated ErrMsgproviderUpdateEndpointDeprecated = "PATCH '/org/:orgName/carbide/infrastructure-provider/current' endpoint has been deprecated" )
var ( // SitePhoneHomeCloudInit default cloudinit with phone home config SitePhoneHomeCloudInit = `#cloud-config phone_home: url: %s post: all` // MachineIssueCategoriesFromAPIToProtobuf is the map of instance issue categories to their corresponding values MachineIssueCategoriesFromAPIToProtobuf = map[string]int32{ MachineIssueCategoryHardware: int32(cwssaws.IssueCategory_HARDWARE), MachineIssueCategoryNetwork: int32(cwssaws.IssueCategory_NETWORK), MachineIssueCategoryPerformance: int32(cwssaws.IssueCategory_PERFORMANCE), MachineIssueCategoryOther: int32(cwssaws.IssueCategory_OTHER), } )
var ( ErrMsgNotConfigurableByProvider = "value is not configurable by Provider" ErrMsgNotConfigurableByTenant = "value is not configurable by Tenant" MachineStatsAllocatedInUse = "allocatedInUse" MachineStatsAllocatedNotInUse = "allocatedNotInUse" MachineStatsUnallocated = "unallocated" )
var ( // errMsgTenantCreateEndpointDeprecated is the error message to indicate that create endpoint is deprecated ErrMsgTenantCreateEndpointDeprecated = "POST '/org/:orgName/carbide/tenant' endpoint has been deprecated" // errMsgTenantUpdateEndpointDeprecated is the error message to indicate that update endpoint is deprecated ErrMsgTenantUpdateEndpointDeprecated = "PATCH '/org/:orgName/carbide/tenant/current' endpoint has been deprecated" )
var APIToProtoComponentTypeName = map[string]string{
"Compute": "COMPONENT_TYPE_COMPUTE",
"NVLSwitch": "COMPONENT_TYPE_NVLSWITCH",
"PowerShelf": "COMPONENT_TYPE_POWERSHELF",
}
APIToProtoComponentTypeName maps API tray type strings to protobuf ComponentType enum names. These names match RLA's internal ComponentTypeFromString (case-insensitive).
var ( // ErrOneAllocationConstraintIsRequired is an error when one allocation constraint is not found in allocation ErrOneAllocationConstraintIsRequired = errors.New("at least one (and at most one) Allocation Constraint must be specified") )
var ( // ErrValidationInfiniBandPartitionAssociation is the error when no associations are specified in the security group ErrValidationInfiniBandPartitionAssociation = errors.New("at least one security group association is required") )
var ( // ErrValidationNVLinkLogicalPartitionAssociation is the error when no associations are specified in the security group ErrValidationNVLinkLogicalPartitionAssociation = errors.New("at least one security group association is required") )
var NetworkSecurityGroupRuleAPIActionFromProtobufAction = map[cwssaws.NetworkSecurityGroupRuleAction]string{ cwssaws.NetworkSecurityGroupRuleAction_NSG_RULE_ACTION_PERMIT: APINetworkSecurityGroupRuleActionPermit, cwssaws.NetworkSecurityGroupRuleAction_NSG_RULE_ACTION_DENY: APINetworkSecurityGroupRuleActionDeny, }
var NetworkSecurityGroupRuleAPIDirectionFromProtobufDirection = map[cwssaws.NetworkSecurityGroupRuleDirection]string{ cwssaws.NetworkSecurityGroupRuleDirection_NSG_RULE_DIRECTION_INGRESS: APINetworkSecurityGroupRuleDirectionIngress, cwssaws.NetworkSecurityGroupRuleDirection_NSG_RULE_DIRECTION_EGRESS: APINetworkSecurityGroupRuleActionEgress, }
var NetworkSecurityGroupRuleAPIPropagationDetailedStatusFromProtobufPropagationStatus = map[cwssaws.NetworkSecurityGroupPropagationStatus]string{ cwssaws.NetworkSecurityGroupPropagationStatus_NSG_PROP_STATUS_NONE: APINetworkSecurityGroupPropagationDetailedStatusNone, cwssaws.NetworkSecurityGroupPropagationStatus_NSG_PROP_STATUS_PARTIAL: APINetworkSecurityGroupPropagationDetailedStatusPartial, cwssaws.NetworkSecurityGroupPropagationStatus_NSG_PROP_STATUS_FULL: APINetworkSecurityGroupPropagationDetailedStatusFull, cwssaws.NetworkSecurityGroupPropagationStatus_NSG_PROP_STATUS_UNKNOWN: APINetworkSecurityGroupPropagationDetailedStatusUnknown, cwssaws.NetworkSecurityGroupPropagationStatus_NSG_PROP_STATUS_ERROR: APINetworkSecurityGroupPropagationDetailedStatusError, }
var NetworkSecurityGroupRuleAPIPropagationStatusFromProtobufPropagationStatus = map[cwssaws.NetworkSecurityGroupPropagationStatus]string{ cwssaws.NetworkSecurityGroupPropagationStatus_NSG_PROP_STATUS_NONE: APINetworkSecurityGroupPropagationStatusSynchronizing, cwssaws.NetworkSecurityGroupPropagationStatus_NSG_PROP_STATUS_PARTIAL: APINetworkSecurityGroupPropagationStatusSynchronizing, cwssaws.NetworkSecurityGroupPropagationStatus_NSG_PROP_STATUS_FULL: APINetworkSecurityGroupPropagationStatusSynchronized, cwssaws.NetworkSecurityGroupPropagationStatus_NSG_PROP_STATUS_UNKNOWN: APINetworkSecurityGroupPropagationStatusError, cwssaws.NetworkSecurityGroupPropagationStatus_NSG_PROP_STATUS_ERROR: APINetworkSecurityGroupPropagationStatusError, }
var NetworkSecurityGroupRuleAPIProtocolFromProtobufProtocol = map[cwssaws.NetworkSecurityGroupRuleProtocol]string{ cwssaws.NetworkSecurityGroupRuleProtocol_NSG_RULE_PROTO_ANY: APINetworkSecurityGroupRuleProtocolAny, cwssaws.NetworkSecurityGroupRuleProtocol_NSG_RULE_PROTO_ICMP: APINetworkSecurityGroupRuleProtocolIcmp, cwssaws.NetworkSecurityGroupRuleProtocol_NSG_RULE_PROTO_ICMP6: APINetworkSecurityGroupRuleProtocolIcmp6, cwssaws.NetworkSecurityGroupRuleProtocol_NSG_RULE_PROTO_TCP: APINetworkSecurityGroupRuleProtocolTcp, cwssaws.NetworkSecurityGroupRuleProtocol_NSG_RULE_PROTO_UDP: APINetworkSecurityGroupRuleProtocolUdp, }
var NetworkSecurityGroupRuleProtobufActionFromAPIAction = map[string]cwssaws.NetworkSecurityGroupRuleAction{ APINetworkSecurityGroupRuleActionPermit: cwssaws.NetworkSecurityGroupRuleAction_NSG_RULE_ACTION_PERMIT, APINetworkSecurityGroupRuleActionDeny: cwssaws.NetworkSecurityGroupRuleAction_NSG_RULE_ACTION_DENY, }
var NetworkSecurityGroupRuleProtobufDirectionFromAPIDirection = map[string]cwssaws.NetworkSecurityGroupRuleDirection{ APINetworkSecurityGroupRuleDirectionIngress: cwssaws.NetworkSecurityGroupRuleDirection_NSG_RULE_DIRECTION_INGRESS, APINetworkSecurityGroupRuleActionEgress: cwssaws.NetworkSecurityGroupRuleDirection_NSG_RULE_DIRECTION_EGRESS, }
var NetworkSecurityGroupRuleProtobufProtocolFromAPIProtocol = map[string]cwssaws.NetworkSecurityGroupRuleProtocol{ APINetworkSecurityGroupRuleProtocolAny: cwssaws.NetworkSecurityGroupRuleProtocol_NSG_RULE_PROTO_ANY, APINetworkSecurityGroupRuleProtocolIcmp: cwssaws.NetworkSecurityGroupRuleProtocol_NSG_RULE_PROTO_ICMP, APINetworkSecurityGroupRuleProtocolIcmp6: cwssaws.NetworkSecurityGroupRuleProtocol_NSG_RULE_PROTO_ICMP6, APINetworkSecurityGroupRuleProtocolTcp: cwssaws.NetworkSecurityGroupRuleProtocol_NSG_RULE_PROTO_TCP, APINetworkSecurityGroupRuleProtocolUdp: cwssaws.NetworkSecurityGroupRuleProtocol_NSG_RULE_PROTO_UDP, }
var ProtoToAPIBMCTypeName = map[rlav1.BMCType]string{ rlav1.BMCType_BMC_TYPE_UNKNOWN: "BmcTypeUnknown", rlav1.BMCType_BMC_TYPE_HOST: "BmcTypeHost", rlav1.BMCType_BMC_TYPE_DPU: "BmcTypeDpu", }
ProtoToAPIBMCTypeName maps protobuf BMCType to API-friendly names.
var ProtoToAPIComponentTypeName = map[rlav1.ComponentType]string{ rlav1.ComponentType_COMPONENT_TYPE_UNKNOWN: "Unknown", rlav1.ComponentType_COMPONENT_TYPE_COMPUTE: "Compute", rlav1.ComponentType_COMPONENT_TYPE_NVLSWITCH: "NVLSwitch", rlav1.ComponentType_COMPONENT_TYPE_POWERSHELF: "PowerShelf", }
ProtoToAPIComponentTypeName maps protobuf ComponentType to API tray type strings.
var ProtoToAPIDiffTypeName = map[rlav1.DiffType]string{ rlav1.DiffType_DIFF_TYPE_UNKNOWN: "Unknown", rlav1.DiffType_DIFF_TYPE_MISSING: "Missing", rlav1.DiffType_DIFF_TYPE_UNEXPECTED: "Unexpected", rlav1.DiffType_DIFF_TYPE_DRIFT: "Drift", }
ProtoToAPIDiffTypeName maps protobuf DiffType to API-friendly names.
var ProtoToAPIRackComponentTypeName = map[rlav1.ComponentType]string{ rlav1.ComponentType_COMPONENT_TYPE_UNKNOWN: "Unknown", rlav1.ComponentType_COMPONENT_TYPE_COMPUTE: "Compute", rlav1.ComponentType_COMPONENT_TYPE_NVLSWITCH: "NVLSwitch", rlav1.ComponentType_COMPONENT_TYPE_POWERSHELF: "PowerShelf", rlav1.ComponentType_COMPONENT_TYPE_TORSWITCH: "TORSwitch", rlav1.ComponentType_COMPONENT_TYPE_UMS: "UMS", rlav1.ComponentType_COMPONENT_TYPE_CDU: "CDU", }
ProtoToAPIRackComponentTypeName maps protobuf ComponentType to API-friendly names for rack components.
var ProtoToAPIRackTaskStatusName = map[rlav1.TaskStatus]string{ rlav1.TaskStatus_TASK_STATUS_UNKNOWN: "Unknown", rlav1.TaskStatus_TASK_STATUS_PENDING: "Pending", rlav1.TaskStatus_TASK_STATUS_RUNNING: "Running", rlav1.TaskStatus_TASK_STATUS_COMPLETED: "Succeeded", rlav1.TaskStatus_TASK_STATUS_FAILED: "Failed", rlav1.TaskStatus_TASK_STATUS_TERMINATED: "Terminated", rlav1.TaskStatus_TASK_STATUS_WAITING: "Waiting", }
var RackFilterFieldMap = map[string]rlav1.RackFilterField{ "name": rlav1.RackFilterField_RACK_FILTER_FIELD_NAME, "manufacturer": rlav1.RackFilterField_RACK_FILTER_FIELD_MANUFACTURER, "model": rlav1.RackFilterField_RACK_FILTER_FIELD_MODEL, }
RackFilterFieldMap maps API field names to RLA protobuf filter enum
var RackOrderByFieldMap = map[string]rlav1.RackOrderByField{ "name": rlav1.RackOrderByField_RACK_ORDER_BY_FIELD_NAME, "manufacturer": rlav1.RackOrderByField_RACK_ORDER_BY_FIELD_MANUFACTURER, "model": rlav1.RackOrderByField_RACK_ORDER_BY_FIELD_MODEL, }
RackOrderByFieldMap maps API field names to RLA protobuf order by enum
var TrayFilterFieldMap = map[string]rlav1.ComponentFilterField{ "name": rlav1.ComponentFilterField_COMPONENT_FILTER_FIELD_NAME, "manufacturer": rlav1.ComponentFilterField_COMPONENT_FILTER_FIELD_MANUFACTURER, "type": rlav1.ComponentFilterField_COMPONENT_FILTER_FIELD_TYPE, }
TrayFilterFieldMap maps API field names to RLA protobuf ComponentFilterField enum for tray validation queries
var TrayOrderByFieldMap = map[string]rlav1.ComponentOrderByField{ "name": rlav1.ComponentOrderByField_COMPONENT_ORDER_BY_FIELD_NAME, "manufacturer": rlav1.ComponentOrderByField_COMPONENT_ORDER_BY_FIELD_MANUFACTURER, "model": rlav1.ComponentOrderByField_COMPONENT_ORDER_BY_FIELD_MODEL, "type": rlav1.ComponentOrderByField_COMPONENT_ORDER_BY_FIELD_TYPE, }
TrayOrderByFieldMap maps API field names to RLA protobuf ComponentOrderByField enum
var ValidPowerControlStates = []string{ PowerControlStateOn, PowerControlStateOff, PowerControlStateCycle, PowerControlStateForceOff, PowerControlStateForceCycle, }
ValidPowerControlStates defines the valid states for power control operations
var _, ValidProtoComponentTypes = func() ([]interface{}, []rlav1.ComponentType) {
anyTypes := make([]interface{}, 0, len(APIToProtoComponentTypeName))
protoTypes := make([]rlav1.ComponentType, 0, len(APIToProtoComponentTypeName))
for apiName, protoName := range APIToProtoComponentTypeName {
anyTypes = append(anyTypes, apiName)
protoTypes = append(protoTypes, rlav1.ComponentType(rlav1.ComponentType_value[protoName]))
}
return anyTypes, protoTypes
}()
Functions ¶
func GetInstanceTypeMachineUsageMap ¶
func GetInstanceTypeMachineUsageMap(instances []cdbm.Instance, machineByID map[string]cdbm.Machine) ( itUsed map[uuid.UUID]*APIMachineStatusBreakdown, tenantITUsed map[uuid.UUID]map[uuid.UUID]*APIMachineStatusBreakdown, )
GetInstanceTypeMachineUsageMap builds per-instance-type and per-tenant-instance-type usage maps from instances
func GetProtoRackFilter ¶
GetProtoRackFilter creates an RLA protobuf filter for the given rack field and patterns. Multiple patterns are OR'd together.
func GetProtoRackOrderByFromQueryParam ¶
GetProtoRackOrderByFromQueryParam creates an RLA protobuf OrderBy from API query parameters
func GetProtoTrayFilter ¶
GetProtoTrayFilter creates an RLA protobuf Filter for the given tray field and patterns. Multiple patterns are OR'd together.
func GetProtoTrayOrderByFromQueryParam ¶
GetProtoTrayOrderByFromQueryParam creates an RLA protobuf OrderBy from API query parameters for tray (component) queries
func NormalizeAPIVpcRoutingProfileForSite ¶ added in v1.4.0
NormalizeAPIVpcRoutingProfileForSite converts REST routing profile values to the current site-controller wire format when a known mapping exists.
func ProtobufRuleFromAPINetworkSecurityGroupRule ¶
func ProtobufRuleFromAPINetworkSecurityGroupRule(rule *APINetworkSecurityGroupRule) (*cdbm.NetworkSecurityGroupRule, error)
Accepts a rule definition from an API request and converts it to the proto representation that will be stored and passed to Carbide
func ValidateDpuExtensionServiceDeployments ¶
func ValidateDpuExtensionServiceDeployments(desdrs []APIDpuExtensionServiceDeploymentRequest) error
ValidateDpuExtensionServiceDeployments validates the DpuExtensionServiceDeployments for the Instance create/update request
func ValidateInfiniBandInterfaces ¶
func ValidateInfiniBandInterfaces(itIbCaps []cdbm.MachineCapability, ibifcs []APIInfiniBandInterfaceCreateOrUpdateRequest) error
ValidateInfiniBandInterfaces validates the InfiniBand Interfaces for Instance create/update request
func ValidateInterfaces ¶
func ValidateInterfaces(ifcs *[]APIInterfaceCreateOrUpdateRequest) error
ValidateInterfaces validates the Interfaces for the Instance
func ValidateMultiEthernetDeviceInterfaces ¶
func ValidateMultiEthernetDeviceInterfaces(itNetworkCaps []cdbm.MachineCapability, dbifcs []cdbm.Interface) error
ValidateMultiEthernetDeviceInterfaces validates the Multi-Ethernet Device Interfaces for the Instance Check Instance Type's Machine Capabilities to ensure: Example: mapping of device, deviceInstance, isPhysical/virtualFunctionID device, deviceInstance, isPhysical/virtualFunctionID device, 0, 0 - Physical device, 0, 1 - Virtual device, 0, 2 - Virtual device, 0, 16 - Virtual device, 1, 0 - Physical device, 1, 1 - Virtual device, 1, 2 - Virtual device, 1, 16 - Virtual In above example, since deviceInstance is 0 and 1, it has 2 DPUs, make sure that `MachineCapabilityDeviceTypeDPU` is present in the Instance Type's Machine Capabilities with minimum count of 2
func ValidateNVLinkInterfaces ¶
func ValidateNVLinkInterfaces(itNvlCaps []cdbm.MachineCapability, nvlifcs []APINVLinkInterfaceCreateOrUpdateRequest) error
ValidateNVLinkInterfaces validates the NVLink interfaces for Instance create/update request. A subset of GPUs may be specified; specifying more interfaces than GPUs is not allowed. Each DeviceInstance (GPU index) must be unique and within the valid range for the machine.
Types ¶
type APIAllocation ¶
type APIAllocation struct {
// ID is the ID of the allocation
ID string `json:"id"`
// Name is the name of the Allocation
Name string `json:"name"`
// Description is the description of the Allocation
Description *string `json:"description"`
// InfrastructureProviderID is the ID of the Infrastructure Provider
InfrastructureProviderID string `json:"infrastructureProviderId"`
// InfrastructureProvider is the summary of the Infrastructure Provider
InfrastructureProvider *APIInfrastructureProviderSummary `json:"infrastructureProvider,omitempty"`
// TenantID is the ID of the Tenant
TenantID string `json:"tenantId"`
// Tenant is the summary of the Tenant
Tenant *APITenantSummary `json:"tenant,omitempty"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Site is the summary of the Site
Site *APISiteSummary `json:"site,omitempty"`
// Status is the status of the Allocation
Status string `json:"status"`
// StatusHistory is the history of statuses for the Allocation
StatusHistory []APIStatusDetail `json:"statusHistory"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// UpdatedAt indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
// AllocationConstraints is a list of Allocation Constraints for the Allocation
AllocationConstraints []APIAllocationConstraint `json:"allocationConstraints"`
}
APIAllocation is api representation of the Allocation
func NewAPIAllocation ¶
func NewAPIAllocation(dba *cdbm.Allocation, dbsds []cdbm.StatusDetail, acs []cdbm.AllocationConstraint, dbacsInstaceTypeMap map[uuid.UUID]*cdbm.InstanceType, dbacsIPBlockMap map[uuid.UUID]*cdbm.IPBlock) *APIAllocation
NewAPIAllocation coverts db layer objects into API objects
type APIAllocationConstraint ¶
type APIAllocationConstraint struct {
// ID is the unique UUID identified for the Allocation Constraint
ID string `json:"id"`
// AllocationID is the ID of the Allocation corresponding to the Allocation Constraint
AllocationID string `json:"allocationId"`
// ResourceType is the type of the Resource
ResourceType string `json:"resourceType"`
// ResourceTypeID is the ID of the resource corresponding to the Allocation Constraint
ResourceTypeID string `bun:"resource_type_id,type:uuid,notnull"`
// ConstraintType is the type of the Allocation Constraint
ConstraintType string `json:"constraintType"`
// ConstraintValue is the value of the Allocation Constraint
ConstraintValue int `json:"constraintValue"`
// DerivedResourceID is the ID of the derived resource
DerivedResourceID *string `json:"derivedResourceId"`
// InstanceType is the summary of the InstaceType
InstanceType *APIInstanceTypeSummary `json:"instanceType,omitempty"`
// IPBlock is the summary of the IPBlock
IPBlock *APIIPBlockSummary `json:"ipBlock,omitempty"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// UpdatedAt indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
}
APIAllocationConstraint is api representation of the Allocation Constraint
func NewAPIAllocationConstraint ¶
func NewAPIAllocationConstraint(cdbm *cdbm.AllocationConstraint, dbinstp *cdbm.InstanceType, dbipb *cdbm.IPBlock) *APIAllocationConstraint
NewAPIAllocationConstraint accepts a DB layer Allocation Constraint object and returns an API object
type APIAllocationConstraintCreateRequest ¶
type APIAllocationConstraintCreateRequest struct {
// ResourceType is the type of the resource for the Allocation Constraint
ResourceType string `json:"resourceType"`
// ResourceTypeID is the ID of the Resource Type
ResourceTypeID string `json:"resourceTypeId"`
// ConstraintType is the type of the Allocation Constraint
ConstraintType string `json:"constraintType"`
// ConstraintValue is the value of the Allocation Constraint
ConstraintValue int `json:"constraintValue"`
}
APIAllocationConstraintCreateRequest captures user request to create a new Allocation Constraint
func (APIAllocationConstraintCreateRequest) Validate ¶
func (accr APIAllocationConstraintCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIAllocationConstraintUpdateRequest ¶
type APIAllocationConstraintUpdateRequest struct {
// ConstraintValue is the value of the Allocation Constraint
ConstraintValue int `json:"constraintValue"`
}
APIAllocationConstraintUpdateRequest captures user request to update an existing Allocation Constraint value
func (APIAllocationConstraintUpdateRequest) Validate ¶
func (accr APIAllocationConstraintUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIAllocationCreateRequest ¶
type APIAllocationCreateRequest struct {
// Name is the name of the Allocation
Name string `json:"name"`
// Description is the description of the Allocation
Description *string `json:"description"`
// TenantID is the ID of the Tenant
TenantID string `json:"tenantId"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// AllocationConstraints is a list of Allocation Constraint objects
AllocationConstraints []APIAllocationConstraintCreateRequest `json:"allocationConstraints"`
}
APIAllocationCreateRequest captures user request to create a new Allocation
func (APIAllocationCreateRequest) Validate ¶
func (acr APIAllocationCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIAllocationStats ¶
type APIAllocationStats struct {
// Assigned is the total number of Machines assigned to this Instance Type
Assigned int `json:"assigned"`
// Total is the total number of Machines allocated to different Tenants for this Instance Type
Total int `json:"total"`
// Used is the total number of allocated Machines of this Instance Type currently being used by Tenants
Used int `json:"used"`
// Unused is the total number of allocated Machines of this Instance Type that is currently not being used by Tenants
Unused int `json:"unused"`
// UnusedUsable is the total number of allocated Machines of this Instance Type that is currently not in use
// but in Ready state, therefore can be provisioned by Tenant
UnusedUsable int `json:"unusedUsable"`
// MaxAllocatable is the maximum number of Machines of this Instance Type that can be allocated to a Tenant
MaxAllocatable *int `json:"maxAllocatable,omitempty"`
}
APIAllocationStats is the data structure to capture API representation of an InstanceType allocation stats
type APIAllocationUpdateRequest ¶
type APIAllocationUpdateRequest struct {
// Name is the name of the Allocation
Name *string `json:"name"`
// Description is the description of the Allocation
Description *string `json:"description"`
}
APIAllocationUpdateRequest is the data structure to capture user request to update an Allocation
func (APIAllocationUpdateRequest) Validate ¶
func (aur APIAllocationUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIAuditEntry ¶
type APIAuditEntry struct {
ID string `json:"id"`
Endpoint string `json:"endpoint"`
QueryParams url.Values `json:"queryParams"`
Method string `json:"method"`
Body map[string]interface{} `json:"body"`
StatusCode int `json:"statusCode"`
StatusMessage string `json:"statusMessage"`
ClientIP string `json:"clientIP"`
UserID *string `json:"userID"`
User *APIUser `json:"user"`
OrgName string `json:"orgName"`
ExtraData map[string]interface{} `json:"extraData"`
Timestamp time.Time `json:"timestamp"`
DurationMs int64 `json:"durationMs"`
APIVersion string `json:"apiVersion"`
}
APIAuditEntry is a data structure to capture audit log information
func NewAPIAuditEntry ¶
func NewAPIAuditEntry(dbAuditEntry cdbm.AuditEntry, dbUser *cdbm.User) APIAuditEntry
NewAPIAuditEntry creates and returns a new APIAuditEntry object
type APIBMC ¶
type APIBMC struct {
Type string `json:"type"`
MacAddress string `json:"macAddress"`
IPAddress string `json:"ipAddress"`
}
APIBMC represents a BMC (Baseboard Management Controller) entry
type APIBMCInfo ¶
type APIBMCInfo struct {
// IP is the IP Address of the Machine's BMI
IP *string `json:"ip"`
// Mac is the Mac Address of the Machine's BMI
Mac *string `json:"mac"`
// Version is the version of the Machine's BMI
Version *string `json:"version"`
// firmwareRevision is the firmare version revision of the Machine's BMI
FirmwareRevision *string `json:"firmwareRevision"`
}
APIBMCInfo is the data structure to capture API representation of a Machine's BMC Info
type APIBatchBringUpRackRequest ¶
type APIBatchBringUpRackRequest struct {
SiteID string `json:"siteId"`
Filter *RackFilter `json:"filter,omitempty"`
Description string `json:"description,omitempty"`
}
APIBatchBringUpRackRequest is the JSON body for batch rack bring up.
func (*APIBatchBringUpRackRequest) Validate ¶
func (r *APIBatchBringUpRackRequest) Validate() error
Validate checks required fields.
type APIBatchInstanceCreateRequest ¶
type APIBatchInstanceCreateRequest struct {
// NamePrefix is the prefix for instance names (e.g., "worker" will create "worker-1", "worker-2",
// etc.)
NamePrefix string `json:"namePrefix"`
// Count is the number of instances to create
Count int `json:"count"`
// Description is the description for all instances
Description *string `json:"description"`
// TenantID is the ID of the Tenant
TenantID string `json:"tenantId"`
// InstanceTypeID is the ID of the Instance Type
InstanceTypeID string `json:"instanceTypeId"`
// VpcID is the ID of the VPC containing the Instances
VpcID string `json:"vpcId"`
// SecondaryVpcIDs lists additional VPC UUIDs for prefix-backed, non-primary
// network interfaces on each Instance in the batch. Validate() rejects this
// field unless every entry in Interfaces uses vpcPrefixId, and batch create
// processing expects these UUIDs to align with the VPCs implied by those
// prefix-backed interfaces.
SecondaryVpcIDs []string `json:"secondaryVpcIds"`
// OperatingSystemID is the ID of the Operating System
OperatingSystemID *string `json:"operatingSystemId"`
// IpxeScript is the iPXE script for the Operating System
IpxeScript *string `json:"ipxeScript"`
// AlwaysBootWithCustomIpxe is the flag to allow always boot with ipxe
AlwaysBootWithCustomIpxe *bool `json:"alwaysBootWithCustomIpxe"`
// PhoneHomeEnabled is the flag to allow enable phone home for the instance
PhoneHomeEnabled *bool `json:"phoneHomeEnabled"`
// UserData is the user data for the instances
UserData *string `json:"userData"`
// Interfaces is the list of Interfaces to create for each instance (shared across all instances)
Interfaces []APIInterfaceCreateOrUpdateRequest `json:"interfaces"`
// InfiniBandInterfaces is the list of InfiniBandInterface to create for each instance (shared across all instances)
InfiniBandInterfaces []APIInfiniBandInterfaceCreateOrUpdateRequest `json:"infinibandInterfaces"`
// NVLinkInterfaces is the list of NVLinkInterface to create for each instance (shared across all instances)
NVLinkInterfaces []APINVLinkInterfaceCreateOrUpdateRequest `json:"nvLinkInterfaces"`
// DpuExtensionServiceDeployments is the list of DpuExtensionServiceDeployments to create for each Instance (shared across all instances)
DpuExtensionServiceDeployments []APIDpuExtensionServiceDeploymentRequest `json:"dpuExtensionServiceDeployments"`
// SSHKeyGroupIDs is a list of SSHKeyGroup IDs (shared across all instances)
SSHKeyGroupIDs []string `json:"sshKeyGroupIds"`
// Labels is a key value objects to be applied to all instances (shared across all instances)
Labels map[string]string `json:"labels"`
// NetworkSecurityGroupID is the ID of a desired NSG to attach to all instances (shared across all instances)
NetworkSecurityGroupID *string `json:"networkSecurityGroupId"`
// TopologyOptimized indicates whether to enforce rack-aware placement
// If true, all instances must be allocated on machines within the same rack or the request will fail
TopologyOptimized *bool `json:"topologyOptimized"`
}
APIBatchInstanceCreateRequest is the data structure to capture request to create multiple instances in a single request with rack-aware allocation logic to place instances on the same rack when possible
func (APIBatchInstanceCreateRequest) Validate ¶
func (bicr APIBatchInstanceCreateRequest) Validate() error
Validate ensure the values passed in batch instance create request are acceptable
func (*APIBatchInstanceCreateRequest) ValidateAndSetOperatingSystemData ¶
func (bicr *APIBatchInstanceCreateRequest) ValidateAndSetOperatingSystemData(cfg *config.Config, os *cdbm.OperatingSystem) error
Validate the OS against any additional option combinations specified.
type APIBatchRackFirmwareUpdateRequest ¶
type APIBatchRackFirmwareUpdateRequest struct {
SiteID string `json:"siteId"`
Filter *RackFilter `json:"filter,omitempty"`
Version *string `json:"version,omitempty"`
}
APIBatchRackFirmwareUpdateRequest is the JSON body for batch rack firmware update.
func (*APIBatchRackFirmwareUpdateRequest) Validate ¶
func (r *APIBatchRackFirmwareUpdateRequest) Validate() error
Validate checks required fields.
type APIBatchTrayFirmwareUpdateRequest ¶
type APIBatchTrayFirmwareUpdateRequest struct {
SiteID string `json:"siteId"`
Filter *TrayFilter `json:"filter,omitempty"`
Version *string `json:"version,omitempty"`
}
APIBatchTrayFirmwareUpdateRequest is the JSON body for batch tray firmware update.
func (*APIBatchTrayFirmwareUpdateRequest) Validate ¶
func (r *APIBatchTrayFirmwareUpdateRequest) Validate() error
Validate checks required fields and filter constraints.
type APIBatchUpdateRackPowerStateRequest ¶
type APIBatchUpdateRackPowerStateRequest struct {
SiteID string `json:"siteId"`
Filter *RackFilter `json:"filter,omitempty"`
State string `json:"state"`
}
APIBatchUpdateRackPowerStateRequest is the JSON body for batch rack power control.
func (*APIBatchUpdateRackPowerStateRequest) Validate ¶
func (r *APIBatchUpdateRackPowerStateRequest) Validate() error
Validate checks required fields and power state validity.
type APIBatchUpdateTrayPowerStateRequest ¶
type APIBatchUpdateTrayPowerStateRequest struct {
SiteID string `json:"siteId"`
Filter *TrayFilter `json:"filter,omitempty"`
State string `json:"state"`
}
APIBatchUpdateTrayPowerStateRequest is the JSON body for batch tray power control.
func (*APIBatchUpdateTrayPowerStateRequest) Validate ¶
func (r *APIBatchUpdateTrayPowerStateRequest) Validate() error
Validate checks required fields, power state validity, and filter constraints.
type APIBringUpRackRequest ¶
type APIBringUpRackRequest struct {
SiteID string `json:"siteId"`
Description string `json:"description,omitempty"`
}
APIBringUpRackRequest is the request body for bring up operations on a single rack
func (*APIBringUpRackRequest) Validate ¶
func (r *APIBringUpRackRequest) Validate() error
Validate validates the bring up request
type APIBringUpRackResponse ¶
type APIBringUpRackResponse struct {
TaskIDs []string `json:"taskIds"`
}
APIBringUpRackResponse is the API response for bring up operations
func NewAPIBringUpRackResponse ¶
func NewAPIBringUpRackResponse(resp *rlav1.SubmitTaskResponse) *APIBringUpRackResponse
NewAPIBringUpRackResponse creates an APIBringUpRackResponse from an RLA SubmitTaskResponse
func (*APIBringUpRackResponse) FromProto ¶
func (r *APIBringUpRackResponse) FromProto(resp *rlav1.SubmitTaskResponse)
FromProto converts an RLA SubmitTaskResponse to an APIBringUpRackResponse
type APIComponentDiff ¶
type APIComponentDiff struct {
Type string `json:"type"`
ID string `json:"id,omitempty"` // RLA internal component UUID
ComponentID string `json:"componentId,omitempty"` // Component ID from the component manager service
Expected *APIRackComponent `json:"expected,omitempty"`
Actual *APIRackComponent `json:"actual,omitempty"`
FieldDiffs []*APIFieldDiff `json:"fieldDiffs,omitempty"`
}
APIComponentDiff represents a single component difference found during validation
func (*APIComponentDiff) FromProto ¶
func (d *APIComponentDiff) FromProto(protoDiff *rlav1.ComponentDiff)
FromProto converts an RLA protobuf ComponentDiff to an APIComponentDiff
type APIDMIData ¶
type APIDMIData struct {
// BoardName is the name of the Machine's board
BoardName *string `json:"boardName"`
// BoardVersion is the version of the Machine's board
BoardVersion *string `json:"boardVersion"`
// BiosDate is the date of the Machine's bios
BiosDate *string `json:"biosDate"`
// BiosVersion is the version of the Machine's bios
BiosVersion *string `json:"biosVersion"`
// ProductName is the name of the Machine's product
ProductName *string `json:"productName"`
// ProductSerial is searial number the Machine
ProductSerial *string `json:"productSerial"`
// BoardSerial is the searial number of the Machine's board
BoardSerial *string `json:"boardSerial"`
// ChassisSerial is searial number the Machine's Chassis
ChassisSerial *string `json:"chassisSerial"`
// SysVendor is the vendor of the Machine's system
SysVendor *string `json:"sysVendor"`
}
APIDMIData is the data structure to capture API representation of a Machine's DMIData
type APIDeprecation ¶
type APIDeprecation struct {
// Field denotes the field that is deprecated (optional)
Attribute *string `json:"attribute,omitempty"`
// Field denotes the field that is deprecated (optional)
QueryParam *string `json:"queryparam,omitempty"`
// Endpoint denotes the endpoint that is deprecated (optional)
Endpoint *string `json:"endpoint,omitempty"`
// ReplacedBy denotes the field that replaces the deprecated field (optional)
ReplacedBy *string `json:"replacedby"`
// Effective indicates the ISO datetime string for when the deprecation takes effect
TakeActionBy time.Time `json:"effective"`
// Notice describes the deprecated field
Notice string `json:"notice"`
}
APIDeprecation captures API representation of a deprecation message
func NewAPIDeprecation ¶
func NewAPIDeprecation(de DeprecatedEntity) APIDeprecation
NewAPIDeprecation creates an API deprecation object from parameters
type APIDpuExtensionService ¶
type APIDpuExtensionService struct {
// ID is the unique UUID v4 identifier for the DpuExtensionService
ID string `json:"id"`
// Name is the name of the DpuExtensionService
Name string `json:"name"`
// Description is the description of the DpuExtensionService
Description *string `json:"description"`
// ServiceType is the type of service
ServiceType string `json:"serviceType"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Site is the summary of the site
Site *APISiteSummary `json:"site,omitempty"`
// TenantID is the ID of the Tenant
TenantID string `json:"tenantId"`
// Tenant is the summary of the tenant
Tenant *APITenantSummary `json:"tenant,omitempty"`
// Version is the latest version of the DPU Extension Service
Version *string `json:"version"`
// VersionInfo holds the details for the latest version
VersionInfo *APIDpuExtensionServiceVersionInfo `json:"versionInfo"`
// ActiveVersions is a list of active versions available for deployment
ActiveVersions []string `json:"activeVersions"`
// Status is the status of the DpuExtensionService
Status string `json:"status"`
// StatusHistory is the status detail records for the DpuExtensionService over time
StatusHistory []APIStatusDetail `json:"statusHistory"`
// Created indicates the ISO datetime string for when the DpuExtensionService was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the DpuExtensionService was last updated
Updated time.Time `json:"updated"`
}
APIDpuExtensionService is the data structure to capture API representation of a DpuExtensionService
func NewAPIDpuExtensionService ¶
func NewAPIDpuExtensionService(dbdes *cdbm.DpuExtensionService, dbdesds []cdbm.StatusDetail) *APIDpuExtensionService
NewAPIDpuExtensionService creates and returns a new APIDpuExtensionService object
type APIDpuExtensionServiceCreateRequest ¶
type APIDpuExtensionServiceCreateRequest struct {
// Name is the name of the DpuExtensionService
Name string `json:"name"`
// Description is the description of the DpuExtensionService
Description *string `json:"description"`
// ServiceType is the type of service
ServiceType string `json:"serviceType"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Data is the deployment spec for the DPU Extension Service
Data string `json:"data"`
// Credentials are the credentials to download resources
Credentials *APIDpuExtensionServiceCredentials `json:"credentials"`
// Observability is the observability configuration for the DPU Extension Service version
Observability *APIDpuExtensionServiceObservability `json:"observability"`
}
APIDpuExtensionServiceCreateRequest is the data structure to capture user request to create a new DpuExtensionService
func (APIDpuExtensionServiceCreateRequest) Validate ¶
func (descr APIDpuExtensionServiceCreateRequest) Validate() error
Validate ensures that the values passed in request are acceptable
type APIDpuExtensionServiceCredentials ¶
type APIDpuExtensionServiceCredentials struct {
// RegistryURL is the URL for the registry
RegistryURL string `json:"registryUrl"`
// Username for the registry
Username *string `json:"username"`
// Password for the registry
Password *string `json:"password"`
}
APIDpuExtensionServiceCredentials is the data structure for registry credentials
func (APIDpuExtensionServiceCredentials) Validate ¶
func (desc APIDpuExtensionServiceCredentials) Validate() error
Validate ensures that the credentials are valid
type APIDpuExtensionServiceDeployment ¶
type APIDpuExtensionServiceDeployment struct {
// ID is the unique UUID v4 identifier for the DpuExtensionServiceDeployment
ID string `json:"id"`
// DpuExtensionService is the summary of the DPU Extension Service
DpuExtensionService *APIDpuExtensionServiceSummary `json:"dpuExtensionService"`
// Version is the deployed version of the DPU Extension Service
Version string `json:"version"`
// Status is the deployment status
Status string `json:"status"`
// Created indicates when this deployment was created
Created time.Time `json:"created"`
// Updated indicates when this deployment was last updated
Updated time.Time `json:"updated"`
}
APIDpuExtensionServiceDeployment is the data structure to capture API representation of a DpuExtensionServiceDeployment
func NewAPIDpuExtensionServiceDeployment ¶
func NewAPIDpuExtensionServiceDeployment(dbdesd *cdbm.DpuExtensionServiceDeployment) *APIDpuExtensionServiceDeployment
NewAPIDpuExtensionServiceDeployment creates and returns a new APIDpuExtensionServiceDeployment object
type APIDpuExtensionServiceDeploymentRequest ¶
type APIDpuExtensionServiceDeploymentRequest struct {
// DpuExtensionServiceID is the ID of the DPU Extension Service to deploy
DpuExtensionServiceID string `json:"dpuExtensionServiceId"`
// Version is the version of the DPU Extension Service to deploy
Version string `json:"version"`
}
APIDpuExtensionServiceDeploymentRequest is the data structure to capture request to deploy a DPU Extension Service
func (APIDpuExtensionServiceDeploymentRequest) Validate ¶
func (desdr APIDpuExtensionServiceDeploymentRequest) Validate() error
Validate ensures that the values passed in request are acceptable
type APIDpuExtensionServiceObservability ¶ added in v1.2.0
type APIDpuExtensionServiceObservability struct {
// Configs are the observability configurations for the service version
Configs []APIDpuExtensionServiceObservabilityConfig `json:"configs"`
}
APIDpuExtensionServiceObservability is the data structure for DPU Extension Service observability
func NewAPIDpuExtensionServiceObservability ¶ added in v1.2.0
func NewAPIDpuExtensionServiceObservability(dbo *cdbm.DpuExtensionServiceObservability) *APIDpuExtensionServiceObservability
NewAPIDpuExtensionServiceObservability creates and returns a new APIDpuExtensionServiceObservability object
func (*APIDpuExtensionServiceObservability) FromProto ¶ added in v1.2.0
func (apiObservability *APIDpuExtensionServiceObservability) FromProto(protoObservability *cwssaws.DpuExtensionServiceObservability)
FromProto populates API observability from the site-agent protobuf form.
func (*APIDpuExtensionServiceObservability) ToProto ¶ added in v1.2.0
func (apiObservability *APIDpuExtensionServiceObservability) ToProto() *cwssaws.DpuExtensionServiceObservability
ToProto converts an API observability definition to the protobuf representation passed to Carbide.
func (APIDpuExtensionServiceObservability) Validate ¶ added in v1.2.0
func (deso APIDpuExtensionServiceObservability) Validate() error
Validate ensures that the observability configuration is valid
type APIDpuExtensionServiceObservabilityConfig ¶ added in v1.2.0
type APIDpuExtensionServiceObservabilityConfig struct {
// Name is the name of the service or service component being monitored
Name *string `json:"name"`
// Prometheus holds prometheus scrape configuration
Prometheus *APIDpuExtensionServiceObservabilityConfigPrometheus `json:"prometheus,omitempty"`
// Logging holds logging configuration
Logging *APIDpuExtensionServiceObservabilityConfigLogging `json:"logging,omitempty"`
}
APIDpuExtensionServiceObservabilityConfig is the data structure for a single DPU Extension Service observability config
func (APIDpuExtensionServiceObservabilityConfig) Validate ¶ added in v1.2.0
func (desoc APIDpuExtensionServiceObservabilityConfig) Validate() error
Validate ensures that the observability config is valid
type APIDpuExtensionServiceObservabilityConfigLogging ¶ added in v1.2.0
type APIDpuExtensionServiceObservabilityConfigLogging struct {
// Path is the log path to collect
Path string `json:"path"`
}
APIDpuExtensionServiceObservabilityConfigLogging is the data structure for logging observability config
func (APIDpuExtensionServiceObservabilityConfigLogging) Validate ¶ added in v1.2.0
func (desol APIDpuExtensionServiceObservabilityConfigLogging) Validate() error
Validate ensures that the logging observability config is valid
type APIDpuExtensionServiceObservabilityConfigPrometheus ¶ added in v1.2.0
type APIDpuExtensionServiceObservabilityConfigPrometheus struct {
// ScrapeIntervalSeconds is how often prometheus should scrape the endpoint
ScrapeIntervalSeconds uint32 `json:"scrapeIntervalSeconds"`
// Endpoint is the prometheus scrape endpoint
Endpoint string `json:"endpoint"`
}
APIDpuExtensionServiceObservabilityConfigPrometheus is the data structure for prometheus observability config
func (APIDpuExtensionServiceObservabilityConfigPrometheus) Validate ¶ added in v1.2.0
func (desop APIDpuExtensionServiceObservabilityConfigPrometheus) Validate() error
Validate ensures that the prometheus observability config is valid
type APIDpuExtensionServiceSummary ¶
type APIDpuExtensionServiceSummary struct {
// ID is the unique UUID v4 identifier for the DpuExtensionService
ID string `json:"id"`
// Name is the name of the DpuExtensionService
Name string `json:"name"`
// ServiceType is the type of service
ServiceType string `json:"serviceType"`
// LatestVersion is the latest version of the DPU Extension Service
LatestVersion *string `json:"latestVersion"`
// Status is the status of the DpuExtensionService
Status string `json:"status"`
}
APIDpuExtensionServiceSummary is the data structure to capture API summary of a DpuExtensionService
func NewAPIDpuExtensionServiceSummary ¶
func NewAPIDpuExtensionServiceSummary(dbdes *cdbm.DpuExtensionService) *APIDpuExtensionServiceSummary
NewAPIDpuExtensionServiceSummary creates and returns a new APIDpuExtensionServiceSummary object
type APIDpuExtensionServiceUpdateRequest ¶
type APIDpuExtensionServiceUpdateRequest struct {
// Name is the name of the DpuExtensionService
Name *string `json:"name"`
// Description is the description of the DpuExtensionService
Description *string `json:"description"`
// Data is the deployment spec for the DPU Extension Service
Data *string `json:"data"`
// Credentials are the credentials to download resources
Credentials *APIDpuExtensionServiceCredentials `json:"credentials"`
// Observability is the observability configuration for the DPU Extension Service version
Observability *APIDpuExtensionServiceObservability `json:"observability"`
}
APIDpuExtensionServiceUpdateRequest is the data structure to capture user request to update a DpuExtensionService
func (APIDpuExtensionServiceUpdateRequest) Validate ¶
func (desur APIDpuExtensionServiceUpdateRequest) Validate() error
Validate ensures that the values passed in request are acceptable
type APIDpuExtensionServiceVersionInfo ¶
type APIDpuExtensionServiceVersionInfo struct {
// Version is the version identifier
Version string `json:"version"`
// Data is the deployment spec
Data string `json:"data"`
// HasCredentials indicates if this version has credentials
HasCredentials bool `json:"hasCredentials"`
// Created indicates when this version was created
Created time.Time `json:"created"`
// Observability is the observability configuration for this version
Observability *APIDpuExtensionServiceObservability `json:"observability"`
}
APIDpuExtensionServiceVersionInfo is the data structure for version information
func NewAPIDpuExtensionServiceVersionInfo ¶
func NewAPIDpuExtensionServiceVersionInfo(dbv *cdbm.DpuExtensionServiceVersionInfo) *APIDpuExtensionServiceVersionInfo
NewAPIDpuExtensionServiceVersionInfo creates and returns a new APIDpuExtensionServiceVersionInfo object
func (*APIDpuExtensionServiceVersionInfo) FromProto ¶ added in v1.2.0
func (apiVersionInfo *APIDpuExtensionServiceVersionInfo) FromProto(protoVersionInfo *cwssaws.DpuExtensionServiceVersionInfo, fallbackTime time.Time)
FromProto populates API version info from the site-agent protobuf form.
type APIExpectedMachine ¶
type APIExpectedMachine struct {
// ID is the ID of this Expected Machine
ID uuid.UUID `json:"id"`
// BmcMacAddress is the MAC address of the expected machine's BMC
BmcMacAddress string `json:"bmcMacAddress"`
// SiteID is the ID of the site this machine belongs to
SiteID uuid.UUID `json:"siteId"`
// Site is the site information
Site *APISite `json:"site,omitempty"`
// ChassisSerialNumber is the serial number of the expected machine's chassis
ChassisSerialNumber string `json:"chassisSerialNumber"`
// FallbackDPUSerialNumbers is the serial numbers of the expected machine's fallback DPUs
FallbackDPUSerialNumbers []string `json:"fallbackDPUSerialNumbers"`
// SkuID is the ID of the SKU
SkuID *string `json:"skuId"`
// Sku is the SKU information
Sku *APISku `json:"sku,omitempty"`
// MachineID is the ID of the Machine associated with this Expected Machine
MachineID *string `json:"machineId"`
// Machine is the optional Machine information associated with this Expected Machine
Machine *APIMachineSummary `json:"machine,omitempty"`
// RackID is the optional rack identifier
RackID *string `json:"rackId"`
// Name is the optional name of the expected machine
Name *string `json:"name"`
// Manufacturer is the optional manufacturer of the expected machine
Manufacturer *string `json:"manufacturer"`
// Model is the optional model of the expected machine
Model *string `json:"model"`
// Description is the optional description of the expected machine
Description *string `json:"description"`
// FirmwareVersion is the optional firmware version of the expected machine
FirmwareVersion *string `json:"firmwareVersion"`
// SlotID is the optional slot identifier
SlotID *int32 `json:"slotId"`
// TrayIdx is the optional tray index
TrayIdx *int32 `json:"trayIdx"`
// HostID is the optional host identifier
HostID *int32 `json:"hostId"`
// Labels is the labels of the expected machine
Labels map[string]string `json:"labels"`
// Created indicates the ISO datetime string for when the ExpectedMachine was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the ExpectedMachine was last updated
Updated time.Time `json:"updated"`
}
APIExpectedMachine is the data structure to capture API representation of an ExpectedMachine
func NewAPIExpectedMachine ¶
func NewAPIExpectedMachine(dibp *cdbm.ExpectedMachine) *APIExpectedMachine
NewAPIExpectedMachine accepts a DB layer ExpectedMachine object and returns an API object
type APIExpectedMachineCreateRequest ¶
type APIExpectedMachineCreateRequest struct {
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// BmcMacAddress is the MAC address of the expected machine's BMC
BmcMacAddress string `json:"bmcMacAddress"`
// BmcUsername is the username of the expected machine's BMC
DefaultBmcUsername *string `json:"defaultBmcUsername"`
// DefaultBmcPassword is the password of the expected machine's BMC
DefaultBmcPassword *string `json:"defaultBmcPassword"`
// ChassisSerialNumber is the serial number of the expected machine's chassis
ChassisSerialNumber string `json:"chassisSerialNumber"`
// FallbackDPUSerialNumbers is the serial numbers of the expected machine's fallback DPUs
FallbackDPUSerialNumbers []string `json:"fallbackDPUSerialNumbers"`
// SkuId is the optional UUID for an SKU
SkuID *string `json:"skuId"`
// RackID is the optional rack identifier
RackID *string `json:"rackId"`
// Name is the optional name of the expected machine
Name *string `json:"name"`
// Manufacturer is the optional manufacturer of the expected machine
Manufacturer *string `json:"manufacturer"`
// Model is the optional model of the expected machine
Model *string `json:"model"`
// Description is the optional description of the expected machine
Description *string `json:"description"`
// FirmwareVersion is the optional firmware version of the expected machine
FirmwareVersion *string `json:"firmwareVersion"`
// SlotID is the optional slot identifier
SlotID *int32 `json:"slotId"`
// TrayIdx is the optional tray index
TrayIdx *int32 `json:"trayIdx"`
// HostID is the optional host identifier
HostID *int32 `json:"hostId"`
// Labels is the labels of the expected machine
Labels map[string]string `json:"labels"`
}
APIExpectedMachineCreateRequest is the data structure to capture instance request to create a new ExpectedMachine
func (*APIExpectedMachineCreateRequest) Validate ¶
func (emcr *APIExpectedMachineCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIExpectedMachineUpdateRequest ¶
type APIExpectedMachineUpdateRequest struct {
// ID is required for batch updates (must be empty or match path value for single update)
ID *string `json:"id"`
// BmcMacAddress is the MAC address of the expected machine's BMC
BmcMacAddress *string `json:"bmcMacAddress"`
// BmcUsername is the username of the expected machine's BMC
DefaultBmcUsername *string `json:"defaultBmcUsername"`
// DefaultBmcPassword is the password of the expected machine's BMC
DefaultBmcPassword *string `json:"defaultBmcPassword"`
// ChassisSerialNumber is the serial number of the expected machine's chassis
ChassisSerialNumber *string `json:"chassisSerialNumber"`
// FallbackDPUSerialNumbers is the serial numbers of the expected machine's fallback DPUs
FallbackDPUSerialNumbers []string `json:"fallbackDPUSerialNumbers"`
// SkuId is the optional UUID for an SKU
SkuID *string `json:"skuId"`
// RackID is the optional rack identifier
RackID *string `json:"rackId"`
// Name is the optional name of the expected machine
Name *string `json:"name"`
// Manufacturer is the optional manufacturer of the expected machine
Manufacturer *string `json:"manufacturer"`
// Model is the optional model of the expected machine
Model *string `json:"model"`
// Description is the optional description of the expected machine
Description *string `json:"description"`
// FirmwareVersion is the optional firmware version of the expected machine
FirmwareVersion *string `json:"firmwareVersion"`
// SlotID is the optional slot identifier
SlotID *int32 `json:"slotId"`
// TrayIdx is the optional tray index
TrayIdx *int32 `json:"trayIdx"`
// HostID is the optional host identifier
HostID *int32 `json:"hostId"`
// Labels is the labels of the expected machine
Labels map[string]string `json:"labels"`
}
APIExpectedMachineUpdateRequest is the data structure to capture user request to update an ExpectedMachine
func (*APIExpectedMachineUpdateRequest) Validate ¶
func (emur *APIExpectedMachineUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIExpectedPowerShelf ¶
type APIExpectedPowerShelf struct {
// ID is the ID of this Expected Power Shelf
ID uuid.UUID `json:"id"`
// BmcMacAddress is the MAC address of the expected power shelf's BMC
BmcMacAddress string `json:"bmcMacAddress"`
// SiteID is the ID of the site this power shelf belongs to
SiteID uuid.UUID `json:"siteId"`
// Site is the site information
Site *APISite `json:"site,omitempty"`
// ShelfSerialNumber is the serial number of the expected power shelf
ShelfSerialNumber string `json:"shelfSerialNumber"`
// IpAddress is the IP address of the expected power shelf
IpAddress *string `json:"ipAddress"`
// RackID is the optional rack identifier
RackID *string `json:"rackId"`
// Name is the optional name of the expected power shelf
Name *string `json:"name"`
// Manufacturer is the optional manufacturer of the expected power shelf
Manufacturer *string `json:"manufacturer"`
// Model is the optional model of the expected power shelf
Model *string `json:"model"`
// Description is the optional description of the expected power shelf
Description *string `json:"description"`
// FirmwareVersion is the optional firmware version of the expected power shelf
FirmwareVersion *string `json:"firmwareVersion"`
// SlotID is the optional slot identifier
SlotID *int32 `json:"slotId"`
// TrayIdx is the optional tray index
TrayIdx *int32 `json:"trayIdx"`
// HostID is the optional host identifier
HostID *int32 `json:"hostId"`
// Labels is the labels of the expected power shelf
Labels map[string]string `json:"labels"`
// Created indicates the ISO datetime string for when the ExpectedPowerShelf was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the ExpectedPowerShelf was last updated
Updated time.Time `json:"updated"`
}
APIExpectedPowerShelf is the data structure to capture API representation of an ExpectedPowerShelf
func NewAPIExpectedPowerShelf ¶
func NewAPIExpectedPowerShelf(dbModel *cdbm.ExpectedPowerShelf) *APIExpectedPowerShelf
NewAPIExpectedPowerShelf accepts a DB layer ExpectedPowerShelf object and returns an API object
type APIExpectedPowerShelfCreateRequest ¶
type APIExpectedPowerShelfCreateRequest struct {
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// BmcMacAddress is the MAC address of the expected power shelf's BMC
BmcMacAddress string `json:"bmcMacAddress"`
// DefaultBmcUsername is the username of the expected power shelf's BMC
DefaultBmcUsername *string `json:"defaultBmcUsername"`
// DefaultBmcPassword is the password of the expected power shelf's BMC
DefaultBmcPassword *string `json:"defaultBmcPassword"`
// ShelfSerialNumber is the serial number of the expected power shelf
ShelfSerialNumber string `json:"shelfSerialNumber"`
// IpAddress is the IP address of the expected power shelf
IpAddress *string `json:"ipAddress"`
// RackID is the optional rack identifier
RackID *string `json:"rackId"`
// Name is the optional name of the expected power shelf
Name *string `json:"name"`
// Manufacturer is the optional manufacturer of the expected power shelf
Manufacturer *string `json:"manufacturer"`
// Model is the optional model of the expected power shelf
Model *string `json:"model"`
// Description is the optional description of the expected power shelf
Description *string `json:"description"`
// FirmwareVersion is the optional firmware version of the expected power shelf
FirmwareVersion *string `json:"firmwareVersion"`
// SlotID is the optional slot identifier
SlotID *int32 `json:"slotId"`
// TrayIdx is the optional tray index
TrayIdx *int32 `json:"trayIdx"`
// HostID is the optional host identifier
HostID *int32 `json:"hostId"`
// Labels is the labels of the expected power shelf
Labels map[string]string `json:"labels"`
}
APIExpectedPowerShelfCreateRequest is the data structure to capture request to create a new ExpectedPowerShelf
func (*APIExpectedPowerShelfCreateRequest) Validate ¶
func (epcr *APIExpectedPowerShelfCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIExpectedPowerShelfUpdateRequest ¶
type APIExpectedPowerShelfUpdateRequest struct {
// ID is required for batch updates (must be empty or match path value for single update)
ID *string `json:"id"`
// BmcMacAddress is the MAC address of the expected power shelf's BMC
BmcMacAddress *string `json:"bmcMacAddress"`
// DefaultBmcUsername is the username of the expected power shelf's BMC
DefaultBmcUsername *string `json:"defaultBmcUsername"`
// DefaultBmcPassword is the password of the expected power shelf's BMC
DefaultBmcPassword *string `json:"defaultBmcPassword"`
// ShelfSerialNumber is the serial number of the expected power shelf
ShelfSerialNumber *string `json:"shelfSerialNumber"`
// IpAddress is the IP address of the expected power shelf
IpAddress *string `json:"ipAddress"`
// RackID is the optional rack identifier
RackID *string `json:"rackId"`
// Name is the optional name of the expected power shelf
Name *string `json:"name"`
// Manufacturer is the optional manufacturer of the expected power shelf
Manufacturer *string `json:"manufacturer"`
// Model is the optional model of the expected power shelf
Model *string `json:"model"`
// Description is the optional description of the expected power shelf
Description *string `json:"description"`
// FirmwareVersion is the optional firmware version of the expected power shelf
FirmwareVersion *string `json:"firmwareVersion"`
// SlotID is the optional slot identifier
SlotID *int32 `json:"slotId"`
// TrayIdx is the optional tray index
TrayIdx *int32 `json:"trayIdx"`
// HostID is the optional host identifier
HostID *int32 `json:"hostId"`
// Labels is the labels of the expected power shelf
Labels map[string]string `json:"labels"`
}
APIExpectedPowerShelfUpdateRequest is the data structure to capture user request to update an ExpectedPowerShelf
func (*APIExpectedPowerShelfUpdateRequest) Validate ¶
func (epur *APIExpectedPowerShelfUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIExpectedSwitch ¶
type APIExpectedSwitch struct {
// ID is the ID of this Expected Switch
ID uuid.UUID `json:"id"`
// BmcMacAddress is the MAC address of the expected switch's BMC
BmcMacAddress string `json:"bmcMacAddress"`
// SiteID is the ID of the site this switch belongs to
SiteID uuid.UUID `json:"siteId"`
// Site is the site information
Site *APISite `json:"site,omitempty"`
// SwitchSerialNumber is the serial number of the expected switch
SwitchSerialNumber string `json:"switchSerialNumber"`
// RackID is the optional rack identifier
RackID *string `json:"rackId"`
// Name is the optional name of the expected switch
Name *string `json:"name"`
// Manufacturer is the optional manufacturer of the expected switch
Manufacturer *string `json:"manufacturer"`
// Model is the optional model of the expected switch
Model *string `json:"model"`
// Description is the optional description of the expected switch
Description *string `json:"description"`
// FirmwareVersion is the optional firmware version of the expected switch
FirmwareVersion *string `json:"firmwareVersion"`
// SlotID is the optional slot identifier
SlotID *int32 `json:"slotId"`
// TrayIdx is the optional tray index
TrayIdx *int32 `json:"trayIdx"`
// HostID is the optional host identifier
HostID *int32 `json:"hostId"`
// Labels is the labels of the expected switch
Labels map[string]string `json:"labels"`
// Created indicates the ISO datetime string for when the ExpectedSwitch was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the ExpectedSwitch was last updated
Updated time.Time `json:"updated"`
}
APIExpectedSwitch is the data structure to capture API representation of an ExpectedSwitch
func NewAPIExpectedSwitch ¶
func NewAPIExpectedSwitch(dbModel *cdbm.ExpectedSwitch) *APIExpectedSwitch
NewAPIExpectedSwitch accepts a DB layer ExpectedSwitch object and returns an API object
type APIExpectedSwitchCreateRequest ¶
type APIExpectedSwitchCreateRequest struct {
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// BmcMacAddress is the MAC address of the expected switch's BMC
BmcMacAddress string `json:"bmcMacAddress"`
// DefaultBmcUsername is the username of the expected switch's BMC
DefaultBmcUsername *string `json:"defaultBmcUsername"`
// DefaultBmcPassword is the password of the expected switch's BMC
DefaultBmcPassword *string `json:"defaultBmcPassword"`
// SwitchSerialNumber is the serial number of the expected switch
SwitchSerialNumber string `json:"switchSerialNumber"`
// NvOsUsername is the NVOS username of the expected switch
NvOsUsername *string `json:"nvOsUsername"`
// NvOsPassword is the NVOS password of the expected switch
NvOsPassword *string `json:"nvOsPassword"`
// RackID is the optional rack identifier
RackID *string `json:"rackId"`
// Name is the optional name of the expected switch
Name *string `json:"name"`
// Manufacturer is the optional manufacturer of the expected switch
Manufacturer *string `json:"manufacturer"`
// Model is the optional model of the expected switch
Model *string `json:"model"`
// Description is the optional description of the expected switch
Description *string `json:"description"`
// FirmwareVersion is the optional firmware version of the expected switch
FirmwareVersion *string `json:"firmwareVersion"`
// SlotID is the optional slot identifier
SlotID *int32 `json:"slotId"`
// TrayIdx is the optional tray index
TrayIdx *int32 `json:"trayIdx"`
// HostID is the optional host identifier
HostID *int32 `json:"hostId"`
// Labels is the labels of the expected switch
Labels map[string]string `json:"labels"`
}
APIExpectedSwitchCreateRequest is the data structure to capture request to create a new ExpectedSwitch
func (*APIExpectedSwitchCreateRequest) Validate ¶
func (escr *APIExpectedSwitchCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIExpectedSwitchUpdateRequest ¶
type APIExpectedSwitchUpdateRequest struct {
// ID is required for batch updates (must be empty or match path value for single update)
ID *string `json:"id"`
// BmcMacAddress is the MAC address of the expected switch's BMC
BmcMacAddress *string `json:"bmcMacAddress"`
// DefaultBmcUsername is the username of the expected switch's BMC
DefaultBmcUsername *string `json:"defaultBmcUsername"`
// DefaultBmcPassword is the password of the expected switch's BMC
DefaultBmcPassword *string `json:"defaultBmcPassword"`
// SwitchSerialNumber is the serial number of the expected switch
SwitchSerialNumber *string `json:"switchSerialNumber"`
// NvOsUsername is the NVOS username of the expected switch
NvOsUsername *string `json:"nvOsUsername"`
// NvOsPassword is the NVOS password of the expected switch
NvOsPassword *string `json:"nvOsPassword"`
// RackID is the optional rack identifier
RackID *string `json:"rackId"`
// Name is the optional name of the expected switch
Name *string `json:"name"`
// Manufacturer is the optional manufacturer of the expected switch
Manufacturer *string `json:"manufacturer"`
// Model is the optional model of the expected switch
Model *string `json:"model"`
// Description is the optional description of the expected switch
Description *string `json:"description"`
// FirmwareVersion is the optional firmware version of the expected switch
FirmwareVersion *string `json:"firmwareVersion"`
// SlotID is the optional slot identifier
SlotID *int32 `json:"slotId"`
// TrayIdx is the optional tray index
TrayIdx *int32 `json:"trayIdx"`
// HostID is the optional host identifier
HostID *int32 `json:"hostId"`
// Labels is the labels of the expected switch
Labels map[string]string `json:"labels"`
}
APIExpectedSwitchUpdateRequest is the data structure to capture user request to update an ExpectedSwitch
func (*APIExpectedSwitchUpdateRequest) Validate ¶
func (esur *APIExpectedSwitchUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIFabric ¶
type APIFabric struct {
// ID is the guid identifier for the Fabric
ID string `json:"id"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Site is the summary of the Site
Site *APISiteSummary `json:"site,omitempty"`
// InfrastructureProviderID is the ID of the InfrastructureProvider
InfrastructureProviderID string `json:"infrastructureProviderId"`
// InfrastructureProvider is the summary of the InfrastructureProvider
InfrastructureProvider *APIInfrastructureProviderSummary `json:"infrastructureProvider,omitempty"`
// Status represents the status of the machine
Status string `json:"status"`
// StatusHistory is the history of statuses for the Fabric
StatusHistory []APIStatusDetail `json:"statusHistory"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// UpdatedAt indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
}
APIFabric is the data structure to capture API representation of a Fabric
func NewAPIFabric ¶
func NewAPIFabric(dbf *cdbm.Fabric, dbsds []cdbm.StatusDetail) *APIFabric
NewAPIFabric accepts a DB layer Fabric object and returns an API object
type APIFabricSummary ¶
type APIFabricSummary struct {
// ID of the Fabric
ID string `json:"id"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Status is the status of the Fabric
Status string `json:"status"`
}
APIFabricSummary is the data structure to capture API summary of a Fabric
func NewAPIFabricSummary ¶
func NewAPIFabricSummary(dbfb *cdbm.Fabric) *APIFabricSummary
NewAPIFabricSummary accepts a DB layer Fabric object returns an API layer object
type APIFieldDiff ¶
type APIFieldDiff struct {
FieldName string `json:"fieldName"`
ExpectedValue string `json:"expectedValue"`
ActualValue string `json:"actualValue"`
}
APIFieldDiff represents a single field difference
func (*APIFieldDiff) FromProto ¶
func (f *APIFieldDiff) FromProto(protoFieldDiff *rlav1.FieldDiff)
FromProto converts an RLA protobuf FieldDiff to an APIFieldDiff
type APIGetTaskRequest ¶ added in v1.2.0
type APIGetTaskRequest struct {
SiteID string `query:"siteId"`
}
APIGetTaskRequest captures query parameters for getting a task by ID.
func (*APIGetTaskRequest) Validate ¶ added in v1.2.0
func (r *APIGetTaskRequest) Validate() error
type APIHealthCheck ¶
type APIHealthCheck struct {
// IsHealthy provides a flag to accompany an error status code
IsHealthy bool `json:"is_healthy"`
// Error contains an error message in case of health issues
Error *string `json:"error"`
}
APIHealthCheck is a data structure to capture Forge API health information
func NewAPIHealthCheck ¶
func NewAPIHealthCheck(isHealthy bool, errorMessage *string) *APIHealthCheck
NewAPIHealthCheck creates and returns a new APIHealthCheck object
type APIIPBlock ¶
type APIIPBlock struct {
// ID is the unique UUID v4 identifier for the IPBlock
ID string `json:"id"`
// Name is the name of the IPBlock
Name string `json:"name"`
// Description is the description of the IPBlock
Description *string `json:"description"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Site is the summary of the Site
Site *APISiteSummary `json:"site,omitempty"`
// InfrastructureProviderID is the ID of the InfrastructureProvider
InfrastructureProviderID string `json:"infrastructureProviderId"`
// InfrastructureProvider is the summary of the InfrastructureProvider
InfrastructureProvider *APIInfrastructureProviderSummary `json:"infrastructureProvider,omitempty"`
// TenantID is the ID of the Tenant
TenantID *string `json:"tenantId"`
// Tenant is the summary of the tenant
Tenant *APITenantSummary `json:"tenant,omitempty"`
// RoutingType is the routingType of the IPBlock
RoutingType string `json:"routingType"`
// Prefix is the prefix of the network in CIDR notation
Prefix string `json:"prefix"`
// PrefixLength is the length of the network prefix
PrefixLength int `json:"prefixLength"`
// ProtocolVersion is the version of the ip network IPv4 or IPv6
ProtocolVersion string `json:"protocolVersion"`
// Status is the status of the IPBlock
Status string `json:"status"`
// StatusHistory is the history of statuses for the IPBlock
StatusHistory []APIStatusDetail `json:"statusHistory"`
// UsageStats is the usage summary from IPAM for the IPBlock
UsageStats *APIIPBlockUsageStats `json:"usageStats,omitempty"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// UpdatedAt indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
}
APIIPBlock is the data structure to capture API representation of an IPBlock
func NewAPIIPBlock ¶
func NewAPIIPBlock(dbipb *cdbm.IPBlock, dbsds []cdbm.StatusDetail, dbpu *ipam.Usage) *APIIPBlock
NewAPIIPBlock accepts a DB layer IPBlock object returns an API layer object
type APIIPBlockCreateRequest ¶
type APIIPBlockCreateRequest struct {
// Name is the name of the IPBlock
Name string `json:"name"`
// Description is the description of the IPBlock
Description *string `json:"description"`
// SiteID is the ID of the site
SiteID string `json:"siteId"`
// RoutingType is the routing type of the IPBlock
RoutingType string `json:"routingType"`
// Prefix is the prefix of the network in CIDR notation
Prefix string `json:"prefix"`
// BlockSize is the legacy field for prefixLength
// NOTE: This field has been deprecated
BlockSize *int `json:"blockSize"`
// PrefixLength is the length of the prefix
PrefixLength int `json:"prefixLength"`
// ProtocolVersion is the version of the ip network ipv4 or ipv6
ProtocolVersion string `json:"protocolVersion"`
}
APIIPBlockCreateRequest is the data structure to capture user request to create a new IPBlock
func (APIIPBlockCreateRequest) Validate ¶
func (ipbcr APIIPBlockCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIIPBlockStats ¶
type APIIPBlockStats struct {
// Total is the total number of the IPBlock object in Forge Cloud
Total int `json:"total"`
// Pending is the total number of pending IPBlock object in Forge Cloud
Pending int `json:"pending"`
// Provisioning is the total number of provisioning IPBlock object in Forge Cloud
Provisioning int `json:"provisioning"`
// Ready is the total number of ready IPBlock object in Forge Cloud
Ready int `json:"ready"`
// Deleting is the total number of deleting IPBlock object in Forge Cloud
Deleting int `json:"deleting"`
// Error is the total number of error IPBlock object in Forge Cloud
Error int `json:"error"`
}
APIIPBlockStats is a data structure to capture information about IPBlock stats at the API layer
type APIIPBlockSummary ¶
type APIIPBlockSummary struct {
// ID of the IP Block
ID string `json:"id"`
// Name of the IPBlock, only lowercase characters, digits, hyphens and cannot begin/end with hyphen
Name string `json:"name"`
// RoutingType is the routingType of the IPBlock
RoutingType string `json:"routingType"`
// Prefix is the prefix of the network in CIDR notation
Prefix string `json:"prefix"`
// PrefixLength is the length of the network prefix
PrefixLength int `json:"prefixLength"`
// Status is the status of the IPBlock
Status string `json:"status"`
}
APIIPBlockSummary is the data structure to capture API summary of an IPBlock
func NewAPIIPBlockSummary ¶
func NewAPIIPBlockSummary(dbipb *cdbm.IPBlock) *APIIPBlockSummary
NewAPIIPBlockSummary accepts a DB layer IPBlock object returns an API layer object
type APIIPBlockUpdateRequest ¶
type APIIPBlockUpdateRequest struct {
// Name is the name of the IPBlock
Name *string `json:"name"`
// Description is the description of the IPBlock
Description *string `json:"description"`
}
APIIPBlockUpdateRequest is the data structure to capture user request to update an IPBlock
func (APIIPBlockUpdateRequest) Validate ¶
func (ipbur APIIPBlockUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIIPBlockUsageStats ¶
type APIIPBlockUsageStats struct {
// AvailableIPs is the total number of available IPs in the IPBlock
AvailableIPs uint64 `json:"availableIPs"`
// AcquiredIPs the number of acquired IPs from the IPBlock
AcquiredIPs uint64 `json:"acquiredIPs"`
// AvailablePrefixes is a list of prefixes which are available in the IPBlock
AvailablePrefixes []string `json:"availablePrefixes"`
// AvailableSmallestPrefixes is the count of available Prefixes with 2 countable Bits
AvailableSmallestPrefixes uint64 `json:"availableSmallestPrefixes"`
// AcquiredPrefixes the number of acquired prefixes from the IPBlock
AcquiredPrefixes uint64 `json:"acquiredPrefixes"`
}
APIIPBlockUsageStats is a data structure to capture information about IPBlock usage statsfrom IPAM at the API layer
type APIInfiniBandInterface ¶
type APIInfiniBandInterface struct {
// ID is the unique UUID v4 identifier for the InfiniBandInterface
ID string `json:"id"`
// InstanceID is the ID of the associated Instance
InstanceID string `json:"instanceId"`
// Instance is the summary of the Instance
Instance *APIInstanceSummary `json:"instance,omitempty"`
// InfiniBandPartitonID is the ID of the associated InfiniBandPartition
InfiniBandPartitonID string `json:"partitionId"`
// InfiniBandPartiton is the summary of the InfiniBandPartiton
InfiniBandPartition *APIInfiniBandPartitionSummary `json:"partition,omitempty"`
// Device is the name of the InfiniBand device
Device string `json:"device"`
// Vendor is the name of the vendor of the InfiniBand device
Vendor *string `json:"vendor"`
// DeviceInstance is the index of the device where partition attach to
DeviceInstance int `json:"deviceInstance"`
// IsPhysical indicates whether the Subnet is bound on a physical Interface
IsPhysical bool `json:"isPhysical"`
// VirtualFunctionID must be specified if isPhysical is false
VirtualFunctionID *int `json:"virtualFunctionId"`
// GUID must be specified if isPhysical is false
GUID *string `json:"guid"`
// Status is the status of the InfiniBandInterface
Status string `json:"status"`
// Created is the date and time the entity was created
Created time.Time `json:"created"`
// Updated is the date and time the entity was last updated
Updated time.Time `json:"updated"`
}
APIInfiniBandInterface is the data structure to capture InfiniBandInterface
func NewAPIInfiniBandInterface ¶
func NewAPIInfiniBandInterface(dbibi *cdbm.InfiniBandInterface) *APIInfiniBandInterface
NewAPIInfiniBandInterface creates a new APIInfiniBandInterface
type APIInfiniBandInterfaceCreateOrUpdateRequest ¶
type APIInfiniBandInterfaceCreateOrUpdateRequest struct {
// InfiniBandPartitionID is the ID of the InfiniBandPartition
InfiniBandPartitionID string `json:"partitionId"`
// Device is the name of the InfinitBand device to use
Device string `json:"device"`
// Vendor is the name of the vendor of the InfiniBand device
Vendor *string `json:"vendor"`
// DeviceInstance is the index of the device to use
DeviceInstance int `json:"deviceInstance"`
// IsPhysical indicates whether the Partition is attach to Instance over a physical Interface
IsPhysical bool `json:"isPhysical"`
// VirtualFunctionID must be specified if isPhysical is false
VirtualFunctionID *int `json:"virtualFunctionId"`
}
APIInfiniBandInterfaceCreateRequest is the data structure to capture user request to create a new InfiniBandInterface
func (APIInfiniBandInterfaceCreateOrUpdateRequest) Validate ¶
func (ibicr APIInfiniBandInterfaceCreateOrUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIInfiniBandPartition ¶
type APIInfiniBandPartition struct {
// ID is the unique UUID v4 identifier for the InfiniBand Partition
ID string `json:"id"`
// Name is the name of the InfiniBand Partition
Name string `json:"name"`
// Description is the description of the InfiniBand Partition
Description *string `json:"description"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Site is the summary of the Site
Site *APISiteSummary `json:"site,omitempty"`
// TenantID is the ID of the Tenant
TenantID string `json:"tenantId"`
// Tenant is the summary of the tenant
Tenant *APITenantSummary `json:"tenant,omitempty"`
// Controller IB Partition ID is the ID of the Site Controller IB partition
ControllerIBPartitionID *string `json:"controllerIBPartitionId"`
// Partition Key is the key of IB partition
PartitionKey *string `json:"partitionKey"`
// Partition Name is the name of IB partition
PartitionName *string `json:"partitionName"`
// Service Level is the service level of IB partition
ServiceLevel *int `json:"serviceLevel"`
// Rate Limit is the rate limit of IB partition
RateLimit *float32 `json:"rateLimit"`
// Mtu of the IB partition
Mtu *int `json:"mtu"`
// EnableSharp indicates if sharp enable on the IB partition or not
EnableSharp *bool `json:"enableSharp"`
// Labels is the labels of the InfiniBand Partition
Labels map[string]string `json:"labels"`
// Status is the status o the InfiniBand Partition
Status string `json:"status"`
// StatusHistory is the status detail records for the InfiniBand Partition over time
StatusHistory []APIStatusDetail `json:"statusHistory"`
// Created indicates the ISO datetime string for when the InfiniBand Partition was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the InfiniBand Partition was last updated
Updated time.Time `json:"updated"`
}
APIInfiniBandPartition is the data structure to capture API representation of a InfiniBand Partition
func NewAPIInfiniBandPartition ¶
func NewAPIInfiniBandPartition(dibp *cdbm.InfiniBandPartition, dbsds []cdbm.StatusDetail) *APIInfiniBandPartition
NewAPIInfiniBandPartition accepts a DB layer InfiniBandPartition object and returns an API object
type APIInfiniBandPartitionCreateRequest ¶
type APIInfiniBandPartitionCreateRequest struct {
// Name is the name of the InfiniBand Partition
Name string `json:"name"`
// Description is the description of the InfiniBand Partition
Description *string `json:"description"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Labels is the labels of the InfiniBand Partition
Labels map[string]string `json:"labels"`
}
APIInfiniBandPartitionCreateRequest is the data structure to capture instance request to create a new InfiniBandPartition
func (APIInfiniBandPartitionCreateRequest) Validate ¶
func (ibpcr APIInfiniBandPartitionCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIInfiniBandPartitionSummary ¶
type APIInfiniBandPartitionSummary struct {
// ID of the InfiniBand Partition
ID string `json:"id"`
// Name of the InfiniBand Partition
Name string `json:"name"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Controller IB Partition is the ID of the Site Controller Partition corresponding to the InfiniBand Partition
ControllerIBPartitionID *string `json:"controllerIBPartitionId"`
// Status is the status of the InfiniBand Partition
Status string `json:"status"`
}
APIInfiniBandPartitionSummary is the data structure to capture API summary of a InfiniBandPartition
func NewAPIInfiniBandPartitionSummary ¶
func NewAPIInfiniBandPartitionSummary(dbibp *cdbm.InfiniBandPartition) *APIInfiniBandPartitionSummary
NewAPIInfiniBandPartitionSummary accepts a DB layer InfiniBandPartition object returns an API layer object
type APIInfiniBandPartitionUpdateRequest ¶
type APIInfiniBandPartitionUpdateRequest struct {
// Name is the name of the InfiniBand Partition
Name *string `json:"name"`
// Description is the description of the InfiniBand Partition
Description *string `json:"description"`
// Labels is the labels of the InfiniBand Partition
Labels map[string]string `json:"labels"`
}
APIInfiniBandPartitionUpdateRequest is the data structure to capture user request to update a InfiniBandPartition
func (APIInfiniBandPartitionUpdateRequest) Validate ¶
func (ibpur APIInfiniBandPartitionUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIInfrastructureProvider ¶
type APIInfrastructureProvider struct {
// ID is the unique UUID v4 identifier for the Infrastructure Provider
ID string `json:"id"`
// Org contains the name of the org this Infrastructure Provider belongs to
Org string `json:"org"`
// OrgDisplayName contains the display name of the org this Infrastructure Provider belongs to
OrgDisplayName *string `json:"orgDisplayName"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// UpdatedAt indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
}
APIInfrastructureProvider is the data structure to capture API representation of an Infrastructure Provider
func NewAPIInfrastructureProvider ¶
func NewAPIInfrastructureProvider(dbip *cdbm.InfrastructureProvider) *APIInfrastructureProvider
NewAPIInfrastructureProvider accepts a DB layer InfrastructureProvider object returns an API layer object
type APIInfrastructureProviderStats ¶
type APIInfrastructureProviderStats struct {
// Machine is the data structure to capture API representation of an Machine Stats associated with Infrastructure Provider
Machine APIMachineStats `json:"machine"`
// IPBlock is the data structure to capture API representation of a IPBlock Stats associated with Infrastructure Provider
IPBlock APIIPBlockStats `json:"ipBlock"`
// TenantAccount is the data structure to capture API representation of a TenantAccount Stats associated with Infrastructure Provider
TenantAccount APITenantAccountStats `json:"tenantAccount"`
}
APIInfrastructureProviderStats is the data structure to capture API representation of an Infrastructure Provider
func NewAPIInfrastructureProviderStats ¶
func NewAPIInfrastructureProviderStats(mcstatsmap map[string]int, ipbstatsmap map[string]int, tastatsmap map[string]int) *APIInfrastructureProviderStats
NewAPIInfrastructureProviderStats accepts map that represents stats for the each objects and returns an API layer object
type APIInfrastructureProviderSummary ¶
type APIInfrastructureProviderSummary struct {
// Org contains the name of the org the Infrastructure Provider belongs to
Org string `json:"org"`
// OrgDisplayName contains the display name of the org this Infrastructure Provider belongs to
OrgDisplayName *string `json:"orgDisplayName"`
}
APIInfrastructureProviderSummary is the data structure to capture API representation of an Infrastructure Provider
func NewAPIInfrastructureProviderSummary ¶
func NewAPIInfrastructureProviderSummary(dbip *cdbm.InfrastructureProvider) *APIInfrastructureProviderSummary
NewAPIInfrastructureProviderSummary accepts a DB layer InfrastructureProvider object returns an API layer object
type APIInstance ¶
type APIInstance struct {
// ID is the unique UUID v4 identifier for the Instance
ID string `json:"id"`
// Name of the Instance
Name string `json:"name"`
// Description is the description of the Instance
Description *string `json:"description"`
// ControllerInstanceID is the ID of the Instance in Site Controller
ControllerInstanceID string `json:"controllerInstanceId"`
// TenantID is the ID of the Tenant
TenantID string `json:"tenantId"`
// Tenant is the summary of the tenant
Tenant *APITenantSummary `json:"tenant,omitempty"`
// InfrastructureProviderID is the ID of the Infrastructure Provider
InfrastructureProviderID string `json:"infrastructureProviderId"`
// InfrastructureProvider is the summary of the Infrastructure Provider
InfrastructureProvider *APIInfrastructureProviderSummary `json:"infrastructureProvider,omitempty"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Site is the summary of the Site
Site *APISiteSummary `json:"site,omitempty"`
// InstanceTypeID is the ID of the InstanceType
InstanceTypeID *string `json:"instanceTypeId"`
// InstanceType is the summary of the InstanceType
InstanceType *APIInstanceTypeSummary `json:"instanceType,omitempty"`
// VpcID is the ID of the VPC
VpcID string `json:"vpcId"`
// Vpc is the summary of the VPC
Vpc *APIVpcSummary `json:"vpc,omitempty"`
// SecondaryVpcIDs lists non-primary VPC UUIDs derived from prefix-backed
// interfaces attached to the Instance. These values are populated from
// interface relations rather than stored directly on the Instance record.
SecondaryVpcIDs []string `json:"secondaryVpcIds"`
// MachineID is the ID of the Machine
MachineID *string `json:"machineId"`
// Machine is the summary of the Machine
Machine *APIMachineSummary `json:"machine,omitempty"`
// OperatingSystemID is the ID of the OperatingSystem
OperatingSystemID *string `json:"operatingSystemId"`
// OperatingSystem is the summary of the OperatingSystem
OperatingSystem *APIOperatingSystemSummary `json:"operatingSystem,omitempty"`
// ipxeScript is an attribute which is inherited from Operating System
IpxeScript *string `json:"ipxeScript"`
// AlwaysBootWithCustomIpxe is an attribute which is specified by user if instance boot with ipxe or not
AlwaysBootWithCustomIpxe bool `json:"alwaysBootWithCustomIpxe"`
// PhoneHomeEnabled is an attribute which is specified by user if instance needs to be enabled for phone home or not
PhoneHomeEnabled bool `json:"phoneHomeEnabled"`
// UserData is inherited from Operating System or specified by user if allowed
UserData *string `json:"userData"`
// Labels is Instace labels specified by user
Labels map[string]string `json:"labels"`
// IsUpdatePending is an attribute suggest if instance update pending or not
IsUpdatePending bool `json:"isUpdatePending"`
// SerialConsoleURL is the ssh serial console URL associated with the instance
SerialConsoleURL *string `json:"serialConsoleUrl"`
// NetworkSecurityGroupID is the ID of attached NSG, if any
NetworkSecurityGroupID *string `json:"networkSecurityGroupId"`
// NetworkSecurityGroup holds the summary for attached NSG, if requested via includeRelation
NetworkSecurityGroup *APINetworkSecurityGroupSummary `json:"networkSecurityGroup,omitempty"`
// NetworkSecurityGroupPropagationDetails is the propagation details for the attched NSG, if any
NetworkSecurityGroupPropagationDetails *APINetworkSecurityGroupPropagationDetails `json:"networkSecurityGroupPropagationDetails"`
// NetworkSecurityGroupInherited indicates if the Instance is inheriting Network Security Group rules from parent VPC
NetworkSecurityGroupInherited bool `json:"networkSecurityGroupInherited"`
// TPM EK Cert
TpmEkCertificate *string `json:"tpmEkCertificate"`
// Status is the status of the Instance
Status string `json:"status"`
// Interfaces are list of the subnet associated with the Instance
Interfaces []APIInterface `json:"interfaces"`
// InfiniBandInterfaces are list of the InfiniBandInterface associated with the Instance
InfiniBandInterfaces []APIInfiniBandInterface `json:"infinibandInterfaces"`
// DpuExtensionServiceDeployments are list of the DpuExtensionServiceDeployments associated with the Instance
DpuExtensionServiceDeployments []APIDpuExtensionServiceDeployment `json:"dpuExtensionServiceDeployments"`
// NVLinkInterfaces are list of the NVLinkInterface associated with the Instance
NVLinkInterfaces []APINVLinkInterface `json:"nvLinkInterfaces"`
// SSHKeyGroupIDs are list of the ssh key group IDs associated with the Instance
SSHKeyGroupIDs []string `json:"sshKeyGroupIds"`
// SSHKeyGroups are list of the ssh key group associated with the Instance
SSHKeyGroups []APISSHKeyGroupSummary `json:"sshKeyGroups"`
// StatusHistory is the history of statuses for the Instance
StatusHistory []APIStatusDetail `json:"statusHistory"`
// Created indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
// Deprecations is the list of deprecation messages denoting fields which are being deprecated
Deprecations []APIDeprecation `json:"deprecations,omitempty"`
}
APIInstance is the data structure to capture API representation of an Instance
func NewAPIInstance ¶
func NewAPIInstance(dbinst *cdbm.Instance, dbSite *cdbm.Site, dbiss []cdbm.Interface, dbibis []cdbm.InfiniBandInterface, dbdesds []cdbm.DpuExtensionServiceDeployment, dbnvlis []cdbm.NVLinkInterface, dbskgs []cdbm.SSHKeyGroup, dbsds []cdbm.StatusDetail) *APIInstance
NewAPIInstance accepts a DB layer Instance object returns an API layer object. SecondaryVpcIDs are derived from interface relations, so callers must preload Interface.VpcPrefix on prefix-backed interfaces when they want those IDs populated.
type APIInstanceCreateRequest ¶
type APIInstanceCreateRequest struct {
// Name is the name of the Instance
Name string `json:"name"`
// Description is the description of the Instance
Description *string `json:"description"`
// TenantID is the ID of the Tenant
TenantID string `json:"tenantId"`
// InstanceTypeID is the ID of the Instance Type. Only InstanceTypeID or Machineid can be present
InstanceTypeID *string `json:"instanceTypeId"`
// VpcID is the ID of the VPC containing the Instance
VpcID string `json:"vpcId"`
// SecondaryVpcIDs lists additional VPC UUIDs for prefix-backed, non-primary
// network interfaces on the Instance. Validate() rejects this field unless
// every entry in Interfaces uses vpcPrefixId, and the create handler then
// verifies that the supplied UUIDs exactly match the VPCs resolved from those
// prefix-backed interfaces.
SecondaryVpcIDs []string `json:"secondaryVpcIds"`
// OperatingSystemID is the ID of the Operating System
OperatingSystemID *string `json:"operatingSystemId"`
// IpxeScript is the iPXE script for the Operating System
IpxeScript *string `json:"ipxeScript"`
// AlwaysBootWithCustomIpxe is the flag to allow always boot with ipxe
AlwaysBootWithCustomIpxe *bool `json:"alwaysBootWithCustomIpxe"`
// PhoneHomeEnabled is the flag to allow enable phone home for the instance
PhoneHomeEnabled *bool `json:"phoneHomeEnabled"`
// UserData is the ID of the Operating System
UserData *string `json:"userData"`
// Interfaces is the list of Interfaces to create for the Instance
Interfaces []APIInterfaceCreateOrUpdateRequest `json:"interfaces"`
// InfiniBandInterfaces is the list of InfiniBandInterface to create for the Instance
InfiniBandInterfaces []APIInfiniBandInterfaceCreateOrUpdateRequest `json:"infinibandInterfaces"`
// DpuExtensionServiceDeployments is the list of DpuExtensionServiceDeployments to create for the Instance
DpuExtensionServiceDeployments []APIDpuExtensionServiceDeploymentRequest `json:"dpuExtensionServiceDeployments"`
// NVLinkInterfaces is the list of NVLinkInterface to create for the Instance
NVLinkInterfaces []APINVLinkInterfaceCreateOrUpdateRequest `json:"nvLinkInterfaces"`
// SSHKeyGroupIDs is a list of SSHKeyID objects
SSHKeyGroupIDs []string `json:"sshKeyGroupIds"`
// Labels is a key value objects
Labels map[string]string `json:"labels"`
// NetworkSecurityGroupID is the ID if a desired
// NSG to attach to the instance
NetworkSecurityGroupID *string `json:"networkSecurityGroupId"`
// MachineID is the ID of the Machine. Only MachineID or InstanceTypeID can be present
MachineID *string `json:"machineId"`
// AllowUnhealthyMachine is a flag that can be used to target Machines are in maintenance or have health alerts preventing regular provision flow.
AllowUnhealthyMachine *bool `json:"allowUnhealthyMachine"`
}
APIInstanceCreateRequest is the data structure to capture request to create a new Instance
func (APIInstanceCreateRequest) Validate ¶
func (icr APIInstanceCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
func (*APIInstanceCreateRequest) ValidateAndSetOperatingSystemData ¶
func (icr *APIInstanceCreateRequest) ValidateAndSetOperatingSystemData(cfg *config.Config, os *cdbm.OperatingSystem) error
Validate the OS against any additional option combinations specified.
func (*APIInstanceCreateRequest) ValidateDpuExtensionServiceDeployments ¶
func (icr *APIInstanceCreateRequest) ValidateDpuExtensionServiceDeployments(desdrs []APIDpuExtensionServiceDeploymentRequest) error
ValidateDpuExtensionServiceDeployments validates the DpuExtensionServiceDeployments for the Instance create request
func (*APIInstanceCreateRequest) ValidateInfiniBandInterfaces ¶
func (icr *APIInstanceCreateRequest) ValidateInfiniBandInterfaces(itIbCaps []cdbm.MachineCapability) error
ValidateInfiniBandInterfaces validates the InfiniBand Interfaces for the Instance
func (*APIInstanceCreateRequest) ValidateMultiEthernetDeviceInterfaces ¶
func (icr *APIInstanceCreateRequest) ValidateMultiEthernetDeviceInterfaces(itNetworkCaps []cdbm.MachineCapability, dbifcs []cdbm.Interface) error
ValidateMultiEthernetDeviceInterfaces validates the Multi-Ethernet Device Interfaces for the Instance
func (*APIInstanceCreateRequest) ValidateNVLinkInterfaces ¶
func (icr *APIInstanceCreateRequest) ValidateNVLinkInterfaces(itNvlCaps []cdbm.MachineCapability) error
ValidateNVLinkInterfaces validates the NVLink interfaces for the Instance
type APIInstanceDeleteRequest ¶
type APIInstanceDeleteRequest struct {
// MachineHealthIssue is the report of a machine health issue
MachineHealthIssue *APIMachineHealthIssueReport `json:"machineHealthIssue"`
IsRepairTenant *bool `json:"isRepairTenant"`
}
APIInstanceDeleteRequest is the data structure to capture request to delete an Instance
func (APIInstanceDeleteRequest) Validate ¶
func (idr APIInstanceDeleteRequest) Validate() error
Validate ensures the values passed in request are acceptable
type APIInstanceStats ¶
type APIInstanceStats struct {
// Total is the total number of the Instances
Total int `json:"total"`
// Pending is the total number of pending Instances
Pending int `json:"pending"`
// Terminating is the total number of provisioning InstanceS
Terminating int `json:"terminating"`
// Ready is the total number of ready Instances
Ready int `json:"ready"`
// Updating is the total number of Instances receiving system updates
Updating int `json:"updating"`
// Registering is the total number of registering Instances
Registering int `json:"registering"`
// Error is the total number of error Instances
Error int `json:"error"`
}
APIInstanceStats is a data structure to capture information about Instancestats at the API layer
type APIInstanceSummary ¶
type APIInstanceSummary struct {
// ID of the Instance
ID string `json:"id"`
// Name of the Instance, only lowercase characters, digits, hyphens and cannot begin/end with hyphen
Name string `json:"name"`
// InfrastructureProviderID is the ID of the Infrastructure Provider
InfrastructureProviderID string `json:"infrastructureProviderId"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// InstanceTypeID is the ID of the InstanceType
InstanceTypeID string `json:"instanceTypeId"`
// ControllerInstanceID is the ID of the Instance in Site Controller
ControllerInstanceID string `json:"controllerInstanceId"`
// Status is the status of the Instance
Status string `json:"status"`
}
APIInstanceSummary is the data structure to capture API summary of an Instance
func NewAPIInstanceSummary ¶
func NewAPIInstanceSummary(dbist *cdbm.Instance) *APIInstanceSummary
NewAPIInstanceSummary accepts a DB layer Instance object returns an API layer object
type APIInstanceType ¶
type APIInstanceType struct {
// ID is the unique UUID v4 identifier for the Instance Type
ID string `json:"id"`
// Name is the name of the Instance Type
Name string `json:"name"`
// Description is the description of the Instance Type
Description *string `json:"description"`
// ControllerMachineType is the Machine type assigned by Site Controller
ControllerMachineType *string `json:"controllerMachineType"`
// InfrastructureProviderID is the ID of the InfrastructureProvider that owns the Instance Type
InfrastructureProviderID string `json:"infrastructureProviderId"`
// InfrastructureProvider is the summary of the InfrastructureProvider
InfrastructureProvider *APIInfrastructureProviderSummary `json:"infrastructureProvider,omitempty"`
// SiteID is the ID of the Site that owns the Instance Type
SiteID string `json:"siteId"`
// Site is the summary of the Site
Site *APISiteSummary `json:"site,omitempty"`
// Labels is the labels of the Instance Type
Labels map[string]string `json:"labels"`
// MachineCapabilities is the list of capabilities that are supported by the Machine's of this Instance Type
MachineCapabilities []APIMachineCapability `json:"machineCapabilities"`
// MachineInstanceTypes is the list of machines that are associated to this Instance Type
MachineInstanceTypes []APIMachineInstanceType `json:"machineInstanceTypes,omitempty"`
// AllocationStats is the stats of allocation that are associated to this Instance Type
AllocationStats *APIAllocationStats `json:"allocationStats,omitempty"`
// Deprecations is the list of deprecation messages denoting fields which are being deprecated
Deprecations []APIDeprecation `json:"deprecations,omitempty"`
// Status is the status of the Instance Type
Status string `json:"status"`
// StatusHistory is the history of statuses for the Instance Type
StatusHistory []APIStatusDetail `json:"statusHistory"`
// Created is the date and time the entity was created
Created time.Time `json:"created"`
// Updated is the date and time the entity was last updated
Updated time.Time `json:"updated"`
}
APIInstanceType is the data structure to capture API representation of an Instance Type
func NewAPIInstanceType ¶
func NewAPIInstanceType(dbit *cdbm.InstanceType, dbsds []cdbm.StatusDetail, mcs []cdbm.MachineCapability, mit []cdbm.MachineInstanceType, aas *APIAllocationStats) *APIInstanceType
NewAPIInstanceType accepts a DB layer Instance Type object returns an API layer object
type APIInstanceTypeCreateRequest ¶
type APIInstanceTypeCreateRequest struct {
// Name is the name of the InstanceType
Name string `json:"name"`
// Description is the description of the Instance Type
Description *string `json:"description"`
// SiteID is the ID of the site
SiteID string `json:"siteId"`
// Labels is the labels of the Instance Type
Labels map[string]string `json:"labels"`
// ControllerMachineType is the Site Controller assigned Machine type
ControllerMachineType *string `json:"controllerMachineType"`
// MachineCapabilities is the list of Machine Capabilities to match
MachineCapabilities []APIMachineCapability `json:"machineCapabilities"`
}
APIInstanceTypeCreateRequest is the data structure to capture user request to create a new InstanceType
func (APIInstanceTypeCreateRequest) Validate ¶
func (itcr APIInstanceTypeCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIInstanceTypeSummary ¶
type APIInstanceTypeSummary struct {
// ID of the Instance Type
ID string `json:"id"`
// Name of the InstanceType, only lowercase characters, digits, hyphens and cannot begin/end with hyphen
Name string `json:"name"`
// InfrastructureProviderID is the ID of the InfrastructureProvider that owns the Instance Type
InfrastructureProviderID string `json:"infrastructureProviderId"`
// SiteID is the ID of the Site that owns the Instance Type
SiteID string `json:"siteId"`
// Status is the status of the Instance Type
Status string `json:"status"`
}
APIInstanceTypeSummary is the data structure to capture summary of an Instance Type
func NewAPIInstanceTypeSummary ¶
func NewAPIInstanceTypeSummary(dbist *cdbm.InstanceType) *APIInstanceTypeSummary
NewAPIInstanceTypeSummary accepts a DB layer Instance object returns an API layer summary object
type APIInstanceTypeUpdateRequest ¶
type APIInstanceTypeUpdateRequest struct {
// Name is the name of the Instance Type
Name *string `json:"name"`
// Description is the description of the Instance Type
Description *string `json:"description"`
// Labels is the labels of the Instance Type
Labels map[string]string `json:"labels"`
// MachineCapabilities is the list of Machine Capabilities to match
MachineCapabilities []APIMachineCapability `json:"machineCapabilities"`
}
APIInstanceTypeUpdateRequest is the data structure to capture user request to update an Instance Type
func (APIInstanceTypeUpdateRequest) Validate ¶
func (itur APIInstanceTypeUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIInstanceUpdateRequest ¶
type APIInstanceUpdateRequest struct {
// Name is the name of the Instance
Name *string `json:"name"`
// Description is the description of the Instance
Description *string `json:"description"`
// Labels is a key value objects
Labels map[string]string `json:"labels"`
// TriggerReboot is the flag to trigger reboot
TriggerReboot *bool `json:"triggerReboot"`
// RebootWithCustomIpxe is the flag to allow reboot with ipxe
RebootWithCustomIpxe *bool `json:"rebootWithCustomIpxe"`
// ApplyUpdatesOnReboot is the flag to allow update first before reboot
ApplyUpdatesOnReboot *bool `json:"applyUpdatesOnReboot"`
// OperatingSystemID is the ID of the Operating System
OperatingSystemID *string `json:"operatingSystemId"`
// IpxeScript is the iPXE script for the Operating System
IpxeScript *string `json:"ipxeScript"`
// UserData is the user-date to be used when booting; e.g., a cloud-init config
UserData *string `json:"userData"`
// PhoneHomeEnabled is an attribute which is specified by user if Instance needs to be enabled for phone home or not
PhoneHomeEnabled *bool `json:"phoneHomeEnabled"`
// AlwaysBootWithCustomIpxe is an attribute which is specified by user if instance boot with ipxe or not
AlwaysBootWithCustomIpxe *bool `json:"alwaysBootWithCustomIpxe"`
// SecondaryVpcIDs lists additional VPC IDs for prefix-backed, non-primary
// network interfaces on the Instance. This field will be rejected unless
// Interfaces is provided and non-empty and every entry in Interfaces uses
// vpcPrefixId. The update handler then verifies that the supplied UUIDs
// exactly match the VPCs resolved from those prefix-backed interfaces.
SecondaryVpcIDs []string `json:"secondaryVpcIds"`
// Interfaces is the list of Interfaces to update for the Instance
Interfaces []APIInterfaceCreateOrUpdateRequest `json:"interfaces"`
// InfiniBandInterfaces is the list of InfiniBandInterface to update for the Instance
InfiniBandInterfaces []APIInfiniBandInterfaceCreateOrUpdateRequest `json:"infinibandInterfaces"`
// DpuExtensionServiceDeployments is the list of DpuExtensionServiceDeployments to update for the Instance
DpuExtensionServiceDeployments []APIDpuExtensionServiceDeploymentRequest `json:"dpuExtensionServiceDeployments"`
// NVLinkInterfaces is the list of NVLinkInterface to update for the Instance
NVLinkInterfaces []APINVLinkInterfaceCreateOrUpdateRequest `json:"nvLinkInterfaces"`
// SSHKeyGroupIDs is a list of SSHKeyID objects
SSHKeyGroupIDs []string `json:"sshKeyGroupIds"`
// NetworkSecurityGroupID is the ID of Network Security Group to attach to the Instance
NetworkSecurityGroupID *string `json:"networkSecurityGroupId"`
}
APIInstanceUpdateRequest is the data structure to capture request to update an Instance
func (*APIInstanceUpdateRequest) IsInterfaceUpdateRequest ¶
func (iur *APIInstanceUpdateRequest) IsInterfaceUpdateRequest() bool
IsInterfaceUpdateRequest checks if the request is an instance interface update request
func (*APIInstanceUpdateRequest) IsRebootRequest ¶
func (iur *APIInstanceUpdateRequest) IsRebootRequest() bool
IsRebootRequest checks if the request is an instance reboot request
func (*APIInstanceUpdateRequest) IsUpdateRequest ¶
func (iur *APIInstanceUpdateRequest) IsUpdateRequest() bool
IsUpdateRequest checks if the request is an instance config update request
func (APIInstanceUpdateRequest) Validate ¶
func (iur APIInstanceUpdateRequest) Validate() error
Validate ensures the values passed in request are acceptable
func (*APIInstanceUpdateRequest) ValidateAndSetOperatingSystemData ¶
func (iur *APIInstanceUpdateRequest) ValidateAndSetOperatingSystemData(cfg *config.Config, instance *cdbm.Instance, os *cdbm.OperatingSystem) error
Validate the OS against any additional option combinations specified.
func (*APIInstanceUpdateRequest) ValidateDpuExtensionServiceDeployments ¶
func (iur *APIInstanceUpdateRequest) ValidateDpuExtensionServiceDeployments(desdrs []APIDpuExtensionServiceDeploymentRequest) error
ValidateDpuExtensionServiceDeployments validates the DpuExtensionServiceDeployments for the Instance update request
func (*APIInstanceUpdateRequest) ValidateInfiniBandInterfaces ¶
func (iur *APIInstanceUpdateRequest) ValidateInfiniBandInterfaces(itIbCaps []cdbm.MachineCapability) error
ValidateInfiniBandInterfaces validates the InfiniBand Interfaces for the Instance
func (*APIInstanceUpdateRequest) ValidateMultiEthernetDeviceInterfaces ¶
func (iur *APIInstanceUpdateRequest) ValidateMultiEthernetDeviceInterfaces(itNetworkCaps []cdbm.MachineCapability, dbifcs []cdbm.Interface) error
ValidateMultiEthernetDeviceInterfaces validates the Multi-Ethernet Device Interfaces for the Instance
func (*APIInstanceUpdateRequest) ValidateNVLinkInterfaces ¶
func (iur *APIInstanceUpdateRequest) ValidateNVLinkInterfaces(itNvlCaps []cdbm.MachineCapability) error
ValidateNVLinkInterfaces validates the NVLink interfaces for the Instance
type APIInterface ¶
type APIInterface struct {
// ID is the unique UUID v4 identifier for the Interface
ID string `json:"id"`
// InstanceID is the ID of the associated Instance
InstanceID string `json:"instanceId"`
// Instance is the summary of the Instance
Instance *APIInstanceSummary `json:"instance,omitempty"`
// SubnetID is the ID of the associated Subnet
SubnetID *string `json:"subnetId"`
// Subnet is the summary of the Subnet
Subnet *APISubnetSummary `json:"subnet,omitempty"`
// VpcPrefixID is the ID of the associated VpcPrefix
VpcPrefixID *string `json:"vpcPrefixId"`
// VpcPrefix is the summary of the VpcPrefix
VpcPrefix *APIVpcPrefixSummary `json:"vpcprefix,omitempty"`
// Device is the device name of the Interface
Device *string `json:"device"`
// DeviceInstance is the ID of the DeviceInstance
DeviceInstance *int `json:"deviceInstance"`
// VirtualFunctionID is the ID of the Virtual Function
VirtualFunctionID *int `json:"virtualFunctionId"`
// IsPhysical indicates whether the Subnet is bound on a physical Interface
IsPhysical bool `json:"isPhysical"`
// MacAddress is the MAC address of the Interface
MacAddress *string `json:"macAddress"`
// IPAddresses is the list of IP addresses assigned to the Interface
IPAddresses []string `json:"ipAddresses"`
// RequestedIpAddress is the explicitly requested IP address for the Interface
RequestedIpAddress *string `json:"requestedIpAddress"`
// Status is the status of the Interface
Status string `json:"status"`
// Created is the date and time the entity was created
Created time.Time `json:"created"`
// Updated is the date and time the entity was last updated
Updated time.Time `json:"updated"`
}
APIInterface is the data structure to capture Interface
func NewAPIInterface ¶
func NewAPIInterface(dbis *cdbm.Interface) *APIInterface
NewAPIInterface creates a new APIInterface
type APIInterfaceCreateOrUpdateRequest ¶
type APIInterfaceCreateOrUpdateRequest struct {
// SubnetID is the ID of the Subnet
SubnetID *string `json:"subnetId"`
// VpcPrefixID is the ID of the VpcPrefix
VpcPrefixID *string `json:"vpcPrefixId"`
// IPAddress is the explicitly requested IP address for the Interface
IPAddress *string `json:"ipAddress"`
// Device is the device name of the Interface
Device *string `json:"device"`
// DeviceInstance is the ID of the DeviceInstance
DeviceInstance *int `json:"deviceInstance"`
// VirtualFunctionID is the ID of the Virtual Function
VirtualFunctionID *int `json:"virtualFunctionId"`
// IsPhysical indicates whether the Subnet is bound on a physical Interface
IsPhysical bool `json:"isPhysical"`
}
APIInterfaceCreateRequest is the data structure to capture user request to create a new Interface
func (APIInterfaceCreateOrUpdateRequest) IsMultiEthernetInterface ¶
func (ifcr APIInterfaceCreateOrUpdateRequest) IsMultiEthernetInterface() bool
func (APIInterfaceCreateOrUpdateRequest) Validate ¶
func (ifcr APIInterfaceCreateOrUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIMachine ¶
type APIMachine struct {
// ID is the unique UUID v4 identifier for the Machine
ID string `json:"id"`
// InfrastructureProviderID is the ID of the InfrastructureProvider
InfrastructureProviderID string `json:"infrastructureProviderId"`
// InfrastructureProvider is the summary of the InfrastructureProvider
InfrastructureProvider *APIInfrastructureProviderSummary `json:"infrastructureProvider,omitempty"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Site is the summary of the Site
Site *APISiteSummary `json:"site,omitempty"`
// InstanceTypeID is the ID of the associated Instance Type
InstanceTypeID *string `json:"instanceTypeId"`
// InstanceType is the summary of the associated Instance Type
InstanceType *APIInstanceTypeSummary `json:"instanceType,omitempty"`
// InstanceID is the ID of the associated Instance (if any)
InstanceID *string `json:"instanceId"`
// Instance is the summary of the associated Instance (if any)
Instance *APIInstanceSummary `json:"instance,omitempty"`
// TenantID is the ID of the Tenant that owns the Instance associated (if any)
TenantID *string `json:"tenantId"`
// Tenant is the summary of the Tenant that owns the Instance associated (if any)
Tenant *APITenantSummary `json:"tenant,omitempty"`
// ControllerMachineID is the ID of the controllerMachine
ControllerMachineID string `json:"controllerMachineId"`
// ControllerMachineType is the type of the controller machine
ControllerMachineType *string `json:"controllerMachineType"`
// HwSkuDeviceType is the sku derived device type of the machine, e.g. cpu, gpu, cache, storage, etc.
HwSkuDeviceType *string `json:"hwSkuDeviceType"`
// Vendor is the vendor of the Machine
Vendor *string `json:"vendor"`
// ProductName is the product name of the Machine
ProductName *string `json:"productName"`
// SerialNumber is the serial number of the Machine
SerialNumber *string `json:"serialNumber"`
// Hostname is the hostname of the Machine
Hostname *string `json:"hostname"`
// MachineCapabilities is the list of capabilities of the machine
MachineCapabilities []APIMachineCapability `json:"machineCapabilities"`
// MachineInterfaces is the list of admin interfaces of the machine
MachineInterfaces []APIMachineInterface `json:"machineInterfaces"`
// MaintenanceMessage is the message to display during maintenance mode
MaintenanceMessage *string `json:"maintenanceMessage"`
// Metadata contains additional metadata about the machine
Metadata *APIMachineMetadata `json:"metadata,omitempty"`
// Health contains health information about the machine
Health *APIMachineHealth `json:"health"`
// Labels is VPC labels specified by user
Labels map[string]string `json:"labels"`
// Status represents the status of the machine
Status string `json:"status"`
// IsUsableByTenant indicates whether the machine is usable by or currently in use by a tenant.
// See: https://jirasw.nvidia.com/browse/FORGE-7530
IsUsableByTenant bool `json:"isUsableByTenant"`
// StatusHistory is the history of statuses for the Machine
StatusHistory []APIStatusDetail `json:"statusHistory"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// UpdatedAt indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
// Deprecations is the list of deprecation messages denoting fields which are being deprecated
Deprecations []APIDeprecation `json:"deprecations,omitempty"`
}
APIMachine is the data structure to capture API representation of a Machine
func NewAPIMachine ¶
func NewAPIMachine(dbm *cdbm.Machine, dbmcs []cdbm.MachineCapability, dbmis []cdbm.MachineInterface, dbsds []cdbm.StatusDetail, dbins *cdbm.Instance, includeMetadata bool, isProviderOrPrivilegedTenant bool) *APIMachine
NewAPIMachine accepts a DB layer Machine object and returns an API object
type APIMachineCapability ¶
type APIMachineCapability struct {
// Type is the type of the machine capability
Type string `json:"type"`
// Name describes the capability
Name string `json:"name"`
// Frequency describes the frequency of the capability
Frequency *string `json:"frequency,omitempty"`
// Cores describes the number of cores for the capability
Cores *int `json:"cores,omitempty"`
// Threads describes the number of threads for the capability
Threads *int `json:"threads,omitempty"`
// Capacity describes the capacity of the capability
Capacity *string `json:"capacity,omitempty"`
// Vendor describes the vendor of the capability
Vendor *string `json:"vendor,omitempty"`
// InactiveDevices describes a set of inactive devices
InactiveDevices []int `json:"inactiveDevices,omitempty"`
// HardwareRevision describes the hardware revision of the capability
HardwareRevision *string `json:"hardwareRevision,omitempty"`
// Count describes the number of items present for this capability
Count *int `json:"count"`
// DeviceType describes the type of the device
DeviceType *string `json:"deviceType,omitempty"`
}
APIMachineCapability is the datastructure to capture API representation of a MachineCapability
func NewAPIMachineCapability ¶
func NewAPIMachineCapability(dbmc *cdbm.MachineCapability) *APIMachineCapability
NewAPIMachineCapability accepts a DB layer MachineCapability object and returns an API object
func (APIMachineCapability) Validate ¶
func (mc APIMachineCapability) Validate() error
Validate ensure the values passed in request are acceptable
type APIMachineGPUInfo ¶
type APIMachineGPUInfo struct {
// Name of the Machine's GPU
Name *string `json:"name"`
// Serial is the serial number of the Machine's GPU
Serial *string `json:"serial"`
// DriverVersion is the version of the Machine's GPU driver
DriverVersion *string `json:"driverVersion"`
// VbiosVersion is the bios version of the Machine's GPU
VbiosVersion *string `json:"vbiosVersion"`
// InforomVersion is the info rom version of the Machine's GPU
InforomVersion *string `json:"inforomVersion"`
// TotalMemory is the total memory of the Machine's GPU
TotalMemory *string `json:"totalMemory"`
// Frequency is the frequency of the Machine's GPU
Frequency *string `json:"frequency"`
// PciBusId is the PCI BusId of the Machine's GPU
PciBusId *string `json:"pciBusId"`
}
APIMachineGPUInfo is the data structure to capture API representation of a Machine's GPU Info
type APIMachineGPUStats ¶
type APIMachineGPUStats struct {
// Name is the GPU name from the MachineCapability record
Name string `json:"name"`
// GPUs is the total number of GPUs (summation of all Machine GPU capability counts)
GPUs int `json:"gpus"`
// Machines is the number of machines that have this GPU capability
Machines int `json:"machines"`
}
APIMachineGPUStats represents GPU summary stats for a single GPU type across machines at a site
func NewAPIMachineGPUStatsList ¶
func NewAPIMachineGPUStatsList(capabilities []cdbm.MachineCapability) []APIMachineGPUStats
NewAPIMachineGPUStatsList aggregates GPU capabilities into per-GPU-name summary stats
type APIMachineHealth ¶
type APIMachineHealth struct {
Source string `json:"source"`
ObservedAt *string `json:"observedAt"`
ObservedAtDeprecated *string `json:"observed_at"`
Successes []APIMachineHealthProbeSuccess `json:"successes"`
Alerts []APIMachineHealthProbeAlert `json:"alerts"`
}
APIMachineHealth is the data structure to capture API representation of a Machine's health Info
type APIMachineHealthIssueReport ¶
type APIMachineHealthIssueReport struct {
// Category is the type of the issue
Category string `json:"category"`
// Summary is the summary of the issue
Summary *string `json:"summary"`
// Details is the message of the issue
Details *string `json:"details"`
}
APIMachineHealthIssueReport is the data structure to capture a machine health issue report
type APIMachineHealthProbeAlert ¶
type APIMachineHealthProbeAlert struct {
ID string `json:"id"`
Target *string `json:"target"`
InAlertSince *string `json:"inAlertSince"`
InAlertSinceDeprecated *string `json:"in_alert_since"`
Message string `json:"message"`
TenantMessage *string `json:"tenantMessage"`
TenantMessageDeprecated *string `json:"tenant_message"`
Classifications []string `json:"classifications"`
}
type APIMachineInfiniBandInterface ¶
type APIMachineInfiniBandInterface struct {
// Guid of the Machine's InfiniBandInterface
Guid *string `json:"guid"`
// Vendor is the serial number of the Machine's InfiniBandInterface
Vendor *string `json:"vendor"`
// Device is the device number of the Machine's InfiniBandInterface
Device *string `json:"device"`
// Path is the bios path of the Machine's InfiniBandInterface
Path *string `json:"path"`
// NumaNode is the info of numa node Machine's InfiniBandInterface
NumaNode *int32 `json:"numaNode"`
// Description is the description the Machine's InfiniBandInterface
Description *string `json:"description"`
// Slot is the slot number of the Machine's InfiniBandInterface
Slot *string `json:"slot"`
}
APIMachineInfiniBandInterface is the data structure to capture API representation of a Machine's InfiniBand Interface Info
type APIMachineInstanceType ¶
type APIMachineInstanceType struct {
// ID is the unique UUID v4 identifier for the Machine Instance Type
ID string `json:"id"`
// MachineID is the ID of the associated Machine
MachineID string `json:"machineId"`
// InstanceTypeID is the ID of the associated Instance Type
InstanceTypeID string `json:"instanceTypeId"`
// Deprecations is the list of deprecation messages denoting fields which are being deprecated
Deprecations []APIDeprecation `json:"deprecations,omitempty"`
// Created is the date and time the Machine Instance Type was created
Created time.Time `json:"created"`
// Updated is the date and time the Machine Instance Type was last updated
Updated time.Time `json:"updated"`
}
APIMachineInstanceType is the data structure to capture Machine Instance Type
func NewAPIMachineInstanceType ¶
func NewAPIMachineInstanceType(dbmit *cdbm.MachineInstanceType) *APIMachineInstanceType
NewAPIMachineInstanceType creates a new APIMachineInstanceType
type APIMachineInstanceTypeCreateRequest ¶
type APIMachineInstanceTypeCreateRequest struct {
// MachineID is the ID of the Machine
MachineIDs []string `json:"machineIds"`
}
APIMachineInstanceTypeCreateRequest is the data structure to capture user request to create a new MachineInstanceType
func (APIMachineInstanceTypeCreateRequest) Validate ¶
func (mitcr APIMachineInstanceTypeCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIMachineInstanceTypeStats ¶
type APIMachineInstanceTypeStats struct {
// ID is the unique identifier for the InstanceType
ID string `json:"id"`
// Name is the name of the InstanceType
Name string `json:"name"`
// AssignedMachineStats captures the status of all Machines assigned to this Instance Type
AssignedMachineStats APIMachineStatusBreakdown `json:"assignedMachineStats"`
// Allocated is the number of Machines of this Instance Type allocated to Tenants
Allocated int `json:"allocated"`
// MaxAllocatable is the number of Ready Machines of this Instance Type available for additional allocation to Tenants
MaxAllocatable int `json:"maxAllocatable"`
// UsedMachineStats captures the usage status of machines assigned to this instance type
// that are currently associated with Tenant Instances
UsedMachineStats APIMachineStatusBreakdown `json:"usedMachineStats"`
// Tenants is the per-tenant breakdown for this instance type
Tenants []APIMachineInstanceTypeTenant `json:"tenants"`
}
APIMachineInstanceTypeStats represents detailed stats for machines of a specific instance type
func NewAPIMachineInstanceTypeStats ¶
func NewAPIMachineInstanceTypeStats( it cdbm.InstanceType, itMachines []cdbm.Machine, itConstraints []cdbm.AllocationConstraint, itUsed map[uuid.UUID]*APIMachineStatusBreakdown, tenantITUsed map[uuid.UUID]map[uuid.UUID]*APIMachineStatusBreakdown, ) APIMachineInstanceTypeStats
NewAPIMachineInstanceTypeStats builds a single APIMachineInstanceTypeStats for one instance type
type APIMachineInstanceTypeSummary ¶
type APIMachineInstanceTypeSummary struct {
// Assigned represents machines that have been assigned to an instance type
Assigned APIMachineStatusBreakdown `json:"assigned"`
// Unassigned represents machines that have not been assigned to any instance type
Unassigned APIMachineStatusBreakdown `json:"unassigned"`
}
APIMachineInstanceTypeSummary represents a summary of machines grouped by assigned vs unassigned
type APIMachineInstanceTypeTenant ¶
type APIMachineInstanceTypeTenant struct {
// ID is the unique identifier for the Tenant
ID string `json:"id"`
// Name is the name of the Tenant
Name string `json:"name"`
// Allocated is the number of Machines allocated to this Tenant for this Instance Type
Allocated int `json:"allocated"`
// UsedMachineStats captures the usage status of machines for this tenant and instance type
UsedMachineStats APIMachineStatusBreakdown `json:"usedMachineStats"`
// Allocations is the list of individual allocations for this tenant and instance type
Allocations []APIMachineInstanceTypeTenantAllocation `json:"allocations"`
}
APIMachineInstanceTypeTenant represents per-tenant allocation stats within an instance type
type APIMachineInstanceTypeTenantAllocation ¶
type APIMachineInstanceTypeTenantAllocation struct {
// ID is the unique identifier for the Allocation
ID string `json:"id"`
// Name is the name of the Allocation
Name string `json:"name"`
// Allocated is the total number of machines in this allocation for the instance type
Allocated int `json:"allocated"`
}
APIMachineInstanceTypeTenantAllocation represents a single allocation within a tenant's instance type stats
type APIMachineInterface ¶
type APIMachineInterface struct {
// ID is the unique UUID v4 identifier for the Machine Interface
ID string `json:"id"`
// MachineID is the ID of the Machine
MachineID string `json:"machineId"`
// ControllerInterfaceID is the ID of the interface in Site Controller
ControllerInterfaceID *string `json:"controllerInterfaceId"`
// ControllerSegmentID is the ID of the network segment in Site Controller
ControllerSegmentID *string `json:"controllerSegmentId"`
// AttachedDpuID is the ID of the DPU that is attached to this interface in Site Controller
AttachedDPUMachineID *string `json:"attachedDpuMachineID"`
// SubnetID is the ID of the Subnet
SubnetID *string `json:"subnetId"`
// Hostname is the hostname of the Machine Interface
Hostname *string `json:"hostname"`
// IsPrimary is a boolean which indicates if the Machine Interface is primary
IsPrimary bool `json:"isPrimary"`
// MacAddress is the mac address of the Machine Interface
MacAddress *string `json:"macAddress"`
// IPAddresses is the list of ip addresses of the Machine Interface
IPAddresses []string `json:"ipAddresses"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// UpdatedAt indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
}
APIMachineInterface is the data structure to capture API representation of a MachineInterface
func NewAPIMachineInterface ¶
func NewAPIMachineInterface(mi *cdbm.MachineInterface, isProviderOrPrivilegedTenant bool) *APIMachineInterface
NewAPIMachineInterface accepts a DB layer MachineInterface object and returns an API object
type APIMachineMetadata ¶
type APIMachineMetadata struct {
// DMIData is the DMI data of the machine
DMIData *APIDMIData `json:"dmiData,omitempty"`
// BMCInfo is the BMC Info of the machine
BMCInfo *APIBMCInfo `json:"bmcInfo,omitempty"`
// GPUInfo is the list of GPUs for the machine
GPUs []APIMachineGPUInfo `json:"gpus,omitempty"`
// NetworkInterfaces is the list of Ethernet interfaces of the machine
NetworkInterfaces []APIMachineNetworkInterface `json:"networkInterfaces,omitempty"`
// InfiniBandInterfaces is the list of InfiniBand interfaces of the machine
InfiniBandInterfaces []APIMachineInfiniBandInterface `json:"infinibandInterfaces,omitempty"`
}
APIMachineMetadata is the data structure to capture API representation of a Machine's Metadata Info
type APIMachineNetworkInterface ¶
type APIMachineNetworkInterface struct {
// Name of the Machine's NetworkInterface
MacAddress *string `json:"macAddress"`
// Vendor is the serial number of the Machine's NetworkInterface
Vendor *string `json:"vendor"`
// Device is the device number of the Machine's NetworkInterface
Device *string `json:"device"`
// Path is the bios path of the Machine's NetworkInterface
Path *string `json:"path"`
// NumaNode is the info of numa node Machine's NetworkInterface
NumaNode *int32 `json:"numaNode"`
// Description is the description the Machine's NetworkInterface
Description *string `json:"description"`
// Slot is the slot number of the Machine's NetworkInterface
Slot *string `json:"slot"`
}
APIMachineNetworkInterface is the data structure to capture API representation of a Machine's Network Interface Info
type APIMachineStats ¶
type APIMachineStats struct {
// Total is the total number of the machine object in Forge Cloud
Total int `json:"total"`
// Initializing is the total number of initializing machine object in Forge Cloud
Initializing int `json:"initializing"`
// Reset is the total number of reset machine object in Forge Cloud
Reset int `json:"reset"`
// Ready is the total number of ready machine object in Forge Cloud
Ready int `json:"ready"`
// InUse is the total number of Machines in use by Tenant Instances
InUse int `json:"inUse"`
// Error is the total number of error machine object in Forge Cloud
Error int `json:"error"`
// Decommissioned is the total number of error decommissioned object in Forge Cloud
Decommissioned int `json:"decommissioned"`
// Maintenance is the total number of machines in Maintenance
Maintenance int `json:"maintenance"`
// Unknown is the total number of unknown machine object in Forge Cloud
Unknown int `json:"unknown"`
}
APIMachineStats is a data structure to capture information about machine stats at the API layer
type APIMachineStatusBreakdown ¶
type APIMachineStatusBreakdown struct {
// Total is the total number of machines in this group
Total int `json:"total"`
// Initializing is the number of machines being initialized
Initializing int `json:"initializing"`
// Ready is the number of machines in ready state
Ready int `json:"ready"`
// InUse is the number of machines currently in use
InUse int `json:"inUse"`
// Error is the number of machines in error state
Error int `json:"error"`
// Maintenance is the number of machines in maintenance state
Maintenance int `json:"maintenance"`
// Unknown is the number of machines in unknown state
Unknown int `json:"unknown"`
}
APIMachineStatusBreakdown represents machine counts broken down by status
func (*APIMachineStatusBreakdown) AddMachineStatusCounts ¶
func (amsb *APIMachineStatusBreakdown) AddMachineStatusCounts(m cdbm.Machine)
AddMachineStatusCounts increments counters based on machine status.
type APIMachineSummary ¶
type APIMachineSummary struct {
// ID of the Machine
ID string `json:"id"`
// ControllerMachineID is the ID of the controllerMachine
ControllerMachineID string `json:"controllerMachineId"`
// ControllerMachineType is the type of the controller machine
ControllerMachineType *string `json:"controllerMachineType"`
// HwSkuDeviceType is the sku derived device type of the machine, e.g. cpu, gpu, cache, storage, etc.
HwSkuDeviceType *string `json:"hwSkuDeviceType"`
// Vendor is the vendor of the Machine
Vendor *string `json:"vendor"`
// ProductName is the product name of the Machine
ProductName *string `json:"productName"`
// MaintenanceMessage is the message to display during maintenance mode
MaintenanceMessage *string `json:"maintenanceMessage"`
// Status represents the status of the machine
Status string `json:"status"`
}
APIMachineSummary is the data structure to provide a sumamry of a Machine
func NewAPIMachineSummary ¶
func NewAPIMachineSummary(dbm *cdbm.Machine) *APIMachineSummary
NewAPIMachineSummary accepts a DB layer Machine object and returns an API object
type APIMachineUpdateRequest ¶
type APIMachineUpdateRequest struct {
// InstanceTypeID is the ID of the InstanceType to set for the Machine
InstanceTypeID *string `json:"instanceTypeId"`
// ClearInstanceType indicates that the InstanceType should be cleared
ClearInstanceType *bool `json:"clearInstanceType"`
// SetMaintenanceMode enables or disables maintenance mode
SetMaintenanceMode *bool `json:"setMaintenanceMode"`
// MaintenanceMessage is the message to display during maintenance mode
MaintenanceMessage *string `json:"maintenanceMessage"`
// Labels allows setting a key value pair of arbitrary string metadata for the Machine
Labels map[string]string `json:"labels"`
}
APIMachineUpdateRequest is the data structure to capture request to update a Machine
func (APIMachineUpdateRequest) Validate ¶
func (mur APIMachineUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIMachineValidationExternalConfig ¶
type APIMachineValidationExternalConfig struct {
Name string `json:"name"`
Description string `json:"description"`
Config []byte `json:"config"`
Version string `json:"version"`
Timestamp time.Time `json:"timestamp"`
}
func NewAPIMachineValidationExternalConfig ¶
func NewAPIMachineValidationExternalConfig(proto *cwssaws.MachineValidationExternalConfig) *APIMachineValidationExternalConfig
type APIMachineValidationExternalConfigCreateRequest ¶
type APIMachineValidationExternalConfigCreateRequest struct {
Name string `json:"name"`
Description *string `json:"description"`
Config []byte `json:"config"`
}
func (APIMachineValidationExternalConfigCreateRequest) Validate ¶
func (req APIMachineValidationExternalConfigCreateRequest) Validate() error
Validate ensures that the values passed in request are acceptable
type APIMachineValidationResult ¶
type APIMachineValidationResult struct {
Name string `json:"name"`
Description string `json:"description"`
Command string `json:"command"`
Args string `json:"args"`
StdOut string `json:"stdOut"`
StdErr string `json:"stdErr"`
Context string `json:"context"`
ExitCode int `json:"exitCode"`
StartTime time.Time `json:"startTime"`
EndTime time.Time `json:"endTime"`
ValidationID string `json:"validationID"`
TestID string `json:"testID"`
}
func NewAPIMachineValidationResult ¶
func NewAPIMachineValidationResult(proto *cwssaws.MachineValidationResult) *APIMachineValidationResult
type APIMachineValidationRun ¶
type APIMachineValidationRun struct {
ValidationID string `json:"validationID"`
MachineID string `json:"machineID"`
StartTime time.Time `json:"startTime"`
EndTime *time.Time `json:"endTime"`
Name string `json:"name"`
Context string `json:"context"`
Status APIMachineValidationStatus `json:"status"`
DurationToCompleteSecs int `json:"durationToCompleteSecs"`
}
func NewAPIMachineValidationRun ¶
func NewAPIMachineValidationRun(proto *cwssaws.MachineValidationRun) *APIMachineValidationRun
type APIMachineValidationState ¶
type APIMachineValidationState string
const ( MachineValidationStarted APIMachineValidationState = "Started" MachineValidationInProgress APIMachineValidationState = "InProgress" MachineValidationSuccess APIMachineValidationState = "Success" MachineValidationFailed APIMachineValidationState = "Failed" MachineValidationSkipped APIMachineValidationState = "Skipped" )
type APIMachineValidationStatus ¶
type APIMachineValidationStatus struct {
State APIMachineValidationState `json:"state"`
Total int `json:"total"`
Completed int `json:"completed"`
}
type APIMachineValidationTest ¶
type APIMachineValidationTest struct {
// TestID id of the test
TestID string `json:"testID"`
// Name test name
Name string `json:"name"`
// Description test description
Description string `json:"description"`
// Contexts list of test contexts
Contexts []string `json:"contexts"`
// ImgName test container image name
ContainerImgName string `json:"containerImgName"`
// IsExecuteInHost indicates to run test command using chroot in case of container
IsExecuteInHost bool `json:"isExecuteInHost"`
// ContainerArgs test container arguments
ContainerArgs string `json:"containerArgs"`
// Command test command
Command string `json:"command"`
// Args test arguments
Args string `json:"args"`
// ExtraErrFile test command error output file
ExtraErrFile string `json:"extraErrFile"`
// ExternalConfigFile test external configuration file
ExternalConfigFile string `json:"externalConfigFile"`
// PreCondition test pre-condition
PreCondition string `json:"preCondition"`
// Timeout test timeout in seconds (default 7200)
Timeout int64 `json:"timeout"`
// ExtraOutputFile test command standard output file
ExtraOutputFile string `json:"extraOutputFile"`
// Version test version
Version string `json:"version"`
// SupportedPlatforms list of supported platform for a test
SupportedPlatforms []string `json:"supportedPlatforms"`
// ModifiedBy user that last modified test
ModifiedBy string `json:"modifiedBy"`
// IsVerified indicates if test verified or not
IsVerified bool `json:"isVerified"`
// ReadOnly indicates if the test is read-ony or not
IsReadOnly bool `json:"isReadOnly"`
// CustomTags list of custom tags for test
CustomTags []string `json:"customTags"`
// Components list of system components for test
Components []string `json:"components"`
// LastModifiedAt last time test modified
LastModifiedAt string `json:"lastModifiedAt"`
// IsEnabled indicates if test is enabled or not
IsEnabled bool `json:"isEnabled"`
}
APIMachineValidationTest data structure to capture MachineValidation test
func NewAPIMachineValidationTest ¶
func NewAPIMachineValidationTest(proto *cwssaws.MachineValidationTest) *APIMachineValidationTest
type APIMachineValidationTestCreateRequest ¶
type APIMachineValidationTestCreateRequest struct {
// Name test name
Name string `json:"name"`
// Command test command
Command string `json:"command"`
// Args test command arguments
Args string `json:"args"`
// Description test description
Description *string `json:"description"`
// Contexts list of contexts for a test
Contexts []string `json:"contexts"`
// ContainerImgName test container image name
ContainerImgName *string `json:"containerImgName"`
// ExecuteInHost run test command using chroot in case of container
IsExecuteInHost *bool `json:"isExecuteInHost"`
// ContainerArgs test container arguments
ContainerArgs *string `json:"containerArgs"`
// ExtraErrFile test command error output file
ExtraErrFile *string `json:"extraErrFile"`
// ExternalConfigFile test external configuration file
ExternalConfigFile *string `json:"externalConfigFile"`
// PreCondition test pre-condition
PreCondition *string `json:"preCondition"`
// Timeout test command timeout in seconds (default 7200)
Timeout *int64 `json:"timeout"`
// ExtraOutputFile test command standard output file
ExtraOutputFile *string `json:"extraOutputFile"`
// SupportedPlatforms list of supported platform for a test
SupportedPlatforms []string `json:"supportedPlatforms"`
// IsReadOnly indicates if test is read-only or not
IsReadOnly *bool `json:"isReadOnly"`
// CustomTags list of custom tags for a test
CustomTags []string `json:"customTags"`
// Components list of system components for a test
Components []string `json:"components"`
// IsEnabled indicates if test is enabled or not
IsEnabled *bool `json:"isEnabled"`
}
func (APIMachineValidationTestCreateRequest) ToProto ¶
func (req APIMachineValidationTestCreateRequest) ToProto() *cwssaws.MachineValidationTestAddRequest
func (APIMachineValidationTestCreateRequest) Validate ¶
func (req APIMachineValidationTestCreateRequest) Validate() error
Validate ensures that the values passed in request are acceptable
type APIMachineValidationTestUpdateRequest ¶
type APIMachineValidationTestUpdateRequest struct {
// Name test name
Name *string `json:"name"`
// Command test command
Command *string `json:"command"`
// Args test command arguments
Args *string `json:"args"`
// Description test description
Description *string `json:"description"`
// Contexts list of contexts for a test
Contexts []string `json:"contexts"`
// ContainerImgName test container image name
ContainerImgName *string `json:"containerImgName"`
// ExecuteInHost run test command using chroot in case of container
IsExecuteInHost *bool `json:"isExecuteInHost"`
// ContainerArgs test container arguments
ContainerArgs *string `json:"containerArgs"`
// ExtraErrFile test command error output file
ExtraErrFile *string `json:"extraErrFile"`
// ExternalConfigFile test external configuration file
ExternalConfigFile *string `json:"externalConfigFile"`
// PreCondition test pre-condition
PreCondition *string `json:"preCondition"`
// Timeout test command timeout in seconds (default 7200)
Timeout *int64 `json:"timeout"`
// ExtraOutputFile test command standard output file
ExtraOutputFile *string `json:"extraOutputFile"`
// SupportedPlatforms list of supported platform for a test
SupportedPlatforms []string `json:"supportedPlatforms"`
// IsVerified indicates if test verified or not
IsVerified *bool `json:"isVerified"`
// CustomTags list of custom tags for a test
CustomTags []string `json:"customTags"`
// Components list of system components for a test
Components []string `json:"components"`
// IsEnabled indicates if test is enabled or not
IsEnabled *bool `json:"isEnabled"`
}
func (APIMachineValidationTestUpdateRequest) ToProto ¶
func (req APIMachineValidationTestUpdateRequest) ToProto(testID string, testVersion string) *cwssaws.MachineValidationTestUpdateRequest
type APIMachineValidationTestsFilter ¶
type APIMachineValidationTestsFilter struct {
// SupportedPlatforms list of supported platform for a test
SupportedPlatforms []string `query:"supportedPlatforms"`
// Contexts list of contexts for a test
Contexts []string `query:"contexts"`
// IsReadOnly indicates if test is read-only or not
IsReadOnly *bool `query:"isReadOnly"`
// CustomTags list of custom tags for a test
CustomTags []string `query:"customTags"`
// IsEnabled indicates if test is enabled or not
IsEnabled *bool `query:"isEnabled"`
// IsVerified indicates if test verified or not
IsVerified *bool `query:"isVerified"`
}
func (APIMachineValidationTestsFilter) ToProto ¶
func (filter APIMachineValidationTestsFilter) ToProto() *cwssaws.MachineValidationTestsGetRequest
type APIMetadata ¶
type APIMetadata struct {
// Version contains the API version
Version string `json:"version"`
// BuildTime contains the time the binary was built
BuildTime string `json:"buildTime"`
}
APIMetadata is a data structure to capture Forge API system information
func NewAPIMetadata ¶
func NewAPIMetadata() *APIMetadata
NewAPIMetadata creates and returns a new APISystemInfo object
type APINVLinkInterface ¶
type APINVLinkInterface struct {
// ID is the unique UUID v4 identifier for the NVLinkInterface
ID string `json:"id"`
// InstanceID is the ID of the associated Instance
InstanceID string `json:"instanceId"`
// Instance is the summary of the Instance
Instance *APIInstanceSummary `json:"instance,omitempty"`
// NVLinkLogicalPartitionID is the ID of the associated NVLinkLogicalPartition
NVLinkLogicalPartitionID string `json:"nvLinklogicalPartitionId"`
// NVLinkLogicalPartition is the summary of the NVLinkLogicalPartition
NVLinkLogicalPartition *APINVLinkLogicalPartitionSummary `json:"nvLinkLogicalPartition,omitempty"`
// NVLinkDomainID is the id of the physical NVLink domain that the interface is attached to
NVLinkDomainID *string `json:"nvLinkDomainId"`
// DeviceInstance is the index of the GPU
DeviceInstance int `json:"deviceInstance"`
// GpuGUID is the GUID of the GPU
GpuGUID *string `json:"gpuGuid"`
// Status is the status of the NVLinkInterface
Status string `json:"status"`
// Created is the date and time the entity was created
Created time.Time `json:"created"`
// Updated is the date and time the entity was last updated
Updated time.Time `json:"updated"`
}
APINVLinkInterface is the data structure to capture NVLinkInterface
func NewAPINVLinkInterface ¶
func NewAPINVLinkInterface(dbnvli *cdbm.NVLinkInterface) *APINVLinkInterface
NewAPINVLinkInterface creates a new APINVLinkInterface
type APINVLinkInterfaceCreateOrUpdateRequest ¶
type APINVLinkInterfaceCreateOrUpdateRequest struct {
// NVLinkLogicalPartitionID is the ID of the NVLinkLogicalPartition
NVLinkLogicalPartitionID string `json:"nvLinkLogicalPartitionId"`
// DeviceInstance is the index of the GPU
DeviceInstance int `json:"deviceInstance"`
}
APINVLinkInterfaceCreateRequest is the data structure to capture user request to create a new NVLinkInterface
func (APINVLinkInterfaceCreateOrUpdateRequest) Validate ¶
func (nvlicr APINVLinkInterfaceCreateOrUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APINVLinkInterfaceSummary ¶
type APINVLinkInterfaceSummary struct {
// ID of the NVLinkInterface
ID string `json:"id"`
// InstanceID is the ID of the Instance
InstanceID string `json:"instanceId"`
// NVLinkLogicalPartitionID is the ID of the NVLinkLogicalPartition
NVLinkLogicalPartitionID string `json:"nvLinkLogicalPartitionId"`
// DeviceInstance is the index of the GPU
DeviceInstance int `json:"deviceInstance"`
// Status is the status of the NVLinkInterface
Status string `json:"status"`
}
APINVLinkInterfaceSummary is the data structure to capture API summary of a NVLinkInterface
func NewAPINVLinkInterfaceSummary ¶
func NewAPINVLinkInterfaceSummary(dbnvli *cdbm.NVLinkInterface) *APINVLinkInterfaceSummary
NewAPINVLinkInterfaceSummary accepts a DB layer NVLinkInterface object returns an API layer object
type APINVLinkLogicalPartition ¶
type APINVLinkLogicalPartition struct {
// ID is the unique UUID v4 identifier for the NVLinkLogicalPartition
ID string `json:"id"`
// Name is the name of the NVLinkLogicalPartition
Name string `json:"name"`
// Description is the description of the NVLinkLogicalPartition
Description *string `json:"description"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Site is the summary of the Site
Site *APISiteSummary `json:"site,omitempty"`
// TenantID is the ID of the Tenant
TenantID string `json:"tenantId"`
// Tenant is the summary of the tenant
Tenant *APITenantSummary `json:"tenant,omitempty"`
// Vpcs is the list of VPCs associated with the NVLinkLogicalPartition
Vpcs []APIVpcSummary `json:"vpcs,omitempty"`
// NVLinkInterfaces is the list of NVLinkInterfaces associated with the NVLinkLogicalPartition
NVLinkInterfaces []APINVLinkInterfaceSummary `json:"nvLinkInterfaces,omitempty"`
// NVLinkLogicalPartitionStats holds GPU and instance counts for a NVLinkLogicalPartition
NVLinkLogicalPartitionStats *APINVLinkLogicalPartitionStats `json:"nvLinkLogicalPartitionStats"`
// Status is the status o the NVLinkLogicalPartition
Status string `json:"status"`
// StatusHistory is the status detail records for the NVLinkLogicalPartition over time
StatusHistory []APIStatusDetail `json:"statusHistory"`
// Created indicates the ISO datetime string for when the NVLinkLogicalPartition was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the NVLinkLogicalPartition was last updated
Updated time.Time `json:"updated"`
}
APINVLinkLogicalPartition is the data structure to capture API representation of a NVLinkLogicalPartition
func NewAPINVLinkLogicalPartition ¶
func NewAPINVLinkLogicalPartition(dbnlp *cdbm.NVLinkLogicalPartition, dbvpcs []cdbm.Vpc, dbnvlifcs []cdbm.NVLinkInterface, dbsds []cdbm.StatusDetail) *APINVLinkLogicalPartition
NewAPINVLinkLogicalPartition accepts a DB layer NVLinkLogicalPartition object and returns an API object
type APINVLinkLogicalPartitionCreateRequest ¶
type APINVLinkLogicalPartitionCreateRequest struct {
// Name is the name of the NVLinkLogicalPartition
Name string `json:"name"`
// Description is the description of the NVLinkLogicalPartition
Description *string `json:"description"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
}
APINVLinkLogicalPartitionCreateRequest is the data structure to capture instance request to create a new NVLinkLogicalPartition
func (APINVLinkLogicalPartitionCreateRequest) Validate ¶
func (anlpcr APINVLinkLogicalPartitionCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APINVLinkLogicalPartitionStats ¶
type APINVLinkLogicalPartitionStats struct {
TotalGpus int `json:"totalGpus"`
TotalDistinctInstances int `json:"totalDistinctInstances"`
}
func NewAPINVLinkLogicalPartitionStats ¶
func NewAPINVLinkLogicalPartitionStats() *APINVLinkLogicalPartitionStats
NewAPINVLinkLogicalPartitionStats creates and returns a new APINVLinkLogicalPartitionStats object
type APINVLinkLogicalPartitionSummary ¶
type APINVLinkLogicalPartitionSummary struct {
// ID of the NVLinkLogicalPartition
ID string `json:"id"`
// Name of the NVLinkLogicalPartition
Name string `json:"name"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Status is the status of the NVLinkLogicalPartition
Status string `json:"status"`
}
APINVLinkLogicalPartitionSummary is the data structure to capture API summary of a NVLinkLogicalPartition
func NewAPINVLinkLogicalPartitionSummary ¶
func NewAPINVLinkLogicalPartitionSummary(dbnlp *cdbm.NVLinkLogicalPartition) *APINVLinkLogicalPartitionSummary
NewAPINVLinkLogicalPartitionSummary accepts a DB layer NVLinkLogicalPartition object returns an API layer object
type APINVLinkLogicalPartitionUpdateRequest ¶
type APINVLinkLogicalPartitionUpdateRequest struct {
// Name is the name of the NVLinkLogicalPartition
Name *string `json:"name"`
// Description is the description of the NVLinkLogicalPartition
Description *string `json:"description"`
}
APINVLinkLogicalPartitionUpdateRequest is the data structure to capture user request to update a NVLinkLogicalPartition
func (APINVLinkLogicalPartitionUpdateRequest) Validate ¶
func (anlpur APINVLinkLogicalPartitionUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APINetworkSecurityGroup ¶
type APINetworkSecurityGroup struct {
// ID is the unique UUID v4 identifier for the NetworkSecurityGroup
ID string `json:"id"`
// Name is the name of the NetworkSecurityGroup
Name string `json:"name"`
// Description is the description of the NetworkSecurityGroup
Description *string `json:"description"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Site is the summary of the Site
Site *APISiteSummary `json:"site,omitempty"`
// TenantID is the ID of the Tenant
TenantID string `json:"tenantId"`
// Tenant is the summary of the tenant
Tenant *APITenantSummary `json:"tenant,omitempty"`
// Status is the status of the NetworkSecurityGroup
Status string `json:"status"`
// StatusHistory is the status detail records for the site over time
StatusHistory []APIStatusDetail `json:"statusHistory"`
// StatefulEgress defines whether a NetworkSecurityGroup's egress rules will be automatically stateful
StatefulEgress bool `json:"statefulEgress"`
// Rules is the list of NetworkSecurityGroupRuleAttributes for the NetworkSecurityGroup
Rules []*APINetworkSecurityGroupRule `json:"rules"`
// Labels is the set of labels/tags for the NetworkSecurityGroup
Labels map[string]string `json:"labels"`
// Created indicates the ISO datetime string for when the NetworkSecurityGroup was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the NetworkSecurityGroup was last updated
Updated time.Time `json:"updated"`
// AttachmentStats holds the counts for objects that have
// Attached the NSG if requested.
AttachmentStats *APINetworkSecurityGroupStats `json:"attachmentStats"`
// RuleCount hold the count of the number of rules in the NetworkSecurityGroup
RuleCount int `json:"ruleCount"`
}
APINetworkSecurityGroup is the data structure to capture API representation of a NetworkSecurityGroup
func NewAPINetworkSecurityGroup ¶
func NewAPINetworkSecurityGroup(dsg *cdbm.NetworkSecurityGroup, dbsds []cdbm.StatusDetail) (*APINetworkSecurityGroup, error)
NewAPINetworkSecurityGroup accepts a DB layer NetworkSecurityGroup object and returns an API object
type APINetworkSecurityGroupCreateRequest ¶
type APINetworkSecurityGroupCreateRequest struct {
// Name is the name of the NetworkSecurityGroup
Name string `json:"name"`
// Description is the description of the NetworkSecurityGroup
Description *string `json:"description"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// Rules is the list of NetworkSecurityGroupRuleAttributes for the NetworkSecurityGroup
Rules []APINetworkSecurityGroupRule `json:"rules"`
// StatefulEgress defines whether a NetworkSecurityGroup's egress rules will be automatically stateful
StatefulEgress bool `json:"statefulEgress"`
// Labels to be associted with the NetworkSecurityGroup
Labels map[string]string `json:"labels"`
}
APINetworkSecurityGroupCreateRequest is the data structure to capture instance request to create a new NetworkSecurityGroup
func (APINetworkSecurityGroupCreateRequest) Validate ¶
func (req APINetworkSecurityGroupCreateRequest) Validate(siteConfig *cdbm.SiteConfig) error
Validate ensures the values in the request are acceptable
type APINetworkSecurityGroupPropagationDetails ¶
type APINetworkSecurityGroupPropagationDetails struct {
// The ID of the object (VPC/Instance/etc) for these details
ObjectID string `json:"object_id"`
// The detailed propagation status that was
// actually returned from Carbide
DetailedStatus string `json:"detailedStatus"`
// The simplified propagation status
// that reduces the actual status to just
// a few values.
Status string `json:"status"`
// Additional details for the status
Details *string `json:"details"`
// IDs of the instances involved in determining the
// propagation status
RelatedInstanceIds []string `json:"relatedInstanceIds"`
// IDs of any instances associated with the ObjectID that have
// not yet updated their NSG rules.
UnpropagatedInstanceIds []string `json:"unpropagatedInstanceIds"`
}
func NewAPINetworkSecurityGroupPropagationDetails ¶
func NewAPINetworkSecurityGroupPropagationDetails(s *cdbm.NetworkSecurityGroupPropagationDetails) *APINetworkSecurityGroupPropagationDetails
type APINetworkSecurityGroupRule ¶
type APINetworkSecurityGroupRule struct {
Name *string `json:"name"`
Direction string `json:"direction"`
SourcePortRange *string `json:"sourcePortRange"`
DestinationPortRange *string `json:"destinationPortRange"`
Protocol string `json:"protocol"`
Action string `json:"action"`
Priority int `json:"priority"`
SourcePrefix *string `json:"sourcePrefix"`
DestinationPrefix *string `json:"destinationPrefix"`
}
func APINetworkSecurityGroupRuleFromProtobufRule ¶
func APINetworkSecurityGroupRuleFromProtobufRule(rule *cdbm.NetworkSecurityGroupRule) (*APINetworkSecurityGroupRule, error)
Accepts a Carbide rule definition and converts it to the carbide-rest-api request representation that will be returned to users
type APINetworkSecurityGroupStats ¶
type APINetworkSecurityGroupStats struct {
// InUse is a convenience field that will be true
// if TotalAttachmentCount > 0
InUse bool `json:"inUse"`
// VpcAttachmentCount holds the count of the number of VPCs that have the NSG directly attached.
VpcAttachmentCount int `json:"directVpcAttachmentCount"`
// InstanceAttachmentCount holds the count of the number of instances that have the NSG directly attached.
InstanceAttachmentCount int `json:"directInstanceAttachmentCount"`
// TotalAttachmentCount holds the total count of all objects that have
// the NSG directly attached.
TotalAttachmentCount int `json:"totalDirectAttachmentCount"`
}
APINetworkSecurityGroupStats holds detailed usage stats for an NSG
type APINetworkSecurityGroupSummary ¶
type APINetworkSecurityGroupSummary struct {
// ID of the NetworkSecurityGroup
ID string `json:"id"`
// Name of the NetworkSecurityGroup
Name string `json:"name"`
// Description of the NetworkSecurityGroup
Description *string `json:"description"`
// Status is the status of the NetworkSecurityGroup
Status string `json:"status"`
// StatefulEgress defines whether a NetworkSecurityGroup's egress rules will be automatically stateful
StatefulEgress bool `json:"statefulEgress"`
// RuleCount hold the count of the number of rules in the NetworkSecurityGroup
RuleCount int `json:"ruleCount"`
}
APINetworkSecurityGroupSummary is the data structure to capture API summary of a NetworkSecurityGroup
func NewAPINetworkSecurityGroupSummary ¶
func NewAPINetworkSecurityGroupSummary(dbsg *cdbm.NetworkSecurityGroup) *APINetworkSecurityGroupSummary
NewAPINetworkSecurityGroupSummary accepts a DB layer NetworkSecurityGroup object returns an API layer object
type APINetworkSecurityGroupUpdateRequest ¶
type APINetworkSecurityGroupUpdateRequest struct {
// Name is the name of the NetworkSecurityGroup
Name *string `json:"name"`
// Description is the description of the NetworkSecurityGroup
Description *string `json:"description"`
// StatefulEgress defines whether a NetworkSecurityGroup's egress rules will be automatically stateful
StatefulEgress *bool `json:"statefulEgress"`
// Rules is the list of NetworkSecurityGroupRuleAttributes for the NetworkSecurityGroup
Rules []APINetworkSecurityGroupRule `json:"rules"`
// Labels to be associted with the NetworkSecurityGroup
Labels map[string]string `json:"labels"`
}
APINetworkSecurityGroupUpdateRequest is the data structure to capture user request to update a NetworkSecurityGroup
func (APINetworkSecurityGroupUpdateRequest) Validate ¶
func (req APINetworkSecurityGroupUpdateRequest) Validate(siteConfig *cdbm.SiteConfig) error
Validate ensures the values in the request are acceptable
type APIOperatingSystem ¶
type APIOperatingSystem struct {
// ID is the unique UUID v4 identifier for the Operating System
ID string `json:"id"`
// Name is the name of the Operating System
Name string `json:"name"`
// Description is the description of the Operating System
Description *string `json:"description"`
// InfrastructureProviderID is the ID of the InfrastructureProvider creating the OS
InfrastructureProviderID *string `json:"infrastructureProviderId"`
// InfrastructureProvider is the summary of the InfrastructureProvider
InfrastructureProvider *APIInfrastructureProviderSummary `json:"infrastructureProvider,omitempty"`
// TenantID is the ID of the tenant creating the Operating System
TenantID *string `json:"tenantId"`
// Tenant is the summary of the Tenant
Tenant *APITenantSummary `json:"tenant,omitempty"`
// Type is which type of Operating System
Type *string `json:"type"`
// ImageUrl is url path for the Operating System
ImageURL *string `json:"imageUrl"`
// ImageSHA is SHA for the Operating System image type
ImageSHA *string `json:"imageSha"`
// ImageAuthType is auth type for the Operating System type
ImageAuthType *string `json:"imageAuthType"`
// ImageAuthToken is auth token for for the Operating System image type
ImageAuthToken *string `json:"imageAuthToken"`
// ImageDisk is disk for the Operating System image type
ImageDisk *string `json:"imageDisk"`
// RootFsID is root fs id for the Operating System image type
RootFsID *string `json:"rootFsId"`
// RootFsLabel is root fs id for the Operating System image type
RootFsLabel *string `json:"rootFsLabel"`
// IpxeScript is the ipxe ocript for the Operating System
IpxeScript *string `json:"ipxeScript"`
// PhoneHomeEnabled is an attribute which is specified by user if Operating System needs to be enabled for phone home or not
PhoneHomeEnabled bool `json:"phoneHomeEnabled"`
// UserData is the user data for the Operating System
UserData *string `json:"userData"`
// IsCloudInit indicates if the Operating System needs cloud init
IsCloudInit bool `json:"isCloudInit"`
// AllowOverride indicates if overrides are allowed
AllowOverride bool `json:"allowOverride"`
// EnableBlockStorage indicates whether the Operating System image will be stored remotely via block storage
EnableBlockStorage bool `json:"enableBlockStorage"`
// IsActive indicates if the Operating System is active
IsActive bool `json:"isActive"`
// DeactivationNote is the deactivation note if any
DeactivationNote *string `json:"deactivationNote"`
// Status is the status of the Operating System
Status string `json:"status"`
// StatusHistory is the history of statuses for the Operating System
StatusHistory []APIStatusDetail `json:"statusHistory"`
// SiteAssociations is the list of Sites associated with the Operating System
SiteAssociations []APIOperatingSystemSiteAssociation `json:"siteAssociations"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// UpdatedAt indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
}
APIOperatingSystem is the data structure to capture API representation of an OS
func NewAPIOperatingSystem ¶
func NewAPIOperatingSystem(dbOS *cdbm.OperatingSystem, dbsds []cdbm.StatusDetail, ossas []cdbm.OperatingSystemSiteAssociation, sttsmap map[uuid.UUID]*cdbm.TenantSite) *APIOperatingSystem
NewAPIOperatingSystem accepts a DB layer objects and returns an API layer object
type APIOperatingSystemCreateRequest ¶
type APIOperatingSystemCreateRequest struct {
// Name is the name of the OperatingSystem
Name string `json:"name"`
// Description is the description of the OperatingSystem
Description *string `json:"description"`
// InfrastructureProviderID is the ID of the InfrastructureProvider creating the Operating System
InfrastructureProviderID *string `json:"infrastructureProviderId"`
// SiteIDs is a list of Site objects
SiteIDs []string `json:"siteIds"`
// TenantID is the ID of the Tenant creating the Operating System
TenantID *string `json:"tenantId"`
// IpxeScript is the iPXE script for the Operating System
IpxeScript *string `json:"ipxeScript"`
// ImageURL is the image path for the Operating System
ImageURL *string `json:"imageUrl"`
// ImageSHA is SHA for the Operating System image type
ImageSHA *string `json:"imageSha"`
// ImageAuthType is auth type for the Operating System type
ImageAuthType *string `json:"imageAuthType"`
// ImageAuthToken is auth token for for the Operating System image type
ImageAuthToken *string `json:"imageAuthToken"`
// ImageDisk is disk for the Operating System image type
ImageDisk *string `json:"imageDisk"`
// RootFsID is root fs id for the Operating System image type
RootFsID *string `json:"rootFsId"`
// RootFsLabel is root fs label for the Operating System image type
RootFsLabel *string `json:"rootFsLabel"`
// PhoneHomeEnabled is the flag to allow enable phone home
PhoneHomeEnabled *bool `json:"phoneHomeEnabled"`
// UserData is the user data for the Operating System
UserData *string `json:"userData"`
// IsCloudInit indicates if the Operating System needs cloud init
IsCloudInit bool `json:"isCloudInit"`
// AllowOverride indicates if overrides are allowed
AllowOverride bool `json:"allowOverride"`
// EnableBlockStorage indicates whether the Operating System image will be stored remotely via block storage
EnableBlockStorage bool `json:"enableBlockStorage"`
}
APIOperatingSystemCreateRequest is the data structure to capture user request to create a new OperatingSystem
func (APIOperatingSystemCreateRequest) Validate ¶
func (oscr APIOperatingSystemCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
func (*APIOperatingSystemCreateRequest) ValidateAndSetUserData ¶
func (oscr *APIOperatingSystemCreateRequest) ValidateAndSetUserData(phonehomeUrl string) error
type APIOperatingSystemSiteAssociation ¶
type APIOperatingSystemSiteAssociation struct {
// Site is the summary of the Site
Site *APISiteSummary `json:"site"`
// Version is the version of corresponding image on Site
Version *string `json:"version"`
// Status is the status of the OperatingSystemSiteAssociation
Status string `json:"status"`
// Created indicates the ISO datetime string for when the site was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the site was last updated
Updated time.Time `json:"updated"`
}
APIOperatingSystemSiteAssociation is the data structure to capture API representation of an sshkey association
func NewAPIOperatingSystemSiteAssociation ¶
func NewAPIOperatingSystemSiteAssociation(dbossa *cdbm.OperatingSystemSiteAssociation, ts *cdbm.TenantSite) *APIOperatingSystemSiteAssociation
NewAPIOperatingSystemSiteAssociation accepts a DB layer OperatingSystemSiteAssociation object and returns an API object
type APIOperatingSystemSummary ¶
type APIOperatingSystemSummary struct {
// ID of the OperatingSystem
ID string `json:"id"`
// Name of the OperatingSystem, only lowercase characters, digits, hyphens and cannot begin/end with hyphen
Name string `json:"name"`
// Type is which type of Operating System
Type *string `json:"type"`
// Status is the status of the Operating System
Status string `json:"status"`
}
APIOperatingSystemSummary is the data structure to capture API summary of an OperatingSystem
func NewAPIOperatingSystemSummary ¶
func NewAPIOperatingSystemSummary(dbos *cdbm.OperatingSystem) *APIOperatingSystemSummary
NewAPIOperatingSystemSummary accepts a DB layer OperatingSystem object returns an API layer object
type APIOperatingSystemUpdateRequest ¶
type APIOperatingSystemUpdateRequest struct {
// Name is the name of the OperatingSystem
Name *string `json:"name"`
// Description is the description of the Operating System
Description *string `json:"description"`
// IpxeScript is the ipxe script for the Operating System
IpxeScript *string `json:"ipxeScript"`
// ImageURL is the image path for the Operating System
ImageURL *string `json:"imageUrl"`
// ImageSHA is SHA for the Operating System image type
ImageSHA *string `json:"imageSha"`
// ImageAuthType is auth type for the Operating System type
ImageAuthType *string `json:"imageAuthType"`
// ImageAuthToken is auth token for for the Operating System image type
ImageAuthToken *string `json:"imageAuthToken"`
// ImageDisk is disk for the Operating System image type
ImageDisk *string `json:"imageDisk"`
// RootFsID is root fs id for the Operating System image type
RootFsID *string `json:"rootFsId"`
// RootFsLabel is root fs label for the Operating System image type
RootFsLabel *string `json:"rootFsLabel"`
// PhoneHomeEnabled is the flag to allow enable phone home
PhoneHomeEnabled *bool `json:"phoneHomeEnabled"`
// UserData is the user data for the Operating System
UserData *string `json:"userData"`
// IsCloudInit indicates if the Operating System needs cloud init
IsCloudInit *bool `json:"isCloudInit"`
// AllowOverride indicates if overrides are allowed
AllowOverride *bool `json:"allowOverride"`
// IsActive indicates if the Operating System is active
IsActive *bool `json:"isActive"`
// DeactivationNote is the deactivation note if any
DeactivationNote *string `json:"deactivationNote"`
}
APIOperatingSystemUpdateRequest is the data structure to capture user request to update an OperatingSystem
func (APIOperatingSystemUpdateRequest) Validate ¶
func (osur APIOperatingSystemUpdateRequest) Validate(existingOS *cdbm.OperatingSystem) error
Validate ensure the values passed in request are acceptable
func (*APIOperatingSystemUpdateRequest) ValidateAndSetUserData ¶
func (osur *APIOperatingSystemUpdateRequest) ValidateAndSetUserData(phonehomeUrl string, existingOS *cdbm.OperatingSystem) error
type APIRack ¶
type APIRack struct {
ID string `json:"id"`
Name string `json:"name"`
Manufacturer string `json:"manufacturer"`
Model string `json:"model"`
SerialNumber string `json:"serialNumber"`
Description string `json:"description"`
Location *APIRackLocation `json:"location,omitempty"`
Components []*APIRackComponent `json:"components,omitempty"`
}
APIRack is the API representation of a Rack from RLA
func NewAPIRack ¶
NewAPIRack creates an APIRack from the RLA protobuf Rack
type APIRackComponent ¶
type APIRackComponent struct {
ID string `json:"id"`
ComponentID string `json:"componentId"`
RackID string `json:"rackId"`
Type string `json:"type"`
Name string `json:"name"`
SerialNumber string `json:"serialNumber"`
Manufacturer string `json:"manufacturer"`
Model string `json:"model"`
Description string `json:"description"`
FirmwareVersion string `json:"firmwareVersion"`
SlotID int32 `json:"slotId"`
TrayIdx int32 `json:"trayIdx"`
HostID int32 `json:"hostId"`
BMCs []*APIBMC `json:"bmcs"`
PowerState string `json:"powerState"`
}
APIRackComponent represents a component within a rack
func (*APIRackComponent) FromProto ¶
func (arc *APIRackComponent) FromProto(protoComponent *rlav1.Component)
FromProto converts a proto Component to an APIRackComponent
type APIRackGetAllRequest ¶
type APIRackGetAllRequest struct {
SiteID string `query:"siteId"`
IncludeComponents bool `query:"includeComponents"`
Name []string `query:"name"`
Manufacturer []string `query:"manufacturer"`
PageNumber string `query:"pageNumber"`
PageSize string `query:"pageSize"`
OrderBy string `query:"orderBy"`
}
APIRackGetAllRequest captures query parameters for listing racks.
func (*APIRackGetAllRequest) QueryValues ¶
func (r *APIRackGetAllRequest) QueryValues() url.Values
QueryValues returns only the known query parameters as url.Values, suitable for deterministic workflow ID hashing without unknown param interference.
func (*APIRackGetAllRequest) ToFilters ¶
func (r *APIRackGetAllRequest) ToFilters() []*rlav1.Filter
ToFilters converts the request's filter fields to RLA protobuf filters.
func (*APIRackGetAllRequest) Validate ¶
func (r *APIRackGetAllRequest) Validate() error
type APIRackGetRequest ¶
type APIRackGetRequest struct {
SiteID string `query:"siteId"`
IncludeComponents bool `query:"includeComponents"`
}
APIRackGetRequest captures query parameters for getting a single rack.
func (*APIRackGetRequest) Validate ¶
func (r *APIRackGetRequest) Validate() error
type APIRackLocation ¶
type APIRackLocation struct {
Region string `json:"region"`
Datacenter string `json:"datacenter"`
Room string `json:"room"`
Position string `json:"position"`
}
APIRackLocation represents the location of a rack
func (*APIRackLocation) FromProto ¶
func (arl *APIRackLocation) FromProto(protoLocation *rlav1.Location)
FromProto converts a proto Location to an APIRackLocation
type APIRackTask ¶ added in v1.2.0
type APIRackTask struct {
ID string `json:"id"`
Status string `json:"status"`
Description string `json:"description"`
Message string `json:"message"`
Started *time.Time `json:"started"`
Finished *time.Time `json:"finished"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
APIRackTask is the API response model for a rack task (OpenAPI schema RackTask).
func NewAPIRackTask ¶ added in v1.2.0
func NewAPIRackTask(task *rlav1.Task) *APIRackTask
func (*APIRackTask) FromProto ¶ added in v1.2.0
func (t *APIRackTask) FromProto(task *rlav1.Task)
type APIRackValidateAllRequest ¶
type APIRackValidateAllRequest struct {
SiteID string `query:"siteId"`
Name []string `query:"name"`
Manufacturer []string `query:"manufacturer"`
}
APIRackValidateAllRequest captures query parameters for validating racks.
func (*APIRackValidateAllRequest) QueryValues ¶
func (r *APIRackValidateAllRequest) QueryValues() url.Values
QueryValues returns only the known query parameters as url.Values.
func (*APIRackValidateAllRequest) ToFilters ¶
func (r *APIRackValidateAllRequest) ToFilters() []*rlav1.Filter
ToFilters converts the request's filter fields to RLA protobuf filters.
func (*APIRackValidateAllRequest) Validate ¶
func (r *APIRackValidateAllRequest) Validate() error
type APIRackValidationResult ¶
type APIRackValidationResult struct {
Diffs []*APIComponentDiff `json:"diffs"`
TotalDiffs int32 `json:"totalDiffs"`
MissingCount int32 `json:"missingCount"`
UnexpectedCount int32 `json:"unexpectedCount"`
DriftCount int32 `json:"driftCount"`
MatchCount int32 `json:"matchCount"`
}
APIRackValidationResult is the API representation of a rack validation result
func NewAPIRackValidationResult ¶
func NewAPIRackValidationResult(protoResp *rlav1.ValidateComponentsResponse) *APIRackValidationResult
NewAPIRackValidationResult creates an APIRackValidationResult from the RLA protobuf response
func (*APIRackValidationResult) FromProto ¶
func (r *APIRackValidationResult) FromProto(protoResp *rlav1.ValidateComponentsResponse)
FromProto converts an RLA protobuf ValidateComponentsResponse to an APIRackValidationResult
type APISSHKey ¶
type APISSHKey struct {
// ID is the unique UUID v4 identifier for the SSHKey
ID string `json:"id"`
// Name is the name of the SSHKey
Name string `json:"name"`
// Org is the organization the SSHKey belongs to
Org string `json:"org"`
// TenantID is the ID of the Tenant
TenantID string `json:"tenantId"`
// Tenant is the summary of the tenant
Tenant *APITenantSummary `json:"tenant,omitempty"`
// Fingerprint is the fingerprint of the public key
Fingerprint string `json:"fingerprint"`
// Created indicates the ISO datetime string for when the SSHKey was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the SSHKey was last updated
Updated time.Time `json:"updated"`
}
APISSHKey is the data structure to capture API representation of a SSHKey
func NewAPISSHKey ¶
func NewAPISSHKey(sk *cdbm.SSHKey, skas []cdbm.SSHKeyAssociation) *APISSHKey
NewAPISSHKey accepts a DB layer SSHKey object and returns an API object
type APISSHKeyAssociation ¶
type APISSHKeyAssociation struct {
// ID is the unique UUID v4 identifier for the security policy
ID string `json:"id"`
// SSHKeyID is the ID of the associated SSHKey
SSHKeyID string `json:"sshKeyId"`
// SSHKeyGroupID is the ID of the SSHKeyGroup
SSHKeyGroupID string `json:"entityId"`
// Created indicates the ISO datetime string for when the site was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the site was last updated
Updated time.Time `json:"updated"`
}
APISSHKeyAssociation is the data structure to capture API representation of an sshkey association
func NewAPISSHKeyAssociation ¶
func NewAPISSHKeyAssociation(ska *cdbm.SSHKeyAssociation) *APISSHKeyAssociation
NewAPISSHKeyAssociation accepts a DB layer SSHKeyAssociation object and returns an API object
type APISSHKeyCreateRequest ¶
type APISSHKeyCreateRequest struct {
// Name is the name of the SSHKey
Name string `json:"name"`
// PublicKey is the public key
PublicKey string `json:"publicKey"`
// SSHKeyGroupID is the ID of the SSHKey Group
SSHKeyGroupID *string `json:"sshKeyGroupId"`
}
APISSHKeyCreateRequest is the data structure to capture instance request to create a new SSHKey
func (APISSHKeyCreateRequest) Validate ¶
func (skcr APISSHKeyCreateRequest) Validate() error
Validate ensures that the values passed in request are acceptable
type APISSHKeyGroup ¶
type APISSHKeyGroup struct {
// ID is the unique UUID v4 identifier for the SSHKeyGroup
ID string `json:"id"`
// Name is the name of the SSHKeyGroup
Name string `json:"name"`
// Description is the description of the SSHKeyGroup
Description *string `json:"description"`
// Org is the organization the SSHKeyGroup belongs to
Org string `json:"org"`
// TenantID is the ID of the Tenant
TenantID string `json:"tenantId"`
// Tenant is the summary of the tenant
Tenant *APITenantSummary `json:"tenant,omitempty"`
// Version is the keyset version for the SSHKeyGroups
Version *string `json:"version"`
// Status is the status of the SSHKeyGroups
Status string `json:"status"`
// StatusHistory is the status detail records for the SSHKeyGroups over time
StatusHistory []APIStatusDetail `json:"statusHistory"`
// SSHKeys is the list of sshkeys associated with the sshkey group
SSHKeys []APISSHKey `json:"sshKeys"`
// SiteAssociations is the list of sites associated with the sshkey group
SiteAssociations []APISSHKeyGroupSiteAssociation `json:"siteAssociations"`
// Created indicates the ISO datetime string for when the SSHKeyGroup was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the SSHKeyGroup was last updated
Updated time.Time `json:"updated"`
}
APISSHKeyGroup is the data structure to capture API representation of a SSHKeyGroup
func NewAPISSHKeyGroup ¶
func NewAPISSHKeyGroup(skg *cdbm.SSHKeyGroup, skgsas []cdbm.SSHKeyGroupSiteAssociation, sttsmap map[uuid.UUID]*cdbm.TenantSite, sks []cdbm.SSHKeyAssociation, dbsds []cdbm.StatusDetail) *APISSHKeyGroup
NewAPISSHKeyGroup accepts a DB layer SSHKeyGroup object and returns an API object
type APISSHKeyGroupCreateRequest ¶
type APISSHKeyGroupCreateRequest struct {
// Name is the name of the SSHKeyGroup
Name string `json:"name"`
// Description is the description of the SSHKeyGroup
Description *string `json:"description"`
// SiteIDs is a list of Site objects
SiteIDs []string `json:"siteIds"`
// SSHKeyIDs is a list of SSHKeyID objects
SSHKeyIDs []string `json:"sshKeyIds"`
}
APISSHKeyGroupCreateRequest is the data structure to capture instance request to create a new SSHKeyGroup
func (APISSHKeyGroupCreateRequest) Validate ¶
func (sgcr APISSHKeyGroupCreateRequest) Validate() error
Validate ensures that the values passed in request are acceptable
type APISSHKeyGroupSiteAssociation ¶
type APISSHKeyGroupSiteAssociation struct {
// Site is the summary of the Site
Site *APISiteSummary `json:"site"`
// ControllerKeySetVersion is the version of corresponding keyset on Site
ControllerKeySetVersion *string `json:"version"`
// Status is the status of the SSHKeyGroupSiteAssociation
Status string `json:"status"`
// Created indicates the ISO datetime string for when the site was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the site was last updated
Updated time.Time `json:"updated"`
}
APISSHKeyGroupSiteAssociation is the data structure to capture API representation of an sshkey association
func NewAPISSHKeyGroupSiteAssociation ¶
func NewAPISSHKeyGroupSiteAssociation(dbskgsa *cdbm.SSHKeyGroupSiteAssociation, ts *cdbm.TenantSite) *APISSHKeyGroupSiteAssociation
NewAPISSHKeyGroupSiteAssociation accepts a DB layer SSHKeyGroupSiteAssociation object and returns an API object
type APISSHKeyGroupSummary ¶
type APISSHKeyGroupSummary struct {
// ID is the unique UUID v4 identifier for the SSHKeyGroup
ID string `json:"id"`
// Name of the Site, only lowercase characters, digits, hyphens and cannot begin/end with hyphen
Name string `json:"name"`
// Description is the description of the SSHKeyGroup
Description *string `json:"description"`
// Version is the keyset version for the SSHKeyGroups
Version *string `json:"version"`
// Status is the status of the site
Status string `json:"status"`
// Created indicates the ISO datetime string for when the SSHKeyGroup was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the SSHKeyGroup was last updated
Updated time.Time `json:"updated"`
}
APISSHKeyGroupSummary is the data structure to capture API summary of a SSHKeyGroup
func NewAPISSHKeyGroupSummary ¶
func NewAPISSHKeyGroupSummary(skg *cdbm.SSHKeyGroup) *APISSHKeyGroupSummary
NewAPISSHKeyGroupSummary accepts a DB layer SSHKeyGroup object returns an API layer object
type APISSHKeyGroupUpdateRequest ¶
type APISSHKeyGroupUpdateRequest struct {
// Name is the name of the SSHKeyGroup
Name *string `json:"name"`
// Description is the description of the SSHKeyGroup
Description *string `json:"description"`
// SiteIDs is a list of Site objects
SiteIDs []string `json:"siteIds"`
// SSHKeyIDs is a list of SSHKeyID objects
SSHKeyIDs []string `json:"sshKeyIds"`
// Version is the keyset version of the SSHKeyGroup
Version *string `json:"version"`
}
APISSHKeyGroupUpdateRequest is the data structure to capture user request to update a SSHKeyGroup
func (APISSHKeyGroupUpdateRequest) Validate ¶
func (sgur APISSHKeyGroupUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APISSHKeyUpdateRequest ¶
type APISSHKeyUpdateRequest struct {
// Name is the name of the SSHKey
Name *string `json:"name"`
}
APISSHKeyUpdateRequest is the data structure to capture user request to update a SSHKey
func (APISSHKeyUpdateRequest) Validate ¶
func (sgur APISSHKeyUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIServiceAccount ¶
type APIServiceAccount struct {
// Enabled is a flag to indicate if the Service Account is enabled
Enabled bool `json:"enabled"`
// InfrastructureProviderID is the ID of the InfrastructureProvider
InfrastructureProviderID *string `json:"infrastructureProviderId"`
// ID is the unique UUID v4 identifier for the Service Account
TenantID *string `json:"tenantId"`
}
type APIServiceAccount is the data structure to capture API representation of a Service Account
func NewAPIServiceAccount ¶
func NewAPIServiceAccount(serviceAccountEnabled bool, dbProvider *cdbm.InfrastructureProvider, dbTenant *cdbm.Tenant) *APIServiceAccount
NewAPIServiceAccount accepts a DB layer ServiceAccount object and returns an API object
type APISite ¶
type APISite struct {
// ID is the unique UUID v4 identifier of the site in Forge Cloud
ID string `json:"id"`
// Name is the name of the site
Name string `json:"name"`
// Description is the description of the site
Description *string `json:"description"`
// Org is the NGC organization ID of the infrastructure provider and the org the site belongs to
Org string `json:"org"`
// InfrastructureProviderID is the ID of the infrastructure provider who owns the site
InfrastructureProviderID string `json:"infrastructureProviderId"`
// InfrastructureProvider is the summary of the InfrastructureProvider
InfrastructureProvider *APIInfrastructureProviderSummary `json:"infrastructureProvider,omitempty"`
// SiteControllerVersion is the version of the site controller
SiteControllerVersion *string `json:"siteControllerVersion"`
// SiteAgentVersion is the version of the site agent
SiteAgentVersion *string `json:"siteAgentVersion"`
// RegistrationToken is the registration token to pair the site with the site controller
RegistrationToken *string `json:"registrationToken"`
// RegistrationTokenExpiration is the ISO datetime string for when the registration token expires
RegistrationTokenExpiration *time.Time `json:"registrationTokenExpiration"`
// SerialConsoleHostname is the serial console hostname of the site controller
SerialConsoleHostname *string `json:"serialConsoleHostname"`
// IsSerialConsoleEnabled is a flag to indicate if serial console is enabled
IsSerialConsoleEnabled bool `json:"isSerialConsoleEnabled"`
// SerialConsoleIdleTimeout is the idle timeout for a serial console session
SerialConsoleIdleTimeout *int `json:"serialConsoleIdleTimeout"`
// SerialConsoleMaxSessionLength is the maximum session length for a serial console session
SerialConsoleMaxSessionLength *int `json:"serialConsoleMaxSessionLength"`
// IsSerialConsoleSSHKeysEnabled indicates if Tenant has enabled serial console access using SSH Keys
IsSerialConsoleSSHKeysEnabled *bool `json:"isSerialConsoleSSHKeysEnabled,omitempty"`
// IsOnline is the connection status attribute for Site
IsOnline bool `json:"isOnline"`
// Status is the status of the site
Status string `json:"status"`
// StatusHistory is the status detail records for the site over time
StatusHistory []APIStatusDetail `json:"statusHistory"`
// Created indicates the ISO datetime string for when the site was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the site was last updated
Updated time.Time `json:"updated"`
// Location information about site location
Location *APISiteLocation `json:"location"`
// Contact information about site contact
Contact *APISiteContact `json:"contact"`
// MachineStats holds machine counts by status for a site
MachineStats *APISiteMachineStats `json:"machineStats"`
// Capabilities holds the capabilities, currently for use
// as site-level feature flagging.
Capabilities *APISiteCapabilities `json:"capabilities"`
}
APISite is a data structure to capture information about site at the API layer
func NewAPISite ¶
func NewAPISite(dbs cdbm.Site, dbsds []cdbm.StatusDetail, ts *cdbm.TenantSite) APISite
NewAPISite creates and returns a new APISite object. If TenantSite is not nil, we skip settings attributes that Tenant does not have access to
type APISiteCapabilities ¶
type APISiteCapabilities struct {
NativeNetworking bool `json:"nativeNetworking"`
NetworkSecurityGroup bool `json:"networkSecurityGroup"`
NVLinkPartition bool `json:"nvLinkPartition"`
RackLevelAdministration bool `json:"rackLevelAdministration"`
ImageBasedOperatingSystem bool `json:"imageBasedOperatingSystem"`
}
APISiteCapabilities holds the model of site capabilities
type APISiteContact ¶
type APISiteContact struct {
Email string `json:"email"`
}
APISiteContact information about site contact
type APISiteCreateRequest ¶
type APISiteCreateRequest struct {
// Name is the name of the site
Name string `json:"name"`
// Description is the description of the site
Description *string `json:"description"`
// SerialConsoleHostname is the serial console hostname of the site
SerialConsoleHostname *string `json:"serialConsoleHostname"`
// Location identifies site location
Location *APISiteLocation `json:"location"`
// Contact identifies site contact
Contact *APISiteContact `json:"contact"`
}
APISiteCreateRequest captures the request data for creating a new site
func (APISiteCreateRequest) Validate ¶
func (ascr APISiteCreateRequest) Validate() error
Validate validates Site create request data
type APISiteLocation ¶
type APISiteLocation struct {
City string `json:"city"`
State string `json:"state"`
Country string `json:"country"`
}
APISiteLocation information about site address
type APISiteMachineStats ¶
type APISiteMachineStats struct {
Total int `json:"total"`
TotalByStatus map[string]int `json:"totalByStatus"`
TotalByHealth map[string]int `json:"totalByHealth"`
TotalByStatusAndHealth map[string]map[string]int `json:"totalByStatusAndHealth"`
TotalByAllocation map[string]int `json:"totalByAllocation"`
}
func NewAPISiteMachineStats ¶
func NewAPISiteMachineStats() *APISiteMachineStats
NewAPISiteMachineStats creates and returns a new APISiteMachineStats object
type APISiteSummary ¶
type APISiteSummary struct {
// ID is the unique UUID v4 identifier for the Site
ID string `json:"id"`
// Name of the Site, only lowercase characters, digits, hyphens and cannot begin/end with hyphen
Name string `json:"name"`
// InfrastructureProviderID is the ID of the infrastructure provider who owns the site
InfrastructureProviderID string `json:"infrastructureProviderId"`
// InfrastructureProvider is the summary of the InfrastructureProvider
InfrastructureProvider *APIInfrastructureProviderSummary `json:"infrastructureProvider,omitempty"`
// IsSerialConsoleEnabled is a flag to indicate if serial console is enabled
IsSerialConsoleEnabled bool `json:"isSerialConsoleEnabled"`
// IsOnline is the connection status attribute for Site
IsOnline bool `json:"isOnline"`
// Status is the status of the site
Status string `json:"status"`
// Capabilities holds the capabilities, currently for use as site-level feature flagging
Capabilities *APISiteCapabilities `json:"capabilities"`
}
APISiteSummary is the data structure to capture API summary of a Site
func NewAPISiteSummary ¶
func NewAPISiteSummary(dbst *cdbm.Site) *APISiteSummary
NewAPISiteSummary accepts a DB layer Site object returns an API layer object
type APISiteUpdateRequest ¶
type APISiteUpdateRequest struct {
// Name is the name of the site
Name *string `json:"name"`
// Description is the description of the site
Description *string `json:"description"`
// RenewRegistrationToken is a flag to renew the registration token
RenewRegistrationToken *bool `json:"renewRegistrationToken"`
// SerialConsoleHostname is the serial console hostname of the site
SerialConsoleHostname *string `json:"serialConsoleHostname"`
// IsSerialConsoleEnabled is a flag to indicate if serial console is enabled
IsSerialConsoleEnabled *bool `json:"isSerialConsoleEnabled"`
// SerialConsoleIdleTimeout is the idle timeout for a serial console session
SerialConsoleIdleTimeout *int `json:"serialConsoleIdleTimeout"`
// SerialConsoleMaxSessionLength is the maximum session length for a serial console session
SerialConsoleMaxSessionLength *int `json:"serialConsoleMaxSessionLength"`
// IsSerialConsoleSSHKeysEnabled indicates if Tenant has enabled/disabled serial console access
IsSerialConsoleSSHKeysEnabled *bool `json:"isSerialConsoleSSHKeysEnabled"`
// Location updates location of the site
Location *APISiteLocation `json:"location"`
// Contact updates contact for the site
Contact *APISiteContact `json:"contact"`
}
APISiteUpdateRequest captures the request data for updating a new site
type APISku ¶
type APISku struct {
// ID is the unique identifier for the SKU
ID string `json:"id"`
// SiteID is the ID of the Site this SKU belongs to
SiteID string `json:"siteId"`
// DeviceType is the optional device type identifier
DeviceType *string `json:"deviceType"`
// AssociatedMachineIds is the list of machine IDs associated with this SKU
AssociatedMachineIds []string `json:"associatedMachineIds"`
// Components contains the hardware components of this SKU
Components *APISkuComponents `json:"components"`
// Created is the date and time the entity was created
Created time.Time `json:"created"`
// Updated is the date and time the entity was last updated
Updated time.Time `json:"updated"`
}
APISku is the data structure to capture API representation of a SKU
type APISkuChassis ¶
type APISkuChassis struct {
// Vendor describes the vendor of the chassis
Vendor string `json:"vendor"`
// Model describes the model of the chassis
Model string `json:"model"`
}
APISkuChassis represents the chassis component in the SKU
type APISkuComponents ¶
type APISkuComponents struct {
// Cpus describes CPU components
Cpus []APISkuCpu `json:"cpus"`
// Gpus describes GPU components
Gpus []APISkuGpu `json:"gpus"`
// Memory describes memory components
Memory []APISkuMemory `json:"memory"`
// Storage describes storage components
Storage []APISkuStorage `json:"storage"`
// Chassis describes chassis component
Chassis *APISkuChassis `json:"chassis"`
// EthernetDevices describes ethernet device components
EthernetDevices []APISkuEthernetDevice `json:"ethernetDevices"`
// InfinibandDevices describes infiniband device components
InfinibandDevices []APISkuInfinibandDevice `json:"infinibandDevices"`
// Tpm describes TPM components
Tpm *APISkuTpm `json:"tpm"`
}
APISkuComponents is the data structure to capture API representation of SKU Components
func NewAPISkuComponents ¶
func NewAPISkuComponents(protoComponents *cwssaws.SkuComponents) *APISkuComponents
NewAPISkuComponents converts proto SkuComponents to API SkuComponents
type APISkuCpu ¶
type APISkuCpu struct {
// Vendor describes the vendor of the CPU
Vendor string `json:"vendor"`
// Model describes the model of the CPU
Model string `json:"model"`
// ThreadCount describes the number of threads for the CPU
ThreadCount uint32 `json:"threadCount"`
// Count describes the number of CPUs present
Count uint32 `json:"count"`
}
APISkuCpu represents a CPU component in the SKU
type APISkuEthernetDevice ¶
type APISkuEthernetDevice struct {
// Vendor describes the vendor of the ethernet device
Vendor string `json:"vendor"`
// Model describes the model of the ethernet device
Model string `json:"model"`
// Count describes the number of ethernet devices present
Count uint32 `json:"count"`
}
APISkuEthernetDevice represents an ethernet device component in the SKU
type APISkuGpu ¶
type APISkuGpu struct {
// Vendor describes the vendor of the GPU
Vendor string `json:"vendor"`
// Model describes the model of the GPU
Model string `json:"model"`
// TotalMemory describes the total memory of the GPU
TotalMemory string `json:"totalMemory"`
// Count describes the number of GPUs present
Count uint32 `json:"count"`
}
APISkuGpu represents a GPU component in the SKU
type APISkuInfinibandDevice ¶
type APISkuInfinibandDevice struct {
// Vendor describes the vendor of the infiniband device
Vendor string `json:"vendor"`
// Model describes the model of the infiniband device
Model string `json:"model"`
// Count describes the number of infiniband devices present
Count uint32 `json:"count"`
}
APISkuInfinibandDevice represents an infiniband device component in the SKU
type APISkuMemory ¶
type APISkuMemory struct {
// CapacityMb describes the capacity in megabytes
CapacityMb uint32 `json:"capacityMb"`
// MemoryType describes the type of memory (e.g., DDR4, DDR5)
MemoryType string `json:"memoryType"`
// Count describes the number of memory modules present
Count uint32 `json:"count"`
}
APISkuMemory represents a memory component in the SKU
type APISkuStorage ¶
type APISkuStorage struct {
// Vendor describes the vendor of the storage device
Vendor string `json:"vendor"`
// Model describes the model of the storage device
Model string `json:"model"`
// CapacityMb describes the capacity in megabytes
CapacityMb uint32 `json:"capacityMb"`
// Count describes the number of storage devices present
Count uint32 `json:"count"`
}
APISkuStorage represents a storage component in the SKU
type APISkuSummary ¶
type APISkuSummary struct {
// ID is the unique identifier for the SKU
ID string `json:"id"`
// SiteID is the ID of the Site this SKU belongs to
SiteID string `json:"siteId"`
// DeviceType is the optional device type identifier
DeviceType *string `json:"deviceType"`
}
APISkuSummary is the data structure to capture summary of a SKU
func NewAPISkuSummary ¶
func NewAPISkuSummary(dbSku *cdbm.SKU) *APISkuSummary
NewAPISkuSummary accepts a DB layer SKU object and returns an API layer summary object
type APISkuTpm ¶
type APISkuTpm struct {
// Vendor describes the vendor of the TPM
Vendor string `json:"vendor"`
// Version describes the version of the TPM
Version string `json:"version"`
}
APISkuTpm represents a TPM component in the SKU
type APIStatusDetail ¶
type APIStatusDetail struct {
// Status denotes the state of the associated entity at a particular time
Status string `json:"status"`
// Message contains the description of the state and cause/remedy in case of error
Message *string `json:"message"`
// Created indicates the ISO datetime string for when the associated entity assumed the status
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the associated entity was last found to have this status
Updated time.Time `json:"updated"`
}
APIStatusDetail captures API representation of a status detail DB object
func NewAPIStatusDetail ¶
func NewAPIStatusDetail(dbsd cdbm.StatusDetail) APIStatusDetail
NewAPIStatusDetail creates an API status detail object from status detail DB entry
type APISubnet ¶
type APISubnet struct {
// ID is the unique UUID v4 identifier for the Subnet
ID string `json:"id"`
// Name is the name of the Subnet
Name string `json:"name"`
// Description is the description of the Subnet
Description *string `json:"description"`
// SiteID is the ID of the Site containing the Subnet
SiteID string `json:"siteId"`
// Site is the summary of the Site
Site *APISiteSummary `json:"site,omitempty"`
// VpcID is the ID of the Vpc containing the Subnet
VpcID string `json:"vpcId"`
// Vpc is the summary of the VPC
Vpc *APIVpcSummary `json:"vpc,omitempty"`
// Controller network Segment ID is the ID of the Site Controller Network Segment corresponding to the Subnet
ControllerNetworkSegmentID *string `json:"controllerNetworkSegmentId"`
// IPv4Prefix is the prefix of the network in CIDR notation
IPv4Prefix *string `json:"ipv4Prefix"`
// IPv4BlockID is the derived IPv4BlockId for the tenant from an allocation
IPv4BlockID *string `json:"ipv4BlockId"`
// IPv4Block is the summary of the IPv4Block
IPv4Block *APIIPBlockSummary `json:"ipv4Block,omitempty"`
// IPv4Gateway is the address of the IPv4 gateway in the Subnet
IPv4Gateway *string `json:"ipv4Gateway"`
// IPv6Prefix is the prefix of the network in CIDR notation
IPv6Prefix *string `json:"ipv6Prefix"`
// IPv6BlockID is the derived IPv6BlockId for the tenant from an allocation
IPv6BlockID *string `json:"ipv6BlockId"`
// IPv4Block is the summary of the IPv4Block
IPv6Block *APIIPBlockSummary `json:"ipv6Block,omitempty"`
// IPv6Gateway is the address of the IPv6 gateway in the Subnet
IPv6Gateway *string `json:"ipv6Gateway"`
// PrefixLength is the length of the network prefix
PrefixLength int `json:"prefixLength"`
// RoutingType is the routing type of the Subnet
RoutingType *string `json:"routingType"`
// Status is the status of the Subnet
Status string `json:"status"`
// MTU is the maximum transmission unit of the Subnet
MTU *int `json:"mtu"`
// StatusHistory is the history of statuses for the Subnet
StatusHistory []APIStatusDetail `json:"statusHistory"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// UpdatedAt indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
}
APISubnet is the data structure to capture API representation of a Subnet
func NewAPISubnet ¶
func NewAPISubnet(dbs *cdbm.Subnet, dbsds []cdbm.StatusDetail) *APISubnet
NewAPISubnet accepts a DB layer objects and returns an API layer object
type APISubnetCreateRequest ¶
type APISubnetCreateRequest struct {
// Name is the name of the Subnet
Name string `json:"name"`
// Description is the description of the Subnet
Description *string `json:"description"`
// VpcID is the ID of the vpc containing the Subnet
VpcID string `json:"vpcId"`
// IPv4BlockID is the derived IPv4BlockId for the tenant from an allocation
IPv4BlockID *string `json:"ipv4BlockId"`
// IPv6BlockID is the derived IPv6BlockId for the tenant from an allocation
IPv6BlockID *string `json:"ipv6BlockId"`
// IPBlockSize the block size for the Subnet
// NOTE: This field has been deprecated
IPBlockSize *int `json:"ipBlockSize"`
// PrefixLength is the length of the prefix
PrefixLength int `json:"prefixLength"`
}
APISubnetCreateRequest is the data structure to capture user request to create a new Subnet
func (APISubnetCreateRequest) Validate ¶
func (scr APISubnetCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APISubnetStats ¶
type APISubnetStats struct {
// Total is the total number of the Subnet object in Forge Cloud
Total int `json:"total"`
// Pending is the total number of pending Subnet object in Forge Cloud
Pending int `json:"pending"`
// Provisioning is the total number of provisioning Subnet object in Forge Cloud
Provisioning int `json:"provisioning"`
// Ready is the total number of ready Subnet object in Forge Cloud
Ready int `json:"ready"`
// Deleting is the total number of deleting Subnet object in Forge Cloud
Deleting int `json:"deleting"`
// Error is the total number of error Subnet object in Forge Cloud
Error int `json:"error"`
}
APISubnetStats is a data structure to capture information about Subnet stats at the API layer
type APISubnetSummary ¶
type APISubnetSummary struct {
// ID is the unique UUID v4 identifier for the Subnet
ID string `json:"id"`
// Name of the Subnet, only lowercase characters, digits, hyphens and cannot begin/end with hyphen
Name string `json:"name"`
// Controller network Segment ID is the ID of the Site Controller Network Segment corresponding to the Subnet
ControllerNetworkSegmentID *string `json:"controllerNetworkSegmentId"`
// IPv4Prefix is the prefix of the network in CIDR notation
IPv4Prefix *string `json:"ipv4Prefix"`
// IPv6Prefix is the prefix of the network in CIDR notation
IPv6Prefix *string `json:"ipv6Prefix"`
// PrefixLength is the length of the network prefix of this Subnet
PrefixLength int `json:"prefixLength"`
// RoutingType is the routing type of the Subnet
RoutingType *string `json:"routingType"`
// Status is the status of the Subnet
Status string `json:"status"`
}
APISubnetSummary is the data structure to capture API summary of a Subnet
func NewAPISubnetSummary ¶
func NewAPISubnetSummary(dbs *cdbm.Subnet) *APISubnetSummary
NewAPISubnetSummary accepts a DB layer Subnet object returns an API layer object
type APISubnetUpdateRequest ¶
type APISubnetUpdateRequest struct {
// Name is the name of the Subnet
Name *string `json:"name"`
// Description is the description of the Subnet
Description *string `json:"description"`
}
APISubnetUpdateRequest is the data structure to capture user request to update a Subnet
func (APISubnetUpdateRequest) Validate ¶
func (sur APISubnetUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APITenant ¶
type APITenant struct {
// ID is the unique UUID v4 identifier for the Tenant
ID string `json:"id"`
// Org contains the name of the org the Tenant belongs to
Org string `json:"org"`
// OrgDisplayName contains the display name of the org the Tenant belongs to
OrgDisplayName *string `json:"orgDisplayName"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// UpdatedAt indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
Capabilities *APITenantCapabilities `json:"capabilities"`
}
APITenant is the data structure to capture API representation of a Tenant
func NewAPITenant ¶
NewAPITenant accepts a DB layer Tenant object returns an API layer object
type APITenantAccount ¶
type APITenantAccount struct {
// ID is the unique UUID v4 identifier for the TenantAccount
ID string `json:"id"`
// AccountNumber is the account number of the TenantAccount
AccountNumber string `json:"accountNumber"`
// InfrastructureProviderID is the ID of the InfrastructureProvider
InfrastructureProviderID string `json:"infrastructureProviderId"`
// InfrastructureProvider is the summary of the InfrastructureProvider
InfrastructureProvider *APIInfrastructureProviderSummary `json:"infrastructureProvider,omitempty"`
// InfrastructureProviderOrg is the org of the InfrastructureProvider
InfrastructureProviderOrg string `json:"infrastructureProviderOrg"`
// SubscriptionID is the ID of the subscription
SubscriptionID *string `json:"subscriptionId"`
// SubscriptionTier is the tier of the subscription
SubscriptionTier *string `json:"subscriptionTier"`
// TenantID is the ID of the Tenant
TenantID *string `json:"tenantId"`
// Tenant is the summary of the Tenant
Tenant *APITenantSummary `json:"tenant,omitempty"`
// TenantOrg is the org of the Tenant
TenantOrg string `json:"tenantOrg"`
// TenantContact is the the contact user for the tenant
TenantContact *APIUser `json:"tenantContact"`
// AllocationCount is the number of allocations for the TenantAccount
AllocationCount int `json:"allocationCount"`
// Status is the status of the TenantAccount
Status string `json:"status"`
// StatusHistory is the history of statuses for the TenantAccount
StatusHistory []APIStatusDetail `json:"statusHistory"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// UpdatedAt indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
}
APITenantAccount is the data structure to capture API representation of a TenantAccount
func NewAPITenantAccount ¶
func NewAPITenantAccount(dbta *cdbm.TenantAccount, dbsds []cdbm.StatusDetail, allocationCount int) *APITenantAccount
NewAPITenantAccount accepts a DB layer TenantAccount object returns an API layer object
type APITenantAccountCreateRequest ¶
type APITenantAccountCreateRequest struct {
// InfrastructureProviderID is the ID of the infrastructureProvider in the org
InfrastructureProviderID string `json:"infrastructureProviderId"`
// TenantID is the ID of the tenant
TenantID *string `json:"tenantId"`
// TenantOrg is the org of the tenant
TenantOrg *string `json:"tenantOrg"`
}
APITenantAccountCreateRequest is the data structure to capture user request to create a new Tenant
func (APITenantAccountCreateRequest) Validate ¶
func (tacr APITenantAccountCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APITenantAccountStats ¶
type APITenantAccountStats struct {
// Total is the total number of the TenantAccount object in Forge Cloud
Total int `json:"total"`
// Pending is the total number of pending TenantAccount object in Forge Cloud
Pending int `json:"pending"`
// Invited is the total number of provisioning TenantAccount object in Forge Cloud
Invited int `json:"invited"`
// Ready is the total number of ready TenantAccount object in Forge Cloud
Ready int `json:"ready"`
// Error is the total number of error TenantAccount object in Forge Cloud
Error int `json:"error"`
}
APITenantAccountStats is a data structure to capture information about a TenantAccount stats at the API layer
type APITenantAccountUpdateRequest ¶
type APITenantAccountUpdateRequest struct {
// TenantContactID is the ID of the requesting user
TenantContactID *string `json:"tenantContactId"`
}
APITenantAccountUpdateRequest is the data structure to capture user request to update a TenantAccount
func (APITenantAccountUpdateRequest) Validate ¶
func (taur APITenantAccountUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APITenantCapabilities ¶
type APITenantCapabilities struct {
TargetedInstanceCreation bool `json:"targetedInstanceCreation"`
}
APITenantCapabilities holds the model of tenant capabilities
type APITenantInstanceTypeAllocation ¶
type APITenantInstanceTypeAllocation struct {
// ID is the unique identifier for the Allocation
ID string `json:"id"`
// Name is the name of the Allocation
Name string `json:"name"`
// Total is the total number of machines in this allocation for the instance type
Total int `json:"total"`
}
APITenantInstanceTypeAllocation represents a single allocation's stats for an instance type
type APITenantInstanceTypeStats ¶
type APITenantInstanceTypeStats struct {
// ID is the unique identifier for the Tenant
ID string `json:"id"`
// Org is the organization name for the Tenant
Org string `json:"org"`
// OrgDisplayName is the display name for the Tenant's organization
OrgDisplayName string `json:"orgDisplayName"`
// InstanceTypes is the list of instance type stats for this tenant
InstanceTypes []APITenantInstanceTypeStatsEntry `json:"instanceTypes"`
}
APITenantInstanceTypeStats represents per-tenant instance type allocation stats
type APITenantInstanceTypeStatsEntry ¶
type APITenantInstanceTypeStatsEntry struct {
// ID is the unique identifier for the InstanceType
ID string `json:"id"`
// Name is the name of the InstanceType
Name string `json:"name"`
// Allocated is the number of Machines of this Instance Type allocated to this Tenant
Allocated int `json:"allocated"`
// UsedMachineStats captures the usage status of machines for this instance type within the tenant
UsedMachineStats APIMachineStatusBreakdown `json:"usedMachineStats"`
// MaxAllocatable is the number of Ready Machines of this Instance Type available for additional allocation to Tenants
MaxAllocatable int `json:"maxAllocatable"`
// Allocations is the list of individual allocations for this instance type within the tenant
Allocations []APITenantInstanceTypeAllocation `json:"allocations"`
}
APITenantInstanceTypeStatsEntry represents stats for a single instance type within a tenant
type APITenantStats ¶
type APITenantStats struct {
// Instance is the data structure to capture API representation of an Instance Stats associated with tenant
Instance APIInstanceStats `json:"instance"`
// Vpc is the data structure to capture API representation of a Vpc Stats associated with tenant
Vpc APIVpcStats `json:"vpc"`
// Subnet is the data structure to capture API representation of a Subnet Stats associated with tenant
Subnet APISubnetStats `json:"subnet"`
// TenantAccount is the data structure to capture API representation of a TenantAccount Stats associated with tenant
TenantAccount APITenantAccountStats `json:"tenantAccount"`
}
APITenantStats is the data structure to capture API representation of a Tenant Stats
type APITenantSummary ¶
type APITenantSummary struct {
// Org contains the name of the org this tenant belongs to
Org string `json:"org"`
// OrgDisplayName contains the display name of the org the Tenant belongs to
OrgDisplayName *string `json:"orgDisplayName"`
// Capabilities hold the capabilities, currently for use as tenant-level feature flagging
Capabilities *APITenantCapabilities `json:"capabilities"`
}
APITenantSummary is the data structure to capture API representation of a Tenant Summary
func NewAPITenantSummary ¶
func NewAPITenantSummary(dbtn *cdbm.Tenant) *APITenantSummary
NewAPITenantSummary accepts a DB layer APITenantSummary object returns an API layer object
type APITray ¶
type APITray struct {
ID string `json:"id"`
ComponentID string `json:"componentId"`
Type string `json:"type"`
Name string `json:"name"`
Manufacturer string `json:"manufacturer"`
Model string `json:"model"`
SerialNumber string `json:"serialNumber"`
Description string `json:"description"`
FirmwareVersion string `json:"firmwareVersion"`
PowerState string `json:"powerState"`
Position *APITrayPosition `json:"position"`
BMCs []*APIBMC `json:"bmcs"`
RackID string `json:"rackId"`
}
APITray is the API representation of a Tray (Component) from RLA
func NewAPITray ¶
NewAPITray creates an APITray from the RLA protobuf Component
type APITrayGetAllRequest ¶
type APITrayGetAllRequest struct {
SiteID string `query:"siteId"`
RackID *string `query:"rackId"`
RackName *string `query:"rackName"`
Type *string `query:"type"`
ComponentIDs []string `query:"componentId"`
IDs []string `query:"id"`
}
APITrayGetAllRequest captures query parameters for listing trays from RLA.
func (*APITrayGetAllRequest) QueryValues ¶
func (r *APITrayGetAllRequest) QueryValues() url.Values
QueryValues returns only the known query parameters as url.Values, suitable for deterministic workflow ID hashing without unknown param interference.
func (*APITrayGetAllRequest) ToProto ¶
func (r *APITrayGetAllRequest) ToProto() *rlav1.GetComponentsRequest
ToProto converts a validated APITrayGetAllRequest to an RLA GetComponentsRequest.
func (*APITrayGetAllRequest) Validate ¶
func (r *APITrayGetAllRequest) Validate() error
Validate checks field formats and enforces the RLA protobuf oneof constraints:
- rackId must be a valid UUID
- rackId and rackName are mutually exclusive (RackTarget.oneof identifier)
- rackId/rackName cannot be combined with id/componentId (OperationTargetSpec.oneof targets)
- componentId requires type (ExternalRef needs type)
- type must be one of the supported tray types
- each entry in IDs must be a valid UUID
type APITrayPosition ¶
type APITrayPosition struct {
SlotID int32 `json:"slotId"`
TrayIdx int32 `json:"trayIdx"`
HostID int32 `json:"hostId"`
}
APITrayPosition represents the position of a tray within a rack
func (*APITrayPosition) FromProto ¶
func (atp *APITrayPosition) FromProto(protoPosition *rlav1.RackPosition)
FromProto converts a proto RackPosition to an APITrayPosition
type APITrayValidateAllRequest ¶
type APITrayValidateAllRequest struct {
SiteID string `query:"siteId"`
RackID *string `query:"rackId"`
RackName *string `query:"rackName"`
Name []string `query:"name"`
Manufacturer []string `query:"manufacturer"`
Type *string `query:"type"`
ComponentIDs []string `query:"componentId"`
}
APITrayValidateAllRequest captures query parameters for validating trays.
func (*APITrayValidateAllRequest) QueryValues ¶
func (r *APITrayValidateAllRequest) QueryValues() url.Values
QueryValues returns only the known query parameters as url.Values.
func (*APITrayValidateAllRequest) ToFilters ¶
func (r *APITrayValidateAllRequest) ToFilters() []*rlav1.Filter
ToFilters converts the request's filter fields to RLA protobuf filters.
func (*APITrayValidateAllRequest) ToTargetSpec ¶
func (r *APITrayValidateAllRequest) ToTargetSpec() *rlav1.OperationTargetSpec
ToTargetSpec converts the request's targeting fields to an RLA OperationTargetSpec.
func (*APITrayValidateAllRequest) Validate ¶
func (r *APITrayValidateAllRequest) Validate() error
Validate checks constraints on the request parameters.
type APIUpdateFirmwareRequest ¶
type APIUpdateFirmwareRequest struct {
SiteID string `json:"siteId"`
Version *string `json:"version,omitempty"`
}
APIUpdateFirmwareRequest is the request body for firmware update operations
func (*APIUpdateFirmwareRequest) Validate ¶
func (r *APIUpdateFirmwareRequest) Validate() error
Validate validates the firmware update request
type APIUpdateFirmwareResponse ¶
type APIUpdateFirmwareResponse struct {
TaskIDs []string `json:"taskIds"`
}
APIUpdateFirmwareResponse is the API response for firmware update operations
func NewAPIUpdateFirmwareResponse ¶
func NewAPIUpdateFirmwareResponse(resp *rlav1.SubmitTaskResponse) *APIUpdateFirmwareResponse
NewAPIUpdateFirmwareResponse creates an APIUpdateFirmwareResponse from an RLA SubmitTaskResponse
func (*APIUpdateFirmwareResponse) FromProto ¶
func (r *APIUpdateFirmwareResponse) FromProto(resp *rlav1.SubmitTaskResponse)
FromProto converts an RLA SubmitTaskResponse to an APIUpdateFirmwareResponse
type APIUpdatePowerStateRequest ¶
type APIUpdatePowerStateRequest struct {
SiteID string `json:"siteId"`
State string `json:"state"`
}
APIUpdatePowerStateRequest is the request body for power control operations
func (*APIUpdatePowerStateRequest) Validate ¶
func (r *APIUpdatePowerStateRequest) Validate() error
Validate validates the power control request
type APIUpdatePowerStateResponse ¶
type APIUpdatePowerStateResponse struct {
TaskIDs []string `json:"taskIds"`
}
APIUpdatePowerStateResponse is the API response for power control operations
func NewAPIUpdatePowerStateResponse ¶
func NewAPIUpdatePowerStateResponse(resp *rlav1.SubmitTaskResponse) *APIUpdatePowerStateResponse
NewAPIUpdatePowerStateResponse creates an APIUpdatePowerStateResponse from an RLA SubmitTaskResponse
func (*APIUpdatePowerStateResponse) FromProto ¶
func (r *APIUpdatePowerStateResponse) FromProto(resp *rlav1.SubmitTaskResponse)
FromProto converts an RLA SubmitTaskResponse to an APIUpdatePowerStateResponse
type APIUser ¶
type APIUser struct {
// ID is the unique UUID v4 identifier of the user in Forge Cloud
ID string `json:"id"`
// FirstName denotes the first name of the user
FirstName *string `json:"firstName"`
// LastName denotes the surname of the user
LastName *string `json:"lastName"`
// Email contains the email used by the user to register with NGC
Email *string `json:"email"`
// Created indicates the ISO datetime string for when the user was created in Forge
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the user was last updated in Forge
Updated time.Time `json:"updated"`
}
APIUser is a data structure to capture information about user at the API layer
func NewAPIUserFromDBUser ¶
NewAPIUserFromDBUser creates and returns a new APIUser object
type APIVpc ¶
type APIVpc struct {
// ID is the unique UUID v4 identifier of the VPC in Forge Cloud
ID string `json:"id"`
// Name is the name of the VPC
Name string `json:"name"`
// Description is the description of the VPC
Description *string `json:"description"`
// Org is the NGC organization ID of the infrastructure provider and the org the VPC belongs to
Org string `json:"org"`
// InfrastructureProviderID is the ID of the infrastructure provider who owns the site
InfrastructureProviderID *string `json:"infrastructureProviderId"`
// InfrastructureProvider is the summary of the InfrastructureProvider
InfrastructureProvider *APIInfrastructureProviderSummary `json:"infrastructureProvider,omitempty"`
// TenantID is the ID of the Tenant
TenantID *string `json:"tenantId"`
// Tenant is the summary of the tenant
Tenant *APITenantSummary `json:"tenant,omitempty"`
// SiteID is the ID of the Site
SiteID *string `json:"siteId"`
// Site is the summary of the site
Site *APISiteSummary `json:"site,omitempty"`
// NetworkVirtualizationType is a VPC virtualization type
NetworkVirtualizationType *string `json:"networkVirtualizationType"`
// ControllerVpcID is the ID of the corresponding VPC in Site Controller
ControllerVpcID *string `json:"controllerVpcId"`
// Labels is VPC labels specified by user
Labels map[string]string `json:"labels"`
// NVLinkLogicalPartitionID is the ID of the NVLinkLogicalPartition
NVLinkLogicalPartitionID *string `json:"nvLinkLogicalPartitionId"`
// NVLinkLogicalPartitionSummary is the summary of the NVLinkLogicalPartition
NVLinkLogicalPartitionSummary *APINVLinkLogicalPartitionSummary `json:"nvLinkLogicalPartitionSummary,omitempty"`
// NetworkSecurityGroupID is the ID of attached NSG, if any
NetworkSecurityGroupID *string `json:"networkSecurityGroupId"`
// NetworkSecurityGroup holds the summary for attached NSG, if requested via includeRelation
NetworkSecurityGroup *APINetworkSecurityGroupSummary `json:"networkSecurityGroup,omitempty"`
// NetworkSecurityGroupPropagationDetails is the propagation details for the attched NSG, if any
NetworkSecurityGroupPropagationDetails *APINetworkSecurityGroupPropagationDetails `json:"networkSecurityGroupPropagationDetails"`
// RoutingProfile is the applied routing profile for the VPC, when known.
RoutingProfile *string `json:"routingProfile"`
// RequestedVni is the explicitly requested VPC VNI at creation time _if_ one was requested.
RequestedVni *int `json:"requestedVni"`
// Vni is the active/actual VNI of the VPC, regardless of whether it was
// explicitly requested or auto-allocated.
Vni *int `json:"vni"`
// Status is the status of the VPC
Status string `json:"status"`
// StatusHistory is the status detail records for the VPC over time
StatusHistory []APIStatusDetail `json:"statusHistory"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the VPC was last updated
Updated time.Time `json:"updated"`
}
APIVpc is a data structure to capture information about VPC at the API layer
type APIVpcCreateRequest ¶
type APIVpcCreateRequest struct {
// ID is the user-specified UUID of the VPC.
ID *uuid.UUID `json:"id"`
// Name is the name of the VPC
Name string `json:"name"`
// Description is the description of the VPC
Description *string `json:"description"`
// SiteID is the ID of the Site
SiteID string `json:"siteId"`
// NetworkVirtualizationType is a VPC virtualization type
NetworkVirtualizationType *string `json:"networkVirtualizationType"`
// Labels is a key value objects
Labels map[string]string `json:"labels"`
// NetworkSecurityGroupID is the ID if a desired
// NSG to attach to the VPC
NetworkSecurityGroupID *string `json:"networkSecurityGroupId"`
// NVLinkLogicalPartitionID is the ID of the NVLinkLogicalPartition
NVLinkLogicalPartitionID *string `json:"nvLinkLogicalPartitionId"`
// Vni is an optional, explicitly requested VPC VNI.
// The request will be rejected by the site if the VNI
// is not within a VNI range allowed for explicit requests.
Vni *int `json:"vni"`
// RoutingProfile specifies the routing profile for the VPC.
// This is only supported when `networkVirtualizationType` is `FNN`, or when
// `networkVirtualizationType` is omitted and the Site has native networking enabled.
// This requires the Tenant to have elevated privileges. Current accepted values
// are `privileged-internal`, `internal`, and `external`.
RoutingProfile *string `json:"routingProfile"`
}
APIVpcCreateRequest captures the request data for creating a new VPC
func (APIVpcCreateRequest) Validate ¶
func (ascr APIVpcCreateRequest) Validate() error
Validate ensure the values passed in create request are acceptable
type APIVpcPeering ¶ added in v1.2.0
type APIVpcPeering struct {
// ID is the unique UUID v4 identifier of the VPC peering in Forge Cloud
ID string `json:"id"`
// Vpc1ID is the ID of the first VPC in the peering
Vpc1ID string `json:"vpc1Id"`
// Vpc1 is the summary of the first VPC in the peering
Vpc1 *APIVpcSummary `json:"vpc1,omitempty"`
// Vpc2ID is the ID of the second VPC in the peering
Vpc2ID string `json:"vpc2Id"`
// Vpc2 is the summary of the second VPC in the peering
Vpc2 *APIVpcSummary `json:"vpc2,omitempty"`
// SiteID is the ID of the Site where the peering exists
SiteID string `json:"siteId"`
// Site is the summary of the site
Site *APISiteSummary `json:"site,omitempty"`
// IsMultiTenant indicates if this is a multi-tenant peering
IsMultiTenant bool `json:"isMultiTenant"`
// Status is the status of the VPC peering
Status string `json:"status"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// Updated indicates the ISO datetime string for when the VPC peering was last updated
Updated time.Time `json:"updated"`
}
APIVpcPeering represents a VPC peering connection
func NewAPIVpcPeering ¶ added in v1.2.0
func NewAPIVpcPeering(dbVpcPeering cdbm.VpcPeering) APIVpcPeering
NewAPIVpcPeering creates a new APIVpcPeering from a database VPC peering model
type APIVpcPeeringCreateRequest ¶ added in v1.2.0
type APIVpcPeeringCreateRequest struct {
// The order of VPCs is not important, the VPC peering is bidirectional.
// Vpc1ID is the ID of one VPC in the peering
Vpc1ID string `json:"vpc1Id"`
// Vpc2ID is the ID of the other VPC in the peering
Vpc2ID string `json:"vpc2Id"`
// SiteID is the ID of the Site where the peering exists
SiteID string `json:"siteId"`
}
APIVpcPeeringCreateRequest captures the request data for creating a new VPC peering
func (APIVpcPeeringCreateRequest) Validate ¶ added in v1.2.0
func (vpcr APIVpcPeeringCreateRequest) Validate() error
Validate ensures the values passed in create request are acceptable
type APIVpcPeeringSummary ¶ added in v1.2.0
type APIVpcPeeringSummary struct {
// ID is the unique UUID v4 identifier of the VPC peering in Forge Cloud
ID string `json:"id"`
// Vpc1ID is the ID of the first VPC in the peering
Vpc1ID string `json:"vpc1Id"`
// Vpc2ID is the ID of the second VPC in the peering
Vpc2ID string `json:"vpc2Id"`
// IsMultiTenant indicates if this is a multi-tenant peering
IsMultiTenant bool `json:"isMultiTenant"`
// Status is the status of the VPC peering
Status string `json:"status"`
}
APIVpcPeeringSummary represents a summary of a VPC peering connection
func NewAPIVpcPeeringSummary ¶ added in v1.2.0
func NewAPIVpcPeeringSummary(dbVpcPeering *cdbm.VpcPeering) *APIVpcPeeringSummary
NewAPIVpcPeeringSummary creates a new APIVpcPeeringSummary from a database VPC peering model
type APIVpcPrefix ¶
type APIVpcPrefix struct {
// ID is the unique UUID v4 identifier for the VpcPrefix
ID string `json:"id"`
// Name is the name of the VpcPrefix
Name string `json:"name"`
// SiteID is the ID of the Site containing the VpcPrefix
SiteID string `json:"siteId"`
// Site is the summary of the Site
Site *APISiteSummary `json:"site,omitempty"`
// VpcID is the ID of the Vpc containing the VpcPrefix
VpcID string `json:"vpcId"`
// Vpc is the summary of the VPC
Vpc *APIVpcSummary `json:"vpc,omitempty"`
// IPBlockID is the derived IPBlockId for the tenant from an allocation
IPBlockID *string `json:"ipBlockId"`
// IPBlock is the summary of the IPBlock
IPBlock *APIIPBlockSummary `json:"ipBlock,omitempty"`
// Prefix includes both IP address and the length of the network, for example: 192.168.1.0/24
Prefix *string `json:"prefix"`
// PrefixLength is the length of the network prefix
PrefixLength int `json:"prefixLength"`
// Status is the status of the VpcPrefix
Status string `json:"status"`
// StatusHistory is the history of statuses for the VpcPrefix
StatusHistory []APIStatusDetail `json:"statusHistory"`
// CreatedAt indicates the ISO datetime string for when the entity was created
Created time.Time `json:"created"`
// UpdatedAt indicates the ISO datetime string for when the entity was last updated
Updated time.Time `json:"updated"`
}
APIVpcPrefix is the data structure to capture API representation of a VpcPrefix
func NewAPIVpcPrefix ¶
func NewAPIVpcPrefix(dbvp *cdbm.VpcPrefix, dbsds []cdbm.StatusDetail) *APIVpcPrefix
NewAPIVpcPrefix accepts a DB layer objects and returns an API layer object
type APIVpcPrefixCreateRequest ¶
type APIVpcPrefixCreateRequest struct {
// Name is the name of the VpcPrefix
Name string `json:"name"`
// VpcID is the ID of the vpc containing the VpcPrefix
VpcID string `json:"vpcId"`
// IPBlockID is the derived ipBlockId for the tenant from an allocation
IPBlockID *string `json:"ipBlockId"`
// PrefixLength is the length of the prefix
PrefixLength int `json:"prefixLength"`
}
APIVpcPrefixCreateRequest is the data structure to capture user request to create a new VpcPrefix
func (APIVpcPrefixCreateRequest) Validate ¶
func (vpcr APIVpcPrefixCreateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIVpcPrefixSummary ¶
type APIVpcPrefixSummary struct {
// ID is the unique UUID v4 identifier for the VpcPrefix
ID string `json:"id"`
// Name of the VpcPrefix, only lowercase characters, digits, hyphens and cannot begin/end with hyphen
Name string `json:"name"`
// Prefix is the prefix of the network in CIDR notation
Prefix *string `json:"prefix"`
// PrefixLength is the length of the network prefix of this VpcPrefix
PrefixLength int `json:"prefixLength"`
}
APIVpcPrefixSummary is the data structure to capture API summary of a VpcPrefix
func NewAPIVpcPrefixSummary ¶
func NewAPIVpcPrefixSummary(dbvp *cdbm.VpcPrefix) *APIVpcPrefixSummary
NewAPIVpcPrefixSummary accepts a DB layer VpcPrefix object returns an API layer object
type APIVpcPrefixUpdateRequest ¶
type APIVpcPrefixUpdateRequest struct {
// Name is the name of the VpcPrefix
Name *string `json:"name"`
// IPBlockID is the derived ipBlockId for the tenant from an allocation
IPBlockID *string `json:"ipBlockId"`
// PrefixLength is the length of the prefix
PrefixLength *int `json:"prefixLength"`
}
APIVpcPrefixUpdateRequest is the data structure to capture user request to update a VpcPrefix
func (APIVpcPrefixUpdateRequest) Validate ¶
func (vpur APIVpcPrefixUpdateRequest) Validate() error
Validate ensure the values passed in request are acceptable
type APIVpcStats ¶
type APIVpcStats struct {
// Total is the total number of the VPC object in Forge Cloud
Total int `json:"total"`
// Pending is the total number of pending VPC object in Forge Cloud
Pending int `json:"pending"`
// Provisioning is the total number of provisioning VPC object in Forge Cloud
Provisioning int `json:"provisioning"`
// Ready is the total number of ready VPC object in Forge Cloud
Ready int `json:"ready"`
// Deleting is the total number of deleting VPC object in Forge Cloud
Deleting int `json:"deleting"`
// Error is the total number of error VPC object in Forge Cloud
Error int `json:"error"`
}
APIVpcStats is a data structure to capture information about VPC stats at the API layer
type APIVpcSummary ¶
type APIVpcSummary struct {
// ID is the unique UUID v4 identifier of the VPC in Forge Cloud
ID string `json:"id"`
// Name of the Vpc, only lowercase characters, digits, hyphens and cannot begin/end with hyphen
Name string `json:"name"`
// ControllerVpcID is the ID of the corresponding VPC in Site Controller
ControllerVpcID *string `json:"controllerVpcId"`
// Network virtualization type is a VPC virtualization type
NetworkVirtualizationType *string `json:"networkVirtualizationType"`
// Status is the status of the VPC
Status string `json:"status"`
}
APIVpcSummary is the data structure to capture API representation of a Vpc Summary
func NewAPIVpcSummary ¶
func NewAPIVpcSummary(dbVpc *cdbm.Vpc) *APIVpcSummary
NewAPIVpcSummary accepts a DB layer APIVpcSummary object returns an API layer object
type APIVpcUpdateRequest ¶
type APIVpcUpdateRequest struct {
// Name is the name of the VPC
Name *string `json:"name"`
// Description is the description of the VPC
Description *string `json:"description"`
// Labels is a key value objects
Labels map[string]string `json:"labels"`
// NetworkSecurityGroupID is the ID if a desired
// NSG to attach to the VPC
NetworkSecurityGroupID *string `json:"networkSecurityGroupId"`
// NVLinkLogicalPartitionID is the ID of the NVLinkLogicalPartition
NVLinkLogicalPartitionID *string `json:"nvLinkLogicalPartitionId"`
}
APIVpcUpdateRequest captures the request data for updating a new VPC
func (APIVpcUpdateRequest) Validate ¶
func (asur APIVpcUpdateRequest) Validate() error
Validate ensure the values passed in update request are acceptable
type APIVpcVirtualizationUpdateRequest ¶
type APIVpcVirtualizationUpdateRequest struct {
// NetworkVirtualizationType is a VPC virtualization type
NetworkVirtualizationType string `json:"networkVirtualizationType"`
}
APIVpcVirtualizationUpdateRequest captures the request data for updating virtualization type for a give VPC
type DeprecatedEntity ¶
type DeprecatedEntity struct {
OldValue string
NewValue *string
Type string
TakeActionBy time.Time
}
DeprecatdEntity denotes an entity that is being deprecated
type RackFilter ¶
type RackFilter struct {
Names []string `json:"names,omitempty"`
}
RackFilter specifies which racks to target in a batch operation. If nil or empty, the operation targets all racks in the site.
func (*RackFilter) ToTargetSpec ¶
func (f *RackFilter) ToTargetSpec() *rlav1.OperationTargetSpec
ToTargetSpec converts the filter to an RLA OperationTargetSpec. Handles nil receiver gracefully (targets all racks).
type SSHKeyGroupsSummaryDeprecated ¶
type SSHKeyGroupsSummaryDeprecated struct {
SSHKeyGroups []APISSHKeyGroupSummary
}
SSHKeyGroupsSummaryDeprecated ensures we keep returning empty array until deprecation time even with omitempty
func (*SSHKeyGroupsSummaryDeprecated) MarshalJSON ¶
func (skgsd *SSHKeyGroupsSummaryDeprecated) MarshalJSON() ([]byte, error)
MarshalJSON provides custom JSON marshaling for SSHKeyGroupsSummaryDeprecated
func (*SSHKeyGroupsSummaryDeprecated) UnmarshalJSON ¶
func (skgsd *SSHKeyGroupsSummaryDeprecated) UnmarshalJSON(data []byte) error
UnmarshalJSON provides custom JSON unmarshaling for SSHKeyGroupsSummaryDeprecated
type TrayFilter ¶
type TrayFilter struct {
RackID *string `json:"rackId,omitempty"`
RackName *string `json:"rackName,omitempty"`
Type *string `json:"type,omitempty"`
ComponentIDs []string `json:"componentIds,omitempty"`
IDs []string `json:"ids,omitempty"`
}
TrayFilter specifies which trays to target in a batch operation. If nil or empty, the operation targets all trays in the site.
func (*TrayFilter) ToTargetSpec ¶
func (f *TrayFilter) ToTargetSpec() *rlav1.OperationTargetSpec
ToTargetSpec converts the filter to an RLA OperationTargetSpec. Handles nil receiver gracefully (targets all trays).
func (*TrayFilter) Validate ¶
func (f *TrayFilter) Validate() error
Validate checks the tray filter fields.
Source Files
¶
- allocation.go
- allocationconstraint.go
- audit_entry.go
- deprecation.go
- dpuextensionservice.go
- dpuextensionservicedeployment.go
- error.go
- expectedmachine.go
- expectedpowershelf.go
- expectedswitch.go
- fabric.go
- firmware.go
- health.go
- infinibandinterface.go
- infinibandpartition.go
- infrastructureprovider.go
- instance.go
- instancetype.go
- interface.go
- ipblock.go
- machine.go
- machinecapability.go
- machineinstancetype.go
- machineinterface.go
- machinevalidation.go
- metadata.go
- networksecuritygroup.go
- nvlinkinterface.go
- nvlinklogicalpartition.go
- operatingsystem.go
- operatingsystemsiteassociation.go
- power.go
- rack.go
- serviceaccount.go
- site.go
- sku.go
- sshkey.go
- sshkeyassociation.go
- sshkeygroup.go
- sshkeygroupsiteassociation.go
- stats.go
- statusdetail.go
- subnet.go
- task.go
- tenant.go
- tenantaccount.go
- tray.go
- user.go
- vpc.go
- vpcpeering.go
- vpcprefix.go