From aa7514a99347461c5bb42459157c91bc57419203 Mon Sep 17 00:00:00 2001 From: "Christian M. Adams" Date: Tue, 1 Dec 2020 15:24:13 -0500 Subject: [PATCH] Read in and use the Sat port if applicable for Subscriptions --- awx/main/utils/licensing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx/main/utils/licensing.py b/awx/main/utils/licensing.py index 7150983ad6..b749df8723 100644 --- a/awx/main/utils/licensing.py +++ b/awx/main/utils/licensing.py @@ -260,11 +260,15 @@ class Licenser(object): def get_satellite_subs(self, host, user, pw): + port = None try: verify = str(self.config.get("rhsm", "repo_ca_cert")) + port = str(self.config.get("server", "port")) except Exception as e: logger.exception('Unable to read rhsm config to get ca_cert location. {}'.format(str(e))) verify = getattr(settings, 'REDHAT_CANDLEPIN_VERIFY', True) + if port: + host = ':'.join([host, port]) json = [] try: orgs = requests.get(