From b41cadbdbe5aa22f70b8d775f2c98258b66bfb4a Mon Sep 17 00:00:00 2001 From: Dario Faccin Date: Mon, 2 Dec 2024 15:34:39 +0100 Subject: [PATCH 1/2] chore: improve fiveg_core_gnb interface schema Signed-off-by: Dario Faccin --- docs/json_schemas/fiveg_core_gnb/v0/provider.json | 4 ++-- docs/json_schemas/fiveg_core_gnb/v0/requirer.json | 6 +++--- interfaces/fiveg_core_gnb/v0/README.md | 2 +- interfaces/fiveg_core_gnb/v0/schema.py | 7 ++++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/json_schemas/fiveg_core_gnb/v0/provider.json b/docs/json_schemas/fiveg_core_gnb/v0/provider.json index 8269d932..be365d2f 100644 --- a/docs/json_schemas/fiveg_core_gnb/v0/provider.json +++ b/docs/json_schemas/fiveg_core_gnb/v0/provider.json @@ -41,7 +41,7 @@ "208", "302" ], - "pattern": "[0-9][0-9][0-9]", + "pattern": "^[0-9][0-9][0-9]$", "title": "Mcc", "type": "string" }, @@ -52,7 +52,7 @@ "001", "999" ], - "pattern": "[0-9][0-9][0-9]?", + "pattern": "^[0-9][0-9][0-9]?$", "title": "Mnc", "type": "string" }, diff --git a/docs/json_schemas/fiveg_core_gnb/v0/requirer.json b/docs/json_schemas/fiveg_core_gnb/v0/requirer.json index 73557dbc..907acd4c 100644 --- a/docs/json_schemas/fiveg_core_gnb/v0/requirer.json +++ b/docs/json_schemas/fiveg_core_gnb/v0/requirer.json @@ -7,17 +7,17 @@ }, "FivegCoreGnbRequirerAppData": { "properties": { - "cu_name": { + "cu-name": { "description": "Unique identifier of the CU/gnB.", "examples": [ "gnb001" ], - "title": "Cu Name", + "title": "Cu-Name", "type": "string" } }, "required": [ - "cu_name" + "cu-name" ], "title": "FivegCoreGnbRequirerAppData", "type": "object" diff --git a/interfaces/fiveg_core_gnb/v0/README.md b/interfaces/fiveg_core_gnb/v0/README.md index bd50381c..8f047af5 100644 --- a/interfaces/fiveg_core_gnb/v0/README.md +++ b/interfaces/fiveg_core_gnb/v0/README.md @@ -61,7 +61,7 @@ provider: unit: {} requirer: app: { - "cu_name": "gnb001" + "cu-name": "gnb001" } unit: {} ``` diff --git a/interfaces/fiveg_core_gnb/v0/schema.py b/interfaces/fiveg_core_gnb/v0/schema.py index 9da5846c..94161d1f 100644 --- a/interfaces/fiveg_core_gnb/v0/schema.py +++ b/interfaces/fiveg_core_gnb/v0/schema.py @@ -21,7 +21,7 @@ RequirerSchema: unit: app: { - "cu_name": "gnb001", + "cu-name": "gnb001", } """ @@ -38,12 +38,12 @@ class PLMNConfig: mcc: str = Field( description="Mobile Country Code", examples=["001", "208", "302"], - pattern=r"[0-9][0-9][0-9]", + pattern=r"^[0-9][0-9][0-9]$", ) mnc: str = Field( description="Mobile Network Code", examples=["01", "001", "999"], - pattern=r"[0-9][0-9][0-9]?", + pattern=r"^[0-9][0-9][0-9]?$", ) sst: int = Field( description="Slice/Service Type", @@ -72,6 +72,7 @@ class FivegCoreGnbProviderAppData(BaseModel): class FivegCoreGnbRequirerAppData(BaseModel): cu_name: str = Field( + alias="cu-name", description="Unique identifier of the CU/gnB.", examples=["gnb001"] ) From 692674d32b3492a3ebc2cd56b5fae08d32972b30 Mon Sep 17 00:00:00 2001 From: Dario Faccin Date: Mon, 2 Dec 2024 15:42:22 +0100 Subject: [PATCH 2/2] chore: address review comments Signed-off-by: Dario Faccin --- docs/json_schemas/fiveg_core_gnb/v0/requirer.json | 6 +++--- interfaces/fiveg_core_gnb/v0/README.md | 2 +- interfaces/fiveg_core_gnb/v0/schema.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/json_schemas/fiveg_core_gnb/v0/requirer.json b/docs/json_schemas/fiveg_core_gnb/v0/requirer.json index 907acd4c..35c8039c 100644 --- a/docs/json_schemas/fiveg_core_gnb/v0/requirer.json +++ b/docs/json_schemas/fiveg_core_gnb/v0/requirer.json @@ -7,17 +7,17 @@ }, "FivegCoreGnbRequirerAppData": { "properties": { - "cu-name": { + "gnb-name": { "description": "Unique identifier of the CU/gnB.", "examples": [ "gnb001" ], - "title": "Cu-Name", + "title": "Gnb-Name", "type": "string" } }, "required": [ - "cu-name" + "gnb-name" ], "title": "FivegCoreGnbRequirerAppData", "type": "object" diff --git a/interfaces/fiveg_core_gnb/v0/README.md b/interfaces/fiveg_core_gnb/v0/README.md index 8f047af5..08fcd823 100644 --- a/interfaces/fiveg_core_gnb/v0/README.md +++ b/interfaces/fiveg_core_gnb/v0/README.md @@ -61,7 +61,7 @@ provider: unit: {} requirer: app: { - "cu-name": "gnb001" + "gnb-name": "gnb001" } unit: {} ``` diff --git a/interfaces/fiveg_core_gnb/v0/schema.py b/interfaces/fiveg_core_gnb/v0/schema.py index 94161d1f..44ff2805 100644 --- a/interfaces/fiveg_core_gnb/v0/schema.py +++ b/interfaces/fiveg_core_gnb/v0/schema.py @@ -21,7 +21,7 @@ RequirerSchema: unit: app: { - "cu-name": "gnb001", + "gnb-name": "gnb001", } """ @@ -71,8 +71,8 @@ class FivegCoreGnbProviderAppData(BaseModel): class FivegCoreGnbRequirerAppData(BaseModel): - cu_name: str = Field( - alias="cu-name", + gnb_name: str = Field( + alias="gnb-name", description="Unique identifier of the CU/gnB.", examples=["gnb001"] )