From de52fa7f487e116d8cba09f588a70a3ef0567f84 Mon Sep 17 00:00:00 2001 From: Curtis Castrapel Date: Wed, 16 May 2018 08:00:33 -0700 Subject: [PATCH] fix v1 backwards compatibility --- lemur/plugins/lemur_acme/plugin.py | 4 ++-- lemur/plugins/lemur_acme/tests/test_acme.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lemur/plugins/lemur_acme/plugin.py b/lemur/plugins/lemur_acme/plugin.py index ba468ca3..ff8f0406 100644 --- a/lemur/plugins/lemur_acme/plugin.py +++ b/lemur/plugins/lemur_acme/plugin.py @@ -156,8 +156,8 @@ def get_domains(options): def get_authorizations(acme_client, order, order_info, dns_provider): authorizations = [] - for domain in order.body.identifiers: - authz_record = start_dns_challenge(acme_client, order_info.account_number, domain.value, dns_provider, order) + for domain in order_info.domains: + authz_record = start_dns_challenge(acme_client, order_info.account_number, domain, dns_provider, order) authorizations.append(authz_record) return authorizations diff --git a/lemur/plugins/lemur_acme/tests/test_acme.py b/lemur/plugins/lemur_acme/tests/test_acme.py index cc9b994f..c80079af 100644 --- a/lemur/plugins/lemur_acme/tests/test_acme.py +++ b/lemur/plugins/lemur_acme/tests/test_acme.py @@ -170,6 +170,7 @@ class TestAcme(unittest.TestCase): mock_order.body.identifiers.append(mock_domain) mock_order_info = Mock() mock_order_info.account_number = 1 + mock_order_info.domains = ["test.fakedomain.net"] result = plugin.get_authorizations("acme_client", mock_order, mock_order_info, "dns_provider") self.assertEqual(result, ["test"])