Commit 1175247f authored by Laskaratos Dimitris's avatar Laskaratos Dimitris
Browse files

Mino change on network controller

parent e5ec8539
Loading
Loading
Loading
Loading
+1 −25
Original line number Diff line number Diff line
FROM python:3.9-alpine

#RUN apk add git
FROM python:3.12-alpine

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

#RUN apk add --no-cache --virtual .build-deps gcc musl-dev

#RUN apk update && apk add python3-dev \
#                        gcc \
#                        libc-dev


#THIS SOLVED THE ISSUE WITH CFFI: building wheel for cffi (setup.py) finished with status 'error'!
#RUN apk add --no-cache libffi-dev build-base
#
COPY requirements.txt /usr/src/app/
#RUN pip3 install connexion

#ENV EMP_STORAGE_DRIVER mongo
#ENV EMP_STORAGE_URI mongodb://203.0.113.8:27017
#
#ENV PIP_ROOT_USER_ACTION=ignore
#
ENV PYTHONUNBUFFERED=1
#RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
#RUN python3 -m ensurepip

#RUN pip3 install --no-cache --upgrade pip setuptools

RUN python3 -m venv .venv
RUN source .venv/bin/activate
@@ -36,7 +13,6 @@ RUN pip3 install --upgrade pip

RUN pip3 install wheel

#RUN pip3 install --no-cache --upgrade setuptools
RUN pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org --no-cache-dir -r requirements.txt

COPY . /usr/src/app
+3 −3
Original line number Diff line number Diff line
@@ -4,12 +4,12 @@ python_dateutil == 2.6.0
setuptools >= 21.0.0
pymongo==3.12.0
requests==2.32.4
kubernetes==18.20.0
cffi==1.15.1
kubernetes==33.1.0
#cffi==1.15.1
psycopg2-binary
paramiko>=2.12.0
urllib3

pydantic==2.11.3
pydantic-extra-types==2.10.3
sunrise6g_opensdk
 No newline at end of file
sunrise6g_opensdk==1.0.2.post2
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ adapter_base_url = os.environ['ADAPTER_BASE_URL']
adapter = None

if adapter_name=='aeros':
     
     adapter = AerOSClient(base_url=adapter_base_url)
elif adapter_name=='i2edge':
     adapter = I2EdgeClient(base_url=adapter_base_url)
+7 −4
Original line number Diff line number Diff line
@@ -8,16 +8,19 @@ from sunrise6g_opensdk.network.adapters.open5gs.client import NetworkManager as
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)

network_client = environ.get('NETWORK_CLIENT')
network_client = environ.get('NETWORK_ADAPTER_NAME')
base_url = environ.get('NETWORK_ADAPTER_BASE_URL')
scs_as_id = environ.get('SCS_AS_ID')

adapter = None

if network_client is not None:
    if network_client=='oai':
        adapter = OAIClient()
        adapter = OAIClient(base_url=base_url, scs_as_id=scs_as_id)
    elif network_client=='open5gcore':
        adapter = Open5GCoreClient()
        adapter = Open5GCoreClient(base_url=base_url, scs_as_id=scs_as_id)
    else:
        adapter = Open5GSClient()
        adapter = Open5GSClient(base_url=base_url, scs_as_id=scs_as_id)


def create_qod_session():
+7 −1
Original line number Diff line number Diff line
@@ -50,6 +50,12 @@ spec:
              value: kubernetes
            - name: ADAPTER_BASE_URL
              value: k3d-sunriseop-server-0
            - name: NETWORK_ADAPTER_NAME
              value: open5gs
            - name: NETWORK_ADAPTER_BASE_URL
              value: http://192.168.124.233:8002/
            - name: SCS_AS_ID
              value: scs
            - name: PLATFORM_PROVIDER
              value: ISI
          image: ghcr.io/sunriseopenoperatorplatform/srm/srm:1.0.0