Skip to content

Commit

Permalink
osmorphing: Fix undefined attribute installed_packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristi1324 committed Sep 24, 2024
1 parent fd011f0 commit 143075b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions coriolis/osmorphing/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def check_os_supported(cls, detected_os_info):
cls.__name__))

@abc.abstractmethod
def get_installed_packages(self, package_name):
def get_installed_packages(self):
pass

@abc.abstractmethod
Expand Down Expand Up @@ -125,7 +125,6 @@ def set_environment(self, environment):
class BaseLinuxOSMorphingTools(BaseOSMorphingTools):

_packages = {}
installed_packages = []

def __init__(self, conn, os_root_dir, os_root_dev, hypervisor,
event_manager, detected_os_info, osmorphing_parameters,
Expand Down
2 changes: 1 addition & 1 deletion coriolis/osmorphing/coreos.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def check_os_supported(cls, detected_os_info):
return False

def get_installed_package(self):
pass
self.installed_packages = []

def disable_predictable_nic_names(self):
pass
Expand Down
2 changes: 1 addition & 1 deletion coriolis/osmorphing/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_installed_packages(self):
self.installed_packages = self._exec_cmd_chroot(
cmd).decode('utf-8').splitlines()
except exception.CoriolisException:
pass
self.installed_packages = []

def pre_packages_install(self, package_names):
super(BaseDebianMorphingTools, self).pre_packages_install(
Expand Down
2 changes: 1 addition & 1 deletion coriolis/osmorphing/openwrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def check_os_supported(cls, detected_os_info):
return False

def get_installed_package(self):
pass
self.installed_packages = []

def disable_predictable_nic_names(self):
pass
Expand Down
1 change: 1 addition & 0 deletions coriolis/osmorphing/redhat.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ def get_installed_packages(self):
except exception.CoriolisException:
LOG.warning("Failed to get installed packages")
LOG.trace(utils.get_exception_details())
self.installed_packages = []

def _yum_install(self, package_names, enable_repos=[]):
try:
Expand Down
1 change: 1 addition & 0 deletions coriolis/osmorphing/suse.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def get_installed_packages(self):
except exception.CoriolisException:
LOG.warning("Failed to get installed packages")
LOG.trace(utils.get_exception_details())
self.installed_packages = []

def get_update_grub2_command(self):
location = self._get_grub2_cfg_location()
Expand Down
2 changes: 1 addition & 1 deletion coriolis/osmorphing/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def get_packages(self):
return [], []

def get_installed_packages(self):
pass
self.installed_packages = []

def pre_packages_install(self, package_names):
pass
Expand Down

0 comments on commit 143075b

Please sign in to comment.