fakes

package
Version: v0.0.0-...-9a89ba0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2014 License: Apache-2.0 Imports: 11 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

	SetupDataDirCalled bool
	SetupDataDirErr    error

	SetupTmpDirCalled bool
	SetupTmpDirErr    error

	SetupManualNetworkingNetworks boshsettings.Networks

	SetupDhcpNetworks boshsettings.Networks
	SetupDhcpErr      error

	MountPersistentDiskCalled     bool
	MountPersistentDiskDevicePath string
	MountPersistentDiskMountPoint string
	MountPersistentDiskErr        error

	UnmountPersistentDiskDidUnmount bool
	UnmountPersistentDiskDevicePath string

	GetFileContentsFromCDROMPath     string
	GetFileContentsFromCDROMContents []byte

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

	NormalizeDiskPathCalled   bool
	NormalizeDiskPathPath     string
	NormalizeDiskPathRealPath string

	ScsiDiskMap map[string]string

	MigratePersistentDiskFromMountPoint string
	MigratePersistentDiskToMountPoint   string

	IsMountPointPath   string
	IsMountPointResult bool
	IsMountPointErr    error

	MountedDevicePaths []string

	StartMonitStarted           bool
	SetupMonitUserSetup         bool
	GetMonitCredentialsUsername string
	GetMonitCredentialsPassword string

	PrepareForNetworkingChangeCalled bool
	PrepareForNetworkingChangeErr    error

	GetDefaultNetworkCalled  bool
	GetDefaultNetworkNetwork boshsettings.Network
	GetDefaultNetworkErr     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) CreateUser

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

func (*FakePlatform) DeleteEphemeralUsersMatching

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

func (*FakePlatform) GetCompressor

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

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

func (p *FakePlatform) GetFileContentsFromCDROM(path string) (contents []byte, err 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) 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(path string) (result bool, err error)

func (*FakePlatform) MigratePersistentDisk

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

func (*FakePlatform) MountPersistentDisk

func (p *FakePlatform) MountPersistentDisk(devicePath, mountPoint string) (err error)

func (*FakePlatform) NormalizeDiskPath

func (p *FakePlatform) NormalizeDiskPath(devicePath string) string

func (*FakePlatform) PrepareForNetworkingChange

func (p *FakePlatform) PrepareForNetworkingChange() error

func (*FakePlatform) SetDevicePathResolver

func (p *FakePlatform) SetDevicePathResolver(devicePathResolver boshdpresolv.DevicePathResolver) (err error)

func (*FakePlatform) SetGetFilesContentsFromDisk

func (p *FakePlatform) SetGetFilesContentsFromDisk(fileName string, contents []byte, 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) SetupDhcp

func (p *FakePlatform) SetupDhcp(networks boshsettings.Networks) (err 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) SetupManualNetworking

func (p *FakePlatform) SetupManualNetworking(networks boshsettings.Networks) (err error)

func (*FakePlatform) SetupMonitUser

func (p *FakePlatform) SetupMonitUser() (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(devicePath string) (didUnmount bool, err error)

Jump to

Keyboard shortcuts

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