[virt-tools-list] [virt-manager] [PATCH v2 1/2] cli: Add function cli_flag_name to replace '_' from cli_arg_name with '-'

Lin Ma lma at suse.com
Mon Jan 14 09:21:33 UTC 2019


Signed-off-by: Lin Ma <lma at suse.com>
---
 virtinst/cli.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/virtinst/cli.py b/virtinst/cli.py
index 03b1b8e2..fcf3fee2 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -1198,6 +1198,10 @@ class VirtCLIParser(metaclass=InitClass):
                 None, "clearxml", cb=cls._clearxml_cb, is_onoff=True)]
         cls._virtargs.append(_VirtCLIArgumentStatic(*args, **kwargs))
 
+    @classmethod
+    def cli_flag_name(cls):
+        return "--" + cls.cli_arg_name.replace("_", "-")
+
     @classmethod
     def print_introspection(cls):
         """
-- 
2.19.0




More information about the virt-tools-list mailing list