Skip to content

Commit

Permalink
Revert "Add CLI to configure YANG config validatoin"
Browse files Browse the repository at this point in the history
This reverts commit 2a8c285.
  • Loading branch information
Ubuntu committed Jul 29, 2022
1 parent 11335b2 commit e73b4cb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
15 changes: 0 additions & 15 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1715,21 +1715,6 @@ def synchronous_mode(sync_mode):
else:
raise click.BadParameter("Error: Invalid argument %s, expect either enable or disable" % sync_mode)

#
# 'yang_config_validation' command ('config yang_config_validation ...')
#
@config.command('yang_config_validation')
@click.argument('yang_config_validation', metavar='<enable|disable>', required=True)
def yang_config_validation(yang_config_validation):
# Enable or disable YANG validation on updates to ConfigDB
if yang_config_validation == 'enable' or yang_config_validation == 'disable':
config_db = ConfigDBConnector()
config_db.connect()
config_db.mod_entry('DEVICE_METADATA', 'localhost', {"yang_config_validation": yang_config_validation})
click.echo("""Wrote %s yang config validation into CONFIG_DB""" % yang_config_validation)
else:
raise click.BadParameter("Error: Invalid argument %s, expect either enable or disable" % yang_config_validation)

#
# 'portchannel' group ('config portchannel ...')
#
Expand Down
33 changes: 0 additions & 33 deletions tests/yang_config_validation_test.py

This file was deleted.

0 comments on commit e73b4cb

Please sign in to comment.