diff --git a/lib/plugins/orionUrls.js b/lib/plugins/orionUrls.js index f5a7caa..50ebf5e 100644 --- a/lib/plugins/orionUrls.js +++ b/lib/plugins/orionUrls.js @@ -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'],