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

Implement PATCH support #30

Open
jnprchandras opened this issue Dec 28, 2017 · 11 comments
Open

Implement PATCH support #30

jnprchandras opened this issue Dec 28, 2017 · 11 comments

Comments

@jnprchandras
Copy link

No description provided.

@nati
Copy link
Contributor

nati commented Jan 2, 2018

Could you add reason why we need both of PUT and PATCH? I know they have different meanings but I don't see use cases.

@jnprchandras
Copy link
Author

PUT method is sent by the client to create or replace the target data resource. Where as PATCH allows to update the required properties alone.

In ATOM, Intent infrastrcture would be supporting incremental changes. So the Orcestration layer would invoke the Intent Layer with PATCH request. This intern would translate to another intent(Incase multi layered intent) or LLM. In any case, the translated data would need to be patched.

Let me know if you want me to detail with some example.

@nati
Copy link
Contributor

nati commented Jan 3, 2018

We only use PUT in contrail API or OpenStack API for simplicity, and only specified properties will be updated. I still don't see enough benefit for supporting this.

@jnprchandras
Copy link
Author

Contrail PUT is PATCH. The semantics of PUT should completely opverride. But it acts as Patch in contrail.

Other pending item in PATCH is : If A has B vertex, client should be able to update both A and B in single call. Currently Client need to call A and B seperately.

@nati
Copy link
Contributor

nati commented Jan 8, 2018

Could you give me an example for the vertex?

yes Contrai/Neutron PUT is PATCH, but we don't have any problem around it. and I don't see many use of completely override.

@jnprchandras
Copy link
Author

Lets take a service in metro controller usecases. EVPN service. This contains set of endpoints (devices). These can be in hundreds.In contrail data model, this can be modeled as evpn->endpoints. Here Evpn is one vertex and Endpoint is one vertex. "Evpn" vertex will have "has edge" with "endpoint". client should be able to update multiple endpoint vertices in single Patch API. currently contrail existing APIs requires multiple REST calls to update.

@nati
Copy link
Contributor

nati commented Jan 9, 2018

Let's call it as Bluk create/update/delete API. I've created an issue for discussing it . #46

@damianoneill
Copy link
Contributor

damianoneill commented Jan 11, 2018 via email

@cyrilMargaria
Copy link

There is also a requirement in the Orchestrator to support RESTCONF + YANG APIs, which also distinguish between PUT and PATCH. Its possible to map partially YANG to Json-schema (draft-4) , but we have to be more detailed in which schema is supported:
- OpenAPI and JSON-schema draft 4 are not 100% compatible.
- We do have our own intent schema, which uses json-schema, but the JSON-schema draft 4 or OpenAPI or another variant (specifically : anyOf, oneOf, allOf , or discriminator, ..etc)

@nati
Copy link
Contributor

nati commented Jan 12, 2018

@cyrilMargaria
That should be handled by orchestrator layer only.

@cyrilMargaria
Copy link

@nati
OpenAPI too?

Does ATOM supports full JSON-schema draft 4, full openAPI variant, what are the extensions to either base?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants