provisioning

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: BSD-2-Clause Imports: 24 Imported by: 0

README

Provisioning

Example

BlockStorage
grpc_cli call localhost:20183 n0stack.provisioning.BlockStorageService/CreateBlockStorage '
name: "test-empty-volume"
annotations {
  key: "n0core/provisioning/request_node_name"
  value: "test"
}
request_bytes: 1024
limit_bytes: 1073741824
'
grpc_cli call localhost:20183 n0stack.provisioning.BlockStorageService/FetchBlockStorage '
name: "test-ubuntu-volume"
annotations {
  key: "n0core/provisioning/request_node_name"
  value: "test"
}
request_bytes: 1073741824
limit_bytes: 10737418240
source_url: "http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img"
'

grpc_cli call localhost:20183 n0stack.provisioning.BlockStorageService/FetchBlockStorage '
name: "test-ubuntu1804"
annotations {
  key: "n0core/provisioning/request_node_name"
  value: "test"
}
request_bytes: 1073741824
limit_bytes: 10737418240
source_url: "http://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img"
'
grpc_cli call localhost:20183 n0stack.provisioning.BlockStorageService/ListBlockStorages ''
grpc_cli call localhost:20183 n0stack.provisioning.BlockStorageService/GetBlockStorage 'name: "test-ubuntu-volume"'
grpc_cli call localhost:20183 n0stack.provisioning.BlockStorageService/SetAvailableBlockStorage 'name: test-ubuntu-volume"'
grpc_cli call localhost:20183 n0stack.provisioning.BlockStorageService/SetInuseBlockStorage 'name: "test-ubuntu-volume"'
Virtual machine
grpc_cli call localhost:20184 n0stack.provisioning.VirtualMachineService/CreateVirtualMachine '
name: "test-vm"
annotations {
  key: "n0core/provisioning/request_node_name"
  value: "test"
}

request_cpu_milli_core: 10
limit_cpu_milli_core: 1000
request_memory_bytes: 1073741824
limit_memory_bytes: 1073741824

block_storage_names: "test-ubuntu-volume"
nics {
  network_name: "test-network"
}
'
grpc_cli call localhost:20184 n0stack.provisioning.VirtualMachineService/ListVirtualMachines ''
grpc_cli call localhost:20184 n0stack.provisioning.VirtualMachineService/GetVirtualMachine 'name: "test-vm"'
grpc_cli call localhost:20184 n0stack.provisioning.VirtualMachineService/DeleteVirtualMachine 'name: "test-vm"'
grpc_cli call localhost:20184 n0stack.provisioning.VirtualMachineService/BootVirtualMachine 'name: "test-vm"'
grpc_cli call localhost:20184 n0stack.provisioning.VirtualMachineService/RebootVirtualMachine '
name: "test-vm"
hard: true
'
grpc_cli call localhost:20184 n0stack.provisioning.VirtualMachineService/ShutdownVirtualMachine '
name: "test-vm"
hard: true
'

Documentation

Index

Constants

View Source
const (
	QMPMonitorSocketFile   = "monitor.sock"
	VNCWebSocketPortOffset = 6900
)
View Source
const (
	// Create のときに自動生成、消されると困る
	AnnotationBlockStoragePath = "n0core/provisioning/block_storage_url"
)
View Source
const AnnotationRequestNodeName = "n0core/provisioning/request_node_name"

Create のときに Node を指定したい時に利用

View Source
const AnnotationVNCWebSocketPort = "n0core/provisioning/virtual_machine_vnc_websocket_port"

Variables

View Source
var N0coreVirtualMachineNamespace uuid.UUID
View Source
var VirtualMachineAgentState_name = map[int32]string{
	0: "FAILED",
	1: "UNKNOWN",
	2: "SHUTDOWN",
	3: "RUNNING",
	4: "PAUSED",
}
View Source
var VirtualMachineAgentState_value = map[string]int32{
	"FAILED":   0,
	"UNKNOWN":  1,
	"SHUTDOWN": 2,
	"RUNNING":  3,
	"PAUSED":   4,
}

Functions

func GetAPIStateFromAgentState

func GetAPIStateFromAgentState(s VirtualMachineAgentState) pprovisioning.VirtualMachine_VirtualMachineState

func RegisterBlockStorageAgentServiceServer added in v0.1.1

func RegisterBlockStorageAgentServiceServer(s *grpc.Server, srv BlockStorageAgentServiceServer)

func RegisterVirtualMachineAgentServiceServer

func RegisterVirtualMachineAgentServiceServer(s *grpc.Server, srv VirtualMachineAgentServiceServer)

func TrimNetdevName

func TrimNetdevName(name string) string

Types

type BlockDev

type BlockDev struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Url                  string   `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
	BootIndex            uint32   `protobuf:"varint,3,opt,name=boot_index,json=bootIndex" json:"boot_index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BlockDev) Descriptor

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

func (*BlockDev) GetBootIndex

func (m *BlockDev) GetBootIndex() uint32

func (*BlockDev) GetName

func (m *BlockDev) GetName() string

func (*BlockDev) GetUrl

func (m *BlockDev) GetUrl() string

func (*BlockDev) ProtoMessage

func (*BlockDev) ProtoMessage()

