listeners

package
v22.11.9 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LabelHandler = handlers.NewTagHandler

LabelHandler ...

View Source
var VolumeHandler = handlers.NewVolumeHandler

VolumeHandler ...

Functions

func PrepareInspectionJob added in v22.11.6

func PrepareInspectionJob(ctx context.Context, tenantID string, jobDescription string) (_ backend.Job, ferr fail.Error)

func PrepareJob

func PrepareJob(ctx context.Context, tenantID string, jobDescription string) (_ backend.Job, ferr fail.Error)

PrepareJob creates a new job

Types

type BucketListener

type BucketListener struct {
	protocol.UnimplementedBucketServiceServer
}

BucketListener is the bucket service gRPC server

func (*BucketListener) Clear

func (s *BucketListener) Clear(inctx context.Context, in *protocol.BucketRequest) (
	empty *googleprotobuf.Empty, err error,
)

Clear a bucket

func (*BucketListener) Create

func (s *BucketListener) Create(inctx context.Context, in *protocol.BucketRequest) (
	empty *googleprotobuf.Empty, err error,
)

Create a new bucket

func (*BucketListener) Delete

func (s *BucketListener) Delete(inctx context.Context, in *protocol.BucketDeleteRequest) (
	empty *googleprotobuf.Empty, err error,
)

Delete a bucket

func (*BucketListener) Download

Download a bucket

func (*BucketListener) Inspect

func (s *BucketListener) Inspect(inctx context.Context, in *protocol.BucketRequest) (
	_ *protocol.BucketResponse, err error,
)

Inspect a bucket

func (*BucketListener) List

List available buckets

func (*BucketListener) Mount

func (s *BucketListener) Mount(inctx context.Context, in *protocol.BucketMountRequest) (
	empty *googleprotobuf.Empty, err error,
)

Mount a bucket on the filesystem of the host

func (*BucketListener) Unmount

func (s *BucketListener) Unmount(inctx context.Context, in *protocol.BucketMountRequest) (
	empty *googleprotobuf.Empty, err error,
)

Unmount a bucket from the filesystem of the host

type ClusterListener

type ClusterListener struct {
	protocol.UnimplementedClusterServiceServer
}

ClusterListener host service server grpc

func (*ClusterListener) Create

Create creates a new cluster

func (*ClusterListener) Delete

Delete a cluster

func (*ClusterListener) DeleteNode

DeleteNode removes node(s) from a cluster

func (*ClusterListener) Expand

Expand adds node(s) to a cluster

func (*ClusterListener) FindAvailableMaster

func (s *ClusterListener) FindAvailableMaster(inctx context.Context, in *protocol.Reference) (_ *protocol.Host, err error)

FindAvailableMaster determines the first master available master (ie the one that responds on ssh request)

func (*ClusterListener) Inspect

Inspect a cluster

func (*ClusterListener) InspectMaster

func (s *ClusterListener) InspectMaster(inctx context.Context, in *protocol.ClusterNodeRequest) (_ *protocol.Host, err error)

InspectMaster returns the information about a master of the cluster

func (*ClusterListener) InspectNode

func (s *ClusterListener) InspectNode(inctx context.Context, in *protocol.ClusterNodeRequest) (_ *protocol.Host, err error)

InspectNode inspects a node of the cluster

func (*ClusterListener) List

List lists clusters

func (*ClusterListener) ListMasters

ListMasters returns the list of masters of the cluster

func (*ClusterListener) ListNodes

ListNodes lists node(s) of a cluster

func (*ClusterListener) Shrink

Shrink removes node(s) from a cluster

func (*ClusterListener) Start

func (s *ClusterListener) Start(inctx context.Context, in *protocol.Reference) (empty *googleprotobuf.Empty, err error)

Start ...

func (*ClusterListener) StartMaster

func (s *ClusterListener) StartMaster(inctx context.Context, in *protocol.ClusterNodeRequest) (empty *googleprotobuf.Empty, err error)

StartMaster starts a stopped master of the ClassicCluster

func (*ClusterListener) StartNode

func (s *ClusterListener) StartNode(inctx context.Context, in *protocol.ClusterNodeRequest) (empty *googleprotobuf.Empty, err error)

StartNode starts a stopped node of the cluster

func (*ClusterListener) State

State returns the status of a cluster

func (*ClusterListener) StateMaster

func (s *ClusterListener) StateMaster(inctx context.Context, in *protocol.ClusterNodeRequest) (_ *protocol.HostStatus, err error)

StateMaster returns the state of a master of the ClassicCluster

func (*ClusterListener) StateNode

StateNode returns the state of a node of the cluster

