diff --git a/nova/virt/zvm/dist.py b/nova/virt/zvm/dist.py index 440bf91..f50bbef 100644 --- a/nova/virt/zvm/dist.py +++ b/nova/virt/zvm/dist.py @@ -116,13 +116,12 @@ class LinuxDist(object): """Get network file configuration path.""" pass - @abc.abstractmethod def get_change_passwd_command(self, admin_password): """construct change password command :admin_password: the password to be changed to """ - pass + return "echo 'root:%s' | chpasswd" % admin_password @abc.abstractmethod def _get_cfg_str(self, device, broadcast_v4, gateway_v4, ip_v4, @@ -187,9 +186,6 @@ class rhel(LinuxDist): def _get_network_file_path(self): return '/etc/sysconfig/network-scripts/' - def get_change_passwd_command(self, admin_password): - return 'echo %s|passwd --stdin root' % admin_password - def _get_cfg_str(self, device, broadcast_v4, gateway_v4, ip_v4, netmask_v4, address_read, subchannels): cfg_str = 'DEVICE=\"' + device + '\"\n' @@ -400,9 +396,6 @@ class sles11(sles): 'service network restart', 'cio_ignore -u')) - def get_change_passwd_command(self, admin_password): - return 'echo %s|passwd --stdin root' % admin_password - class sles12(sles): def get_znetconfig_contents(self): @@ -417,9 +410,6 @@ class sles12(sles): 'znetconf -A', 'cio_ignore -u')) - def get_change_passwd_command(self, admin_password): - return "echo 'root:%s' | chpasswd" % admin_password - def get_scp_string(self, root, fcp, wwpn, lun): return ("=root=%(root)s zfcp.allow_lun_scan=0 " "zfcp.device=0.0.%(fcp)s,0x%(wwpn)s,0x%(lun)s") % { @@ -556,9 +546,7 @@ class ubuntu(LinuxDist): class ubuntu16(ubuntu): - - def get_change_passwd_command(self, admin_password): - return "echo 'root:%s' | chpasswd" % admin_password + pass class ListDistManager(object):