fakes

package
v0.0.0-...-b3c9d2d Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakePlatform

type FakePlatform struct {
	Fs                *fakesys.FakeFileSystem
	Runner            *fakesys.FakeCmdRunner
	FakeCompressor    *fakecmd.FakeCompressor
	FakeCopier        *fakecmd.FakeCopier
	FakeVitalsService *fakevitals.FakeService

	DevicePathResolver boshdpresolv.DevicePathResolver

	SetupRuntimeConfigurationWasInvoked bool

	CreateUserUsername string
	CreateUserPassword string
	CreateUserBasePath string

	AddUserToGroupsGroups             map[string][]string
	DeleteEphemeralUsersMatchingRegex string
	SetupSSHPublicKeys                map[string]string

	SetupSSHCalled    bool
	SetupSSHPublicKey string
	SetupSSHUsername  string
	SetupSSHErr       error

	UserPasswords         map[string]string
	SetupHostnameHostname string

	SetTimeWithNtpServersServers []string

	SetupEphemeralDiskWithPathDevicePath string
	SetupEphemeralDiskWithPathErr        error

	SetupRawEphemeralDisksDevices   []boshsettings.DiskSettings
	SetupRawEphemeralDisksErr       error
	SetupRawEphemeralDisksCallCount int

	SetupDataDirCalled bool
	SetupDataDirErr    error

	SetupTmpDirCalled bool
	SetupTmpDirErr    error

	SetupNetworkingCalled   bool
	SetupNetworkingNetworks boshsettings.Networks
	SetupNetworkingErr      error

	MountPersistentDiskCalled     bool
	MountPersistentDiskSettings   boshsettings.DiskSettings
	MountPersistentDiskMountPoint string
	MountPersistentDiskErr        error

	UnmountPersistentDiskDidUnmount bool
	UnmountPersistentDiskSettings   boshsettings.DiskSettings

	GetFileContentsFromCDROMPath        string
	GetFileContentsFromCDROMContents    []byte
	GetFileContentsFromCDROMErr         error
	GetFileContentsFromCDROMCalledTimes int

	GetFileContentsFromDiskDiskPaths   []string
	GetFileContentsFromDiskFileNames   [][]string
	GetFileContentsFromDiskContents    map[string][]byte
	GetFileContentsFromDiskErrs        map[string]error
	GetFileContentsFromDiskCalledTimes int

	GetEphemeralDiskPathCalled   bool
	GetEphemeralDiskPathSettings boshsettings.DiskSettings
	GetEphemeralDiskPathRealPath string

	ScsiDiskMap map[string]string

	MigratePersistentDiskFromMountPoint string
	MigratePersistentDiskToMountPoint   string

	IsPersistentDiskPartitionedResult bool
	IsPersistentDiskPartitionedErr    error

	IsMountPointPath   string
	IsMountPointResult bool
	IsMountPointErr    error

	FindDeviceMatchingMountPointPath   string
	FindDeviceMatchingMountPointDevice string
	FindDeviceMatchingMountPointResult bool
	FindDeviceMatchingMountPointErr    error

	MountedDevicePaths []string

	StartMonitStarted           bool
	SetupMonitUserSetup         bool
	GetMonitCredentialsUsername string
	GetMonitCredentialsPassword string

	PrepareForNetworkingChangeCalled bool
	PrepareForNetworkingChangeErr    error

	GetDefaultNetworkNetwork boshsettings.Network
	GetDefaultNetworkErr     error

	GetConfiguredNetworkInterfacesInterfaces []string
	GetConfiguredNetworkInterfacesErr        error

	CleanedIPMacAddressCache  string
	CleanIPMacAddressCacheErr error

	GetHostPublicKeyValue string
	GetHostPublicKeyError error

	SetupRootDiskCalledTimes int
	SetupRootDiskError       error
	// contains filtered or unexported fields
}

func NewFakePlatform

func NewFakePlatform() (platform *FakePlatform)

func (*FakePlatform) AddUserToGroups

func (p *FakePlatform) AddUserToGroups(username string, groups []string) (err error)

func (*FakePlatform) CleanIPMacAddressCache

func (p *FakePlatform) CleanIPMacAddressCache(ip string) error

func (*FakePlatform) CreateUser

func (p *FakePlatform) CreateUser(username, password, basePath string) (err error)

func (*FakePlatform) DeleteEphemeralUsersMatching

func (p *FakePlatform) DeleteEphemeralUsersMatching(regex string) (err error)

func (*FakePlatform) FindDeviceMatchingMountPoint

func (p *FakePlatform) FindDeviceMatchingMountPoint(mountPoint string) (string, bool, error)

func (*FakePlatform) GetCertManager

func (p *FakePlatform) GetCertManager() (certManager boshcert.Manager)

func (*FakePlatform) GetCompressor

func (p *FakePlatform) GetCompressor() (compressor boshcmd.Compressor)

func (*FakePlatform) GetConfiguredNetworkInterfaces

func (p *FakePlatform) GetConfiguredNetworkInterfaces() ([]string, error)