func (*BlockDev) Reset

func (m *BlockDev) Reset()

func (*BlockDev) String

func (m *BlockDev) String() string

func (*BlockDev) XXX_DiscardUnknown

func (m *BlockDev) XXX_DiscardUnknown()

func (*BlockDev) XXX_Marshal

func (m *BlockDev) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockDev) XXX_Merge

func (dst *BlockDev) XXX_Merge(src proto.Message)

func (*BlockDev) XXX_Size

func (m *BlockDev) XXX_Size() int

func (*BlockDev) XXX_Unmarshal

func (m *BlockDev) XXX_Unmarshal(b []byte) error

type BlockStorageAPI added in v0.1.1

type BlockStorageAPI struct {
	// contains filtered or unexported fields
}

func CreateBlockStorageAPI added in v0.1.1

func CreateBlockStorageAPI(ds datastore.Datastore, na ppool.NodeServiceClient) (*BlockStorageAPI, error)

func (*BlockStorageAPI) CopyBlockStorage added in v0.1.1

func (a *BlockStorageAPI) CopyBlockStorage(ctx context.Context, req *pprovisioning.CopyBlockStorageRequest) (*pprovisioning.BlockStorage, error)

func (*BlockStorageAPI) CreateBlockStorage added in v0.1.1

func (a *BlockStorageAPI) CreateBlockStorage(ctx context.Context, req *pprovisioning.CreateBlockStorageRequest) (*pprovisioning.BlockStorage, error)

func (*BlockStorageAPI) DeleteBlockStorage added in v0.1.1

func (a *BlockStorageAPI) DeleteBlockStorage(ctx context.Context, req *pprovisioning.DeleteBlockStorageRequest) (*empty.Empty, error)

func (*BlockStorageAPI) FetchBlockStorage added in v0.1.1

func (a *BlockStorageAPI) FetchBlockStorage(ctx context.Context, req *pprovisioning.FetchBlockStorageRequest) (*pprovisioning.BlockStorage, error)

func (*BlockStorageAPI) GetBlockStorage added in v0.1.1

func (a *BlockStorageAPI) GetBlockStorage(ctx context.Context, req *pprovisioning.GetBlockStorageRequest) (*pprovisioning.BlockStorage, error)

func (*BlockStorageAPI) ListBlockStorages added in v0.1.1

func (a *BlockStorageAPI) ListBlockStorages(ctx context.Context, req *pprovisioning.ListBlockStoragesRequest) (*pprovisioning.ListBlockStoragesResponse, error)

func (*BlockStorageAPI) SetAvailableBlockStorage added in v0.1.1

func (a *BlockStorageAPI) SetAvailableBlockStorage(ctx context.Context, req *pprovisioning.SetAvailableBlockStorageRequest) (*pprovisioning.BlockStorage, error)

func (*BlockStorageAPI) SetInuseBlockStorage added in v0.1.1

func (a *BlockStorageAPI) SetInuseBlockStorage(ctx context.Context, req *pprovisioning.SetInuseBlockStorageRequest) (*pprovisioning.BlockStorage, error)

func (*BlockStorageAPI) SetProtectedBlockStorage added in v0.1.1

func (a *BlockStorageAPI) SetProtectedBlockStorage(ctx context.Context, req *pprovisioning.SetProtectedBlockStorageRequest) (*pprovisioning.BlockStorage, error)

func (*BlockStorageAPI) UpdateBlockStorage added in v0.1.1

func (a *BlockStorageAPI) UpdateBlockStorage(ctx context.Context, req *pprovisioning.UpdateBlockStorageRequest) (*pprovisioning.BlockStorage, error)

type BlockStorageAgent added in v0.1.1

