Skip to content

Commit

Permalink
tui: don't hide NIC selection when there is only one
Browse files Browse the repository at this point in the history
Making things visible is good (esp. here it allows to check interface
details), and having the test at this level would not allow to implement
xenserver#8.

Signed-off-by: Yann Dirson <[email protected]>
  • Loading branch information
ydirson committed Jan 13, 2023
1 parent 842d427 commit ee30454
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tui/installer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ def upgrade_but_no_settings_predicate(answers):
('installation-to-overwrite' not in answers or \
not answers['installation-to-overwrite'].settingsAvailable())

has_multiple_nics = lambda a: len(a['network-hardware'].keys()) > 1

is_reinstall_fn = lambda a: a['install-type'] == constants.INSTALL_TYPE_REINSTALL
is_clean_install_fn = lambda a: a['install-type'] == constants.INSTALL_TYPE_FRESH
is_not_restore_fn = lambda a: a['install-type'] != constants.INSTALL_TYPE_RESTORE
Expand Down Expand Up @@ -162,7 +160,7 @@ def out_of_order_pool_upgrade_fn(answers):
Step(uis.get_root_password,
predicates=[is_not_restore_fn, not_preserve_settings]),
Step(uis.get_admin_interface,
predicates=[is_not_restore_fn, has_multiple_nics, not_preserve_settings]),
predicates=[is_not_restore_fn, not_preserve_settings]),
Step(uis.get_admin_interface_configuration,
predicates=[is_not_restore_fn, not_preserve_settings]),
Step(uis.get_name_service_configuration,
Expand Down

0 comments on commit ee30454

Please sign in to comment.