Skip to content
Draft
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package org.cloudfoundry.multiapps.controller.api.model;

import java.util.List;

import org.immutables.value.Value;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

@Value.Immutable
@JsonSerialize(as = ImmutableDryRunResult.class)
@JsonDeserialize(as = ImmutableDryRunResult.class)
public interface DryRunResult {

@JsonProperty("appsToCreate")
List<String> getAppsToCreate();

@JsonProperty("appsToUpdate")
List<String> getAppsToUpdate();

@JsonProperty("appsToDelete")
List<String> getAppsToDelete();

@JsonProperty("servicesToCreate")
List<String> getServicesToCreate();

@JsonProperty("servicesToUpdate")
List<String> getServicesToUpdate();

@JsonProperty("servicesToDelete")
List<String> getServicesToDelete();

@JsonProperty("routesToCreate")
List<String> getRoutesToCreate();

@JsonProperty("routesToDelete")
List<String> getRoutesToDelete();

}
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ public static List<State> getFinalStates() {
@Nullable
public abstract ErrorType getErrorType();

@Nullable
public abstract DryRunResult getDryRunResult();

@Nullable
public abstract Map<String, String> getOutputs();

public abstract List<Message> getMessages();

@AllowNulls
Expand Down
51 changes: 51 additions & 0 deletions multiapps-controller-api/src/main/resources/mtarest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,14 @@ definitions:
enum:
- "CONTENT"
- "INFRASTRUCTURE"
dryRunResult:
readOnly: true
$ref: "#/definitions/DryRunResult"
outputs:
type: "object"
readOnly: true
additionalProperties:
type: "string"
messages:
type: "array"
readOnly: true
Expand All @@ -789,6 +797,49 @@ definitions:
readOnly: true
additionalProperties:
type: "object"
DryRunResult:
type: "object"
properties:
appsToCreate:
type: "array"
readOnly: true
items:
type: "string"
appsToUpdate:
type: "array"
readOnly: true
items:
type: "string"
appsToDelete:
type: "array"
readOnly: true
items:
type: "string"
servicesToCreate:
type: "array"
readOnly: true
items:
type: "string"
servicesToUpdate:
type: "array"
readOnly: true
items:
type: "string"
servicesToDelete:
type: "array"
readOnly: true
items:
type: "string"
routesToCreate:
type: "array"
readOnly: true
items:
type: "string"
routesToDelete:
type: "array"
readOnly: true
items:
type: "string"
ProcessType:
type: "object"
properties:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.cloudfoundry.multiapps.controller.process.client;

import java.util.ArrayList;
import java.util.List;

public class DryRunChangeSet {

public List<String> appsCreate = new ArrayList<>();
public List<String> appsUpdate = new ArrayList<>();
public List<String> appsDelete = new ArrayList<>();
public List<String> servicesCreate = new ArrayList<>();
public List<String> servicesUpdate = new ArrayList<>();
public List<String> servicesDelete = new ArrayList<>();
public List<String> routesCreate = new ArrayList<>();
public List<String> routesDelete = new ArrayList<>();

public DryRunChangeSet() {
}
}
Loading
Loading