Juniper / contrail

Contrail repo for core components (go based)
Apache License 2.0
44 stars 32 forks source link

PUT request handling #42

Closed jayanthir closed 6 years ago

jayanthir commented 6 years ago

PUT has been implemented with assumption that it will replace the existing Resource entirely. Following are changes to handle PUT(update) request.

· API template changes:

o createRequest Struct is made generic to hold request body for PUT also. o Update handler has been implemented. UUID will be retrieved from params (/PUT/:id). PUT Response will have UUID and URI of resource.

· DB template changes:

o update method has been implemented which executes db update. All the old references are deleted from the ref table. New references are added based on the ref UUID from the request body.

Other than this, there are some import changes in template files( imports were missing/ unused imports were present).