Remove provisioning restrictions, move all user tracking code to monitoring module, fix proper network name not being passed to the relay
This commit is contained in:
@@ -19,22 +19,22 @@ class Provision:
|
||||
failure("No such network: %s" % spl[3])
|
||||
return
|
||||
|
||||
if "users" in main.relay[spl[1]]:
|
||||
if not spl[2] in main.relay[spl[1]]["users"]:
|
||||
failure("Relay %s not provisioned for alias %s" % (spl[1], spl[2]))
|
||||
return
|
||||
else:
|
||||
failure("Relay %s not provisioned for alias %s" % (spl[1], spl[2]))
|
||||
return
|
||||
#if "users" in main.relay[spl[1]]:
|
||||
# if not spl[2] in main.relay[spl[1]]["users"]:
|
||||
# failure("Relay %s not provisioned for alias %s" % (spl[1], spl[2]))
|
||||
# return
|
||||
#else:
|
||||
# failure("Relay %s not provisioned for alias %s" % (spl[1], spl[2]))
|
||||
# return
|
||||
|
||||
rtrn = provision.provisionRelayForNetwork(spl[1], spl[2], spl[3])
|
||||
if rtrn == "PROVISIONED":
|
||||
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:
|
||||
#if rtrn == "PROVISIONED":
|
||||
# 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
|
||||
if rtrn:
|
||||
success("Started provisioning network %s on relay %s for alias %s" % (spl[3], spl[1], spl[2]))
|
||||
info("Instance name is %s" % rtrn)
|
||||
return
|
||||
@@ -43,10 +43,10 @@ class Provision:
|
||||
return
|
||||
if length == 3: # provision for relay and alias only
|
||||
rtrn = provision.provisionRelayForAlias(spl[1], spl[2])
|
||||
if rtrn == "PROVISIONED":
|
||||
failure("Relay %s already provisioned for alias %s" % (spl[1], spl[2]))
|
||||
return
|
||||
elif rtrn:
|
||||
#if rtrn == "PROVISIONED":
|
||||
# failure("Relay %s already provisioned for alias %s" % (spl[1], spl[2]))
|
||||
# return
|
||||
if rtrn:
|
||||
success("Started provisioning relay %s for alias %s" % (spl[1], spl[2]))
|
||||
return
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user