Skip to content

Implement bare-bones GET /v3/service_instances - #972

Merged
matt-royal merged 11 commits into
cloudfoundry:masterfrom
cloudfoundry-incubator:pr-service-instance-sharing-v3-service-instances
Nov 13, 2017
Merged

Implement bare-bones GET /v3/service_instances#972
matt-royal merged 11 commits into
cloudfoundry:masterfrom
cloudfoundry-incubator:pr-service-instance-sharing-v3-service-instances

Conversation

@deniseyu

@deniseyu deniseyu commented Nov 1, 2017

Copy link
Copy Markdown
Contributor

As an app dev, I can list shared service instances using the v3 API. #152344116

NOTE: This PR builds on top of #961, which should be merged first. The actual changes on top of #961 can be viewed in this diff.

What

This PR adds limited support for GET /v3/service_instances list endpoint. This is required by the service instance sharing track to enable the CLI to resolve service instances names to guids in v3. At the moment it returns only managed service instances, and each record returned only contains name, guid, created_at and updated_at.

It would be pretty easy for us to return user-provided service instances in this endpoint, but it is not strictly required by the scope of the service instance sharing epic. If you'd like us to modify this endpoint to additionally support user-provided services, please let us know.

Changes:

  • Add endpoint GET /v3/service_instances

PR

  • I have viewed signed and have submitted the Contributor License Agreement
  • I have made this pull request to the master branch
  • I have run all the unit tests using bundle exec rake
  • I have run CF Acceptance Tests on bosh lite

Thanks, sapi (@jenspinney and @deniseyu)

@cfdreddbot

Copy link
Copy Markdown

Hey deniseyu!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

@cf-gitbot

Copy link
Copy Markdown

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/152481619

The labels on this github issue will be updated when the story is started.

Alex Blease and others added 11 commits November 7, 2017 13:58
[#152035378]
Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
[#152035378]

Signed-off-by: Alex Blease <ablease@pivotal.io>
/v2/spaces/:guid/services endpoint now includes service instances that
have been shared into the given space.

[#152035378]

Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
* The only visible change is that the global auditor role now receives
"true" for read when calling /v2/service_instances/:guid/permissions.
This tells the service broker that the user is allowed to view the
service instance dashboard. They already have read access to the service
instance, so we don't anticipate that this is a problem.

[#152035378]

Signed-off-by: Derik Evangelista <devangelista@pivotal.io>
… spaces

* Also cleaned up some of the null checking in service_instance_acess
and added tests for access permissions on shared service instances.

[#152035378]

Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
[#152035378]

Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
[#152631507]

Signed-off-by: Denise Yu <dyu@pivotal.io>
* List all service instances that a user has permission to see

[#152073155]

Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
[#152073155]

Signed-off-by: Alex Blease <ablease@pivotal.io>
This change allows developers who have been granted access to a
service instance through service instance sharing, to query that service
instance via /v3/service_instances.

[#152344116]

Signed-off-by: Alex Blease <ablease@pivotal.io>
[#152344116]

Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
@deniseyu
deniseyu force-pushed the pr-service-instance-sharing-v3-service-instances branch 2 times, most recently from 03bfd63 to d471142 Compare November 7, 2017 14:43
@matt-royal
matt-royal merged commit 194609b into cloudfoundry:master Nov 13, 2017
@deniseyu
deniseyu deleted the pr-service-instance-sharing-v3-service-instances branch November 28, 2017 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants