summaryrefslogtreecommitdiffstats
path: root/testsuites/vstf/vstf_scripts/vstf/controller/env_build/env_build.py
diff options
context:
space:
mode:
authorliyin <liyin11@huawei.com>2017-05-08 09:04:32 +0000
committerliyin <liyin11@huawei.com>2017-05-10 11:16:02 +0000
commit6a8257127b3dce1f18a650afe6921a34b6c6f5b8 (patch)
treebfb2d60c1ce3f6688b92e5787818f222d620f52e /testsuites/vstf/vstf_scripts/vstf/controller/env_build/env_build.py
parent2d9642a33a6a58f53aceba4ff3d6242f191f25f0 (diff)
Delete testcase of rubbos and vstf.
JIRA:BOTTLENECK-167 This patch will delete vstf and rubbos testcase code. Include some testcase config file, if there will be someone who want to use this testcase maybe B or C version code will contain those testcase. if you use the D version code to run this two testcase we will info you that: Rubbos testsuite is not updating anymore. This entrance for running Rubbos within Bottlenecks is no longer supported. Change-Id: I04e4042ff3998b3696df2ed47a9ffab6f1620ec3 Signed-off-by: liyin <liyin11@huawei.com>
Diffstat (limited to 'testsuites/vstf/vstf_scripts/vstf/controller/env_build/env_build.py')
-rw-r--r--testsuites/vstf/vstf_scripts/vstf/controller/env_build/env_build.py85
1 files changed, 0 insertions, 85 deletions
diff --git a/testsuites/vstf/vstf_scripts/vstf/controller/env_build/env_build.py b/testsuites/vstf/vstf_scripts/vstf/controller/env_build/env_build.py
deleted file mode 100644
index 40e25e9f..00000000
--- a/testsuites/vstf/vstf_scripts/vstf/controller/env_build/env_build.py
+++ /dev/null
@@ -1,85 +0,0 @@
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-import logging
-
-from vstf.controller.fabricant import Fabricant
-from vstf.rpc_frame_work.rpc_producer import Server
-from vstf.controller.env_build.cfg_intent_parse import IntentParser
-
-LOG = logging.getLogger(__name__)
-
-
-class EnvBuildApi(object):
-
- def __init__(self, conn, config_file):
- LOG.info("welcome to EnvBuilder")
- self.conn = conn
- intent_parser = IntentParser(config_file)
- self.cfg_intent = intent_parser.parse_cfg_file()
-
- def build(self):
- LOG.info("start build")
- for host_cfg in self.cfg_intent['env-build']:
- rpc = Fabricant(host_cfg['ip'], self.conn)
- rpc.build_env(timeout=1800, cfg_intent=host_cfg)
- return True
-
- def clean(self):
- for host_cfg in self.cfg_intent['env-build']:
- rpc = Fabricant(host_cfg['ip'], self.conn)
- rpc.clean_env(timeout=120)
- return True
-
- def get_hosts(self):
- result = []
- for host_cfg in self.cfg_intent['env-build']:
- host = {
- 'name': host_cfg['ip'],
- 'nic': "82599ES 10-Gigabit"
- }
- result.append(host)
- return result
-
-
-class TransmitterBuild(object):
-
- def __init__(self, conn, config_file):
- LOG.info("welcome to TransmitterBuild")
- self.conn = conn
- self._cfg_intent = config_file["transmitter-build"]
-
- def build(self):
- LOG.info("start build")
- for cfg in self.cfg_intent:
- rpc = Fabricant(cfg['ip'], self.conn)
- cfg.setdefault("scheme", 'transmitter')
- rpc.build_env(timeout=1800, cfg_intent=cfg)
- return True
-
- def clean(self):
- for cfg in self.cfg_intent:
- rpc = Fabricant(cfg['ip'], self.conn)
- rpc.clean_env(timeout=10)
- return True
-
-
-if __name__ == "__main__":
- import argparse
-
- parser = argparse.ArgumentParser()
- parser.add_argument(
- '--rpc_server',
- help='rabbitmq server for deliver messages.')
- parser.add_argument('--config', help='config file to parse')
- args = parser.parse_args()
- logging.basicConfig(level=logging.INFO)
- conn = Server(args.rpc_server)
- tn = EnvBuildApi(conn, args.config)
- tn.build()