akamai / cli-property-manager

Use this Property Manager CLI to automate Akamai property changes and deployments across many environments.
Apache License 2.0
29 stars 22 forks source link

Help section indicates "default" section, however code expects "papi" #60

Open elfinston opened 4 years ago

elfinston commented 4 years ago

Hello CLI team,

I trying a test to understand PIPELINE to suggest our DevOps to a customer. Basically it worked well as so far except a situation that when I used [default] named credential information.

Please refer below.

-bash-4.2# cat /root/.edgerc
[default]
client_secret = --- snip ---
client_token = --- snip ---
access_token = --- snip ---
host = --- snip ---

-bash-4.2# akamai auth verify
Credential Name: shki-api-test0-pipeline
---------------------------------
Created 2020-08-24T09:39:36Z by shki
Updated 2020-08-24T09:39:36Z by shki
Activated 2020-08-24T09:39:36Z by shki
Grants:
    config-dns : readwrite
    config-edns : readwrite
    config-visitor-prioritization-data : readwrite
    config-waf-network-list : readwrite
    contract-api : read
    cps : readwrite
    data-dns : read
    data-edns : read
    lds : readwrite
    network-list : readwrite
    papi : readwrite
    siteshield : readwrite

-bash-4.2# akamai pm list-groups
PM CLI Error: 'invalid_section_name' occurred:
 Section 'papi' not found in edgerc file: '/root/.edgerc'. Possible section names: ['default']
Usage: akamai property-manager list-groups|lg [options]

List groups available based on the current user credentials (clientId).

Options:
  -h, --help  output usage information

  ゥ 2017-2020 Akamai Technologies, Inc. All rights reserved
  Visit http://github.com/akamai/cli-property-manager for documentation

It worked well after I changed the credential name from [default] to [papi]. Looks like It has a problem with [default] credential name. So, I testing APIs with the changed credential name to prevent wasting my time by the way.

However, I hope It working well with [default] name. Could you tell me please, what I to do to resolve this issue?

Thanks and Regards, Shane Kim

javiergarza commented 4 years ago

Hi Shane, thanks for reporting the issue. I have transferred it to the right repo that handles the code for the pm CLI package.

@ellenbluth seems there is an inconsistency between the code and the help screen. Probably the easiest would be to update the online help (see below --section) to indicate the expected .edgerc section is "papi" as indicated on the README: https://github.com/akamai/cli-property-manager#get-started

Akamai DevOps [~] >> akamai pm help
Usage: akamai property-manager [options] [command]

Property Manager CLI. Run these commands from the project directory that contains your local properties.

Options:
  -V, --version                             output the version number
  -f, --format <format>                     Select output format for commands, either 'table', the default, or 'json'.
  -s, --section <section>                   The section of the .edgerc file that contains the user profile, or client ID, to use for the command. If not set, uses the
                                            `default` settings in the .edgerc file.
javiergarza commented 3 years ago

@akamai/cli-property-manager not sure if it is worth opening a new issue, but apart from fixing the documentation it would be great if the property-manager CLI would use the credentials in the "default" section whenever there is no "papi" section defined (most of the other CLI packages use the default section by default)

advissor commented 9 months ago

Taking into account it is 2023, and most people who follow the docs use https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials page to setup the creds, it is worth of fixing

This is the first step in setting up the creds for akamai cli..