fake

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeDomain

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

FakeDomain is a fake implementation of Domain interface.

func (*FakeDomain) Create

func (d *FakeDomain) Create() error

Create implements Create method of Domain interface.

func (*FakeDomain) Destroy

func (d *FakeDomain) Destroy() error

Destroy implements Destroy method of Domain interface.

func (*FakeDomain) GetCPUTime added in v1.4.0

func (d *FakeDomain) GetCPUTime() (uint64, error)

GetCPUTime implements GetCPUTime of Domain interface.

func (*FakeDomain) GetRSS added in v1.4.0

func (d *FakeDomain) GetRSS() (uint64, error)

GetRSS implements GetRSS of Domain interface.

func (*FakeDomain) Name added in v0.8.1

func (d *FakeDomain) Name() (string, error)

Name implements Name method of Domain interface.

func (*FakeDomain) Shutdown

func (d *FakeDomain) Shutdown() error

Shutdown implements Shutdown method of Domain interface.

func (*FakeDomain) State

func (d *FakeDomain) State() (virt.DomainState, error)

State implements State method of Domain interface.

func (*FakeDomain) UUIDString

func (d *FakeDomain) UUIDString() (string, error)

UUIDString implements UUIDString method of Domain interface.

func (*FakeDomain) Undefine

func (d *FakeDomain) Undefine() error

Undefine implements Undefine method of Domain interface.

func (*FakeDomain) XML added in v1.0.0

func (d *FakeDomain) XML() (*libvirtxml.Domain, error)

XML implements XML method of Domain interface.

type FakeDomainConnection

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

FakeDomainConnection is a fake implementation of DomainConnection interface.

func NewFakeDomainConnection

func NewFakeDomainConnection(rec testutils.Recorder) *FakeDomainConnection

NewFakeDomainConnection creates a new FakeDomainConnection using the specified Recorder to record any changes.

func (*FakeDomainConnection) DefineDomain

func (dc *FakeDomainConnection) DefineDomain(def *libvirtxml.Domain) (virt.Domain, error)

DefineDomain implements DefineDomain method of DomainConnection interface.

func (*FakeDomainConnection) DefineSecret

func (dc *FakeDomainConnection) DefineSecret(def *libvirtxml.Secret) (virt.Secret, error)

DefineSecret implements DefineSecret method of DomainConnection interface.

func (*FakeDomainConnection) ListDomains

func (dc *FakeDomainConnection) ListDomains() ([]virt.Domain, error)

ListDomains implements ListDomains method of DomainConnection interface.

func (*FakeDomainConnection) LookupDomainByName

func (dc *FakeDomainConnection) LookupDomainByName(name string) (virt.Domain, error)

LookupDomainByName implements LookupDomainByName method of DomainConnection interface.

func (*FakeDomainConnection) LookupDomainByUUIDString

func (dc *FakeDomainConnection) LookupDomainByUUIDString(uuid string) (virt.Domain, error)

LookupDomainByUUIDString implements LookupDomainByUUIDString method of DomainConnection interface.

func (*FakeDomainConnection) LookupSecretByUUIDString

func (dc *FakeDomainConnection) LookupSecretByUUIDString(uuid string) (virt.Secret, error)

LookupSecretByUUIDString implements LookupSecretByUUIDString method of DomainConnection interface.

func (*FakeDomainConnection) LookupSecretByUsageName added in v0.8.0

func (dc *FakeDomainConnection) LookupSecretByUsageName(usageType string, usageName string) (virt.Secret, error)

LookupSecretByUsageName implements LookupSecretByUsageName method of DomainConnection interface.

func (*FakeDomainConnection) SetIgnoreShutdown

func (dc *FakeDomainConnection) SetIgnoreShutdown(ignoreShutdown bool)

SetIgnoreShutdown implements SetIgnoreShutdown method of DomainConnection interface.

func (*FakeDomainConnection) UseNonVolatileDomainDef added in v1.1.2

func (dc *FakeDomainConnection) UseNonVolatileDomainDef()

