Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OSMorphing] Fix undefined attribute installed_packages #342

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading