Index: /branches/rel_avx_2_7_4/src/webui/webui/htdocs/new/src/avx/models/va/instance/__init__.py
===================================================================
--- /branches/rel_avx_2_7_4/src/webui/webui/htdocs/new/src/avx/models/va/instance/__init__.py	(revision 9054)
+++ /branches/rel_avx_2_7_4/src/webui/webui/htdocs/new/src/avx/models/va/instance/__init__.py	(working copy)
@@ -3,7 +3,7 @@
 from hive.utils import andebug
 from hive.model.query import mark_expire_all
 from hive.model.loading import get_model
-from hive.utils import get_current_session
+from hive.utils import get_current_session, compare_dict
 from hive.model.legacycli import cli_parse, RegexParser, MATCHALL
 from djproject.an_settings import VA_RUN_CONFIG_INFO_PATH, VA_BOOT_TIME_INFO_PATH, VA_CONFIG_XML_PATH
 from datetime import datetime
@@ -227,13 +227,23 @@
             va_name = instance.va_name
             new_value_list = []
             for each in instance.va_port:
-                value_tuple = (each["port_name"][0]["interface_name"], each["vf_index"])
+                value_tuple = (each["port_name"][0]["interface_name"], int(each["vf_index"]))
                 new_value_list.append(value_tuple)
             old_value_list = []
             for each in old_values["va_port"]:
                 if each["vf_index"] == 0 or each["vf_index"]:
-                    value_tuple = (each["port_name"][0]["interface_name"], each["vf_index"])
+                    value_tuple = (each["port_name"][0]["interface_name"], int(each["vf_index"]))
                     old_value_list.append(value_tuple)
+            if not old_value_list:
+                old_port = self._get_va_port({"va_name": va_name})
+                old_port_list = []
+                for each in old_port:
+                    value_tuple = (each["port_name"][0]["interface_name"], int(each["vf_index"]))
+                    old_port_list.append(value_tuple)
+                if compare_dict(old_port_list, new_value_list):
+                    mark_expire_all(ShowVAPort)
+                    return
+                old_value_list = old_port_list
             for each in old_value_list:
                 if each not in new_value_list:
                     result = self.cli.cmd('no va port "%s" %s %s\nYES' % (va_name, each[0], each[1]),
@@ -252,12 +262,22 @@
             va_name = instance.va_name
             new_value_list = []
             for each in instance.va_ssl:
-                value_tuple = (each["ssl_name"][0]["ssl_type"], each["vf_index"], each["shared"])
+                value_tuple = (each["ssl_name"][0]["ssl_type"], int(each["vf_index"]), each["shared"])
                 new_value_list.append(value_tuple)
             old_value_list = []
             for each in old_values["va_ssl"]:
-                value_tuple = (each["ssl_name"][0]["ssl_type"], each["vf_index"], each["shared"])
+                value_tuple = (each["ssl_name"][0]["ssl_type"], int(each["vf_index"]), each["shared"])
                 old_value_list.append(value_tuple)
+            if not old_value_list:
+                old_ssl = self._get_va_ssl({"va_name": va_name})
+                old_ssl_list = []
+                for each in old_ssl:
+                    value_tuple = (each["ssl_name"][0]["ssl_type"], int(each["vf_index"]), each["shared"])
+                    old_ssl_list.append(value_tuple)
+                if compare_dict(old_ssl_list, new_value_list):
+                    mark_expire_all(ShowVASSL)
+                    return
+                old_value_list = old_ssl_list
             for each in old_value_list:
                 if each not in new_value_list:
                     result = self.cli.cmd('no va ssl "%s" %s %s\nYES' % (va_name, each[0], each[1]),
Index: /branches/rel_avx_2_7_4/src/webui/webui/htdocs/new/src/hive/utils.py
===================================================================
--- /branches/rel_avx_2_7_4/src/webui/webui/htdocs/new/src/hive/utils.py	(revision 9054)
+++ /branches/rel_avx_2_7_4/src/webui/webui/htdocs/new/src/hive/utils.py	(working copy)
@@ -795,3 +795,12 @@
     config.write(data)
     config.close()
     return HttpResponse(json.dumps(1))
+
+def compare_dict(old, new):
+    if len(old) != len(new):
+        return False
+    for each in new:
+        if each not in old:
+            return False
+    return True
+
