Implement additional error checking for provisioning instances and parsing messages, and prevent ZNC from auto-connecting an instance if ConnectOnCreate is off
This commit is contained in:
@@ -29,10 +29,11 @@ class Provision:
|
||||
|
||||
rtrn = provision.provisionRelayForNetwork(spl[1], spl[2], spl[3])
|
||||
if rtrn == "PROVISIONED":
|
||||
failure("Relay %s already provisioned for network %s" % (spl[1], spl[3]))
|
||||
failure("Relay %s already provisioned for alias %s on network %s" % (spl[1], spl[2], spl[3]))
|
||||
return
|
||||
elif rtrn == "DUPLICATE":
|
||||
failure("Instance with relay %s and alias %s already exists for network %s" % (spl[1], spl[2], spl[3]))
|
||||
return
|
||||
elif rtrn:
|
||||
success("Started provisioning network %s on relay %s for alias %s" % (spl[3], spl[1], spl[2]))
|
||||
info("Instance name is %s" % rtrn)
|
||||
|
||||
Reference in New Issue
Block a user