Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json schema support for service instance/binding #1434

Closed
gberche-orange opened this issue Jan 11, 2018 · 12 comments
Closed

Json schema support for service instance/binding #1434

gberche-orange opened this issue Jan 11, 2018 · 12 comments
Labels
community Community Raised Issue feature-request

Comments

@gberche-orange
Copy link
Contributor

Detailed Description

The Open Service Broker API enables broker authors to specify JSON schema to help client UIs in providing user friendly support for arbitrary params in service instances and service bindings requests. Orange would like to contribute such support when a JSON schema is specified in the service broker catalog: this would generate a form enabling users to discover supported arbitrary param names, and validate params value before submission.

Context

There are an increasing number of service brokers offering arbitrary params, in particular in the context of on-demand dedicated data services (such as cluster sizes, or specific tunings). This feature will provide friendly support for such services.

Possible Implementation

The JSon schema is served by CA API https://apidocs.cloudfoundry.org/280/service_plans/retrieve_a_particular_service_plan.html

There as multiple JSON schema libraries http://json-schema.org/implementations.html along with JS UI generators

/CC @hamzahamidi

@hamzahamidi
Copy link
Contributor

We're working on a component implementing this feature based on Json schema Form of AngularJs. My question is:
Is it worth it implementing an AngularJs version or should we move on to an Angular2+ version compatible with STRATOS ? Thanks
@richard-cox

@richard-cox
Copy link
Contributor

@gberche-orange Thanks for submitting this request. Services, service instances and the general CRUD operations of those two is a bit of an area we would like to improve on. If yourself and @hamzahamidi are happy to contribute we'd gladly offer advice and assist.

@hamzahamidi Good question. Our v2 isn't quite ready for specific contributions. We're working hard at the the moment to create a good base to build on. We hope to start accepting comments in a small number of weeks. Contributions would then follow but may be on the scale of months.
In terms of how long v1 will be around for ... we will continue to support it for a long time to come, however we would only address bugs, security issues and small features.

@nwmac
Copy link
Contributor

nwmac commented Jan 21, 2018

@hamzahamidi Preferably I'd suggest moving onto the Angular 2 version - this is where we are headed - replacing the Angular 1 UI. What's your timescale? It will be a few months before the Angular 2 move is at parity with the current Angular 1 UI.

@nwmac nwmac added the V1 label Jan 31, 2018
@hamzahamidi
Copy link
Contributor

My apologies for the late answer. I'm currently working on this feature in the following repo. In terms of timescale,I have about 6 months. If there is a way to accommodate a place holder for this feature in the V2 version, that'd be great. Where can I track plans on the service support in V2 ?

@nwmac
Copy link
Contributor

nwmac commented Feb 7, 2018

@hamzahamidi Ok. No problem. Would be great if you are able to work on this feature. We are tracking our roadmap here - https://github.com/cloudfoundry-incubator/stratos/blob/v2-master/docs/roadmap.md - we won't get to service support for a few sprints.

We can definitely accommodate a placeholder for your work - I'll add a note to the roadmap and service page.

@richard-cox
Copy link
Contributor

I've just had a look at the repo linked, looks good. We do however how some questions regarding how the input fields themselves are created. In v1 we use a custom input field approach that looks quite different from the vanilla set. In v2 we make full use of the standard angular-material fields. Ideally we'd like any implementation of this to create fields that match those patterns. Does the third-party component used to generate the fields have any way of customising or styling them such that they fit into the v1/v2 approach?

@hamzahamidi
Copy link
Contributor

hamzahamidi commented Feb 8, 2018

Thank you for your answers. I created POC front-end code in the orange-cloudfoundry/schema-form-generator repo for the v2 using Angular2-json-schema-form
A live demo is available at https://orange-cloudfoundry.github.io/schema-form-generator/

@gberche-orange
Copy link
Contributor Author

@hamzahamidi

Regarding end to end tests of Json schema support, here is a sample broker that can be installed on a CF/K8S platform and return example Json schemas associated with plans: https://github.com/mattmcneeney/overview-broker

@gberche-orange
Copy link
Contributor Author

In order for the service instance creation forms to support JSON schema support, the front-end api would need to return the full service plan entity response including the schemas node

"schemas": {
      "service_instance": {
        "create": {},
        "update": {}
      },
      "service_binding": {
        "create": {}
      }
    }

(copied from #1391 (comment) )

@nwmac nwmac added the V2-next label Jun 6, 2018
@gberche-orange
Copy link
Contributor Author

Associated contribution in #2664

@KlapTrap KlapTrap removed the V2-next label Aug 22, 2018
@richard-cox richard-cox added the community Community Raised Issue label Oct 24, 2018
@richard-cox
Copy link
Contributor

Good news! We've just merged this feature via #3050

@gberche-orange
Copy link
Contributor Author

thanks again @richard-cox for your integration and refinements to the json schema contrib by @hamzahamidi

It's so great to be able to using this feature in our stratos deployments !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community Raised Issue feature-request
Projects
None yet
Development

No branches or pull requests

5 participants