Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/router.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/router.py	(revision 38952)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/router.py	(working copy)
@@ -736,3 +736,41 @@
     response['Content-Disposition'] = 'attachment; filename=%s' % file_name
     return response
 
+
+def get_cloud_page(request):
+    if not request.GET['type'] or not request.GET['page']:
+        raise Http404('Page not found')
+    env = HiveEnvironment(loader=ChoiceLoader([
+                                    PackageLoader('apv', 'templates')]))
+    if request.GET['type'] == "azure":
+        if request.GET['page'] == "basic":
+            template = env.get_template("/ha/cloud/azure/basic.html")
+            response = HttpResponse(template.render())
+            return response
+        elif request.GET['page'] == "nic":
+            template = env.get_template("/ha/cloud/azure/nic.html")
+            response = HttpResponse(template.render())
+            return response
+        elif request.GET['page'] == "udr":
+            template = env.get_template("/ha/cloud/azure/udr.html")
+            response = HttpResponse(template.render())
+            return response
+        elif request.GET['page'] == "log":
+            template = env.get_template("/ha/cloud/azure/log.html")
+            response = HttpResponse(template.render())
+            return response
+
+    elif request.GET['type'] == "aws":
+        if request.GET['page'] == "basic":
+            template = env.get_template("/ha/cloud/aws/basic.html")
+            response = HttpResponse(template.render())
+            return response
+        elif request.GET['page'] == "eni":
+            template = env.get_template("/ha/cloud/aws/eni.html")
+            response = HttpResponse(template.render())
+            return response
+        elif request.GET['page'] == "log":
+            template = env.get_template("/ha/cloud/aws/log.html")
+            response = HttpResponse(template.render())
+            return response
+    raise Http404('Page not found')
\ No newline at end of file
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/ha/cloud/aws/basic.html
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/ha/cloud/aws/basic.html	(revision 0)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/ha/cloud/aws/basic.html	(working copy)
@@ -0,0 +1,196 @@
+<form class="form-horizontal main-form">
+<div class="row-fluid">
+    <div class="span12 with-min-width field-group-box">
+
+        <fieldset class="log_out_component">
+            <div class="form-group">
+                <label class="col-md-3 control-label">{% trans %}access key{% endtrans %}:</label>
+                <div class="col-md-9 aws_access_key_field">
+                    <div class="align_center_for_info" target="_blank">...</div>
+                </div>
+            </div>
+             <div class="form-group">
+                <label class="col-md-3 control-label">{% trans %}secret access key{% endtrans %}:</label>
+                <div class="col-md-9 aws_secret_access_key_field">
+                    <div class="align_center_for_info" target="_blank">...</div>
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-md-3 control-label">{% trans %}region{% endtrans %}:</label>
+                <div class="col-md-9 region_field">
+                    <div class="align_center_for_info" target="_blank">...</div>
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-md-3 control-label"></label>
+                <div class="col-md-9">
+                    <button type="button" class="btn btn-primary btn-log-out">{% trans %}Log Out{% endtrans %}</button>
+                </div>
+            </div>
+        </fieldset>
+        <fieldset class='log_in_component'>
+                <fieldset>
+                    <div class="group_actions">
+                        <div class="form-group">
+                            <label class="col-md-3 control-label">{% trans %}access key{% endtrans %}:</label>
+                            <div class="col-md-9">
+                                <input type="text" class="field" data-id="aws_access_key_id" value=""/>
+                                <span class="field-icon-set"><i class="fa fa-question-circle"></i></span>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-md-3 control-label">{% trans %}secret access key{% endtrans %}:</label>
+                            <div class="col-md-9">
+                                <input type="text" class="field" data-id="aws_secret_access_key" value=""/>
+                                <span class="field-icon-set"><i class="fa fa-question-circle"></i></span>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-md-3 control-label">{% trans %}region{% endtrans %}:</label>
+                            <div class="col-md-9">
+                                <input type="text" class="field" data-id="region" value=""/>
+                                <span class="field-icon-set"><i class="fa fa-question-circle"></i></span>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-md-3 control-label"></label>
+                            <div class="col-md-9">
+                                <button type="button" class="btn btn-primary btn-log-in">{% trans %}Log In{% endtrans %}</button>
+                            </div>
+                        </div>
+                </fieldset>
+
+            </div>
+        </fieldset>
+        <fieldset class="error_field">
+            <div class="form-group">
+                <div class="col-md-3"></div>
+                <div class="error-info">{% trans %}Internal error, please refresh the page.{% endtrans %}</div>
+            </div>
+        </fieldset>
+
+
+    </div>
+</div>
+</form>
+<style type="text/css">
+.log_out_component{
+    display: none;
+}
+.align_center_for_info {
+    line-height: 28px;
+    display: inline-block;
+}
+
+.error_field {
+    display: none;
+}
+</style>
+
+{% block box_script %}
+
+<script type="text/javascript">
+
+$(function () {
+    getStatus();
+    function getStatus () {
+        $.ajax({
+            url: "/api/v1/cloud/aws/credential/",
+            type: 'GET',
+            dataType: 'json',
+            success: function (res) {
+                if (typeof (res["aws_access_key_id"]) === "undefined"
+                || typeof (res["aws_secret_access_key"]) === "undefined") {
+                    return
+                }
+
+                if (res["aws_access_key_id"] != ""
+                && res["aws_secret_access_key"] != "") {
+                    $('.aws_access_key_field div').html(res["aws_access_key_id"]);
+                    $('.aws_secret_access_key_field div').html(res["aws_secret_access_key"]);
+                    $('.region_field div').html(res["region"]);
+                    $('.log_in_component').css('display', 'none');
+                    $('.log_out_component').css('display', 'block');
+
+                }else{
+
+                    $('.log_out_component').css('display', 'none');
+                    $('.log_in_component').css('display', 'block');
+                    var content = [
+                    '{% trans %}Enter the access key, secret access key and region code(e.g. us-east-1) of AWS for the purpose of manipulating AWS resource.{% endtrans %}<br />',
+                        ].join("");
+                    $('.field-icon-set').popover({
+                        trigger: "hover",
+                        content: content,
+                        html: true
+                    });
+
+                }
+
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+            }
+        });
+    }
+    $('.btn-log-in').click(function(evt) {
+        if(evt.detail && evt.detail != 1) {
+            return;
+        }
+        var each = {};
+        $('.field').each(function() {
+            if ($(this).val() == "") {
+                return;
+            }
+
+            "data-id"
+            "data-id"
+            each[$(this).data('id')] = $(this).val();
+        });
+        if (Object.keys(each).length < 1) {
+            return;
+        }
+
+        $.ajax({
+            url: "/api/v1/cloud/aws/credential/",
+            type: 'POST',
+            dataType: 'json',
+            data: JSON.stringify({
+                aws_access_key_id: each.aws_access_key_id,
+                aws_secret_access_key: each.aws_secret_access_key,
+                region: each.region,
+            }),
+            success: function (res) {
+            getStatus();
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+            }
+        });
+
+    });
+    $('.btn-log-out').click(function() {
+        var that = this;
+        $(that).prop('disabled', true);
+        $.ajax({
+            url: "/api/v1/cloud/aws/credential/",
+            type: 'DELETE',
+            dataType: 'json',
+            success: function (res) {
+                $(that).prop('disabled', false);
+                getStatus();
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                $(that).prop('disabled', false);
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+            }
+        });
+    });
+
+
+
+});
+
+</script>
+
+{% endblock box_script %}
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/ha/cloud/aws/eni.html
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/ha/cloud/aws/eni.html	(revision 0)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/ha/cloud/aws/eni.html	(working copy)
@@ -0,0 +1,464 @@
+<form class="form-horizontal main-form">
+<div class="row-fluid">
+    <div class="span12 with-min-width field-group-box">
+        <fieldset>
+            <div class="group_actions"></div>
+            <div class="form-group switch switch_enable">
+                <label class="col-md-3 control-label">{% trans %}Enable{% endtrans %}:</label>
+                <div class="col-md-3">
+                    <input class="switch-small" type="checkbox" name="switch_btn"
+                    data-on-label="{% trans %}Enable{% endtrans %}"
+                    data-off-label="{% trans %}Disabled{% endtrans %}" />
+                    <span class="field-icon-set"></span>
+                </div>
+                <label class="col-md-3 control-label">{% trans %}Manual Trigger{% endtrans %}:</label>
+                <div class="col-md-3 col-manual-trigger">
+                    <button type="button" class="btn btn-primary failover-btn">{% trans %}Failover{% endtrans %}</button>
+                    <button type="button" class="btn btn-primary recover-btn">{% trans %}Recover{% endtrans %}</button>
+                </div>
+            </div>
+        </fieldset>
+        <fieldset>
+            <div class="form-group add-btn-style">
+                <div class="col-md-3">
+                    <button type="button" class="btn btn-action add-btn"><i class="fa fa-plus-circle"></i>{% trans %}ADD{% endtrans %}</button>
+                </div>
+                <div class="col-md-9" id="app"></div>
+            </div>
+        </fieldset>
+    </div>
+</div>
+<!-- row-fluid -->
+<div class="btn-static">
+    <div class="btn-switch">
+        <button type="button" class="btn btn-action btn-submit">{% trans %}Save Changes{% endtrans %}</button>
+        <button type="button" class="btn btn-default btn-cancel-action">{% trans %}Cancel{% endtrans %}</button>
+    </div>
+</div>
+<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
+    <div class="modal-dialog">
+        <div class="box modal-content">
+            <div class="box-header">
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+                    <span aria-hidden="true"></span></button>
+                    <h2>{{ gettext('New %s')%"NIC" }}</h2>
+                </button>
+            </div>
+            <div class="box-body">
+                <form class="form-horizontal main-form">
+                    <div class="padded">
+                        <div class="row-fluid">
+                            <div class="span12 with-min-width field-group-box modal-fields">
+                            </div>
+                        </div>
+                    </div>
+                    <div class="form-actions col-md-offset-3">
+                        <button type="button" class="btn btn-action btn-save">{% trans %}Submit{% endtrans %}</button>
+                        <button type="button" data-dismiss="modal" class="btn btn-default btn-cancel">{% trans %}Cancel{% endtrans %}</button>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+</div>
+</form>
+<style type="text/css">
+.add-btn-style {
+    text-align: right;
+}
+.add-btn-style .add-btn {
+    background-color: transparent;
+    border: 0;
+}
+.modal-fields {
+    padding-top: 20px;
+}
+.form-actions {
+    padding-bottom: 20px;
+}
+#app {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+}
+#app .block {
+    min-width: 200px;
+    box-sizing: border-box;
+    margin-right: 20px;
+}
+#app .box.modal-content {
+    border-radius: 6px;
+}
+#app .block .modal-dialog {
+    width: 100%;
+    margin: 0;
+}
+#app .box-header {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding-right: 10px;
+    padding-left: 10px;
+}
+#app .box-header button.close:active {
+    opacity: 0.2;
+}
+#app .box-body ul {
+    padding: 0;
+    list-style: none;
+}
+#app .box-body ul li {
+    padding: 5px;
+    text-align: left;
+}
+.btn-static {
+    display: none;
+}
+</style>
+</div>
+
+{% block box_script %}
+
+<script type="text/javascript">
+
+$(function(){
+    var enableSwitch = $("input[name='switch_btn']").bootstrapSwitch();
+    var is_init = 0;
+    getEnableStatus();
+    function getEnableStatus() {
+        // get the current status of enable toggle
+        $.ajax({
+            url: '/api/v1/cloud/aws/ha/status/',
+            type: 'GET',
+            dataType: 'json',
+            success: function (res) {
+                if (typeof(res["status"]) == "undefined") {
+                    return;
+                }
+                enableSwitch.bootstrapSwitch('setState', res["status"]);
+                is_init++;
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+            }
+        });
+    }
+    enableSwitch.on('switch-change', function(e, data) {
+        // event listener for enable toggle
+        if (is_init < 1) {
+            return;
+        }
+        $('#frame_model_main .btn-static').fadeIn("slow");
+        // why the following code is needed?
+        if ($(".btn-static").is(":visible")) {
+            var buttonH = $(".btn-static").offset().top;
+            $(function(){
+                $(window).scroll(function(){
+                    var scrollH = $(this).scrollTop();
+                    if (scrollH >= buttonH) {
+                        $(".btn-switch").addClass("btn-fixed");
+                    }else{
+                        $(".btn-switch").removeClass("btn-fixed");
+                    }
+                });
+            });
+        }
+    });
+    $('.btn-cancel-action').click(function(evt) {
+        // cancel btn of changing enable status
+        if(evt.detail && evt.detail != 1) {
+            return;
+        }
+        refreshPage();
+    });
+    $('.btn-submit').click(function(evt) {
+        // save btn of changing enable status
+        if(evt.detail && evt.detail != 1) {
+            return;
+        }
+        var enable = enableSwitch.bootstrapSwitch('state'); // true / false
+        $.ajax({
+            url: '/api/v1/cloud/aws/ha/status/',
+            type: 'POST',
+            dataType: 'json',
+            data: JSON.stringify({
+                status: (enable ? 1 : 0)
+            }),
+            success: function (res) {
+                refreshPage();
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+            }
+        });
+    });
+    var modal_fields = [{
+        field: '{% trans %}source ENI id{% endtrans %}',
+        id: 'src_eni_id',
+        value: ''
+    },{
+        field: '{% trans %}destination ENI {% endtrans %}',
+        id: 'dest_eni_id',
+        value: ''
+    },];
+    // for displaying fields in each block
+    var show_fields = ['index', 'dest_eni_id', 'src_eni_id'];
+    var is_show_field_title = true;
+
+    $('.add-btn').click(function() {
+        // add eni btn
+        var content = setContent(modal_fields);
+        $('.modal-fields').html(content);
+        $('#addModal').modal();
+    });
+    $('.failover-btn').click(function(evt) {
+        // btn of manual trigger failover
+        if(evt.detail && evt.detail != 1) {
+            return;
+        }
+        var that = this;
+        $(that).css("disabled", true);
+        $.ajax({
+            url: '/api/v1/cloud/aws/failover/',
+            type: 'PUT',
+            dataType: 'json',
+            data: JSON.stringify({
+                status: 1
+            }),
+            success: function (res) {
+                if (typeof(res["msg"]) == "undefined") {
+                console.log(res["msg"], typeof(res["msg"]))
+
+                    return;
+                }
+                alert(res["msg"]);
+                $(that).css("disabled", false);
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+                $(that).css("disabled", false);
+            }
+        });
+    });
+    $('.recover-btn').click(function(evt) {
+        // btn of manual trigger recover
+        if(evt.detail && evt.detail != 1) {
+            return;
+        }
+        var that = this;
+        $(that).css("disabled", true);
+        $.ajax({
+            url: '/api/v1/cloud/aws/recover/',
+            type: 'PUT',
+            dataType: 'json',
+            data: JSON.stringify({
+                status: 0
+            }),
+            success: function (res) {
+                console.log(res["msg"], typeof(res["msg"]))
+                if (typeof(res["msg"]) == "undefined") {
+                    return;
+                }
+                alert(res["msg"]);
+                $(that).css("disabled", false);
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+                $(that).css("disabled", false);
+            }
+        });
+    });
+    var config = [];
+    $('.btn-save').click(function(evt) {
+        // submit btn of adding eni
+        // why this can get the needed  data
+        if(evt.detail && evt.detail != 1) {
+            return;
+        }
+        var each = {};
+        $('.field').each(function() {
+            if ($(this).val() == "") {
+                return;
+            }
+            each[$(this).data('id')] = $(this).val();
+        });
+        if (Object.keys(each).length < 1) {
+            return;
+        }
+        addENI(each.src_eni_id, each.dest_eni_id);
+    });
+
+    getENIConfig();
+    function getENIConfig() {
+        // get list of eni config
+        $.ajax({
+            url: '/api/v1/cloud/aws/eniconfig/',
+            type: 'GET',
+            dataType: 'json',
+            success: function(res) {
+                for (var index in res) {
+                    config.push({
+                        primary_key: index,
+                        dest_eni_id: res[index].dest_eni_id,
+                        src_eni_id: res[index].src_eni_id,
+                    })
+                }
+                updateBlockList(config, show_fields, is_show_field_title);
+
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+            }
+        });
+    }
+
+    /**
+     * Return html string for content of pop up window(Add)
+     * @param array setting: array for each setting
+     * @return string
+     */
+    function setContent(setting) {
+        // for modal of adding eni
+        var html = [];
+        for (var ind = 0; ind < setting.length; ++ind) {
+            var each = setting[ind];
+            html.push([
+                '<fieldset>',
+                    '<div class="group_actions"></div>',
+                        '<div class="form-group">',
+                        '<label class="col-md-3 control-label">',
+                            setting[ind].field,
+                        ':</label>',
+                        '<div class="col-md-9">',
+                            '<input type="text" class="field" data-id="' + setting[ind].id,
+                            '" value="' + setting[ind].value + '" />',
+                        '</div>',
+                    '</div>',
+                '</fieldset>'
+            ].join(""));
+        }
+        return html.join("");
+    }
+
+    /**
+     * Update layout for each blocks
+     * @param array setting: array of block information
+     * @param array fields: array of displaying fields, empty is all
+     * @param bool value_only: display value or [field: value] for each list
+     * @return void
+     */
+    function updateBlockList(setting, fields = [], value_only = true) {
+        // update and rerender the list of eni config
+        var html = [];
+        var nameMapping = getNameMapping(); // ex: sub_id: SubId
+        for (var ind = 0; ind < setting.length; ++ind) {
+            var list = [];
+            for (var field in setting[ind]) {
+                if (fields.length !== 0 && fields.indexOf(field) === -1) {
+                    // Not display
+                    continue;
+                }
+                if (field == "index") {
+                    // Not display
+                    continue;
+                }
+                var content = setting[ind][field];
+                if (!value_only) {
+                    var display_name = "";
+                    if (nameMapping.hasOwnProperty(field)) {
+                        display_name = nameMapping[field];
+                    }
+                    content = display_name + ": " + content;
+                }
+                list.push([
+                    '<li data-id="' + field + '">' + content + '</li>'
+                ].join(""));
+            }
+            html.push([
+                '<div class="block">',
+                    '<div class="modal-dialog">',
+                        '<div class="box modal-content">',
+                            '<div class="box-header">',
+                                '<span>' + setting[ind]['primary_key'] + '</span>',
+                                '<button type="button" class="close" aria-label="Close"',
+                                    'data-id="' + setting[ind]['primary_key'] + '">',
+                                    '<span aria-hidden="true">&times;</span></button>',
+                            '</div>',
+                            '<div class="box-body">',
+                                '<ul>',
+                                    list.join(""),
+                                '</ul>',
+                            '</div>',
+                        '</div>',
+                    '</div>',
+                '</div>'
+            ].join(""));
+        }
+        $('#app').html(html.join(""));
+        $('#app .block .box-header button').click(function() {
+            var index = parseInt($(this).data("id"));
+            delNIC(index);
+        });
+    }
+
+    function addENI(src_eni_id, dest_eni_id) {
+        // add eni api
+        $.ajax({
+            url: '/api/v1/cloud/aws/eniconfig/',
+            type: 'POST',
+            dataType: 'json',
+            data: JSON.stringify({
+                src_eni_id: src_eni_id,
+                dest_eni_id: dest_eni_id,
+            }),
+            success: function(res) {
+                $('#addModal').modal('hide');
+                setTimeout(function() {
+                    refreshPage();
+                }, 400);
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                $('#addModal').modal('hide');
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+            }
+        });
+    }
+
+    function delNIC(index) {
+        // delete eni api
+        $.ajax({
+            url: '/api/v1/cloud/aws/eniconfig/',
+            type: 'DELETE',
+            dataType: 'json',
+            data: JSON.stringify({
+                index: String(index)
+            }),
+            success: function(res) {
+                refreshPage();
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+            }
+        });
+    }
+
+    /**
+     * Get Display name mapping by index
+     * @return object
+     */
+    function getNameMapping() {
+        var mapping = {};
+        for (var ind = 0; ind < modal_fields.length; ++ind) {
+            mapping[modal_fields[ind].id] = modal_fields[ind].field;
+        }
+        return mapping;
+    }
+
+    function refreshPage() {
+        $('.config-nav li.active a').trigger('click');
+    }
+
+});
+
+</script>
+{% endblock box_script %}
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/ha/cloud/aws/index.html
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/ha/cloud/aws/index.html	(revision 0)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/ha/cloud/aws/index.html	(working copy)
@@ -0,0 +1,117 @@
+{% extends "base.html" %}
+
+{% block content %}
+
+{% block horizontal_nav %}
+<div class="horizontal-nav">
+    <div class="crumbs">
+        <a href="/apv/ha/cloud/azure/_index"><i class="fa fa-home"></i></a>
+    </div>
+<ul class="nav nav-tabs">
+    <li class="active">
+        <a href="/apv/ha/cloud/azure/_index">Azure</a>
+    </li>
+    <li class="active">
+        <a href="/apv/ha/cloud/aws/_index">AWS</a>
+    </li>
+</ul>
+</div>
+<div></div>
+{% endblock horizontal_nav %}
+
+<div class="head-nav-box clearfix-before">
+{% block model_nav %}
+<nav class="head-nav" role="navigation">
+    <a class="model-name" href="#" style="width:90%;"><i class="fa fa-folder-open"></i>&nbsp;AWS</a>
+</nav>
+{% endblock model_nav %}
+</div>
+
+{% block sub_nav %}
+<ul class="config-nav nav nav-pills" style="display:none;">
+    <li class="active">
+        <a class="config-nav-a" val="/apv/get_cloud_page?type=aws&page=basic" href="javascript:;">{% trans %}Basic Settings{% endtrans %} <i class="fa fa-wrench"></i></a>
+        <ul class="sub-config-nav group-index">
+            <li><a val="/apv/get_cloud_page?type=azure&page=basic" href="javascript:;">General</a></li>
+        </ul>
+    </li>
+    <li>
+        <a class="config-nav-a" val="/apv/get_cloud_page?type=aws&page=eni" href="javascript:;">{% trans %}ENI{% endtrans %} <i class="fa fa-wrench"></i></a>
+        <ul class="sub-config-nav group-nic">
+            <li><a val="/apv/get_cloud_page?type=aws&page=eni" href="javascript:;">General</a></li>
+        </ul>
+    </li>
+
+    <li>
+        <a class="config-nav-a" val="/apv/get_cloud_page?type=azure&page=log" href="javascript:;">{% trans %}Log{% endtrans %} <i class="fa fa-wrench"></i></a>
+        <ul class="sub-config-nav group-log">
+            <li><a val="/apv/get_cloud_page?type=azure&page=log" href="javascript:;">General</a></li>
+        </ul>
+    </li>
+</ul>
+<ul class="sub-config-nav-real"></ul>
+<script type="text/javascript">
+require(['jquery'], function(){
+    if ($('.config-nav li').length > 1) {
+        $('.config-nav').show();
+    }
+});
+</script>
+{% endblock %}
+
+<div id="frame_model_main" class="frame" style="display: block;">
+</div>
+<style type="text/css">
+#frame_model_main {
+    position: relative;
+}
+.align_center_for_info {
+    line-height: 28px;
+}
+</style>
+
+{% endblock %}
+
+{% block page_javascript %}
+<script type="text/javascript">
+require(['jquery'], function(){
+    $(".config-nav-a").on("click", function(e) {
+        e.preventDefault();
+    });
+});
+require(['hive', 'widget-form'], function(){
+    var initiator = new Object();
+    $HIVE.enable_event(initiator);
+    $(".config-nav a.config-nav-a").click(function(){
+        $(".config-nav li").removeClass("active");
+        $(this).parents("li").addClass("active");
+        var sub_nav = $($(this).parents('li').find('ul')[0])
+        if (sub_nav && sub_nav.children().length > 1) {
+           var real_sub_nav = sub_nav.clone(true).removeClass('sub-config-nav').addClass('sub-config-nav-real');
+            $(".sub-config-nav-real").replaceWith(real_sub_nav);
+            $(".sub-config-nav-real").show();
+            $("#frame_instance_main").css("padding-top", "50px");
+            real_sub_nav.find('a').click(function(){
+                $(".sub-config-nav-real li").removeClass("active");
+                $(this).parents("li").addClass("active");
+                var url = $(this).attr('val')
+                $HIVE.ajax_load_box(url, initiator, $("#frame_model_main"));
+                return false;
+            });
+            $(".sub-config-nav-real a:first").trigger("click");
+        } else {
+            $("#frame_instance_main").css("padding-top", "0px");
+            $(".sub-config-nav-real").empty();
+            $(".sub-config-nav-real").hide();
+            var url = $(this).attr('val')
+            $HIVE.ajax_load_box(url, initiator, $("#frame_model_main"));
+        }
+        return false;
+    });
+    $(".config-nav a:first").trigger("click");
+});
+</script>
+{% endblock %}
+
+{% block box_script %}
+{% endblock %}
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/ha/cloud/aws/log.html
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/ha/cloud/aws/log.html	(revision 0)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/ha/cloud/aws/log.html	(working copy)
@@ -0,0 +1,259 @@
+
+<form class="form-horizontal main-form">
+    <div class="row-fluid">
+        <div class="span12 with-min-width field-group-box">
+            <fieldset>
+                <div class="group_actions"></div>
+                <div class="form-group switch switch_enable">
+                    <label class="col-md-3 control-label">{% trans %}Enable{% endtrans %}:</label>
+                    <div class="col-md-9">
+                        <input class="switch-small" type="checkbox" name="switch_btn"
+                        data-on-label="{% trans %}On{% endtrans %}"
+                        data-off-label="{% trans %}Off{% endtrans %}" />
+                        <span class="field-icon-set"></span>
+                    </div>
+                </div>
+            </fieldset>
+            <fieldset>
+                <div class="form-group">
+                    <label class="col-md-3 control-label">{% trans %}Level{% endtrans %}</label>
+                    <div class="col-md-9">
+                        <select class="selectpicker select-level">
+                            <option value="debug">0: {% trans %}Debug{% endtrans %}</option>
+                            <option value="info">1: {% trans %}Info{% endtrans %}</option>
+                            <option value="warning">2: {% trans %}Warning{% endtrans %}</option>
+                            <option value="error">3: {% trans %}Error{% endtrans %}</option>
+                        </select>
+                        <span class="field-icon-set"><i class="fa fa-question-circle" style="display:none;"></i></span>
+                    </div>
+                </div>
+            </fieldset>
+            <fieldset>
+                <div class="form-group">
+                    <label class="col-md-3 control-label"></label>
+                    <div class="col-md-9">
+                        <button type="button" class="btn btn-primary download-btn">{% trans %}Download{% endtrans %}</button>
+                    </div>
+                </div>
+            </fieldset>
+            <fieldset>
+                <pre class="log_content"></pre>
+            </fieldset>
+        </div>
+    </div><!-- row-fluid -->
+    <div
+    class="btn-static">
+        <div class="btn-switch">
+            <button type="button" class="btn btn-action btn-submit">{% trans %}Save Changes{% endtrans %}</button>
+            <button type="button" class="btn btn-default btn-cancel-action">{% trans %}Cancel{% endtrans %}</button>
+        </div>
+    </div>
+</form>
+<style type="text/css">
+.main-form pre {
+    background: #1b2d43;
+}
+.btn-static {
+    display: none;
+}
+</style>
+
+{% block box_script %}
+
+<script type="text/javascript">
+
+$(function() {
+    var enableSwitch = $("input[name='switch_btn']").bootstrapSwitch();
+    let is_change = false
+
+    $('.btn-cancel-action').click(function(evt) {
+        // cancel current changes
+        if(evt.detail && evt.detail != 1) {
+            return;
+        }
+        refreshPage();
+    });
+    $('.btn-submit').click(function(evt) {
+        // submit the chages of state of log functionality and log severity
+        if(evt.detail && evt.detail != 1) {
+            return;
+        }
+        var enable = enableSwitch.bootstrapSwitch('state'); // true / false
+        var ajaxes = [];
+        ajaxes.push($.ajax({
+            url: '/api/v1/cloud/aws/log/status/',
+            type: 'PUT',
+            dataType: 'json',
+            data: JSON.stringify({
+                status: (enable ? 1 : 0)
+            }),
+            success: function (res) {
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+            }
+        }));
+        ajaxes.push($.ajax({
+            url: '/api/v1/cloud/aws/log/severity/',
+            type: 'PUT',
+            dataType: 'json',
+            data: JSON.stringify({
+                severity: $(".select-level").selectpicker('val')
+            }),
+            success: function (res) {
+                refreshPage();
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+            }
+        }));
+        refreshPage();
+    });
+
+    $('.download-btn').click(function(evt) {
+        // add event listener to the download button
+        if(evt.detail && evt.detail != 1) {
+            return;
+        }
+        window.open("/api/v1/cloud/aws/log/file/");
+    });
+
+    async function getEnableStatus() {
+        // get the status of the log functionality
+        console.log("getEnableStatus");
+        const res = await new Promise((resolve, reject) => {
+            $.ajax({
+                url: '/api/v1/cloud/aws/log/status/',
+                type: 'GET',
+                dataType: 'json',
+                success: function (response) {
+
+                    if (typeof(response["status"]) === "undefined") {
+                        reject("Status undefined");
+                    } else {
+                        enableSwitch.bootstrapSwitch('setState', response["status"]);
+                        $('.btn-static').css('display', 'none');
+
+                        resolve(response);  // Resolve the promise with the response data
+                    }
+                },
+                error: function (xhr, textStatus, errorThrown) {
+                    console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+                    reject(errorThrown);  // Reject the promise on AJAX error
+                }
+            });
+        });
+        console.log("finish getEnableStatus")
+
+        // Return the result if necessary (optional)
+        return res;
+    }
+
+    async function getLogLevel() {
+        // get the current log level
+        const res = await new Promise((resolve, reject) => {
+            console.log("getLogLevel")
+            $.ajax({
+            url: '/api/v1/cloud/aws/log/severity/',
+            type: 'GET',
+            dataType: 'json',
+            success: function (response) {
+                if (typeof(response["severity"]) == "undefined") {
+                    reject("Status undefined");
+                }
+                $('.select-level').selectpicker("val", response["severity"]);
+                $('.btn-static').css('display', 'none');
+
+                resolve(response);  // Resolve the promise with the response data
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+                reject(errorThrown);  // Reject the promise on AJAX error
+            }
+            });
+        });
+        console.log("finish getLogLevel")
+        return res;
+
+    }
+    async function getLog() {
+        // get the content of log
+        const res = await new Promise((resolve, reject) => {
+            console.log("getInit")
+            $.ajax({
+            url: '/api/v1/cloud/aws/log/buffer/',
+            type: 'GET',
+            dataType: 'json',
+            success: function(response) {
+                if (typeof(response["msg"]) == "undefined") {
+                    return;
+                }
+                $('.log_content').html(response ["msg"]);
+                resolve(response);  // Resolve the promise with the response data
+            },
+            error: function (xhr, textStatus, errorThrown) {
+                console.log(textStatus + "," + errorThrown + "," + xhr.responseText);
+                reject(errorThrown);  // Reject the promise on AJAX error
+            }
+        });
+        });
+        console.log("finish getLog")
+
+        return res;
+
+    }
+    initPage();
+    async function initPage(){
+        console.log("init")
+        // Run all three functions asynchronously
+        await Promise.all([getEnableStatus(), getLogLevel(), getLog()]);
+        // Once all functions are completed, hide the element
+        console.log("display none");
+        $('.btn-static').css('display', 'none');
+
+        enableSwitch.on('switch-change', function(e, data) {
+            // add the event listener to the enable switch
+            $('#frame_model_main .btn-static').fadeIn("slow");
+            if ($(".btn-static").is(":visible")) {
+                var buttonH = $(".btn-static").offset().top;
+                $(function(){
+                    $(window).scroll(function(){
+                        var scrollH = $(this).scrollTop();
+                        if (scrollH >= buttonH) {
+                            $(".btn-switch").addClass("btn-fixed");
+                        }else{
+                            $(".btn-switch").removeClass("btn-fixed");
+                        }
+                    });
+                });
+            }
+        });
+        $(".select-level").change(function() {
+            // add the event listener to the log level select
+            $('#frame_model_main .btn-static').fadeIn("slow");
+            if ($(".btn-static").is(":visible")) {
+                var buttonH = $(".btn-static").offset().top;
+                $(function(){
+                    $(window).scroll(function(){
+                        var scrollH = $(this).scrollTop();
+                        if (scrollH >= buttonH) {
+                            $(".btn-switch").addClass("btn-fixed");
+                        }else{
+                            $(".btn-switch").removeClass("btn-fixed");
+                        }
+                    });
+                });
+            }
+        });
+    }
+
+    function refreshPage() {
+        $('.config-nav li.active a').trigger('click');
+    }
+
+    $('.select-level').selectpicker();
+
+});
+
+</script>
+{% endblock box_script %}
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/tree.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/tree.py	(revision 38952)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/tree.py	(working copy)
@@ -459,6 +459,9 @@
             ('synchronization', {'cls':ModelNode, 'model':'ha.synconfig.SynconfigGeneralSettings'}),
             ('IncrementalSynconfig', {'cls':ModelNode, 'model':'ha.synconfig.IncrementalSynconfig'}),
         ])}),
