From 544ac8182471a0552b8a22fd574029e74a30d8ed Mon Sep 17 00:00:00 2001 From: Jim MacArthur Date: Wed, 21 Jan 2015 18:08:01 +0000 Subject: Remove checks for NETWORK_CONFIG and eth0 and eth1 in it network_config isn't used anywhere in this function. The purpose of this function (getting the name of an appropriate host-only network interface) doesn't seem to depend on it either. eth0 and eth1 won't always be present (several Baserock systems will have enp0s3, etc). So I think these checks should be removed. --- virtualbox-ssh.write | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/virtualbox-ssh.write b/virtualbox-ssh.write index 1b4de89c..fa54c296 100755 --- a/virtualbox-ssh.write +++ b/virtualbox-ssh.write @@ -169,20 +169,6 @@ class VirtualBoxPlusSshWriteExtension(morphlib.writeexts.WriteExtension): def get_host_interface(self, ssh_host): host_ipaddr = os.environ.get('HOST_IPADDR') netmask = os.environ.get('NETMASK') - network_config = os.environ.get("NETWORK_CONFIG") - - if network_config is None: - raise cliapp.AppException('NETWORK_CONFIG was not given') - - if "eth0:" not in network_config: - raise cliapp.AppException( - 'NETWORK_CONFIG does not contain ' - 'the eth0 configuration') - - if "eth1:" not in network_config: - raise cliapp.AppException( - 'NETWORK_CONFIG does not contain ' - 'the eth1 configuration') if host_ipaddr is None: raise cliapp.AppException('HOST_IPADDR was not given') -- cgit v1.2.1