func (*ClusterListener) Stop

func (s *ClusterListener) Stop(inctx context.Context, in *protocol.Reference) (empty *googleprotobuf.Empty, err error)

Stop shutdowns an entire cluster (including the gateways)

func (*ClusterListener) StopMaster

func (s *ClusterListener) StopMaster(inctx context.Context, in *protocol.ClusterNodeRequest) (empty *googleprotobuf.Empty, err error)

StopMaster stops a master of the ClassicCluster

func (*ClusterListener) StopNode

func (s *ClusterListener) StopNode(inctx context.Context, in *protocol.ClusterNodeRequest) (empty *googleprotobuf.Empty, err error)

StopNode stops a node of the cluster

type FeatureListener

type FeatureListener struct {
	protocol.UnimplementedFeatureServiceServer
}

FeatureListener feature service server grpc

func (*FeatureListener) Add

Add ...

func (*FeatureListener) Check

Check checks if a feature installed on target

func (*FeatureListener) List

List ...

func (*FeatureListener) Remove

Remove uninstalls a Feature

type HostListener

type HostListener struct {
	protocol.UnimplementedHostServiceServer
}

HostListener host service server grpc

func (*HostListener) BindLabel

func (s *HostListener) BindLabel(inctx context.Context, in *protocol.LabelBindRequest) (empty *googleprotobuf.Empty, err error)

BindLabel binds a Label to a Host

func (*HostListener) BindSecurityGroup

func (s *HostListener) BindSecurityGroup(inctx context.Context, in *protocol.SecurityGroupHostBindRequest) (empty *googleprotobuf.Empty, err error)

BindSecurityGroup attaches a Security Group to a host

func (*HostListener) Create

func (s *HostListener) Create(inctx context.Context, in *protocol.HostDefinition) (_ *protocol.Host, err error)

Create creates a new host

func (*HostListener) Delete

func (s *HostListener) Delete(inctx context.Context, in *protocol.HostDeleteRequest) (empty *googleprotobuf.Empty, err error)

Delete a host

func (*HostListener) DisableSecurityGroup

func (s *HostListener) DisableSecurityGroup(inctx context.Context, in *protocol.SecurityGroupHostBindRequest) (empty *googleprotobuf.Empty, err error)

DisableSecurityGroup applies a Security Group already attached (if not already applied)

func (*HostListener) EnableSecurityGroup

func (s *HostListener) EnableSecurityGroup(inctx context.Context, in *protocol.SecurityGroupHostBindRequest) (empty *googleprotobuf.Empty, err error)

EnableSecurityGroup applies a Security Group already attached (if not already applied)

func (*HostListener) Inspect

func (s *HostListener) Inspect(inctx context.Context, in *protocol.Reference) (h *protocol.Host, ferr error)

Inspect a host

func (*HostListener) InspectLabel

func (s *HostListener) InspectLabel(inctx context.Context, in *protocol.HostLabelRequest) (_ *protocol.HostLabelResponse, err error)

InspectLabel inspects a Label of a Host

func (*HostListener) List

func (s *HostListener) List(inctx context.Context, in *protocol.HostListRequest) (hl *protocol.HostList, err error)

List lists hosts managed by SafeScale only, or all hosts.

func (*HostListener) ListLabels

ListLabels lists Label/Tag bound to a Host

func (*HostListener) ListSecurityGroups

ListSecurityGroups applies a Security Group already attached (if not already applied)

func (*HostListener) Reboot

func (s *HostListener) Reboot(inctx context.Context, in *protocol.Reference) (empty *googleprotobuf.Empty, err error)

Reboot reboots a host.

func (*HostListener) ResetLabel

func (s *HostListener) ResetLabel(inctx context.Context, in *protocol.LabelBindRequest) (empty *googleprotobuf.Empty, err error)

ResetLabel restores default value of Label to the Host

func (*HostListener) SSH

func (s *HostListener) SSH(inctx context.Context, in *protocol.Reference) (_ *protocol.SshConfig, err error)

SSH returns ssh parameters to access a host

func (*HostListener) Start

func (s *HostListener) Start(inctx context.Context, in *protocol.Reference) (empty *googleprotobuf.Empty, err error)

Start ...

func (*HostListener) Status

func (s *HostListener) Status(inctx context.Context, in *protocol.Reference) (ht *protocol.HostStatus, err error)

Status returns the status of a host (running or stopped mainly)

func (*HostListener) Stop

func (s *HostListener) Stop(inctx context.Context, in *protocol.Reference) (empty *googleprotobuf.Empty, err error)

Stop shutdowns a host.

func (*HostListener) UnbindLabel

