func NewFakeCloud()

in pkg/cloud_provider/lustre/fake.go [95:134]


func NewFakeCloud() (*Cloud, error) {
	existingInstances := map[string]*ServiceInstance{
		"existing-instance": {
			Project:     project,
			Location:    zone,
			Name:        "existing-instance",
			Filesystem:  "existing",
			Network:     network,
			IP:          "192.168.1.1",
			State:       activeState,
			CapacityGib: minCapGiB,
		},
		"creating-instance": {
			Project:     project,
			Location:    zone,
			Name:        "creating-instance",
			Filesystem:  "creating",
			Network:     network,
			IP:          "192.168.1.2",
			State:       creatingState,
			CapacityGib: minCapGiB,
		},
		"unknown-instance": {
			Project:     project,
			Location:    zone,
			Name:        "unknown-instance",
			Filesystem:  "unknown",
			Network:     network,
			IP:          "192.168.1.3",
			State:       unknownState,
			CapacityGib: minCapGiB,
		},
	}

	return &Cloud{
		LustreService: &fakeServiceManager{createdInstances: existingInstances},
		Project:       project,
		Zone:          zone,
	}, nil
}