Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Add config file option for galaxy api token (ala, '--api-token') #249

Closed
alikins opened this issue May 15, 2019 · 0 comments · Fixed by #268
Closed

Add config file option for galaxy api token (ala, '--api-token') #249

alikins opened this issue May 15, 2019 · 0 comments · Fixed by #268

Comments

@alikins
Copy link
Contributor

alikins commented May 15, 2019

Feature Request

Add config file option for galaxy api token (ala, '--api-token')

Use Case

What problem does this feature solve? Please describe.

Avoid having to provide the galaxy api token via the cli --api-token for publish.

Proposed Solution

Describe the solution you'd like
Add 'galaxy_api_token'[1] to config options

Alternatives

Describe alternatives you've considered

Different content item name: 'galaxy_api_key', 'api_key', 'api_token', etc
cli option is:

  --api-key=PUBLISH_API_KEY
                        The Galaxy API key which can be found at
                        https://galaxy.ansible.com/me/preferences

The web ui says:

API Key

Implementation

Teachability, Documentation, Adoption, Migration Strategy
If you can, explain the user story, and possibly provide a version of the docs.
Maybe a screenshot or mockup of the design?

@alikins alikins self-assigned this May 21, 2019
@alikins alikins added this to the Mazer 1.0.0 milestone May 21, 2019
alikins added a commit to alikins/mazer that referenced this issue May 21, 2019
alikins added a commit that referenced this issue May 23, 2019
This is the API key used when the Galaxy API needs to authenticate
a request. For example, for the POST request made when using the
'publish' sub command to upload collection artifacts.
'api_key' here is equilivent to the cli '--api-key'

The default value is unset or None.
The API key can be found at https://galaxy.ansible.com/me/preferences

Remove api_key arg to action publish.publish()

Add api_key to config 'server' dict by default

Also update action.publish unit tests to use requests_mock

Add info about config 'api_key' item to README

Fixes: #249
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant