Compare commits
No commits in common. "e26477e8d1175368da37179eef7edc73face1b35" and "c066535843bba83f7f91e799ac65292b1a9a2348" have entirely different histories.
e26477e8d1
...
c066535843
Binary file not shown.
@ -9,8 +9,6 @@ import java.io.FileOutputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.net.InetSocketAddress;
|
|
||||||
import java.net.Proxy;
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.security.KeyStore;
|
import java.security.KeyStore;
|
||||||
@ -73,8 +71,6 @@ public abstract class AbstractProcess {
|
|||||||
|
|
||||||
public static ObjectMapper mapper;
|
public static ObjectMapper mapper;
|
||||||
public static ObjectMapper mapperYaml;
|
public static ObjectMapper mapperYaml;
|
||||||
|
|
||||||
public static Proxy proxy;
|
|
||||||
|
|
||||||
public final RegistryClient client;
|
public final RegistryClient client;
|
||||||
|
|
||||||
@ -93,9 +89,6 @@ public abstract class AbstractProcess {
|
|||||||
config = ConfigManager.getInstance().getConfig();
|
config = ConfigManager.getInstance().getConfig();
|
||||||
|
|
||||||
setTrustStoreCredentials();
|
setTrustStoreCredentials();
|
||||||
|
|
||||||
if (config.getProxy() != null && config.getProxy().getHost() != null && !config.getProxy().getHost().isEmpty())
|
|
||||||
proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(config.getProxy().getHost(), config.getProxy().getPort()));
|
|
||||||
|
|
||||||
javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(new javax.net.ssl.HostnameVerifier() {
|
javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(new javax.net.ssl.HostnameVerifier() {
|
||||||
public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) {
|
public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) {
|
||||||
@ -345,7 +338,7 @@ public abstract class AbstractProcess {
|
|||||||
|
|
||||||
URL url = new URL(urlStr);
|
URL url = new URL(urlStr);
|
||||||
|
|
||||||
HttpsURLConnection con = (HttpsURLConnection) url.openConnection(proxy);
|
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
|
||||||
con.setRequestMethod("POST");
|
con.setRequestMethod("POST");
|
||||||
con.setDoInput(true);
|
con.setDoInput(true);
|
||||||
con.setDoOutput(true);
|
con.setDoOutput(true);
|
||||||
@ -457,7 +450,7 @@ public abstract class AbstractProcess {
|
|||||||
|
|
||||||
URL url = new URL(urlStr);
|
URL url = new URL(urlStr);
|
||||||
|
|
||||||
HttpsURLConnection con = (HttpsURLConnection) url.openConnection(proxy);
|
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
|
||||||
con.setUseCaches(false);
|
con.setUseCaches(false);
|
||||||
con.setDoOutput(true);
|
con.setDoOutput(true);
|
||||||
configureHttpsConnection(con);
|
configureHttpsConnection(con);
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
package cz.trask.migration.impl.v32;
|
package cz.trask.migration.impl.v32;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.nio.charset.Charset;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -87,7 +85,7 @@ public class Wso2AppsToApicurio extends AbstractProcess {
|
|||||||
|
|
||||||
HttpResponse exportedZip = makeRequest(
|
HttpResponse exportedZip = makeRequest(
|
||||||
"GET", config.getSource().getAdminApiUrl() + "/export/applications?appName=" + app.getName()
|
"GET", config.getSource().getAdminApiUrl() + "/export/applications?appName=" + app.getName()
|
||||||
+ "&appOwner=" + URLEncoder.encode(app.getOwner(), Charset.forName("UTF-8")) + "&withKeys=true",
|
+ "&appOwner=" + app.getOwner() + "&withKeys=true",
|
||||||
httpHeaders, Collections.emptyMap(), true);
|
httpHeaders, Collections.emptyMap(), true);
|
||||||
|
|
||||||
List<ZipEntryData> zipEntries = ZipUtils.extractFilesFromZip(exportedZip.getResponseBytes());
|
List<ZipEntryData> zipEntries = ZipUtils.extractFilesFromZip(exportedZip.getResponseBytes());
|
||||||
@ -148,7 +146,7 @@ public class Wso2AppsToApicurio extends AbstractProcess {
|
|||||||
ApplicationList listOfApps = null;
|
ApplicationList listOfApps = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String url = adminApiUrl.concat(String.format("/applications?limit=9999"));
|
String url = adminApiUrl.concat(String.format("/applications"));
|
||||||
|
|
||||||
log.debug("Getting Applications with token: '" + tokenResponse.getAccess_token() + "' URL: " + url);
|
log.debug("Getting Applications with token: '" + tokenResponse.getAccess_token() + "' URL: " + url);
|
||||||
|
|
||||||
|
|||||||
@ -21,8 +21,6 @@ public class ApplicationConfig {
|
|||||||
private int maxThreads;
|
private int maxThreads;
|
||||||
@JsonProperty("store_migrated_artifacts")
|
@JsonProperty("store_migrated_artifacts")
|
||||||
private boolean storeMigratedArtifacts = false;
|
private boolean storeMigratedArtifacts = false;
|
||||||
@JsonProperty("proxy")
|
|
||||||
private Proxy proxy;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class TrustStore {
|
public static class TrustStore {
|
||||||
@ -68,16 +66,4 @@ public class ApplicationConfig {
|
|||||||
private String wso2ApisDir;
|
private String wso2ApisDir;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
|
||||||
public static class Proxy {
|
|
||||||
@JsonProperty("host")
|
|
||||||
private String host;
|
|
||||||
@JsonProperty("port")
|
|
||||||
private int port;
|
|
||||||
@JsonProperty("username")
|
|
||||||
private String username;
|
|
||||||
@JsonProperty("password")
|
|
||||||
private String password;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -1,7 +1,3 @@
|
|||||||
proxy:
|
|
||||||
host: proxy.jtfg.com
|
|
||||||
port: 3128
|
|
||||||
|
|
||||||
source:
|
source:
|
||||||
registration_api_url: https://developerstest.jtfg.com/client-registration/v0.17/register
|
registration_api_url: https://developerstest.jtfg.com/client-registration/v0.17/register
|
||||||
publisher_api_url: https://developerstest.jtfg.com/api/am/publisher
|
publisher_api_url: https://developerstest.jtfg.com/api/am/publisher
|
||||||
@ -12,12 +8,12 @@ source:
|
|||||||
wso2_apis_dir: apis
|
wso2_apis_dir: apis
|
||||||
|
|
||||||
target:
|
target:
|
||||||
registration_api_url: https://wso2apiportal-int.apps.oshift-int.jtfg.com/client-registration/v0.17/register
|
registration_api_url: https://localhost:9443/client-registration/v0.17/register
|
||||||
publisher_api_url: https://wso2apiportal-int.apps.oshift-int.jtfg.com/api/am/publisher/v4/apis/import
|
publisher_api_url: https://localhost:9443/api/am/publisher/v4/apis/import
|
||||||
admin_api_url: https://wso2apiportal-int.apps.oshift-int.jtfg.com/api/am/admin/v4
|
admin_api_url: https://localhost:9443/api/am/admin/v4
|
||||||
devportal_api_url: https://wso2apiportal-int.apps.oshift-int.jtfg.com/api/am/devportal
|
devportal_api_url: https://localhost:9443/api/am/devportal
|
||||||
publisher_token_url: https://wso2apiportal-int.apps.oshift-int.jtfg.com/oauth2/token
|
publisher_token_url: https://localhost:9443/oauth2/token
|
||||||
wso2_user: YWRtaW46Tiw5YzEpeFh0NTNr
|
wso2_user: YWRtaW46YWRtaW4=
|
||||||
|
|
||||||
truststore:
|
truststore:
|
||||||
path: client-truststore.jks
|
path: client-truststore.jks
|
||||||
@ -32,6 +28,6 @@ apicurio:
|
|||||||
default_api_group: api
|
default_api_group: api
|
||||||
overwrite_existing_application: true
|
overwrite_existing_application: true
|
||||||
|
|
||||||
max_threads: 1
|
max_threads: 8
|
||||||
|
|
||||||
store_migrated_artifacts: true
|
store_migrated_artifacts: true
|
||||||
Loading…
x
Reference in New Issue
Block a user