Commit a648ac52 by Dudás Ádám

firewall: guidelines, guidelines

parent 7aad8625
......@@ -65,7 +65,7 @@ def firewall_api(request):
if not (data["vlan"] == "vm-net" or data["vlan"] == "war"):
raise Exception(_("Only vm-net and war can be used."))
data["hostname"] = re.sub(r' ','_', data["hostname"])
data["hostname"] = re.sub(r' ', '_', data["hostname"])
if command == "create":
data["owner"] = "opennebula"
......@@ -98,8 +98,8 @@ def firewall_api(request):
raise Exception(_("Unknown command."))
except (ValidationError, IntegrityError, AttributeError, Exception) as e:
return HttpResponse(_("Something went wrong!\n%s\n") % e);
return HttpResponse(_("Something went wrong!\n%s\n") % e)
except:
return HttpResponse(_("Something went wrong!\n"));
return HttpResponse(unicode(_("OK")));
return HttpResponse(_("Something went wrong!\n"))
return HttpResponse(unicode(_("OK")))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment