listeners

package
v21.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VolumeHandler = handlers.NewVolumeHandler

VolumeHandler ...

Functions

func PrepareJob

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

PrepareJob creates a new job

func PrepareJobWithoutService

func PrepareJobWithoutService(ctx context.Context, jobDescription string) (_ server.Job, ferr fail.Error)

PrepareJobWithoutService creates a new job without service instanciation (for example to be used with metadata upgrade)

Types

type BucketListener

type BucketListener struct {
	protocol.UnimplementedBucketServiceServer
}

BucketListener is the bucket service gRPC server

func (*BucketListener) Create

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

Create a new bucket

func (*BucketListener) Delete

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

Delete a bucket

func (*BucketListener) Inspect

Inspect a bucket

func (*BucketListener) List

List available buckets

func (*BucketListener) Mount

Mount a bucket on the filesystem of the host

func (*BucketListener) Unmount

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

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

DeleteNode removes node(s) from a cluster

func (*ClusterListener) Expand

Expand adds node(s) to a cluster

func (*ClusterListener) FindAvailableMaster

func (s *ClusterListener) FindAvailableMaster(ctx 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(ctx 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(ctx 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(ctx context.Context, in *protocol.Reference) (empty *googleprotobuf.Empty, err error)

Start ...

func (*ClusterListener) StartMaster

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

StartMaster starts a stopped master of the Cluster

func (*ClusterListener) StartNode

func (s *ClusterListener) StartNode(ctx 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

StateMaster returns the state of a master of the Cluster

func (*ClusterListener) StateNode

StateNode returns the state of a node of the cluster

func (*ClusterListener) Stop

func (s *ClusterListener) Stop(ctx 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(ctx context.Context, in *protocol.ClusterNodeRequest) (empty *googleprotobuf.Empty, err error)

StopMaster stops a master of the Cluster

func (*ClusterListener) StopNode

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) Export added in v21.11.1

Export exports the content of the feature file

func (*FeatureListener) Inspect added in v21.11.1

Inspect ...

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) BindSecurityGroup

func (s *HostListener) BindSecurityGroup(ctx 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(ctx context.Context, in *protocol.HostDefinition) (_ *protocol.Host, err error)

Create creates a new host

func (*HostListener) Delete

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

Delete a host

func (*HostListener) DisableSecurityGroup

func (s *HostListener) DisableSecurityGroup(ctx 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(ctx 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(ctx context.Context, in *protocol.Reference) (h *protocol.Host, ferr error)

Inspect a host

func (*HostListener) List

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

func (*HostListener) ListSecurityGroups

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

func (*HostListener) Reboot

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

Reboot reboots a host.

func (*HostListener) Resize

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

Resize a host

func (*HostListener) SSH

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

SSH returns ssh parameters to access a host

func (*HostListener) Start

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

Start ...

func (*HostListener) Status

func (s *HostListener) Status(ctx 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(ctx context.Context, in *protocol.Reference) (empty *googleprotobuf.Empty, err error)

Stop shutdowns a host.

func (*HostListener) UnbindSecurityGroup

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

UnbindSecurityGroup detaches a Security Group from a 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 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(ctx 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

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 eisting security group

func (*SecurityGroupListener) Bonds

Bonds lists the resources bound to the Security Group

func (*SecurityGroupListener) Clear

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

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

func (*SecurityGroupListener) Sanitize

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

Sanitize checks if provider-side rules are coherent with registered ones 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(ctx context.Context, in *protocol.Reference) (empty *googleprotobuf.Empty, err error)

Delete call share service deletion

func (*ShareListener) Inspect

func (s *ShareListener) Inspect(ctx 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(ctx 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

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(ctx 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(ctx 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(ctx 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(ctx 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) Cleanup

Cleanup removes everything corresponding to SafeScale from tenant (metadata in particular)

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(ctx context.Context, in *protocol.TenantName) (empty *googleprotobuf.Empty, err error)

Set sets the tenant to use for each command

func (*TenantListener) Upgrade

Upgrade upgrades metadata of a tenant if needed

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

func (s *VolumeListener) Delete(ctx context.Context, in *protocol.Reference) (empty *googleprotobuf.Empty, err error)

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