You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2022/03/03 06:32:17 UTC
[airavata-mft] branch master updated: Refactoring common clients
This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-mft.git
The following commit(s) were added to refs/heads/master by this push:
new a2566f6 Refactoring common clients
a2566f6 is described below
commit a2566f63bd9f26258b91e9660f407d281985e61c
Author: Dimuthu Wannipurage <di...@gmail.com>
AuthorDate: Thu Mar 3 01:32:08 2022 -0500
Refactoring common clients
---
admin/pom.xml | 31 ------------
agent/pom.xml | 2 +-
api/service/pom.xml | 2 +-
common/common-clients/pom.xml | 57 ++++++++++++++++++++++
.../apache/airavata/mft/admin/MFTConsulClient.java | 4 +-
.../mft/admin/MFTConsulClientException.java | 0
.../apache/airavata/mft/admin/SyncRPCClient.java | 0
.../airavata/mft/admin/models/AgentInfo.java | 0
.../airavata/mft/admin/models/TransferState.java | 0
.../mft/admin/models/rpc/SyncRPCRequest.java | 0
.../mft/admin/models/rpc/SyncRPCResponse.java | 0
common/pom.xml | 22 +++++++++
controller/pom.xml | 2 +-
pom.xml | 1 -
14 files changed, 85 insertions(+), 36 deletions(-)
diff --git a/admin/pom.xml b/admin/pom.xml
deleted file mode 100644
index 80fa5da..0000000
--- a/admin/pom.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>airavata-mft</artifactId>
- <groupId>org.apache.airavata</groupId>
- <version>0.01-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>mft-admin</artifactId>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>mft-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.orbitz.consul</groupId>
- <artifactId>consul-client</artifactId>
- <version>${consul.client}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.airavata</groupId>
- <artifactId>mft-api-stub</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
diff --git a/agent/pom.xml b/agent/pom.xml
index cde94f0..7e3a9cd 100644
--- a/agent/pom.xml
+++ b/agent/pom.xml
@@ -81,7 +81,7 @@
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>mft-admin</artifactId>
+ <artifactId>mft-common-clients</artifactId>
<version>0.01-SNAPSHOT</version>
</dependency>
<dependency>
diff --git a/api/service/pom.xml b/api/service/pom.xml
index 7f4459f..fdf6f6f 100644
--- a/api/service/pom.xml
+++ b/api/service/pom.xml
@@ -52,7 +52,7 @@
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>mft-admin</artifactId>
+ <artifactId>mft-common-clients</artifactId>
<version>0.01-SNAPSHOT</version>
</dependency>
<dependency>
diff --git a/common/common-clients/pom.xml b/common/common-clients/pom.xml
new file mode 100644
index 0000000..19fb766
--- /dev/null
+++ b/common/common-clients/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>mft-common</artifactId>
+ <groupId>org.apache.airavata</groupId>
+ <version>0.01-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>mft-common-clients</artifactId>
+
+ <properties>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>mft-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.orbitz.consul</groupId>
+ <artifactId>consul-client</artifactId>
+ <version>${consul.client}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>mft-api-stub</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
diff --git a/admin/src/main/java/org/apache/airavata/mft/admin/MFTConsulClient.java b/common/common-clients/src/main/java/org/apache/airavata/mft/admin/MFTConsulClient.java
similarity index 98%
rename from admin/src/main/java/org/apache/airavata/mft/admin/MFTConsulClient.java
rename to common/common-clients/src/main/java/org/apache/airavata/mft/admin/MFTConsulClient.java
index 8b0077f..e46fc9b 100644
--- a/admin/src/main/java/org/apache/airavata/mft/admin/MFTConsulClient.java
+++ b/common/common-clients/src/main/java/org/apache/airavata/mft/admin/MFTConsulClient.java
@@ -27,7 +27,8 @@ import com.orbitz.consul.ConsulException;
import com.orbitz.consul.KeyValueClient;
import com.orbitz.consul.SessionClient;
import com.orbitz.consul.model.kv.Value;
-import org.apache.airavata.mft.admin.models.*;
+import org.apache.airavata.mft.admin.models.AgentInfo;
+import org.apache.airavata.mft.admin.models.TransferState;
import org.apache.airavata.mft.admin.models.rpc.SyncRPCRequest;
import org.apache.airavata.mft.admin.models.rpc.SyncRPCResponse;
import org.apache.airavata.mft.api.service.TransferApiRequest;
@@ -39,6 +40,7 @@ import java.util.*;
import java.util.stream.Collectors;
import static com.google.common.net.HostAndPort.*;
+import static com.google.common.net.HostAndPort.fromParts;
/*
mft/agents/messages/{agent-id} -> message
diff --git a/admin/src/main/java/org/apache/airavata/mft/admin/MFTConsulClientException.java b/common/common-clients/src/main/java/org/apache/airavata/mft/admin/MFTConsulClientException.java
similarity index 100%
rename from admin/src/main/java/org/apache/airavata/mft/admin/MFTConsulClientException.java
rename to common/common-clients/src/main/java/org/apache/airavata/mft/admin/MFTConsulClientException.java
diff --git a/admin/src/main/java/org/apache/airavata/mft/admin/SyncRPCClient.java b/common/common-clients/src/main/java/org/apache/airavata/mft/admin/SyncRPCClient.java
similarity index 100%
rename from admin/src/main/java/org/apache/airavata/mft/admin/SyncRPCClient.java
rename to common/common-clients/src/main/java/org/apache/airavata/mft/admin/SyncRPCClient.java
diff --git a/admin/src/main/java/org/apache/airavata/mft/admin/models/AgentInfo.java b/common/common-clients/src/main/java/org/apache/airavata/mft/admin/models/AgentInfo.java
similarity index 100%
rename from admin/src/main/java/org/apache/airavata/mft/admin/models/AgentInfo.java
rename to common/common-clients/src/main/java/org/apache/airavata/mft/admin/models/AgentInfo.java
diff --git a/admin/src/main/java/org/apache/airavata/mft/admin/models/TransferState.java b/common/common-clients/src/main/java/org/apache/airavata/mft/admin/models/TransferState.java
similarity index 100%
rename from admin/src/main/java/org/apache/airavata/mft/admin/models/TransferState.java
rename to common/common-clients/src/main/java/org/apache/airavata/mft/admin/models/TransferState.java
diff --git a/admin/src/main/java/org/apache/airavata/mft/admin/models/rpc/SyncRPCRequest.java b/common/common-clients/src/main/java/org/apache/airavata/mft/admin/models/rpc/SyncRPCRequest.java
similarity index 100%
rename from admin/src/main/java/org/apache/airavata/mft/admin/models/rpc/SyncRPCRequest.java
rename to common/common-clients/src/main/java/org/apache/airavata/mft/admin/models/rpc/SyncRPCRequest.java
diff --git a/admin/src/main/java/org/apache/airavata/mft/admin/models/rpc/SyncRPCResponse.java b/common/common-clients/src/main/java/org/apache/airavata/mft/admin/models/rpc/SyncRPCResponse.java
similarity index 100%
rename from admin/src/main/java/org/apache/airavata/mft/admin/models/rpc/SyncRPCResponse.java
rename to common/common-clients/src/main/java/org/apache/airavata/mft/admin/models/rpc/SyncRPCResponse.java
diff --git a/common/pom.xml b/common/pom.xml
index cee2822..2ad33d7 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -13,6 +34,7 @@
<packaging>pom</packaging>
<modules>
<module>mft-common-proto</module>
+ <module>common-clients</module>
</modules>
</project>
\ No newline at end of file
diff --git a/controller/pom.xml b/controller/pom.xml
index a701432..a922c84 100644
--- a/controller/pom.xml
+++ b/controller/pom.xml
@@ -35,7 +35,7 @@
<dependencies>
<dependency>
<groupId>org.apache.airavata</groupId>
- <artifactId>mft-admin</artifactId>
+ <artifactId>mft-common-clients</artifactId>
<version>0.01-SNAPSHOT</version>
</dependency>
<dependency>
diff --git a/pom.xml b/pom.xml
index 2283ba6..d57ae7d 100755
--- a/pom.xml
+++ b/pom.xml
@@ -47,7 +47,6 @@
<module>transport</module>
<module>agent</module>
<module>services</module>
- <module>admin</module>
<module>controller</module>
<module>examples</module>
</modules>