release/v2.4 -> master (#844)

This commit is contained in:
cybermaggedon 2026-04-22 15:19:57 +01:00 committed by GitHub
parent a24df8e990
commit 89cabee1b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
386 changed files with 7202 additions and 5741 deletions

View file

@ -9,10 +9,11 @@ from trustgraph.api.types import ConfigKey
default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
default_token = os.getenv("TRUSTGRAPH_TOKEN", None)
default_workspace = os.getenv("TRUSTGRAPH_WORKSPACE", "default")
def delete_config_item(url, config_type, key, token=None):
def delete_config_item(url, config_type, key, token=None, workspace="default"):
api = Api(url, token=token).config()
api = Api(url, token=token, workspace=workspace).config()
config_key = ConfigKey(type=config_type, key=key)
api.delete([config_key])
@ -50,6 +51,12 @@ def main():
help='Authentication token (default: $TRUSTGRAPH_TOKEN)',
)
parser.add_argument(
'-w', '--workspace',
default=default_workspace,
help=f'Workspace (default: {default_workspace})',
)
args = parser.parse_args()
try:
@ -59,6 +66,8 @@ def main():
config_type=args.type,
key=args.key,
token=args.token,
workspace=args.workspace,
)
except Exception as e: