Index: /branches/rel_apv_10_7/usr/click/tools/azure/ConfigManager.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/tools/azure/ConfigManager.py	(revision 39631)
+++ /branches/rel_apv_10_7/usr/click/tools/azure/ConfigManager.py	(working copy)
@@ -84,6 +84,11 @@
         }
 
         ip_config_setting_json = self.get_ip_config()
+        for each in ip_config_setting_json.values():
+            if each["from_nic_name"] == from_nic_name and each["to_nic_name"] == to_nic_name:
+                ProxyAZLogger.info("Failed to add NIC configuration. Both Primary and Secondary NIC name already exist in configuration.")
+                print("Failed to add NIC configuration. Both Primary and Secondary NIC name already exist in configuration.")
+                return
         for idx in range(1, 200+1):
             if not f"{idx}" in ip_config_setting_json:
                 ip_config_setting_json[f"{idx}"] = data
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/network/cloud/azure/nic.html
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/network/cloud/azure/nic.html	(revision 39631)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/network/cloud/azure/nic.html	(working copy)
@@ -411,6 +411,13 @@
                 dest_nic_name: dest_nic_name
             }),
             success: function(res) {
+                if (typeof(res["message"]) != "undefined" && res["message"] != "succeed") {
+                    if (res["message"].trim() == "Failed to add NIC configuration. Both Primary and Secondary NIC name already exist in configuration.") {
+                        alert("Failed to add NIC configuration. Both Source NIC Name and Destination NIC Name already exist in configuration.");
+                        return;
+                    }
+                    alert(res["message"]);
+                }
                 $('#addModal').modal('hide');
                 setTimeout(function() {
                     refreshPage();
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/az/az_nic_view.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/az/az_nic_view.py	(revision 39631)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/az/az_nic_view.py	(working copy)
@@ -82,6 +82,12 @@
             status=500
     )
     aninfo("hive.debug", "add nic: {}".format(data))
+    if stdout.strip() != "":
+        return HttpResponse(
+            json.dumps({"message":stdout}),
+            content_type="application/json",
+            status=200
+        )
     return HttpResponse(
         json.dumps({"message":"succeed"}),
         content_type="application/json",
