-
Notifications
You must be signed in to change notification settings - Fork 21
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
Some new methods: #237
base: main
Are you sure you want to change the base?
Some new methods: #237
Conversation
- dcv.start_validation_email - dcv.submit_validation_email
cert_manager/acme.py
Outdated
def get_domains (self, acme_id, **kwargs): | ||
"""List ACME account’s domains. | ||
|
||
:param int acme_id: The ID of the acme account to list domains | ||
""" | ||
self.__acc_domains = [] | ||
result = self.__find_domains(acme_id) | ||
for dom in result: | ||
self.__acc_domains.append(dom) | ||
return self.__acc_domains | ||
|
||
@paginate | ||
def __find_domains(self, acme_id, **kwargs): | ||
|
||
params = { | ||
self._find_params_to_api[param]: kwargs.get(param) | ||
for param in self._find_params_to_api # pylint:disable=consider-using-dict-items | ||
} | ||
url = self._url(f"{acme_id}", "domain") | ||
result = self._client.get(url, params=params) | ||
return result.json() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should all probably be one function named get_domains
that uses the @paginate
wrapper. Additionally, we probably shouldn't cache the results in self.__acc_domains
since this data would change if a different ACME ID was provided, correct? This should probably just accumulate a list of domains in a local variable and then return at the end.
do not store results
DomainControlValidation.all use search instead __search Remove __search method
dcv using email method
dcv.all
acme.get_domais