Merge "Move get_tenant_by_name to common part"