func (s *HostListener) UnbindLabel(inctx context.Context, in *protocol.LabelBindRequest) (empty *googleprotobuf.Empty, err error)

UnbindLabel unbinds a Label from a Host

func (*HostListener) UnbindSecurityGroup

func (s *HostListener) UnbindSecurityGroup(inctx context.Context, in *protocol.SecurityGroupHostBindRequest) (empty *googleprotobuf.Empty, err error)

UnbindSecurityGroup detaches a Security Group from a host

func (*HostListener) UpdateLabel

func (s *HostListener) UpdateLabel(inctx context.Context, in *protocol.LabelBindRequest) (empty *googleprotobuf.Empty, err error)

UpdateLabel updates Label value for the Host

type ImageListener

type ImageListener struct {
	protocol.UnimplementedImageServiceServer
}

ImageListener image service server grpc

func (*ImageListener) List

List available images

type JobManagerListener

type JobManagerListener struct {
	protocol.UnimplementedJobServiceServer
}

JobManagerListener service server gRPC

func (*JobManagerListener) List

List running process

func (*JobManagerListener) Stop

Stop specified process

type LabelListener

type LabelListener struct {
	protocol.UnimplementedLabelServiceServer
}

LabelListener is the tag service gRPC server

func (*LabelListener) Create

Create a new label/tag

func (*LabelListener) Delete

func (s *LabelListener) Delete(inctx context.Context, in *protocol.LabelDeleteRequest) (empty *googleprotobuf.Empty, err error)

Delete a Label

func (*LabelListener) Inspect

Inspect a Label/Tag

func (*LabelListener) List

List the available tags

type NetworkListener

type NetworkListener struct {
	protocol.UnimplementedNetworkServiceServer
}

NetworkListener network service server grpc

func (*NetworkListener) Create

Create a new network

func (*NetworkListener) Delete

Delete a network

func (*NetworkListener) Inspect

func (s *NetworkListener) Inspect(inctx context.Context, in *protocol.Reference) (_ *protocol.Network, err error)

Inspect returns infos on a network

func (*NetworkListener) List

List existing networks

type SSHListener

type SSHListener struct {
	protocol.UnimplementedSshServiceServer
}

SSHListener SSH service server grpc

func (*SSHListener) Copy

Copy copies file from/to a host

func (*SSHListener) Run

func (s *SSHListener) Run(inctx context.Context, in *protocol.SshCommand) (sr *protocol.SshResponse, ferr error)

Run executes an ssh command on a host

type SecurityGroupListener

type SecurityGroupListener struct {
	protocol.UnimplementedSecurityGroupServiceServer
}

SecurityGroupListener security-group service server grpc

func (*SecurityGroupListener) AddRule

AddRule creates a new rule and add it to an existing security group

func (*SecurityGroupListener) Bonds

Bonds lists the resources bound to the Security Group

func (*SecurityGroupListener) Clear

func (s *SecurityGroupListener) Clear(inctx context.Context, in *protocol.Reference) (empty *googleprotobuf.Empty, err error)

Clear calls the clear method to remove all rules from a security group

func (*SecurityGroupListener) Create

Create creates a new Security Group

func (*SecurityGroupListener) Delete

Delete a host

func (*SecurityGroupListener) DeleteRule

DeleteRule deletes a rule identified by id from a security group

func (*SecurityGroupListener) Inspect

Inspect a host

func (*SecurityGroupListener) List

List lists hosts managed by SafeScale only, or all hosts.

func (*SecurityGroupListener) Reset

func (s *SecurityGroupListener) Reset(inctx context.Context, in *protocol.Reference) (empty *googleprotobuf.Empty, err error)

Reset clears the rules of a security group and readds the ones stored in metadata

type ShareListener

type ShareListener struct {
	protocol.UnimplementedShareServiceServer
}

ShareListener Share service server grpc

func (*ShareListener) Create

Create calls share service creation

func (*ShareListener) Delete

func (s *ShareListener) Delete(inctx context.Context, in *protocol.ShareDeleteRequest) (empty *googleprotobuf.Empty, err error)

Delete call share service deletion

func (*ShareListener) Inspect

func (s *ShareListener) Inspect(inctx context.Context, in *protocol.Reference) (sml *protocol.ShareMountList, err error)

Inspect shows the detail of a share and all connected clients

func (*ShareListener) List

func (s *ShareListener) List(inctx context.Context, in *protocol.Reference) (_ *protocol.ShareList, err error)

List return the list of all available shares

func (*ShareListener) Mount

Mount mounts share on a local directory of the given host

func (*ShareListener) Unmount

