Exemple #1
0
 def eject(self):
     cmdline =  "ip netns exec %s ip link set dev %s up"  \
         % (self._netns, self._interface)
     LOG.debug('set dev %s up in %s' \
                   % (self._interface, self._netns))
     subprocess_compat.check_output(cmdline.split())
     # Check the zk host actually went up and in quorum
     check_zookeeper_host(self._ip, alive=True)
Exemple #2
0
 def inject(self):
     cmdline =  "ip netns exec %s ip link set dev %s down"  \
         % (self._netns, self._interface)
     LOG.debug('set dev %s down in %s' \
                   % (self._interface, self._netns))
     subprocess_compat.check_output(cmdline.split())
     # check the zk host actually went down
     check_zookeeper_host(self._ip, alive=False)