diff options
author | PatrikBuhr <patrik.buhr@est.tech> | 2021-01-14 15:31:39 +0100 |
---|---|---|
committer | PatrikBuhr <patrik.buhr@est.tech> | 2021-01-15 12:03:14 +0100 |
commit | be0ae3e197f5d5032c0766a59050b03e2a4deb99 (patch) | |
tree | d5e4977b41c67285434bd10125f9a876c484f460 /a1-policy-management | |
parent | 157f8cb05752a6bff2b7b9ad192acba4b6def6c3 (diff) |
Added a prefix to the PMS NBI
Replaced the copied pms api files under offered api with symlinks.
Change-Id: I9421fdb959078e5de1a20987f3c2a2fa626bb25d
Issue-ID: CCSDK-3077
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Diffstat (limited to 'a1-policy-management')
4 files changed, 711 insertions, 708 deletions
diff --git a/a1-policy-management/api/pms-api.json b/a1-policy-management/api/pms-api.json index 126eab56..d1823894 100644 --- a/a1-policy-management/api/pms-api.json +++ b/a1-policy-management/api/pms-api.json @@ -5,7 +5,7 @@ "summary": "Query policy type names", "deprecated": false, "produces": ["*/*"], - "operationId": "getPolicyTypesUsingGET_1", + "operationId": "getPolicyTypesUsingGET", "responses": { "200": { "schema": { @@ -31,47 +31,66 @@ }], "tags": ["A1 Policy Management Version 1.0"] }}, - "/v2/status": {"get": { - "summary": "Returns status and statistics of this service", + "/a1-policy/v2/policy-instances": {"get": { + "summary": "Query for A1 policy instances", "deprecated": false, "produces": ["application/json"], - "operationId": "getStatusUsingGET_1", + "description": "Returns a list of A1 policies matching given search criteria. <br>If several query parameters are defined, the policies matching all conditions are returned.", + "operationId": "getPolicyInstancesUsingGET", "responses": { "200": { - "schema": {"$ref": "#/definitions/status_info_v2"}, - "description": "Service is living" + "schema": {"$ref": "#/definitions/policy_info_list_v2"}, + "description": "Policies" }, "401": {"description": "Unauthorized"}, "403": {"description": "Forbidden"}, - "404": {"description": "Not Found"} + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Near-RT RIC, policy type or service not found" + } }, + "parameters": [ + { + "in": "query", + "allowEmptyValue": false, + "name": "policytype_id", + "description": "The identity of the policy type to get policies for.", + "type": "string", + "required": false + }, + { + "in": "query", + "allowEmptyValue": false, + "name": "ric_id", + "description": "The identity of the Near-RT RIC to get policies for.", + "type": "string", + "required": false + }, + { + "in": "query", + "allowEmptyValue": false, + "name": "service_id", + "description": "The identity of the service to get policies for.", + "type": "string", + "required": false + } + ], "tags": ["A1 Policy Management Version 2.0 (in progress)"] }}, - "/v2/policy-types": {"get": { - "summary": "Query policy type identities", + "/a1-policy/v2/status": {"get": { + "summary": "Returns status and statistics of this service", "deprecated": false, "produces": ["application/json"], - "operationId": "getPolicyTypesUsingGET", + "operationId": "getStatusUsingGET", "responses": { "200": { - "schema": {"$ref": "#/definitions/policytype_id_list_v2"}, - "description": "Policy type IDs" + "schema": {"$ref": "#/definitions/status_info_v2"}, + "description": "Service is living" }, "401": {"description": "Unauthorized"}, "403": {"description": "Forbidden"}, - "404": { - "schema": {"$ref": "#/definitions/error_information"}, - "description": "Near-RT RIC is not found" - } + "404": {"description": "Not Found"} }, - "parameters": [{ - "in": "query", - "allowEmptyValue": false, - "name": "ric_id", - "description": "The identity of the Near-RT RIC to get types for.", - "type": "string", - "required": false - }], "tags": ["A1 Policy Management Version 2.0 (in progress)"] }}, "/services": { @@ -79,7 +98,7 @@ "summary": "Returns service information", "deprecated": false, "produces": ["*/*"], - "operationId": "getServicesUsingGET_1", + "operationId": "getServicesUsingGET", "responses": { "200": { "schema": { @@ -109,7 +128,7 @@ "summary": "Delete a service", "deprecated": false, "produces": ["*/*"], - "operationId": "deleteServiceUsingDELETE_1", + "operationId": "deleteServiceUsingDELETE", "responses": { "200": { "schema": {"type": "string"}, @@ -137,39 +156,186 @@ "tags": ["A1 Policy Management Version 1.0"] } }, - "/v2/services/{service_id}": {"delete": { - "summary": "Unregister a service", + "/a1-policy/v2/rics/ric": {"get": { + "summary": "Returns info for one Near-RT RIC", "deprecated": false, - "produces": ["*/*"], - "operationId": "deleteServiceUsingDELETE", + "produces": ["application/json"], + "description": "Either a Near-RT RIC identity or a Mananged Element identity can be specified.<br>The intention with Mananged Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU).", + "operationId": "getRicUsingGET", "responses": { - "200": {"description": "Not used"}, + "200": { + "schema": {"$ref": "#/definitions/ric_info_v2"}, + "description": "Near-RT RIC is found" + }, "401": {"description": "Unauthorized"}, - "204": { - "schema": {"type": "object"}, - "description": "Service unregistered" + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Near-RT RIC is not found" + } + }, + "parameters": [ + { + "in": "query", + "allowEmptyValue": false, + "name": "managed_element_id", + "description": "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.", + "type": "string", + "required": false }, + { + "in": "query", + "allowEmptyValue": false, + "name": "ric_id", + "description": "The identity of a Near-RT RIC to get information for.", + "type": "string", + "required": false + } + ], + "tags": ["A1 Policy Management Version 2.0 (in progress)"] + }}, + "/a1-policy/v2/policies/{policy_id}": { + "get": { + "summary": "Returns a policy", + "deprecated": false, + "produces": ["application/json"], + "operationId": "getPolicyUsingGET_1", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/policy_info_v2"}, + "description": "Policy found" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Policy is not found" + } + }, + "parameters": [{ + "in": "path", + "name": "policy_id", + "description": "policy_id", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 2.0 (in progress)"] + }, + "delete": { + "summary": "Delete a policy", + "deprecated": false, + "produces": ["*/*"], + "operationId": "deletePolicyUsingDELETE_1", + "responses": { + "200": {"description": "Not used"}, + "401": {"description": "Unauthorized"}, + "423": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Near-RT RIC is not operational" + }, + "204": {"description": "Policy deleted"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Policy is not found" + } + }, + "parameters": [{ + "in": "path", + "name": "policy_id", + "description": "policy_id", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 2.0 (in progress)"] + } + }, + "/a1-policy/v2/policy-types": {"get": { + "summary": "Query policy type identities", + "deprecated": false, + "produces": ["application/json"], + "operationId": "getPolicyTypesUsingGET_1", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/policytype_id_list_v2"}, + "description": "Policy type IDs" + }, + "401": {"description": "Unauthorized"}, "403": {"description": "Forbidden"}, "404": { "schema": {"$ref": "#/definitions/error_information"}, - "description": "Service not found" + "description": "Near-RT RIC is not found" } }, "parameters": [{ - "in": "path", - "name": "service_id", - "description": "service_id", + "in": "query", + "allowEmptyValue": false, + "name": "ric_id", + "description": "The identity of the Near-RT RIC to get types for.", "type": "string", - "required": true + "required": false }], "tags": ["A1 Policy Management Version 2.0 (in progress)"] }}, + "/a1-policy/v2/configuration": { + "get": { + "summary": "Returns the contents of the configuration file", + "deprecated": false, + "produces": ["application/json"], + "description": "Note that the file contents is not relevant if the Consul is used.", + "operationId": "getConfigurationUsingGET", + "responses": { + "200": { + "schema": {"type": "object"}, + "description": "Configuration" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "File is not found or readable" + } + }, + "tags": ["Component Configuration"] + }, + "put": { + "summary": "Replace the current configuration file with the given configuration", + "deprecated": false, + "produces": ["*/*"], + "description": "Note that the file is ignored if the Consul is used.", + "operationId": "putConfigurationUsingPUT", + "responses": { + "200": {"description": "Configuration updated"}, + "201": {"description": "Created"}, + "400": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Invalid configuration provided" + }, + "401": {"description": "Unauthorized"}, + "500": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Something went wrong when replacing the configuration. Try again." + }, + "403": {"description": "Forbidden"}, + "404": {"description": "Not Found"} + }, + "parameters": [{ + "schema": {"type": "object"}, + "in": "body", + "name": "configuration", + "description": "configuration", + "required": true + }], + "tags": ["Component Configuration"], + "consumes": ["application/json"] + } + }, "/policy": { "get": { "summary": "Returns a policy configuration", "deprecated": false, "produces": ["*/*"], - "operationId": "getPolicyUsingGET_1", + "operationId": "getPolicyUsingGET", "responses": { "200": { "schema": {"type": "object"}, @@ -196,7 +362,7 @@ "summary": "Delete a policy", "deprecated": false, "produces": ["*/*"], - "operationId": "deletePolicyUsingDELETE_1", + "operationId": "deletePolicyUsingDELETE", "responses": { "200": {"description": "Not used"}, "401": {"description": "Unauthorized"}, @@ -225,7 +391,7 @@ "summary": "Put a policy", "deprecated": false, "produces": ["*/*"], - "operationId": "putPolicyUsingPUT_1", + "operationId": "putPolicyUsingPUT", "responses": { "200": {"description": "Policy updated"}, "201": {"description": "Policy created"}, @@ -343,62 +509,34 @@ ], "tags": ["A1 Policy Management Version 1.0"] }}, - "/v2/policies/{policy_id}": { - "get": { - "summary": "Returns a policy", - "deprecated": false, - "produces": ["application/json"], - "operationId": "getPolicyUsingGET", - "responses": { - "200": { - "schema": {"$ref": "#/definitions/policy_info_v2"}, - "description": "Policy found" - }, - "401": {"description": "Unauthorized"}, - "403": {"description": "Forbidden"}, - "404": { - "schema": {"$ref": "#/definitions/error_information"}, - "description": "Policy is not found" - } + "/a1-policy/v2/services/{service_id}/keepalive": {"put": { + "summary": "Heartbeat indicates that the service is running", + "deprecated": false, + "produces": ["*/*"], + "operationId": "keepAliveServiceUsingPUT_1", + "responses": { + "200": { + "schema": {"type": "object"}, + "description": "Service supervision timer refreshed, OK" }, - "parameters": [{ - "in": "path", - "name": "policy_id", - "description": "policy_id", - "type": "string", - "required": true - }], - "tags": ["A1 Policy Management Version 2.0 (in progress)"] + "201": {"description": "Created"}, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "The service is not found, needs re-registration" + } }, - "delete": { - "summary": "Delete a policy", - "deprecated": false, - "produces": ["*/*"], - "operationId": "deletePolicyUsingDELETE", - "responses": { - "200": {"description": "Not used"}, - "401": {"description": "Unauthorized"}, - "423": { - "schema": {"$ref": "#/definitions/error_information"}, - "description": "Near-RT RIC is not operational" - }, - "204": {"description": "Policy deleted"}, - "403": {"description": "Forbidden"}, - "404": { - "schema": {"$ref": "#/definitions/error_information"}, - "description": "Policy is not found" - } - }, - "parameters": [{ - "in": "path", - "name": "policy_id", - "description": "policy_id", - "type": "string", - "required": true - }], - "tags": ["A1 Policy Management Version 2.0 (in progress)"] - } - }, + "parameters": [{ + "in": "path", + "name": "service_id", + "description": "service_id", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 2.0 (in progress)"], + "consumes": ["application/json"] + }}, "/policy_schema": {"get": { "summary": "Returns one policy type schema definition", "deprecated": false, @@ -460,7 +598,7 @@ "summary": "Returns a policy status", "deprecated": false, "produces": ["*/*"], - "operationId": "getPolicyStatusUsingGET_1", + "operationId": "getPolicyStatusUsingGET", "responses": { "200": { "schema": {"type": "object"}, @@ -483,33 +621,7 @@ }], "tags": ["A1 Policy Management Version 1.0"] }}, - "/v2/policies/{policy_id}/status": {"get": { - "summary": "Returns a policy status", - "deprecated": false, - "produces": ["application/json"], - "operationId": "getPolicyStatusUsingGET", - "responses": { - "200": { - "schema": {"$ref": "#/definitions/policy_status_info_v2"}, - "description": "Policy status" - }, - "401": {"description": "Unauthorized"}, - "403": {"description": "Forbidden"}, - "404": { - "schema": {"$ref": "#/definitions/error_information"}, - "description": "Policy is not found" - } - }, - "parameters": [{ - "in": "path", - "name": "policy_id", - "description": "policy_id", - "type": "string", - "required": true - }], - "tags": ["A1 Policy Management Version 2.0 (in progress)"] - }}, - "/v2/rics": {"get": { + "/a1-policy/v2/rics": {"get": { "summary": "Query Near-RT RIC information", "deprecated": false, "produces": ["application/json"], @@ -537,64 +649,11 @@ }], "tags": ["A1 Policy Management Version 2.0 (in progress)"] }}, - "/v2/configuration": { - "get": { - "summary": "Returns the contents of the configuration file", - "deprecated": false, - "produces": ["application/json"], - "description": "Note that the file contents is not relevant if the Consul is used.", - "operationId": "getConfigurationUsingGET", - "responses": { - "200": { - "schema": {"type": "object"}, - "description": "Configuration" - }, - "401": {"description": "Unauthorized"}, - "403": {"description": "Forbidden"}, - "404": { - "schema": {"$ref": "#/definitions/error_information"}, - "description": "File is not found or readable" - } - }, - "tags": ["Component Configuration"] - }, - "put": { - "summary": "Replace the current configuration file with the given configuration", - "deprecated": false, - "produces": ["*/*"], - "description": "Note that the file is ignored if the Consul is used.", - "operationId": "putConfigurationUsingPUT", - "responses": { - "200": {"description": "Configuration updated"}, - "201": {"description": "Created"}, - "400": { - "schema": {"$ref": "#/definitions/error_information"}, - "description": "Invalid configuration provided" - }, - "401": {"description": "Unauthorized"}, - "500": { - "schema": {"$ref": "#/definitions/error_information"}, - "description": "Something went wrong when replacing the configuration. Try again." - }, - "403": {"description": "Forbidden"}, - "404": {"description": "Not Found"} - }, - "parameters": [{ - "schema": {"type": "object"}, - "in": "body", - "name": "configuration", - "description": "configuration", - "required": true - }], - "tags": ["Component Configuration"], - "consumes": ["application/json"] - } - }, "/policy_ids": {"get": { "summary": "Query policies, only policy identities returned", "deprecated": false, "produces": ["*/*"], - "operationId": "getPolicyIdsUsingGET_1", + "operationId": "getPolicyIdsUsingGET", "responses": { "200": { "schema": { @@ -668,59 +727,13 @@ }], "tags": ["A1 Policy Management Version 1.0"] }}, - "/v2/policy-instances": {"get": { - "summary": "Query for A1 policy instances", - "deprecated": false, - "produces": ["application/json"], - "description": "Returns a list of A1 policies matching given search criteria. <br>If several query parameters are defined, the policies matching all conditions are returned.", - "operationId": "getPolicyInstancesUsingGET", - "responses": { - "200": { - "schema": {"$ref": "#/definitions/policy_info_list_v2"}, - "description": "Policies" - }, - "401": {"description": "Unauthorized"}, - "403": {"description": "Forbidden"}, - "404": { - "schema": {"$ref": "#/definitions/error_information"}, - "description": "Near-RT RIC, policy type or service not found" - } - }, - "parameters": [ - { - "in": "query", - "allowEmptyValue": false, - "name": "policytype_id", - "description": "The identity of the policy type to get policies for.", - "type": "string", - "required": false - }, - { - "in": "query", - "allowEmptyValue": false, - "name": "ric_id", - "description": "The identity of the Near-RT RIC to get policies for.", - "type": "string", - "required": false - }, - { - "in": "query", - "allowEmptyValue": false, - "name": "service_id", - "description": "The identity of the service to get policies for.", - "type": "string", - "required": false - } - ], - "tags": ["A1 Policy Management Version 2.0 (in progress)"] - }}, - "/v2/services": { + "/a1-policy/v2/services": { "get": { "summary": "Returns service information", "deprecated": false, "produces": ["application/json"], "description": "Either information about a registered service with given identity or all registered services are returned.", - "operationId": "getServicesUsingGET", + "operationId": "getServicesUsingGET_1", "responses": { "200": { "schema": {"$ref": "#/definitions/service_list_v2"}, @@ -748,7 +761,7 @@ "deprecated": false, "produces": ["*/*"], "description": "Registering a service is needed to:<ul><li>Get callbacks.<\/li><li>Activate supervision of the service. If a service is inactive, its policies will be deleted.<\/li><\/ul>", - "operationId": "putServiceUsingPUT", + "operationId": "putServiceUsingPUT_1", "responses": { "200": { "schema": {"type": "object"}, @@ -808,7 +821,7 @@ "summary": "Heartbeat from a service", "deprecated": false, "produces": ["*/*"], - "operationId": "keepAliveServiceUsingPUT_1", + "operationId": "keepAliveServiceUsingPUT", "responses": { "200": { "schema": {"type": "string"}, @@ -830,112 +843,7 @@ "tags": ["A1 Policy Management Version 1.0"], "consumes": ["application/json"] }}, - "/v2/services/{service_id}/keepalive": {"put": { - "summary": "Heartbeat indicates that the service is running", - "deprecated": false, - "produces": ["*/*"], - "operationId": "keepAliveServiceUsingPUT", - "responses": { - "200": { - "schema": {"type": "object"}, - "description": "Service supervision timer refreshed, OK" - }, - "201": {"description": "Created"}, - "401": {"description": "Unauthorized"}, - "403": {"description": "Forbidden"}, - "404": { - "schema": {"$ref": "#/definitions/error_information"}, - "description": "The service is not found, needs re-registration" - } - }, - "parameters": [{ - "in": "path", - "name": "service_id", - "description": "service_id", - "type": "string", - "required": true - }], - "tags": ["A1 Policy Management Version 2.0 (in progress)"], - "consumes": ["application/json"] - }}, - "/status": {"get": { - "summary": "Returns status and statistics of this service", - "deprecated": false, - "produces": ["*/*"], - "operationId": "getStatusUsingGET", - "responses": { - "200": { - "schema": {"type": "string"}, - "description": "Service is living" - }, - "401": {"description": "Unauthorized"}, - "403": {"description": "Forbidden"}, - "404": {"description": "Not Found"} - }, - "tags": ["A1 Policy Management Version 1.0"] - }}, - "/v2/rics/ric": {"get": { - "summary": "Returns info for one Near-RT RIC", - "deprecated": false, - "produces": ["application/json"], - "description": "Either a Near-RT RIC identity or a Mananged Element identity can be specified.<br>The intention with Mananged Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU).", - "operationId": "getRicUsingGET", - "responses": { - "200": { - "schema": {"$ref": "#/definitions/ric_info_v2"}, - "description": "Near-RT RIC is found" - }, - "401": {"description": "Unauthorized"}, - "403": {"description": "Forbidden"}, - "404": { - "schema": {"$ref": "#/definitions/error_information"}, - "description": "Near-RT RIC is not found" - } - }, - "parameters": [ - { - "in": "query", - "allowEmptyValue": false, - "name": "managed_element_id", - "description": "The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.", - "type": "string", - "required": false - }, - { - "in": "query", - "allowEmptyValue": false, - "name": "ric_id", - "description": "The identity of a Near-RT RIC to get information for.", - "type": "string", - "required": false - } - ], - "tags": ["A1 Policy Management Version 2.0 (in progress)"] - }}, - "/r-app/pms-callback": {"post": { - "summary": "Callback for Near-RT RIC status", - "deprecated": false, - "produces": ["application/json"], - "description": "The URL to this call is registerred at Service registration.", - "operationId": "jobStatusCallbackUsingPOST", - "responses": { - "200": {"description": "OK"}, - "201": {"description": "Created"}, - "401": {"description": "Unauthorized"}, - "403": {"description": "Forbidden"}, - "404": {"description": "Not Found"} - }, - "parameters": [{ - "schema": {"$ref": "#/definitions/service_callback_info_v2"}, - "in": "body", - "name": "body", - "description": "body", - "required": true - }], - "tags": ["R-App Callbacks"], - "consumes": ["application/json"] - }}, - "/v2/policy-types/{policytype_id}": {"get": { + "/a1-policy/v2/policy-types/{policytype_id}": {"get": { "summary": "Returns a policy type definition", "deprecated": false, "produces": ["application/json"], @@ -961,45 +869,29 @@ }], "tags": ["A1 Policy Management Version 2.0 (in progress)"] }}, - "/service": {"put": { - "summary": "Register a service", + "/status": {"get": { + "summary": "Returns status and statistics of this service", "deprecated": false, "produces": ["*/*"], - "operationId": "putServiceUsingPUT_1", + "operationId": "getStatusUsingGET_1", "responses": { "200": { "schema": {"type": "string"}, - "description": "Service updated" - }, - "201": { - "schema": {"type": "string"}, - "description": "Service created" - }, - "400": { - "schema": {"type": "string"}, - "description": "The ServiceRegistrationInfo is not accepted" + "description": "Service is living" }, "401": {"description": "Unauthorized"}, "403": {"description": "Forbidden"}, "404": {"description": "Not Found"} }, - "parameters": [{ - "schema": {"$ref": "#/definitions/service_registration_info_v1"}, - "in": "body", - "name": "registrationInfo", - "description": "registrationInfo", - "required": true - }], - "tags": ["A1 Policy Management Version 1.0"], - "consumes": ["application/json"] + "tags": ["A1 Policy Management Version 1.0"] }}, - "/v2/policies": { + "/a1-policy/v2/policies": { "get": { "summary": "Query policy identities", "deprecated": false, "produces": ["application/json"], "description": "Returns a list of A1 policies matching given search criteria. <br>If several query parameters are defined, the policies matching all conditions are returned.", - "operationId": "getPolicyIdsUsingGET", + "operationId": "getPolicyIdsUsingGET_1", "responses": { "200": { "schema": {"$ref": "#/definitions/policy_id_list_v2"}, @@ -1044,7 +936,7 @@ "summary": "Create or update a policy", "deprecated": false, "produces": ["application/json"], - "operationId": "putPolicyUsingPUT", + "operationId": "putPolicyUsingPUT_1", "responses": { "200": {"description": "Policy updated"}, "201": {"description": "Policy created"}, @@ -1069,7 +961,115 @@ "tags": ["A1 Policy Management Version 2.0 (in progress)"], "consumes": ["application/json"] } - } + }, + "/r-app/pms-callback": {"post": { + "summary": "Callback for Near-RT RIC status", + "deprecated": false, + "produces": ["application/json"], + "description": "The URL to this call is registerred at Service registration.", + "operationId": "jobStatusCallbackUsingPOST", + "responses": { + "200": {"description": "OK"}, + "201": {"description": "Created"}, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": {"description": "Not Found"} + }, + "parameters": [{ + "schema": {"$ref": "#/definitions/service_callback_info_v2"}, + "in": "body", + "name": "body", + "description": "body", + "required": true + }], + "tags": ["R-App Callbacks"], + "consumes": ["application/json"] + }}, + "/a1-policy/v2/services/{service_id}": {"delete": { + "summary": "Unregister a service", + "deprecated": false, + "produces": ["*/*"], + "operationId": "deleteServiceUsingDELETE_1", + "responses": { + "200": {"description": "Not used"}, + "401": {"description": "Unauthorized"}, + "204": { + "schema": {"type": "object"}, + "description": "Service unregistered" + }, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Service not found" + } + }, + "parameters": [{ + "in": "path", + "name": "service_id", + "description": "service_id", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 2.0 (in progress)"] + }}, + "/service": {"put": { + "summary": "Register a service", + "deprecated": false, + "produces": ["*/*"], + "operationId": "putServiceUsingPUT", + "responses": { + "200": { + "schema": {"type": "string"}, + "description": "Service updated" + }, + "201": { + "schema": {"type": "string"}, + "description": "Service created" + }, + "400": { + "schema": {"type": "string"}, + "description": "The ServiceRegistrationInfo is not accepted" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": {"description": "Not Found"} + }, + "parameters": [{ + "schema": {"$ref": "#/definitions/service_registration_info_v1"}, + "in": "body", + "name": "registrationInfo", + "description": "registrationInfo", + "required": true + }], + "tags": ["A1 Policy Management Version 1.0"], + "consumes": ["application/json"] + }}, + "/a1-policy/v2/policies/{policy_id}/status": {"get": { + "summary": "Returns a policy status", + "deprecated": false, + "produces": ["application/json"], + "operationId": "getPolicyStatusUsingGET_1", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/policy_status_info_v2"}, + "description": "Policy status" + }, + "401": {"description": "Unauthorized"}, + "403": {"description": "Forbidden"}, + "404": { + "schema": {"$ref": "#/definitions/error_information"}, + "description": "Policy is not found" + } + }, + "parameters": [{ + "in": "path", + "name": "policy_id", + "description": "policy_id", + "type": "string", + "required": true + }], + "tags": ["A1 Policy Management Version 2.0 (in progress)"] + }} }, "definitions": { "error_information": { diff --git a/a1-policy-management/api/pms-api.yaml b/a1-policy-management/api/pms-api.yaml index 8f2a040d..11aad23d 100644 --- a/a1-policy-management/api/pms-api.yaml +++ b/a1-policy-management/api/pms-api.yaml @@ -30,7 +30,7 @@ paths: tags: - A1 Policy Management Version 1.0 summary: Query policy type names - operationId: getPolicyTypesUsingGET_1 + operationId: getPolicyTypesUsingGET parameters: - name: ric in: query @@ -58,21 +58,43 @@ paths: content: '*/*': schema: - type: string + $ref: '#/components/schemas/error_information' deprecated: false - /v2/status: + /a1-policy/v2/policy-instances: get: tags: - A1 Policy Management Version 2.0 (in progress) - summary: Returns status and statistics of this service - operationId: getStatusUsingGET_1 + summary: Query for A1 policy instances + description: Returns a list of A1 policies matching given search criteria. <br>If + several query parameters are defined, the policies matching all conditions + are returned. + operationId: getPolicyInstancesUsingGET + parameters: + - name: policytype_id + in: query + description: The identity of the policy type to get policies for. + allowEmptyValue: false + schema: + type: string + - name: ric_id + in: query + description: The identity of the Near-RT RIC to get policies for. + allowEmptyValue: false + schema: + type: string + - name: service_id + in: query + description: The identity of the service to get policies for. + allowEmptyValue: false + schema: + type: string responses: 200: - description: Service is living + description: Policies content: application/json: schema: - $ref: '#/components/schemas/status_info_v2' + $ref: '#/components/schemas/policy_info_list_v2' 401: description: Unauthorized content: {} @@ -80,29 +102,25 @@ paths: description: Forbidden content: {} 404: - description: Not Found - content: {} + description: Near-RT RIC, policy type or service not found + content: + application/json: + schema: + $ref: '#/components/schemas/error_information' deprecated: false - /v2/policy-types: + /a1-policy/v2/status: get: tags: - A1 Policy Management Version 2.0 (in progress) - summary: Query policy type identities - operationId: getPolicyTypesUsingGET - parameters: - - name: ric_id - in: query - description: The identity of the Near-RT RIC to get types for. - allowEmptyValue: false - schema: - type: string + summary: Returns status and statistics of this service + operationId: getStatusUsingGET responses: 200: - description: Policy type IDs + description: Service is living content: application/json: schema: - $ref: '#/components/schemas/policytype_id_list_v2' + $ref: '#/components/schemas/status_info_v2' 401: description: Unauthorized content: {} @@ -110,11 +128,8 @@ paths: description: Forbidden content: {} 404: - description: Near-RT RIC is not found - content: - application/json: - schema: - $ref: '#/components/schemas/error_information' + description: Not Found + content: {} deprecated: false /services: get: @@ -190,16 +205,91 @@ paths: schema: type: string deprecated: false - /v2/services/{service_id}: + /a1-policy/v2/rics/ric: + get: + tags: + - A1 Policy Management Version 2.0 (in progress) + summary: Returns info for one Near-RT RIC + description: Either a Near-RT RIC identity or a Mananged Element identity can + be specified.<br>The intention with Mananged Element identity is the ID used + in O1 for accessing the traffical element (such as the ID of CU). + operationId: getRicUsingGET + parameters: + - name: managed_element_id + in: query + description: The identity of a Managed Element. If given, the Near-RT RIC + managing the ME is returned. + allowEmptyValue: false + schema: + type: string + - name: ric_id + in: query + description: The identity of a Near-RT RIC to get information for. + allowEmptyValue: false + schema: + type: string + responses: + 200: + description: Near-RT RIC is found + content: + application/json: + schema: + $ref: '#/components/schemas/ric_info_v2' + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Near-RT RIC is not found + content: + application/json: + schema: + $ref: '#/components/schemas/error_information' + deprecated: false + /a1-policy/v2/policies/{policy_id}: + get: + tags: + - A1 Policy Management Version 2.0 (in progress) + summary: Returns a policy + operationId: getPolicyUsingGET_1 + parameters: + - name: policy_id + in: path + description: policy_id + required: true + schema: + type: string + responses: + 200: + description: Policy found + content: + application/json: + schema: + $ref: '#/components/schemas/policy_info_v2' + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Policy is not found + content: + application/json: + schema: + $ref: '#/components/schemas/error_information' + deprecated: false delete: tags: - A1 Policy Management Version 2.0 (in progress) - summary: Unregister a service - operationId: deleteServiceUsingDELETE_1 + summary: Delete a policy + operationId: deletePolicyUsingDELETE_1 parameters: - - name: service_id + - name: policy_id in: path - description: service_id + description: policy_id required: true schema: type: string @@ -208,10 +298,73 @@ paths: description: Not used content: {} 204: - description: Service unregistered + description: Policy deleted + content: {} + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Policy is not found + content: + '*/*': + schema: + $ref: '#/components/schemas/error_information' + 423: + description: Near-RT RIC is not operational content: '*/*': schema: + $ref: '#/components/schemas/error_information' + deprecated: false + /a1-policy/v2/policy-types: + get: + tags: + - A1 Policy Management Version 2.0 (in progress) + summary: Query policy type identities + operationId: getPolicyTypesUsingGET_1 + parameters: + - name: ric_id + in: query + description: The identity of the Near-RT RIC to get types for. + allowEmptyValue: false + schema: + type: string + responses: + 200: + description: Policy type IDs + content: + application/json: + schema: + $ref: '#/components/schemas/policytype_id_list_v2' + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Near-RT RIC is not found + content: + application/json: + schema: + $ref: '#/components/schemas/error_information' + deprecated: false + /a1-policy/v2/configuration: + get: + tags: + - Component Configuration + summary: Returns the contents of the configuration file + description: Note that the file contents is not relevant if the Consul is used. + operationId: getConfigurationUsingGET + responses: + 200: + description: Configuration + content: + application/json: + schema: type: object 401: description: Unauthorized @@ -220,7 +373,50 @@ paths: description: Forbidden content: {} 404: - description: Service not found + description: File is not found or readable + content: + application/json: + schema: + $ref: '#/components/schemas/error_information' + deprecated: false + put: + tags: + - Component Configuration + summary: Replace the current configuration file with the given configuration + description: Note that the file is ignored if the Consul is used. + operationId: putConfigurationUsingPUT + requestBody: + description: configuration + content: + application/json: + schema: + type: object + required: true + responses: + 200: + description: Configuration updated + content: {} + 201: + description: Created + content: {} + 400: + description: Invalid configuration provided + content: + '*/*': + schema: + $ref: '#/components/schemas/error_information' + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Not Found + content: {} + 500: + description: Something went wrong when replacing the configuration. Try + again. content: '*/*': schema: @@ -231,7 +427,7 @@ paths: tags: - A1 Policy Management Version 1.0 summary: Returns a policy configuration - operationId: getPolicyUsingGET_1 + operationId: getPolicyUsingGET parameters: - name: id in: query @@ -255,13 +451,16 @@ paths: content: {} 404: description: Policy is not found - content: {} + content: + '*/*': + schema: + $ref: '#/components/schemas/error_information' deprecated: false put: tags: - A1 Policy Management Version 1.0 summary: Put a policy - operationId: putPolicyUsingPUT_1 + operationId: putPolicyUsingPUT parameters: - name: id in: query @@ -337,7 +536,7 @@ paths: tags: - A1 Policy Management Version 1.0 summary: Delete a policy - operationId: deletePolicyUsingDELETE_1 + operationId: deletePolicyUsingDELETE parameters: - name: id in: query @@ -419,57 +618,28 @@ paths: schema: type: string deprecated: false - /v2/policies/{policy_id}: - get: + /a1-policy/v2/services/{service_id}/keepalive: + put: tags: - A1 Policy Management Version 2.0 (in progress) - summary: Returns a policy - operationId: getPolicyUsingGET + summary: Heartbeat indicates that the service is running + operationId: keepAliveServiceUsingPUT_1 parameters: - - name: policy_id + - name: service_id in: path - description: policy_id + description: service_id required: true schema: type: string responses: 200: - description: Policy found - content: - application/json: - schema: - $ref: '#/components/schemas/policy_info_v2' - 401: - description: Unauthorized - content: {} - 403: - description: Forbidden - content: {} - 404: - description: Policy is not found + description: Service supervision timer refreshed, OK content: - application/json: + '*/*': schema: - $ref: '#/components/schemas/error_information' - deprecated: false - delete: - tags: - - A1 Policy Management Version 2.0 (in progress) - summary: Delete a policy - operationId: deletePolicyUsingDELETE - parameters: - - name: policy_id - in: path - description: policy_id - required: true - schema: - type: string - responses: - 200: - description: Not used - content: {} - 204: - description: Policy deleted + type: object + 201: + description: Created content: {} 401: description: Unauthorized @@ -478,13 +648,7 @@ paths: description: Forbidden content: {} 404: - description: Policy is not found - content: - '*/*': - schema: - $ref: '#/components/schemas/error_information' - 423: - description: Near-RT RIC is not operational + description: The service is not found, needs re-registration content: '*/*': schema: @@ -522,14 +686,14 @@ paths: content: '*/*': schema: - type: string + $ref: '#/components/schemas/error_information' deprecated: false /rics: get: tags: - A1 Policy Management Version 1.0 summary: Query Near-RT RIC information - operationId: getRicsUsingGET + operationId: getRicsUsingGET_1 parameters: - name: policyType in: query @@ -564,7 +728,7 @@ paths: tags: - A1 Policy Management Version 1.0 summary: Returns a policy status - operationId: getPolicyStatusUsingGET_1 + operationId: getPolicyStatusUsingGET parameters: - name: id in: query @@ -593,47 +757,14 @@ paths: schema: type: string deprecated: false - /v2/policies/{policy_id}/status: - get: - tags: - - A1 Policy Management Version 2.0 (in progress) - summary: Returns a policy status - operationId: getPolicyStatusUsingGET - parameters: - - name: policy_id - in: path - description: policy_id - required: true - schema: - type: string - responses: - 200: - description: Policy status - content: - application/json: - schema: - $ref: '#/components/schemas/policy_status_info_v2' - 401: - description: Unauthorized - content: {} - 403: - description: Forbidden - content: {} - 404: - description: Policy is not found - content: - application/json: - schema: - $ref: '#/components/schemas/error_information' - deprecated: false - /v2/rics: + /a1-policy/v2/rics: get: tags: - A1 Policy Management Version 2.0 (in progress) summary: Query Near-RT RIC information description: The call returns all Near-RT RICs that supports a given policy type identity - operationId: getRicsUsingGET_1 + operationId: getRicsUsingGET parameters: - name: policytype_id in: query @@ -662,82 +793,12 @@ paths: schema: $ref: '#/components/schemas/error_information' deprecated: false - /v2/configuration: - get: - tags: - - Component Configuration - summary: Returns the contents of the configuration file - description: Note that the file contents is not relevant if the Consul is used. - operationId: getConfigurationUsingGET - responses: - 200: - description: Configuration - content: - application/json: - schema: - type: object - 401: - description: Unauthorized - content: {} - 403: - description: Forbidden - content: {} - 404: - description: File is not found or readable - content: - application/json: - schema: - $ref: '#/components/schemas/error_information' - deprecated: false - put: - tags: - - Component Configuration - summary: Replace the current configuration file with the given configuration - description: Note that the file is ignored if the Consul is used. - operationId: putConfigurationUsingPUT - requestBody: - description: configuration - content: - application/json: - schema: - type: object - required: true - responses: - 200: - description: Configuration updated - content: {} - 201: - description: Created - content: {} - 400: - description: Invalid configuration provided - content: - '*/*': - schema: - $ref: '#/components/schemas/error_information' - 401: - description: Unauthorized - content: {} - 403: - description: Forbidden - content: {} - 404: - description: Not Found - content: {} - 500: - description: Something went wrong when replacing the configuration. Try - again. - content: - '*/*': - schema: - $ref: '#/components/schemas/error_information' - deprecated: false /policy_ids: get: tags: - A1 Policy Management Version 1.0 summary: Query policies, only policy identities returned - operationId: getPolicyIdsUsingGET_1 + operationId: getPolicyIdsUsingGET parameters: - name: ric in: query @@ -813,57 +874,9 @@ paths: content: '*/*': schema: - type: string - deprecated: false - /v2/policy-instances: - get: - tags: - - A1 Policy Management Version 2.0 (in progress) - summary: Query for A1 policy instances - description: Returns a list of A1 policies matching given search criteria. <br>If - several query parameters are defined, the policies matching all conditions - are returned. - operationId: getPolicyInstancesUsingGET - parameters: - - name: policytype_id - in: query - description: The identity of the policy type to get policies for. - allowEmptyValue: false - schema: - type: string - - name: ric_id - in: query - description: The identity of the Near-RT RIC to get policies for. - allowEmptyValue: false - schema: - type: string - - name: service_id - in: query - description: The identity of the service to get policies for. - allowEmptyValue: false - schema: - type: string - responses: - 200: - description: Policies - content: - application/json: - schema: - $ref: '#/components/schemas/policy_info_list_v2' - 401: - description: Unauthorized - content: {} - 403: - description: Forbidden - content: {} - 404: - description: Near-RT RIC, policy type or service not found - content: - application/json: - schema: $ref: '#/components/schemas/error_information' deprecated: false - /v2/services: + /a1-policy/v2/services: get: tags: - A1 Policy Management Version 2.0 (in progress) @@ -947,7 +960,7 @@ paths: tags: - A1 Policy Management Version 1.0 summary: Returns the name of a RIC managing one Mananged Element - operationId: getRicUsingGET + operationId: getRicUsingGET_1 parameters: - name: managedElementId in: query @@ -1010,29 +1023,26 @@ paths: description: The service is not found, needs re-registration content: {} deprecated: false - /v2/services/{service_id}/keepalive: - put: + /a1-policy/v2/policy-types/{policytype_id}: + get: tags: - A1 Policy Management Version 2.0 (in progress) - summary: Heartbeat indicates that the service is running - operationId: keepAliveServiceUsingPUT_1 + summary: Returns a policy type definition + operationId: getPolicyTypeUsingGET parameters: - - name: service_id + - name: policytype_id in: path - description: service_id + description: policytype_id required: true schema: type: string responses: 200: - description: Service supervision timer refreshed, OK + description: Policy type content: - '*/*': + application/json: schema: - type: object - 201: - description: Created - content: {} + $ref: '#/components/schemas/policytype_v2' 401: description: Unauthorized content: {} @@ -1040,9 +1050,9 @@ paths: description: Forbidden content: {} 404: - description: The service is not found, needs re-registration + description: Policy type is not found content: - '*/*': + application/json: schema: $ref: '#/components/schemas/error_information' deprecated: false @@ -1051,7 +1061,7 @@ paths: tags: - A1 Policy Management Version 1.0 summary: Returns status and statistics of this service - operationId: getStatusUsingGET + operationId: getStatusUsingGET_1 responses: 200: description: Service is living @@ -1069,36 +1079,41 @@ paths: description: Not Found content: {} deprecated: false - /v2/rics/ric: + /a1-policy/v2/policies: get: tags: - A1 Policy Management Version 2.0 (in progress) - summary: Returns info for one Near-RT RIC - description: Either a Near-RT RIC identity or a Mananged Element identity can - be specified.<br>The intention with Mananged Element identity is the ID used - in O1 for accessing the traffical element (such as the ID of CU). - operationId: getRicUsingGET_1 + summary: Query policy identities + description: Returns a list of A1 policies matching given search criteria. <br>If + several query parameters are defined, the policies matching all conditions + are returned. + operationId: getPolicyIdsUsingGET_1 parameters: - - name: managed_element_id + - name: policytype_id in: query - description: The identity of a Managed Element. If given, the Near-RT RIC - managing the ME is returned. + description: The identity of the policy type to get policies for. allowEmptyValue: false schema: type: string - name: ric_id in: query - description: The identity of a Near-RT RIC to get information for. + description: The identity of the Near-RT RIC to get policies for. + allowEmptyValue: false + schema: + type: string + - name: service_id + in: query + description: The identity of the service to get policies for. allowEmptyValue: false schema: type: string responses: 200: - description: Near-RT RIC is found + description: Policy identities content: application/json: schema: - $ref: '#/components/schemas/ric_info_v2' + $ref: '#/components/schemas/policy_id_list_v2' 401: description: Unauthorized content: {} @@ -1106,7 +1121,45 @@ paths: description: Forbidden content: {} 404: - description: Near-RT RIC is not found + description: Near-RT RIC or type not found + content: + application/json: + schema: + $ref: '#/components/schemas/error_information' + deprecated: false + put: + tags: + - A1 Policy Management Version 2.0 (in progress) + summary: Create or update a policy + operationId: putPolicyUsingPUT_1 + requestBody: + description: policyInfo + content: + application/json: + schema: + $ref: '#/components/schemas/policy_info_v2' + required: true + responses: + 200: + description: Policy updated + content: {} + 201: + description: Policy created + content: {} + 401: + description: Unauthorized + content: {} + 403: + description: Forbidden + content: {} + 404: + description: Near-RT RIC or policy type is not found + content: + application/json: + schema: + $ref: '#/components/schemas/error_information' + 423: + description: Near-RT RIC is not operational content: application/json: schema: @@ -1143,26 +1196,29 @@ paths: description: Not Found content: {} deprecated: false - /v2/policy-types/{policytype_id}: - get: + /a1-policy/v2/services/{service_id}: + delete: tags: - A1 Policy Management Version 2.0 (in progress) - summary: Returns a policy type definition - operationId: getPolicyTypeUsingGET + summary: Unregister a service + operationId: deleteServiceUsingDELETE_1 parameters: - - name: policytype_id + - name: service_id in: path - description: policytype_id + description: service_id required: true schema: type: string responses: 200: - description: Policy type + description: Not used + content: {} + 204: + description: Service unregistered content: - application/json: + '*/*': schema: - $ref: '#/components/schemas/policytype_v2' + type: object 401: description: Unauthorized content: {} @@ -1170,9 +1226,9 @@ paths: description: Forbidden content: {} 404: - description: Policy type is not found + description: Service not found content: - application/json: + '*/*': schema: $ref: '#/components/schemas/error_information' deprecated: false @@ -1218,73 +1274,26 @@ paths: description: Not Found content: {} deprecated: false - /v2/policies: + /a1-policy/v2/policies/{policy_id}/status: get: tags: - A1 Policy Management Version 2.0 (in progress) - summary: Query policy identities - description: Returns a list of A1 policies matching given search criteria. <br>If - several query parameters are defined, the policies matching all conditions - are returned. - operationId: getPolicyIdsUsingGET + summary: Returns a policy status + operationId: getPolicyStatusUsingGET_1 parameters: - - name: policytype_id - in: query - description: The identity of the policy type to get policies for. - allowEmptyValue: false - schema: - type: string - - name: ric_id - in: query - description: The identity of the Near-RT RIC to get policies for. - allowEmptyValue: false - schema: - type: string - - name: service_id - in: query - description: The identity of the service to get policies for. - allowEmptyValue: false + - name: policy_id + in: path + description: policy_id + required: true schema: type: string responses: 200: - description: Policy identities - content: - application/json: - schema: - $ref: '#/components/schemas/policy_id_list_v2' - 401: - description: Unauthorized - content: {} - 403: - description: Forbidden - content: {} - 404: - description: Near-RT RIC or type not found + description: Policy status content: application/json: schema: - $ref: '#/components/schemas/error_information' - deprecated: false - put: - tags: - - A1 Policy Management Version 2.0 (in progress) - summary: Create or update a policy - operationId: putPolicyUsingPUT - requestBody: - description: policyInfo - content: - application/json: - schema: - $ref: '#/components/schemas/policy_info_v2' - required: true - responses: - 200: - description: Policy updated - content: {} - 201: - description: Policy created - content: {} + $ref: '#/components/schemas/policy_status_info_v2' 401: description: Unauthorized content: {} @@ -1292,13 +1301,7 @@ paths: description: Forbidden content: {} 404: - description: Near-RT RIC or policy type is not found - content: - application/json: - schema: - $ref: '#/components/schemas/error_information' - 423: - description: Near-RT RIC is not operational + description: Policy is not found content: application/json: schema: diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java index 81021b15..d791ff26 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java @@ -28,7 +28,7 @@ public class Consts { public static final String TRANSIENT_PARAM = "transient"; public static final String MANAGED_ELEMENT_ID_PARAM = "managed_element_id"; - public static final String V2_API_ROOT = "/v2"; + public static final String V2_API_ROOT = "a1-policy/v2"; public static final String V2_API_NAME = "A1 Policy Management Version 2.0 (in progress)"; public static final String V2_CONFIG_API_NAME = "Component Configuration"; diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java index 376ce76e..482c94fb 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java @@ -105,7 +105,7 @@ class ConfigurationControllerTest { @Test void putValidConfigurationWithNewRic_shouldUpdateRepository() throws Exception { - String url = "/v2/configuration"; + String url = "a1-policy/v2/configuration"; String resp = restClient().put(url, configAsString()).block(); @@ -119,7 +119,7 @@ class ConfigurationControllerTest { @Test void getNoFileExists() { - String url = "/v2/configuration"; + String url = "a1-policy/v2/configuration"; testErrorCode(restClient().get(url), HttpStatus.NOT_FOUND, "File does not exist"); } @@ -131,7 +131,7 @@ class ConfigurationControllerTest { @Test void putInvalidConfiguration_shouldReturnError400() throws Exception { - String url = "/v2/configuration"; + String url = "a1-policy/v2/configuration"; // Valid JSON but invalid configuration. testErrorCode(restClient().put(url, "{\"error\":\"error\"}"), HttpStatus.BAD_REQUEST, "Faulty configuration"); |