Esempio n. 1
0
def server_create(request):
    result = True
    try:
        CIDeployServerService.create_ci_server(request)
    except Exception as ex:
        result = str(ex)
        SimpleLogger.exception(ex)
    return HttpResponse(result)
Esempio n. 2
0
def server_delete(request, server_id):
    result = True
    try:
        CIDeployServerService.delete_ci_server(request, int(server_id))
    except Exception as ex:
        result = str(ex)
        SimpleLogger.exception(ex)
    return HttpResponse(result)
Esempio n. 3
0
    def get_ci_settings_servers_webpart(self, request, server_id):
        ci_servers_list = CIDeployServerService.get_all_servers(request)
        vm_server_list = list()
        for server in ci_servers_list:
            temp = VM_CIServer(server, True, 0)
            vm_server_list.append(temp)

        servers_form = self.get_ci_settings_servers_form_webpart(
            request, server_id)
        page_fileds = {
            "ci_server_form": servers_form,
            "ci_servers": vm_server_list,
            "is_create": server_id == 0
        }
        return self.get_webpart(page_fileds,
                                CISettingsPath.settings_server_page)