Beispiel #1
0
def test_undeploy_with_server_group():
    builder = OperationRequestBuilder()
    builder.target('main-server-group')
    builder.undeploy()

    request = builder.build()

    assert request == dict(operation='remove',
                           address=[{'server-group': 'main-server-group'}])
Beispiel #2
0
def undeploy(name, server_group):
    builder = OperationRequestBuilder()
    builder.deployment(name)
    builder.remove()
    remove_content = builder.build()

    builder = OperationRequestBuilder()
    builder.target(server_group)
    builder.undeploy()
    builder.deployment(name)
    undeploy_operation = builder.build()

    return [undeploy_operation, remove_content]
Beispiel #3
0
def test_undeploy_no_server_group():
    builder = OperationRequestBuilder()
    builder.undeploy()
    request = builder.build()

    assert request == dict(operation='undeploy', address=[])