Index: /branches/rel_avx_2_7_2/src/webui/webui/htdocs/new/src/avx/models/network/dns/__init__.py
===================================================================
--- /branches/rel_avx_2_7_2/src/webui/webui/htdocs/new/src/avx/models/network/dns/__init__.py	(revision 8858)
+++ /branches/rel_avx_2_7_2/src/webui/webui/htdocs/new/src/avx/models/network/dns/__init__.py	(working copy)
@@ -5,9 +5,11 @@
 from hive.router import get_current_session
 from django.shortcuts import redirect
 from hive.node.model import *
-from hive.utils import get_current_session, andebug
+from hive.utils import get_current_session, andebug, is_ipv4, is_ipv6
 __ = _
 
+child_seq = ['DNSServer', 'StaticDNSHostEntry']
+
 class DNSServer(ANModel):
     server_ip = IPAddressField(verbose_name=_('IP'), primary_key=True)
 
@@ -34,4 +36,60 @@
             for each_pk in pk_list:
                 result = self.cli.cmd('no ip nameserver %s' % each_pk["server_ip"].values()[0],
                                   BlankParser(nonblank_exception=CLICmdError, supplement=True))
-            return  
\ No newline at end of file
+            return
+
+class StaticDNSHostEntry(ANModel):
+    hostname = CharField(verbose_name=_('Host Name'), primary_key=True, length='1..255')
+    ip = IPAddressField(verbose_name=_('IP'))
+
+    class Clear(Action):
+        verbose_name = _('Clear Static DNS Entry')
+        action_name = _('Clear')
+        confirm_msg = "It will clear all Static DNS Entry. Are you sure you want to do this?"
+        btn_class = 'btn-danger slow-action'
+        alert_msg = ""
+        process_title = ""
+        forever = False
+        config_change = True
+
+    class Meta:
+        verbose_name = _('Static DNS Host')
+        show_im_export_button = True
+
+    class Manager(CLIManager):
+        def _get_query_set(self):
+            self.cli.set_enable()
+            parser = RegexParser('ip host "(?P<hostname>.*?)" (?P<ip_str>[0-9|\.|:|a-f|A-F]+)', MATCHALL, reflags=re.S)
+            result = self.cli.cmd('show ip host', parser)
+            for each in result:
+                if is_ipv4(each['ip_str']):
+                    each['ip'] = {'ipv4':each['ip_str']}
+                elif is_ipv6(each['ip_str']):
+                    each['ip'] = {'ipv6':each['ip_str']}
+                del each['ip_str']
+            return QuerySet(self._model, result)
+
+        def _insert(self, instance):
+            data = instance.get_field_dict()
+            data['ip_str'] = instance.ip.values()[0]
+            self.cli.set_config()
+            result = self.cli.cmd('ip host "%(hostname)s" %(ip_str)s' % data,
+                            BlankParser(nonblank_exception=CLICmdError, supplement=True))
+            mark_expire_all(self._model)
+            return result
+
+        def _delete(self, pk_list):
+            self.cli.set_config()
+            for each_pk in pk_list:
+                result = self.cli.cmd('no ip host "%s"' % each_pk['hostname'],
+                                  BlankParser(nonblank_exception=CLICmdError, supplement=True))
+            mark_expire_all(self._model)
+            return
+
+        def _perform_Clear(self):
+            self.cli.set_config()
+            result = self.cli.cmd('clear ip host',
+                                  BlankParser(nonblank_exception=CLICmdError, supplement=True))
+            mark_expire_all(self._model)
+            return result
+
Index: /branches/rel_avx_2_7_2/src/webui/webui/htdocs/new/src/avx/models/system/user_mgmt/__init__.py
===================================================================
--- /branches/rel_avx_2_7_2/src/webui/webui/htdocs/new/src/avx/models/system/user_mgmt/__init__.py	(revision 8858)
+++ /branches/rel_avx_2_7_2/src/webui/webui/htdocs/new/src/avx/models/system/user_mgmt/__init__.py	(working copy)
@@ -16,6 +16,8 @@
 The package for administrator related models.
 """
 
+child_seq = ['Administrator', 'AAASettings']
+
 class Administrator(ANModel):
     default = FieldGroup(editable=False, fields={
         'username': CharField(primary_key=True, length='1..32'),
@@ -299,3 +301,121 @@
                                  BlankParser(nonblank_exception=CLICmdError, supplement=True))
             return
 
+class AAASettings(ANModel):
+    enable = BooleanField(verbose_name=_('Enable Admin AAA'), default=False, editable=True)
+    server_name = EnumField(verbose_name = _('Server ID'), default='es01', values=(
+                    ('es01','es01'),
+                    ), primary_key=True)
+    host_ip = CharField(verbose_name='Hostname or IP', length='0..64', editable=True)
+    port = PortField(verbose_name=_('Port'), scope='0..65535', editable=True)
+    secret = CharField(verbose_name=_('Secret'), default='', length='1..64', editable=True)
+
+    class Clear(Action):
+        verbose_name = _('Clear AAA Settings')
+        action_name = _('Clear')
+        confirm_msg = "It will clear all AAA settings. Are you sure you want to do this?"
+        btn_class = 'btn-danger slow-action'
+        alert_msg = ""
+        process_title = ""
+        forever = False
+        config_change = True
+
+    class Update(Action):
+        verbose_name = _('Update AAA Settings')
+        action_name = _('Update')
+        confirm_msg = ""
+        alert_msg = ""
+        process_title = ""
+        forever = False
+        config_change = True
+
+    class Enable(Action):
+        verbose_name = _('Enable AAA Settings')
+        action_name = _('Enable')
+        confirm_msg = ""
+        alert_msg = ""
+        process_title = ""
+        forever = False
+        config_change = True
+
+    class Meta:
+        verbose_name=_('AAA Settings')
+        show_im_export_button = False
+
+    class Manager(CLIManager):
+        def _get_query_set(self):
+            self.cli.set_enable()
+            output = self.cli.cmd('show admin aaa all')
+            enable_res = cli_parse(output,
+                               RegexParser('admin aaa (?P<enable>on|off)', MATCHALL))
+            info_res = []
+            if "admin aaa server" in output:
+                info_res = cli_parse(output,
+                                RegexParser('admin aaa server (?P<server_name>\S+)\s\"(?P<host_ip>\S+)\"\s(?P<port>\S+)\s\"(?P<secret>\S+)\"', MATCHALL, reflags=re.S))
+            if not info_res:
+                info_res = [{
+                    'server_name': 'es01',
+                    'host_ip': ' ',
+                    'port': '0',
+                    'secret': ' '
+                }]
+            ret = {}
+            for data in enable_res:
+                if 'enable' in data:
+                    data['enable'] = True if data['enable'] == 'on' else False
+                ret.update(data)
+            for entry in info_res:
+                ret.update(entry)
+            self._model._meta.mark_delay_query(ret)
+            return QuerySet(self._model, [ret])
+
+        def _get_stats(self):
+            """
+            return [{
+                "enable": True
+            }]
+            """
+            self.cli.set_enable()
+            # [{'enable': 'on'}]
+            result = self.cli.cmd('show admin aaa all', RegexParser('admin aaa (?P<enable>on|off)', MATCHALL, reflags=re.M))
+            for data in result:
+                value = True if data['enable'] == 'on' else False
+                data['enable'] = value
+                self._model._meta.mark_delay_query(data)
+            return QuerySet(self._model, result)
+
+        def _delete(self, pk_list):
+            self.cli.set_config()
+            server_name = pk_list[0]['server_name']
+            result = self.cli.cmd('no admin aaa server %s' % server_name, BlankParser(nonblank_exception=CLICmdError, supplement=True))
+            mark_expire_all(self._model)
+            return
+
+        def _perform_Clear(self):
+            self.cli.set_config()
+            result = self.cli.cmd('clear admin aaa all')
+            mark_expire_all(self._model)
+            return result
+
+        def _perform_Update(self, options):
+            if 'host_ip' not in options or not options['host_ip']:
+                return "Please check the required fields."
+            if 'port' not in options:
+                return "Please check the required fields."
+            self.cli.set_config()
+            if 'server_name' not in options or options['server_name'] != 'es01':
+                options['server_name'] = 'es01'
+            if 'secret' not in options:
+                options['secret'] = ""
+            cli_cmd = 'admin aaa server %(server_name)s "%(host_ip)s" %(port)u "%(secret)s"' % options
+            result = self.cli.cmd(cli_cmd, BlankParser(nonblank_exception=CLICmdError, supplement=True))
+            mark_expire_all(self._model)
+            return
+
+        def _perform_Enable(self, options):
+            self.cli.set_config()
+            on_off = 'on' if options['enable'] == 1 else 'off'
+            result = self.cli.cmd('admin aaa %s' % on_off,
+                                      BlankParser(nonblank_exception=CLICmdError, supplement=True))
+            return
+
