summaryrefslogtreecommitdiffstats
path: root/mcp
AgeCommit message (Expand)AuthorFilesLines
2017-10-03ci/deploy.sh: Move global vars to separate fileAlexandru Avadanii2-0/+23
2017-10-03Identify jump host bridges based on IDF / PDF netsAlexandru Avadanii10-27/+61
2017-10-03Apply neutron formula patch after formula updateMichael Polenchuk3-1/+2
2017-10-03salt.sh: Stick to older salt-formula-neutronAlexandru Avadanii1-0/+4
2017-10-02Align salt version & reposMichael Polenchuk33-33/+3
2017-10-02[virtual] Reset mtu for compute management bridgeMichael Polenchuk1-1/+0
2017-09-28MaaS: Fix missing service.maas.cluster.single incAlexandru Avadanii3-0/+3
2017-09-27pharos git submodule: Bump for latest PDF adapterAlexandru Avadanii1-0/+0
2017-09-27Merge "PDF parsing support"Alexandru Avadanii6-96/+329
2017-09-27Merge "lib.sh: Use host bridge in favor of virsh network"Alexandru Avadanii1-4/+5
2017-09-27PDF parsing supportAlexandru Avadanii6-96/+329
2017-09-27Change vlan tag of lf-pod private networkMichael Polenchuk1-1/+1
2017-09-26lib.sh: Use host bridge in favor of virsh networkAlexandru Avadanii1-4/+5
2017-09-26Merge "Extended PDF support to all baremetal scenarios"Alexandru Avadanii13-179/+175
2017-09-26[virtual] Switch compute nodes to uca repoMichael Polenchuk4-18/+13
2017-09-26Extended PDF support to all baremetal scenariosGuillermo Herrero13-179/+175
2017-09-26patches: Fix context for linux/map.jinjaAlexandru Avadanii1-2/+1
2017-09-25Merge "states: maas: Dynamic node count in stop condition"Alexandru Avadanii1-1/+4
2017-09-25Merge "Fix or silence all yamllint warnings"Alexandru Avadanii100-1170/+1288
2017-09-25Run packages upgrade on openstack nodes onlyMichael Polenchuk2-4/+3
2017-09-25Fix or silence all yamllint warningsAlexandru Avadanii100-1170/+1288
2017-09-24states: maas: Dynamic node count in stop conditionMichael Polenchuk1-1/+4
2017-09-23Merge "MaaS: Reduce C/D timeouts, minor fixes"Alexandru Avadanii4-3/+50
2017-09-23MaaS: Reduce C/D timeouts, minor fixesAlexandru Avadanii4-3/+50
2017-09-23Workaround VCP minions timeout post pkg.upgradeAlexandru Avadanii1-2/+4
2017-09-23reclass: Drop MaaS public IP and interfaceAlexandru Avadanii8-34/+2
2017-09-23reclass: pod_config: Revert MaaS IPs to .3Alexandru Avadanii1-3/+3
2017-09-22states: maas: Add 30s delay in re-deploy attemptAlexandru Avadanii1-0/+2
2017-09-22Merge "Adjust memory allocation size"Alexandru Avadanii12-9/+42
2017-09-22Adjust memory allocation size-9/+42
2017-09-21Pod Descriptor File compatible reclass structureGuillermo Herrero13-114/+206
2017-09-21[virtual] Alter haproxy entry type of odl rest apiMichael Polenchuk1-3/+3
2017-09-15[ovs/dpdk] Fix location of libvirtd configMichael Polenchuk2-0/+2
2017-09-14Merge "Tune up mysql options"Alexandru Avadanii4-0/+13
2017-09-14[baremetal] Switch from 1Gb to 2Mb hugepagesMichael Polenchuk1-3/+3
2017-09-14Tune up mysql optionsMichael Polenchuk4-0/+13
2017-09-13Merge "[virtual] Setup nfs for nova instances"Alexandru Avadanii4-1/+27
2017-09-13Merge "[virtual] Add haproxy entries for opendaylight"Alexandru Avadanii1-0/+25
2017-09-13[baremetal] Setup glusterfs for nova instancesMichael Polenchuk7-1/+79
2017-09-13[virtual] Add haproxy entries for opendaylightMichael Polenchuk1-0/+25
2017-09-13[virtual] Setup nfs for nova instancesMichael Polenchuk4-1/+27
2017-09-12Merge "salt-master-init.sh: Use stable 2016.11 salt ver"Alexandru Avadanii2-6/+4
2017-09-12Add proxy entries for opendaylight endpointsMichael Polenchuk1-0/+27
2017-09-12reclass, states: Parametrize runtime configurationAlexandru Avadanii16-32/+62
2017-09-12salt-master-init.sh: Use stable 2016.11 salt verAlexandru Avadanii2-6/+4
2017-09-11salt master, maas: Move mcpcontrol to 10.20.0.0/24Alexandru Avadanii7-8/+9
2017-09-11Merge changes from topic 'multiarch-image-defaults'Alexandru Avadanii20-17/+79
2017-09-11reclass: virtual: Factor out VM interface namingAlexandru Avadanii8-14/+40
2017-09-11reclass: Multiarch support for arch specific paramAlexandru Avadanii14-3/+39
2017-09-11README files: Convert from markdown to RSTAlexandru Avadanii2-56/+95
"s1">', '')) f_stdout.write(line) p.wait() f_stdout.close() f_env.close() def parse_refstack_result(self): try: with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR, "refstack.log"), 'r') as logfile: output = logfile.read() for match in re.findall("Ran: (\d+) tests in (\d+\.\d{4}) sec.", output): num_tests = match[0] logger.info("Ran: %s tests in %s sec." % (num_tests, match[1])) for match in re.findall("(- Passed: )(\d+)", output): num_success = match[1] logger.info("".join(match)) for match in re.findall("(- Skipped: )(\d+)", output): num_skipped = match[1] logger.info("".join(match)) for match in re.findall("(- Failed: )(\d+)", output): num_failures = match[1] logger.info("".join(match)) success_testcases = "" for match in re.findall(r"\{0\}(.*?)[. ]*ok", output): success_testcases += match + ", " failed_testcases = "" for match in re.findall(r"\{0\}(.*?)[. ]*FAILED", output): failed_testcases += match + ", " skipped_testcases = "" for match in re.findall(r"\{0\}(.*?)[. ]*SKIPPED:", output): skipped_testcases += match + ", " num_executed = int(num_tests) - int(num_skipped) try: self.result = 100 * int(num_success) / int(num_executed) except ZeroDivisionError: logger.error("No test has been executed") self.details = {"tests": int(num_tests), "failures": int(num_failures), "success": success_testcases, "errors": failed_testcases, "skipped": skipped_testcases} except Exception: self.result = 0 logger.info("Testcase %s success_rate is %s%%" % (self.case_name, self.result)) def run(self): '''used for functest command line, functest testcase run refstack_defcore''' self.start_time = time.time() if not os.path.exists(conf_utils.REFSTACK_RESULTS_DIR): os.makedirs(conf_utils.REFSTACK_RESULTS_DIR) try: tempestconf = TempestConf() tempestconf.generate_tempestconf() self.source_venv() self.run_defcore_default() self.parse_refstack_result() res = testcase.TestCase.EX_OK except Exception as e: logger.error('Error with run: %s', e) res = testcase.TestCase.EX_RUN_ERROR self.stop_time = time.time() return res def _prep_test(self): '''Check that the config file exists.''' if not os.path.isfile(self.confpath): logger.error("Conf file not valid: %s" % self.confpath) if not os.path.isfile(self.testlist): logger.error("testlist file not valid: %s" % self.testlist) def main(self, **kwargs): '''used for manually running, python refstack_client.py -c <tempest_conf_path> --testlist <testlist_path> can generate a reference refstack_tempest.conf by python tempest_conf.py ''' try: self.confpath = kwargs['config'] self.testlist = kwargs['testlist'] except KeyError as e: logger.error("Cannot run refstack client. Please check " "%s", e) return self.EX_RUN_ERROR try: self.source_venv() self._prep_test() self.run_defcore(self.confpath, self.testlist) res = testcase.TestCase.EX_OK except Exception as e: logger.error('Error with run: %s', e) res = testcase.TestCase.EX_RUN_ERROR return res class RefstackClientParser(object): def __init__(self): self.FUNCTEST_TEST = CONST.__getattribute__('dir_functest_test') self.CONF_PATH = CONST.__getattribute__('refstack_tempest_conf_path') self.DEFCORE_LIST = CONST.__getattribute__('refstack_defcore_list') self.confpath = os.path.join(self.FUNCTEST_TEST, self.CONF_PATH) self.defcorelist = os.path.join(self.FUNCTEST_TEST, self.DEFCORE_LIST) self.parser = argparse.ArgumentParser() self.parser.add_argument( '-c', '--config', help='the file path of refstack_tempest.conf', default=self.confpath) self.parser.add_argument( '-t', '--testlist', help='Specify the file path or URL of a test list text file. ' 'This test list will contain specific test cases that ' 'should be tested.', default=self.defcorelist) def parse_args(self, argv=[]): return vars(self.parser.parse_args(argv)) if __name__ == '__main__': logging.basicConfig() refstackclient = RefstackClient() parser = RefstackClientParser() args = parser.parse_args(sys.argv[1:]) try: result = refstackclient.main(**args) if result != testcase.TestCase.EX_OK: sys.exit(result) except Exception: sys.exit(testcase.TestCase.EX_RUN_ERROR)