Skip to content

Commit aa2d39c

Browse files
tahmed-devabdosi
authored andcommitted
[cfggen] Allow Write To Redis DB With Template/Batch Mode (#5203)
Argument to write to config-db is not allowed when using template. This PR allows cfggen to write to redis db when using template mode. signed-off-by: Tamer Ahmed <[email protected]>
1 parent b61621c commit aa2d39c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sonic-config-engine/sonic-cfggen

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,10 @@ def main():
265265
parser.add_argument("-T", "--template_dir", help="search base for the template files", action='store')
266266
group.add_argument("-v", "--var", help="print the value of a variable, support jinja2 expression")
267267
group.add_argument("--var-json", help="print the value of a variable, in json format")
268-
group.add_argument("-w", "--write-to-db", help="write config into configdb", action='store_true')
269268
group.add_argument("--preset", help="generate sample configuration from a preset template", choices=get_available_config())
270269
group = parser.add_mutually_exclusive_group()
271270
group.add_argument("--print-data", help="print all data", action='store_true')
271+
group.add_argument("-w", "--write-to-db", help="write config into configdb", action='store_true')
272272
group.add_argument("-K", "--key", help="Lookup for a specific key")
273273
args = parser.parse_args()
274274

0 commit comments

Comments
 (0)