Documentation
¶
Overview ¶
Package models provides data structures for toolkit models.
Index ¶
- type BaseModel
- type ConsolePropertyDefinition
- type ConsolePropertyDefinitionGroup
- type ConsolePropertyRegionalOverride
- func (o ConsolePropertyRegionalOverride) FilterableFields() []string
- func (o ConsolePropertyRegionalOverride) GetName() string
- func (o ConsolePropertyRegionalOverride) GetRegions() []string
- func (o ConsolePropertyRegionalOverride) GetValue() string
- func (o ConsolePropertyRegionalOverride) IsFaulty() bool
- type ConsolePropertyTenancyOverride
- type DACShape
- type DACShapeConfigs
- type Dataset
- type DedicatedAICluster
- func (n DedicatedAICluster) FilterableFields() []string
- func (n DedicatedAICluster) GetName() string
- func (n DedicatedAICluster) IsFaulty() bool
- func (n DedicatedAICluster) OCID(realm, region string) string
- func (n DedicatedAICluster) OwnerState() string
- func (n DedicatedAICluster) TenancyOCID(realm string) string
- func (n DedicatedAICluster) Usage() string
- type Definition
- type DefinitionOverride
- type Environment
- type Faulty
- type Filterable
- type GPUNode
- type GPUPool
- type ImportedModel
- type ItemKey
- type LimitDefinition
- type LimitDefinitionGroup
- type LimitRange
- type LimitRegionalOverride
- type LimitTenancyOverride
- type Metadata
- type ModelArtifact
- type NamedFilterable
- type NamedItem
- type PropertyDefinition
- type PropertyDefinitionGroup
- type PropertyRegionalOverride
- type PropertyTenancyOverride
- type RealmedID
- type RealmedTenancyID
- type Region
- type ScopedItemKey
- type ServiceTenancy
- type TenancyOverride
- type TenancyOverrideGroup
- type Tenant
- type TenantMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct {
Capabilities []string `json:"capabilities"`
InternalName string `json:"internalName"`
Name string `json:"name"`
DisplayName string `json:"displayName"`
Type string `json:"type"`
Version string `json:"version"`
Vendor string `json:"vendor"`
MaxTokens int `json:"maxTokens"`
VaultKey string `json:"vaultKey"`
IsExperimental bool `json:"isExperimental"`
IsInternal bool `json:"isInternal"`
LifeCyclePhase string `json:"lifeCyclePhase"`
DeprecatedDate string `json:"deprecatedDate,omitempty"`
OnDemandRetiredDate string `json:"onDemandRetiredDate,omitempty"`
DedicatedRetiredDate string `json:"dedicatedRetiredDate,omitempty"`
IsImageTextToText bool `json:"isImageTextToText"`
DACShapeConfigs *DACShapeConfigs `json:"dacShapeConfigs,omitempty"`
Runtime string `json:"runtime"`
Replicas int `json:"replicas"`
Status string `json:"status"`
ParameterSize string `json:"parameterSize"`
StorageURI string `json:"storageUri,omitempty"`
}
BaseModel represents a base model with its configuration and metadata.
func (BaseModel) DefaultDACShape ¶ added in v0.6.0
DefaultDACShape returns the default DAC shape for the base model, or nil if none is marked default. If multiple shapes are marked default (a malformed config), the first one in declaration order is returned.
The returned pointer aliases an element of the underlying CompatibleDACShapes slice, which is reached through the *DACShapeConfigs pointer field. Mutating the pointed-to DACShape will be visible to every BaseModel value that shares the same DACShapeConfigs. Treat the result as read-only.
func (BaseModel) FilterableFields ¶ added in v0.6.0
FilterableFields returns filterable fields for the base model.
type ConsolePropertyDefinition ¶
type ConsolePropertyDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
Value string `json:"value"`
}
ConsolePropertyDefinition represents a console property definition.
func (ConsolePropertyDefinition) FilterableFields ¶ added in v0.6.0
func (c ConsolePropertyDefinition) FilterableFields() []string
FilterableFields returns filterable fields for the console property definition.
func (ConsolePropertyDefinition) GetDescription ¶
func (c ConsolePropertyDefinition) GetDescription() string
GetDescription returns the description of the console property definition.
func (ConsolePropertyDefinition) GetName ¶
func (c ConsolePropertyDefinition) GetName() string
GetName returns the name of the console property definition.
func (ConsolePropertyDefinition) GetValue ¶
func (c ConsolePropertyDefinition) GetValue() string
GetValue returns the value of the console property definition.
func (ConsolePropertyDefinition) IsFaulty ¶ added in v0.1.4
func (c ConsolePropertyDefinition) IsFaulty() bool
IsFaulty returns false by default for ConsolePropertyDefinition.
type ConsolePropertyDefinitionGroup ¶
type ConsolePropertyDefinitionGroup struct {
Name string `json:"service"`
Values []ConsolePropertyDefinition `json:"values"`
}
ConsolePropertyDefinitionGroup groups console property definitions by service name.
type ConsolePropertyRegionalOverride ¶
type ConsolePropertyRegionalOverride struct {
Realms []string `json:"realms"`
Name string `json:"name"`
Regions []string `json:"regions"`
Service string `json:"service"`
Values []struct {
Value string `json:"value"`
} `json:"values"`
}
ConsolePropertyRegionalOverride represents a regional override for a console property.
func (ConsolePropertyRegionalOverride) FilterableFields ¶ added in v0.6.0
func (o ConsolePropertyRegionalOverride) FilterableFields() []string
FilterableFields returns filterable fields for the console property regional override.
func (ConsolePropertyRegionalOverride) GetName ¶
func (o ConsolePropertyRegionalOverride) GetName() string
GetName returns the name of the console property regional override.
func (ConsolePropertyRegionalOverride) GetRegions ¶
func (o ConsolePropertyRegionalOverride) GetRegions() []string
GetRegions returns the regions of the console property regional override.
func (ConsolePropertyRegionalOverride) GetValue ¶
func (o ConsolePropertyRegionalOverride) GetValue() string
GetValue returns the value of the console property regional override.
func (ConsolePropertyRegionalOverride) IsFaulty ¶ added in v0.1.4
func (o ConsolePropertyRegionalOverride) IsFaulty() bool
IsFaulty returns false by default for ConsolePropertyRegionalOverride.
type ConsolePropertyTenancyOverride ¶
type ConsolePropertyTenancyOverride struct {
TenantName string `json:"tenant"`
TenantID string `json:"tenant_id"`
ConsolePropertyRegionalOverride
}
ConsolePropertyTenancyOverride represents a tenancy override for a console property. See LimitTenancyOverride for the TenantName / TenantID convention.
func (ConsolePropertyTenancyOverride) FilterableFields ¶ added in v0.6.0
func (o ConsolePropertyTenancyOverride) FilterableFields() []string
FilterableFields returns filterable fields for the console property tenancy override.
func (ConsolePropertyTenancyOverride) GetTenantID ¶
func (o ConsolePropertyTenancyOverride) GetTenantID() string
GetTenantID returns the tenant ID of the console property tenancy override.
func (ConsolePropertyTenancyOverride) IsFaulty ¶ added in v0.1.4
func (o ConsolePropertyTenancyOverride) IsFaulty() bool
IsFaulty returns false by default for ConsolePropertyTenancyOverride.
func (*ConsolePropertyTenancyOverride) SetTenantName ¶ added in v0.6.0
func (o *ConsolePropertyTenancyOverride) SetTenantName(name string)
SetTenantName stamps the tenant short name onto the override. See LimitTenancyOverride.SetTenantName.
type DACShape ¶
type DACShape struct {
Name string `json:"name"`
QuotaUnit int `json:"quotaUnit"`
Default bool `json:"default"`
}
DACShape represents a DAC shape.
type DACShapeConfigs ¶ added in v0.6.0
type DACShapeConfigs struct {
CompatibleDACShapes []DACShape `json:"compatibleDACShapes"`
}
DACShapeConfigs holds compatible DAC shapes.
type Dataset ¶
type Dataset struct {
LimitDefinitionGroup LimitDefinitionGroup
ConsolePropertyDefinitionGroup ConsolePropertyDefinitionGroup
PropertyDefinitionGroup PropertyDefinitionGroup
ConsolePropertyTenancyOverrideMap map[string][]ConsolePropertyTenancyOverride
LimitTenancyOverrideMap map[string][]LimitTenancyOverride
PropertyTenancyOverrideMap map[string][]PropertyTenancyOverride
ConsolePropertyRegionalOverrides []ConsolePropertyRegionalOverride
LimitRegionalOverrides []LimitRegionalOverride
PropertyRegionalOverrides []PropertyRegionalOverride
Tenants []Tenant
BaseModels []BaseModel
ImportedModelMap map[string][]ImportedModel
ModelArtifactMap map[string][]ModelArtifact
Environments []Environment
ServiceTenancies []ServiceTenancy
GPUPools []GPUPool
GPUNodeMap map[string][]GPUNode
DedicatedAIClusterMap map[string][]DedicatedAICluster
}
Dataset holds all loaded data for the toolkit.
func (*Dataset) ResetRealmScopedFields ¶ added in v0.6.0
func (d *Dataset) ResetRealmScopedFields()
ResetRealmScopedFields resets all realm-scoped fields to nil.
func (*Dataset) SetDedicatedAIClusterMap ¶
func (d *Dataset) SetDedicatedAIClusterMap(m map[string][]DedicatedAICluster)
SetDedicatedAIClusterMap sets the dedicated AI cluster map using tenant suffixes.
func (*Dataset) SetImportedModelMap ¶ added in v0.6.0
func (d *Dataset) SetImportedModelMap(m map[string][]ImportedModel)
SetImportedModelMap sets the imported model map using tenant suffixes.
type DedicatedAICluster ¶
type DedicatedAICluster struct {
Name string `json:"name"`
Status string `json:"status"`
TenantID string `json:"tenantId"`
Type string `json:"type,omitempty"`
UnitShape string `json:"unitShape,omitempty"`
Size int `json:"size,omitempty"`
Profile string `json:"profile,omitempty"`
Owner *Tenant `json:"owner,omitempty"`
ModelName string `json:"modelName,omitempty"`
TotalReplicas int `json:"totalReplicas"`
IdleReplicas int `json:"idleReplicas"`
Age string `json:"age"`
}
DedicatedAICluster represents a dedicated AI cluster resource.
func (DedicatedAICluster) FilterableFields ¶ added in v0.6.0
func (n DedicatedAICluster) FilterableFields() []string
FilterableFields returns filterable fields for the dedicated AI cluster.
func (DedicatedAICluster) GetName ¶
func (n DedicatedAICluster) GetName() string
GetName returns the name of the dedicated AI cluster.
func (DedicatedAICluster) IsFaulty ¶ added in v0.1.4
func (n DedicatedAICluster) IsFaulty() bool
IsFaulty returns true if the cluster status is "fail" or "failed".
func (DedicatedAICluster) OCID ¶ added in v0.6.0
func (n DedicatedAICluster) OCID(realm, region string) string
OCID returns the full OCID for the DedicatedAICluster, built from realm + region + the stored Name suffix.
func (DedicatedAICluster) OwnerState ¶ added in v0.6.0
func (n DedicatedAICluster) OwnerState() string
OwnerState returns the state of the owner (internal/external) for the dedicated AI cluster.
func (DedicatedAICluster) TenancyOCID ¶ added in v0.6.0
func (n DedicatedAICluster) TenancyOCID(realm string) string
TenancyOCID returns the full tenancy OCID for the DedicatedAICluster, built from realm + the stored TenantID suffix.
func (DedicatedAICluster) Usage ¶ added in v0.6.0
func (n DedicatedAICluster) Usage() string
Usage returns the usage percentage as a string for the dedicated AI cluster.
type Definition ¶
type Definition interface {
NamedFilterable
GetDescription() string
GetValue() string
}
Definition represents a definition item with description and value.
type DefinitionOverride ¶
type DefinitionOverride interface {
NamedFilterable
GetRegions() []string
GetValue() string
}
DefinitionOverride represents a definition override with regions and value.
type Environment ¶
Environment represents a deployment environment.
func (Environment) Equals ¶
func (e Environment) Equals(o Environment) bool
Equals returns true if the environment is equal to another environment.
func (Environment) FilterableFields ¶ added in v0.6.0
func (e Environment) FilterableFields() []string
FilterableFields returns filterable fields for the environment.
func (Environment) GetName ¶
func (e Environment) GetName() string
GetName returns the name of the environment.
func (Environment) IsFaulty ¶ added in v0.1.4
func (e Environment) IsFaulty() bool
IsFaulty returns false by default for Environment.
func (Environment) KubeContext ¶ added in v0.6.0
func (e Environment) KubeContext() string
KubeContext returns the Kubernetes context string for the environment.
type Faulty ¶ added in v0.1.4
type Faulty interface {
IsFaulty() bool
}
Faulty marks an item that can be checked for faults.
type Filterable ¶
type Filterable interface {
FilterableFields() []string
}
Filterable represents an item that can be filtered by fields.
type GPUNode ¶ added in v0.6.0
type GPUNode struct {
Name string `json:"name"`
InstanceType string `json:"instanceType"`
NodePool string `json:"poolName"`
CompartmentID string `json:"compartmentId"`
ID string `json:"id"`
Allocatable int `json:"allocatable"`
Allocated int `json:"allocated"`
IsReady bool `json:"isReady"`
IsSchedulingDisabled bool `json:"isSchedulingDisabled"` // true if node is cordoned
Age string `json:"age"`
Issues []string `json:"issues"`
// contains filtered or unexported fields
}
GPUNode represents a GPU node.
func (GPUNode) FilterableFields ¶ added in v0.6.0
FilterableFields returns filterable fields for the GPU node.
func (GPUNode) IsFaulty ¶ added in v0.6.0
IsFaulty returns true if the node is cordoned, missing GPUs, unhealthy, or not ready.
type GPUPool ¶ added in v0.6.0
type GPUPool struct {
ID string `json:"id"`
Name string `json:"name"`
Shape string `json:"shape"`
Size int `json:"size"`
ActualSize int `json:"actualSize"`
Status string `json:"status"`
IsOkeManaged bool `json:"isOkeManaged"`
CapacityType string `json:"capacityType"`
AvailabilityDomain string `json:"availabilityDomain"`
}
GPUPool represents a pool of GPUs.
func (GPUPool) FilterableFields ¶ added in v0.6.0
FilterableFields returns filterable fields for the GPU pool.
type ImportedModel ¶ added in v0.6.0
type ImportedModel struct {
BaseModel
Namespace string `json:"namespace,omitempty"`
TenantID string `json:"tenantId"`
Owner *Tenant `json:"owner,omitempty"`
}
ImportedModel is a tenant-owned base model. Two sources feed this category:
- Namespaced ome.io BaseModel CRs (across all namespaces) — the `Namespace` field carries the originating namespace.
- Cluster-scoped ClusterBaseModel CRs carrying a `tenancy-id` label — `Namespace` is empty.
Every item is grouped by tenant, matching the DedicatedAICluster pattern. Identity fields:
- `TenantID` is the `tenancy-id` label value (the OCID short-name suffix, not the full OCID), or `"UNKNOWN_TENANCY"` for orphans (namespaced CRs missing the label, which is a config error). Same shape as DedicatedAICluster.TenantID. This is the authoritative tenant key for grouping and lookups; use GetTenantID(realm) to render the full OCID.
- `Owner` is a resolved pointer into Dataset.Tenants, set by SetImportedModelMap when the OCID suffix matches a known tenant. Nil for orphans or when the tenant isn't in the realm's config. Same shape as DedicatedAICluster.Owner.
- `Namespace` is the K8s scope; empty for cluster-scoped CRs, non-empty for namespaced CRs. Orthogonal to tenant identity (a namespaced CR may carry a tenancy-id label that disagrees with the namespace; we trust the label).
Distinct from BaseModel (the shared / public catalog). The embedded BaseModel fields are JSON-inlined at the top level so consumers can reach `name`, `displayName`, `vendor`, etc. with the same paths they use for BaseModel; `namespace`, `tenantId`, and `owner` sit alongside.
func (ImportedModel) FilterableFields ¶ added in v0.6.0
func (m ImportedModel) FilterableFields() []string
FilterableFields extends BaseModel's filterable set with the imported-specific identity fields so `--filter namespace-x` or `--filter ocid1.tenancy.…` work without users knowing the source.
func (ImportedModel) OCID ¶ added in v0.6.0
func (m ImportedModel) OCID(realm, region string) string
OCID returns the full OCID for the ImportedModel by combining the realm and region with the Name suffix. Mirrors DedicatedAICluster.OCID; PHX/IAD regions are normalized to their short codes the same way.
func (ImportedModel) TenancyOCID ¶ added in v0.6.0
func (m ImportedModel) TenancyOCID(realm string) string
TenancyOCID returns the full tenancy OCID for the ImportedModel by combining the realm with the `tenancy-id` label suffix stored in TenantID. Mirrors DedicatedAICluster.TenancyOCID.
type LimitDefinition ¶
type LimitDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"`
Scope string `json:"scope"`
IsReleasedToCustomer bool `json:"is_released_to_customer"`
DefaultMin string `json:"default_min"`
DefaultMax string `json:"default_max"`
Service string `json:"service"`
PublicName string `json:"public_name"`
IsStaged bool `json:"is_staged"`
IsQuota bool `json:"is_quota"`
UsageSource string `json:"usage_source"`
}
LimitDefinition represents a limit definition for a service.
func (LimitDefinition) FilterableFields ¶ added in v0.6.0
func (c LimitDefinition) FilterableFields() []string
FilterableFields returns filterable fields for the limit definition.
func (LimitDefinition) GetDescription ¶
func (c LimitDefinition) GetDescription() string
GetDescription returns the description of the limit definition.
func (LimitDefinition) GetName ¶
func (c LimitDefinition) GetName() string
GetName returns the name of the limit definition.
func (LimitDefinition) IsFaulty ¶ added in v0.1.4
func (c LimitDefinition) IsFaulty() bool
IsFaulty returns false by default for LimitDefinition.
type LimitDefinitionGroup ¶
type LimitDefinitionGroup struct {
Name string `json:"group"`
Values []LimitDefinition `json:"values"`
}
LimitDefinitionGroup groups limit definitions by name.
type LimitRange ¶
LimitRange represents a min/max range for a limit override.
type LimitRegionalOverride ¶
type LimitRegionalOverride struct {
Realms []string `json:"realms"`
Group string `json:"group"`
Name string `json:"name"`
Regions []string `json:"regions"`
Values []LimitRange `json:"values"`
}
LimitRegionalOverride represents a regional override for a limit.
func (LimitRegionalOverride) FilterableFields ¶ added in v0.6.0
func (o LimitRegionalOverride) FilterableFields() []string
FilterableFields returns filterable fields for the limit regional override.
func (LimitRegionalOverride) GetName ¶
func (o LimitRegionalOverride) GetName() string
GetName returns the name of the limit tenancy override.
func (LimitRegionalOverride) IsFaulty ¶ added in v0.1.4
func (o LimitRegionalOverride) IsFaulty() bool
IsFaulty returns false by default for LimitRegionalOverride.
type LimitTenancyOverride ¶
type LimitTenancyOverride struct {
LimitRegionalOverride
TenantName string `json:"tenant"`
TenantID string `json:"tenant_id"`
}
LimitTenancyOverride represents a tenancy override for a limit.
TenantName carries the originating tenant directory name (the short human-readable identifier used as the map key in Dataset.LimitTenancyOverrideMap) and is populated by the configloader after yaml unmarshal — yaml files don't usually declare it because the path-grouping is conventional. TenantID is the per-record OCID from yaml. The two are distinct identifiers for the same tenant: name groups records together; id is the OCI identifier on this specific record.
func (LimitTenancyOverride) FilterableFields ¶ added in v0.6.0
func (o LimitTenancyOverride) FilterableFields() []string
FilterableFields returns filterable fields for the limit tenancy override.
func (LimitTenancyOverride) GetTenantID ¶
func (o LimitTenancyOverride) GetTenantID() string
GetTenantID returns the tenant ID of the limit tenancy override.
func (*LimitTenancyOverride) SetTenantName ¶ added in v0.6.0
func (o *LimitTenancyOverride) SetTenantName(name string)
SetTenantName stamps the tenant short name onto the override. Called by the configloader after unmarshal so consumers can read the grouping identifier from the struct instead of carrying the map key alongside.
type Metadata ¶ added in v0.1.4
type Metadata struct {
Tenants []TenantMetadata `json:"tenants"`
}
Metadata is the top-level structure for metadata.json/yaml.
func (*Metadata) GetTenants ¶ added in v0.1.4
func (m *Metadata) GetTenants(realm string) []TenantMetadata
GetTenants returns all tenants for a given realm.
type ModelArtifact ¶
type ModelArtifact struct {
Name string `json:"name"`
TensorRTVersion string `json:"tensorrt_version"`
GPUCount int `json:"gpu_count"`
GPUShape string `json:"gpu_shape"`
ModelName string `json:"model_name"`
}
ModelArtifact represents a model artifact stored in object storage.
func (ModelArtifact) FilterableFields ¶ added in v0.6.0
func (m ModelArtifact) FilterableFields() []string
FilterableFields returns filterable fields for the model artifact.
func (ModelArtifact) GPUConfig ¶ added in v0.6.0
func (m ModelArtifact) GPUConfig() string
GPUConfig returns the GPU configuration string for the model artifact.
func (ModelArtifact) GetName ¶
func (m ModelArtifact) GetName() string
GetName returns the name of the model artifact.
func (ModelArtifact) IsFaulty ¶ added in v0.1.4
func (m ModelArtifact) IsFaulty() bool
IsFaulty returns false by default for ModelArtifact.
type NamedFilterable ¶
type NamedFilterable interface {
NamedItem
Filterable
Faulty
}
NamedFilterable represents an item that is both named and filterable.
type NamedItem ¶
type NamedItem interface {
GetName() string
}
NamedItem represents an item with a name.
type PropertyDefinition ¶
type PropertyDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"`
Options []string `json:"options"`
DefaultValue string `json:"default_value"`
}
PropertyDefinition represents a property definition.
func (PropertyDefinition) FilterableFields ¶ added in v0.6.0
func (c PropertyDefinition) FilterableFields() []string
FilterableFields returns filterable fields for the property definition.
func (PropertyDefinition) GetDescription ¶
func (c PropertyDefinition) GetDescription() string
GetDescription returns the description of the property definition.
func (PropertyDefinition) GetName ¶
func (c PropertyDefinition) GetName() string
GetName returns the name of the property definition.
func (PropertyDefinition) GetValue ¶
func (c PropertyDefinition) GetValue() string
GetValue returns the default value of the property definition.
func (PropertyDefinition) IsFaulty ¶ added in v0.1.4
func (c PropertyDefinition) IsFaulty() bool
IsFaulty returns false by default for PropertyDefinition.
type PropertyDefinitionGroup ¶
type PropertyDefinitionGroup struct {
Name string `json:"group"`
Values []PropertyDefinition `json:"values"`
}
PropertyDefinitionGroup groups property definitions by name.
type PropertyRegionalOverride ¶
type PropertyRegionalOverride struct {
Realms []string `json:"realms"`
Name string `json:"name"`
Regions []string `json:"regions"`
Group string `json:"group"`
Values []struct {
Value string `json:"value"`
} `json:"values"`
}
PropertyRegionalOverride represents a regional override for a property.
func (PropertyRegionalOverride) FilterableFields ¶ added in v0.6.0
func (o PropertyRegionalOverride) FilterableFields() []string
FilterableFields returns filterable fields for the property regional override.
func (PropertyRegionalOverride) GetName ¶
func (o PropertyRegionalOverride) GetName() string
GetName returns the name of the property regional override.
func (PropertyRegionalOverride) GetRegions ¶
func (o PropertyRegionalOverride) GetRegions() []string
GetRegions returns the regions of the property regional override.
func (PropertyRegionalOverride) GetValue ¶
func (o PropertyRegionalOverride) GetValue() string
GetValue returns the value of the property regional override.
func (PropertyRegionalOverride) IsFaulty ¶ added in v0.1.4
func (o PropertyRegionalOverride) IsFaulty() bool
IsFaulty returns false by default for PropertyRegionalOverride.
type PropertyTenancyOverride ¶
type PropertyTenancyOverride struct {
TenantName string `json:"tenant"`
TenantID string `json:"tag"`
PropertyRegionalOverride
}
PropertyTenancyOverride represents a tenancy override for a property.
TenantName is the originating tenant directory name (populated by the configloader, same convention as LimitTenancyOverride). TenantID is the per-record tenant identifier; the JSON key is kept as "tag" for back-compat with the on-disk record format.
func (PropertyTenancyOverride) FilterableFields ¶ added in v0.6.0
func (o PropertyTenancyOverride) FilterableFields() []string
FilterableFields returns filterable fields for the property tenancy override.
func (PropertyTenancyOverride) GetTenantID ¶
func (o PropertyTenancyOverride) GetTenantID() string
GetTenantID returns the tenant ID of the property tenancy override.
func (*PropertyTenancyOverride) SetTenantName ¶ added in v0.6.0
func (o *PropertyTenancyOverride) SetTenantName(name string)
SetTenantName stamps the tenant short name onto the override. See LimitTenancyOverride.SetTenantName.
type RealmedID ¶ added in v0.6.0
RealmedID is implemented by OCI resources whose full OCID is constructed from a realm and a region plus a stored name suffix — DedicatedAICluster and ImportedModel today. Distinct from NamedItem.GetName (which returns just the suffix) and used by the TUI's CopyItemName action to produce the full OCID.
type RealmedTenancyID ¶ added in v0.6.0
RealmedTenancyID is implemented by OCI resources whose owning tenancy OCID is constructed from a realm plus a stored tenancy-id suffix — DedicatedAICluster and ImportedModel today. Distinct from TenancyOverride.GetTenantID (which takes no realm and is implemented by file-backed override types whose stored TenantID is already the full identifier).
type Region ¶
type Region string
Region represents a cloud region identifier.
copy from oci-go-sdk/v65@v65.68.0/common/regions.go
const ( // RegionAPChuncheon1 region Chuncheon RegionAPChuncheon1 Region = "ap-chuncheon-1" // RegionAPHyderabad1 region Hyderabad RegionAPHyderabad1 Region = "ap-hyderabad-1" // RegionAPMelbourne1 region Melbourne RegionAPMelbourne1 Region = "ap-melbourne-1" // RegionAPMumbai1 region Mumbai RegionAPMumbai1 Region = "ap-mumbai-1" // RegionAPOsaka1 region Osaka RegionAPOsaka1 Region = "ap-osaka-1" // RegionAPSeoul1 region Seoul RegionAPSeoul1 Region = "ap-seoul-1" // RegionAPSydney1 region Sydney RegionAPSydney1 Region = "ap-sydney-1" // RegionAPTokyo1 region Tokyo RegionAPTokyo1 Region = "ap-tokyo-1" // RegionCAMontreal1 region Montreal RegionCAMontreal1 Region = "ca-montreal-1" // RegionCAToronto1 region Toronto RegionCAToronto1 Region = "ca-toronto-1" // RegionEUAmsterdam1 region Amsterdam RegionEUAmsterdam1 Region = "eu-amsterdam-1" // RegionFRA region Frankfurt RegionFRA Region = "eu-frankfurt-1" // RegionEUZurich1 region Zurich RegionEUZurich1 Region = "eu-zurich-1" // RegionMEJeddah1 region Jeddah RegionMEJeddah1 Region = "me-jeddah-1" // RegionMEDubai1 region Dubai RegionMEDubai1 Region = "me-dubai-1" // RegionSASaopaulo1 region Saopaulo RegionSASaopaulo1 Region = "sa-saopaulo-1" // RegionUKCardiff1 region Cardiff RegionUKCardiff1 Region = "uk-cardiff-1" // RegionLHR region London RegionLHR Region = "uk-london-1" // RegionIAD region Ashburn RegionIAD Region = "us-ashburn-1" // RegionPHX region Phoenix RegionPHX Region = "us-phoenix-1" // RegionSJC1 region Sanjose RegionSJC1 Region = "us-sanjose-1" // RegionSAVinhedo1 region Vinhedo RegionSAVinhedo1 Region = "sa-vinhedo-1" // RegionSASantiago1 region Santiago RegionSASantiago1 Region = "sa-santiago-1" // RegionILJerusalem1 region Jerusalem RegionILJerusalem1 Region = "il-jerusalem-1" // RegionEUMarseille1 region Marseille RegionEUMarseille1 Region = "eu-marseille-1" // RegionAPSingapore1 region Singapore RegionAPSingapore1 Region = "ap-singapore-1" // RegionMEAbudhabi1 region Abudhabi RegionMEAbudhabi1 Region = "me-abudhabi-1" // RegionEUMilan1 region Milan RegionEUMilan1 Region = "eu-milan-1" // RegionEUStockholm1 region Stockholm RegionEUStockholm1 Region = "eu-stockholm-1" // RegionAFJohannesburg1 region Johannesburg RegionAFJohannesburg1 Region = "af-johannesburg-1" // RegionEUParis1 region Paris RegionEUParis1 Region = "eu-paris-1" // RegionMXQueretaro1 region Queretaro RegionMXQueretaro1 Region = "mx-queretaro-1" // RegionEUMadrid1 region Madrid RegionEUMadrid1 Region = "eu-madrid-1" // RegionUSChicago1 region Chicago RegionUSChicago1 Region = "us-chicago-1" // RegionMXMonterrey1 region Monterrey RegionMXMonterrey1 Region = "mx-monterrey-1" // RegionUSSaltlake2 region Saltlake RegionUSSaltlake2 Region = "us-saltlake-2" // RegionSABogota1 region Bogota RegionSABogota1 Region = "sa-bogota-1" // RegionSAValparaiso1 region Valparaiso RegionSAValparaiso1 Region = "sa-valparaiso-1" // RegionAPSingapore2 region Singapore RegionAPSingapore2 Region = "ap-singapore-2" // RegionMERiyadh1 region Riyadh RegionMERiyadh1 Region = "me-riyadh-1" // RegionAPDelhi1 region Delhi RegionAPDelhi1 Region = "ap-delhi-1" // RegionAPKulai1 region Kulai RegionAPKulai1 Region = "ap-kulai-1" // RegionAPBatam1 region Batam RegionAPBatam1 Region = "ap-batam-1" // RegionUSLangley1 region Langley RegionUSLangley1 Region = "us-langley-1" // RegionUSLuke1 region Luke RegionUSLuke1 Region = "us-luke-1" // RegionUSGovAshburn1 gov region Ashburn RegionUSGovAshburn1 Region = "us-gov-ashburn-1" // RegionUSGovChicago1 gov region Chicago RegionUSGovChicago1 Region = "us-gov-chicago-1" // RegionUSGovPhoenix1 gov region Phoenix RegionUSGovPhoenix1 Region = "us-gov-phoenix-1" // RegionUKGovLondon1 gov region London RegionUKGovLondon1 Region = "uk-gov-london-1" // RegionUKGovCardiff1 gov region Cardiff RegionUKGovCardiff1 Region = "uk-gov-cardiff-1" // RegionAPChiyoda1 region Chiyoda RegionAPChiyoda1 Region = "ap-chiyoda-1" // RegionAPIbaraki1 region Ibaraki RegionAPIbaraki1 Region = "ap-ibaraki-1" // RegionMEDccMuscat1 region Muscat RegionMEDccMuscat1 Region = "me-dcc-muscat-1" // RegionAPDccCanberra1 region Canberra RegionAPDccCanberra1 Region = "ap-dcc-canberra-1" // RegionEUDccMilan1 region Milan RegionEUDccMilan1 Region = "eu-dcc-milan-1" // RegionEUDccMilan2 region Milan RegionEUDccMilan2 Region = "eu-dcc-milan-2" // RegionEUDccDublin2 region Dublin RegionEUDccDublin2 Region = "eu-dcc-dublin-2" // RegionEUDccRating2 region Rating RegionEUDccRating2 Region = "eu-dcc-rating-2" // RegionEUDccRating1 region Rating RegionEUDccRating1 Region = "eu-dcc-rating-1" // RegionEUDccDublin1 region Dublin RegionEUDccDublin1 Region = "eu-dcc-dublin-1" // RegionAPDccGazipur1 region Gazipur RegionAPDccGazipur1 Region = "ap-dcc-gazipur-1" // RegionEUMadrid2 region Madrid RegionEUMadrid2 Region = "eu-madrid-2" // RegionEUFrankfurt2 region Frankfurt RegionEUFrankfurt2 Region = "eu-frankfurt-2" // RegionEUJovanovac1 region Jovanovac RegionEUJovanovac1 Region = "eu-jovanovac-1" // RegionMEDccDoha1 region Doha RegionMEDccDoha1 Region = "me-dcc-doha-1" // RegionUSSomerset1 region Somerset RegionUSSomerset1 Region = "us-somerset-1" // RegionUSThames1 region Thames RegionUSThames1 Region = "us-thames-1" // RegionEUDccZurich1 region Zurich RegionEUDccZurich1 Region = "eu-dcc-zurich-1" // RegionEUCrissier1 region Crissier RegionEUCrissier1 Region = "eu-crissier-1" // RegionMEAbudhabi3 region Abudhabi RegionMEAbudhabi3 Region = "me-abudhabi-3" // RegionMEAlain1 region Alain RegionMEAlain1 Region = "me-alain-1" // RegionMEAbudhabi2 region Abudhabi RegionMEAbudhabi2 Region = "me-abudhabi-2" // RegionMEAbudhabi4 region Abudhabi RegionMEAbudhabi4 Region = "me-abudhabi-4" // RegionAPSeoul2 region Seoul RegionAPSeoul2 Region = "ap-seoul-2" // RegionAPSuwon1 region Suwon RegionAPSuwon1 Region = "ap-suwon-1" // RegionAPChuncheon2 region Chuncheon RegionAPChuncheon2 Region = "ap-chuncheon-2" // RegionUSAshburn2 region Ashburn RegionUSAshburn2 Region = "us-ashburn-2" // RegionTacoma is a region not part of the official SDK. RegionTacoma Region = "us-tacoma-1" // RegionAPDccTokyo1 is a region not part of the official SDK. RegionAPDccTokyo1 Region = "ap-dcc-tokyo-1" // RegionUSGovSterling2 is a region not part of the official SDK. RegionUSGovSterling2 Region = "us-gov-sterling-2" // RegionUSGovFortworth1 is a region not part of the official SDK. RegionUSGovFortworth1 Region = "us-gov-fortworth-1" // RegionUSDccPhoenix1 is a region not part of the official SDK. RegionUSDccPhoenix1 Region = "us-dcc-phoenix-1" // RegionUSDccPhoenix2 is a region not part of the official SDK. RegionUSDccPhoenix2 Region = "us-dcc-phoenix-2" // RegionUSNewark1 region Newark (oc42). Added to oci-go-sdk in v65.114. RegionUSNewark1 Region = "us-newark-1" )
func CodeToRegion ¶
CodeToRegion returns the Region corresponding to the given code.
func (Region) Code ¶ added in v0.6.0
Code returns the short code for the Region.
For regions that haven't been added to the regionByShortName map yet (typically newer SDK additions or sovereign-cloud regions that never ship in the public SDK), it falls back to the second-to-last dash-delimited segment of the region identifier — e.g.
"ap-westtokyo-1" -> "westtokyo" "us-newark-1" -> "pgc" (mapped) "unknown-region" -> "UNKNOWN" (segment count < 3)
The fallback is informational; callers that need the canonical OCI region key should add the mapping explicitly. Returns the literal "UNKNOWN" for inputs that don't look like region identifiers at all.
Code not part of SDK
type ScopedItemKey ¶
ScopedItemKey represents an item key with a scope.
type ServiceTenancy ¶
type ServiceTenancy struct {
Name string `json:"tenancy_name"`
Realm string `json:"realm"`
HomeRegion string `json:"home_region"`
Regions []string `json:"regions"`
Environment string `json:"environment"`
}
ServiceTenancy represents a service tenancy entity.
func (ServiceTenancy) Environments ¶
func (t ServiceTenancy) Environments() []Environment
Environments returns the environments for the service tenancy.
func (ServiceTenancy) FilterableFields ¶ added in v0.6.0
func (t ServiceTenancy) FilterableFields() []string
FilterableFields returns filterable fields for the service tenancy.
func (ServiceTenancy) GetName ¶
func (t ServiceTenancy) GetName() string
GetName returns the name of the service tenancy.
func (ServiceTenancy) IsFaulty ¶ added in v0.1.4
func (t ServiceTenancy) IsFaulty() bool
IsFaulty returns false by default for ServiceTenancy.
type TenancyOverride ¶
type TenancyOverride interface {
GetTenantID() string
}
TenancyOverride represents an override with a tenant ID.
type TenancyOverrideGroup ¶
type TenancyOverrideGroup struct {
Tenants []Tenant
LimitTenancyOverrideMap map[string][]LimitTenancyOverride
ConsolePropertyTenancyOverrideMap map[string][]ConsolePropertyTenancyOverride
PropertyTenancyOverrideMap map[string][]PropertyTenancyOverride
}
TenancyOverrideGroup bundles tenants and their three override maps.
type Tenant ¶
type Tenant struct {
Name string `json:"name"`
IDs []string `json:"ids"`
IsInternal bool `json:"is_internal"`
Note string `json:"note,omitempty"`
}
Tenant represents a tenant entity.
func (Tenant) FilterableFields ¶ added in v0.6.0
FilterableFields returns filterable fields for the tenant.
func (Tenant) GetTenantID ¶
GetTenantID returns the tenant ID string.