type BlockStorageAgent struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Bytes                uint64   `protobuf:"varint,2,opt,name=bytes" json:"bytes,omitempty"`
	Path                 string   `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BlockStorageAgent) Descriptor added in v0.1.1

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

func (*BlockStorageAgent) GetBytes added in v0.1.1

func (m *BlockStorageAgent) GetBytes() uint64

func (*BlockStorageAgent) GetName added in v0.1.1

func (m *BlockStorageAgent) GetName() string

func (*BlockStorageAgent) GetPath added in v0.1.1

func (m *BlockStorageAgent) GetPath() string

func (*BlockStorageAgent) ProtoMessage added in v0.1.1

func (*BlockStorageAgent) ProtoMessage()

func (*BlockStorageAgent) Reset added in v0.1.1

func (m *BlockStorageAgent) Reset()

func (*BlockStorageAgent) String added in v0.1.1

func (m *BlockStorageAgent) String() string

func (*BlockStorageAgent) XXX_DiscardUnknown added in v0.1.1

func (m *BlockStorageAgent) XXX_DiscardUnknown()

func (*BlockStorageAgent) XXX_Marshal added in v0.1.1

func (m *BlockStorageAgent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockStorageAgent) XXX_Merge added in v0.1.1

func (dst *BlockStorageAgent) XXX_Merge(src proto.Message)

func (*BlockStorageAgent) XXX_Size added in v0.1.1

func (m *BlockStorageAgent) XXX_Size() int

func (*BlockStorageAgent) XXX_Unmarshal added in v0.1.1

func (m *BlockStorageAgent) XXX_Unmarshal(b []byte) error

type BlockStorageAgentAPI added in v0.1.1

type BlockStorageAgentAPI struct {
	// contains filtered or unexported fields
}

func CreateBlockStorageAgentAPI added in v0.1.1

func CreateBlockStorageAgentAPI(basedir string) (*BlockStorageAgentAPI, error)

func (*BlockStorageAgentAPI) CreateBlockStorageAgentWithDownloading added in v0.1.1

func (a *BlockStorageAgentAPI) CreateBlockStorageAgentWithDownloading(ctx context.Context, req *CreateBlockStorageAgentWithDownloadingRequest) (*BlockStorageAgent, error)

タイムアウトが心配

func (*BlockStorageAgentAPI) CreateEmptyBlockStorageAgent added in v0.1.1

func (a *BlockStorageAgentAPI) CreateEmptyBlockStorageAgent(ctx context.Context, req *CreateEmptyBlockStorageAgentRequest) (*BlockStorageAgent, error)

func (*BlockStorageAgentAPI) DeleteBlockStorageAgent added in v0.1.1

func (a *BlockStorageAgentAPI) DeleteBlockStorageAgent(ctx context.Context, req *DeleteBlockStorageAgentRequest) (*empty.Empty, error)

type BlockStorageAgentServiceClient added in v0.1.1

type BlockStorageAgentServiceClient interface {
	CreateEmptyBlockStorageAgent(ctx context.Context, in *CreateEmptyBlockStorageAgentRequest, opts ...grpc.CallOption) (*BlockStorageAgent, error)
	CreateBlockStorageAgentWithDownloading(ctx context.Context, in *CreateBlockStorageAgentWithDownloadingRequest, opts ...grpc.CallOption) (*BlockStorageAgent, error)
	DeleteBlockStorageAgent(ctx context.Context, in *DeleteBlockStorageAgentRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

func NewBlockStorageAgentServiceClient added in v0.1.1

func NewBlockStorageAgentServiceClient(cc *grpc.ClientConn) BlockStorageAgentServiceClient

type BlockStorageAgentServiceServer added in v0.1.1

type BlockStorageAgentServiceServer interface {
	CreateEmptyBlockStorageAgent(context.Context, *CreateEmptyBlockStorageAgentRequest) (*BlockStorageAgent, error)
	CreateBlockStorageAgentWithDownloading(context.Context, *CreateBlockStorageAgentWithDownloadingRequest) (*BlockStorageAgent, error)
	DeleteBlockStorageAgent(context.Context, *DeleteBlockStorageAgentRequest) (*empty.Empty, error)
}

type BootVirtualMachineAgentRequest

type BootVirtualMachineAgentRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BootVirtualMachineAgentRequest) Descriptor

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

func (*BootVirtualMachineAgentRequest) GetName

func (*BootVirtualMachineAgentRequest) ProtoMessage

func (*BootVirtualMachineAgentRequest) ProtoMessage()

func (*BootVirtualMachineAgentRequest) Reset

func (m *BootVirtualMachineAgentRequest) Reset()

func (*BootVirtualMachineAgentRequest) String

func (*BootVirtualMachineAgentRequest) XXX_DiscardUnknown

func (m *BootVirtualMachineAgentRequest) XXX_DiscardUnknown()

func (*BootVirtualMachineAgentRequest) XXX_Marshal

func (m *BootVirtualMachineAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BootVirtualMachineAgentRequest) XXX_Merge

func (dst *BootVirtualMachineAgentRequest) XXX_Merge(src proto.Message)

func (*BootVirtualMachineAgentRequest) XXX_Size

func (m *BootVirtualMachineAgentRequest) XXX_Size() int

func (*BootVirtualMachineAgentRequest) XXX_Unmarshal

func (m *BootVirtualMachineAgentRequest) XXX_Unmarshal(b []byte) error

type BootVirtualMachineAgentResponse

type BootVirtualMachineAgentResponse struct {
	State                VirtualMachineAgentState `protobuf:"varint,1,opt,name=state,enum=n0stack.internal.n0core.provisioning.VirtualMachineAgentState" json:"state,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

func (*BootVirtualMachineAgentResponse) Descriptor

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

func (*BootVirtualMachineAgentResponse) GetState

func (*BootVirtualMachineAgentResponse) ProtoMessage

func (*BootVirtualMachineAgentResponse) ProtoMessage()

func (*BootVirtualMachineAgentResponse) Reset

func (*BootVirtualMachineAgentResponse) String

func (*BootVirtualMachineAgentResponse) XXX_DiscardUnknown

func (m *BootVirtualMachineAgentResponse) XXX_DiscardUnknown()

func (*BootVirtualMachineAgentResponse) XXX_Marshal

func (m *BootVirtualMachineAgentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BootVirtualMachineAgentResponse) XXX_Merge

func (dst *BootVirtualMachineAgentResponse) XXX_Merge(src proto.Message)

func (*BootVirtualMachineAgentResponse) XXX_Size

func (m *BootVirtualMachineAgentResponse) XXX_Size() int

func (*BootVirtualMachineAgentResponse) XXX_Unmarshal

