[AAA-243] Add support for naming WebContexts Created: 08/Jan/23  Updated: 09/Jan/23  Resolved: 09/Jan/23

Status: Resolved
Project: aaa
Component/s: General
Affects Version/s: None
Fix Version/s: 0.17.2

Type: New Feature Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks AAA-244 Add IDM web context description Resolved
blocks NETCONF-940 Add descriptions to web contexts Resolved

 Description   

OSGi HTTP (Whiteboard) supports giving descriptive names to WebContexts. Sucrrently our setup looks like this:

opendaylight-user@root>web:context-list

Bundle ID │ Symbolic Name                                 │ Context Path │ Context Name      │ Rank │ Service ID │ Type        │ Scope     │ Registration Properties
──────────┼───────────────────────────────────────────────┼──────────────┼───────────────────┼──────┼────────────┼─────────────┼───────────┼───────────────────────────────────────────────────────────
164       │ org.jolokia.osgi                              │ /            │ context:534196305 │ MAX  │ 0          │ HttpService │ static*   │ httpContext.id=context:534196305
          │                                               │              │                   │      │            │             │           │ httpContext.path=/
          │                                               │              │                   │      │            │             │           │ osgi.http.whiteboard.context.httpservice=context:534196305
          │                                               │              │                   │      │            │             │           │ osgi.http.whiteboard.context.path=/
312       │ org.ops4j.pax.web.pax-web-extender-whiteboard │ /            │ default           │ 0    │ 0          │ Whiteboard  │ static*   │ osgi.http.whiteboard.context.name=default
          │                                               │              │                   │      │            │             │           │ osgi.http.whiteboard.context.path=/
256       │ org.opendaylight.netconf.restconf-nb          │ /.well-known │ /.well-known.id   │ 0    │ 286        │ Whiteboard  │ singleton │ osgi.http.whiteboard.context.name=/.well-known.id
          │                                               │              │                   │      │            │             │           │ osgi.http.whiteboard.context.path=/.well-known
342       │ org.opendaylight.netconf.sal-rest-docgen      │ /apidoc      │ /apidoc.id        │ 0    │ 291        │ Whiteboard  │ singleton │ osgi.http.whiteboard.context.name=/apidoc.id
          │                                               │              │                   │      │            │             │           │ osgi.http.whiteboard.context.path=/apidoc
174       │ org.opendaylight.aaa.shiro                    │ /auth        │ /auth.id          │ 0    │ 270        │ Whiteboard  │ singleton │ osgi.http.whiteboard.context.name=/auth.id
          │                                               │              │                   │      │            │             │           │ osgi.http.whiteboard.context.path=/auth
256       │ org.opendaylight.netconf.restconf-nb          │ /rests       │ /rests.id         │ 0    │ 279        │ Whiteboard  │ singleton │ osgi.http.whiteboard.context.name=/rests.id
          │                                               │              │                   │      │            │             │           │ osgi.http.whiteboard.context.path=/rests

*) This context is using ServletContextHelper/HttpContext without resolving an org.osgi.framework.ServiceReference.

There is obvious room for improvement, where instead of appending ".id" we propagate a user-supplied property.

For example "/rests.id" would become "RFC8040 RESTCONF" or similar. Similarly "/.well-known.id" would become "RFC6415 Web Host Metadata" and "/apidoc.id" would become "OpenAPI".


Generated at Wed Feb 07 19:09:01 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.