Skip to content

Commit f4536be

Browse files
authored
Merge pull request #13524 from norbert-david/patch-1
device_management.py supports application access keys
2 parents 895488f + bf1ba52 commit f4536be

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

tools/device_management.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,11 @@ def inner(options):
114114

115115
# Get the currently in-use API key (may come from environment or
116116
# configuration files, which is handled by the cloud SDK)
117-
api_key_value = accounts.config.get("api_key")
118-
api_key = next(accounts.list_api_keys(
119-
filter={
120-
"key": api_key_value
121-
}
122-
))
117+
api_key = accounts.get_api_key("me")
123118
certificates_owned = list(certs.list_certificates())
124119
dev_cert_info = None
125120
for certif in certificates_owned:
126-
if certif.type == "developer" and (certif.owner_id == api_key.owner_id or
127-
certif.owner_id == api_key.id):
121+
if certif.type == "developer":
128122
dev_cert_info = certs.get_certificate(certif.id)
129123
LOG.info("Found developer certificate named %s",
130124
dev_cert_info.name)

0 commit comments

Comments
 (0)