func (manager *FakeServiceManager) CreateRegionalDiskOnCloudProvider(
	name string,
	sizeGb int64,
	tagsStr string,
	diskType string,
	zones sets.String) (*Disk, error) {

	manager.createDiskCalled = true
	diskTypeURI := gceComputeAPIEndpoint + "projects/" + fmt.Sprintf(diskTypeURITemplateRegional, manager.gceProjectID, manager.gceRegion, diskType)
	switch t := manager.targetAPI; t {
	case targetStable:
		diskToCreateV1 := &compute.Disk{
			Name:        name,
			SizeGb:      sizeGb,
			Description: tagsStr,
			Type:        diskTypeURI,
		}
		manager.diskToCreateStable = diskToCreateV1
		manager.regionalDisks[diskToCreateV1.Name] = zones
		return nil, nil
	default:
		return nil, fmt.Errorf("unexpected type: %T", t)
	}
}
/**
 * Upon disk creation, disk info is stored in FakeServiceManager
 * to be used by other tested methods.
 */
Upon disk creation, disk info is stored in FakeServiceManager
to be used by other tested methods.
/ ** * Upon disk creation disk info is stored in FakeServiceManager * to be used by other tested methods . * /
func (manager *FakeServiceManager) CreateRegionalDiskOnCloudProvider(
	name string,
	sizeGb int64,
	tagsStr string,
	diskType string,
	zones sets.String) (*Disk, error) {
	manager.createDiskCalled = true
	diskTypeURI := gceComputeAPIEndpoint + "projects/" + fmt.Sprintf(diskTypeURITemplateRegional, manager.gceProjectID, manager.gceRegion, diskType)
	switch t := manager.targetAPI; t {
	case targetStable:
		diskToCreateV1 := &compute.Disk{
			Name:        name,
			SizeGb:      sizeGb,
			Description: tagsStr,
			Type:        diskTypeURI,
		}
		manager.diskToCreateStable = diskToCreateV1
		manager.regionalDisks[diskToCreateV1.Name] = zones
		return nil, nil
	default:
		return nil, fmt.Errorf("unexpected type: %T", t)
	}
}
func ( manager * FakeServiceManager ) CreateRegionalDiskOnCloudProvider ( name string , sizeGb int64 , tagsStr string , diskType string , zones sets . String ) ( * Disk , error ) { manager . createDiskCalled = true diskTypeURI := gceComputeAPIEndpoint + " " + fmt . Sprintf ( diskTypeURITemplateRegional , manager . gceProjectID , manager . gceRegion , diskType ) switch t := manager . targetAPI ; t { case targetStable : diskToCreateV1 := & compute . Disk { Name : name , SizeGb : sizeGb , Description : tagsStr , Type : diskTypeURI , } manager . diskToCreateStable = diskToCreateV1 manager . regionalDisks [ diskToCreateV1 . Name ] = zones return nil , nil default : return nil , fmt . Errorf ( " " , t ) } }
Upon disk creation, disk info is stored in FakeServiceManager
to be used by other tested methods.
Upon disk creation disk info is stored in FakeServiceManager to be used by other tested methods .