aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/cmd/commands/env.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/cmd/commands/env.py')
-rw-r--r--yardstick/cmd/commands/env.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/yardstick/cmd/commands/env.py b/yardstick/cmd/commands/env.py
index ed46b84c4..098379ae1 100644
--- a/yardstick/cmd/commands/env.py
+++ b/yardstick/cmd/commands/env.py
@@ -6,17 +6,34 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+import logging
+
from yardstick.common.httpClient import HttpClient
+from yardstick.common import constants
+
+logger = logging.getLogger(__name__)
+logger.setLevel(logging.DEBUG)
class EnvCommand(object):
+ '''
+ Set of commands to prepare environment
+ '''
def do_influxdb(self, args):
- url = 'http://localhost:5000/yardstick/env/action'
+ url = constants.YARDSTICK_ENV_ACTION_API
data = {'action': 'createInfluxDBContainer'}
HttpClient().post(url, data)
+ logger.debug('Now creating and configing influxdb')
def do_grafana(self, args):
- url = 'http://localhost:5000/yardstick/env/action'
+ url = constants.YARDSTICK_ENV_ACTION_API
data = {'action': 'createGrafanaContainer'}
HttpClient().post(url, data)
+ logger.debug('Now creating and configing grafana')
+
+ def do_prepare(self, args):
+ url = constants.YARDSTICK_ENV_ACTION_API
+ data = {'action': 'prepareYardstickEnv'}
+ HttpClient().post(url, data)
+ logger.debug('Now preparing environment')