Fix BGP Auth setting for control nodes

Also fix salt cmd output, "key_type" and "key" were messed up.

Change-Id: Idf6d93b0693a2d7fef348aa8684e8119477e83ad
Closes-Prod: PROD-33436
diff --git a/_modules/contrail.py b/_modules/contrail.py
index 2541ad9..be7c13d 100644
--- a/_modules/contrail.py
+++ b/_modules/contrail.py
@@ -1064,13 +1064,14 @@
         vendor = 'contrail'
     elif type == 'router':
         vendor = 'mx'
-        if key_type == 'md5':
-            key_id = 0
-            key_items = AuthenticationKeyItem(key_id, key)
-            bgp_auth_data = AuthenticationData(key_type, [key_items])
     else:
         vendor = 'unknown'
 
+    if key_type == 'md5':
+        key_id = 0
+        key_items = AuthenticationKeyItem(key_id, key)
+        bgp_auth_data = AuthenticationData(key_type, [key_items])
+
     router_params = BgpRouterParams(router_type=type,
                                     vendor=vendor, autonomous_system=int(asn),
                                     identifier=_get_ip(ip_address),
@@ -1097,9 +1098,9 @@
         if key_type == 'md5':
             try:
                 if bgp_router_obj.bgp_router_parameters.auth_data.key_items[0].key != key:
-                    ret['changes'].update({"key_type": {'old': bgp_router_obj.bgp_router_parameters.auth_data.key_items[0].key, 'new': key}})
+                    ret['changes'].update({"key": {'old': bgp_router_obj.bgp_router_parameters.auth_data.key_items[0].key, 'new': key}})
             except:
-                ret['changes'].update({"key_type": {'old': None, 'new': key}})
+                ret['changes'].update({"key": {'old': None, 'new': key}})
 
         if len(ret['changes']) == 0:
             return ret