UseNonVolatileDomainDef instructs the domains to fix volatile paths in the domain definitions returned by domains' XML() method.

type FakeSecret

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

FakeSecret is a fake implementation of Secret interace.

func (*FakeSecret) Remove

func (s *FakeSecret) Remove() error

Remove implements Remove method of Secret interface.

func (*FakeSecret) SetValue

func (s *FakeSecret) SetValue(value []byte) error

SetValue implements SetValue method of Secret interface.

type FakeStorageConnection

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

FakeStorageConnection is a fake implementation of StorageConnection.

func NewFakeStorageConnection

func NewFakeStorageConnection(rec testutils.Recorder) *FakeStorageConnection

NewFakeStorageConnection creates a new FakeStorageConnection using the specified Recorder to record any changes.

func (*FakeStorageConnection) CreateStoragePool

func (sc *FakeStorageConnection) CreateStoragePool(def *libvirtxml.StoragePool) (virt.StoragePool, error)

CreateStoragePool implements CreateStoragePool method of StorageConnection interface.

func (*FakeStorageConnection) ListPools added in v1.1.2

func (sc *FakeStorageConnection) ListPools() ([]virt.StoragePool, error)

ListPools implements ListPools method of StorageConnection interface.

func (*FakeStorageConnection) LookupStoragePoolByName

func (sc *FakeStorageConnection) LookupStoragePoolByName(name string) (virt.StoragePool, error)

LookupStoragePoolByName implements LookupStoragePoolByName method of StorageConnection interface.

func (*FakeStorageConnection) PutFiles added in v1.5.0

func (sc *FakeStorageConnection) PutFiles(imagePath string, files map[string][]byte) error

PutFiles implements PutFiles method of StorageConnection interface.

type FakeStoragePool

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

FakeStoragePool is a fake implementation of StoragePool interface.

func NewFakeStoragePool added in v0.8.0

func NewFakeStoragePool(rec testutils.Recorder, def *libvirtxml.StoragePool) *FakeStoragePool

NewFakeStoragePool creates a new StoragePool using the specified recorder, name and pool path.

func (*FakeStoragePool) CreateStorageVol

func (p *FakeStoragePool) CreateStorageVol(def *libvirtxml.StorageVolume) (virt.StorageVolume, error)

CreateStorageVol implements CreateStorageVol method of StoragePool interface.

func (*FakeStoragePool) ListVolumes added in v1.1.2

func (p *FakeStoragePool) ListVolumes() ([]virt.StorageVolume, error)

ListVolumes implements ListVolumes method of StoragePool interface.

func (*FakeStoragePool) LookupVolumeByName

func (p *FakeStoragePool) LookupVolumeByName(name string) (virt.StorageVolume, error)

LookupVolumeByName implements LookupVolumeByName method of StoragePool interface.

func (*FakeStoragePool) RemoveVolumeByName

func (p *FakeStoragePool) RemoveVolumeByName(name string) error

RemoveVolumeByName implements RemoveVolumeByName method of StoragePool interface.

func (*FakeStoragePool) XML added in v1.1.2

XML implements XML method of StoragePool interface.

type FakeStorageVolume

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

FakeStorageVolume is a fake implementation of StorageVolume interface.

func (*FakeStorageVolume) Format

func (v *FakeStorageVolume) Format() error

Format implements Format method of StorageVolume interface.

func (*FakeStorageVolume) Name

func (v *FakeStorageVolume) Name() string

Name implements Name method of StorageVolume interface.

func (*FakeStorageVolume) Path

func (v *FakeStorageVolume) Path() (string, error)

Path implements Path method of StorageVolume interface.

func (*FakeStorageVolume) Remove

func (v *FakeStorageVolume) Remove() error

Remove implements Remove method of StorageVolume interface.

func (*FakeStorageVolume) Size

func (v *FakeStorageVolume) Size() (uint64, error)

Size implements Size method of StorageVolume interface.

func (*FakeStorageVolume) XML added in v1.1.2

XML implements XML method of StorageVolume interface.

Jump to

Keyboard shortcuts

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