コード例 #1
0
ファイル: ubuntu.go プロジェクト: reneedv/bosh
func NewUbuntuPlatform(
	collector boshstats.StatsCollector,
	fs boshsys.FileSystem,
	cmdRunner boshsys.CmdRunner,
	diskManager boshdisk.Manager,
	dirProvider boshdirs.DirectoriesProvider,
	cdromWaitInterval time.Duration,
	arpWaitInterval time.Duration,
	diskWaitTimeout time.Duration,
) (platform ubuntu) {
	platform.collector = collector
	platform.fs = fs
	platform.cmdRunner = cmdRunner
	platform.dirProvider = dirProvider

	platform.partitioner = diskManager.GetPartitioner()
	platform.formatter = diskManager.GetFormatter()
	platform.mounter = diskManager.GetMounter()

	platform.compressor = boshcmd.NewTarballCompressor(cmdRunner, fs)
	platform.copier = boshcmd.NewCpCopier(cmdRunner, fs)
	platform.vitalsService = boshvitals.NewService(collector, dirProvider)
	platform.cdromWaitInterval = cdromWaitInterval
	platform.arpWaitInterval = arpWaitInterval
	platform.diskWaitTimeout = diskWaitTimeout
	return
}
コード例 #2
0
ファイル: ubuntu.go プロジェクト: RoyRui/bosh-cloudstack-cpi
func newUbuntuPlatform(collector boshstats.StatsCollector, fs boshsys.FileSystem, cmdRunner boshsys.CmdRunner, diskManager boshdisk.Manager) (platform ubuntu) {
	platform.collector = collector
	platform.fs = fs
	platform.cmdRunner = cmdRunner
	platform.partitioner = diskManager.GetPartitioner()
	platform.formatter = diskManager.GetFormatter()
	platform.mounter = diskManager.GetMounter()
	platform.diskWaitTimeout = 3 * time.Minute
	return
}
コード例 #3
0
ファイル: centos.go プロジェクト: kangaroo/bosh
func newCentosPlatform(
	collector boshstats.StatsCollector,
	fs boshsys.FileSystem,
	cmdRunner boshsys.CmdRunner,
	diskManager boshdisk.Manager,
	dirProvider boshdirs.DirectoriesProvider,
) (platform centos) {
	platform.collector = collector
	platform.fs = fs
	platform.cmdRunner = cmdRunner
	platform.dirProvider = dirProvider

	platform.partitioner = diskManager.GetPartitioner()
	platform.formatter = diskManager.GetFormatter()
	platform.mounter = diskManager.GetMounter()
	platform.diskWaitTimeout = 3 * time.Minute

	platform.compressor = boshcmd.NewTarballCompressor(cmdRunner, fs)
	platform.copier = boshcmd.NewCpCopier(cmdRunner, fs)
	platform.vitalsService = boshvitals.NewService(collector, dirProvider)
	return
}