qa/tasks: update python.py to use template module

The file python.py was making use of subst_vip from vip.py. The more
generic template.py provides the same functionality as subst_vip plus a
better more general templating system.  Replace subst_vip in this file
so that we can remove subst_vip in the future.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2024-03-06 12:13:21 -05:00
parent f87e622265
commit 0b61b1c1ff

View File

@ -1,6 +1,6 @@
import logging
from teuthology import misc as teuthology
from tasks.vip import subst_vip
from tasks import template
log = logging.getLogger(__name__)
@ -41,5 +41,6 @@ def task(ctx, config):
]
if sudo:
args = ['sudo'] + args
remote.run(args=args, stdin=subst_vip(ctx, code))
code = template.transform(ctx, config, code)
remote.run(args=args, stdin=code)