Skip to content

Commit ef5b0a7

Browse files
authored
Initial verrazzano weblogic application using k8s java api (#3909)
* adding v8o wls tests
1 parent a3d2491 commit ef5b0a7

File tree

15 files changed

+1519
-1
lines changed

15 files changed

+1519
-1
lines changed

integration-tests/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,5 +628,12 @@
628628
<groups>toolkits-srg</groups>
629629
</properties>
630630
</profile>
631+
<profile>
632+
<id>v8o</id>
633+
<properties>
634+
<skipITs>false</skipITs>
635+
<groups>v8o</groups>
636+
</properties>
637+
</profile>
631638
</profiles>
632639
</project>
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
// Copyright (c) 2023, Oracle and/or its affiliates.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
package oracle.verrazzano.weblogic;
5+
6+
import io.kubernetes.client.common.KubernetesObject;
7+
import io.kubernetes.client.openapi.models.V1ObjectMeta;
8+
import io.swagger.annotations.ApiModel;
9+
import io.swagger.annotations.ApiModelProperty;
10+
import org.apache.commons.lang3.builder.EqualsBuilder;
11+
import org.apache.commons.lang3.builder.HashCodeBuilder;
12+
import org.apache.commons.lang3.builder.ToStringBuilder;
13+
14+
@ApiModel(
15+
description
16+
= "ApplicationConfiguration represents a Verrazzano application.")
17+
public class ApplicationConfiguration implements KubernetesObject {
18+
19+
@ApiModelProperty("The API version for the ApplicationConfiguration.")
20+
private String apiVersion;
21+
22+
@ApiModelProperty("The type of resource. Must be 'ApplicationConfiguration'.")
23+
private String kind;
24+
25+
@ApiModelProperty("The ApplicationConfiguration meta-data. Must include the name and namespace.")
26+
private V1ObjectMeta metadata = new V1ObjectMeta();
27+
28+
@ApiModelProperty("The specification of the ApplicationConfiguration. Required.")
29+
private ApplicationConfigurationSpec spec = new ApplicationConfigurationSpec();
30+
31+
public ApplicationConfiguration apiVersion(String apiVersion) {
32+
this.apiVersion = apiVersion;
33+
return this;
34+
}
35+
36+
public String apiVersion() {
37+
return apiVersion;
38+
}
39+
40+
public String getApiVersion() {
41+
return apiVersion;
42+
}
43+
44+
public void setApiVersion(String apiVersion) {
45+
this.apiVersion = apiVersion;
46+
}
47+
48+
public ApplicationConfiguration kind(String kind) {
49+
this.kind = kind;
50+
return this;
51+
}
52+
53+
public String kind() {
54+
return kind;
55+
}
56+
57+
public String getKind() {
58+
return kind;
59+
}
60+
61+
public void setKind(String kind) {
62+
this.kind = kind;
63+
}
64+
65+
public ApplicationConfiguration metadata(V1ObjectMeta metadata) {
66+
this.metadata = metadata;
67+
return this;
68+
}
69+
70+
public V1ObjectMeta metadata() {
71+
return metadata;
72+
}
73+
74+
public V1ObjectMeta getMetadata() {
75+
return metadata;
76+
}
77+
78+
public void setMetadata(V1ObjectMeta metadata) {
79+
this.metadata = metadata;
80+
}
81+
82+
public ApplicationConfiguration spec(ApplicationConfigurationSpec spec) {
83+
this.spec = spec;
84+
return this;
85+
}
86+
87+
public ApplicationConfigurationSpec spec() {
88+
return spec;
89+
}
90+
91+
public ApplicationConfigurationSpec getSpec() {
92+
return spec;
93+
}
94+
95+
public void setSpec(ApplicationConfigurationSpec spec) {
96+
this.spec = spec;
97+
}
98+
99+
@Override
100+
public String toString() {
101+
return new ToStringBuilder(this)
102+
.append("apiVersion", apiVersion)
103+
.append("kind", kind)
104+
.append("metadata", metadata)
105+
.append("spec", spec)
106+
.toString();
107+
}
108+
109+
@Override
110+
public int hashCode() {
111+
return new HashCodeBuilder()
112+
.append(metadata)
113+
.append(apiVersion)
114+
.append(kind)
115+
.append(spec)
116+
.toHashCode();
117+
}
118+
119+
@Override
120+
public boolean equals(Object other) {
121+
if (this == other) {
122+
return true;
123+
}
124+
125+
if (other == null || getClass() != other.getClass()) {
126+
return false;
127+
}
128+
ApplicationConfiguration rhs = (ApplicationConfiguration) other;
129+
return new EqualsBuilder()
130+
.append(metadata, rhs.metadata)
131+
.append(apiVersion, rhs.apiVersion)
132+
.append(kind, rhs.kind)
133+
.append(spec, rhs.spec)
134+
.isEquals();
135+
}
136+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// Copyright (c) 2023, Oracle and/or its affiliates.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
package oracle.verrazzano.weblogic;
5+
6+
import java.util.ArrayList;
7+
import java.util.List;
8+
9+
import io.swagger.annotations.ApiModel;
10+
import io.swagger.annotations.ApiModelProperty;
11+
import org.apache.commons.lang3.builder.EqualsBuilder;
12+
import org.apache.commons.lang3.builder.HashCodeBuilder;
13+
import org.apache.commons.lang3.builder.ToStringBuilder;
14+
15+
@ApiModel(
16+
description
17+
= "ApplicationConfigurationSpec represents a verrazzano application configuration Spec and how it will "
18+
+ "be realized in the Kubernetes cluster.")
19+
public class ApplicationConfigurationSpec {
20+
21+
@ApiModelProperty("List of verrazzano components.")
22+
private List<Components> components = new ArrayList<>();
23+
24+
25+
public ApplicationConfigurationSpec components(List<Components> components) {
26+
this.components = components;
27+
return this;
28+
}
29+
30+
public List<Components> components() {
31+
return components;
32+
}
33+
34+
public List<Components> getComponents() {
35+
return components;
36+
}
37+
38+
public void setComponents(List<Components> components) {
39+
this.components = components;
40+
}
41+
42+
@Override
43+
public String toString() {
44+
return new ToStringBuilder(this)
45+
.append("components", components)
46+
.toString();
47+
}
48+
49+
@Override
50+
public int hashCode() {
51+
return new HashCodeBuilder()
52+
.append(components)
53+
.toHashCode();
54+
}
55+
56+
@Override
57+
public boolean equals(Object other) {
58+
if (this == other) {
59+
return true;
60+
}
61+
if (other == null || getClass() != other.getClass()) {
62+
return false;
63+
}
64+
ApplicationConfigurationSpec rhs = (ApplicationConfigurationSpec) other;
65+
return new EqualsBuilder()
66+
.append(components, rhs.components)
67+
.isEquals();
68+
}
69+
}
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
// Copyright (c) 2023, Oracle and/or its affiliates.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
package oracle.verrazzano.weblogic;
5+
6+
import io.kubernetes.client.common.KubernetesObject;
7+
import io.kubernetes.client.openapi.models.V1ObjectMeta;
8+
import io.swagger.annotations.ApiModel;
9+
import io.swagger.annotations.ApiModelProperty;
10+
import org.apache.commons.lang3.builder.EqualsBuilder;
11+
import org.apache.commons.lang3.builder.HashCodeBuilder;
12+
import org.apache.commons.lang3.builder.ToStringBuilder;
13+
14+
@ApiModel(
15+
description
16+
= "Component represents a Verrazzano component and how it will be realized in the Kubernetes cluster.")
17+
public class Component implements KubernetesObject {
18+
19+
@ApiModelProperty("The API version for the Component.")
20+
private String apiVersion;
21+
22+
@ApiModelProperty("The type of resource. Must be 'Component'.")
23+
private String kind;
24+
25+
@ApiModelProperty("The Component meta-data. Must include the name and namespace.")
26+
private V1ObjectMeta metadata = new V1ObjectMeta();
27+
28+
@ApiModelProperty("The specification of the Component. Required.")
29+
private ComponentSpec spec = new ComponentSpec();
30+
31+
public Component apiVersion(String apiVersion) {
32+
this.apiVersion = apiVersion;
33+
return this;
34+
}
35+
36+
public String apiVersion() {
37+
return apiVersion;
38+
}
39+
40+
public String getApiVersion() {
41+
return apiVersion;
42+
}
43+
44+
public void setApiVersion(String apiVersion) {
45+
this.apiVersion = apiVersion;
46+
}
47+
48+
public Component kind(String kind) {
49+
this.kind = kind;
50+
return this;
51+
}
52+
53+
public String kind() {
54+
return kind;
55+
}
56+
57+
public String getKind() {
58+
return kind;
59+
}
60+
61+
public void setKind(String kind) {
62+
this.kind = kind;
63+
}
64+
65+
public Component metadata(V1ObjectMeta metadata) {
66+
this.metadata = metadata;
67+
return this;
68+
}
69+
70+
public V1ObjectMeta metadata() {
71+
return metadata;
72+
}
73+
74+
public V1ObjectMeta getMetadata() {
75+
return metadata;
76+
}
77+
78+
public void setMetadata(V1ObjectMeta metadata) {
79+
this.metadata = metadata;
80+
}
81+
82+
public Component spec(ComponentSpec spec) {
83+
this.spec = spec;
84+
return this;
85+
}
86+
87+
public ComponentSpec spec() {
88+
return spec;
89+
}
90+
91+
public ComponentSpec getSpec() {
92+
return spec;
93+
}
94+
95+
public void setSpec(ComponentSpec spec) {
96+
this.spec = spec;
97+
}
98+
99+
@Override
100+
public String toString() {
101+
return new ToStringBuilder(this)
102+
.append("apiVersion", apiVersion)
103+
.append("kind", kind)
104+
.append("metadata", metadata)
105+
.append("spec", spec)
106+
.toString();
107+
}
108+
109+
@Override
110+
public int hashCode() {
111+
return new HashCodeBuilder()
112+
.append(metadata)
113+
.append(apiVersion)
114+
.append(kind)
115+
.append(spec)
116+
.toHashCode();
117+
}
118+
119+
@Override
120+
public boolean equals(Object other) {
121+
if (this == other) {
122+
return true;
123+
}
124+
125+
if (other == null || getClass() != other.getClass()) {
126+
return false;
127+
}
128+
Component rhs = (Component) other;
129+
return new EqualsBuilder()
130+
.append(metadata, rhs.metadata)
131+
.append(apiVersion, rhs.apiVersion)
132+
.append(kind, rhs.kind)
133+
.append(spec, rhs.spec)
134+
.isEquals();
135+
}
136+
}

0 commit comments

Comments
 (0)