func (*FakePlatform) GetCopier

func (p *FakePlatform) GetCopier() (copier boshcmd.Copier)

func (*FakePlatform) GetDefaultNetwork

func (p *FakePlatform) GetDefaultNetwork() (boshsettings.Network, error)

func (*FakePlatform) GetDevicePathResolver

func (p *FakePlatform) GetDevicePathResolver() (devicePathResolver boshdpresolv.DevicePathResolver)

func (*FakePlatform) GetDirProvider

func (p *FakePlatform) GetDirProvider() (dirProvider boshdir.Provider)

func (*FakePlatform) GetEphemeralDiskPath

func (p *FakePlatform) GetEphemeralDiskPath(diskSettings boshsettings.DiskSettings) string

func (*FakePlatform) GetFileContentsFromCDROM

func (p *FakePlatform) GetFileContentsFromCDROM(path string) ([]byte, error)

func (*FakePlatform) GetFilesContentsFromDisk

func (p *FakePlatform) GetFilesContentsFromDisk(diskPath string, fileNames []string) ([][]byte, error)

func (*FakePlatform) GetFs

func (p *FakePlatform) GetFs() (fs boshsys.FileSystem)

func (*FakePlatform) GetHostPublicKey

func (p *FakePlatform) GetHostPublicKey() (string, error)

func (*FakePlatform) GetMonitCredentials

func (p *FakePlatform) GetMonitCredentials() (username, password string, err error)

func (*FakePlatform) GetRunner

func (p *FakePlatform) GetRunner() (runner boshsys.CmdRunner)

func (*FakePlatform) GetVitalsService

func (p *FakePlatform) GetVitalsService() (service boshvitals.Service)

func (*FakePlatform) IsMountPoint

func (p *FakePlatform) IsMountPoint(path string) (bool, error)

func (*FakePlatform) IsPersistentDiskMounted

func (p *FakePlatform) IsPersistentDiskMounted(diskSettings boshsettings.DiskSettings) (result bool, err error)

func (*FakePlatform) IsPersistentDiskPartitioned

func (p *FakePlatform) IsPersistentDiskPartitioned(diskSettings boshsettings.DiskSettings) (bool, error)

func (*FakePlatform) MigratePersistentDisk

func (p *FakePlatform) MigratePersistentDisk(fromMountPoint, toMountPoint string) (err error)

func (*FakePlatform) MountPersistentDisk

func (p *FakePlatform) MountPersistentDisk(diskSettings boshsettings.DiskSettings, mountPoint string) (err error)

func (*FakePlatform) PrepareForNetworkingChange

func (p *FakePlatform) PrepareForNetworkingChange() error

func (*FakePlatform) SetGetFilesContentsFromDisk

func (p *FakePlatform) SetGetFilesContentsFromDisk(fileName string, contents []byte, err error)

func (*FakePlatform) SetIsPersistentDiskPartitioned

func (p *FakePlatform) SetIsPersistentDiskPartitioned(isPartitioned bool, err error)

func (*FakePlatform) SetTimeWithNtpServers

func (p *FakePlatform) SetTimeWithNtpServers(servers []string) (err error)

func (*FakePlatform) SetUserPassword

func (p *FakePlatform) SetUserPassword(user, encryptedPwd string) (err error)

func (*FakePlatform) SetupDataDir

func (p *FakePlatform) SetupDataDir() error

func (*FakePlatform) SetupEphemeralDiskWithPath

func (p *FakePlatform) SetupEphemeralDiskWithPath(devicePath string) (err error)

func (*FakePlatform) SetupHostname

func (p *FakePlatform) SetupHostname(hostname string) (err error)

func (*FakePlatform) SetupLogrotate

func (p *FakePlatform) SetupLogrotate(groupName, basePath, size string) (err error)

func (*FakePlatform) SetupMonitUser

func (p *FakePlatform) SetupMonitUser() (err error)

func (*FakePlatform) SetupNetworking

func (p *FakePlatform) SetupNetworking(networks boshsettings.Networks) error

func (*FakePlatform) SetupRawEphemeralDisks

func (p *FakePlatform) SetupRawEphemeralDisks(devices []boshsettings.DiskSettings) (err error)

func (*FakePlatform) SetupRootDisk

func (p *FakePlatform) SetupRootDisk(ephemeralDiskPath string) (err error)

func (*FakePlatform) SetupRuntimeConfiguration

func (p *FakePlatform) SetupRuntimeConfiguration() (err error)

func (*FakePlatform) SetupSSH

func (p *FakePlatform) SetupSSH(publicKey, username string) error

func (*FakePlatform) SetupTmpDir

func (p *FakePlatform) SetupTmpDir() error

func (*FakePlatform) StartMonit

func (p *FakePlatform) StartMonit() (err error)

func (*FakePlatform) UnmountPersistentDisk

func (p *FakePlatform) UnmountPersistentDisk(diskSettings boshsettings.DiskSettings) (didUnmount bool, err error)

Jump to

Keyboard shortcuts

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