SalesforceCommerceCloud / sfcc-ci

Salesforce Commerce Cloud CLI

Home Page:https://npmjs.com/package/sfcc-ci

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SLAS shortcode and tenant options switched

drewzboto opened this issue · comments

commented

I was trying to use the new slas commands, but I believe on v2.8.0 the options are accidentally switched. It looks like sfcc-ci is picking up the tenant from the shortcode option and the shortcode from the tenant option

sfcc-ci slas:client:list -help
Usage: slas:client:list [options]

Lists all SLAS clients that belong to a given tenant

Options:
  --tenant <tenant>        the tenant id used for slas
  --shortcode <shortcode>  the organizations short code
  -j, --json               Formats the output in json
  -h, --help               output usage information

Steps to reproduce:

  1. Auth sfcc-ci
  2. Attempt to list clients: sfcc-ci slas:client:list --shortcode kv7kzm78 --tenant zzrf_001

Expected results:
List of SLAS clients is displayed for tenant zzrf_001 for shortcode kv7kzm78

Actual results:
Error is displayed:
Could not get tenants: request to https://zzrf_001.api.commercecloud.salesforce.com/shopper/auth-admin/v1/tenants/kv7kzm78/clients failed, reason: getaddrinfo ENOTFOUND zzrf_001.api.commercecloud.salesforce.com

However, if you flip the tenant and shortcode it works:
sfcc-ci slas:client:list --tenant kv7kzm78 --shortcode zzrf_001

commented

@hnestmann can you reproduce this?

commented

Related... i'm not sure if this is working as expected for listing tenants:

 ~/code/ sfcc-ci slas:tenant:list -help
Usage: slas:tenant:list [options]

Lists all tenants that belong to a given organization

Options:
  --shortcode <shortcode>  the organizations short code
  -j, --json               Formats the output in json
  -h, --help               output usage information

 ~/code/ sfcc-ci slas:tenant:list --shortcode kv7kzm78
Could not get tenants: tenantId is not defined

Hi Drew, I heard from a partner the same thing- Thanks for raising - we'l have a look