func (s *ShareListener) Unmount(inctx context.Context, in *protocol.ShareMountDefinition) (empty *googleprotobuf.Empty, err error)

Unmount unmounts share from the given host

type StoredCPUInfo

type StoredCPUInfo struct {
	ID           string `bow:"key"`
	TenantName   string `json:"tenant_name,omitempty"`
	TemplateID   string `json:"template_id,omitempty"`
	TemplateName string `json:"template_name,omitempty"`
	ImageID      string `json:"image_id,omitempty"`
	ImageName    string `json:"image_name,omitempty"`
	LastUpdated  string `json:"last_updated,omitempty"`

	NumberOfCPU    int     `json:"number_of_cpu,omitempty"`
	NumberOfCore   int     `json:"number_of_core,omitempty"`
	NumberOfSocket int     `json:"number_of_socket,omitempty"`
	CPUFrequency   float64 `json:"cpu_frequency,omitempty"`
	CPUArch        string  `json:"cpu_arch,omitempty"`
	Hypervisor     string  `json:"hypervisor,omitempty"`
	CPUModel       string  `json:"cpu_model,omitempty"`
	RAMSize        float64 `json:"ram_size,omitempty"`
	RAMFreq        float64 `json:"ram_freq,omitempty"`
	GPU            int     `json:"gpu,omitempty"`
	GPUModel       string  `json:"gpu_model,omitempty"`
}

StoredCPUInfo ...

type SubnetListener

type SubnetListener struct {
	protocol.UnimplementedSubnetServiceServer
}

SubnetListener subnet service server gRPC

func (*SubnetListener) BindSecurityGroup

func (s *SubnetListener) BindSecurityGroup(inctx context.Context, in *protocol.SecurityGroupSubnetBindRequest) (empty *googleprotobuf.Empty, err error)

BindSecurityGroup attaches a Security Group to a hostnetwork

func (*SubnetListener) Create

Create a new subnet

func (*SubnetListener) Delete

Delete a/many subnet/s

func (*SubnetListener) DisableSecurityGroup

func (s *SubnetListener) DisableSecurityGroup(inctx context.Context, in *protocol.SecurityGroupSubnetBindRequest) (empty *googleprotobuf.Empty, err error)

DisableSecurityGroup detaches a Security Group from a subnet

func (*SubnetListener) EnableSecurityGroup

func (s *SubnetListener) EnableSecurityGroup(inctx context.Context, in *protocol.SecurityGroupSubnetBindRequest) (empty *googleprotobuf.Empty, err error)

EnableSecurityGroup applies the rules of a bound security group on a network

func (*SubnetListener) Inspect

Inspect returns infos on a subnet

func (*SubnetListener) List

List existing networks

func (*SubnetListener) ListSecurityGroups

ListSecurityGroups lists the Security Group bound to subnet

func (*SubnetListener) UnbindSecurityGroup

func (s *SubnetListener) UnbindSecurityGroup(inctx context.Context, in *protocol.SecurityGroupSubnetBindRequest) (empty *googleprotobuf.Empty, err error)

UnbindSecurityGroup detaches a Security Group from a subnet

type TemplateListener

type TemplateListener struct {
	protocol.UnimplementedTemplateServiceServer
}

TemplateListener host service server grpc

func (*TemplateListener) Inspect

Inspect returns information about a tenant

func (*TemplateListener) List

List available templates

func (*TemplateListener) Match

Match lists templates that match the sizing

type TenantListener

type TenantListener struct {
	protocol.UnimplementedTenantServiceServer
}

TenantListener server is used to implement SafeScale.safescale.

func (*TenantListener) Get

Get returns the name of the current tenant used

func (*TenantListener) Inspect

Inspect returns information about a tenant

func (*TenantListener) List

List lists registered tenants

func (*TenantListener) Scan

Scan proceeds a scan of host corresponding to each template to gather real data(metadata in particular)

func (*TenantListener) Set

func (s *TenantListener) Set(inctx context.Context, in *protocol.TenantName) (empty *googleprotobuf.Empty, err error)

Set sets the tenant to use for each command

type VolumeListener

type VolumeListener struct {
	protocol.UnimplementedVolumeServiceServer
}

VolumeListener is the volume service gRPC server

func (*VolumeListener) Attach

Attach a volume to a host and create a mount point

func (*VolumeListener) Create

Create a new volume

func (*VolumeListener) Delete

Delete a volume

func (*VolumeListener) Detach

Detach a volume from a host. It umount associated mountpoint

func (*VolumeListener) Inspect

Inspect a volume

func (*VolumeListener) List

List the available volumes

Jump to

Keyboard shortcuts

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