Upgrade E2 to API spec 20190611 03/303/2
authorLott, Christopher (cl778h) <cl778h@att.com>
Tue, 11 Jun 2019 18:08:19 +0000 (14:08 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Tue, 11 Jun 2019 18:17:26 +0000 (14:17 -0400)
This adds new endpoint getNb() but does not yet add a
way to discover all connections and/or statuses.

Change-Id: I355d1834394ea1533a8e8ccf14818e5426c37d50
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
docs/release-notes.rst
e2-mgr-client/pom.xml
e2-mgr-client/src/main/resources/E2_Manager_API_2019-06-11.yaml [new file with mode: 0644]
e2-mgr-client/src/main/resources/e2_manager_2019-05-15.yaml [deleted file]
webapp-backend/pom.xml
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/config/E2ManagerMockConfiguration.java
webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/controller/E2ManagerController.java

index 0b76d82..6fa3759 100644 (file)
 RIC Dashboard Release Notes
 ===========================
 
-Version 1.0.4, 4 June 2019
---------------------------
+Version 1.0.4, 11 June 2019
+---------------------------
 * Add AC xApp neighbor control screen
 * Add ANR xApp neighbor cell relation table
 * Drop the pendulum xApp control screen
-* Add column sorting on xApp catalog, xApp control, ANR 
+* Add column sorting on xApp catalog, xApp control, ANR
 * Add disconnect-all button to RAN connection screen
 * Update ANR xApp client to spec version 0.0.8
+* Update E2 manager client to spec version 20190611
 
 Version 1.0.3, 28 May 2019
 --------------------------
index 997c90b..a3fd0f2 100644 (file)
@@ -31,7 +31,7 @@ limitations under the License.
        <groupId>org.o-ran-sc.ric.e2mgr.client</groupId>
        <artifactId>e2-mgr-client</artifactId>
        <name>RIC E2 Manager client</name>
-       <version>20190515-SNAPSHOT</version>
+       <version>20190611-SNAPSHOT</version>
        <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -104,7 +104,7 @@ limitations under the License.
                                                        <goal>generate</goal>
                                                </goals>
                                                <configuration>
-                                                       <inputSpec>${project.basedir}/src/main/resources/e2_manager_2019-05-15.yaml</inputSpec>
+                                                       <inputSpec>${project.basedir}/src/main/resources/E2_Manager_API_2019-06-11.yaml</inputSpec>
                                                        <language>java</language>
                                                        <packageName>${client.base.package.name}</packageName>
                                                        <modelPackage>${client.base.package.name}.model</modelPackage>
diff --git a/e2-mgr-client/src/main/resources/E2_Manager_API_2019-06-11.yaml b/e2-mgr-client/src/main/resources/E2_Manager_API_2019-06-11.yaml
new file mode 100644 (file)
index 0000000..b6381eb
--- /dev/null
@@ -0,0 +1,750 @@
+# ========================LICENSE_START=================================
+# O-RAN-SC
+# %%
+# Copyright (C) 2019 AT&T Intellectual Property and Nokia
+# %%
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ========================LICENSE_END===================================
+openapi: 3.0.0
+info:
+  title: E2 Manager Service
+  description: E2 Manager Service APIs
+  version: 1.0.0
+servers:
+  - url: 'http://{apiRoot}/v1'
+    variables:
+      apiRoot:
+        default: 'localhost:3800'
+paths:
+  /nodeb/x2-setup:
+    post:
+      summary: X2 Setup
+      tags:
+        - nodeb
+      operationId: x2Setup
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/SetupRequest'
+        required: true
+      responses:
+        '200':
+          description: Success
+        '400':
+          description: Invalid input
+          content:
+            application/problem+json:
+              schema:
+                $ref: '#/components/schemas/ErrorResponse'
+        '500':
+          description: Internal error
+          content:
+            application/problem+json:
+              schema:
+                $ref: '#/components/schemas/ErrorResponse'
+  /nodeb/endc-setup:
+    post:
+      tags:
+        - nodeb
+      summary: ENDC Setup
+      operationId: endcSetup
+      requestBody:
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/SetupRequest'
+        required: true
+      responses:
+        '200':
+          description: Success
+        '400':
+          description: Invalid input
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ErrorResponse'
+        '500':
+          description: Internal Error
+          content:
+            application/problem+json:
+              schema:
+                $ref: '#/components/schemas/ErrorResponse'
+  '/nodeb/{ranName}':
+    get:
+      tags:
+        - nodeb
+      summary: Get RAN by name
+      operationId: getNb
+      parameters:
+        - name: ranName
+          in: path
+          required: true
+          description: Name of RAN to return
+          schema:
+            type: string
+      responses:
+        '200':
+          description: Successful operation
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/GetNodebResponse'
+        '400':
+          description: The specified RAN name is invalid
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ErrorResponse'
+        '404':
+          description: A RAN with the specified name was not found
+          content:
+            application/problem+json:
+              schema:
+                $ref: '#/components/schemas/ErrorResponse'
+        '500':
+          description: Internal Error
+          content:
+            application/problem+json:
+              schema:
+                $ref: '#/components/schemas/ErrorResponse'
+  /health:
+    get:
+      tags:
+        - Health Check
+      summary: E2 Manager Service Health Check
+      responses:
+        '200':
+          description: OK
+components:
+  schemas:
+    SetupRequest:
+      type: object
+      required:
+        - ranIp
+        - ranPort
+        - ranName
+      properties:
+        ranIp:
+          type: string
+        ranPort:
+          type: integer
+          format: uint16
+        ranName:
+          type: string
+    GetNodebResponse:
+      properties:
+        connectionStatus:
+          oneOf:
+            - type: string
+            - type: integer
+        enb:
+          properties:
+            enbType:
+              oneOf:
+                - type: string
+                - type: integer
+            guGroupIds:
+              items:
+                type: string
+              type: array
+            servedCells:
+              items:
+                properties:
+                  bandwidthReducedSi:
+                    oneOf:
+                      - type: string
+                      - type: integer
+                  broadcastPlmns:
+                    items:
+                      type: string
+                    type: array
+                  cellId:
+                    type: string
+                  choiceEutraMode:
+                    properties:
+                      fdd:
+                        properties:
+                          dlTransmissionBandwidth:
+                            oneOf:
+                              - type: string
+                              - type: integer
+                          dlearFcn:
+                            type: integer
+                          ulTransmissionBandwidth:
+                            oneOf:
+                              - type: string
+                              - type: integer
+                          ulearFcn:
+                            type: integer
+                        additionalProperties: false
+                        type: object
+                      tdd:
+                        properties:
+                          additionalSpecialSubframeExtensionInfo:
+                            properties:
+                              additionalSpecialSubframePatternsExtension:
+                                oneOf:
+                                  - type: string
+                                  - type: integer
+                              cyclicPrefixDl:
+                                oneOf:
+                                  - type: string
+                                  - type: integer
+                              cyclicPrefixUl:
+                                oneOf:
+                                  - type: string
+                                  - type: integer
+                            additionalProperties: false
+                            type: object
+                          additionalSpecialSubframeInfo:
+                            properties:
+                              additionalSpecialSubframePatterns:
+                                oneOf:
+                                  - type: string
+                                  - type: integer
+                              cyclicPrefixDl:
+                                oneOf:
+                                  - type: string
+                                  - type: integer
+                              cyclicPrefixUl:
+                                oneOf:
+                                  - type: string
+                                  - type: integer
+                            additionalProperties: false
+                            type: object
+                          earFcn:
+                            type: integer
+                          specialSubframeInfo:
+                            properties:
+                              cyclicPrefixDl:
+                                oneOf:
+                                  - type: string
+                                  - type: integer
+                              cyclicPrefixUl:
+                                oneOf:
+                                  - type: string
+                                  - type: integer
+                              specialSubframePatterns:
+                                oneOf:
+                                  - type: string
+                                  - type: integer
+                            additionalProperties: false
+                            type: object
+                          subframeAssignment:
+                            oneOf:
+                              - type: string
+                              - type: integer
+                          transmissionBandwidth:
+                            oneOf:
+                              - type: string
+                              - type: integer
+                        additionalProperties: false
+                        type: object
+                    additionalProperties: false
+                    type: object
+                  csgId:
+                    type: string
+                  eutraMode:
+                    oneOf:
+                      - type: string
+                      - type: integer
+                  freqBandIndicatorPriority:
+                    oneOf:
+                      - type: string
+                      - type: integer
+                  mbmsServiceAreaIdentities:
+                    items:
+                      type: string
+                    type: array
+                  mbsfnSubframeInfos:
+                    items:
+                      properties:
+                        radioframeAllocationOffset:
+                          type: integer
+                        radioframeAllocationPeriod:
+                          oneOf:
+                            - type: string
+                            - type: integer
+                        subframeAllocation:
+                          type: string
+                        subframeAllocationType:
+                          oneOf:
+                            - type: string
+                            - type: integer
+                      additionalProperties: false
+                      type: object
+                    type: array
+                  multibandInfos:
+                    items:
+                      type: integer
+                    type: array
+                  neighbourInfos:
+                    items:
+                      properties:
+                        earFcn:
+                          type: integer
+                        ecgi:
+                          type: string
+                        pci:
+                          type: integer
+                        tac:
+                          type: string
+                      additionalProperties: false
+                      type: object
+                    type: array
+                  numberOfAntennaPorts:
+                    oneOf:
+                      - type: string
+                      - type: integer
+                  pci:
+                    type: integer
+                  prachConfiguration:
+                    properties:
+                      highSpeedFlag:
+                        type: boolean
+                      prachConfigurationIndex:
+                        type: integer
+                      prachFrequencyOffset:
+                        type: integer
+                      rootSequenceIndex:
+                        type: integer
+                      zeroCorrelationZoneConfiguration:
+                        type: integer
+                    additionalProperties: false
+                    type: object
+                  tac:
+                    type: string
+                additionalProperties: false
+                type: object
+              type: array
+          additionalProperties: false
+          type: object
+        failureType:
+          oneOf:
+            - type: string
+            - type: integer
+        gnb:
+          properties:
+            servedNrCells:
+              items:
+                properties:
+                  nrNeighbourInfos:
+                    items:
+                      properties:
+                        choiceNrMode:
+                          properties:
+                            fdd:
+                              properties:
+                                dlarFcnFreqInfo:
+                                  properties:
+                                    frequencyBands:
+                                      items:
+                                        properties:
+                                          nrFrequencyBand:
+                                            type: integer
+                                          supportedSulBands:
+                                            items:
+                                              type: integer
+                                            type: array
+                                        additionalProperties: false
+                                        type: object
+                                      type: array
+                                    nrArFcn:
+                                      oneOf:
+                                        - type: integer
+                                    sulInformation:
+                                      properties:
+                                        sulArFcn:
+                                          oneOf:
+                                            - type: integer
+                                        sulTransmissionBandwidth:
+                                          properties:
+                                            ncnrb:
+                                              oneOf:
+                                                - type: string
+                                                - type: integer
+                                            nrscs:
+                                              oneOf:
+                                                - type: string
+                                                - type: integer
+                                          additionalProperties: false
+                                          type: object
+                                      additionalProperties: false
+                                      type: object
+                                  additionalProperties: false
+                                  type: object
+                                ularFcnFreqInfo:
+                                  properties:
+                                    frequencyBands:
+                                      items:
+                                        properties:
+                                          nrFrequencyBand:
+                                            type: integer
+                                          supportedSulBands:
+                                            items:
+                                              type: integer
+                                            type: array
+                                        additionalProperties: false
+                                        type: object
+                                      type: array
+                                    nrArFcn:
+                                      oneOf:
+                                        - type: integer
+                                    sulInformation:
+                                      properties:
+                                        sulArFcn:
+                                          oneOf:
+                                            - type: integer
+                                        sulTransmissionBandwidth:
+                                          properties:
+                                            ncnrb:
+                                              oneOf:
+                                                - type: string
+                                                - type: integer
+                                            nrscs:
+                                              oneOf:
+                                                - type: string
+                                                - type: integer
+                                          additionalProperties: false
+                                          type: object
+                                      additionalProperties: false
+                                      type: object
+                                  additionalProperties: false
+                                  type: object
+                              additionalProperties: false
+                              type: object
+                            tdd:
+                              properties:
+                                arFcnNrFreqInfo:
+                                  properties:
+                                    frequencyBands:
+                                      items:
+                                        properties:
+                                          nrFrequencyBand:
+                                            type: integer
+                                          supportedSulBands:
+                                            items:
+                                              type: integer
+                                            type: array
+                                        additionalProperties: false
+                                        type: object
+                                      type: array
+                                    nrArFcn:
+                                      oneOf:
+                                        - type: integer
+                                    sulInformation:
+                                      properties:
+                                        sulArFcn:
+                                          oneOf:
+                                            - type: integer
+                                        sulTransmissionBandwidth:
+                                          properties:
+                                            ncnrb:
+                                              oneOf:
+                                                - type: string
+                                                - type: integer
+                                            nrscs:
+                                              oneOf:
+                                                - type: string
+                                                - type: integer
+                                          additionalProperties: false
+                                          type: object
+                                      additionalProperties: false
+                                      type: object
+                                  additionalProperties: false
+                                  type: object
+                              additionalProperties: false
+                              type: object
+                          additionalProperties: false
+                          type: object
+                        configuredStac:
+                          type: string
+                        nrCgi:
+                          type: string
+                        nrMode:
+                          oneOf:
+                            - type: string
+                            - type: integer
+                        nrPci:
+                          type: integer
+                        stac5g:
+                          type: string
+                      additionalProperties: false
+                      type: object
+                    type: array
+                  servedNrCellInformation:
+                    properties:
+                      cellId:
+                        type: string
+                      choiceNrMode:
+                        properties:
+                          fdd:
+                            properties:
+                              dlFreqInfo:
+                                properties:
+                                  frequencyBands:
+                                    items:
+                                      properties:
+                                        nrFrequencyBand:
+                                          type: integer
+                                        supportedSulBands:
+                                          items:
+                                            type: integer
+                                          type: array
+                                      additionalProperties: false
+                                      type: object
+                                    type: array
+                                  nrArFcn:
+                                    oneOf:
+                                      - type: integer
+                                  sulInformation:
+                                    properties:
+                                      sulArFcn:
+                                        oneOf:
+                                          - type: integer
+                                      sulTransmissionBandwidth:
+                                        properties:
+                                          ncnrb:
+                                            oneOf:
+                                              - type: string
+                                              - type: integer
+                                          nrscs:
+                                            oneOf:
+                                              - type: string
+                                              - type: integer
+                                        additionalProperties: false
+                                        type: object
+                                    additionalProperties: false
+                                    type: object
+                                additionalProperties: false
+                                type: object
+                              dlTransmissionBandwidth:
+                                properties:
+                                  ncnrb:
+                                    oneOf:
+                                      - type: string
+                                      - type: integer
+                                  nrscs:
+                                    oneOf:
+                                      - type: string
+                                      - type: integer
+                                additionalProperties: false
+                                type: object
+                              ulFreqInfo:
+                                properties:
+                                  frequencyBands:
+                                    items:
+                                      properties:
+                                        nrFrequencyBand:
+                                          type: integer
+                                        supportedSulBands:
+                                          items:
+                                            type: integer
+                                          type: array
+                                      additionalProperties: false
+                                      type: object
+                                    type: array
+                                  nrArFcn:
+                                    oneOf:
+                                      - type: integer
+                                  sulInformation:
+                                    properties:
+                                      sulArFcn:
+                                        oneOf:
+                                          - type: integer
+                                      sulTransmissionBandwidth:
+                                        properties:
+                                          ncnrb:
+                                            oneOf:
+                                              - type: string
+                                              - type: integer
+                                          nrscs:
+                                            oneOf:
+                                              - type: string
+                                              - type: integer
+                                        additionalProperties: false
+                                        type: object
+                                    additionalProperties: false
+                                    type: object
+                                additionalProperties: false
+                                type: object
+                              ulTransmissionBandwidth:
+                                properties:
+                                  ncnrb:
+                                    oneOf:
+                                      - type: string
+                                      - type: integer
+                                  nrscs:
+                                    oneOf:
+                                      - type: string
+                                      - type: integer
+                                additionalProperties: false
+                                type: object
+                            additionalProperties: false
+                            type: object
+                          tdd:
+                            properties:
+                              nrFreqInfo:
+                                properties:
+                                  frequencyBands:
+                                    items:
+                                      properties:
+                                        nrFrequencyBand:
+                                          type: integer
+                                        supportedSulBands:
+                                          items:
+                                            type: integer
+                                          type: array
+                                      additionalProperties: false
+                                      type: object
+                                    type: array
+                                  nrArFcn:
+                                    oneOf:
+                                      - type: integer
+                                  sulInformation:
+                                    properties:
+                                      sulArFcn:
+                                        oneOf:
+                                          - type: integer
+                                      sulTransmissionBandwidth:
+                                        properties:
+                                          ncnrb:
+                                            oneOf:
+                                              - type: string
+                                              - type: integer
+                                          nrscs:
+                                            oneOf:
+                                              - type: string
+                                              - type: integer
+                                        additionalProperties: false
+                                        type: object
+                                    additionalProperties: false
+                                    type: object
+                                additionalProperties: false
+                                type: object
+                              transmissionBandwidth:
+                                properties:
+                                  ncnrb:
+                                    oneOf:
+                                      - type: string
+                                      - type: integer
+                                  nrscs:
+                                    oneOf:
+                                      - type: string
+                                      - type: integer
+                                additionalProperties: false
+                                type: object
+                            additionalProperties: false
+                            type: object
+                        additionalProperties: false
+                        type: object
+                      configuredStac:
+                        type: string
+                      nrMode:
+                        oneOf:
+                          - type: string
+                          - type: integer
+                      nrPci:
+                        type: integer
+                      servedPlmns:
+                        items:
+                          type: string
+                        type: array
+                      stac5g:
+                        type: string
+                    additionalProperties: false
+                    type: object
+                additionalProperties: false
+                type: object
+              type: array
+          additionalProperties: false
+          type: object
+        ip:
+          type: string
+        nodeType:
+          oneOf:
+            - type: string
+            - type: integer
+        port:
+          type: integer
+        ranName:
+          type: string
+        setupFailure:
+          properties:
+            criticalityDiagnostics:
+              properties:
+                informationElementCriticalityDiagnostics:
+                  items:
+                    properties:
+                      ieCriticality:
+                        oneOf:
+                          - type: string
+                          - type: integer
+                      ieId:
+                        type: integer
+                      typeOfError:
+                        oneOf:
+                          - type: string
+                          - type: integer
+                    additionalProperties: false
+                    type: object
+                  type: array
+                procedureCode:
+                  type: integer
+                procedureCriticality:
+                  oneOf:
+                    - type: string
+                    - type: integer
+                triggeringMessage:
+                  oneOf:
+                    - type: string
+                    - type: integer
+              additionalProperties: false
+              type: object
+            miscellaneousCause:
+              oneOf:
+                - type: string
+                - type: integer
+            networkLayerCause:
+              oneOf:
+                - type: string
+                - type: integer
+            protocolCause:
+              oneOf:
+                - type: string
+                - type: integer
+            timeToWait:
+              oneOf:
+                - type: string
+                - type: integer
+            transportLayerCause:
+              oneOf:
+                - type: string
+                - type: integer
+          additionalProperties: false
+          type: object
+      additionalProperties: false
+      type: object
+    ErrorResponse:
+      type: object
+      required:
+        - errorCode
+        - errorMessage
+      properties:
+        errorCode:
+          type: string
+          description: '401 - corrupted json, 402 - validation error, 501 - internal problem'
+        errorMessage:
+          type: string
+          description: Human readable text
diff --git a/e2-mgr-client/src/main/resources/e2_manager_2019-05-15.yaml b/e2-mgr-client/src/main/resources/e2_manager_2019-05-15.yaml
deleted file mode 100644 (file)
index 20c4ec9..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-# ========================LICENSE_START=================================
-# O-RAN-SC
-# %%
-# Copyright (C) 2019 AT&T Intellectual Property and Nokia
-# %%
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ========================LICENSE_END===================================
-openapi: 3.0.0
-info:
-  title: E2 Manager Service
-  description: E2 Manager Service APIs
-  version: 1.0.0
-servers:
-  - url: 'http://{apiRoot}/v1'
-    variables:
-      apiRoot:
-        default: 'localhost:3800'
-paths:
-  /nodeb/x2-setup:
-    post:
-      summary: X2 Setup
-      tags:
-        - nodeb
-      operationId: x2Setup
-      requestBody:
-        content:
-          application/json:
-            schema:
-              $ref: '#/components/schemas/SetupRequest'
-        required: true
-      responses:
-        '200':
-          description: Success
-        '400':
-          description: Invalid input
-          content:
-            application/problem+json:
-              schema:
-                $ref: '#/components/schemas/ErrorResponse'
-        '500':
-          description: Internal error
-          content:
-            application/problem+json:
-              schema:
-                $ref: '#/components/schemas/ErrorResponse'
-  /nodeb/endc-setup:
-    post:
-      tags:
-        - nodeb
-      summary: ENDC Setup
-      operationId: endcSetup
-      requestBody:
-        content:
-          application/json:
-            schema:
-              $ref: '#/components/schemas/SetupRequest'
-        required: true
-      responses:
-        '200':
-          description: Success
-        '400':
-          description: Invalid input
-          content:
-            application/json:
-              schema:
-                $ref: '#/components/schemas/ErrorResponse'
-        '500':
-          description: Internal Error
-          content:
-            application/problem+json:
-              schema:
-                $ref: '#/components/schemas/ErrorResponse'
-  /health:
-    get:
-      tags:
-        - Health Check
-      summary: E2 Manager Service Health Check
-      responses:
-        '200':
-          description: OK
-components:
-  schemas:
-    SetupRequest:
-      type: object
-      required:
-        - ranIp
-        - ranPort
-        - ranName
-      properties:
-        ranIp:
-          type: string
-        ranPort:
-          type: integer
-          format: uint16
-        ranName:
-          type: string
-    ErrorResponse:
-      type: object
-      required:
-        - errorCode
-        - errorMessage
-      properties:
-        errorCode:
-          type: string
-          description: '401 - corrupted json, 402 - validation error, 501 - internal problem'
-        errorMessage:
-          type: string
-          description: Human readable text
index c9ebdaa..37a8595 100644 (file)
@@ -47,7 +47,7 @@ limitations under the License.
                <dependency>
                        <groupId>org.o-ran-sc.ric.e2mgr.client</groupId>
                        <artifactId>e2-mgr-client</artifactId>
-                       <version>20190515-SNAPSHOT</version>
+                       <version>20190611-SNAPSHOT</version>
                </dependency>
                <dependency>
                        <groupId>org.o-ran-sc.ric.xappmgr.client</groupId>
index d6ff9b8..b05d817 100644 (file)
@@ -29,6 +29,7 @@ import java.lang.invoke.MethodHandles;
 import org.oransc.ric.e2mgr.client.api.HealthCheckApi;
 import org.oransc.ric.e2mgr.client.api.NodebApi;
 import org.oransc.ric.e2mgr.client.invoker.ApiClient;
+import org.oransc.ric.e2mgr.client.model.GetNodebResponse;
 import org.oransc.ric.e2mgr.client.model.SetupRequest;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -47,8 +48,11 @@ public class E2ManagerMockConfiguration {
 
        private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
+       private final GetNodebResponse nodebResponse;
+       
        public E2ManagerMockConfiguration() {
                logger.info("Configuring mock E2 Manager");
+               nodebResponse = new GetNodebResponse().ip("1.2.3.4").port(123).ranName("myRan");
        }
 
        private ApiClient apiClient() {
@@ -76,6 +80,10 @@ public class E2ManagerMockConfiguration {
                NodebApi mockApi = mock(NodebApi.class);
                when(mockApi.getApiClient()).thenReturn(apiClient);
 
+               doAnswer(i -> {
+                       return nodebResponse;
+               }).when(mockApi).getNb(any(String.class));
+
                doAnswer(i -> {
                        return null;
                }).when(mockApi).endcSetup(any(SetupRequest.class));
index 97604a4..f4888fc 100644 (file)
@@ -27,6 +27,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.oransc.ric.e2mgr.client.api.HealthCheckApi;
 import org.oransc.ric.e2mgr.client.api.NodebApi;
+import org.oransc.ric.e2mgr.client.model.GetNodebResponse;
 import org.oransc.ric.e2mgr.client.model.SetupRequest;
 import org.oransc.ric.portal.dashboard.DashboardApplication;
 import org.oransc.ric.portal.dashboard.DashboardConstants;
@@ -40,6 +41,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.http.MediaType;
 import org.springframework.util.Assert;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -51,8 +53,8 @@ import io.swagger.annotations.ApiOperation;
  * Provides methods to contact the E2 Manager.
  * 
  * As of this writing the E2 interface only supports setup connection and check
- * health actions; it does not support query or close operations on existing
- * connections. So this class mocks up some of that functionality.
+ * health actions, and query by RAN name. But it does not support get-all, oo
+ * this class mocks up some of that functionality.
  */
 @Configuration
 @RestController
@@ -61,6 +63,9 @@ public class E2ManagerController {
 
        private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
+       // Path parameters
+       private static final String PP_RANNAME = "ranName";
+
        // Populated by the autowired constructor
        private final HealthCheckApi e2HealthCheckApi;
        private final NodebApi e2NodebApi;
@@ -108,6 +113,13 @@ public class E2ManagerController {
                return responses;
        }
 
+       @ApiOperation(value = "Get RAN by name.", response = GetNodebResponse.class)
+       @RequestMapping(value = "/nodeb/{" + PP_RANNAME + "}", method = RequestMethod.GET)
+       public GetNodebResponse getNb(@PathVariable(PP_RANNAME) String ranName) {
+               logger.debug("getNb {}", ranName);
+               return e2NodebApi.getNb(ranName);
+       }
+
        // TODO replace with actual delete all RAN connections functionality
        @ApiOperation(value = "Disconnect all RAN Connections.")
        @RequestMapping(value = "/disconnectAllRAN", method = RequestMethod.DELETE)