Skip to content

Commit 9ce7ef4

Browse files
build/packaging: build tungsten plugin only if noredist is passed (apache#9006)
1 parent ee1cd91 commit 9ce7ef4

10 files changed

Lines changed: 306 additions & 41 deletions

File tree

client/pom.xml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,7 @@
2727
<artifactId>cloudstack</artifactId>
2828
<version>4.19.2.0-SNAPSHOT</version>
2929
</parent>
30-
<repositories>
31-
<repository>
32-
<id>juniper-tungsten-api</id>
33-
<url>https://github.com/radu-todirica/tungsten-api/raw/master</url>
34-
</repository>
35-
</repositories>
3630
<dependencies>
37-
<dependency>
38-
<groupId>net.juniper.tungsten</groupId>
39-
<artifactId>juniper-tungsten-api</artifactId>
40-
<version>2.0</version>
41-
</dependency>
4231
<dependency>
4332
<groupId>javax.servlet</groupId>
4433
<artifactId>javax.servlet-api</artifactId>
@@ -282,11 +271,6 @@
282271
<artifactId>cloud-plugin-network-ovs</artifactId>
283272
<version>${project.version}</version>
284273
</dependency>
285-
<dependency>
286-
<groupId>org.apache.cloudstack</groupId>
287-
<artifactId>cloud-plugin-network-tungsten</artifactId>
288-
<version>${project.version}</version>
289-
</dependency>
290274
<dependency>
291275
<groupId>org.apache.cloudstack</groupId>
292276
<artifactId>cloud-plugin-network-elb</artifactId>
@@ -1088,6 +1072,11 @@
10881072
<artifactId>cloud-plugin-network-cisco-vnmc</artifactId>
10891073
<version>${project.version}</version>
10901074
</dependency>
1075+
<dependency>
1076+
<groupId>org.apache.cloudstack</groupId>
1077+
<artifactId>cloud-plugin-network-tungsten</artifactId>
1078+
<version>${project.version}</version>
1079+
</dependency>
10911080
<dependency>
10921081
<groupId>org.apache.cloudstack</groupId>
10931082
<artifactId>cloud-plugin-api-vmware-sioc</artifactId>

plugins/hypervisors/kvm/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@
8383
<version>${project.version}</version>
8484
<scope>compile</scope>
8585
</dependency>
86-
<dependency>
87-
<groupId>org.apache.cloudstack</groupId>
88-
<artifactId>cloud-plugin-network-tungsten</artifactId>
89-
<version>${project.version}</version>
90-
</dependency>
9186
</dependencies>
9287
<build>
9388
<plugins>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package org.apache.cloudstack.network.tungsten.agent.api;
18+
19+
import com.cloud.agent.api.Command;
20+
21+
import java.util.Objects;
22+
23+
public class SetupTfRouteCommand extends Command {
24+
private final String privateIp;
25+
private final String publicIp;
26+
private final String srcNetwork;
27+
28+
public SetupTfRouteCommand(final String privateIp, final String publicIp, final String srcNetwork) {
29+
this.privateIp = privateIp;
30+
this.publicIp = publicIp;
31+
this.srcNetwork = srcNetwork;
32+
}
33+
34+
public String getPrivateIp() {
35+
return privateIp;
36+
}
37+
38+
public String getPublicIp() {
39+
return publicIp;
40+
}
41+
42+
public String getSrcNetwork() {
43+
return srcNetwork;
44+
}
45+
46+
@Override
47+
public boolean equals(Object o) {
48+
if (this == o) return true;
49+
if (o == null || getClass() != o.getClass()) return false;
50+
if (!super.equals(o)) return false;
51+
SetupTfRouteCommand that = (SetupTfRouteCommand) o;
52+
return Objects.equals(privateIp, that.privateIp) && Objects.equals(publicIp, that.publicIp) && Objects.equals(srcNetwork, that.srcNetwork);
53+
}
54+
55+
@Override
56+
public int hashCode() {
57+
return Objects.hash(super.hashCode(), privateIp, publicIp, srcNetwork);
58+
}
59+
60+
@Override
61+
public boolean executeInSequence() {
62+
return false;
63+
}
64+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package org.apache.cloudstack.network.tungsten.agent.api;
18+
19+
import com.cloud.agent.api.Command;
20+
21+
import java.util.Objects;
22+
23+
public class SetupTungstenVRouterCommand extends Command {
24+
private final String oper;
25+
private final String inf;
26+
private final String subnet;
27+
private final String route;
28+
private final String vrf;
29+
30+
public SetupTungstenVRouterCommand(final String oper, final String inf, final String subnet, final String route,
31+
final String vrf) {
32+
this.oper = oper;
33+
this.inf = inf;
34+
this.subnet = subnet;
35+
this.route = route;
36+
this.vrf = vrf;
37+
}
38+
39+
public String getOper() {
40+
return oper;
41+
}
42+
43+
public String getInf() {
44+
return inf;
45+
}
46+
47+
public String getSubnet() {
48+
return subnet;
49+
}
50+
51+
public String getRoute() {
52+
return route;
53+
}
54+
55+
public String getVrf() {
56+
return vrf;
57+
}
58+
59+
@Override
60+
public boolean equals(Object o) {
61+
if (this == o) return true;
62+
if (o == null || getClass() != o.getClass()) return false;
63+
if (!super.equals(o)) return false;
64+
SetupTungstenVRouterCommand that = (SetupTungstenVRouterCommand) o;
65+
return Objects.equals(oper, that.oper) && Objects.equals(inf, that.inf) && Objects.equals(subnet, that.subnet) && Objects.equals(route, that.route) && Objects.equals(vrf, that.vrf);
66+
}
67+
68+
@Override
69+
public int hashCode() {
70+
return Objects.hash(super.hashCode(), oper, inf, subnet, route, vrf);
71+
}
72+
73+
@Override
74+
public boolean executeInSequence() {
75+
return false;
76+
}
77+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package org.apache.cloudstack.network.tungsten.agent.api;
18+
19+
import com.cloud.agent.api.Command;
20+
21+
import java.util.Objects;
22+
23+
public class UpdateTungstenLoadbalancerSslCommand extends Command {
24+
private final String lbUuid;
25+
private final String sslCertName;
26+
private final String certificateKey;
27+
private final String privateKey;
28+
private final String privateIp;
29+
private final String port;
30+
31+
public UpdateTungstenLoadbalancerSslCommand(final String lbUuid, final String sslCertName,
32+
final String certificateKey, final String privateKey, final String privateIp, final String port) {
33+
this.lbUuid = lbUuid;
34+
this.sslCertName = sslCertName;
35+
this.certificateKey = certificateKey;
36+
this.privateKey = privateKey;
37+
this.privateIp = privateIp;
38+
this.port = port;
39+
}
40+
41+
public String getLbUuid() {
42+
return lbUuid;
43+
}
44+
45+
public String getSslCertName() {
46+
return sslCertName;
47+
}
48+
49+
public String getCertificateKey() {
50+
return certificateKey;
51+
}
52+
53+
public String getPrivateKey() {
54+
return privateKey;
55+
}
56+
57+
public String getPrivateIp() {
58+
return privateIp;
59+
}
60+
61+
public String getPort() {
62+
return port;
63+
}
64+
65+
@Override
66+
public boolean executeInSequence() {
67+
return false;
68+
}
69+
70+
@Override
71+
public boolean equals(Object o) {
72+
if (this == o) return true;
73+
if (o == null || getClass() != o.getClass()) return false;
74+
if (!super.equals(o)) return false;
75+
UpdateTungstenLoadbalancerSslCommand that = (UpdateTungstenLoadbalancerSslCommand) o;
76+
return Objects.equals(lbUuid, that.lbUuid) && Objects.equals(sslCertName, that.sslCertName) && Objects.equals(certificateKey, that.certificateKey) && Objects.equals(privateKey, that.privateKey) && Objects.equals(privateIp, that.privateIp) && Objects.equals(port, that.port);
77+
}
78+
79+
@Override
80+
public int hashCode() {
81+
return Objects.hash(super.hashCode(), lbUuid, sslCertName, certificateKey, privateKey, privateIp, port);
82+
}
83+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package org.apache.cloudstack.network.tungsten.agent.api;
18+
19+
import com.cloud.agent.api.Command;
20+
21+
import java.util.Objects;
22+
23+
public class UpdateTungstenLoadbalancerStatsCommand extends Command {
24+
private final String lbUuid;
25+
private final String lbStatsPort;
26+
private final String lbStatsUri;
27+
private final String lbStatsAuth;
28+
29+
public UpdateTungstenLoadbalancerStatsCommand(final String lbUuid, final String lbStatsPort,
30+
final String lbStatsUri, final String lbStatsAuth) {
31+
this.lbUuid = lbUuid;
32+
this.lbStatsPort = lbStatsPort;
33+
this.lbStatsUri = lbStatsUri;
34+
this.lbStatsAuth = lbStatsAuth;
35+
}
36+
37+
public String getLbUuid() {
38+
return lbUuid;
39+
}
40+
41+
public String getLbStatsPort() {
42+
return lbStatsPort;
43+
}
44+
45+
public String getLbStatsUri() {
46+
return lbStatsUri;
47+
}
48+
49+
public String getLbStatsAuth() {
50+
return lbStatsAuth;
51+
}
52+
53+
@Override
54+
public boolean executeInSequence() {
55+
return false;
56+
}
57+
58+
@Override
59+
public boolean equals(Object o) {
60+
if (this == o) return true;
61+
if (o == null || getClass() != o.getClass()) return false;
62+
if (!super.equals(o)) return false;
63+
UpdateTungstenLoadbalancerStatsCommand that = (UpdateTungstenLoadbalancerStatsCommand) o;
64+
return Objects.equals(lbUuid, that.lbUuid) && Objects.equals(lbStatsPort, that.lbStatsPort) && Objects.equals(lbStatsUri, that.lbStatsUri) && Objects.equals(lbStatsAuth, that.lbStatsAuth);
65+
}
66+
67+
@Override
68+
public int hashCode() {
69+
return Objects.hash(super.hashCode(), lbUuid, lbStatsPort, lbStatsUri, lbStatsAuth);
70+
}
71+
}

plugins/network-elements/tungsten/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@
3030
<relativePath>../../pom.xml</relativePath>
3131
</parent>
3232

33-
<repositories>
34-
<repository>
35-
<id>juniper-tungsten-api</id>
36-
<url>https://github.com/radu-todirica/tungsten-api/raw/master</url>
37-
</repository>
38-
</repositories>
39-
4033
<dependencies>
4134
<dependency>
4235
<groupId>net.juniper.tungsten</groupId>

plugins/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
<module>network-elements/stratosphere-ssp</module>
112112
<module>network-elements/brocade-vcs</module>
113113
<module>network-elements/vxlan</module>
114-
<module>network-elements/tungsten</module>
115114

116115
<module>outofbandmanagement-drivers/ipmitool</module>
117116
<module>outofbandmanagement-drivers/nested-cloudstack</module>
@@ -230,6 +229,7 @@
230229
<module>hypervisors/vmware</module>
231230
<module>network-elements/cisco-vnmc</module>
232231
<module>network-elements/juniper-contrail</module>
232+
<module>network-elements/tungsten</module>
233233
</modules>
234234
</profile>
235235
<profile>

0 commit comments

Comments
 (0)