示例#1
0
文件: info.py 项目: NeCTAR-RC/rally
 def _get_server_provider_info(self, query):
     try:
         server_provider = provider.ProviderFactory.get(query)
         header = "%s (server provider)" % server_provider.get_name()
         info = self._make_header(header)
         info += "\n\n"
         info += utils.format_docstring(server_provider.__doc__)
         return info
     except exceptions.PluginNotFound:
         return None
示例#2
0
文件: info.py 项目: NeCTAR-RC/rally
 def _get_sla_info(self, query):
     try:
         found_sla = sla.SLA.get(query)
         header = "%s (SLA)" % found_sla.get_name()
         info = self._make_header(header)
         info += "\n\n"
         info += utils.format_docstring(found_sla.__doc__) + "\n"
         return info
     except exceptions.PluginNotFound:
         return None
示例#3
0
文件: info.py 项目: NeCTAR-RC/rally
 def _get_deploy_engine_info(self, query):
     try:
         deploy_engine = engine.EngineFactory.get(query)
         header = "%s (deploy engine)" % deploy_engine.get_name()
         info = self._make_header(header)
         info += "\n\n"
         info += utils.format_docstring(deploy_engine.__doc__)
         return info
     except exceptions.PluginNotFound:
         return None
示例#4
0
文件: info.py 项目: akalambu/rally
 def _get_deploy_engine_info(self, query):
     try:
         deploy_engine = deploy.EngineFactory.get_by_name(query)
         header = "%s (deploy engine)" % deploy_engine.__name__
         info = self._make_header(header)
         info += "\n\n"
         info += utils.format_docstring(deploy_engine.__doc__)
         return info
     except exceptions.NoSuchEngine:
         return None
示例#5
0
文件: info.py 项目: akalambu/rally
 def _get_server_provider_info(self, query):
     try:
         server_provider = serverprovider.ProviderFactory.get_by_name(query)
         header = "%s (server provider)" % server_provider.__name__
         info = self._make_header(header)
         info += "\n\n"
         info += utils.format_docstring(server_provider.__doc__)
         return info
     except exceptions.NoSuchVMProvider:
         return None
示例#6
0
文件: info.py 项目: varunarya10/rally
 def _get_server_provider_info(self, query):
     try:
         server_provider = serverprovider.ProviderFactory.get_by_name(query)
         header = "%s (server provider)" % server_provider.__name__
         info = self._make_header(header)
         info += "\n\n"
         info += utils.format_docstring(server_provider.__doc__)
         return info
     except exceptions.NoSuchVMProvider:
         return None
示例#7
0
文件: info.py 项目: akalambu/rally
 def _get_sla_info(self, query):
     try:
         found_sla = sla.SLA.get_by_name(query)
         header = "%s (SLA)" % found_sla.OPTION_NAME
         info = self._make_header(header)
         info += "\n\n"
         info += utils.format_docstring(found_sla.__doc__) + "\n"
         return info
     except exceptions.NoSuchSLA:
         return None
示例#8
0
文件: info.py 项目: varunarya10/rally
 def _get_sla_info(self, query):
     try:
         sla = sla_base.SLA.get_by_name(query)
         header = "%s (SLA)" % sla.OPTION_NAME
         info = self._make_header(header)
         info += "\n\n"
         info += utils.format_docstring(sla.__doc__) + "\n"
         return info
     except exceptions.NoSuchSLA:
         return None
示例#9
0
文件: info.py 项目: varunarya10/rally
 def _get_deploy_engine_info(self, query):
     try:
         deploy_engine = deploy.EngineFactory.get_by_name(query)
         header = "%s (deploy engine)" % deploy_engine.__name__
         info = self._make_header(header)
         info += "\n\n"
         info += utils.format_docstring(deploy_engine.__doc__)
         return info
     except exceptions.NoSuchEngine:
         return None
示例#10
0
文件: info.py 项目: ePlusPS/gbp-rally
 def _get_server_provider_info(self, query):
     try:
         server_provider = provider.ProviderFactory.get(query)
         header = "%s (server provider)" % server_provider.get_name()
         info = self._make_header(header)
         info += "\n\n"
         info += utils.format_docstring(server_provider.__doc__)
         return info
     except exceptions.PluginNotFound:
         return None
示例#11
0
文件: info.py 项目: ePlusPS/gbp-rally
 def _get_deploy_engine_info(self, query):
     try:
         deploy_engine = engine.Engine.get(query)
         header = "%s (deploy engine)" % deploy_engine.get_name()
         info = self._make_header(header)
         info += "\n\n"
         info += utils.format_docstring(deploy_engine.__doc__)
         return info
     except exceptions.PluginNotFound:
         return None
示例#12
0
文件: info.py 项目: ePlusPS/gbp-rally
 def _get_sla_info(self, query):
     try:
         found_sla = sla.SLA.get(query)
         header = "%s (SLA)" % found_sla.get_name()
         info = self._make_header(header)
         info += "\n\n"
         info += utils.format_docstring(found_sla.__doc__) + "\n"
         return info
     except exceptions.PluginNotFound:
         return None
示例#13
0
文件: info.py 项目: go-bears/rally
 def _get_scenario_group_info(self, query):
     try:
         scenario_group = scenario.Scenario.get_by_name(query)
         if not any(scenario.Scenario.is_scenario(scenario_group, m) for m in dir(scenario_group)):
             return None
         info = self._make_header("%s (benchmark scenario group)" % scenario_group.get_name())
         info += "\n\n"
         info += utils.format_docstring(scenario_group.__doc__)
         scenarios = scenario_group.list_benchmark_scenarios()
         descriptions = []
         for scenario_name in scenarios:
             cls, method_name = scenario_name.split(".")
             if hasattr(scenario_group, method_name):
                 scenario_inst = getattr(scenario_group, method_name)
                 doc = utils.parse_docstring(scenario_inst.__doc__)
                 descr = doc["short_description"] or ""
                 descriptions.append((scenario_name, descr))
         info += self._compose_table("Benchmark scenarios", descriptions)
         return info
     except exceptions.NoSuchScenario:
         return None
示例#14
0
 def _get_scenario_group_info(self, query):
     try:
         scenario_group = scenario_base.Scenario.get_by_name(query)
         if not any(scenario_base.Scenario.is_scenario(scenario_group, m)
                    for m in dir(scenario_group)):
             return None
         info = self._make_header("%s (benchmark scenario group)" %
                                  scenario_group.__name__)
         info += "\n\n"
         info += utils.format_docstring(scenario_group.__doc__)
         scenarios = scenario_group.list_benchmark_scenarios()
         descriptions = []
         for scenario_name in scenarios:
             cls, method_name = scenario_name.split(".")
             if hasattr(scenario_group, method_name):
                 scenario = getattr(scenario_group, method_name)
                 doc = utils.parse_docstring(scenario.__doc__)
                 descr = doc["short_description"] or ""
                 descriptions.append((scenario_name, descr))
         info += self._compose_table("Benchmark scenarios", descriptions)
         return info
     except exceptions.NoSuchScenario:
         return None