Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

device_management.py supports application access keys 5.15 #13525

Merged
merged 1 commit into from
Oct 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions tools/device_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,11 @@ def inner(options):

# Get the currently in-use API key (may come from environment or
# configuration files, which is handled by the cloud SDK)
api_key_value = accounts.config.get("api_key")
api_key = next(accounts.list_api_keys(
filter={
"key": api_key_value
}
))
api_key = accounts.get_api_key("me")
certificates_owned = list(certs.list_certificates())
dev_cert_info = None
for certif in certificates_owned:
if certif.type == "developer" and (certif.owner_id == api_key.owner_id or
certif.owner_id == api_key.id):
if certif.type == "developer":
dev_cert_info = certs.get_certificate(certif.id)
LOG.info("Found developer certificate named %s",
dev_cert_info.name)
Expand Down