Documentation
¶
Overview ¶
Code generated by sdkgen from Gophercloud v2.15.0; DO NOT EDIT.
Code generated by sdkgen from Gophercloud v2.15.0; DO NOT EDIT.
Index ¶
- Constants
- type API
- func (a *API) AddAccess(ctx context.Context, id string, opts AddAccessOpts, options ...AddAccessOption) ([]FlavorAccess, error)
- func (a *API) All(ctx context.Context, options ...resource.ListOption) ([]*Flavor, error)
- func (a *API) Create(ctx context.Context, opts CreateOpts, options ...CreateOption) (*Flavor, error)
- func (a *API) CreateExtraSpecs(ctx context.Context, flavorID string, opts ExtraSpecsOpts, ...) (map[string]string, error)
- func (a *API) Delete(ctx context.Context, id string) error
- func (a *API) DeleteExtraSpec(ctx context.Context, flavorID string, key string) error
- func (a *API) FetchExtraSpecs(ctx context.Context, input FlavorExtraSpecsRequest, ...) (*FlavorExtraSpecsRecord, error)
- func (a *API) Find(ctx context.Context, ref resource.Ref, options ...resource.LookupOption) (*Flavor, error)
- func (a *API) FindFlavor(ctx context.Context, nameOrID string, options ...FlavorFindOption) (*FlavorRecord, error)
- func (a *API) FindIdentity(ctx context.Context, identity string, options ...resource.IdentityFindOption) (*Flavor, error)
- func (a *API) Get(ctx context.Context, id string) (*Flavor, error)
- func (a *API) GetExtraSpec(ctx context.Context, flavorID string, key string) (map[string]string, error)
- func (a *API) GetExtraSpecsProperty(ctx context.Context, input FlavorExtraSpecsRequest, property string, ...) (*FlavorExtraSpecPropertyRecord, error)
- func (a *API) ListAccesses(ctx context.Context, id string) iter.Seq2[*FlavorAccess, error]
- func (a *API) ListDetail(ctx context.Context, options ...ListDetailOption) iter.Seq2[*Flavor, error]
- func (a *API) ListExtraSpecs(ctx context.Context, flavorID string) (map[string]string, error)
- func (a *API) ListRecords(ctx context.Context, options ...FlavorListOption) iter.Seq2[*FlavorRecord, error]
- func (a *API) ListSourceRecords(ctx context.Context, options ...FlavorListOption) iter.Seq2[*FlavorRecord, error]
- func (a *API) RawClient() *gophercloud.ServiceClient
- func (a *API) Remove(ctx context.Context, ref resource.Ref, options ...resource.LookupOption) error
- func (a *API) RemoveAccess(ctx context.Context, id string, opts RemoveAccessOpts, ...) ([]FlavorAccess, error)
- func (a *API) Update(ctx context.Context, id string, opts UpdateOpts, options ...UpdateOption) (*Flavor, error)
- func (a *API) UpdateExtraSpec(ctx context.Context, flavorID string, opts ExtraSpecsOpts, ...) (map[string]string, error)
- func (a *API) UpdateRecord(ctx context.Context, flavorID string, options ...UpdateRecordOption) (*FlavorUpdateRecord, error)
- func (a *API) WaitFor(ctx context.Context, ref resource.Ref, status string, ...) (*Flavor, error)
- func (a *API) WaitForDeletion(ctx context.Context, ref resource.Ref, options ...resource.WaitOption) error
- type AccessPage
- type AccessType
- type AddAccessOption
- type AddAccessOpts
- type AddAccessResult
- type CreateExtraSpecsOption
- type CreateExtraSpecsResult
- type CreateOption
- type CreateOpts
- type CreateResult
- type DeleteExtraSpecResult
- type DeleteResult
- type ExtraSpecsOpts
- type Flavor
- type FlavorAccess
- type FlavorExtraSpecPropertyRecord
- type FlavorExtraSpecsOption
- type FlavorExtraSpecsOpts
- type FlavorExtraSpecsRecord
- type FlavorExtraSpecsRequest
- type FlavorFindOption
- func WithFlavorFindExtraSpecs(value bool) FlavorFindOption
- func WithFlavorFindFilter(field string, value any) FlavorFindOption
- func WithFlavorFindFilters(values map[string]any) FlavorFindOption
- func WithFlavorFindHeader(key, value string) FlavorFindOption
- func WithFlavorFindIgnoreMissing(value bool) FlavorFindOption
- func WithFlavorFindLimit(value int) FlavorFindOption
- func WithFlavorFindMarker(value string) FlavorFindOption
- func WithFlavorFindMaxItems(value int) FlavorFindOption
- func WithFlavorFindMicroversion(value string) FlavorFindOption
- func WithFlavorFindOptions(value FlavorFindOpts) FlavorFindOption
- func WithFlavorFindPaginated(value bool) FlavorFindOption
- func WithFlavorFindQuery(key, value string) FlavorFindOption
- type FlavorFindOpts
- type FlavorListOption
- func WithFlavorListDetails(value bool) FlavorListOption
- func WithFlavorListExtraSpecs(value bool) FlavorListOption
- func WithFlavorListFilter(field string, value any) FlavorListOption
- func WithFlavorListFilters(values map[string]any) FlavorListOption
- func WithFlavorListHeader(key, value string) FlavorListOption
- func WithFlavorListLimit(value int) FlavorListOption
- func WithFlavorListMarker(value string) FlavorListOption
- func WithFlavorListMaxItems(value int) FlavorListOption
- func WithFlavorListMicroversion(value string) FlavorListOption
- func WithFlavorListOptions(value FlavorListOpts) FlavorListOption
- func WithFlavorListPaginated(value bool) FlavorListOption
- func WithFlavorListQuery(key, value string) FlavorListOption
- type FlavorListOpts
- type FlavorPage
- type FlavorRecord
- type FlavorUpdateRecord
- type GetExtraSpecResult
- type GetResult
- type ListDetailOption
- type ListExtraSpecsResult
- type ListOpts
- type RemoveAccessOption
- type RemoveAccessOpts
- type RemoveAccessResult
- type UpdateExtraSpecOption
- type UpdateExtraSpecResult
- type UpdateOption
- type UpdateOpts
- type UpdateRecordOption
- type UpdateRecordOpts
- type UpdateResult
Constants ¶
const AllAccess = upstream.AllAccess
const PrivateAccess = upstream.PrivateAccess
const PublicAccess = upstream.PublicAccess
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
Resources *resource.Collection[Flavor]
// contains filtered or unexported fields
}
API owns typed operations and their shared resource policies.
func New ¶
func New(client *gophercloud.ServiceClient) *API
func (*API) AddAccess ¶
func (a *API) AddAccess(ctx context.Context, id string, opts AddAccessOpts, options ...AddAccessOption) ([]FlavorAccess, error)
AddAccess invokes the upstream API with library-owned builders and result handling.
func (*API) Create ¶
func (a *API) Create(ctx context.Context, opts CreateOpts, options ...CreateOption) (*Flavor, error)
Create invokes the upstream API with library-owned builders and result handling.
func (*API) CreateExtraSpecs ¶
func (a *API) CreateExtraSpecs(ctx context.Context, flavorID string, opts ExtraSpecsOpts, options ...CreateExtraSpecsOption) (map[string]string, error)
CreateExtraSpecs invokes the upstream API with library-owned builders and result handling.
func (*API) Delete ¶
Delete invokes the upstream API with library-owned builders and result handling.
func (*API) DeleteExtraSpec ¶
DeleteExtraSpec invokes the upstream API with library-owned builders and result handling.
func (*API) FetchExtraSpecs ¶
func (a *API) FetchExtraSpecs(ctx context.Context, input FlavorExtraSpecsRequest, options ...FlavorExtraSpecsOption) (*FlavorExtraSpecsRecord, error)
FetchExtraSpecs always reads /flavors/{id}/os-extra_specs, even when the supplied flavor already has inline specs. The existing input and selected client are never mutated. Native ListExtraSpecs retains its typed ABI.
func (*API) FindFlavor ¶
func (a *API) FindFlavor(ctx context.Context, nameOrID string, options ...FlavorFindOption) (*FlavorRecord, error)
FindFlavor always attempts an escaped member GET first. A clean native 400, 403 or 404 falls back to a detailed list with exact ID-or-name matching. It never sends an automatic name hint or the list-only is_public default to member GET. Missing is ignored by default; duplicate and list errors remain errors. Native Get, Find and the existing typed collection are unchanged.
func (*API) FindIdentity ¶
func (a *API) FindIdentity(ctx context.Context, identity string, options ...resource.IdentityFindOption) (*Flavor, error)
FindIdentity tries an ID request before exact ID/name fallback within this collection.
func (*API) GetExtraSpec ¶
func (a *API) GetExtraSpec(ctx context.Context, flavorID string, key string) (map[string]string, error)
GetExtraSpec invokes the upstream API with library-owned builders and result handling.
func (*API) GetExtraSpecsProperty ¶
func (a *API) GetExtraSpecsProperty(ctx context.Context, input FlavorExtraSpecsRequest, property string, options ...FlavorExtraSpecsOption) (*FlavorExtraSpecPropertyRecord, error)
GetExtraSpecsProperty always reads the single escaped property endpoint. It does not update the supplied flavor, fetch the complete extra_specs object, or interpret passive response values as a route. Read options and version selection are identical to FetchExtraSpecs.
func (*API) ListAccesses ¶
ListAccesses invokes the upstream API with library-owned builders and result handling.
func (*API) ListDetail ¶
func (a *API) ListDetail(ctx context.Context, options ...ListDetailOption) iter.Seq2[*Flavor, error]
ListDetail invokes the upstream API with library-owned builders and result handling.
func (*API) ListExtraSpecs ¶
ListExtraSpecs invokes the upstream API with library-owned builders and result handling.
func (*API) ListRecords ¶
func (a *API) ListRecords(ctx context.Context, options ...FlavorListOption) iter.Seq2[*FlavorRecord, error]
ListRecords is lazy and owns each logical iteration. Body filtering and the raw row cap precede conditional enrichment; break stops additional work.
func (*API) ListSourceRecords ¶
func (a *API) ListSourceRecords(ctx context.Context, options ...FlavorListOption) iter.Seq2[*FlavorRecord, error]
ListSourceRecords uses the pinned Source 100..399 policy for both collection and conditional extra-specs reads. Normal ListRecords/Find/Fetch keep their existing 200..399 policy. Informational final statuses are tested through a synthetic transport; a normal HTTP transport consumes interim responses.
func (*API) RawClient ¶
func (a *API) RawClient() *gophercloud.ServiceClient
func (*API) RemoveAccess ¶
func (a *API) RemoveAccess(ctx context.Context, id string, opts RemoveAccessOpts, options ...RemoveAccessOption) ([]FlavorAccess, error)
RemoveAccess invokes the upstream API with library-owned builders and result handling.
func (*API) Update ¶
func (a *API) Update(ctx context.Context, id string, opts UpdateOpts, options ...UpdateOption) (*Flavor, error)
Update invokes the upstream API with library-owned builders and result handling.
func (*API) UpdateExtraSpec ¶
func (a *API) UpdateExtraSpec(ctx context.Context, flavorID string, opts ExtraSpecsOpts, options ...UpdateExtraSpecOption) (map[string]string, error)
UpdateExtraSpec invokes the upstream API with library-owned builders and result handling.
func (*API) UpdateRecord ¶
func (a *API) UpdateRecord(ctx context.Context, flavorID string, options ...UpdateRecordOption) (*FlavorUpdateRecord, error)
UpdateRecord implements update_flavor: Resource.commit sends PUT flavors/{id} with only the supplied attributes in {"flavor": ...} and accepts every status below 400. With no attribute it sends nothing.
func (*API) WaitForDeletion ¶
type AccessPage ¶
type AccessPage = upstream.AccessPage
type AccessType ¶
type AccessType = upstream.AccessType
type AddAccessOption ¶
type AddAccessOption = request.Option[AddAccessOpts]
func WithAddAccessField ¶
func WithAddAccessField(key string, value any) AddAccessOption
func WithAddAccessOptions ¶
func WithAddAccessOptions(value AddAccessOpts) AddAccessOption
type AddAccessOpts ¶
type AddAccessOpts = upstream.AddAccessOpts
type AddAccessResult ¶
type AddAccessResult = upstream.AddAccessResult
type CreateExtraSpecsOption ¶
type CreateExtraSpecsOption = request.Option[ExtraSpecsOpts]
func WithCreateExtraSpecsField ¶
func WithCreateExtraSpecsField(key string, value any) CreateExtraSpecsOption
func WithCreateExtraSpecsOptions ¶
func WithCreateExtraSpecsOptions(value ExtraSpecsOpts) CreateExtraSpecsOption
type CreateExtraSpecsResult ¶
type CreateExtraSpecsResult = upstream.CreateExtraSpecsResult
type CreateOption ¶
type CreateOption = request.Option[CreateOpts]
func WithCreateField ¶
func WithCreateField(key string, value any) CreateOption
func WithCreateOptions ¶
func WithCreateOptions(value CreateOpts) CreateOption
type CreateOpts ¶
type CreateOpts = upstream.CreateOpts
type CreateResult ¶
type CreateResult = upstream.CreateResult
type DeleteExtraSpecResult ¶
type DeleteExtraSpecResult = upstream.DeleteExtraSpecResult
type DeleteResult ¶
type DeleteResult = upstream.DeleteResult
type ExtraSpecsOpts ¶
type ExtraSpecsOpts = upstream.ExtraSpecsOpts
type FlavorAccess ¶
type FlavorAccess = upstream.FlavorAccess
type FlavorExtraSpecPropertyRecord ¶
type FlavorExtraSpecPropertyRecord struct {
Value json.RawMessage
Present bool
Wire *resource.RawResource
Envelope json.RawMessage
Header http.Header
StatusCode int
}
FlavorExtraSpecPropertyRecord preserves the property value without a string or dictionary conversion. Missing properties have Value null and Present false; an explicit JSON null has Present true. Wire and the receipt preserve the actual response independently of Value.
type FlavorExtraSpecsOption ¶
type FlavorExtraSpecsOption = request.Option[FlavorExtraSpecsOpts]
func WithFlavorExtraSpecsHeader ¶
func WithFlavorExtraSpecsHeader(key, value string) FlavorExtraSpecsOption
func WithFlavorExtraSpecsMicroversion ¶
func WithFlavorExtraSpecsMicroversion(value string) FlavorExtraSpecsOption
func WithFlavorExtraSpecsOptions ¶
func WithFlavorExtraSpecsOptions(value FlavorExtraSpecsOpts) FlavorExtraSpecsOption
WithFlavorExtraSpecsOptions snapshots its pointer now and for each call.
type FlavorExtraSpecsOpts ¶
type FlavorExtraSpecsOpts struct {
Microversion *string
}
FlavorExtraSpecsOpts supplies an owned read policy. Nil Microversion keeps a selected version or discovers at most 2.61; explicit empty is versionless.
type FlavorExtraSpecsRecord ¶
type FlavorExtraSpecsRecord struct {
Resource, Wire *resource.RawResource
ExtraSpecs json.RawMessage
Envelope json.RawMessage
Header http.Header
StatusCode int
}
FlavorExtraSpecsRecord separates the updated owned input from the physical response. ExtraSpecs preserves the response value as JSON, including null, scalars and arrays; an omitted extra_specs is an empty object. Resource uses the Source dict descriptor: nonnull nonobjects become empty objects. It keeps input metadata, while Wire and the receipt carry this request's metadata.
type FlavorExtraSpecsRequest ¶
type FlavorExtraSpecsRequest struct {
ID string
Flavor *Flavor
Resource *resource.RawResource
}
FlavorExtraSpecsRequest supplies a string ID or one existing flavor. An explicit ID controls only the request route; it does not rewrite existing Resource fields. Without it, existing id/name/original_name string data selects the route. Flavor and Resource are mutually exclusive concrete inputs.
type FlavorFindOption ¶
type FlavorFindOption = request.Option[FlavorFindOpts]
func WithFlavorFindExtraSpecs ¶
func WithFlavorFindExtraSpecs(value bool) FlavorFindOption
func WithFlavorFindFilter ¶
func WithFlavorFindFilter(field string, value any) FlavorFindOption
WithFlavorFindFilter sends the original attribute spelling to member GET, then classifies it as a server query or local Body field for list fallback.
func WithFlavorFindFilters ¶
func WithFlavorFindFilters(values map[string]any) FlavorFindOption
WithFlavorFindFilters replaces only semantic filters. Nil clears them.
func WithFlavorFindHeader ¶
func WithFlavorFindHeader(key, value string) FlavorFindOption
func WithFlavorFindIgnoreMissing ¶
func WithFlavorFindIgnoreMissing(value bool) FlavorFindOption
func WithFlavorFindLimit ¶
func WithFlavorFindLimit(value int) FlavorFindOption
func WithFlavorFindMarker ¶
func WithFlavorFindMarker(value string) FlavorFindOption
func WithFlavorFindMaxItems ¶
func WithFlavorFindMaxItems(value int) FlavorFindOption
WithFlavorFindMaxItems caps raw fallback rows before local Body filtering.
func WithFlavorFindMicroversion ¶
func WithFlavorFindMicroversion(value string) FlavorFindOption
func WithFlavorFindOptions ¶
func WithFlavorFindOptions(value FlavorFindOpts) FlavorFindOption
WithFlavorFindOptions replaces typed fields while preserving separately supplied headers, wire queries and semantic filters.
func WithFlavorFindPaginated ¶
func WithFlavorFindPaginated(value bool) FlavorFindOption
func WithFlavorFindQuery ¶
func WithFlavorFindQuery(key, value string) FlavorFindOption
type FlavorFindOpts ¶
type FlavorFindOpts struct {
GetExtraSpecs bool
IgnoreMissing *bool
Limit int
Marker string
MaxItems int
Paginated *bool
Microversion *string
}
FlavorFindOpts controls a member read and its detailed list fallback. Nil IgnoreMissing defaults to true. GetExtraSpecs defaults to false and enriches only a uniquely resolved flavor whose projected extra_specs is falsey. Nil Microversion retains a selected version or discovers at most 2.61; explicit empty requests a versionless read without changing the client.
type FlavorListOption ¶
type FlavorListOption = request.Option[FlavorListOpts]
func WithFlavorListDetails ¶
func WithFlavorListDetails(value bool) FlavorListOption
func WithFlavorListExtraSpecs ¶
func WithFlavorListExtraSpecs(value bool) FlavorListOption
func WithFlavorListFilter ¶
func WithFlavorListFilter(field string, value any) FlavorListOption
func WithFlavorListFilters ¶
func WithFlavorListFilters(values map[string]any) FlavorListOption
func WithFlavorListHeader ¶
func WithFlavorListHeader(key, value string) FlavorListOption
func WithFlavorListLimit ¶
func WithFlavorListLimit(value int) FlavorListOption
func WithFlavorListMarker ¶
func WithFlavorListMarker(value string) FlavorListOption
func WithFlavorListMaxItems ¶
func WithFlavorListMaxItems(value int) FlavorListOption
func WithFlavorListMicroversion ¶
func WithFlavorListMicroversion(value string) FlavorListOption
func WithFlavorListOptions ¶
func WithFlavorListOptions(value FlavorListOpts) FlavorListOption
func WithFlavorListPaginated ¶
func WithFlavorListPaginated(value bool) FlavorListOption
func WithFlavorListQuery ¶
func WithFlavorListQuery(key, value string) FlavorListOption
type FlavorListOpts ¶
type FlavorListOpts struct {
Details *bool
GetExtraSpecs bool
Limit int
Marker string
MaxItems int
Paginated *bool
Microversion *string
}
FlavorListOpts owns summary/detail, conditional enrichment and local row controls. Nil Details is true; GetExtraSpecs is false. Nil Microversion retains the selected version or discovers at most 2.61.
type FlavorPage ¶
type FlavorPage = upstream.FlavorPage
type FlavorRecord ¶
type FlavorRecord struct {
Resource, Wire *resource.RawResource
Envelope json.RawMessage
// PageEnvelope retains the physical collection page for the Source-status
// lane. Envelope remains the decoded flat row used for field projection.
PageEnvelope json.RawMessage
Header http.Header
StatusCode int
Enrichment *FlavorExtraSpecsRecord
}
FlavorRecord keeps the declared flavor view separate from the actual response. Resource applies response descriptors and defaults; Wire and the receipt preserve actual values. Enrichment records a separate extra-specs response when a list or find operation requests conditional enrichment.
type FlavorUpdateRecord ¶
type FlavorUpdateRecord struct {
Flavor *Flavor
Fields map[string]json.RawMessage
Header http.Header
StatusCode int
Sent bool
}
FlavorUpdateRecord is the committed Python Flavor view. Flavor is the native typed decode of the response object and Fields keeps that object unchanged. Sent is false when no attribute was dirty and nothing was sent.
type GetExtraSpecResult ¶
type GetExtraSpecResult = upstream.GetExtraSpecResult
type ListDetailOption ¶
func WithListDetailOptions ¶
func WithListDetailOptions(value ListOpts) ListDetailOption
func WithListDetailQuery ¶
func WithListDetailQuery(key, value string) ListDetailOption
type ListExtraSpecsResult ¶
type ListExtraSpecsResult = upstream.ListExtraSpecsResult
type RemoveAccessOption ¶
type RemoveAccessOption = request.Option[RemoveAccessOpts]
func WithRemoveAccessField ¶
func WithRemoveAccessField(key string, value any) RemoveAccessOption
func WithRemoveAccessOptions ¶
func WithRemoveAccessOptions(value RemoveAccessOpts) RemoveAccessOption
type RemoveAccessOpts ¶
type RemoveAccessOpts = upstream.RemoveAccessOpts
type RemoveAccessResult ¶
type RemoveAccessResult = upstream.RemoveAccessResult
type UpdateExtraSpecOption ¶
type UpdateExtraSpecOption = request.Option[ExtraSpecsOpts]
func WithUpdateExtraSpecOptions ¶
func WithUpdateExtraSpecOptions(value ExtraSpecsOpts) UpdateExtraSpecOption
type UpdateExtraSpecResult ¶
type UpdateExtraSpecResult = upstream.UpdateExtraSpecResult
type UpdateOption ¶
type UpdateOption = request.Option[UpdateOpts]
func WithUpdateField ¶
func WithUpdateField(key string, value any) UpdateOption
func WithUpdateOptions ¶
func WithUpdateOptions(value UpdateOpts) UpdateOption
type UpdateOpts ¶
type UpdateOpts = upstream.UpdateOpts
type UpdateRecordOption ¶
type UpdateRecordOption = request.Option[UpdateRecordOpts]
func WithUpdateRecordDescription ¶
func WithUpdateRecordDescription(value request.Optional[string]) UpdateRecordOption
func WithUpdateRecordField ¶
func WithUpdateRecordField(key string, value any) UpdateRecordOption
WithUpdateRecordField adds another attribute inside the flavor envelope. The typed description key and the URI identity id are rejected.
func WithUpdateRecordHeader ¶
func WithUpdateRecordHeader(key, value string) UpdateRecordOption
func WithUpdateRecordOptions ¶
func WithUpdateRecordOptions(value UpdateRecordOpts) UpdateRecordOption
type UpdateRecordOpts ¶
UpdateRecordOpts carries the Python update_flavor description. An omitted field is not sent, Null sends JSON null and Present keeps an empty string, both of which Nova accepts to clear the description. Other declared Flavor attributes use WithUpdateRecordField with their server keys; the server validates every value.
type UpdateResult ¶
type UpdateResult = upstream.UpdateResult