func (manager *FakeServiceManager) GetDiskFromCloudProvider(
	zone string, diskName string) (*Disk, error) {

	if manager.zonalDisks[zone] == "" {
		return nil, cloudprovider.DiskNotFound
	}

	if manager.resourceInUse {
		errorItem := googleapi.ErrorItem{Reason: "resourceInUseByAnotherResource"}
		err := &googleapi.Error{Errors: []googleapi.ErrorItem{errorItem}}
		return nil, err
	}

	return &Disk{
		Region:   manager.gceRegion,
		ZoneInfo: singleZone{lastComponent(zone)},
		Name:     diskName,
		Kind:     "compute#disk",
		Type:     "type",
	}, nil
}
/**
 * Gets disk info stored in the FakeServiceManager.
 */
Gets disk info stored in the FakeServiceManager.
/ ** * Gets disk info stored in the FakeServiceManager . * /
func (manager *FakeServiceManager) GetDiskFromCloudProvider(
	zone string, diskName string) (*Disk, error) {
	if manager.zonalDisks[zone] == "" {
		return nil, cloudprovider.DiskNotFound
	}
	if manager.resourceInUse {
		errorItem := googleapi.ErrorItem{Reason: "resourceInUseByAnotherResource"}
		err := &googleapi.Error{Errors: []googleapi.ErrorItem{errorItem}}
		return nil, err
	}
	return &Disk{
		Region:   manager.gceRegion,
		ZoneInfo: singleZone{lastComponent(zone)},
		Name:     diskName,
		Kind:     "compute#disk",
		Type:     "type",
	}, nil
}
func ( manager * FakeServiceManager ) GetDiskFromCloudProvider ( zone string , diskName string ) ( * Disk , error ) { if manager . zonalDisks [ zone ] == " " { return nil , cloudprovider . DiskNotFound } if manager . resourceInUse { errorItem := googleapi . ErrorItem { Reason : " " } err := & googleapi . Error { Errors : [ ] googleapi . ErrorItem { errorItem } } return nil , err } return & Disk { Region : manager . gceRegion , ZoneInfo : singleZone { lastComponent ( zone ) } , Name : diskName , Kind : " " , Type : " " , } , nil }
Gets disk info stored in the FakeServiceManager.
Gets disk info stored in the FakeServiceManager .