Ejemplo n.º 1
0
def getCurrentRecordsForDomain(request):
    try:
        userID = request.session['userID']
        dm = DNSManager()
        return dm.getCurrentRecordsForDomain(userID, json.loads(request.body))
    except KeyError:
        return redirect(loadLoginPage)
Ejemplo n.º 2
0
def addDeleteDNSRecords(request):
    try:
        userID = request.session['userID']
        dm = DNSManager()
        return dm.addDeleteDNSRecords(request, userID)
    except KeyError:
        return redirect(loadLoginPage)
Ejemplo n.º 3
0
def createDNSZone(request):
    try:
        userID = request.session['userID']
        dm = DNSManager()
        return dm.createDNSZone(request, userID)
    except KeyError:
        return redirect(loadLoginPage)
Ejemplo n.º 4
0
def saveNSConfigurations(request):
    try:
        userID = request.session['userID']
        dm = DNSManager()
        return dm.saveNSConfigurations(userID, json.loads(request.body))
    except KeyError:
        return redirect(loadLoginPage)
Ejemplo n.º 5
0
def configureDefaultNameServers(request):
    try:
        userID = request.session['userID']
        dm = DNSManager()
        return dm.configureDefaultNameServers(request, userID)
    except KeyError:
        return redirect(loadLoginPage)
Ejemplo n.º 6
0
def submitZoneDeletion(request):
    try:
        userID = request.session['userID']
        result = pluginManager.preSubmitZoneDeletion(request)
        if result != 200:
            return result

        dm = DNSManager()
        coreResult = dm.submitZoneDeletion(userID, json.loads(request.body))

        result = pluginManager.postSubmitZoneDeletion(request, coreResult)
        if result != 200:
            return result

        return coreResult
    except KeyError:
        return redirect(loadLoginPage)
Ejemplo n.º 7
0
def addDNSRecord(request):
    try:
        userID = request.session['userID']

        result = pluginManager.preAddDNSRecord(request)
        if result != 200:
            return result

        dm = DNSManager()
        coreResult = dm.addDNSRecord(userID, json.loads(request.body))

        result = pluginManager.postAddDNSRecord(request, coreResult)
        if result != 200:
            return result

        return coreResult

    except KeyError:
        return redirect(loadLoginPage)