func (m *BootVirtualMachineAgentResponse) XXX_Unmarshal(b []byte) error

type CreateBlockStorageAgentWithDownloadingRequest added in v0.1.1

type CreateBlockStorageAgentWithDownloadingRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Bytes                uint64   `protobuf:"varint,2,opt,name=bytes" json:"bytes,omitempty"`
	SourceUrl            string   `protobuf:"bytes,4,opt,name=source_url,json=sourceUrl" json:"source_url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateBlockStorageAgentWithDownloadingRequest) Descriptor added in v0.1.1

func (*CreateBlockStorageAgentWithDownloadingRequest) GetBytes added in v0.1.1

func (*CreateBlockStorageAgentWithDownloadingRequest) GetName added in v0.1.1

func (*CreateBlockStorageAgentWithDownloadingRequest) GetSourceUrl added in v0.1.1

func (*CreateBlockStorageAgentWithDownloadingRequest) ProtoMessage added in v0.1.1

func (*CreateBlockStorageAgentWithDownloadingRequest) Reset added in v0.1.1

func (*CreateBlockStorageAgentWithDownloadingRequest) String added in v0.1.1

func (*CreateBlockStorageAgentWithDownloadingRequest) XXX_DiscardUnknown added in v0.1.1

func (m *CreateBlockStorageAgentWithDownloadingRequest) XXX_DiscardUnknown()

func (*CreateBlockStorageAgentWithDownloadingRequest) XXX_Marshal added in v0.1.1

func (m *CreateBlockStorageAgentWithDownloadingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateBlockStorageAgentWithDownloadingRequest) XXX_Merge added in v0.1.1

func (*CreateBlockStorageAgentWithDownloadingRequest) XXX_Size added in v0.1.1

func (*CreateBlockStorageAgentWithDownloadingRequest) XXX_Unmarshal added in v0.1.1

type CreateEmptyBlockStorageAgentRequest added in v0.1.1

type CreateEmptyBlockStorageAgentRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Bytes                uint64   `protobuf:"varint,2,opt,name=bytes" json:"bytes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateEmptyBlockStorageAgentRequest) Descriptor added in v0.1.1

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

func (*CreateEmptyBlockStorageAgentRequest) GetBytes added in v0.1.1

func (*CreateEmptyBlockStorageAgentRequest) GetName added in v0.1.1

func (*CreateEmptyBlockStorageAgentRequest) ProtoMessage added in v0.1.1

func (*CreateEmptyBlockStorageAgentRequest) ProtoMessage()

func (*CreateEmptyBlockStorageAgentRequest) Reset added in v0.1.1

func (*CreateEmptyBlockStorageAgentRequest) String added in v0.1.1

func (*CreateEmptyBlockStorageAgentRequest) XXX_DiscardUnknown added in v0.1.1

func (m *CreateEmptyBlockStorageAgentRequest) XXX_DiscardUnknown()

func (*CreateEmptyBlockStorageAgentRequest) XXX_Marshal added in v0.1.1

func (m *CreateEmptyBlockStorageAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateEmptyBlockStorageAgentRequest) XXX_Merge added in v0.1.1

func (*CreateEmptyBlockStorageAgentRequest) XXX_Size added in v0.1.1

func (*CreateEmptyBlockStorageAgentRequest) XXX_Unmarshal added in v0.1.1

func (m *CreateEmptyBlockStorageAgentRequest) XXX_Unmarshal(b []byte) error

type CreateVirtualMachineAgentRequest

type CreateVirtualMachineAgentRequest struct {
	Name                 string      `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Vcpus                uint32      `protobuf:"varint,4,opt,name=vcpus" json:"vcpus,omitempty"`
	MemoryBytes          uint64      `protobuf:"varint,5,opt,name=memory_bytes,json=memoryBytes" json:"memory_bytes,omitempty"`
	Blockdev             []*BlockDev `protobuf:"bytes,6,rep,name=blockdev" json:"blockdev,omitempty"`
	Netdev               []*NetDev   `protobuf:"bytes,7,rep,name=netdev" json:"netdev,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*CreateVirtualMachineAgentRequest) Descriptor

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

func (*CreateVirtualMachineAgentRequest) GetBlockdev

func (m *CreateVirtualMachineAgentRequest) GetBlockdev() []*BlockDev

func (*CreateVirtualMachineAgentRequest) GetMemoryBytes

func (m *CreateVirtualMachineAgentRequest) GetMemoryBytes() uint64

func (*CreateVirtualMachineAgentRequest) GetName

func (*CreateVirtualMachineAgentRequest) GetNetdev

func (m *CreateVirtualMachineAgentRequest) GetNetdev() []*NetDev

func (*CreateVirtualMachineAgentRequest) GetVcpus

func (*CreateVirtualMachineAgentRequest) ProtoMessage

func (*CreateVirtualMachineAgentRequest) ProtoMessage()

func (*CreateVirtualMachineAgentRequest) Reset

func (*CreateVirtualMachineAgentRequest) String

func (*CreateVirtualMachineAgentRequest) XXX_DiscardUnknown

func (m *CreateVirtualMachineAgentRequest) XXX_DiscardUnknown()

func (*CreateVirtualMachineAgentRequest) XXX_Marshal

func (m *CreateVirtualMachineAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateVirtualMachineAgentRequest) XXX_Merge

func (dst *CreateVirtualMachineAgentRequest) XXX_Merge(src proto.Message)

func (*CreateVirtualMachineAgentRequest) XXX_Size

func (m *CreateVirtualMachineAgentRequest) XXX_Size() int

func (*CreateVirtualMachineAgentRequest) XXX_Unmarshal

func (m *CreateVirtualMachineAgentRequest) XXX_Unmarshal(b []byte) error

type DeleteBlockStorageAgentRequest added in v0.1.1

type DeleteBlockStorageAgentRequest struct {
	Path                 string   `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeleteBlockStorageAgentRequest) Descriptor added in v0.1.1

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

func (*DeleteBlockStorageAgentRequest) GetPath added in v0.1.1

func (*DeleteBlockStorageAgentRequest) ProtoMessage added in v0.1.1

func (*DeleteBlockStorageAgentRequest) ProtoMessage()

func (*DeleteBlockStorageAgentRequest) Reset added in v0.1.1

func (m *DeleteBlockStorageAgentRequest) Reset()

func (*DeleteBlockStorageAgentRequest) String added in v0.1.1

func (*DeleteBlockStorageAgentRequest) XXX_DiscardUnknown added in v0.1.1

func (m *DeleteBlockStorageAgentRequest) XXX_DiscardUnknown()

func (*DeleteBlockStorageAgentRequest) XXX_Marshal added in v0.1.1

func (m *DeleteBlockStorageAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteBlockStorageAgentRequest) XXX_Merge added in v0.1.1

func (dst *DeleteBlockStorageAgentRequest) XXX_Merge(src proto.Message)

func (*DeleteBlockStorageAgentRequest) XXX_Size added in v0.1.1

func (m *DeleteBlockStorageAgentRequest) XXX_Size() int

func (*DeleteBlockStorageAgentRequest) XXX_Unmarshal added in v0.1.1

func (m *DeleteBlockStorageAgentRequest) XXX_Unmarshal(b []byte) error

type DeleteVirtualMachineAgentRequest

type DeleteVirtualMachineAgentRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// TODO: netdev の情報を QMP から取るまでは、とりあえず渡してもらう
	Netdev               []*NetDev `protobuf:"bytes,7,rep,name=netdev" json:"netdev,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*DeleteVirtualMachineAgentRequest) Descriptor

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

func (*DeleteVirtualMachineAgentRequest) GetName

func (*DeleteVirtualMachineAgentRequest) GetNetdev

func (m *DeleteVirtualMachineAgentRequest) GetNetdev() []*NetDev

func (*DeleteVirtualMachineAgentRequest) ProtoMessage

func (*DeleteVirtualMachineAgentRequest) ProtoMessage()

func (*DeleteVirtualMachineAgentRequest) Reset

func (*DeleteVirtualMachineAgentRequest) String

func (*DeleteVirtualMachineAgentRequest) XXX_DiscardUnknown

func (m *DeleteVirtualMachineAgentRequest) XXX_DiscardUnknown()

func (*DeleteVirtualMachineAgentRequest) XXX_Marshal

func (m *DeleteVirtualMachineAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteVirtualMachineAgentRequest) XXX_Merge

func (dst *DeleteVirtualMachineAgentRequest) XXX_Merge(src proto.Message)

func (*DeleteVirtualMachineAgentRequest) XXX_Size

func (m *DeleteVirtualMachineAgentRequest) XXX_Size() int

func (*DeleteVirtualMachineAgentRequest) XXX_Unmarshal

func (m *DeleteVirtualMachineAgentRequest) XXX_Unmarshal(b []byte) error

type MockBlockStorageAgentAPI added in v0.1.1

type MockBlockStorageAgentAPI struct{}

func (MockBlockStorageAgentAPI) CreateBlockStorageAgentWithDownloading added in v0.1.1

func (a MockBlockStorageAgentAPI) CreateBlockStorageAgentWithDownloading(ctx context.Context, req *CreateBlockStorageAgentWithDownloadingRequest) (*BlockStorageAgent, error)

func (MockBlockStorageAgentAPI) CreateEmptyBlockStorageAgent added in v0.1.1

func (MockBlockStorageAgentAPI) DeleteBlockStorageAgent added in v0.1.1

func (a MockBlockStorageAgentAPI) DeleteBlockStorageAgent(ctx context.Context, req *DeleteBlockStorageAgentRequest) (*empty.Empty, error)

type MockVirtualMachineAgentAPI added in v0.1.1

type MockVirtualMachineAgentAPI struct{}

func (*MockVirtualMachineAgentAPI) BootVirtualMachineAgent added in v0.1.1

func (*MockVirtualMachineAgentAPI) CreateVirtualMachineAgent added in v0.1.1

func (*MockVirtualMachineAgentAPI) DeleteVirtualMachineAgent added in v0.1.1

func (a *MockVirtualMachineAgentAPI) DeleteVirtualMachineAgent(ctx context.Context, req *DeleteVirtualMachineAgentRequest) (*empty.Empty, error)

func (*MockVirtualMachineAgentAPI) RebootVirtualMachineAgent added in v0.1.1

func (*MockVirtualMachineAgentAPI) ShutdownVirtualMachineAgent added in v0.1.1

type NetDev

type NetDev struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	NetworkName          string   `protobuf:"bytes,2,opt,name=network_name,json=networkName" json:"network_name,omitempty"`
	HardwareAddress      string   `protobuf:"bytes,3,opt,name=hardware_address,json=hardwareAddress" json:"hardware_address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func StructNetDev

func StructNetDev(nics []*pprovisioning.VirtualMachineNIC, names []string) []*NetDev

func (*NetDev) Descriptor

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

func (*NetDev) GetHardwareAddress

func (m *NetDev) GetHardwareAddress() string

func (*NetDev) GetName

func (m *NetDev) GetName() string

func (*NetDev) GetNetworkName

func (m *NetDev) GetNetworkName() string

func (*NetDev) ProtoMessage

func (*NetDev) ProtoMessage()

func (*NetDev) Reset

func (m *NetDev) Reset()

func (*NetDev) String

func (m *NetDev) String() string

func (*NetDev) XXX_DiscardUnknown

func (m *NetDev) XXX_DiscardUnknown()

func (*NetDev) XXX_Marshal

func (m *NetDev) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NetDev) XXX_Merge

func (dst *NetDev) XXX_Merge(src proto.Message)

func (*NetDev) XXX_Size

func (m *NetDev) XXX_Size() int

func (*NetDev) XXX_Unmarshal

func (m *NetDev) XXX_Unmarshal(b []byte) error

type RebootVirtualMachineAgentRequest

type RebootVirtualMachineAgentRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Hard                 bool     `protobuf:"varint,2,opt,name=hard" json:"hard,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RebootVirtualMachineAgentRequest) Descriptor

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

func (*RebootVirtualMachineAgentRequest) GetHard

func (*RebootVirtualMachineAgentRequest) GetName

func (*RebootVirtualMachineAgentRequest) ProtoMessage

func (*RebootVirtualMachineAgentRequest) ProtoMessage()

func (*RebootVirtualMachineAgentRequest) Reset

func (*RebootVirtualMachineAgentRequest) String

func (*RebootVirtualMachineAgentRequest) XXX_DiscardUnknown

func (m *RebootVirtualMachineAgentRequest) XXX_DiscardUnknown()

func (*RebootVirtualMachineAgentRequest) XXX_Marshal

func (m *RebootVirtualMachineAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RebootVirtualMachineAgentRequest) XXX_Merge

func (dst *RebootVirtualMachineAgentRequest) XXX_Merge(src proto.Message)

func (*RebootVirtualMachineAgentRequest) XXX_Size

func (m *RebootVirtualMachineAgentRequest) XXX_Size() int

func (*RebootVirtualMachineAgentRequest) XXX_Unmarshal

func (m *RebootVirtualMachineAgentRequest) XXX_Unmarshal(b []byte) error

type RebootVirtualMachineAgentResponse

type RebootVirtualMachineAgentResponse struct {
	State                VirtualMachineAgentState `protobuf:"varint,1,opt,name=state,enum=n0stack.internal.n0core.provisioning.VirtualMachineAgentState" json:"state,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

func (*RebootVirtualMachineAgentResponse) Descriptor

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

func (*RebootVirtualMachineAgentResponse) GetState

func (*RebootVirtualMachineAgentResponse) ProtoMessage

func (*RebootVirtualMachineAgentResponse) ProtoMessage()

func (*RebootVirtualMachineAgentResponse) Reset

func (*RebootVirtualMachineAgentResponse) String

func (*RebootVirtualMachineAgentResponse) XXX_DiscardUnknown

func (m *RebootVirtualMachineAgentResponse) XXX_DiscardUnknown()

func (*RebootVirtualMachineAgentResponse) XXX_Marshal

func (m *RebootVirtualMachineAgentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RebootVirtualMachineAgentResponse) XXX_Merge

func (dst *RebootVirtualMachineAgentResponse) XXX_Merge(src proto.Message)

func (*RebootVirtualMachineAgentResponse) XXX_Size

func (m *RebootVirtualMachineAgentResponse) XXX_Size() int

func (*RebootVirtualMachineAgentResponse) XXX_Unmarshal

func (m *RebootVirtualMachineAgentResponse) XXX_Unmarshal(b []byte) error

type ShutdownVirtualMachineAgentRequest

type ShutdownVirtualMachineAgentRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Hard                 bool     `protobuf:"varint,2,opt,name=hard" json:"hard,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ShutdownVirtualMachineAgentRequest) Descriptor

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

func (*ShutdownVirtualMachineAgentRequest) GetHard

func (*ShutdownVirtualMachineAgentRequest) GetName

func (*ShutdownVirtualMachineAgentRequest) ProtoMessage

func (*ShutdownVirtualMachineAgentRequest) ProtoMessage()

func (*ShutdownVirtualMachineAgentRequest) Reset

func (*ShutdownVirtualMachineAgentRequest) String

func (*ShutdownVirtualMachineAgentRequest) XXX_DiscardUnknown

func (m *ShutdownVirtualMachineAgentRequest) XXX_DiscardUnknown()

func (*ShutdownVirtualMachineAgentRequest) XXX_Marshal

func (m *ShutdownVirtualMachineAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ShutdownVirtualMachineAgentRequest) XXX_Merge

func (dst *ShutdownVirtualMachineAgentRequest) XXX_Merge(src proto.Message)

func (*ShutdownVirtualMachineAgentRequest) XXX_Size

func (*ShutdownVirtualMachineAgentRequest) XXX_Unmarshal

func (m *ShutdownVirtualMachineAgentRequest) XXX_Unmarshal(b []byte) error

type ShutdownVirtualMachineAgentResponse

type ShutdownVirtualMachineAgentResponse struct {
	State                VirtualMachineAgentState `protobuf:"varint,1,opt,name=state,enum=n0stack.internal.n0core.provisioning.VirtualMachineAgentState" json:"state,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

func (*ShutdownVirtualMachineAgentResponse) Descriptor

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

func (*ShutdownVirtualMachineAgentResponse) GetState

func (*ShutdownVirtualMachineAgentResponse) ProtoMessage

func (*ShutdownVirtualMachineAgentResponse) ProtoMessage()

func (*ShutdownVirtualMachineAgentResponse) Reset

func (*ShutdownVirtualMachineAgentResponse) String

func (*ShutdownVirtualMachineAgentResponse) XXX_DiscardUnknown

func (m *ShutdownVirtualMachineAgentResponse) XXX_DiscardUnknown()

func (*ShutdownVirtualMachineAgentResponse) XXX_Marshal

func (m *ShutdownVirtualMachineAgentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ShutdownVirtualMachineAgentResponse) XXX_Merge

func (*ShutdownVirtualMachineAgentResponse) XXX_Size

func (*ShutdownVirtualMachineAgentResponse) XXX_Unmarshal

func (m *ShutdownVirtualMachineAgentResponse) XXX_Unmarshal(b []byte) error

type VirtualMachineAPI

type VirtualMachineAPI struct {
	// contains filtered or unexported fields
}

func CreateVirtualMachineAPI

func CreateVirtualMachineAPI(ds datastore.Datastore, noa ppool.NodeServiceClient, nea ppool.NetworkServiceClient, bsa pprovisioning.BlockStorageServiceClient) (*VirtualMachineAPI, error)

func (*VirtualMachineAPI) BootVirtualMachine

func (a *VirtualMachineAPI) BootVirtualMachine(ctx context.Context, req *pprovisioning.BootVirtualMachineRequest) (*pprovisioning.VirtualMachine, error)

func (*VirtualMachineAPI) CreateVirtualMachine

func (a *VirtualMachineAPI) CreateVirtualMachine(ctx context.Context, req *pprovisioning.CreateVirtualMachineRequest) (*pprovisioning.VirtualMachine, error)

func (*VirtualMachineAPI) DeleteVirtualMachine

func (a *VirtualMachineAPI) DeleteVirtualMachine(ctx context.Context, req *pprovisioning.DeleteVirtualMachineRequest) (*empty.Empty, error)

func (*VirtualMachineAPI) GetVirtualMachine

func (a *VirtualMachineAPI) GetVirtualMachine(ctx context.Context, req *pprovisioning.GetVirtualMachineRequest) (*pprovisioning.VirtualMachine, error)

func (*VirtualMachineAPI) ListVirtualMachines

func (a *VirtualMachineAPI) ListVirtualMachines(ctx context.Context, req *pprovisioning.ListVirtualMachinesRequest) (*pprovisioning.ListVirtualMachinesResponse, error)

func (*VirtualMachineAPI) RebootVirtualMachine

func (a *VirtualMachineAPI) RebootVirtualMachine(ctx context.Context, req *pprovisioning.RebootVirtualMachineRequest) (*pprovisioning.VirtualMachine, error)

func (*VirtualMachineAPI) SaveVirtualMachine

func (a *VirtualMachineAPI) SaveVirtualMachine(ctx context.Context, req *pprovisioning.SaveVirtualMachineRequest) (*pprovisioning.VirtualMachine, error)

func (*VirtualMachineAPI) ShutdownVirtualMachine

func (a *VirtualMachineAPI) ShutdownVirtualMachine(ctx context.Context, req *pprovisioning.ShutdownVirtualMachineRequest) (*pprovisioning.VirtualMachine, error)

func (*VirtualMachineAPI) UpdateVirtualMachine

func (a *VirtualMachineAPI) UpdateVirtualMachine(ctx context.Context, req *pprovisioning.UpdateVirtualMachineRequest) (*pprovisioning.VirtualMachine, error)

type VirtualMachineAgent

type VirtualMachineAgent struct {
	Name                 string                   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Uuid                 string                   `protobuf:"bytes,2,opt,name=uuid" json:"uuid,omitempty"`
	State                VirtualMachineAgentState `protobuf:"varint,3,opt,name=state,enum=n0stack.internal.n0core.provisioning.VirtualMachineAgentState" json:"state,omitempty"`
	Vcpus                uint32                   `protobuf:"varint,4,opt,name=vcpus" json:"vcpus,omitempty"`
	MemoryBytes          uint64                   `protobuf:"varint,5,opt,name=memory_bytes,json=memoryBytes" json:"memory_bytes,omitempty"`
	Blockdev             []*BlockDev              `protobuf:"bytes,6,rep,name=blockdev" json:"blockdev,omitempty"`
	Netdev               []*NetDev                `protobuf:"bytes,7,rep,name=netdev" json:"netdev,omitempty"`
	WebsocketPort        uint32                   `protobuf:"varint,8,opt,name=websocket_port,json=websocketPort" json:"websocket_port,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

func (*VirtualMachineAgent) Descriptor

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

func (*VirtualMachineAgent) GetBlockdev

func (m *VirtualMachineAgent) GetBlockdev() []*BlockDev

func (*VirtualMachineAgent) GetMemoryBytes

func (m *VirtualMachineAgent) GetMemoryBytes() uint64

func (*VirtualMachineAgent) GetName

func (m *VirtualMachineAgent) GetName() string

func (*VirtualMachineAgent) GetNetdev

func (m *VirtualMachineAgent) GetNetdev() []*NetDev

func (*VirtualMachineAgent) GetState

func (*VirtualMachineAgent) GetUuid

func (m *VirtualMachineAgent) GetUuid() string

func (*VirtualMachineAgent) GetVcpus

func (m *VirtualMachineAgent) GetVcpus() uint32

func (*VirtualMachineAgent) GetWebsocketPort

func (m *VirtualMachineAgent) GetWebsocketPort() uint32

func (*VirtualMachineAgent) ProtoMessage

func (*VirtualMachineAgent) ProtoMessage()

func (*VirtualMachineAgent) Reset

func (m *VirtualMachineAgent) Reset()

func (*VirtualMachineAgent) String

func (m *VirtualMachineAgent) String() string

func (*VirtualMachineAgent) XXX_DiscardUnknown

func (m *VirtualMachineAgent) XXX_DiscardUnknown()

func (*VirtualMachineAgent) XXX_Marshal

func (m *VirtualMachineAgent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VirtualMachineAgent) XXX_Merge

func (dst *VirtualMachineAgent) XXX_Merge(src proto.Message)

func (*VirtualMachineAgent) XXX_Size

func (m *VirtualMachineAgent) XXX_Size() int

func (*VirtualMachineAgent) XXX_Unmarshal

func (m *VirtualMachineAgent) XXX_Unmarshal(b []byte) error

type VirtualMachineAgentAPI

type VirtualMachineAgentAPI struct {
	// contains filtered or unexported fields
}

func CreateVirtualMachineAgentAPI

func CreateVirtualMachineAgentAPI(basedir string) (*VirtualMachineAgentAPI, error)

func (VirtualMachineAgentAPI) BootVirtualMachineAgent

func (VirtualMachineAgentAPI) CreateVirtualMachineAgent

func (VirtualMachineAgentAPI) DeleteVirtualMachineAgent

func (a VirtualMachineAgentAPI) DeleteVirtualMachineAgent(ctx context.Context, req *DeleteVirtualMachineAgentRequest) (*empty.Empty, error)

func (VirtualMachineAgentAPI) GetWorkDirectory

func (a VirtualMachineAgentAPI) GetWorkDirectory(name string) (string, error)

func (VirtualMachineAgentAPI) RebootVirtualMachineAgent

type VirtualMachineAgentServiceClient

type VirtualMachineAgentServiceClient interface {
	CreateVirtualMachineAgent(ctx context.Context, in *CreateVirtualMachineAgentRequest, opts ...grpc.CallOption) (*VirtualMachineAgent, error)
	DeleteVirtualMachineAgent(ctx context.Context, in *DeleteVirtualMachineAgentRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	BootVirtualMachineAgent(ctx context.Context, in *BootVirtualMachineAgentRequest, opts ...grpc.CallOption) (*BootVirtualMachineAgentResponse, error)
	RebootVirtualMachineAgent(ctx context.Context, in *RebootVirtualMachineAgentRequest, opts ...grpc.CallOption) (*RebootVirtualMachineAgentResponse, error)
	ShutdownVirtualMachineAgent(ctx context.Context, in *ShutdownVirtualMachineAgentRequest, opts ...grpc.CallOption) (*ShutdownVirtualMachineAgentResponse, error)
}

func NewVirtualMachineAgentServiceClient

func NewVirtualMachineAgentServiceClient(cc *grpc.ClientConn) VirtualMachineAgentServiceClient

type VirtualMachineAgentState

type VirtualMachineAgentState int32
const (
	VirtualMachineAgentState_FAILED   VirtualMachineAgentState = 0
	VirtualMachineAgentState_UNKNOWN  VirtualMachineAgentState = 1
	VirtualMachineAgentState_SHUTDOWN VirtualMachineAgentState = 2
	VirtualMachineAgentState_RUNNING  VirtualMachineAgentState = 3
	VirtualMachineAgentState_PAUSED   VirtualMachineAgentState = 4
)

func GetAgentStateFromQemuState

func GetAgentStateFromQemuState(s qemu.Status) VirtualMachineAgentState

func (VirtualMachineAgentState) EnumDescriptor

func (VirtualMachineAgentState) EnumDescriptor() ([]byte, []int)

func (VirtualMachineAgentState) String

func (x VirtualMachineAgentState) String() string

Jump to

Keyboard shortcuts

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