Repository: sonic-net/sonic-utilities

Issue:
config reload/load_minigraph fails with AttributeError: 'Group' object has no attribute 'syslog'
**Description**
config reload/load_minigraph fails with AttributeError: 'Group' object has no attribute 'syslog'

**Steps to reproduce the issue**
1. config load_minigraph -y
2. config reload -y

**Describe the results you received**
```bash
root@sonic:/home/admin# config load_minigraph -y
Traceback (most recent call last):
  File "/usr/bin/config", line 12, in <module>
    sys.exit(config())
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/config/main.py", line 478, in load_minigraph
    log_info("sdfsdfsdf")
  File "/usr/lib/python2.7/dist-packages/config/main.py", line 37, in log_info
    syslog.openlog(SYSLOG_IDENTIFIER)
AttributeError: 'Group' object has no attribute 'openlog'
```

**Describe the results you expected**
```bash
root@sonic:/home/admin# config load_minigraph -y
Stopping service swss ...
Stopping service lldp ...
Stopping service pmon ...
Stopping service bgp ...
Stopping service hostcfgd ...
Running command: /usr/local/bin/sonic-cfggen -H -m -j /etc/sonic/init_cfg.json --write-to-db
Running command: pfcwd start_default
Running command: config qos reload
Running command: /usr/local/bin/sonic-cfggen -d -t /usr/share/sonic/device/x86_64-mlnx_msn3700c-r0/ACS-MSN3700C/buffers.json.j2 >/tmp/buffers.json
Running command: /usr/local/bin/sonic-cfggen -d -t /usr/share/sonic/device/x86_64-mlnx_msn3700c-r0/ACS-MSN3700C/qos.json.j2 -y /etc/sonic/sonic_version.yml >/tmp/qos.json
Running command: /usr/local/bin/sonic-cfggen -j /tmp/buffers.json --write-to-db
Running command: /usr/local/bin/sonic-cfggen -j /tmp/qos.json --write-to-db

Restarting service hostname-config ...
Restarting service interfaces-config ...
Restarting service ntp-config ...
Restarting service rsyslog-config ...
Restarting service swss ...
Restarting service bgp ...
Restarting service pmon ...
Restarting service lldp ...
Restarting service hostcfgd ...
Please note setting loaded from minigraph will be lost after system reboot. To preserve setting, run `config save`.
```

**Additional information you deem important (e.g. issue happens only occasionally)**
The issue is caused by this PR: https://github.com/Azure/sonic-utilities/pull/609

**Output of `show version`**
```bash
SONiC Software Version: SONiC.HEAD.785-d47ec526
Distribution: Debian 9.10
Kernel: 4.9.0-9-2-amd64
Build commit: d47ec526
Build date: Sun Sep  8 06:49:17 UTC 2019
Built by: johnar@jenkins-worker-7
```


Discussion:

Resolving patch:
diff --git a/config/main.py b/config/main.py
--- a/config/main.py
+++ b/config/main.py
@@ -1358,16 +1358,16 @@ def naming_mode_alias():
 #
 # 'syslog' group ('config syslog ...')
 #
-@config.group()
+@config.group('syslog')
 @click.pass_context
-def syslog(ctx):
+def syslog_group(ctx):
     """Syslog server configuration tasks"""
     config_db = ConfigDBConnector()
     config_db.connect()
     ctx.obj = {'db': config_db}
     pass
 
-@syslog.command('add')
+@syslog_group.command('add')
 @click.argument('syslog_ip_address', metavar='<syslog_ip_address>', required=True)
 @click.pass_context
 def add_syslog_server(ctx, syslog_ip_address):
@@ -1379,7 +1379,7 @@ def add_syslog_server(ctx, syslog_ip_address):
     if syslog_ip_address in syslog_servers:
         click.echo("Syslog server {} is already configured".format(syslog_ip_address))
         return
-    else: 
+    else:
         db.set_entry('SYSLOG_SERVER', syslog_ip_address, {'NULL': 'NULL'})
         click.echo("Syslog server {} added to configuration".format(syslog_ip_address))
         try:
@@ -1388,7 +1388,7 @@ def add_syslog_server(ctx, syslog_ip_address):
         except SystemExit as e:
             ctx.fail("Restart service rsyslog-config failed with error {}".format(e))
 
-@syslog.command('del')
+@syslog_group.command('del')
 @click.argument('syslog_ip_address', metavar='<syslog_ip_address>', required=True)
 @click.pass_context
 def del_syslog_server(ctx, syslog_ip_address):
@@ -1400,7 +1400,7 @@ def del_syslog_server(ctx, syslog_ip_address):
     if syslog_ip_address in syslog_servers:
         db.set_entry('SYSLOG_SERVER', '{}'.format(syslog_ip_address), None)
         click.echo("Syslog server {} removed from configuration".format(syslog_ip_address))
-    else: 
+    else:
         ctx.fail("Syslog server {} is not configured.".format(syslog_ip_address))
     try:
         click.echo("Restarting rsyslog-config service...")


Test patch: