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

.edgerc doesn't allow comments #61

Closed GrumpyOldTroll closed 3 years ago

GrumpyOldTroll commented 4 years ago

In my .edgerc, I add a comment to remind myself which key expires when. All the other akamai cli commands I've tried accept the comments, but property-manager gives a complaint:

$ akamai property-manager --edgerc ~/.edgerc --section default search disrupt
PM CLI Error: 'edgerc_parse_error' occurred: 
 Error parsing key-value pair '# created 2020-06-24, expire 2020-09-22  jholland-amt-auto2' in line 1

.edgerc looks something like this:

[default]
# created 2020-06-24, expire 2020-09-22  jholland-amt-auto2
client_secret = blah
host = blah
access_token = blah
client_token = blah
roryhewitt commented 3 years ago

@GrumpyOldTroll you can add comments, but they should go below the first 4 'real' lines, because some of the code assumes that the first 4 lines are the important ones. Additionally, I always add them as K=V pairs, e.g.:

[default]
client_secret = blah
host = blah
access_token = blah
client_token = blah
creation_date = 2020-06-24
expires = 2020-09-22
created_by = jholland-amt-auto2
client_description = Account XYZ - rhewitt

At least that's been my experience...

mvanhornakamai commented 3 years ago

We are working on allowing "#" symbols in this file. As well, what Rory suggested will work since after a stanza the code will only read the following four lines.

SidHeg commented 3 years ago

In release v0.7.3 we have included the option to add comments (lines starting with #) in the .edgerc file.