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

REMOVE operations no longer supported by Orion in orionUrls.js #523

Merged
merged 7 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Remove: operations no longer supported in CB API (aligned with Orion 3.10.1)
- Upgrade NodeJS version from 14-slim to 16-slim in Dockerfile
63 changes: 6 additions & 57 deletions lib/plugins/orionUrls.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,64 +34,13 @@
* this table will fail).
*/
module.exports = [
/* Standard NGSI operations */
/* Legacy NGSI operations (to be removed soon) */
/* Note POST /(v1|ngsi10)/updateContext is not included here,
/* as it is processed in an special way in orionPlugin.js */
['POST', /\/(v1|ngsi10)\/querycontext$/, 'read'],
['POST', /\/(v1|ngsi10)\/subscribecontext$/, 'subscribe'],
['POST', /\/(v1|ngsi10)\/updatecontextsubscription$/, 'subscribe'],
['POST', /\/(v1|ngsi10)\/unsubscribecontext$/, 'subscribe'],
['POST', /\/(v1\/registry|ngsi9)\/registercontext$/, 'register'],
['POST', /\/(v1\/registry|ngsi9)\/discovercontextavailability$/, 'discover'],
['POST', /\/v1\/contexttypes$/, 'read'],


/* "Classic" NGSI9 operations */
['GET', /^\/(ngsi9|v1\/registry)\/contextentities\/.+\/attributes$/, 'N/A'],
['POST', /^\/(ngsi9|v1\/registry)\/contextentities\/.+\/attributes$/, 'N/A'],
['GET', /^\/(ngsi9|v1\/registry)\/contextentities\/.+\/attributes\/.+/, 'discover'],
['POST', /^\/(ngsi9|v1\/registry)\/contextentities\/.+\/attributes\/.+/, 'register'],
['GET', /^\/(ngsi9|v1\/registry)\/contextentities\/.+\/attributeDomains\/.+/, 'discover'],
['POST', /^\/(ngsi9|v1\/registry)\/contextentities\/.+\/attributeDomains\/.+/, 'register'],
['GET', /^\/(ngsi9|v1\/registry)\/contextentities\/.+/, 'discover'],
['POST', /^\/(ngsi9|v1\/registry)\/contextentities\/.+/, 'register'],
['GET', /^\/(ngsi9|v1\/registry)\/contextentitytypes\/.+\/attributes$/, 'N/A'],
['POST', /^\/(ngsi9|v1\/registry)\/contextentitytypes\/.+\/attributes$/, 'N/A'],
['GET', /^\/(ngsi9|v1\/registry)\/contextentitytypes\/.+\/attributes\/.+/, 'discover'],
['POST', /^\/(ngsi9|v1\/registry)\/contextentitytypes\/.+\/attributes\/.+/, 'register'],
['GET', /^\/(ngsi9|v1\/registry)\/contextentitytypes\/.+\/attributeDomains\/.+/, 'discover'],
['POST', /^\/(ngsi9|v1\/registry)\/contextentitytypes\/.+\/attributeDomains\/.+/, 'register'],
['GET', /^\/(ngsi9|v1\/registry)\/contextentitytypes\/.+/, 'discover'],
['POST', /^\/(ngsi9|v1\/registry)\/contextentitytypes\/.+/, 'register'],
/* "Classic" NGSI10 operations */
['GET', /^\/(ngsi10|v1)\/contextentities\/.+\/attributes$/, 'N/A'],
['PUT', /^\/(ngsi10|v1)\/contextentities\/.+\/attributes$/, 'N/A'],
['POST', /^\/(ngsi10|v1)\/contextentities\/.+\/attributes$/, 'N/A'],
['DELETE', /^\/(ngsi10|v1)\/contextentities\/.+\/attributes$/, 'N/A'],
['GET', /^\/(ngsi10|v1)\/contextentities\/.+\/attributes\/.+/, 'read'],
['POST', /^\/(ngsi10|v1)\/contextentities\/.+\/attributes\/.+/, 'create'],
['PUT', /^\/(ngsi10|v1)\/contextentities\/.+\/attributes\/.+/, 'update'],
['DELETE', /^\/(ngsi10|v1)\/contextentities\/.+\/attributes\/.+/, 'delete'],
['GET', /^\/(ngsi10|v1)\/contextentities\/.+\/attributes\/.+\/.+/, 'read'],
['PUT', /^\/(ngsi10|v1)\/contextentities\/.+\/attributes\/.+\/.+/, 'update'],
['DELETE', /^\/(ngsi10|v1)\/contextentities\/.+\/attributes\/.+\/.+/, 'delete'],
['GET', /^\/(ngsi10|v1)\/contextentities\/.+\/attributeDomains\/.+/, 'read'],
['GET', /^\/(ngsi10|v1)\/contextentities\/.+/, 'read'],
['PUT', /^\/(ngsi10|v1)\/contextentities\/.+/, 'update'],
['POST', /^\/(ngsi10|v1)\/contextentities\/.+/, 'create'],
['DELETE', /^\/(ngsi10|v1)\/contextentities\/.+/, 'delete'],
['GET', /^\/(ngsi10|v1)\/contextentitytypes\/.+\/attributes$/, 'N/A'],
['GET', /^\/(ngsi10|v1)\/contextentitytypes\/.+\/attributes\/.+/, 'read'],
['GET', /^\/(ngsi10|v1)\/contextentitytypes\/.+/, 'read'],
['GET', /^\/(ngsi10|v1)\/contextentitytypes\/.+\/attributeDomains\/.+/, 'read'],
['POST', /^\/(ngsi10|v1)\/contextsubscriptions$/, 'subscribe'],
['PUT', /^\/(ngsi10|v1)\/contextsubscriptions\/.+/, 'subscribe'],
['DELETE', /^\/(ngsi10|v1)\/contextsubscriptions\/.+/, 'subscribe'],
/* New operations in v1/ (note that they don't use the "ngsi10" alternative in the pattern) */
['GET', /^\/v1\/contextentities/, 'read'],
['POST', /^\/v1\/contextentities/, 'create'],
['GET', /^\/v1\/contextsubscriptions/, 'read'],
['GET', /^\/v1\/contextsubscriptions\/.+/, 'read'],
['GET', /^\/v1\/contexttypes/, 'read'],
['GET', /^\/v1\/contexttypes\/.+/, 'read'],
['GET', /^\/v1\/contextentities\/.+\/attributes\/.+/, 'read'],
['PUT', /^\/v1\/contextentities\/.+/, 'update'],
['DELETE', /^\/v1\/contextentities\/.+/, 'delete'],

/* V2 Operations */
['POST', /^\/v2\/op\/query$/, 'read'],
Expand Down
Loading