(spaceName string, orgGUID string)
| 78 | } |
| 79 | |
| 80 | func (actor Actor) GetSpaceByNameAndOrganization(spaceName string, orgGUID string) (resources.Space, Warnings, error) { |
| 81 | ccv3Spaces, _, warnings, err := actor.CloudControllerClient.GetSpaces( |
| 82 | ccv3.Query{Key: ccv3.NameFilter, Values: []string{spaceName}}, |
| 83 | ccv3.Query{Key: ccv3.OrganizationGUIDFilter, Values: []string{orgGUID}}, |
| 84 | ccv3.Query{Key: ccv3.PerPage, Values: []string{"1"}}, |
| 85 | ccv3.Query{Key: ccv3.Page, Values: []string{"1"}}, |
| 86 | ) |
| 87 | |
| 88 | if err != nil { |
| 89 | return resources.Space{}, Warnings(warnings), err |
| 90 | } |
| 91 | |
| 92 | if len(ccv3Spaces) == 0 { |
| 93 | return resources.Space{}, Warnings(warnings), actionerror.SpaceNotFoundError{Name: spaceName} |
| 94 | } |
| 95 | |
| 96 | return resources.Space(ccv3Spaces[0]), Warnings(warnings), nil |
| 97 | } |
| 98 | |
| 99 | func (actor Actor) GetSpaceSummaryByNameAndOrganization(spaceName string, orgGUID string) (SpaceSummary, Warnings, error) { |
| 100 | var allWarnings Warnings |
no test coverage detected