IBM-Cloud / ibm-developer-extension-vscode

Extension for VS Code editor to enable IBM Cloud CLI capabilities from within the editing environment.
https://marketplace.visualstudio.com/items?itemName=IBM.ibm-developer
Apache License 2.0
13 stars 10 forks source link

feat: Added iam commands #47

Closed Aerex closed 2 years ago

Aerex commented 2 years ago

Context

This PR will add a few new VSCode commands from the iam namespace in the IBM Cloud CLI. The following commands will be added:

Steps to Test

Run integration tests

  1. Generate API key from IBM Cloud
  2. Set and export the IBMCLOUD_API_KEY environment variable to the key generated in step 1
  3. Login into IBM Cloud using CLI
  4. Change directory to the root of your local ibm-developer-vscode repo
  5. Run the command npm test
  6. Verify that all tests pass

Test iam oauth-tokens command

  1. Make sure to follow the steps in the Setup section in previous PRs
  2. Open the Command Palette
    • To enter Command Palette press Ctrl+Shift+P or F1 or navigate to View-> Command Palette
  3. Type and enter in ibmcloud login --sso in the Command Palette
  4. Follow the instructions to login into IBM Cloud
  5. Repeat step 2 (command palette)
  6. Enter the command: ibmcloud iam oauth-tokens
  7. Verify that IAM tokens are printed in the Output Channel

Test iam service-ids commands

  1. Make sure to follow the steps 1-4 in Test iam oauth-tokens command section
  2. Open the Command Palette
  3. Type and enter the command: ibmcloud iam service-ids
  4. Verify that the service-ids are printed in the Output Channel

Test iam service-id commands

  1. Make sure to follow the steps 1-4 in Test iam oauth-tokens command section
  2. Open the Command Palette
  3. Type and enter the command: ibmcloud iam service-id
  4. Verify that a dropdown is shown with a list of service-ids
  5. Select or type in a service-id from the list
  6. Verify that the service-id info is printed in the Output Channel

Videos

iam oauth-tokens vscode_iam_oauth_tokens

iam sevice-ids vscode_iam_service_ids

iam sevice-id vscode_iam_service_id