Skip to content
Permalink
Browse files

fix: update to synch with halkyon API v1.0.0-beta.3

  • Loading branch information...
metacosm authored and aureamunoz committed Aug 22, 2019
1 parent f9e93b7 commit f8a395b97d3fd3e3c3a10a1ac87fd125019bab24
@@ -1,6 +1,6 @@
dekorate.capability.name=capability-db
dekorate.capability.category=database
dekorate.capability.kind=postgres
dekorate.capability.type=postgres
dekorate.capability.version=10
dekorate.capability.parameters[0].name=DB_USER
dekorate.capability.parameters[0].value=admin
@@ -35,7 +35,7 @@
public @interface HalkyonCapability {
String category();

String kind();
String type();

String name();

@@ -64,7 +64,7 @@ public void handle(CapabilityConfig config) {
if (Strings.isNullOrEmpty(resources.getName())) {
resources.setName(config.getName());
}
if (!Strings.isNullOrEmpty(config.getCategory()) && !Strings.isNullOrEmpty(config.getKind())) {
if (!Strings.isNullOrEmpty(config.getCategory()) && !Strings.isNullOrEmpty(config.getType())) {
resources.addCustom(ResourceGroup.NAME, createCapability(config));
}
}
@@ -88,7 +88,7 @@ private Capability createCapability(CapabilityConfig config) {
.endMetadata()
.withNewSpec()
.withCategory(config.getCategory())
.withKind(config.getKind())
.withType(config.getType())
.withVersion(config.getVersion())
.addAllToParameters(Arrays.stream(config.getParameters())
.map(p -> new Parameter(p.getName(), p.getValue()))
@@ -31,7 +31,7 @@
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"category",
"kind",
"type",
"version",
"parameters",
"parametersJson",
@@ -47,17 +47,17 @@
public class CapabilitySpec {

private String category;
private String kind;
private String type;
private String version;
private Parameter[] parameters;
private String parametersJson;

public CapabilitySpec() {
}

public CapabilitySpec(String category, String kind, Parameter[] parameters, String parametersJson) {
public CapabilitySpec(String category, String type, String version, Parameter[] parameters, String parametersJson) {
this.category = category;
this.kind = kind;
this.type = type;
this.version = version;
this.parameters = parameters;
this.parametersJson = parametersJson;
@@ -71,12 +71,12 @@ public void setCategory(String category) {
this.category = category;
}

public String getKind() {
return this.kind;
public String getType() {
return this.type;
}

public void setKind(String kind) {
this.kind = kind;
public void setType(String type) {
this.type = type;
}

public String getVersion() {
@@ -30,7 +30,7 @@
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"componentName",
"kind",
"type",
"ref",
"envs"
})
@@ -137,7 +137,7 @@ Below is a list of all the available options
| Property | Type | Description | Default Value |
|--------------------------------|-------------|-------------|---------------|
| dekorate.capability.category | String | | |
| dekorate.capability.kind | String | | |
| dekorate.capability.type | String | | |
| dekorate.capability.name | String | | |
| dekorate.capability.version | String | | |
| dekorate.capability.parameters | Parameter[] | | |

0 comments on commit f8a395b

Please sign in to comment.
You can’t perform that action at this time.