Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/anms-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.10"
Comment thread
d-linko marked this conversation as resolved.
- name: Install dependencies
run: |
pip3 install deps/dtnma-ace
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/aricodec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.10"
- name: Install dependencies
run: |
pip3 install deps/dtnma-ace
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/transcoder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.10"
- name: Install flake8
working-directory: transcoder
run: pip3 install flake8
Expand Down
4 changes: 0 additions & 4 deletions anms-core/anms/shared/manager_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,12 @@ def acknowledge(self, index):
curr_alert = None
with open(self.alert_file, 'r') as f:
alerts = json.load(f)
logger.info(alerts)
logger.info(index)
curr_alert = alerts.get(str(index))
logger.info(curr_alert)
if curr_alert:
logger.info(f"ACK {index}")
curr_alert["visible"]= False
alerts[str(index)] = curr_alert
with open(self.alert_file, 'w') as f:
logger.info(alerts)
json.dump(alerts, f)
except (FileNotFoundError, json.JSONDecodeError):
logger.error("ERROR reading alert.json")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default {
return {
ariKey: undefined,
ac: [],
result: { index: this.index, type: "AC", value: [] },
result: { index: this.index, type: this.type, value: [] },
keys: [],
currAc: [],
keysRealIndex: [],
Expand All @@ -65,14 +65,9 @@ export default {
this.addToList();
},
addToList: function () {
if(this.ac.length >= this.count){
this.ac.pop();
}

if (this.ariKey != null) {
this.ac.push(this.ariKey)
}

this.ariKey = null;
this.createAC();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,12 @@ export default {
testResult.push(JSON.stringify(head + value).replaceAll('"', ""));
break;
case "AC": //ac
let curr_str= ""
currValue = [];
let curr_str= ""
currValue = [];
value.forEach((ari) => {
currValue.push(ari);
});
if(currValue.length = 1 ){
testResult.push(currValue[0])
}else{
testResult.push("/AC/("+currValue.join(",")+")");
}
testResult.push("/AC/("+currValue.join(",")+")");
break;

case "EXPR": //ac
Expand All @@ -181,11 +177,20 @@ export default {

break;
default:
if (type.includes("TYPEDEF")){
testResult.push(value[0]);
}else{

testResult.push((value));}
if (type.includes("TYPEDEF")){
let curr_str= ""
currValue = [];
value.forEach((ari) => {
currValue.push(ari);
});
if(currValue.length == 1 ){
testResult.push(currValue[0])
}else{
testResult.push("/AC/("+currValue.join(",")+")");
}
}else{
testResult.push((value));
}

break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export default {
index: index,
result: [],
name: name,
type: "TYPEDEF",
type: parm,
listComponents: aris,
count: 1,
},
Expand Down
23 changes: 14 additions & 9 deletions anms.Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,34 @@ ENV APP_USER=anms
RUN groupadd -r -g 9999 ${APP_USER} && \
useradd -m -r -g ${APP_USER} -u 9999 ${APP_USER}


# This image includes common libraries used by the aricodec and anms-core
# containers.
# Sets environment:
# PY_WHEEL_DIR to local PIP wheel search path
#
FROM anms-base AS dtnma-acelib


# Install System Level Dependencies
RUN --mount=type=cache,target=/var/cache/yum \
dnf -y install gcc-c++ python-devel python3-pip python3-wheel python3-setuptools iputils && \
pip3 install pip-tools
dnf -y install gcc-c++ python-devel python3-pip python3-wheel python3-setuptools iputils

# Use specific OS python version
ENV PIP=pip3
ENV PYTHON=python3
# Submodules with dependencies
ENV PY_WHEEL_DIR=/usr/local/lib/wheels

RUN ${PIP} install --upgrade pip
RUN --mount=type=cache,target=/root/.cache/pip \
${PIP} install --upgrade 'pip~=24.0' 'pip-tools~=7.5'

COPY deps/dtnma-ace /usr/src/dtnma-ace
RUN ${PIP} -v wheel /usr/src/dtnma-ace -w ${PY_WHEEL_DIR} --no-deps
RUN --mount=type=cache,target=/root/.cache/pip \
${PIP} wheel /usr/src/dtnma-ace -w ${PY_WHEEL_DIR} --no-deps

COPY deps/dtnma-camp /usr/src/dtnma-camp
RUN ${PIP} wheel /usr/src/dtnma-camp -w ${PY_WHEEL_DIR} --no-deps
RUN --mount=type=cache,target=/root/.cache/pip \
${PIP} wheel /usr/src/dtnma-camp -w ${PY_WHEEL_DIR} --no-deps

COPY deps/dtnma-adms /usr/src/dtnma-adms

Expand Down Expand Up @@ -189,7 +191,8 @@ ENV APP_WORK_DIR=/opt/app
# Copy over all required content (source, data, etc.)
COPY --chown=${APP_USER}:${APP_USER} transcoder ${APP_WORK_DIR}
# Install all python dependencies
RUN ${PIP} install -r ${APP_WORK_DIR}/requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip \
${PIP} install -r ${APP_WORK_DIR}/requirements.txt

# Tune Final Settings
WORKDIR ${APP_WORK_DIR}
Expand Down Expand Up @@ -239,12 +242,14 @@ ENV APP_WORK_DIR=/usr/src/anms-core

# Requirement of main module
COPY anms-core/pyproject.toml ${APP_WORK_DIR}/
RUN cd ${APP_WORK_DIR} && \
RUN --mount=type=cache,target=/root/.cache/pip \
cd ${APP_WORK_DIR} && \
pip-compile --find-links ${PY_WHEEL_DIR} pyproject.toml && \
${PIP} install --ignore-installed -r requirements.txt
# Actual main package
COPY anms-core/anms ${APP_WORK_DIR}/anms
RUN ${PIP} install ${APP_WORK_DIR}
RUN --mount=type=cache,target=/root/.cache/pip \
${PIP} install ${APP_WORK_DIR}

RUN mkdir -p /usr/local/share/ace && \
cp -R /usr/src/dtnma-adms /usr/local/share/ace/adms
Expand Down
4 changes: 2 additions & 2 deletions aricodec/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors = [
description = "ARI CODEC service"
#readme = "README.md"
license = { file="LICENSE" }
requires-python = ">=3.7"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
Expand All @@ -19,7 +19,7 @@ classifiers = [
]

dependencies = [
"dtnma-ace ~=2.0.0",
"dtnma-ace",
"paho-mqtt ~=1.6.1",
"sqlalchemy ~=1.4.42",
"psycopg2-binary ~=2.9.5",
Expand Down
2 changes: 1 addition & 1 deletion deps/dtnma-tools
Loading