Commit ff9a85a1 authored by Muhammad Umair Khan's avatar Muhammad Umair Khan
Browse files

Resolve #35: fix MEC033 IoT Platform registration startup timing in ACME MN-CSE

Defer MEC033 IoT Platform service registration in MECSupport.py until the cseStartup event fires, ensuring complex type attribute policies are loaded before registration. Also clean up apt cache in container Dockerfiles and enable pyinfra deploy tasks.
parent 8f6f861a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@ COPY ./data /
RUN chmod +x /entrypoint.sh

RUN apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get install -f -y ca-certificates
 && DEBIAN_FRONTEND=noninteractive apt-get install -f -y --no-install-recommends ca-certificates \
 && rm -rf /var/lib/apt/lists/*

 RUN dpkg --configure -a

+2 −1
Original line number Diff line number Diff line
@@ -26,7 +26,8 @@ RUN chmod +x /entrypoint.sh

RUN apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends procps lftp nfs-common \
    && mkdir -p /mnt/nfs/mec_sandbox
    && mkdir -p /mnt/nfs/mec_sandbox \
    && rm -rf /var/lib/apt/lists/*
#     \
#    && sudo chmod -R 777 /mnt/nfs/ \
#    && mount -t nfs $HOSTNAME:/mnt/nfs/mec_sandbox /mnt/nfs/mec_sandbox
+2 −1
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@ COPY ./data /
RUN chmod +x /entrypoint.sh

RUN apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl jq
 && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl jq \
 && rm -rf /var/lib/apt/lists/*

RUN dpkg --configure -a

+3 −3
Original line number Diff line number Diff line
@@ -23,9 +23,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \

WORKDIR /usr/src/app

RUN git clone https://github.com/ankraft/ACME-oneM2M-CSE.git ACME-oneM2M-CSE
# Patch ACME CSE validation bug where rqi is incorrectly rejected
RUN sed -i 's/raise BAD_REQUEST(f.validation for attribute {attribute} not defined for resource type: {rtype.name}.)/if attribute == "rqi": return self._validateType(BasicType.string, value, True)\n\t\traise BAD_REQUEST(f"validation for attribute {attribute} not defined for resource type: {rtype.name}")/' ACME-oneM2M-CSE/acmecse/services/Validator.py
RUN git clone -b development https://github.com/ankraft/ACME-oneM2M-CSE.git ACME-oneM2M-CSE

WORKDIR /usr/src/app/ACME-oneM2M-CSE

@@ -52,6 +50,8 @@ RUN pip3 install --no-cache-dir -r requirements.txt --break-system-packages

COPY ./data /usr/src/app/ACME-oneM2M-CSE

RUN cp -r ./acme/* ./acmecse/ && rm -rf ./acme || true

RUN chmod +x entrypoint.sh

ENTRYPOINT ["./entrypoint.sh"]
 No newline at end of file
+1 −4
Original line number Diff line number Diff line
@@ -23,10 +23,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \

WORKDIR /usr/src/app

RUN git clone https://github.com/ankraft/ACME-oneM2M-CSE.git ACME-oneM2M-CSE
# Patch ACME CSE validation bug where rqi is incorrectly rejected
RUN sed -i 's/raise BAD_REQUEST(f.validation for attribute {attribute} not defined for resource type: {rtype.name}.)/if attribute == "rqi": return self._validateType(BasicType.string, value, True)\n\t\traise BAD_REQUEST(f"validation for attribute {attribute} not defined for resource type: {rtype.name}")/' ACME-oneM2M-CSE/acmecse/services/Validator.py

RUN git clone -b development https://github.com/ankraft/ACME-oneM2M-CSE.git ACME-oneM2M-CSE

WORKDIR /usr/src/app/ACME-oneM2M-CSE

Loading