bcgov / gwa-cli

Apache License 2.0
6 stars 1 forks source link

List Gateways and current Gateway in `gwa login` #123

Open rustyjux opened 2 months ago

rustyjux commented 2 months ago

Mimic the informative output from oc upon login:

Logged into "https://api.gold.devops.gov.bc.ca:6443" as "russell.vinegar@gov.bc.ca" using the token provided.

You have access to the following projects and can switch between them with 'oc project <projectname>':

  * b8840c-dev
    b8840c-prod
    b8840c-test
    b8840c-tools
    ec38a0-prod
    fe3a7e-prod

Using project "b8840c-dev".

WIP:

Waiting for authentication handshake...
✓ Successfully logged in using device login.

You have access to the following Gateways and can switch between them with 'gwa config set gateway <gateway-id>':

Display Name        Gateway ID  
Gateway gw-fdfee    gw-fdfee    
new-test111         gw-c168f    
RVINEGAR's Gateway  gw-ff064    
Tester              gw-44d2a    
This-namespace      gw-b963a    

Currently using: 
This-namespace  gw-b963a

Benefits:

WIP in feature/ns-to-gw-login branch

To determine:

To do for WIP:

timng-bcgov commented 2 months ago

Thumbs up on the benefits for new and existing users. I think it's very helpful to have the host and user information in the success message.