heuristicsv1

package
v0.0.0-...-94cd6a6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeuristicsService_CreateSecondaryStorageSelector_FullMethodName = "/cloudstack.management.storage.heuristics.v1.HeuristicsService/CreateSecondaryStorageSelector"
	HeuristicsService_ListSecondaryStorageSelectors_FullMethodName  = "/cloudstack.management.storage.heuristics.v1.HeuristicsService/ListSecondaryStorageSelectors"
	HeuristicsService_RemoveSecondaryStorageSelector_FullMethodName = "/cloudstack.management.storage.heuristics.v1.HeuristicsService/RemoveSecondaryStorageSelector"
	HeuristicsService_UpdateSecondaryStorageSelector_FullMethodName = "/cloudstack.management.storage.heuristics.v1.HeuristicsService/UpdateSecondaryStorageSelector"
)

Variables

View Source
var File_cloudstack_management_storage_heuristics_v1_heuristics_gen_proto protoreflect.FileDescriptor
View Source
var HeuristicsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cloudstack.management.storage.heuristics.v1.HeuristicsService",
	HandlerType: (*HeuristicsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSecondaryStorageSelector",
			Handler:    _HeuristicsService_CreateSecondaryStorageSelector_Handler,
		},
		{
			MethodName: "ListSecondaryStorageSelectors",
			Handler:    _HeuristicsService_ListSecondaryStorageSelectors_Handler,
		},
		{
			MethodName: "RemoveSecondaryStorageSelector",
			Handler:    _HeuristicsService_RemoveSecondaryStorageSelector_Handler,
		},
		{
			MethodName: "UpdateSecondaryStorageSelector",
			Handler:    _HeuristicsService_UpdateSecondaryStorageSelector_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cloudstack/management/storage/heuristics/v1/heuristics.gen.proto",
}

HeuristicsService_ServiceDesc is the grpc.ServiceDesc for HeuristicsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterHeuristicsServiceServer

func RegisterHeuristicsServiceServer(s grpc.ServiceRegistrar, srv HeuristicsServiceServer)

Types

type CreateSecondaryStorageSelectorRequest

type CreateSecondaryStorageSelectorRequest struct {

	// The name identifying the heuristic rule.
	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The description of the heuristic rule.
	Description *string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
	// The zone in which the heuristic rule will be applied.
	ZoneId *int64 `protobuf:"varint,3,opt,name=zone_id,json=zoneId" json:"zone_id,omitempty"`
	// The resource type directed to a specific secondary storage by the selector. Valid options are: ISO, SNAPSHOT, TEMPLATE and VOLUME.
	Type *string `protobuf:"bytes,4,opt,name=type" json:"type,omitempty"`
	// The heuristic rule, in JavaScript language. It is required that it returns the UUID of a secondary storage pool. An example of a rule is `if (snapshot.hypervisorType === 'KVM') { '7832f261-c602-4e8e-8580-2496ffbbc45d'; }` would allocate all snapshots with the KVM hypervisor to the specified secondary storage UUID.
	HeuristicRule *string `protobuf:"bytes,5,opt,name=heuristic_rule,json=heuristicRule" json:"heuristic_rule,omitempty"`
	ResponseType  *string `protobuf:"bytes,6,opt,name=response_type,json=responseType" json:"response_type,omitempty"`
	// contains filtered or unexported fields
}

CreateSecondaryStorageSelectorRequest represents the parameters for creates a secondary storage selector, described by the heuristic rule.

func (*CreateSecondaryStorageSelectorRequest) Descriptor deprecated

func (*CreateSecondaryStorageSelectorRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateSecondaryStorageSelectorRequest.ProtoReflect.Descriptor instead.

func (*CreateSecondaryStorageSelectorRequest) GetDescription

func (x *CreateSecondaryStorageSelectorRequest) GetDescription() string

func (*CreateSecondaryStorageSelectorRequest) GetHeuristicRule

func (x *CreateSecondaryStorageSelectorRequest) GetHeuristicRule() string

func (*CreateSecondaryStorageSelectorRequest) GetName

func (*CreateSecondaryStorageSelectorRequest) GetResponseType

func (x *CreateSecondaryStorageSelectorRequest) GetResponseType() string

func (*CreateSecondaryStorageSelectorRequest) GetType

func (*CreateSecondaryStorageSelectorRequest) GetZoneId

func (*CreateSecondaryStorageSelectorRequest) ProtoMessage

func (*CreateSecondaryStorageSelectorRequest) ProtoMessage()

func (*CreateSecondaryStorageSelectorRequest) ProtoReflect

func (*CreateSecondaryStorageSelectorRequest) Reset

func (*CreateSecondaryStorageSelectorRequest) String

type CreateSecondaryStorageSelectorResponse

type CreateSecondaryStorageSelectorResponse struct {

	// The Result
	Result *Result `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"`
	// contains filtered or unexported fields
}

CreateSecondaryStorageSelectorResponse represents the response from creates a secondary storage selector, described by the heuristic rule.

func (*CreateSecondaryStorageSelectorResponse) Descriptor deprecated

func (*CreateSecondaryStorageSelectorResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateSecondaryStorageSelectorResponse.ProtoReflect.Descriptor instead.

func (*CreateSecondaryStorageSelectorResponse) GetResult

func (*CreateSecondaryStorageSelectorResponse) ProtoMessage

func (*CreateSecondaryStorageSelectorResponse) ProtoReflect

func (*CreateSecondaryStorageSelectorResponse) Reset

func (*CreateSecondaryStorageSelectorResponse) String

type HeuristicsServiceClient

type HeuristicsServiceClient interface {
	// CreateSecondaryStorageSelector Creates a secondary storage selector, described by the heuristic rule.
	CreateSecondaryStorageSelector(ctx context.Context, in *CreateSecondaryStorageSelectorRequest, opts ...grpc.CallOption) (*CreateSecondaryStorageSelectorResponse, error)
	// ListSecondaryStorageSelectors Lists the secondary storage selectors and their rules.
	ListSecondaryStorageSelectors(ctx context.Context, in *ListSecondaryStorageSelectorsRequest, opts ...grpc.CallOption) (*ListSecondaryStorageSelectorsResponse, error)
	// RemoveSecondaryStorageSelector Removes an existing secondary storage selector.
	RemoveSecondaryStorageSelector(ctx context.Context, in *RemoveSecondaryStorageSelectorRequest, opts ...grpc.CallOption) (*RemoveSecondaryStorageSelectorResponse, error)
	// UpdateSecondaryStorageSelector Updates an existing secondary storage selector.
	UpdateSecondaryStorageSelector(ctx context.Context, in *UpdateSecondaryStorageSelectorRequest, opts ...grpc.CallOption) (*UpdateSecondaryStorageSelectorResponse, error)
}

HeuristicsServiceClient is the client API for HeuristicsService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

HeuristicsService provides operations for managing Storage.Heuristicss

type HeuristicsServiceServer

type HeuristicsServiceServer interface {
	// CreateSecondaryStorageSelector Creates a secondary storage selector, described by the heuristic rule.
	CreateSecondaryStorageSelector(context.Context, *CreateSecondaryStorageSelectorRequest) (*CreateSecondaryStorageSelectorResponse, error)
	// ListSecondaryStorageSelectors Lists the secondary storage selectors and their rules.
	ListSecondaryStorageSelectors(context.Context, *ListSecondaryStorageSelectorsRequest) (*ListSecondaryStorageSelectorsResponse, error)
	// RemoveSecondaryStorageSelector Removes an existing secondary storage selector.
	RemoveSecondaryStorageSelector(context.Context, *RemoveSecondaryStorageSelectorRequest) (*RemoveSecondaryStorageSelectorResponse, error)
	// UpdateSecondaryStorageSelector Updates an existing secondary storage selector.
	UpdateSecondaryStorageSelector(context.Context, *UpdateSecondaryStorageSelectorRequest) (*UpdateSecondaryStorageSelectorResponse, error)
	// contains filtered or unexported methods
}

HeuristicsServiceServer is the server API for HeuristicsService service. All implementations must embed UnimplementedHeuristicsServiceServer for forward compatibility.

HeuristicsService provides operations for managing Storage.Heuristicss

type ListSecondaryStorageSelectorsRequest

type ListSecondaryStorageSelectorsRequest struct {

	// The zone ID to be used in the search filter.
	ZoneId *int64 `protobuf:"varint,1,opt,name=zone_id,json=zoneId" json:"zone_id,omitempty"`
	// Whether to filter the selectors by type and, if so, which one. Valid options are: ISO, SNAPSHOT, TEMPLATE and VOLUME.
	Type *string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
	// Show removed heuristics.
	ShowRemoved *bool `protobuf:"varint,3,opt,name=show_removed,json=showRemoved" json:"show_removed,omitempty"`
	// List by keyword
	Keyword      *string `protobuf:"bytes,4,opt,name=keyword" json:"keyword,omitempty"`
	Page         *int32  `protobuf:"varint,5,opt,name=page" json:"page,omitempty"`
	PageSize     *int32  `protobuf:"varint,6,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
	ResponseType *string `protobuf:"bytes,7,opt,name=response_type,json=responseType" json:"response_type,omitempty"`
	// contains filtered or unexported fields
}

ListSecondaryStorageSelectorsRequest represents the parameters for lists the secondary storage selectors and their rules.

func (*ListSecondaryStorageSelectorsRequest) Descriptor deprecated

func (*ListSecondaryStorageSelectorsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListSecondaryStorageSelectorsRequest.ProtoReflect.Descriptor instead.

func (*ListSecondaryStorageSelectorsRequest) GetKeyword

func (*ListSecondaryStorageSelectorsRequest) GetPage

func (*ListSecondaryStorageSelectorsRequest) GetPageSize

func (*ListSecondaryStorageSelectorsRequest) GetResponseType

func (x *ListSecondaryStorageSelectorsRequest) GetResponseType() string

func (*ListSecondaryStorageSelectorsRequest) GetShowRemoved

func (x *ListSecondaryStorageSelectorsRequest) GetShowRemoved() bool

func (*ListSecondaryStorageSelectorsRequest) GetType

func (*ListSecondaryStorageSelectorsRequest) GetZoneId

func (*ListSecondaryStorageSelectorsRequest) ProtoMessage

func (*ListSecondaryStorageSelectorsRequest) ProtoMessage()

func (*ListSecondaryStorageSelectorsRequest) ProtoReflect

func (*ListSecondaryStorageSelectorsRequest) Reset

func (*ListSecondaryStorageSelectorsRequest) String

type ListSecondaryStorageSelectorsResponse

type ListSecondaryStorageSelectorsResponse struct {

	// The list of SecondaryStorageHeuristicss
	Items []*SecondaryStorageHeuristics `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
	// The total count of SecondaryStorageHeuristicss
	TotalCount *int32 `protobuf:"varint,2,opt,name=total_count,json=totalCount" json:"total_count,omitempty"`
	// contains filtered or unexported fields
}

ListSecondaryStorageSelectorsResponse represents the response from lists the secondary storage selectors and their rules.

func (*ListSecondaryStorageSelectorsResponse) Descriptor deprecated

func (*ListSecondaryStorageSelectorsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListSecondaryStorageSelectorsResponse.ProtoReflect.Descriptor instead.

func (*ListSecondaryStorageSelectorsResponse) GetItems

func (*ListSecondaryStorageSelectorsResponse) GetTotalCount

func (x *ListSecondaryStorageSelectorsResponse) GetTotalCount() int32

func (*ListSecondaryStorageSelectorsResponse) ProtoMessage

func (*ListSecondaryStorageSelectorsResponse) ProtoMessage()

func (*ListSecondaryStorageSelectorsResponse) ProtoReflect

func (*ListSecondaryStorageSelectorsResponse) Reset

func (*ListSecondaryStorageSelectorsResponse) String

type RemoveSecondaryStorageSelectorRequest

type RemoveSecondaryStorageSelectorRequest struct {

	// The unique identifier of the secondary storage selector to be removed.
	Id           *int64  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	ResponseType *string `protobuf:"bytes,2,opt,name=response_type,json=responseType" json:"response_type,omitempty"`
	// contains filtered or unexported fields
}

RemoveSecondaryStorageSelectorRequest represents the parameters for removes an existing secondary storage selector.

func (*RemoveSecondaryStorageSelectorRequest) Descriptor deprecated

func (*RemoveSecondaryStorageSelectorRequest) Descriptor() ([]byte, []int)

Deprecated: Use RemoveSecondaryStorageSelectorRequest.ProtoReflect.Descriptor instead.

func (*RemoveSecondaryStorageSelectorRequest) GetId

func (*RemoveSecondaryStorageSelectorRequest) GetResponseType

func (x *RemoveSecondaryStorageSelectorRequest) GetResponseType() string

func (*RemoveSecondaryStorageSelectorRequest) ProtoMessage

func (*RemoveSecondaryStorageSelectorRequest) ProtoMessage()

func (*RemoveSecondaryStorageSelectorRequest) ProtoReflect

func (*RemoveSecondaryStorageSelectorRequest) Reset

func (*RemoveSecondaryStorageSelectorRequest) String

type RemoveSecondaryStorageSelectorResponse

type RemoveSecondaryStorageSelectorResponse struct {

	// The Result
	Result *Result `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"`
	// contains filtered or unexported fields
}

RemoveSecondaryStorageSelectorResponse represents the response from removes an existing secondary storage selector.

func (*RemoveSecondaryStorageSelectorResponse) Descriptor deprecated

func (*RemoveSecondaryStorageSelectorResponse) Descriptor() ([]byte, []int)

Deprecated: Use RemoveSecondaryStorageSelectorResponse.ProtoReflect.Descriptor instead.

func (*RemoveSecondaryStorageSelectorResponse) GetResult

func (*RemoveSecondaryStorageSelectorResponse) ProtoMessage

func (*RemoveSecondaryStorageSelectorResponse) ProtoReflect

func (*RemoveSecondaryStorageSelectorResponse) Reset

func (*RemoveSecondaryStorageSelectorResponse) String

type Result

type Result struct {

	// Whether the operation was successful
	Success *bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"`
	// Any text associated with the success or failure
	DisplayText *string `protobuf:"bytes,2,opt,name=display_text,json=displayText" json:"display_text,omitempty"`
	// The ID of the resource affected by the operation
	Id *string `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"`
	// The job ID for an async operation
	JobId *string `protobuf:"bytes,4,opt,name=job_id,json=jobId" json:"job_id,omitempty"`
	// The status of the job
	JobStatus *string `protobuf:"bytes,5,opt,name=job_status,json=jobStatus" json:"job_status,omitempty"`
	// contains filtered or unexported fields
}

Result represents a generic operation result

func (*Result) Descriptor deprecated

func (*Result) Descriptor() ([]byte, []int)

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetDisplayText

func (x *Result) GetDisplayText() string

func (*Result) GetId

func (x *Result) GetId() string

func (*Result) GetJobId

func (x *Result) GetJobId() string

func (*Result) GetJobStatus

func (x *Result) GetJobStatus() string

func (*Result) GetSuccess

func (x *Result) GetSuccess() bool

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

func (x *Result) ProtoReflect() protoreflect.Message

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type SecondaryStorageHeuristics

type SecondaryStorageHeuristics struct {

	// The ID of the SecondaryStorageHeuristics
	Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// The name of the SecondaryStorageHeuristics
	Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	// The display name of the SecondaryStorageHeuristics
	DisplayName *string `protobuf:"bytes,3,opt,name=display_name,json=displayName" json:"display_name,omitempty"`
	// The description of the SecondaryStorageHeuristics
	Description *string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
	// The date this entity was created
	Created *string `protobuf:"bytes,5,opt,name=created" json:"created,omitempty"`
	// contains filtered or unexported fields
}

SecondaryStorageHeuristics represents a SecondaryStorageHeuristics Item

func (*SecondaryStorageHeuristics) Descriptor deprecated

func (*SecondaryStorageHeuristics) Descriptor() ([]byte, []int)

Deprecated: Use SecondaryStorageHeuristics.ProtoReflect.Descriptor instead.

func (*SecondaryStorageHeuristics) GetCreated

func (x *SecondaryStorageHeuristics) GetCreated() string

func (*SecondaryStorageHeuristics) GetDescription

func (x *SecondaryStorageHeuristics) GetDescription() string

func (*SecondaryStorageHeuristics) GetDisplayName

func (x *SecondaryStorageHeuristics) GetDisplayName() string

func (*SecondaryStorageHeuristics) GetId

func (*SecondaryStorageHeuristics) GetName

func (x *SecondaryStorageHeuristics) GetName() string

func (*SecondaryStorageHeuristics) ProtoMessage

func (*SecondaryStorageHeuristics) ProtoMessage()

func (*SecondaryStorageHeuristics) ProtoReflect

func (*SecondaryStorageHeuristics) Reset

func (x *SecondaryStorageHeuristics) Reset()

func (*SecondaryStorageHeuristics) String

func (x *SecondaryStorageHeuristics) String() string

type Success

type Success struct {

	// true if operation is executed successfully
	Success *bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"`
	// any text associated with the success or failure
	DisplayText *string `protobuf:"bytes,2,opt,name=display_text,json=displayText" json:"display_text,omitempty"`
	// contains filtered or unexported fields
}

Success represents a Success Operation Response

func (*Success) Descriptor deprecated

func (*Success) Descriptor() ([]byte, []int)

Deprecated: Use Success.ProtoReflect.Descriptor instead.

func (*Success) GetDisplayText

func (x *Success) GetDisplayText() string

func (*Success) GetSuccess

func (x *Success) GetSuccess() bool

func (*Success) ProtoMessage

func (*Success) ProtoMessage()

func (*Success) ProtoReflect

func (x *Success) ProtoReflect() protoreflect.Message

func (*Success) Reset

func (x *Success) Reset()

func (*Success) String

func (x *Success) String() string

type UnimplementedHeuristicsServiceServer

type UnimplementedHeuristicsServiceServer struct{}

UnimplementedHeuristicsServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

type UnsafeHeuristicsServiceServer

type UnsafeHeuristicsServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeHeuristicsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HeuristicsServiceServer will result in compilation errors.

type UpdateSecondaryStorageSelectorRequest

type UpdateSecondaryStorageSelectorRequest struct {

	// The unique identifier of the secondary storage selector.
	Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	// The heuristic rule, in JavaScript language. It is required that it returns the UUID of a secondary storage pool. An example of a rule is `if (snapshot.hypervisorType === 'KVM') { '7832f261-c602-4e8e-8580-2496ffbbc45d'; }` would allocate all snapshots with the KVM hypervisor to the specified secondary storage UUID.
	HeuristicRule *string `protobuf:"bytes,2,opt,name=heuristic_rule,json=heuristicRule" json:"heuristic_rule,omitempty"`
	ResponseType  *string `protobuf:"bytes,3,opt,name=response_type,json=responseType" json:"response_type,omitempty"`
	// contains filtered or unexported fields
}

UpdateSecondaryStorageSelectorRequest represents the parameters for updates an existing secondary storage selector.

func (*UpdateSecondaryStorageSelectorRequest) Descriptor deprecated

func (*UpdateSecondaryStorageSelectorRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateSecondaryStorageSelectorRequest.ProtoReflect.Descriptor instead.

func (*UpdateSecondaryStorageSelectorRequest) GetHeuristicRule

func (x *UpdateSecondaryStorageSelectorRequest) GetHeuristicRule() string

func (*UpdateSecondaryStorageSelectorRequest) GetId

func (*UpdateSecondaryStorageSelectorRequest) GetResponseType

func (x *UpdateSecondaryStorageSelectorRequest) GetResponseType() string

func (*UpdateSecondaryStorageSelectorRequest) ProtoMessage

func (*UpdateSecondaryStorageSelectorRequest) ProtoMessage()

func (*UpdateSecondaryStorageSelectorRequest) ProtoReflect

func (*UpdateSecondaryStorageSelectorRequest) Reset

func (*UpdateSecondaryStorageSelectorRequest) String

type UpdateSecondaryStorageSelectorResponse

type UpdateSecondaryStorageSelectorResponse struct {

	// The Result
	Result *Result `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"`
	// contains filtered or unexported fields
}

UpdateSecondaryStorageSelectorResponse represents the response from updates an existing secondary storage selector.

func (*UpdateSecondaryStorageSelectorResponse) Descriptor deprecated

func (*UpdateSecondaryStorageSelectorResponse) Descriptor() ([]byte, []int)

Deprecated: Use UpdateSecondaryStorageSelectorResponse.ProtoReflect.Descriptor instead.

func (*UpdateSecondaryStorageSelectorResponse) GetResult

func (*UpdateSecondaryStorageSelectorResponse) ProtoMessage

func (*UpdateSecondaryStorageSelectorResponse) ProtoReflect

func (*UpdateSecondaryStorageSelectorResponse) Reset

func (*UpdateSecondaryStorageSelectorResponse) String

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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