X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=testsuites%2Fvstf%2Fvstf_scripts%2Fvstf%2Fcontroller%2Freporters%2Freport%2Fhtml%2Fhtml_base.py;fp=testsuites%2Fvstf%2Fvstf_scripts%2Fvstf%2Fcontroller%2Freporters%2Freport%2Fhtml%2Fhtml_base.py;h=0000000000000000000000000000000000000000;hb=fb9e1a726d3a598494fd38330848ef676219a47a;hp=02606b4ba64685c72865a382144d86796bf166ac;hpb=6dff90faee27dc5569255f5cb6ba72ae5e22b924;p=bottlenecks.git diff --git a/testsuites/vstf/vstf_scripts/vstf/controller/reporters/report/html/html_base.py b/testsuites/vstf/vstf_scripts/vstf/controller/reporters/report/html/html_base.py deleted file mode 100644 index 02606b4b..00000000 --- a/testsuites/vstf/vstf_scripts/vstf/controller/reporters/report/html/html_base.py +++ /dev/null @@ -1,44 +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 os -import vstf.common.pyhtml as pyhtm - - -class HtmlBase(object): - - def __init__(self, provider): - self._page = pyhtm.PyHtml('Html Text') - self._provider = provider - - def save(self, ofile): - if ofile: - os.system('rm -rf %s' % ofile) - self._page.output(ofile) - - def as_string(self): - return self._page.as_string() - - def add_table(self, data): - if data and zip(*data): - self._page.add_table(data) - - def add_style(self): - style = self._provider.get_style - self._page.add_style(style) - - def create(self, ofile='text.html'): - self.add_style() - self.create_story() - self.save(ofile) - return self.as_string() - - def create_story(self): - raise NotImplementedError("abstract HtmlBase")