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]
def test_remove_operation(): builder = OperationRequestBuilder() builder.remove() request = builder.build() assert request == dict(operation='remove', address=[])
def remove(path): builder = OperationRequestBuilder() builder.address_from(path) builder.remove() return builder.build()