#1522: added a check for existing links in laydown + test that checks if red agent instructions are random
This commit is contained in:
@@ -1265,6 +1265,12 @@ class Primaite(Env):
|
||||
|
||||
# Bandwidth for all links
|
||||
bandwidths = [i.get_bandwidth() for i in list(self.links.values())]
|
||||
|
||||
if len(bandwidths) < 1:
|
||||
msg = "Random red agent cannot be used on a network without any links"
|
||||
_LOGGER.error(msg)
|
||||
raise Exception(msg)
|
||||
|
||||
servers = [node for node in node_list if node.node_type == NodeType.SERVER]
|
||||
|
||||
for n, node in enumerate(nodes_to_be_compromised):
|
||||
|
||||
Reference in New Issue
Block a user