Skip to content
Snippets Groups Projects
Commit 2216a4e9 authored by JorgeEcheva26's avatar JorgeEcheva26
Browse files

Supported features modification

parent 4d56660e
No related branches found
No related tags found
2 merge requests!3Logging feature developed,!2Logging feature
......@@ -163,6 +163,7 @@ Now, it is described in 4 simple steps how a Provider can be developed in just s
provider.publish_req['publisher_apf_id'] = APF
provider.publish_req['publisher_aefs_ids'] = [AEF1, AEF2]
provider.supported_features ="4"
provider.publish_services()
```
......
......@@ -10,7 +10,7 @@
"invoker_folder": "",
"capif_callback_url": "",
"supported_features":"",
"check_authentication":{
"check_authentication_data":{
"ip":"",
"port":""
},
......@@ -18,7 +18,7 @@
"csr_common_name": "",
"csr_organizational_unit": "",
"csr_organization": "",
"crs_locality": "",
"csr_locality": "",
"csr_state_or_province_name": "",
"csr_country_name": "",
"csr_email_address": ""
......@@ -41,6 +41,7 @@
},
"provider": {
"provider_folder": "",
"supported_features": "",
"apfs": "",
"aefs": "",
"publish_req": {
......@@ -55,7 +56,7 @@
"csr_common_name": "",
"csr_organizational_unit": "",
"csr_organization": "",
"crs_locality": "",
"csr_locality": "",
"csr_state_or_province_name": "",
"csr_country_name": "",
"csr_email_address": ""
......
......@@ -43,6 +43,7 @@ When configuring the SDK as a **Network App Invoker**, the following fields must
For SDK configuration as a **Network App Provider**, the following fields are required:
- `provider_folder`
- `supported_features`
- `cert_generation` (fields such as `csr_common_name`, `csr_country_name`, etc.)
- `APFs`
- `AEFs`
......@@ -80,6 +81,7 @@ This file can also be populated using [environment variables](../samples/envirom
- `invoker_folder`: The path (relative or absolute) where invoker information (certificates, keys, etc.) is stored.
- `provider_folder`: The path (relative or absolute) where provider information is stored.
- `supported_features`: A string used to indicate the features supported by an API. The string shall contain a bitmask indicating supported features in hexadecimal representation Each character in the string shall take a value of "0" to "9", "a" to "f" or "A" to "F". [More information](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29571_CommonData.yaml)
- `capif_host`: The domain name of the CAPIF host.
- `register_host`: The domain name of the register host.
- `capif_https_port`: The CAPIF host port number.
......
......@@ -6,7 +6,7 @@
"capif_username": "",
"capif_password": "",
"debug_mode": "",
"invoker":{
"invoker": {
"invoker_folder": "",
"capif_callback_url": "",
"supported_features":"",
......@@ -14,7 +14,7 @@
"ip":"",
"port":""
},
"cert_generation":{
"cert_generation": {
"csr_common_name": "",
"csr_organizational_unit": "",
"csr_organization": "",
......@@ -39,8 +39,9 @@
"service-kpis": ""
}
},
"provider":{
"provider": {
"provider_folder": "",
"supported_features": "",
"apfs": "",
"aefs": "",
"publish_req": {
......@@ -51,7 +52,7 @@
""
]
},
"cert_generation":{
"cert_generation": {
"csr_common_name": "",
"csr_organizational_unit": "",
"csr_organization": "",
......@@ -61,5 +62,5 @@
"csr_email_address": ""
},
"api_description_path": ""
}
}
}
......@@ -6,14 +6,15 @@
"capif_username": "",
"capif_password": "",
"debug_mode": "",
"invoker":{
"invoker": {
"invoker_folder": "",
"capif_callback_url": "",
"supported_features":"",
"check_authentication_data":{
"ip":"",
"port":""
},
"cert_generation":{
"cert_generation": {
"csr_common_name": "",
"csr_organizational_unit": "",
"csr_organization": "",
......@@ -38,17 +39,9 @@
"service-kpis": ""
}
},
"provider":{
"provider": {
"provider_folder": "",
"cert_generation":{
"csr_common_name": "",
"csr_organizational_unit": "",
"csr_organization": "",
"csr_locality": "",
"csr_state_or_province_name": "",
"csr_country_name": "",
"csr_email_address": ""
},
"supported_features": "",
"apfs": "2",
"aefs": "3",
"publish_req": {
......@@ -59,6 +52,15 @@
""
]
},
"cert_generation": {
"csr_common_name": "",
"csr_organizational_unit": "",
"csr_organization": "",
"csr_locality": "",
"csr_state_or_province_name": "",
"csr_country_name": "",
"csr_email_address": ""
},
"api_description_path": ""
}
}
}
......@@ -82,7 +82,7 @@ class capif_invoker_connector:
capif_invoker_password = os.getenv('CAPIF_PASSWORD', config.get('capif_password', '')).strip()
capif_callback_url = os.getenv('INVOKER_CAPIF_CALLBACK_URL', invoker_config.get('capif_callback_url', '')).strip()
supported_features = os.getenv('INVOKER_FOLDER', invoker_config.get('supported_features', '')).strip()
supported_features = os.getenv('INVOKER_SUPPORTED_FEATURES', invoker_config.get('supported_features', '')).strip()
check_authentication_data = invoker_config.get('check_authentication_data', {})
self.check_authentication = {
"ip": os.getenv('INVOKER_CHECK_AUTHENTICATION_DATA_IP', check_authentication_data.get('ip', '')).strip(),
......
......@@ -99,6 +99,10 @@ class capif_provider_connector:
csr_email_address = os.getenv('PROVIDER_CSR_EMAIL_ADDRESS', cert_generation.get('csr_email_address', '')).strip()
# Retrieve provider specific values (APFs, AEFs)
supported_features = os.getenv('PROVIDER_SUPPORTED_FEATURES', provider_config.get('supported_features', '')).strip()
if not supported_features:
supported_features = "0"
apfs = os.getenv('PROVIDER_APFS', provider_config.get('apfs', '')).strip()
aefs = os.getenv('PROVIDER_AEFS', provider_config.get('aefs', '')).strip()
api_description_path = os.path.abspath(os.getenv('PROVIDER_API_DESCRIPTION_PATH', provider_config.get('api_description_path', '')).strip())
......@@ -127,6 +131,7 @@ class capif_provider_connector:
self.csr_state_or_province_name = csr_state_or_province_name
self.csr_country_name = csr_country_name
self.csr_email_address = csr_email_address
self.supported_features = supported_features
self.aefs = int(aefs)
self.apfs = int(apfs)
......@@ -276,7 +281,7 @@ class capif_provider_connector:
for role in roles
],
"apiProvDomInfo": "This is provider",
"suppFeat": "fff",
"suppFeat": self.supported_features,
"failReason": "string",
"regSec": access_token,
}
......@@ -452,6 +457,7 @@ class capif_provider_connector:
with open(service_api_description_json_full_path, "r") as service_file:
data = json.load(service_file)
data["supportedFeatures"] = self.supported_features
# Verifying that the number of AEFs is equal to the aefProfiles
if len(AEFs_list) != len(data.get("aefProfiles", [])):
self.logger.error(
......@@ -1262,7 +1268,7 @@ class capif_provider_connector:
for role in roles
],
"apiProvDomInfo": "This is provider",
"suppFeat": "fff",
"suppFeat": self.supported_features,
"failReason": "string",
"regSec": access_token,
}
......
......@@ -39,9 +39,9 @@
"service-kpis": ""
}
},
"provider": {
"provider_folder": "",
"supported_features": "",
"apfs": "",
"aefs": "",
"publish_req": {
......@@ -52,7 +52,7 @@
""
]
},
"cert_generation":{
"cert_generation": {
"csr_common_name": "",
"csr_organizational_unit": "",
"csr_organization": "",
......@@ -62,5 +62,5 @@
"csr_email_address": ""
},
"api_description_path": ""
}
}
}
......@@ -6,15 +6,15 @@
"capif_username": "",
"capif_password": "",
"debug_mode": "",
"invoker":{
"invoker": {
"invoker_folder": "",
"capif_callback_url": "",
"supported_features":"",
"check_authorization":{
"check_authentication_data":{
"ip":"",
"port":""
},
"cert_generation":{
"cert_generation": {
"csr_common_name": "",
"csr_organizational_unit": "",
"csr_organization": "",
......@@ -39,17 +39,9 @@
"service-kpis": ""
}
},
"provider":{
"provider": {
"provider_folder": "",
"cert_generation":{
"csr_common_name": "",
"csr_organizational_unit": "",
"csr_organization": "",
"csr_locality": "",
"csr_state_or_province_name": "",
"csr_country_name": "",
"csr_email_address": ""
},
"supported_features": "",
"apfs": "",
"aefs": "",
"publish_req": {
......@@ -60,6 +52,15 @@
""
]
},
"cert_generation": {
"csr_common_name": "",
"csr_organizational_unit": "",
"csr_organization": "",
"csr_locality": "",
"csr_state_or_province_name": "",
"csr_country_name": "",
"csr_email_address": ""
},
"api_description_path": ""
}
}
}
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