mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-14 03:51:49 -05:00
cleanup up some unused code/comments, and simplify the license migration
This commit is contained in:
@@ -97,7 +97,7 @@ class Licenser(object):
|
||||
if 'company_name' in kwargs:
|
||||
kwargs.pop('company_name')
|
||||
self._attrs.update(kwargs)
|
||||
if self._check_product_cert():
|
||||
if os.path.exists('/var/lib/awx/.tower_version'):
|
||||
if 'license_key' in self._attrs:
|
||||
self._unset_attrs()
|
||||
if 'valid_key' in self._attrs:
|
||||
@@ -109,14 +109,6 @@ class Licenser(object):
|
||||
self._generate_open_config()
|
||||
|
||||
|
||||
def _check_product_cert(self):
|
||||
# Product Cert Name: ansible-tower-3.7-rhel-7.x86_64.pem
|
||||
# Maybe check validity of Product Cert somehow?
|
||||
if os.path.exists('/etc/tower/certs') and os.path.exists('/var/lib/awx/.tower_version'):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _generate_open_config(self):
|
||||
self._attrs.update(dict(license_type='open',
|
||||
valid_key=True,
|
||||
@@ -130,11 +122,6 @@ class Licenser(object):
|
||||
self._attrs = self.UNLICENSED_DATA.copy()
|
||||
|
||||
|
||||
def _clear_license_setting(self):
|
||||
self.unset_attrs()
|
||||
settings.LICENSE = {}
|
||||
|
||||
|
||||
def license_from_manifest(self, manifest):
|
||||
# Parse output for subscription metadata to build config
|
||||
license = dict()
|
||||
|
||||
Reference in New Issue
Block a user