Skip to content

Commit

Permalink
fix mikel legacy stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Apr 20, 2020
1 parent fcef009 commit dd5a788
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion kvirt/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def cloudinit(name, keys=[], cmds=[], nets=[], gateway=None, dns=None, domain=No
:param fqdn:
"""
default_gateway = gateway
legacy = True if image is not None and image.startswith('CentOS-7') else False
legacy = True if image is not None and is_7(image) else False
prefix = 'ens' if image is not None and is_debian(image) else 'eth'
netdata = {} if not legacy else ''
if nets:
Expand Down Expand Up @@ -1327,6 +1327,13 @@ def is_debian(image):
return False


def is_7(image):
lower = image.lower()
if lower.startswith('centos-7') or lower.startswith('rhel-server-7'):
return True
return False


def needs_ignition(image):
if 'coreos' in image or 'rhcos' in image or 'fcos' in image or 'fedora-coreos' in image:
return True
Expand Down

0 comments on commit dd5a788

Please sign in to comment.