Skip to content
Snippets Groups Projects
Commit 5669454d authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Merge branch 'OCF-Doc18-create-test-suite-for-apistatus-at-documentation' into 'develop'

Resolve "Create Test Suite for apiStatus at documentation"

Closes #18

See merge request !22
parents c0e087b8 78f7160d
No related branches found
No related tags found
1 merge request!22Resolve "Create Test Suite for apiStatus at documentation"
Pipeline #11324 passed
Showing
with 2873 additions and 23 deletions
## **Release 2.0.0**
### **New Features**
#### 3GPP CAPIF release 18
- New endpoints included in new release 18 with new logic.
- New logic to support ***Vendor Extensibility*** on Publish Service.
- New logic to support ***API Status*** feature on Publish and Events Services.
- Supported Features now are mandatory for all POST and PUT Requests as is described on TS 29.222.
- **Possible Breaking change**, all POST request now must include supported features attribute, default can me set to "0" to keep all features inactive.
- **Possible Breaking change** on Events API, if you need eventDetails information on notification you must activate **Enhanced Event Report** feature by setting properly the supported features flag.
### **Technical Debt Solved**
#### **Api Status feature**
- Events API:
- Event internal notifications between services improved to accomplish specification.
- On event subscription **SupportedFeatures** is readed and stored in db to accomplish specification.
- Also **SupportedFeatures** is checked before send event notification, in order to accomplish specification, sending **eventDetails** and related information according to ***enhanced_event_report*** and ***apiStatusMonitoring*** supported features activated.
#### **Issues**
- Solved issue to get ready REDIS on deployment: REDIS scheduled on start to allow receive notification since service is deployed.
- Solved problem removing service APIs published is provider register more than one APF.
- Solved Superadmin problem deleting service API published through helper service if provider is not present.
- Increased the overall stability, fixing some corner cases.
- Location headers now are filled in same way at all services that needs it.
- Security issues solved.
- Base docker images present on ETSI registry.
- Robot image uploaded to ETSI Registry.
#### Local Scripts
- All scripts were reviewed and improved.
- New scripts to manage users on local deployment added:
- create_users.sh: helps developer to create new users in local deployment.
- remove_users.sh: helps developer to remove users from db in local deployment.
#### Remote Scripts
New scripts developed to help on remote deployment, configuration and testing. All this script are stored under helm/scripts in capif repository.
***variables.sh*** contains all configuration that will be used on remote operation. This file must be filled carefully before run remote scripts.
- Deployment Scripts:
- ***install_vault.sh***: Deploy Vault component from k8s cluster, only needed if vault is not previously deployed. If it’s deployed you can setup vault token on variables.sh.
- ***install_monitoring.sh***: Deploy monitoring on k8s cluster.
- ***install_capif.sh***: Deploy OpenCAPIF on k8s cluster. It will be deployed on configured namespace with domain and hostnames configured under variables.sh.
- ***uninstall_vault.sh***: Rollback Vault component from k8s cluster.
- ***uninstall_monitoring.sh***: Rollback monitoring components from k8s cluster.
- ***uninstall_capif.sh***: Rollback OpenCAPIF from k8s cluster.
- Manage remote users:
- ***create_remote_users.sh***: This script create users setup by parameters on deployed OpenCAPIF. Those users are created by administrator.
- ***remove_remote_users.sh***: This script removes user from deployed OpenCAPIF.
- ***remove_remote_users_by_prefix.sh***:: This script removes users by prefix.
- Configuration of bastion machine, this simplify DNS fixed resolution:
- ***get_ingress.sh***: This create a configuration for dns fixed resolution for ingress configured in namespace passed by parameters.
- ***set_ingress.sh***: This scripts adds to /etc/hosts the fixed DNS resolution for ingress setup for namespace passed by parameters.
- Execute robot tests over remote deployment.
- ***run_remote_capif_tests.sh***: This scripts launch Robot Test docker image on current machine to reach deployed OpenCAPIF. Is useful to launch with “--include smoke” in order to ensure all is deployed properly.
- Just for testing, next scripts upload dummy information to deployed OpenCAPIF:
- ***populate_create_remote_dummy_users.sh***: : Create Dummy providers and invokers, publish service APIs and creates security context for invokers.
- ***populate_remove_remote_dummy_users.sh***: Remove dummy information created.
### **Documentation**
#### New test included on documentation
- New Vendor Extensibility test suite with 9 tests. [Api Events Service](./testing/testplan/vendor_extensibility/README.md)
- New [API Status feature](./testing/testplan/api_status/README.md) test suite.
- Improved [Events test suite](./testing/testplan/api_events_service/README.md) with 8 new tests.
- Test plan updated with default supported features for all request set to "0" (all inactive by default) [See common operations](./testing/testplan/common_operations/README.md).
---
## **Release 1.0.0**
### **New Features**
......@@ -179,5 +261,5 @@ This Release also includes a Robot Test Suite for all those services and a Postm
[OCF Event test plan documentation]: https://ocf.etsi.org/documentation/latest/testing/testplan/api_events_service/ "OCF Event test plan documentation"
[OCF Registration Flow]: https://ocf.etsi.org/documentation/latest/testing/testplan/common_operations/ "OCF Registration Flow"
[New Registration Demo]: https://www.youtube.com/watch?v=sn-tN6eRvv8 "New Registration Demo"
[CICD Wiki]: [https://](https://labs.etsi.org/rep/ocf/community/-/wikis/OCF-CICD) "CI/CD Wiki"
[Upgrade Release 17 to 18 Wiki]: [https://](https://labs.etsi.org/rep/ocf/community/-/wikis/?¿?¿?¿?¿?) "Upgrade Release 17 to 18 Wiki"
[CICD Wiki]: https://labs.etsi.org/rep/ocf/community/-/wikis/OCF-CICD "CI/CD Wiki"
[Upgrade Release 17 to 18 Wiki]: https://labs.etsi.org/rep/ocf/community/-/wikis/?¿?¿?¿?¿? "Upgrade Release 17 to 18 Wiki"
......@@ -14,3 +14,4 @@ List of Common API Services implemented:
## Features
* [Vendor Extensibility](./vendor_extensibility/README.md)
* [Api Status](./api_status/README.md)
......@@ -95,7 +95,7 @@
}
],
"description": "string",
"supportedFeatures": "fffff",
"supportedFeatures": "0",
"shareableInfo": {
"isShareable": true,
"capifProvDoms": [
......
This diff is collapsed.
......@@ -23,7 +23,7 @@
"events": ["SERVICE_API_AVAILABLE", "API_INVOKER_ONBOARDED"],
"notificationDestination": "http://robot.testing",
"requestTestNotification": true,
"supportedFeatures": "aaa",
"supportedFeatures": "0",
"websockNotifConfig": {
"requestWebsocketUri": true,
"websocketUri": "websocketUri"
......
{
"notificationDestination": "http://host.docker.internal:8086/netapp_callback",
"supportedFeatures": "fffffff",
"supportedFeatures": "0",
"apiInvokerInformation": "ROBOT_TESTING_INVOKER",
"websockNotifConfig": {
"requestWebsocketUri": true,
......
{
"notificationDestination": "http://host.docker.internal:8086/netapp_new_callback",
"supportedFeatures": "fffffff",
"supportedFeatures": "0",
"apiInvokerInformation": "ROBOT_TESTING_INVOKER",
"websockNotifConfig": {
"requestWebsocketUri": true,
......@@ -21,7 +21,7 @@
"capifProvDoms": ["capifProvDoms", "capifProvDoms"],
"isShareable": true
},
"supportedFeatures": "fffffff",
"supportedFeatures": "0",
"description": "description",
"apiSuppFeats": "fffffff",
"apiId": "apiId",
......@@ -209,7 +209,7 @@
"capifProvDoms": ["capifProvDoms", "capifProvDoms"],
"isShareable": true
},
"supportedFeatures": "fffffff",
"supportedFeatures": "0",
"description": "description",
"apiSuppFeats": "fffffff",
"apiId": "apiId",
......
......@@ -606,7 +606,7 @@ At this documentation you will have all information and related files and exampl
## Test Case 13: Delete APIs Published by NON Authorised apfId
**Test ID**: ***capif_api_publish_service-12***
**Test ID**: ***capif_api_publish_service-13***
**Description**:
......@@ -646,6 +646,81 @@ At this documentation you will have all information and related files and exampl
* detail with message "User not authorized".
* cause with message "Certificate not authorized".
## Test Case 14: Check Two Published APIs with different APFs are removed when Provider is deleted
**Test ID**: ***capif_api_publish_service-13***
**Description**:
This test case will check that a Provider registered with two APFs, with one API published with each APF are removed properly when provider is removed.
**Pre-Conditions**:
* CAPIF subscriber is pre-authorised (has valid apfId from CAPIF Authority).
**Execution Steps**:
1. Register Provider with 2 APFs at CCF and store certificates.
2. Publish **service_1** API with **APF_1**
3. Publish **service_2** API with **APF_2**
4. Retrieve APIs published by **APF_1**
5. Retrieve APIs published by **APF_2**
6. Remove Provider by **AMF**
**Information of Test**:
1. Perform [Provider Registration] and [Invoker Onboarding]
2. Publish **service_1** Service API at CCF:
* Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId1}/service-apis**
* body [service api description] with apiName **service_1**
* Get apiId
* Use **APF_1 Certificate**
3. Publish **service_2** Service API at CCF:
* Send **POST** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId2}/service-apis**
* body [service api description] with apiName **service_2**
* Get apiId
* Use **APF_2 Certificate**
4. Retrieve all published APIs by **APF_1**:
* Send **GET** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId1}/service-apis**
* Use **APF_1 Certificate**
5. Retrieve all published APIs by **APF_2**:
* Send **GET** to ccf_publish_url **https://{CAPIF_HOSTNAME}/published-apis/v1/{apfId2}/service-apis**
* Use **APF_2 Certificate**
6. Get Number of services published by superadmin:
1. Store value obtained in **services_present_on_ccf_after_publish**
7. Delete registered provider:
* Send **DELETE** **https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations/{registrationId}**
* Use AMF Certificate.
8. Get Number of services published by superadmin:
1. Store value obtained in **services_present_on_ccf_after_delete_provider**
**Expected Result**:
1. Response to Publish request must accomplish:
1. **201 Created**
2. Response Body must follow **ServiceAPIDescription** data structure with:
* apiId
1. Response Header **Location** must be received with URI to new resource created, following this structure: **{apiRoot}/published-apis/v1/{apfId1}/service-apis/{serviceApiId}**
2. Response to Publish request must accomplish:
1. **201 Created**
2. Response Body must follow **ServiceAPIDescription** data structure with:
* apiId
3. Response Header **Location** must be received with URI to new resource created, following this structure: **{apiRoot}/published-apis/v1/{apfId2}/service-apis/{serviceApiId}**
3. Response to Retrieve all published APIs by **APF_1**:
1. **200 OK**
2. Response body must return an array of **ServiceAPIDescription** data.
3. Array must contain all previously published APIs by **APF_1**.
4. Response to Retrieve all published APIs by **APF_2**:
1. **200 OK**
2. Response body must return an array of **ServiceAPIDescription** data.
3. Array must contain all previously published APIs by **APF_2**.
5. Delete Provider:
1. **204 No Content** response.
6. Check two APIs where removed after remove provider:
1. **services_present_on_ccf_after_publish** - **services_present_on_ccf_after_delete_provider** = 2
[service api description]: ./service_api_description_post_example.json "Service API Description Request"
[publisher register body]: ./publisher_register_body.json "Publish register Body"
......
{
"apiStatus": {
"aefIds": [
"string"
]
},
"aefProfiles": [
{
"aefId": "string",
"versions": [
{
"apiVersion": "string",
"expiry": "2024-12-18T13:36:19.754Z",
"resources": [
{
"resourceName": "string",
"commType": "REQUEST_RESPONSE",
"uri": "string",
"custOpName": "string",
"custOperations": [
{
"commType": "REQUEST_RESPONSE",
"custOpName": "string",
"operations": [
"GET",
"string"
],
"description": "string"
}
],
"operations": [
"GET",
"string"
],
"description": "string"
}
],
"custOperations": [
{
"commType": "REQUEST_RESPONSE",
"custOpName": "string",
"operations": [
"GET",
"string"
],
"description": "string"
}
]
}
],
"protocol": "HTTP_1_1",
"dataFormat": "JSON",
"securityMethods": [
"PSK",
"string"
],
"domainName": "string",
"interfaceDescriptions": [
{
"ipv4Addr": "string",
"ipv6Addr": "string",
"fqdn": "string",
"port": 65535,
"apiPrefix": "string",
"securityMethods": [
"PSK",
"string"
]
},
{
"ipv4Addr": "string",
"ipv6Addr": "string",
"fqdn": "string",
"port": 65535,
"apiPrefix": "string",
"securityMethods": [
"PSK",
"string"
]
},
{
"ipv4Addr": "string",
"ipv6Addr": "string",
"fqdn": "string",
"port": 65535,
"apiPrefix": "string",
"securityMethods": [
"PSK",
"string"
]
}
],
"aefLocation": {
"civicAddr": {
"country": "string",
"A1": "string",
"A2": "string",
"A3": "string",
"A4": "string",
"A5": "string",
"A6": "string",
"PRD": "string",
"POD": "string",
"STS": "string",
"HNO": "string",
"HNS": "string",
"LMK": "string",
"LOC": "string",
"NAM": "string",
"PC": "string",
"BLD": "string",
"UNIT": "string",
"FLR": "string",
"ROOM": "string",
"PLC": "string",
"PCN": "string",
"POBOX": "string",
"ADDCODE": "string",
"SEAT": "string",
"RD": "string",
"RDSEC": "string",
"RDBR": "string",
"RDSUBBR": "string",
"PRM": "string",
"POM": "string",
"usageRules": "string",
"method": "string",
"providedBy": "string"
},
"geoArea": {
"shape": "POINT",
"point": {
"lon": 180,
"lat": 90
}
},
"dcId": "string"
},
"serviceKpis": {
"maxReqRate": 0,
"maxRestime": 0,
"availability": 0,
"avalComp": "string",
"avalGraComp": "string",
"avalMem": "string",
"avalStor": "string",
"conBand": 0
},
"ueIpRange": {
"ueIpv4AddrRanges": [
{
"start": "198.51.100.1",
"end": "198.51.100.1"
}
],
"ueIpv6AddrRanges": [
{
"start": "2001:db8:85a3::8a2e:370:7334",
"end": "2001:db8:85a3::8a2e:370:7334"
}
]
}
},
{
"aefId": "string",
"versions": [
{
"apiVersion": "string",
"expiry": "2024-12-18T13:36:19.754Z",
"resources": [
{
"resourceName": "string",
"commType": "REQUEST_RESPONSE",
"uri": "string",
"custOpName": "string",
"custOperations": [
{
"commType": "REQUEST_RESPONSE",
"custOpName": "string",
"operations": [
"GET",
"string"
],
"description": "string"
}
],
"operations": [
"GET",
"string"
],
"description": "string"
}
],
"custOperations": [
{
"commType": "REQUEST_RESPONSE",
"custOpName": "string",
"operations": [
"GET",
"string"
],
"description": "string"
}
]
}
],
"protocol": "HTTP_1_1",
"dataFormat": "JSON",
"securityMethods": [
"PSK",
"string"
],
"domainName": "string",
"interfaceDescriptions": [
{
"ipv4Addr": "string",
"ipv6Addr": "string",
"fqdn": "string",
"port": 65535,
"apiPrefix": "string",
"securityMethods": [
"PSK",
"string"
]
},
{
"ipv4Addr": "string",
"ipv6Addr": "string",
"fqdn": "string",
"port": 65535,
"apiPrefix": "string",
"securityMethods": [
"PSK",
"string"
]
},
{
"ipv4Addr": "string",
"ipv6Addr": "string",
"fqdn": "string",
"port": 65535,
"apiPrefix": "string",
"securityMethods": [
"PSK",
"string"
]
}
],
"aefLocation": {
"civicAddr": {
"country": "string",
"A1": "string",
"A2": "string",
"A3": "string",
"A4": "string",
"A5": "string",
"A6": "string",
"PRD": "string",
"POD": "string",
"STS": "string",
"HNO": "string",
"HNS": "string",
"LMK": "string",
"LOC": "string",
"NAM": "string",
"PC": "string",
"BLD": "string",
"UNIT": "string",
"FLR": "string",
"ROOM": "string",
"PLC": "string",
"PCN": "string",
"POBOX": "string",
"ADDCODE": "string",
"SEAT": "string",
"RD": "string",
"RDSEC": "string",
"RDBR": "string",
"RDSUBBR": "string",
"PRM": "string",
"POM": "string",
"usageRules": "string",
"method": "string",
"providedBy": "string"
},
"geoArea": {
"shape": "POINT",
"point": {
"lon": 180,
"lat": 90
}
},
"dcId": "string"
},
"serviceKpis": {
"maxReqRate": 0,
"maxRestime": 0,
"availability": 0,
"avalComp": "string",
"avalGraComp": "string",
"avalMem": "string",
"avalStor": "string",
"conBand": 0
},
"ueIpRange": {
"ueIpv4AddrRanges": [
{
"start": "198.51.100.1",
"end": "198.51.100.1"
}
],
"ueIpv6AddrRanges": [
{
"start": "2001:db8:85a3::8a2e:370:7334",
"end": "2001:db8:85a3::8a2e:370:7334"
}
]
}
}
],
"description": "string",
"shareableInfo": {
"isShareable": true,
"capifProvDoms": [
"string"
]
},
"serviceAPICategory": "string",
"apiSuppFeats": "string",
"pubApiPath": {
"ccfIds": [
"string"
]
},
"ccfId": "string"
}
\ No newline at end of file
......@@ -95,7 +95,7 @@
}
],
"description": "string",
"supportedFeatures": "fffff",
"supportedFeatures": "0",
"shareableInfo": {
"isShareable": true,
"capifProvDoms": [
......
{
"notificationDestination": "http://robot.testing",
"supportedFeatures": "fffffff",
"supportedFeatures": "0",
"securityInfo": [{
"authenticationInfo": "authenticationInfo",
"authorizationInfo": "authorizationInfo",
......
This diff is collapsed.
# Common Operations
## Default Supported Features
By default all required supported features on POST Request will be present and set to "0" unless test define it with other value. Also it can be set to NONE is we want to test supported features not present.
## Register new user
In order to use OpenCAPIF we must add a new user. This new user can onboard/register any Invokers or Providers.
......
# Test Plan for Vendor Extensibility Feature
At this documentation you will have all information and related files and examples of test plan for this feature.
---
## Test Case 1: Published API with vendor extensibility
**Test ID**: ***vendor_extensibility-1***
......@@ -61,6 +62,7 @@ At this documentation you will have all information and related files and exampl
* Check if DiscoveredAPIs contains the API Published previously
* Check if contains the **vendorSpecific** keys
---
## Test Case 2: Published API with vendor extensibility and discover with VendSpecQueryParams disabled
**Test ID**: ***vendor_extensibility-2***
......@@ -121,6 +123,7 @@ At this documentation you will have all information and related files and exampl
* detail with message "API Invoker {api_invoker_id} has no API Published that accomplish filter conditions".
* cause with message "No API Published accomplish filter conditions".
---
## Test Case 3: Publish API with vendorExt active and discover without supported features filter
**Test ID**: ***vendor_extensibility-3***
......@@ -179,6 +182,7 @@ At this documentation you will have all information and related files and exampl
* Check if DiscoveredAPIs contains the API Published previously
* Check **NOT** contains the **vendorSpecific** keys
---
## Test Case 4: Publish API with vendorExt active but without vendorSpecifics
**Test ID**: ***vendor_extensibility-4***
......@@ -222,6 +226,7 @@ At this documentation you will have all information and related files and exampl
* detail with message "If and only if VendorExt feature is enabled, then vendor-specific fields should be defined".
* cause with message "Vendor extensibility misconfiguration".
---
## Test Case 5: Publish API with vendorExt inactive but with vendorSpecifics
**Test ID**: ***vendor_extensibility-5***
......@@ -265,7 +270,7 @@ At this documentation you will have all information and related files and exampl
* detail with message "If and only if VendorExt feature is enabled, then vendor-specific fields should be defined".
* cause with message "Vendor extensibility misconfiguration".
---
## Test Case 6: Published API without vendor extensibility discover with VendSpecQueryParams enabled
**Test ID**: ***vendor_extensibility-6***
......@@ -328,6 +333,7 @@ At this documentation you will have all information and related files and exampl
* detail with message "API Invoker {api_invoker_id} has no API Published that accomplish filter conditions".
* cause with message "No API Published accomplish filter conditions".
---
## Test Case 7: Published API without vendor extensibility and discover with vendSpecQueryParams disabled
**Test ID**: ***vendor_extensibility-7***
......@@ -388,7 +394,7 @@ At this documentation you will have all information and related files and exampl
* Check if DiscoveredAPIs contains the API Published previously
* Check if **NOT** contains any **vendorSpecific** keys
---
## Test Case 8: Published API without vendor extensibility and discover without supported-features query parameter
**Test ID**: ***vendor_extensibility-8***
......@@ -449,6 +455,7 @@ At this documentation you will have all information and related files and exampl
* Check if DiscoveredAPIs contains the API Published previously
* Check if **NOT** contains any **vendorSpecific** keys
---
## Test Case 9: Publish API without supportedFeatures
**Test ID**: ***vendor_extensibility-9***
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment