Skip to content

Commit

Permalink
virsh: align same usage for emulatorpin
Browse files Browse the repository at this point in the history
Usually the options value should be started with --. The old codes added '--' in this
utility function which is not suitable. We expect the client provides like '--config'
to invoke this function as other functions do.

Signed-off-by: Dan Zheng <[email protected]>
  • Loading branch information
dzhengfy committed Jul 18, 2023
1 parent e20d6f4 commit 8bf212f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions virttest/virsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -3461,7 +3461,7 @@ def numatune(name, mode=None, nodeset=None, options=None, **dargs):
"""
cmd = "numatune %s" % name
if options:
cmd += " --%s" % options
cmd += " %s" % options
if mode:
cmd += " --mode %s" % mode
if nodeset:
Expand Down Expand Up @@ -3925,13 +3925,13 @@ def emulatorpin(name, cpulist=None, options=None, **dargs):
Control or query domain emulator affinity
:param name: name of domain
:param cpulist: a list of physical CPU numbers
:param options: options may be live, config and current
:param options: options may be --live, --config and --current
:param dargs: standardized virsh function API keywords
:return: CmdResult instance
"""
cmd = "emulatorpin %s" % name
if options:
cmd += " --%s" % options
cmd += " %s" % options
if cpulist:
cmd += " --cpulist %s" % cpulist

Expand Down

0 comments on commit 8bf212f

Please sign in to comment.