def ovdc_info(ctx, ovdc_name, org_name): """Display information about Kubernetes provider for an org VDC.""" try: restore_session(ctx) client = ctx.obj['client'] if client.is_sysadmin(): ovdc = Ovdc(client) if org_name is None: org_name = ctx.obj['profiles'].get('org_in_use') result = ovdc.info_ovdc_for_k8s(ovdc_name, org_name) stdout(result, ctx) else: stderr("Insufficient permission to perform operation", ctx) except Exception as e: stderr(e, ctx)
def ovdc_info(ctx, ovdc_name, org_name): """Display information about Kubernetes provider for an org VDC.""" CLIENT_LOGGER.debug(f'Executing command: {ctx.command_path}') try: restore_session(ctx) client = ctx.obj['client'] if client.is_sysadmin(): ovdc = Ovdc(client) if org_name is None: org_name = ctx.obj['profiles'].get('org_in_use') result = ovdc.info_ovdc_for_k8s(ovdc_name, org_name) stdout(result, ctx) CLIENT_LOGGER.debug(result) else: msg = "Insufficient permission to perform operation" stderr(msg, ctx) CLIENT_LOGGER.error(msg) except Exception as e: stderr(e, ctx) CLIENT_LOGGER.error(str(e))