예제 #1
0
def test_write_attribute_operation():
    builder = OperationRequestBuilder()
    builder.write('min-pool-size', 10)
    request = builder.build()

    assert request == dict(operation='write-attribute',
                           name='min-pool-size',
                           value=10,
                           address=[])
예제 #2
0
def write_attribute(path, name, value):
    builder = OperationRequestBuilder()
    builder.address_from(path)
    builder.write(name, value)
    return builder.build()