From 40b67f732381c98b82b939b92e3f1c6a5c9f881a Mon Sep 17 00:00:00 2001 From: David Linko Date: Thu, 19 Dec 2024 16:37:38 -0500 Subject: [PATCH 1/3] updated ace and adm with new bp-agent --- deps/anms-ace | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/anms-ace b/deps/anms-ace index ecf173c..b8eadff 160000 --- a/deps/anms-ace +++ b/deps/anms-ace @@ -1 +1 @@ -Subproject commit ecf173caa449cfa977b66c6886998e3e0cbe208a +Subproject commit b8eadff56d3eeeb2e404a6884b8f5c90f80c9437 From 3a1c6e167651d2a0be57c99842fe769aad2c1f8f Mon Sep 17 00:00:00 2001 From: David Linko Date: Fri, 20 Dec 2024 15:41:10 -0500 Subject: [PATCH 2/3] updated to use dtnma-ace --- .github/workflows/anms-core.yaml | 4 ++-- .github/workflows/aricodec.yaml | 2 +- .gitlab-ci.yml | 2 +- .gitmodules | 8 ++++---- README.md | 4 ++-- anms-core/Dockerfile | 4 ++-- anms-core/pyproject.toml | 2 +- aricodec/Dockerfile | 2 +- aricodec/pyproject.toml | 2 +- base.Dockerfile | 6 +++--- build.sh | 2 +- deps/anms-ace | 1 - deps/dtnma-ace | 1 + transcoder/Dockerfile | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-) delete mode 160000 deps/anms-ace create mode 160000 deps/dtnma-ace diff --git a/.github/workflows/anms-core.yaml b/.github/workflows/anms-core.yaml index 834d504..885f831 100644 --- a/.github/workflows/anms-core.yaml +++ b/.github/workflows/anms-core.yaml @@ -20,7 +20,7 @@ jobs: python-version: "3.10" - name: Install dependencies run: | - pip3 install deps/anms-ace + pip3 install deps/dtnma-ace pip3 install deps/anms-camp - name: Install working-directory: anms-core @@ -42,7 +42,7 @@ jobs: python-version: "3.10" - name: Install dependencies run: | - pip3 install deps/anms-ace + pip3 install deps/dtnma-ace pip3 install deps/anms-camp - name: Install flake8 working-directory: anms-core diff --git a/.github/workflows/aricodec.yaml b/.github/workflows/aricodec.yaml index 64498c5..b916f84 100644 --- a/.github/workflows/aricodec.yaml +++ b/.github/workflows/aricodec.yaml @@ -20,7 +20,7 @@ jobs: python-version: "3.10" - name: Install dependencies run: | - pip3 install deps/anms-ace + pip3 install deps/dtnma-ace - name: Install flake8 working-directory: aricodec run: pip3 install -e '.[flake8]' diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7369412..16814d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -172,7 +172,7 @@ anms-core_unit-test: before_script: - *prep-install-ca - *prep-install-python - - pip3 wheel deps/anms-ace -w ${PY_WHEEL_DIR} --no-deps + - pip3 wheel deps/dtnma-ace -w ${PY_WHEEL_DIR} --no-deps - pip3 wheel deps/anms-camp -w ${PY_WHEEL_DIR} --no-deps - (cd anms-core && pip-compile --find-links ${PY_WHEEL_DIR} --extra test pyproject.toml && diff --git a/.gitmodules b/.gitmodules index 59199d9..b0c642e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "deps/anms-ace"] - path = deps/anms-ace - url = ../anms-ace.git [submodule "deps/anms-camp"] path = deps/anms-camp url = ../anms-camp.git @@ -8,4 +5,7 @@ path = ion/src url = https://github.com/JHUAPL/dtnma-tools.git - +[submodule "deps/dtnma-ace"] + path = deps/dtnma-ace + url = https://github.com/JHUAPL-DTNMA/dtnma-ace + branch = main diff --git a/README.md b/README.md index 654d197..9ca2a1d 100644 --- a/README.md +++ b/README.md @@ -210,14 +210,14 @@ The two output paths for ADM C files are: To regenerate agent source, scraping the pre-existing source to avoid clearing out agent implementations, run: ```sh -PYTHONPATH=deps/anms-ace/src/:deps/anms-camp/src/ python3 -m camp.tools.camp ion/src/nm/doc/adms/ion_bp_admin.json -o ion/src/bpv7/nm/ --only-ch --scrape +PYTHONPATH=deps/dtnma-ace/src/:deps/anms-camp/src/ python3 -m camp.tools.camp ion/src/nm/doc/adms/ion_bp_admin.json -o ion/src/bpv7/nm/ --only-ch --scrape ``` ## Manual Agent exercising To use the local AMP Manager directly via its REST API on the local host run similar to: ``` -echo 'ari:/IANA:ltp_agent/CTRL.reset(UINT.3)' | PYTHONPATH=deps/anms-ace/src/ ADM_PATH=deps/anms-ace/tests/adms/ python3 -m ace.tools.ace_ari --log-level=warning --outform=cborhex --must-nickname | tr -d '[[:space:]]' | curl -v -XPUT -H 'Content-Type: text/plain' --data-binary @- http://localhost:8089/nm/api/agents/eid/ipn:2.6/hex; echo +echo 'ari:/IANA:ltp_agent/CTRL.reset(UINT.3)' | PYTHONPATH=deps/dtnma-ace/src/ ADM_PATH=deps/dtnma-ace/tests/adms/ python3 -m ace.tools.ace_ari --log-level=warning --outform=cborhex --must-nickname | tr -d '[[:space:]]' | curl -v -XPUT -H 'Content-Type: text/plain' --data-binary @- http://localhost:8089/nm/api/agents/eid/ipn:2.6/hex; echo ``` A limitation in the current NM REST API disallows multiple controls in a single message, so each ARI must be iterated over for this method. diff --git a/anms-core/Dockerfile b/anms-core/Dockerfile index 0f1198a..dc6baec 100644 --- a/anms-core/Dockerfile +++ b/anms-core/Dockerfile @@ -25,7 +25,7 @@ # DB_USERNAME and DB_PASSWORD for optional authentication # DB_NAME for the database schema to use # -FROM anms-acelib +FROM dtnma-acelib ENV APP_WORK_DIR=/usr/src/anms-core # Requirement of main module @@ -40,7 +40,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \ pip3 install ${APP_WORK_DIR} RUN mkdir -p /usr/local/share/ace && \ - cp -R /usr/src/anms-ace/tests/adms /usr/local/share/ace/adms + cp -R /usr/src/dtnma-ace/tests/adms /usr/local/share/ace/adms COPY anms/agent_parameter.json /usr/local/share/anms/agent_parameter.json # Remaining commands as the local user diff --git a/anms-core/pyproject.toml b/anms-core/pyproject.toml index 92ae104..03567e7 100644 --- a/anms-core/pyproject.toml +++ b/anms-core/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ ] dependencies = [ - "anms-ace", + "dtnma-ace", "anms-camp", "anyio ~=3.6.1", "arrow ~=1.2.3", diff --git a/aricodec/Dockerfile b/aricodec/Dockerfile index 917e508..bab0422 100644 --- a/aricodec/Dockerfile +++ b/aricodec/Dockerfile @@ -24,7 +24,7 @@ # MQTT_HOST referencing the DNS name of the MQTT broker # DB_URI referencing the sqlalchemy URI for the DNS name of a PostgreSQL server # -FROM anms-acelib +FROM dtnma-acelib ENV APP_WORK_DIR=/usr/src/aricodec # Requirement of main package diff --git a/aricodec/pyproject.toml b/aricodec/pyproject.toml index 87c7347..5bc429b 100644 --- a/aricodec/pyproject.toml +++ b/aricodec/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ ] dependencies = [ - "anms-ace ~=1.0.0", + "dtnma-ace ~=1.0.0", "paho-mqtt ~=1.6.1", "sqlalchemy ~=1.4.42", "psycopg2-binary ~=2.9.5", diff --git a/base.Dockerfile b/base.Dockerfile index 73c4eb0..4df0bb8 100644 --- a/base.Dockerfile +++ b/base.Dockerfile @@ -64,7 +64,7 @@ RUN systemctl disable dnf-makecache.timer # Sets environment: # PY_WHEEL_DIR to local PIP wheel search path # -FROM anms-base AS anms-acelib +FROM anms-base AS dtnma-acelib # Install System Level Dependencies RUN --mount=type=cache,target=/root/.cache/pip \ @@ -75,9 +75,9 @@ RUN --mount=type=cache,target=/root/.cache/pip \ # Submodules with dependencies env PY_WHEEL_DIR=/usr/local/lib/wheels -COPY deps/anms-ace /usr/src/anms-ace +COPY deps/dtnma-ace /usr/src/dtnma-ace RUN --mount=type=cache,target=/root/.cache/pip \ - pip3 wheel /usr/src/anms-ace -w ${PY_WHEEL_DIR} --no-deps + pip3 wheel /usr/src/dtnma-ace -w ${PY_WHEEL_DIR} --no-deps COPY deps/anms-camp /usr/src/anms-camp RUN --mount=type=cache,target=/root/.cache/pip \ diff --git a/build.sh b/build.sh index 21ea0f3..d73a76d 100755 --- a/build.sh +++ b/build.sh @@ -42,7 +42,7 @@ echo "Running image build" declare -A BASEIMGS=( [anms-base]=". -f base.Dockerfile --target anms-base" [anms-init]=". -f base.Dockerfile --target anms-init" - [anms-acelib]=". -f base.Dockerfile --target anms-acelib" + [dtnma-acelib]=". -f base.Dockerfile --target dtnma-acelib" ) declare -A IMAGES=( [authnz]="" diff --git a/deps/anms-ace b/deps/anms-ace deleted file mode 160000 index b8eadff..0000000 --- a/deps/anms-ace +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b8eadff56d3eeeb2e404a6884b8f5c90f80c9437 diff --git a/deps/dtnma-ace b/deps/dtnma-ace new file mode 160000 index 0000000..f0047da --- /dev/null +++ b/deps/dtnma-ace @@ -0,0 +1 @@ +Subproject commit f0047da2c87c7a559ed5846decafb6ae2ea29a44 diff --git a/transcoder/Dockerfile b/transcoder/Dockerfile index ff74781..7993acc 100644 --- a/transcoder/Dockerfile +++ b/transcoder/Dockerfile @@ -19,7 +19,7 @@ ## the prime contract 80NM0018D0004 between the Caltech and NASA under ## subcontract 1658085. ## -FROM anms-acelib +FROM dtnma-acelib ENV APP_WORK_DIR /opt/app From af25e02a207bb87642302112aee9750f55b4067b Mon Sep 17 00:00:00 2001 From: David Linko Date: Fri, 20 Dec 2024 16:00:10 -0500 Subject: [PATCH 3/3] reverted dependcies name change --- anms-core/pyproject.toml | 2 +- aricodec/pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/anms-core/pyproject.toml b/anms-core/pyproject.toml index 03567e7..92ae104 100644 --- a/anms-core/pyproject.toml +++ b/anms-core/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ ] dependencies = [ - "dtnma-ace", + "anms-ace", "anms-camp", "anyio ~=3.6.1", "arrow ~=1.2.3", diff --git a/aricodec/pyproject.toml b/aricodec/pyproject.toml index 5bc429b..87c7347 100644 --- a/aricodec/pyproject.toml +++ b/aricodec/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ ] dependencies = [ - "dtnma-ace ~=1.0.0", + "anms-ace ~=1.0.0", "paho-mqtt ~=1.6.1", "sqlalchemy ~=1.4.42", "psycopg2-binary ~=2.9.5",