Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/java/com/suse/salt/netapi/calls/LocalCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.suse.salt.netapi.event.JobReturnEvent;
import com.suse.salt.netapi.event.RunnerReturnEvent;
import com.suse.salt.netapi.parser.JsonParser;
import com.suse.salt.netapi.results.FullReturn;
import com.suse.salt.netapi.results.Result;
import com.suse.salt.netapi.results.Return;
import com.suse.salt.netapi.results.SSHResult;
Expand Down Expand Up @@ -424,7 +425,8 @@ private CompletionStage<List<Map<String, Result<R>>>> callSyncHelperNonBlock(
Client clientType = batch.isPresent() ? Client.LOCAL_BATCH : Client.LOCAL;

Type xor = parameterizedType(null, Result.class, getReturnType().getType());
Type map = parameterizedType(null, Map.class, String.class, xor);
Type fullret = parameterizedType(null, FullReturn.class, xor);
Type map = parameterizedType(null, Map.class, String.class, fullret);
Type listType = parameterizedType(null, List.class, map);
Type wrapperType = parameterizedType(null, Return.class, listType);
TypeToken<Return<List<Map<String, Result<R>>>>> typeToken =
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/suse/salt/netapi/client/SaltClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ public <R> CompletionStage<R> call(Call<?> call, Client client, Optional<Target<
});

target.ifPresent(t -> props.putAll(t.getProps()));
props.put("full_return", true);
props.put("client", client.getValue());
props.putAll(call.getPayload());
props.putAll(custom);
Expand Down
25 changes: 25 additions & 0 deletions src/main/java/com/suse/salt/netapi/results/FullReturn.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.suse.salt.netapi.results;

public class FullReturn<T> {

private T ret;
private int retcode;
private String jid;

public int getRetcode() {
return retcode;
}

public String getJid() {
return jid;
}

public T getRet() {
return ret;
}

@Override
public String toString() {
return "FullReturn{" + "ret=" + ret + ", retcode=" + retcode + ", jid='" + jid + '\'' + '}';
}
}