Merge "ensure_dir: switch to neutron.common.utils"

This commit is contained in:
Jenkins 2015-07-23 08:28:29 +00:00 committed by Gerrit Code Review
commit 83fc4e59a2
2 changed files with 3 additions and 3 deletions

View File

@ -272,7 +272,7 @@ class HaproxyNSDriver(agent_device_driver.AgentDeviceDriver):
confs_dir = os.path.abspath(os.path.normpath(self.state_path))
conf_dir = os.path.join(confs_dir, loadbalancer_id)
if ensure_state_dir:
linux_utils.ensure_dir(conf_dir)
n_utils.ensure_dir(conf_dir)
return os.path.join(conf_dir, kind)
def _plug(self, namespace, port, vip_address, reuse_existing=True):

View File

@ -355,7 +355,7 @@ class TestHaproxyNSDriver(base.BaseTestCase):
ret_val = self.driver.deployable(self.lb)
self.assertTrue(ret_val)
@mock.patch('neutron.agent.linux.utils.ensure_dir')
@mock.patch('neutron.common.utils.ensure_dir')
def test_get_state_file_path(self, ensure_dir):
path = self.driver._get_state_file_path(self.lb.id, 'conf',
ensure_state_dir=False)
@ -410,7 +410,7 @@ class TestHaproxyNSDriver(base.BaseTestCase):
self.vif_driver.unplug.assert_called_once_with(interface_name,
namespace='ns1')
@mock.patch('neutron.agent.linux.utils.ensure_dir')
@mock.patch('neutron.common.utils.ensure_dir')
@mock.patch('neutron_lbaas.services.loadbalancer.drivers.haproxy.'
'jinja_cfg.save_config')
@mock.patch('neutron.agent.linux.ip_lib.IPWrapper')