Merge "Improve ipv6 configuration"

This commit is contained in:
Zuul 2019-05-29 21:45:15 +00:00 committed by Gerrit Code Review
commit 4968958158
1 changed files with 3 additions and 2 deletions

View File

@ -166,9 +166,10 @@ class TestGettingAddress(manager.NetworkScenarioTest):
if self._sysconfig_network_scripts_dir_exists(ssh): if self._sysconfig_network_scripts_dir_exists(ssh):
try: try:
ssh.exec_command( ssh.exec_command(
'echo -e "DEVICE=%(nic)s\\nIPV6INIT=yes" | ' 'echo -e "DEVICE=%(nic)s\\nNAME=%(nic)s\\nIPV6INIT=yes" | '
'sudo tee /etc/sysconfig/network-scripts/ifcfg-%(nic)s; ' 'sudo tee /etc/sysconfig/network-scripts/ifcfg-%(nic)s; '
'sudo /sbin/service network restart' % {'nic': nic}) 'sudo nmcli connection reload' % {'nic': nic})
ssh.exec_command('sudo nmcli connection up %s' % nic)
except exceptions.SSHExecCommandFailed as e: except exceptions.SSHExecCommandFailed as e:
# NOTE(slaweq): Sometimes it can happen that this SSH command # NOTE(slaweq): Sometimes it can happen that this SSH command
# will fail because of some error from network manager in # will fail because of some error from network manager in