Skip to content

Instantly share code, notes, and snippets.

@marcoemorais
Created May 28, 2014 05:39
Show Gist options
  • Save marcoemorais/3c15c9e190960ca1fb68 to your computer and use it in GitHub Desktop.
Save marcoemorais/3c15c9e190960ca1fb68 to your computer and use it in GitHub Desktop.
191 def run(self, name, context, args):
192 cls_name, method_name = name.split(".", 1)
193 cls = base.Scenario.get_by_name(cls_name)
194
195 scenario_context = copy.deepcopy(getattr(cls, method_name).context)
196 # TODO(boris-42): We should keep default behavior for `users` context
197 # as a part of work on pre-created users this should be
198 # removed.
199 scenario_context.setdefault("users", {})
200 # merge scenario context and task context configuration
201 scenario_context.update(context)
202
203 context_obj = {
204 "task": self.task,
205 "admin": {"endpoint": self.admin_user},
206 "scenario_name": name,
207 "config": scenario_context
208 }
209
210 -> args = cls.preprocess(method_name, context_obj, args)
211 results = base_ctx.ContextManager.run(context_obj, self._run_scenario,
212 cls, method_name, context_obj,
213 args)
214
(Pdb) p len(self.endpoints)
1
(Pdb) p self.endpoints[0]
<rally.objects.endpoint.Endpoint object at 0x3b2b6d0>
(Pdb) p self.endpoints[0].to_dict()
{'username': u'admin', 'use_public_urls': False, 'region_name': None, 'tenant_name': u'demo', 'admin_port': 35357, 'auth_url': u'http://unskilledgrilled.corp.gq1.yahoo.com:5000/v2.0/', 'password': u'nomoresecrete'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment