Skip to content

Commit

Permalink
Update CDAB Test Suite links and add UsgsDataWrapper support
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Mar 18, 2024
1 parent 520c9d8 commit 6b729f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The CDAB Test Suite is built automatically providing a docker image available pu

# Getting Started

You can start now using the Test Suite following the [Getting Started guide](https://github.com/Terradue/cdab-testsuite/wiki)
You can start now using the Test Suite following the [Getting Started guide](https://github.com/esacdab/cdab-testsuite/wiki)

# Software licenses

Expand Down
13 changes: 5 additions & 8 deletions src/cdab-client/Target/TargetSiteWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ the licensors of this Program grant you additional permission to convey or distr
// using Terradue.OpenSearch.Usgs;
using System.Net.Http;
using Terradue.OpenSearch.Asf;
using Terradue.OpenSearch.Usgs;

namespace cdabtesttools.Target
{
Expand Down Expand Up @@ -331,10 +332,10 @@ public static IDataHubSourceWrapper CreateDataAccessWrapper(TargetSiteConfigurat
return new AsfApiWrapper(targetUri, (NetworkCredential)targetCredentials);
}

// if (targetUri.Host == "m2m.cr.usgs.gov")
// {
// return new UsgsDataWrapper(new Uri(string.Format("https://m2m.cr.usgs.gov/api/api")), (NetworkCredential)targetCredentials);
// }
if (targetUri.Host == "m2m.cr.usgs.gov")
{
return new UsgsDataWrapper(new Uri(string.Format("https://m2m.cr.usgs.gov")), (NetworkCredential)targetCredentials);
}

if (targetUri.Host.EndsWith("copernicus.eu") || targetUri.AbsolutePath.EndsWith("/dhus"))
{
Expand All @@ -350,17 +351,13 @@ public static IDataHubSourceWrapper CreateDataAccessWrapper(TargetSiteConfigurat

if (targetUri.Host.EndsWith("amazon.com"))
{
//var searchWrapper = new DHuSWrapper(new Uri("https://scihub.copernicus.eu/apihub"), (NetworkCredential)targetCredentials);
//var amazonWrapper = new AmazonOldWrapper(targetSiteConfig.Data.S3SecretKey, targetSiteConfig.Data.S3KeyId, searchWrapper);
var amazonWrapper = new AmazonStacWrapper(targetSiteConfig.Data.S3SecretKey, targetSiteConfig.Data.S3KeyId, (NetworkCredential)targetCredentials);
amazonWrapper.AllowOpenSearch = targetSiteConfig.Data.Catalogue.AllowOpenSearch;
return amazonWrapper;
}

if (targetUri.Host.EndsWith("googleapis.com") || targetUri.Host.EndsWith("google.com"))
{
//var searchWrapper = new DHuSWrapper(new Uri("https://scihub.copernicus.eu/apihub"), (NetworkCredential)targetCredentials);
//var googleWrapper = new GoogleWrapper(targetSiteConfig.AccountFile, targetSiteConfig.ProjectId, searchWrapper);
var googleWrapper = new GoogleWrapper(targetSiteConfig.AccountFile, targetSiteConfig.ProjectId, (NetworkCredential)targetCredentials, "https://cloud.google.com");
return googleWrapper;
}
Expand Down
2 changes: 1 addition & 1 deletion src/cdab-client/cdab-client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<PackageReference Include="Mono.Options" Version="5.3.0.1" />
<PackageReference Include="Terradue.OpenSearch" Version="1.21.0" />
<PackageReference Include="Terradue.OpenSearch.SciHub" Version="1.40.0" />
<!-- <PackageReference Include="Terradue.OpenSearch.Usgs" Version="1.5.0" /> -->
<PackageReference Include="Terradue.OpenSearch.Usgs" Version="1.7.0" />
<PackageReference Include="Terradue.OpenSearch.Asf" Version="1.4.7" />
<PackageReference Include="Terradue.GeoJson" Version="1.12.0" />
<PackageReference Include="Terradue.ServiceModel.Syndication" Version="1.1.1" />
Expand Down

0 comments on commit 6b729f8

Please sign in to comment.