delete unused function

Change-Id: I937b40f2900a808aca0dc5b932bfa7531a0dcb3b
This commit is contained in:
zhouya 2017-08-07 11:11:06 +08:00
parent f142635636
commit 1fa5eb8db3
4 changed files with 7 additions and 11 deletions

View File

@ -14,7 +14,7 @@
# under the License.
"""
/install endpoint for tecs API
install endpoint for daisy API
"""
import os
import subprocess

View File

@ -583,7 +583,7 @@ class KOLLAInstallTask(Thread):
self.cluster_id,
mgnt_ip)
t_net = threading.Thread(target=api_cmn.config_network_new,
t_net = threading.Thread(target=api_cmn.config_network,
args=(ssh_host_info, 'kolla'))
t_net.setDaemon(True)
t_net.start()
@ -596,7 +596,6 @@ class KOLLAInstallTask(Thread):
except:
LOG.error("join config network "
"thread %s failed!" % t_net)
#api_cmn.config_network_new(ssh_host_info, 'kolla')
time.sleep(20)

View File

@ -71,7 +71,8 @@ def _valid_appointed_network_range(req, network_meta,
value_min = int(value_min)
value_max = int(value_max)
if not is_value_in_range(value_min, value_max, check_range):
msg = "%s:%d and %s:%d must be in %d~%d and start:%d less than end:%d" \
msg = "%s:%d and %s:%d must be in %d~%d " \
"and start:%d less than end:%d" \
% (key_start, value_min, key_end, value_max,
check_range[0], check_range[1], value_min, value_max)
LOG.error(msg)
@ -291,7 +292,7 @@ def remote_execute_script(ssh_host_info,
raise exc.HTTPBadRequest(explanation=msg)
def config_network_new(ssh_host_info, backend, json_file=None):
def config_network(ssh_host_info, backend, json_file=None):
remote_dir = '/home/'
daisy_script_name = 'daisy.py'
linux_action_name = 'linux_action.sh'
@ -317,7 +318,3 @@ def config_network_new(ssh_host_info, backend, json_file=None):
except Exception:
msg = "Wait network restart..."
LOG.info(msg)
def config_network(ssh_host_info, json_file=None):
config_network_new(ssh_host_info, 'tecs', json_file)

View File

@ -497,7 +497,7 @@ class TestInstall(test.TestCase):
@mock.patch('daisy.api.backends.kolla.common.check_and_get_kolla_version')
@mock.patch("daisy.registry.client.v1.api.get_cluster_metadata")
@mock.patch('daisy.api.backends.kolla.common._get_local_ip')
@mock.patch('daisy.api.common.config_network_new')
@mock.patch('daisy.api.common.config_network')
@mock.patch('daisy.registry.client.v1.client.RegistryClient.do_request')
@mock.patch('daisy.api.backends.kolla.install.update_progress_to_db')
@mock.patch('daisy.api.backends.kolla.install.update_host_progress_to_db')
@ -525,7 +525,7 @@ class TestInstall(test.TestCase):
mock_do_get_host_detail, mock_do_get_assigned_network,
mock_do_update_all_host_progress_to_db, mock_do_config_nodes_hosts,
mock_do_update_host_progress_to_db, mock_do_update_progress_to_db,
mock_do_request, mock_do_config_network_new,
mock_do_request, mock_do_config_network,
mock_do_get_local_ip, mock_do_get_clusters_detail,
mock_do_check_and_get_kolla_version,
mock_do_version_load_mcast, mock_do_version_load,