in nuvolaris/user_handlers.py [0:0]
def whisk_user_delete(spec, name, **kwargs):
logging.info(f"*** whisk_user_delete {name}")
ucfg = get_ucfg(spec)
if(ucfg.get("namespace")):
res = endpoint.delete_ow_api_endpoint(ucfg)
logging.info(f"OpenWhisk subject {ucfg.get('namespace')} api removed = {res}")
res = cdb.delete_ow_user(ucfg.get("namespace"))
logging.info(f"OpenWhisk subject {ucfg.get('namespace')} removed = {res}")
if(cfg.get('components.minio') and (ucfg.get('object-storage.data.enabled') or ucfg.get('object-storage.route.enabled'))):
res = minio_deploy.delete_ow_storage(ucfg)
logging.info(f"OpenWhisk namespace {ucfg.get('namespace')} MINIO storage removed = {res}")
if(cfg.get('components.minio') and ucfg.get('object-storage.route.enabled') and cfg.get('components.static')):
res = static.delete_ow_static_endpoint(ucfg)
logging.info(f"OpenWhisk static endpoint for {ucfg.get('namespace')} removed = {res}")
if(cfg.get('components.mongodb') and ucfg.get('mongodb.enabled')):
res = mdb.delete_db_user(ucfg.get('namespace'),ucfg.get('mongodb.database'))
logging.info(f"Mongodb setup for {ucfg.get('namespace')} removed = {res}")
if(cfg.get('components.redis') and ucfg.get('redis.enabled')):
res = redis.delete_db_user(ucfg.get('namespace'))
logging.info(f"Redis setup for {ucfg.get('namespace')} removed = {res}")
if(cfg.get('components.postgres') and ucfg.get('postgres.enabled')):
res = postgres.delete_db_user(ucfg.get('namespace'),ucfg.get('postgres.database'))
logging.info(f"Postgres setup for {ucfg.get('namespace')} removed = {res}")
if(cfg.get('components.milvus') and ucfg.get('milvus.enabled')):
res = milvus.delete_ow_milvus(ucfg)
logging.info(f"Milvus setup for {ucfg.get('namespace')} removed = {res}")
res = userdb.delete_user_metadata(ucfg.get('namespace'))