示例#1
0
func (d *deploymentManagerFactory2) loadDiskRepo() biconfig.DiskRepo {
	if d.diskRepo != nil {
		return d.diskRepo
	}
	d.diskRepo = biconfig.NewDiskRepo(d.loadDeploymentStateService(), d.f.uuidGenerator)
	return d.diskRepo
}
示例#2
0
var _ = Describe("Manager", func() {
	var (
		manager           Manager
		fakeCloud         *fakebicloud.FakeCloud
		fakeFs            *fakesys.FakeFileSystem
		fakeUUIDGenerator *fakeuuid.FakeGenerator
		diskRepo          biconfig.DiskRepo
	)

	BeforeEach(func() {
		logger := boshlog.NewLogger(boshlog.LevelNone)
		fakeFs = fakesys.NewFakeFileSystem()
		fakeUUIDGenerator = &fakeuuid.FakeGenerator{}
		deploymentStateService := biconfig.NewFileSystemDeploymentStateService(fakeFs, fakeUUIDGenerator, logger, "/fake/path")
		diskRepo = biconfig.NewDiskRepo(deploymentStateService, fakeUUIDGenerator)
		managerFactory := NewManagerFactory(diskRepo, logger)
		fakeCloud = fakebicloud.NewFakeCloud()
		manager = managerFactory.NewManager(fakeCloud)
		fakeUUIDGenerator.GeneratedUUID = "fake-uuid"
	})

	Describe("Create", func() {
		var (
			diskPool bideplmanifest.DiskPool
		)

		BeforeEach(func() {

			diskPool = bideplmanifest.DiskPool{
				Name:     "fake-disk-pool-name",