diff --git a/src/vm-repair/HISTORY.rst b/src/vm-repair/HISTORY.rst index 1a16b3e6333..55d7a3ea54b 100644 --- a/src/vm-repair/HISTORY.rst +++ b/src/vm-repair/HISTORY.rst @@ -1,6 +1,10 @@ Release History =============== +0.5.7 +++++++ +Remove VM-repair SUSE image check + 0.5.6 ++++++ Renaming the Public IP resource. diff --git a/src/vm-repair/azext_vm_repair/repair_utils.py b/src/vm-repair/azext_vm_repair/repair_utils.py index f9a8296fb66..d18c1f5fbde 100644 --- a/src/vm-repair/azext_vm_repair/repair_utils.py +++ b/src/vm-repair/azext_vm_repair/repair_utils.py @@ -489,31 +489,6 @@ def _fetch_compatible_windows_os_urn(source_vm): return urns[0] -def _suse_image_selector(distro): - fetch_urn_command = 'az vm image list --publisher SUSE --offer {offer} --sku gen1 --verbose --all --query "[].urn | reverse(sort(@))" -o json'.format(offer=distro) - urns = loads(_call_az_command(fetch_urn_command)) - - # Raise exception when not finding SUSE image - if not urns: - raise SuseNotAvailableError() - - return urns[0] - - -def _suse_image_selector_gen2(distro): - fetch_urn_command = 'az vm image list --publisher SUSE --offer {offer} --sku gen2 --verbose --all --query "[].urn | reverse(sort(@))" -o json'.format(offer=distro) - urns = loads(_call_az_command(fetch_urn_command)) - - # Raise exception when not finding SUSE image - if not urns: - raise SuseNotAvailableError() - - logger.debug('Fetched urns: \n%s', urns) - # Returning the first URN as it is the latest image with no special use like HPC or SAP - logger.debug('Return the first URN : %s', urns[0]) - return urns[0] - - def _select_distro_linux(distro): image_lookup = { 'rhel6': 'RedHat:RHEL:6.10:latest', @@ -527,8 +502,8 @@ def _select_distro_linux(distro): 'oracle6': 'Oracle:Oracle-Linux:6.10:latest', 'oracle7': 'Oracle:Oracle-Linux:ol79:latest', 'oracle8': 'Oracle:Oracle-Linux:ol82:latest', - 'sles12': _suse_image_selector('sles-12'), - 'sles15': _suse_image_selector('sles-15') + 'sles12': 'SUSE:sles-12-sp5:gen1:latest', + 'sles15': 'SUSE:sles-15-sp3:gen1:latest', } if distro in image_lookup: os_image_urn = image_lookup[distro] @@ -576,8 +551,8 @@ def _select_distro_linux_gen2(distro): 'oracle6': 'Oracle:Oracle-Linux:ol79-gen2:latest', 'oracle7': 'Oracle:Oracle-Linux:ol79-gen2:latest', 'oracle8': 'Oracle:Oracle-Linux:ol82-gen2:latest', - 'sles12': _suse_image_selector_gen2('sles-12'), - 'sles15': _suse_image_selector_gen2('sles-15') + 'sles12': 'SUSE:sles-12-sp5:gen2:latest', + 'sles15': 'SUSE:sles-15-sp3:gen2:latest', } if distro in image_lookup: os_image_urn = image_lookup[distro] diff --git a/src/vm-repair/setup.py b/src/vm-repair/setup.py index c0dd567293b..eee98587a18 100644 --- a/src/vm-repair/setup.py +++ b/src/vm-repair/setup.py @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = "0.5.6" +VERSION = "0.5.7" CLASSIFIERS = [ 'Development Status :: 4 - Beta',