def storage_runtime(uri, control_uri, attributes=None, dispatch=False): from calvin.utilities.nodecontrol import dispatch_storage_node, start_storage_node kwargs = {} if dispatch: return dispatch_storage_node(uri=uri, control_uri=control_uri, **kwargs) else: start_storage_node(uri, control_uri, **kwargs)
def storage_runtime(uri, control_uri, attributes=None, dispatch=False): from calvin.utilities.nodecontrol import dispatch_storage_node, start_storage_node kwargs = {} if dispatch: return dispatch_storage_node(uri=uri, control_uri=control_uri, **kwargs) else: start_storage_node(uri, control_uri, **kwargs)
def test_dispatch_storage_node(get_node_id, start_node): nodecontrol.dispatch_storage_node(URI, CONTROL_URI, trace=True, attributes={}) start_node.assert_called_with(URI, CONTROL_URI, True, {}) assert get_node_id.called