예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
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