Commit 66a7685f authored by Sergio Gimenez's avatar Sergio Gimenez
Browse files

feat(edgecloud): add lite2edge adapter support

parent b7dc64c1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -23,6 +23,10 @@ _EDGE_CLOUD_CATALOG: Dict[str, AdapterSpec] = {
        "sunrise6g_opensdk.edgecloud.adapters.kubernetes.client",
        "EdgeApplicationManager",
    ),
    "lite2edge": (
        "sunrise6g_opensdk.edgecloud.adapters.lite2edge.client",
        "EdgeApplicationManager",
    ),
}

_NETWORK_CATALOG: Dict[str, AdapterSpec] = {
+0 −0

Empty file added.

+497 −0

File added.

Preview size limit exceeded, changes collapsed.

+16 −9
Original line number Diff line number Diff line
@@ -17,17 +17,24 @@ test_cases = [
    #     }
    # },
    # {
    # {
    #     "edgecloud": {
    #         "client_name": "kubernetes",
    #         "base_url": "http://X.Y.Z.T:PORT/",
    #         # Additional parameters for K8s client:
    #         "PLATFORM_PROVIDER": "<>",
    #         "KUBERNETES_MASTER_TOKEN": "<>",
    #         # "KUBERNETES_MASTER_PORT": "80",
    #         "KUBERNETES_USERNAME": "<>",
    #         "EMP_STORAGE_URI": "mongodb://A.B.C.D:PORT",
    #         "K8S_NAMESPACE": "sunrise6g",
    #     }
    # },
    {
        "edgecloud": {
            "client_name": "kubernetes",
            "base_url": "http://X.Y.Z.T:PORT/",
            # Additional parameters for K8s client:
            "PLATFORM_PROVIDER": "<>",
            "KUBERNETES_MASTER_TOKEN": "<>",
            # "KUBERNETES_MASTER_PORT": "80",
            "KUBERNETES_USERNAME": "<>",
            "EMP_STORAGE_URI": "mongodb://A.B.C.D:PORT",
            "K8S_NAMESPACE": "sunrise6g",
            "client_name": "lite2edge",
            "base_url": "http://localhost:8752/",
            "K8S_NAMESPACE": "sunrise6g-testing",
        }
    },
]
+64 −0
Original line number Diff line number Diff line
@@ -192,4 +192,68 @@ CONFIG = {
            ],
        },
    },
    "lite2edge": {
        # Basic identifiers
        "ZONE_ID": "0f8c8424-a5bf-4c2e-a6da-0ff2b5a47ed1",
        "APP_ID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        # CAMARA onboard_app payload
        "APP_ONBOARD_MANIFEST": {
            "appId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "name": "nginxtest",
            "version": "1",
            "packageType": "QCOW2",
            "appProvider": "jJsxUU403g5PUhoRtYfOBaaIRZGVzXDZgMBqzMYq5xLcdZoWGYIYqmVy0",
            "appRepo": {"imagePath": "nginx", "type": "PRIVATEREPO"},
            "requiredResources": {
                "infraKind": "kubernetes",
                "applicationResources": {
                    "cpuPool": {
                        "numCPU": 2,
                        "memory": 2048,
                        "topology": {
                            "minNumberOfNodes": 2,
                            "minNodeCpu": 1,
                            "minNodeMemory": 1024,
                        },
                    }
                },
                "isStandalone": False,
                "version": "1.29",
            },
            "componentSpec": [
                {
                    "componentName": "nginx",
                    "networkInterfaces": [
                        {
                            "protocol": "TCP",
                            "port": 80,
                            "interfaceId": "http_interface",
                            "visibilityType": "VISIBILITY_EXTERNAL",
                        },
                        {
                            "protocol": "TCP",
                            "port": 443,
                            "interfaceId": "https_interface",
                            "visibilityType": "VISIBILITY_EXTERNAL",
                        },
                    ],
                }
            ],
        },
        # CAMARA deploy_app payload
        "APP_DEPLOY_PAYLOAD": {
            "appId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "appZones": [
                {
                    "EdgeCloudZone": {
                        "edgeCloudZoneId": "0f8c8424-a5bf-4c2e-a6da-0ff2b5a47ed1",
                        "edgeCloudZoneName": "zorro-solutions",
                        "edgeCloudZoneStatus": "active",
                        "edgeCloudProvider": "ICOM",
                        "edgeCloudRegion": "Europe-Southeast",
                    }
                }
            ],
        },
    },
}
Loading