Skip to content
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6620afb
Added workflow to test publishing of built containers to ghcr.io
DavidEdell Sep 16, 2025
5a1d1d7
Second take (GPT-assisted refinements)
DavidEdell Sep 16, 2025
895d5f6
Back to a simpler approach
DavidEdell Sep 17, 2025
7f8d1ea
Simplest form
DavidEdell Sep 17, 2025
d982a1d
Fix capitalization
DavidEdell Sep 17, 2025
2f7e48a
Adjusting registry name
DavidEdell Sep 17, 2025
120f346
Removed bad env var
DavidEdell Sep 17, 2025
011076e
Missing recursive clone flag
DavidEdell Sep 17, 2025
6765b74
Add testenv build, added test echo as precursor to fixing push path.
DavidEdell Sep 17, 2025
d8c1743
Fix healthcheck for ion-manager and ion-agent
DavidEdell Sep 17, 2025
7aa762f
Merge remote-tracking branch 'origin/main' into feature/177-ghcr_cont…
DavidEdell Sep 17, 2025
5f93175
updated to lastest tool and new SQL schema
Sep 22, 2025
901b1f2
Merge remote-tracking branch 'origin/248-updating-to-latest-dtnma-too…
DavidEdell Sep 22, 2025
87f9f3a
Merge remote-tracking branch 'origin/main' into feature/177-ghcr_cont…
DavidEdell Sep 24, 2025
21a0a68
Fixed GHCR container naming.
DavidEdell Sep 24, 2025
1952f30
Fixed default .env path
DavidEdell Sep 24, 2025
27dcc01
Updating quickstart to pull prebuilt containers by default
DavidEdell Sep 24, 2025
34f6ea6
Pin puppet-lint to compatible version
BrianSipos Sep 25, 2025
57aa3ac
fixed handling bad inputs for ADMs routes
Sep 25, 2025
1d7c38e
Merge branch 'feature/177-ghcr_container_publishing' into 252-deletin…
Sep 25, 2025
1b74a71
Updated README.
DavidEdell Sep 25, 2025
add47e4
Removing test branch reference from workflow.
DavidEdell Sep 25, 2025
d682a17
Merge remote-tracking branch 'origin/feature/177-ghcr_container_publi…
Sep 25, 2025
3753632
Merge branch 'main' into 252-deleting-an-adm
BrianSipos Sep 26, 2025
bc6c8dd
fixed type know to known
Sep 29, 2025
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
21 changes: 14 additions & 7 deletions anms-core/anms/routes/adms/adm.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#

# External modules
from fastapi import APIRouter, status, Request
from fastapi import APIRouter, status, Request, HTTPException
from fastapi.responses import JSONResponse
from fastapi import UploadFile
from pydantic import BaseModel
Expand Down Expand Up @@ -88,9 +88,16 @@ async def getall():
async def get_adm(enumeration: int,namespace: str):
async with get_async_session() as session:
result_dm = await DataModel.get(enumeration, namespace, session)
result, _ = await AdmData.get(result_dm.data_model_id, session)
if result:
return result.data
if result_dm:
result, _ = await AdmData.get(result_dm.data_model_id, session)
if result:
return result.data
else:
logger.error(f"ADM ENUM:{enumeration} in NAMESPACE {namespace} not a known ADM")
raise HTTPException(status_code = status.HTTP_400_BAD_REQUEST, detail = f"ADM ENUM:{enumeration} in NAMESPACE {namespace} not a known ADM")
else:
logger.error(f"ADM ENUM:{enumeration} in NAMESPACE {namespace} not a known DataModel")
raise HTTPException(status_code = status.HTTP_400_BAD_REQUEST, detail = f"ADM ENUM:{enumeration} in NAMESPACE {namespace} not a known DataModel")



Expand All @@ -112,15 +119,15 @@ async def remove_adm(enumeration: int, namespace:str):
async with get_async_session() as session:
nm_row = await DataModel.get(enumeration, namespace, session)
if nm_row:
logger.info(f"Removing {nm_row.data_model_name} ADM")
logger.info(f"Removing {nm_row.name} ADM")
stmt_2 = delete(AdmData).where(AdmData.enumeration == nm_row.data_model_id)
await session.execute(stmt_1)
await session.execute(stmt_2)
await session.commit()
return status.HTTP_200_OK
else:
logger.debug(f"ADM ENUM:{enumeration} not a know ADM")
return status.HTTP_400_BAD_REQUEST
logger.debug(f"ADM ENUM:{enumeration} in NAMESPACE {namespace} not a known ADM")
raise HTTPException(status_code = status.HTTP_400_BAD_REQUEST, detail = f"ADM ENUM:{enumeration} in NAMESPACE {namespace} not a known ADM")



Expand Down
Loading