Skip to content

Commit

Permalink
qa/tests: Fix mapped_role attribute where it gets overwritten for sub…
Browse files Browse the repository at this point in the history
…sequent calls.

Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
  • Loading branch information
vasukulkarni committed Dec 2, 2017
1 parent b8a0cce commit 30186d2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions qa/tasks/ceph_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,13 @@ def get_nodes_using_role(ctx, target_role):
modified_remotes[_remote].append(svc_id)

ctx.cluster.remotes = modified_remotes
ctx.cluster.mapped_role = ceph_deploy_mapped

# since the function is called multiple times for target roles
# append new mapped roles
if not hasattr(ctx.cluster, 'mapped_role'):
ctx.cluster.mapped_role = ceph_deploy_mapped
else:
ctx.cluster.mapped_role.update(ceph_deploy_mapped)
log.info("New mapped_role={mr}".format(mr=ctx.cluster.mapped_role))
return nodes_of_interest


Expand Down

0 comments on commit 30186d2

Please sign in to comment.