You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

JSON schema is used to describe the attributes and values in the xApp descriptor JSON file. The xApp onboarding process verifies the types and values of the xApp parameters in the descriptor. If mismatches are found, xApp onboarding will return failure.

It is the xApp developers' responsibility to provide the correct schema JSON file that defines all the fields in the xApp descriptor.

The integration team recommends to build your xApp descriptor schema by extending the minimal schema file.  

Structure

The schema file includes the following required sections.

  • xapp_name: xapp_name is a string variable. properties are as follows.

        		"xapp_name": {
        			"$id": "#/properties/xapp_name",
        			"type": "string",
        			"title": "The xApp Name",
        			"default": "xapp",
        			"examples": [
        				"example_xapp"	
        			]
        		},
  • version: version is a string variable that follows the semantic versioning syntax.

        		"version": {
        			"$id": "#/properties/version",
        			"type": "string",
        			"title": "The xApp version",
        			"default": "1.0.0",
        			"examples": [
        				"1.0.0"	
        			],
        			"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
        		},
  • containers: containers is a list of container objects that includes name of the container, container image name, registry, tag, entry command  and container http and rmr service ports. It has a structure of

    "containers": [
        {
            "name": "example_container_1",
            "image": {
                "registry": "example_image_registry_1",
                "name": "example_image_name_1",
                "tag": "example_image_tag_1"
            },
            "command": "example_command_1",
    		"ports":{
    			"http": 8080,
    			"rmr_data": 4560,
    			"rmr_route": 4561
    		}
        },
        {
            "name": "example_container_2",
            "image": {
                "registry": "example_image_registry_2",
                "name": "example_image_name_2",
                "tag": "example_image_tag_2"
            },
            "command": "example_command_2",
    		"ports":{
    			"http": 8080,
    			"rmr_data": 4560,
    			"rmr_route": 4561
    		}
        }
    ]

    The following schema defines the above structure

        		"containers":{
            		"$id": "#/properties/containers",
            		"type": "array",
            		"title": "The Container Schema",
            		"items": {
                		"$id": "#/properties/containers/items",
                		"type": "object",
                		"title": "The Container Items Schema",
                		"required": [
                			"name",
                			"image",
                			"ports",
                			"command"
                		],
    					"properties":{
    						"name": {
        						"$id": "#/properties/containers/items/properties/name",
        						"type": "string",
        						"title": "The xApp Container Name",
        						"default": "xapp",
        						"examples": [
        							"xapp"	
        						]
        					},
        					"image": {
        						"$id": "#/properties/containers/items/properties/image",
                				"type": "object",
                				"title": "The Container Image",
                				"required": [
                					"registry",
                					"name",
                					"tag"
                				],
    							"properties":{
    								"registry": {
        								"$id": "#/properties/containers/items/properties/image/properties/registry",
        								"type": "string",
        								"title": "The xApp Image Registry",
        								"default": "nexus3.o-ran-sc.org:10002",
        								"examples": [
        									"nexus3.o-ran-sc.org:10002"	
        								],
        								"pattern": "^[A-Za-z0-9\\.-]{1,}\\.[A-Za-z]{1,}(?:\\:\\d+)?$"
        							},
        							"name": {
        								"$id": "#/properties/containers/items/properties/image/properties/name",
        								"type": "string",
        								"title": "The xApp Image Name",
        								"default": "xapp",
        								"examples": [
        									"xapp"	
        								]
        							},
        							"tag": {
        								"$id": "#/properties/containers/items/properties/image/properties/tag",
        								"type": "string",
        								"title": "The xApp Image Tag",
        								"default": "latest",
        								"examples": [
        									"latest"	
        								]
        							}
    							}
        					},
        					"ports": {
        						"$id": "#/properties/containers/items/properties/ports",
                				"type": "object",
                				"title": "The Container Ports",
                				"required": [
                					"http",
                					"rmr_data",
                					"rmr_route"
                				],
    							"properties":{
    								"http": {
        								"$id": "#/properties/containers/items/properties/ports/properties/http",
        								"type": "integer",
        								"title": "Http Port for xApp",
        								"default": 8080,
        								"examples": [
        									8080	
        								]
        							},
        							"rmr_data": {
        								"$id": "#/properties/containers/items/properties/ports/properties/rmr_data",
        								"type": "integer",
        								"title": "RMR Data Port for xApp",
        								"default": 4560,
        								"examples": [
        									4560	
        								]
        							},
        							"rmr_route": {
        								"$id": "#/properties/containers/items/properties/ports/properties/rmr_route",
        								"type": "integer",
        								"title": "RMR Route Port for xApp",
        								"default": 4561,
        								"examples": [
        									4561	
        								]
        							}
    							}
        					},
        					"command": {
        						"$id": "#/properties/containers/items/properties/command",
        						"type": "string",
        						"title": "Command To Run The xApp Container",
        						"default": "command",
        						"examples": [
        							"command"	
        						]
        					}
    					}
            		}
            	}
  • No labels