def test_content_src(): builder = OperationRequestBuilder() builder.content('/tmp/hawtio.war') request = builder.build() assert request == dict( content=[dict(url='file:/tmp/hawtio.war')], address=[])
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]