mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
Fix config inconsistency (#609)
* Plural/singular confusion in config key * Flow class vs flow blueprint nomenclature change * Update docs & CLI to reflect the above
This commit is contained in:
parent
99f17d1b9d
commit
b08db761d7
36 changed files with 816 additions and 814 deletions
51
trustgraph-cli/trustgraph/cli/delete_flow_blueprint.py
Normal file
51
trustgraph-cli/trustgraph/cli/delete_flow_blueprint.py
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
"""
|
||||
Deletes a flow blueprint
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import tabulate
|
||||
from trustgraph.api import Api
|
||||
import json
|
||||
|
||||
default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
|
||||
|
||||
def delete_flow_blueprint(url, blueprint_name):
|
||||
|
||||
api = Api(url).flow()
|
||||
|
||||
blueprint_names = api.delete_blueprint(blueprint_name)
|
||||
|
||||
def main():
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
prog='tg-delete-flow-blueprint',
|
||||
description=__doc__,
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'-u', '--api-url',
|
||||
default=default_url,
|
||||
help=f'API URL (default: {default_url})',
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'-n', '--blueprint-name',
|
||||
help=f'Flow blueprint name',
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
|
||||
delete_flow_blueprint(
|
||||
url=args.api_url,
|
||||
blueprint_name=args.blueprint_name,
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
|
||||
print("Exception:", e, flush=True)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue