Commit 243e2d93 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Cleaned up comments and messages

parent d2d7f92a
......@@ -391,7 +391,7 @@ class Ili:
# Display a radiolist with the network naming strategies
code, chosen_strategy = self._dialog.radiolist(
'Select network naming strategy',
height=20, width=60, list_height=10,
height=20, width=50, list_height=10,
title='Network Naming Strategy',
choices=[
(x['strategy'], x['description'], False) for x in self.state.supported_networknaming_strategies
......@@ -402,7 +402,7 @@ class Ili:
if code == self._dialog.DIALOG_CANCEL:
exit(0)
# If no strategy were selected, we need to display an error, and do it again
# If no strategy was selected, we need to display an error, and do it again
if not chosen_strategy:
self._error('ERROR', 'No network naming strategy was selected!')
......@@ -419,7 +419,7 @@ class Ili:
# Display a radiolist with the network addressing types
code, chosen_addressing = self._dialog.radiolist(
f'Select addressing type for {interface}',
height=20, width=60, list_height=10,
height=20, width=50, list_height=10,
title='Network Addressing Type',
choices=[
('NONE', 'No configuration', False),
......
......@@ -172,7 +172,7 @@ class IliState:
@property
def install_disks(self):
"""Return the install_disks."""
"""Return the install_disks property."""
return self._install_disks
# Disk usage
......@@ -183,17 +183,17 @@ class IliState:
@property
def supported_diskusage_strategies(self):
"""Return the diskusage_strategy."""
"""Return the diskusage_strategy property."""
return self._supported_diskusage_strategies
@property
def diskusage_strategy(self):
"""Return the diskusage_strategy."""
"""Return the diskusage_strategy property."""
return self._diskusage_strategy
@diskusage_strategy.setter
def diskusage_strategy(self, value: str):
"""Set the diskusage_strategy."""
"""Set the diskusage_strategy property."""
self._diskusage_strategy = value
# Disk layout
......@@ -204,17 +204,17 @@ class IliState:
@property
def supported_disklayout_strategies(self):
"""Return the disklayout_strategies."""
"""Return the disklayout_strategies property."""
return self._supported_disklayout_strategies
@property
def disklayout_strategy(self):
"""Return the disklayout_strategy."""
"""Return the disklayout_strategy property."""
return self._disklayout_strategy
@disklayout_strategy.setter
def disklayout_strategy(self, value: str):
"""Set the disklayout_strategy."""
"""Set the disklayout_strategy property."""
self._disklayout_strategy = value
# Network naming
......@@ -225,72 +225,72 @@ class IliState:
@property
def supported_networknaming_strategies(self):
"""Return the networknaming_strategies."""
"""Return the networknaming_strategies property."""
return self._supported_networknaming_strategies
@property
def networknaming_strategy(self):
"""Return the networknaming_strategy."""
"""Return the networknaming_strategy property."""
return self._networknaming_strategy
@networknaming_strategy.setter
def networknaming_strategy(self, value: str):
"""Set the networknaming_strategy."""
"""Set the networknaming_strategy property."""
self._networknaming_strategy = value
# Root size
@property
def root_size(self):
"""Return the root_size."""
"""Return the root_size property."""
return self._root_size
@root_size.setter
def root_size(self, value: int):
"""Set the root_size."""
"""Set the root_size property."""
self._root_size = value
# Hostname
@property
def hostname(self):
"""Return the hostname."""
"""Return the hostname property."""
return self._hostname
@hostname.setter
def hostname(self, value: str):
"""Set the hostname."""
"""Set the hostname property."""
self._hostname = value
# Locale
@property
def locale(self):
"""Return the locale."""
"""Return the locale property."""
return self._locale
@locale.setter
def locale(self, value: str):
"""Set the locale."""
"""Set the locale property."""
self._locale = value
# Timezone
@property
def timezone(self):
"""Return the timezone."""
"""Return the timezone property."""
return self._timezone
@timezone.setter
def timezone(self, value: str):
"""Set the timezone."""
"""Set the timezone property."""
self._timezone = value
# Mirrorlist
@property
def mirrorlist(self):
"""Return the mirrorlist."""
"""Return the mirrorlist property."""
return self._mirrorlist
@mirrorlist.setter
def mirrorlist(self, value: str):
"""Set the mirrorlist."""
"""Set the mirrorlist property."""
self._mirrorlist = value
# Packages
......@@ -306,17 +306,17 @@ class IliState:
@property
def packages(self):
"""Return the packages."""
"""Return the packages property."""
return self._packages
@packages.setter
def packages(self, value: List[str]):
"""Set the packages."""
"""Set the packages property."""
self._packages = value
@property
def base_packages(self):
"""Return the base packages."""
"""Return the base packages property."""
return self._base_packages
# Install microcode
......@@ -328,32 +328,32 @@ class IliState:
# Users
@property
def root_password(self):
"""Return the root_password."""
"""Return the root_password property."""
return self._root_password
@root_password.setter
def root_password(self, value: str):
"""Set the root_password."""
"""Set the root_password property."""
self._root_password = value
@property
def user_username(self):
"""Return the user_username."""
"""Return the user_username property."""
return self._user_username
@user_username.setter
def user_username(self, value: str):
"""Set the user_username."""
"""Set the user_username property."""
self._user_username = value
@property
def user_password(self):
"""Return the user_password."""
"""Return the user_password property."""
return self._user_password
@user_password.setter
def user_password(self, value: str):
"""Set the user_password."""
"""Set the user_password property."""
self._user_password = value
def add_user_sshkeys(self, sshkey: str):
......@@ -363,12 +363,12 @@ class IliState:
@property
def user_sshkeys(self):
"""Return the user_sshkeys."""
"""Return the user_sshkeys property."""
return self._user_sshkeys
@user_sshkeys.setter
def user_sshkeys(self, value: List[str]):
"""Set the user_sshkeys."""
"""Set the user_sshkeys property."""
self._user_sshkeys = value
# Enable services
......@@ -379,7 +379,7 @@ class IliState:
@property
def enable_services(self):
"""Return the enable_services."""
"""Return the enable_services property."""
return self._enable_services
# Network
......@@ -404,7 +404,7 @@ class IliState:
@network_interface_mappings.setter
def network_interface_mappings(self, value: Dict[str, str]):
"""Set the network_interface_mappings."""
"""Set the network_interface_mappings property."""
self._network_interface_mappings = value
@property
......@@ -523,7 +523,7 @@ class IliState:
@target_root.setter
def target_root(self, value: str):
"""Set the target root."""
"""Set the target_root property."""
self._target_root = value
@property
......@@ -545,12 +545,12 @@ class IliState:
# Output callback
@property
def output_callback(self):
"""Return the output_callback."""
"""Return the output_callback property."""
return self._output_callback
@output_callback.setter
def output_callback(self, value: OutputCallback):
"""Set the output_callback."""
"""Set the output_callback property."""
self._output_callback = value
# Cleanup function
......
......@@ -33,15 +33,15 @@ class Plugin:
"""Plugin __init__ method."""
def get_diskusage_strategies(self, ili_state: IliState):
"""Return a list of disk usage strategies we can provide based on the list of block devices."""
"""Populate state with a list of disk usage strategies we can provide based on the list of block devices."""
raise NotImplementedError
def get_disklayout_strategies(self, ili_state: IliState):
"""Return a list of disk layout strategies we can provide based on the disk usage."""
"""Populate state with a list of disk layout strategies we can provide based on the disk usage."""
raise NotImplementedError
def get_networknaming_strategies(self, ili_state: IliState):
"""Return a list of network naming strategies we can provide based on the disk usage."""
"""Populate state with a list of network naming strategies we can provide based on the disk usage."""
raise NotImplementedError
def commit_diskusage_strategy(self, ili_state: IliState):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment