def checkNodeRemotes(node: TestNode, states: Dict[str, RemoteState] = None, state: RemoteState = None): assert states or state, "either state or states is required" assert not ( states and state), "only one of state or states should be provided, " \ "but not both" for remote in node.nodestack.remotes.values(): try: s = states[remote.name] if states else state checkState(s, remote, "{}'s remote {}".format(node, remote.name)) except Exception as ex: logger.debug("state checking exception is {} and args are {}" "".format(ex, ex.args)) raise Exception("Error with {} checking remote {} in {}".format( node.name, remote.name, states)) from ex
def checkNodeRemotes(node: TestNode, states: Dict[str, RemoteState] = None, state: RemoteState = None): assert states or state, "either state or states is required" assert not ( states and state), "only one of state or states should be provided, " \ "but not both" for remote in node.nodestack.remotes.values(): try: s = states[remote.name] if states else state checkState(s, remote, "{}'s remote {}".format(node, remote.name)) except Exception as ex: logger.debug("state checking exception is {} and args are {}" "".format(ex, ex.args)) raise Exception( "Error with {} checking remote {} in {}".format(node.name, remote.name, states )) from ex