X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fcmd%2Fcommands%2Fenv.py;h=dbef303b0fa1d82a4d4a4285af128f76dcf95f87;hb=6d7314e986c6359b59198d155a7baa31891e888f;hp=d0fc75dd3681b29ce43109c0614fb302cd8832e1;hpb=9a02ad7f3b9b7eac2bdc226554ca2efba752ad0d;p=yardstick.git diff --git a/yardstick/cmd/commands/env.py b/yardstick/cmd/commands/env.py index d0fc75dd3..dbef303b0 100644 --- a/yardstick/cmd/commands/env.py +++ b/yardstick/cmd/commands/env.py @@ -6,36 +6,41 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +from __future__ import absolute_import from __future__ import print_function -import time + import os import sys +import time + +from six.moves import range -from yardstick.common.httpClient import HttpClient from yardstick.common import constants as consts +from yardstick.common.httpClient import HttpClient class EnvCommand(object): - ''' + """ Set of commands to prepare environment - ''' + """ + def do_influxdb(self, args): - data = {'action': 'createInfluxDBContainer'} + data = {'action': 'create_influxdb'} task_id = self._start_async_task(data) start = '* creating influxDB' self._check_status(task_id, start) def do_grafana(self, args): - data = {'action': 'createGrafanaContainer'} + data = {'action': 'create_grafana'} task_id = self._start_async_task(data) start = '* creating grafana' self._check_status(task_id, start) def do_prepare(self, args): - data = {'action': 'prepareYardstickEnv'} + data = {'action': 'prepare_env'} task_id = self._start_async_task(data) start = '* preparing yardstick environment' @@ -52,7 +57,7 @@ class EnvCommand(object): CHECK_STATUS_RETRY = 20 CHECK_STATUS_DELAY = 5 - for retry in xrange(CHECK_STATUS_RETRY): + for retry in range(CHECK_STATUS_RETRY): response = HttpClient().get(url) status = response['status']