Commit 6f0b106 ecsonic
committed
1 parent 8f5cc80 commit 6f0b106 Copy full SHA for 6f0b106
File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -5432,17 +5432,15 @@ def vrf(ctx):
5432
5432
config_db .connect ()
5433
5433
ctx .obj = {}
5434
5434
ctx .obj ['config_db' ] = config_db
5435
- state_db = SonicV2Connector (host = '127.0.0.1' )
5436
- state_db .connect (state_db .STATE_DB , False )
5437
- ctx .obj ['state_db' ] = state_db
5438
5435
5439
5436
@vrf .command ('add' )
5440
5437
@click .argument ('vrf_name' , metavar = '<vrf_name>' , required = True )
5441
5438
@click .pass_context
5442
5439
def add_vrf (ctx , vrf_name ):
5443
5440
"""Add vrf"""
5444
5441
config_db = ValidatedConfigDBConnector (ctx .obj ['config_db' ])
5445
- state_db = ctx .obj ['state_db' ]
5442
+ state_db = SonicV2Connector (host = '127.0.0.1' )
5443
+ state_db .connect (state_db .STATE_DB , False )
5446
5444
5447
5445
if not vrf_name .startswith ("Vrf" ) and not (vrf_name == 'mgmt' ) and not (vrf_name == 'management' ):
5448
5446
ctx .fail ("'vrf_name' must begin with 'Vrf' or named 'mgmt'/'management' in case of ManagementVRF." )
You can’t perform that action at this time.
0 commit comments