+        ('cloud', {'cls':MenuNode, 'verbose_name':_('Cloud'),'sub_nodes':D([
+            ('aws', {'cls':ModuleNode, 'default_action':'index', 'package':''}),
+        ])}),
     ])}),
             
     ('ajax', {'cls':MenuNode, 'hidden':True, 'sub_nodes':D([
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/urls.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/urls.py	(revision 38952)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/urls.py	(working copy)
@@ -48,4 +48,5 @@
     url(r'^%s/get_listener_list$' % PRODUCT_KEYWORD, get_listener_list),
     url(r'^%s/get_sslo_status$' % PRODUCT_KEYWORD, get_sslo_status),
     url(r'^%s/prometheus/Log/download' % PRODUCT_KEYWORD, prometheus_log_download),
+    url(r'^%s/get_cloud_page$' % PRODUCT_KEYWORD, get_cloud_page),
 )
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/djproject/urls.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/djproject/urls.py	(revision 38952)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/djproject/urls.py	(working copy)
@@ -38,6 +38,7 @@
     url(r'^ChartExport/(?P<file_name>.*)$', ChartExport),
     url(r'^jsi18n/$', javascript_catalog, js_info_dict),
     url(r'^api/tests/(?P<app>\w+)/(?P<path>.*)$', TestHander),
+    url(r'^api/v1/cloud/', include("hive.cloud.urls")),
     url(r'^api/(?P<app>\w+)/(?P<path>.*)$', hive_ajax_router),
     url(r'^tsdb/query$', query_metrics),
     url(r'^statistics/query$', query_statistics),
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/__init__.py	(added)
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/__init__.py	(revision 0)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/__init__.py	(revision 0)
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/aws_basic_view.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/aws_basic_view.py	(revision 0)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/aws_basic_view.py	(working copy)
@@ -0,0 +1,129 @@
+import json
+import subprocess
+from django.http import HttpResponse
+from hive.utils import aninfo, anerror
+
+
+def get_aws_credential(request):
+    '''
+    Get the AWS credential stored on vAPV.
+
+    Returns:
+        HttpResponse: A response with the AWS credential details or an error message.
+    '''
+    command = "python3 /ca/bin/aws/AWSAuthManager.py -mode show"
+    res = subprocess.Popen(
+        command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
+    )
+    stdout, stderr = res.communicate()
+
+    if res.returncode != 0:
+        anerror("hive.debug", stderr)
+        return HttpResponse(
+            json.dumps({"message": "error while running aws tools"}),
+            content_type="application/json",
+            status=500
+        )
+    try:
+        credential = json.loads(stdout.decode().replace("'", '"'))
+        return HttpResponse(
+            json.dumps(credential),
+            content_type="application/json",
+            status=200
+        )
+    except json.JSONDecodeError as e:
+        anerror("hive.debug", "Fail to decode enconfig to json:{}".format(e))
+        return HttpResponse(
+            json.dumps({}),
+            content_type="application/json",
+            status=500
+        )
+    except UnicodeDecodeError as e:
+        anerror("hive.debug", "Fail to decode stdout:{}".format(e))
+        return HttpResponse(
+            json.dumps({}),
+            content_type="application/json",
+            status=500
+        )
+
+
+def delete_aws_credential(request):
+    '''
+    Delete the AWS credential stored on vAPV
+
+    Returns:
+        HttpResponse: A response indicating the success or failure of
+                      the authentication process.
+    '''
+    command = "python3 /ca/bin/aws/AWSAuthManager.py -mode logout"
+    res = subprocess.Popen(
+        command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
+    )
+    stdout, stderr = res.communicate()
+
+    if res.returncode != 0:
+        anerror("hive.debug", stderr)
+        return HttpResponse(
+            json.dumps({"message": "error while running aws tools"}),
+            content_type="application/json",
+            status=500
+        )
+
+    response_data = {
+        "msg": "Succeed"
+    }
+    aninfo("hive.debug", "Succeed to delete aws credential")
+    return HttpResponse(
+        json.dumps(response_data),
+        content_type="application/json",
+        status=200
+    )
+
+
+def post_aws_credential(request):
+    '''
+    Authenticate AWS credentials to vAPV.
+
+    Returns:
+        HttpResponse: A response indicating the success or failure of
+                      the authentication process.
+    '''
+    # verify user input
+    required_keys = ["aws_access_key_id", "aws_secret_access_key", "region"]
+    data = json.loads(request.body)
+    for key in required_keys:
+        if key not in data:
+            return HttpResponse(
+                json.dumps({"message": "body should contain key: "
+                                       "{}".format(', '.join(required_keys))}),
+                content_type="application/json",
+                status=400
+            )
+
+    command = (
+        "python3 /ca/bin/aws/AWSAuthManager.py -mode login "
+        "-access_key {} -secret_access_key {} -region {}"
+    ).format(data["aws_access_key_id"], data["aws_secret_access_key"], data["region"])
+    res = subprocess.Popen(
+        command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
+    )
+    stdout, stderr = res.communicate()
+
+    if res.returncode != 0:
+        anerror("hive.debug", stderr)
+        return HttpResponse(
+            json.dumps({"message": "error while running aws tools"}),
+            content_type="application/json",
+            status=500
+        )
+
+    response_data = {
+        "msg": "Succeed"
+    }
+    aninfo("hive.debug", "Succeed to authenticate aws credential")
+
+    return HttpResponse(
+        json.dumps(response_data),
+        content_type="application/json",
+        status=200
+    )
\ No newline at end of file
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/aws_eni_view.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/aws_eni_view.py	(revision 0)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/aws_eni_view.py	(working copy)
@@ -0,0 +1,208 @@
+import json
+import subprocess
+import shlex
+from django.http import HttpResponse
+from hive.utils import aninfo, anerror
+
+
+def validate_input(data, required_keys):
+    """Validates if the required keys are present in the input data."""
+    missing_keys = [key for key in required_keys if key not in data]
+    if missing_keys:
+        return False, "Body should contain key: {}".format(', '.join(missing_keys))
+    return True, ""
+
+
+def create_json_response(data, status_code):
+    """Creates a JSON response with the given data and status code."""
+    return HttpResponse(
+        json.dumps(data),
+        content_type="application/json",
+        status=status_code
+    )
+
+
+def run_command(command):
+    """Executes a command and returns the result or raises an error."""
+    try:
+        res = subprocess.Popen(
+            command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
+        )
+        stdout, stderr = res.communicate()
+
+        if res.returncode != 0:
+            anerror("hive.debug", stderr)
+            raise RuntimeError("Error while running AWS tools.")
+        return stdout.decode()
+
+    except subprocess.SubprocessError as e:
+        anerror("hive.debug", str(e))
+        raise RuntimeError("Subprocess execution failed.")
+
+
+def post_eniconfig(request):
+    """
+    Add the eni configuration of AWS to vAPV.
+
+    Returns:
+        HttpResponse: A response indicating the success or failure of
+                      the eni configuration process.
+    """
+    required_keys = ["src_eni_id", "dest_eni_id"]
+    data = json.loads(request.body)
+    is_valid, message = validate_input(data, required_keys)
+    if not is_valid:
+        return create_json_response({"message": message}, 400)
+
+    command = (
+        "python3 /ca/bin/aws/AWSConfigManager.py -ENI set "
+        "-src_eni_id {} -dest_eni_id {}".format(
+            data["src_eni_id"], data["dest_eni_id"]
+        )
+    )
+    try:
+        run_command(command)
+        aninfo("hive.debug", "Succeeded to add eni configuration")
+        return create_json_response({"msg": "Succeed"}, 200)
+    except RuntimeError:
+        return create_json_response({"message": "error while running aws tools"}, 500)
+
+
+def get_eniconfig(request):
+    """
+    Get the eni configuration of AWS from vAPV.
+
+    Returns:
+        HttpResponse: A response with the eni configuration
+                      details or an error message.
+    """
+    command = "python3 /ca/bin/aws/AWSConfigManager.py -ENI show"
+    try:
+        output = run_command(command)
+        enconfig = json.loads(output.replace("'", '"'))
+        return create_json_response(enconfig, 200)
+    except (RuntimeError, json.JSONDecodeError, UnicodeDecodeError) as e:
+        anerror("hive.debug", "Error decoding or running command: {}".format(str(e)))
+        return create_json_response({}, 500)
+
+
+def delete_eniconfig(request):
+    """
+    Delete the eni configuration of AWS from vAPV.
+
+    Returns:
+        HttpResponse: A response indicating the success or failure of
+                      the eni configuration process.
+    """
+    required_keys = ["index"]
+    data = json.loads(request.body)
+
+    # Validate input
+    is_valid, message = validate_input(data, required_keys)
+    if not is_valid:
+        return create_json_response({"message": message}, 400)
+
+    command = (
+        "python3 /ca/bin/aws/AWSConfigManager.py -ENI remove -index "
+        "{}".format(data["index"])
+    )
+    try:
+        run_command(command)
+        aninfo("hive.debug", "Succeeded to delete aws eni configuration")
+        return create_json_response({"msg": "Succeed"}, 200)
+    except RuntimeError:
+        return create_json_response({"message": "error while running aws tools"}, 500)
+
+
+def post_failover(request):
+    """
+    Manually trigger IP swifting while failover happening.
+
+    Returns:
+        HttpResponse: A response indicating the success or failure of
+                      the eni configuration process.
+    """
+    command = "python3 /ca/bin/aws/AWSENIManager.py -mode trigger"
+    try:
+        run_command(command)
+        aninfo("hive.debug", "Succeeded to trigger IP transfering.")
+        return create_json_response({"msg": "Succeed"}, 200)
+    except RuntimeError:
+        return create_json_response({"message": "error while running aws tools."}, 500)
+
+
+def post_recover(request):
+    """
+    Manually trigger IP swifting while recover happening.
+
+    Returns:
+        HttpResponse: A response indicating the success or failure of
+                      the eni configuration process.
+    """
+    command = "python3 /ca/bin/aws/AWSENIManager.py -mode recover"
+    try:
+        run_command(command)
+        aninfo("hive.debug", "Succeeded to trigger IP transfering.")
+        return create_json_response({"msg": "Succeed"}, 200)
+    except RuntimeError:
+        return create_json_response({"message": "error while running aws tools"}, 500)
+
+
+def get_ha_status(request):
+    """
+    Get the HA polling status of AWS from vAPV.
+
+    Returns:
+        HttpResponse: A response with the HA status details
+                      or an error message.
+    """
+    # the output of the command is either "True\n" or "False\n"
+    output_map = {
+        "True\n": 1,
+        "False\n": 0
+    }
+    command = "python3 /ca/bin/aws/AWSFailoverPoller.py -mode status"
+    try:
+        output = run_command(command)
+        aninfo("hive.debug", "Succeeded to get ha poller status.")
+        return create_json_response({"status": output_map[output]}, 200)
+    except RuntimeError:
+        return create_json_response({"message": "error while running aws tools."}, 500)
+
+
+def post_ha_status(request):
+    """
+    Enable or disable the HA polling of AWS from vAPV.
+
+    Returns:
+        HttpResponse: A response indicating the success or failure of
+                      the HA status process.
+    """
+    input_map = {
+        1: "enable",
+        0: "disable"
+    }
+    required_keys = ["status"]
+    data = json.loads(request.body)
+
+    # Validate input
+    is_valid, message = validate_input(data, required_keys)
+    if not is_valid:
+        return create_json_response({"message": message}, 400)
+    if data["status"] not in [0, 1]:
+        return create_json_response({"message": "status should be number 0 or 1"}, 400)
+
+    command = (
+        "python3 /ca/bin/aws/AWSFailoverPoller.py -mode "
+        "{}".format(input_map[data["status"]])
+    )
+    aninfo("hive.debug", "command")
+
+    try:
+        # Start the command in the background. That is why we use Popen instead of call.
+        args = shlex.split(command)
+        subprocess.Popen(args)
+        aninfo("hive.debug", "Succeeded to set ha poller status: {}".format(input_map[data["status"]]))
+        return create_json_response({"msg": "Succeed"}, 200)
+    except RuntimeError:
+        return create_json_response({"message": "error while running aws tools."}, 500)
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/aws_log_view.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/aws_log_view.py	(revision 0)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/aws_log_view.py	(working copy)
@@ -0,0 +1,190 @@
+import json
+import os
+import subprocess
+from django.http import HttpResponse
+from hive.utils import aninfo, anerror
+
+
+def validate_input(data, required_keys):
+    """Validates if the required keys are present in the input data."""
+    missing_keys = [key for key in required_keys if key not in data]
+    if missing_keys:
+        return False, "Body should contain key: {}".format(', '.join(missing_keys))
+    return True, ""
+
+
+def create_json_response(data, status_code):
+    """Creates a JSON response with the given data and status code."""
+    return HttpResponse(
+        json.dumps(data),
+        content_type="application/json",
+        status=status_code
+    )
+
+
+def run_command(command):
+    """Executes a command and returns the result or raises an error."""
+    try:
+        res = subprocess.Popen(
+            command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE
+        )
+        stdout, stderr = res.communicate()
+        if res.returncode != 0:
+            anerror("hive.debug", stderr)
+            raise RuntimeError("Error while running AWS tools.")
+        return stdout.decode()
+
+    except subprocess.SubprocessError as e:
+        anerror("hive.debug", str(e))
+        raise RuntimeError("Subprocess execution failed.")
+
+
+def get_log_buffer(request):
+    """
+    Get the log file content of aws tool from vAPV.
+
+    Returns:
+        HttpResponse: A response containing the log buffer.
+    """
+    command = "python3 /ca/bin/aws/LoggerManager.py -mode show"
+    try:
+        log_buffer = run_command(command)
+        return create_json_response({"msg": log_buffer}, 200)
+    except RuntimeError as e:
+        anerror("hive.debug", str(e))
+        return create_json_response(
+            {"msg": "Error while getting log buffer"}, 500)
+
+
+def get_switcher(request):
+    """
+    Get the status of log functionality aws tool from vAPV.
+
+    Returns:
+        HttpResponse: A response containing the switcher status{}.
+    """
+    # the output of the command is either "True\n" or "False\n"
+    output_map = {
+        "True\n": 1,
+        "False\n": 0
+    }
+    command = "python3 /ca/bin/aws/LoggerManager.py -mode status"
+    try:
+        switcher = run_command(command)
+        return create_json_response({"status": output_map[switcher]}, 200)
+    except RuntimeError as e:
+        anerror("hive.debug", str(e))
+        return create_json_response(
+            {"msg": "Error while getting switcher status"}, 500)
+
+
+def post_switcher(request):
+    """
+    Turn on or off the status of log functionality aws tool on vAPV.
+
+    Returns:
+        HttpResponse: A response indicating the success or failure of
+    """
+    input_map = {
+        1: "on",
+        0: "off"
+    }
+    required_keys = ["status"]
+    data = json.loads(request.body)
+
+    # Validate input
+    is_valid, message = validate_input(data, required_keys)
+    if not is_valid:
+        return create_json_response({"msg": message}, 400)
+    if data["status"] not in [0, 1]:
+        return create_json_response({"msg": "status should be number 0 or 1"}, 400)
+
+    command = ("python3 /ca/bin/aws/LoggerManager.py -mode "
+               "{}".format(input_map[data["status"]]))
+
+    try:
+        output = run_command(command)
+        aninfo("hive.debug", "Succeeded to set log functionality: "
+               "{}".format(data["status"]))
+        return create_json_response({"msg": "Succeed"}, 200)
+    except RuntimeError:
+        return create_json_response({"msg": "error while running aws tools."}, 500)
+
+
+def get_log_severity(request):
+    """
+    Get the severity level of log functionality of aws tool from vAPV.
+
+    Returns:
+        HttpResponse: A response containing the severity level.
+    """
+    command = "python3 /ca/bin/aws/LoggerManager.py -level status"
+    try:
+        severity = run_command(command)
+        aninfo("hive.debug", "Succeeded to get log severity.")
+        return create_json_response({"severity": severity.replace("\n", "")}, 200)
+    except RuntimeError as e:
+        anerror("hive.debug", str(e))
+        return create_json_response(
+            {"msg": "Error while getting severity level"}, 500)
+
+
+def post_log_severity(request):
+    """
+    Set the severity level of log functionality of aws tool on vAPV.
+
+    Returns:
+        HttpResponse: A response indicating the success or failure of
+                      the severity level setting process.
+    """
+    required_keys = ["severity"]
+    data = json.loads(request.body)
+
+    # Validate input
+    is_valid, message = validate_input(data, required_keys)
+    if not is_valid:
+        return create_json_response({"msg": message}, 400)
+
+    if data["severity"] not in ["debug", "info", "warning", "error"]:
+        return create_json_response(
+            {"msg": "severity should be one of debug, info, warning, error"}, 400)
+
+    command = ("python3 /ca/bin/aws/LoggerManager.py -level "
+               "{}".format(data["severity"]))
+    try:
+        output = run_command(command)
+        aninfo("hive.debug", "Succeeded to set log severity: "
+               "{}".format(data["severity"]))
+        return create_json_response({"msg": "Succeed"}, 200)
+    except RuntimeError as e:
+        aninfo("hive.debug", str(e))
+        return create_json_response({"msg": "error while running aws tools."}, 501)
+
+
+def download_log_file(request):
+    """
+    Get the log file of aws tool from vAPV.
+
+    Returns:
+        HttpResponse: A response containing the log file.
+    """
+    command = "python3 /ca/bin/aws/LoggerManager.py -mode getlogpath"
+    try:
+        log_file_path = run_command(command)
+        log_file_path = log_file_path.replace("\n", "")
+
+        if not os.path.exists(log_file_path):
+            return HttpResponse(
+                json.dumps({"msg": "No log file found"}),
+                content_type="application/json",
+                status=200
+            )
+        with open(log_file_path, 'rb') as file:
+            response = HttpResponse(file.read(), content_type='text/plain')
+            response['Content-Disposition'] = 'attachment; filename="{}"'.format("aws_tool.log")
+            response['Content-Length'] = os.path.getsize(log_file_path)
+            return response
+    except RuntimeError as e:
+        anerror("hive.debug", str(e))
+        return create_json_response(
+            {"msg": "Error while getting log file"}, 500)
\ No newline at end of file
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/urls.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/urls.py	(revision 0)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/hive/cloud/urls.py	(working copy)
@@ -0,0 +1,122 @@
+from django.http import HttpResponse
+import json
+from django.conf.urls import patterns, url
+from hive.cloud.aws_basic_view import (
+    post_aws_credential,
+    get_aws_credential,
+    delete_aws_credential
+)
+from hive.cloud.aws_eni_view import (
+    get_eniconfig,
+    post_eniconfig,
+    delete_eniconfig,
+    post_failover,
+    post_recover,
+    get_ha_status,
+    post_ha_status
+)
+from hive.cloud.aws_log_view import (
+    get_log_buffer,
+    get_switcher,
+    post_switcher,
+    get_log_severity,
+    post_log_severity,
+    download_log_file as aws_download_log_file
+)
+
+
+def get_bad_http_method():
+    return HttpResponse(
+        json.dumps({"message": "Bad http method"}),
+        content_type="application/json",
+        status=400
+    )
+
+
+# aws router start
+
+def aws_credential_method_router(request):
+    if request.method == "GET":
+        return get_aws_credential(request)
+    elif request.method == "POST":
+        return post_aws_credential(request)
+    elif request.method == "DELETE":
+        return delete_aws_credential(request)
+    return get_bad_http_method()
+
+
+def aws_eniconfig_method_router(request):
+    if request.method == "GET":
+        return get_eniconfig(request)
+    elif request.method == "POST":
+        return post_eniconfig(request)
+    elif request.method == "DELETE":
+        return delete_eniconfig(request)
+    return get_bad_http_method()
+
+
+def aws_failover_method_router(request):
+    if request.method == "PUT":
+        return post_failover(request)
+    return get_bad_http_method()
+
+
+def aws_recover_method_router(request):
+    if request.method == "PUT":
+        return post_recover(request)
+    return get_bad_http_method()
+
+
+def aws_ha_status_method_router(request):
+    if request.method == "POST":
+        return post_ha_status(request)
+    elif request.method == "GET":
+        return get_ha_status(request)
+    return get_bad_http_method()
+
+
+def aws_log_buffer_method_router(request):
+    if request.method == "GET":
+        return get_log_buffer(request)
+    return get_bad_http_method()
+
+
+def aws_switcher_method_router(request):
+    if request.method == "GET":
+        return get_switcher(request)
+    elif request.method == "PUT":
+        return post_switcher(request)
+    return get_bad_http_method()
+
+
+def aws_log_severity_method_router(request):
+    if request.method == "GET":
+        return get_log_severity(request)
+    elif request.method == "PUT":
+        return post_log_severity(request)
+    return get_bad_http_method()
+
+
+def aws_log_file_method_router(request):
+    if request.method == "GET":
+        return download_log_file(request)
+    return get_bad_http_method()
+
+
+# aws router end
+
+urlpatterns = patterns(
+    '',
+    # aws url start
+    url(r'^aws/credential/$', aws_credential_method_router),
+    url(r'^aws/eniconfig/$', aws_eniconfig_method_router),
+    url(r'^aws/failover/$', aws_failover_method_router),
+    url(r'^aws/recover/$', aws_recover_method_router),
+    url(r'^aws/ha/status/$', aws_ha_status_method_router),
+    url(r'^aws/log/buffer/$', aws_log_buffer_method_router),
+    url(r'^aws/log/status/$', aws_switcher_method_router),
+    url(r'^aws/log/severity/$', aws_log_severity_method_router),
+    url(r'^aws/log/file/$', aws_log_file_method_router),
+    # aws url end
+    
+)
\ No newline at end of file
