Fix the all and allc commands so they work with the new data format

This commit is contained in:
2019-09-29 14:57:36 +01:00
parent 15ca45e5df
commit 355a80b19b
8 changed files with 45 additions and 35 deletions

View File

@@ -1,6 +1,7 @@
import main
from yaml import dump
from modules.network import Network
from string import digits
class NetworkCommand:
def __init__(self, *args):
@@ -19,6 +20,9 @@ class NetworkCommand:
if not spl[5].lower() in ["ssl", "plain"]:
failure("Security must be ssl or plain, not %s" % spl[5])
return
if set(spl[2]).intersection(set(digits)):
failure("Network name cannot contain numbers")
return
if not spl[6].lower() in ["sasl", "ns", "none"]:
failure("Auth must be sasl, ns or none, not %s" % spl[5])
return