Skip to content

Commit

Permalink
REMOVE operations no longer supported by Orion in orionUrls.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fgalan authored Jul 7, 2023
1 parent 158efc0 commit 7fb3636
Showing 1 changed file with 5 additions and 57 deletions.
62 changes: 5 additions & 57 deletions lib/plugins/orionUrls.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,64 +34,12 @@
* 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

0 comments on commit 7fb3636

Please sign in to comment.