Ejemplo n.º 1
0
def deploy_only(name, bytes_value, server_group):
    builder = OperationRequestBuilder()
    builder.content_reference(bytes_value)
    builder.target(server_group)
    builder.add()
    builder.payload(dict(enabled=True))
    builder.deployment(name)
    return builder.build()
Ejemplo n.º 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]
Ejemplo n.º 3
0
def deploy(name, src, server_group):
    add_builder = OperationRequestBuilder()
    add_builder.deployment(name)
    add_builder.content(src)
    add_builder.add()
    add_content = add_builder.build()

    deploy_builder = OperationRequestBuilder()
    deploy_builder.target(server_group)
    deploy_builder.deploy()
    deploy_builder.deployment(name)
    deploy_operation = deploy_builder.build()

    return [add_content, deploy_operation]
Ejemplo n.º 4
0
def test_deployment_address():
    builder = OperationRequestBuilder()
    builder.deployment('hawtio.war')
    request = builder.build()

    assert request == dict(address=[dict(deployment='hawtio.war')])