commit 586d2e666ce467a57a2416ae45db11ef8c272143 Author: Lucio Lelii Date: Mon Oct 3 10:21:52 2016 +0000 branch for release 4.1 git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/branches/information-system/icproxy/1.1@132336 82a268e6-3cf1-43bd-a215-b396298e98cf diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..e43402f --- /dev/null +++ b/.classpath @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..5f2b4dc --- /dev/null +++ b/.project @@ -0,0 +1,29 @@ + + + icproxy + + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec4300d --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/distro/LICENSE b/distro/LICENSE new file mode 100644 index 0000000..3695e26 --- /dev/null +++ b/distro/LICENSE @@ -0,0 +1 @@ +${gcube.license} diff --git a/distro/README b/distro/README new file mode 100644 index 0000000..4f0f224 --- /dev/null +++ b/distro/README @@ -0,0 +1,62 @@ +The gCube System - ${name} +-------------------------------------------------- + +${description} + + +${gcube.description} + +${gcube.funding} + + +Version +-------------------------------------------------- + +${version} (${buildDate}) + +Please see the file named "changelog.xml" in this directory for the release notes. + + +Authors +-------------------------------------------------- + +* Lucio Lelii (lucio.lelii-AT-isti.cnr.it), CNR, Italy + +Maintainers +-------------------------------------------------- + +* Lucio Lelii (lucio.lelii-AT-isti.cnr.it), CNR, Italy + +Download information +-------------------------------------------------- + +Source code is available from SVN: + ${scm.url} + +Binaries can be downloaded from the gCube website: + ${gcube.website} + + +Installation +-------------------------------------------------- + +Installation documentation is available on-line in the gCube Wiki: + ${gcube.wikiRoot} + +Documentation +-------------------------------------------------- + +Documentation is available on-line in the gCube Wiki: + ${gcube.wikiRoot} + +Support +-------------------------------------------------- + +Bugs and support requests can be reported in the gCube issue tracking tool: + ${gcube.issueTracking} + + +Licensing +-------------------------------------------------- + +This software is licensed under the terms you may find in the file named "LICENSE" in this directory. diff --git a/distro/changelog.xml b/distro/changelog.xml new file mode 100644 index 0000000..06a4db7 --- /dev/null +++ b/distro/changelog.xml @@ -0,0 +1,8 @@ + + + First Release + + + Porting to auth2 + + \ No newline at end of file diff --git a/distro/descriptor.xml b/distro/descriptor.xml new file mode 100644 index 0000000..5ba272a --- /dev/null +++ b/distro/descriptor.xml @@ -0,0 +1,35 @@ + + servicearchive + + tar.gz + + / + + + ${distroDirectory} + / + true + + README + LICENSE + changelog.xml + + 755 + true + + + + + ${distroDirectory}/profile.xml + / + true + + + target/${build.finalName}.war + /${artifactId} + + + diff --git a/distro/profile.xml b/distro/profile.xml new file mode 100644 index 0000000..f6970f3 --- /dev/null +++ b/distro/profile.xml @@ -0,0 +1,26 @@ + + + + Service + + ${description} + InformationSystem + ${artifactId} + 1.0.0 + + + ${artifactId} + ${version} + + ${groupId} + ${artifactId} + ${version} + + + ${build.finalName}.jar + + + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..306699f --- /dev/null +++ b/pom.xml @@ -0,0 +1,162 @@ + + 4.0.0 + org.gcube.information-system + icproxy + 1.1.0-SNAPSHOT + ICProxy + + war + + + + + https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/icproxy + + + + distro + + + + + + org.gcube.distribution + maven-smartgears-bom + 2.0.0-SNAPSHOT + pom + import + + + org.glassfish.jersey + jersey-bom + 2.23.2 + pom + import + + + + + + + + + + org.gcube.core + common-smartgears + + + org.gcube.core + common-smartgears-app + + + org.gcube.resources.discovery + discovery-client + + + org.gcube.resources.discovery + ic-client + + + + + + org.glassfish.jersey.containers + jersey-container-servlet-core + + + + org.glassfish.jersey.containers + + jersey-container-servlet + + + + javax.servlet + javax.servlet-api + 3.0.1 + provided + + + + org.slf4j + slf4j-api + + + + ch.qos.logback + logback-classic + 1.0.13 + + + + + + + org.projectlombok + lombok + 0.11.6 + + + + org.glassfish.jersey.test-framework + jersey-test-framework-util + test + + + + org.glassfish.jersey.test-framework.providers + jersey-test-framework-provider-simple + test + + + + junit + junit + 4.12 + test + + + + + ${artifactId} + + + maven-compiler-plugin + 2.3.2 + + 1.7 + 1.7 + + + + org.apache.maven.plugins + maven-war-plugin + 2.4 + + icproxy + false + + + + org.apache.maven.plugins + maven-assembly-plugin + + + ${distroDirectory}/descriptor.xml + + + + + servicearchive + install + + single + + + + + + + + \ No newline at end of file diff --git a/src/main/java/org/gcube/informationsystem/icproxy/ICProxy.java b/src/main/java/org/gcube/informationsystem/icproxy/ICProxy.java new file mode 100644 index 0000000..831f1ec --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/icproxy/ICProxy.java @@ -0,0 +1,14 @@ +package org.gcube.informationsystem.icproxy; + +import javax.ws.rs.ApplicationPath; + +import org.glassfish.jersey.server.ResourceConfig; + +@ApplicationPath("/gcube/service/") +public class ICProxy extends ResourceConfig { + + public ICProxy() { + packages("org.gcube.informationsystem.icproxy.resources"); + } + +} diff --git a/src/main/java/org/gcube/informationsystem/icproxy/resources/GCoreEndpointResource.java b/src/main/java/org/gcube/informationsystem/icproxy/resources/GCoreEndpointResource.java new file mode 100644 index 0000000..32459a4 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/icproxy/resources/GCoreEndpointResource.java @@ -0,0 +1,77 @@ +package org.gcube.informationsystem.icproxy.resources; + + +import static org.gcube.resources.discovery.icclient.ICFactory.client; +import static org.gcube.resources.discovery.icclient.ICFactory.queryFor; + +import java.util.List; + +import javax.validation.constraints.NotNull; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +import lombok.extern.slf4j.Slf4j; + +import org.gcube.common.resources.gcore.GCoreEndpoint; +import org.gcube.common.scope.api.ScopeProvider; +import org.gcube.resources.discovery.client.api.DiscoveryClient; +import org.gcube.resources.discovery.client.queries.api.SimpleQuery; + + +@Path("GCoreEndpoint") +@Slf4j +public class GCoreEndpointResource { + + + @GET + @Path("/{class}{name:(/[^/?$]+)?}") + @Produces(MediaType.TEXT_XML) + public String retrieveCustom(@NotNull @PathParam("class") String serviceClass, + @PathParam("name") String serviceName, @QueryParam("result") String resultXPath) { + try{ + String scope = ScopeProvider.instance.get(); + log.info("gcoreendpoint wuth result called with serviceclass {} and servicename {} and result {} in scope {}",serviceClass, serviceName, resultXPath, scope); + + + SimpleQuery query = createClassQuery(serviceClass); + if (serviceName!=null && !serviceName.isEmpty() ){ + serviceName = serviceName.replace("/", ""); + query.addCondition(String.format("$resource/Profile/ServiceName/text() eq '%s'",serviceName)); + } + + if (resultXPath!=null && !resultXPath.isEmpty()) + if (resultXPath.startsWith("/")) + query.setResult("$resource"+resultXPath); + else + query.setResult("$resource/"+resultXPath); + + DiscoveryClient client = client(); + List endpoints = client.submit(query); + StringBuilder builder = new StringBuilder(""); + for (String single: endpoints) + builder.append("").append(single.replaceAll("\n", "")).append(""); + + builder.append(""); + + log.debug("retrieved resources are "+endpoints.size()); + return builder.toString(); + }catch(Exception e){ + throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST) + .entity("Error : "+e.getMessage()).type(MediaType.TEXT_PLAIN).build()); + } + } + + SimpleQuery createClassQuery(String serviceClass){ + SimpleQuery query = queryFor(GCoreEndpoint.class); + query.addCondition(String.format("$resource/Profile/ServiceClass/text() eq '%s'",serviceClass)); + query.addCondition("$resource/Profile/DeploymentData/Status/text() eq 'ready'"); + return query; + } + +} diff --git a/src/main/java/org/gcube/informationsystem/icproxy/resources/GenericResourceResource.java b/src/main/java/org/gcube/informationsystem/icproxy/resources/GenericResourceResource.java new file mode 100644 index 0000000..1b80209 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/icproxy/resources/GenericResourceResource.java @@ -0,0 +1,63 @@ +package org.gcube.informationsystem.icproxy.resources; + +import static org.gcube.resources.discovery.icclient.ICFactory.clientFor; +import static org.gcube.resources.discovery.icclient.ICFactory.queryFor; + +import java.util.List; + +import javax.validation.constraints.NotNull; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import lombok.extern.slf4j.Slf4j; + +import org.gcube.common.resources.gcore.GenericResource; +import org.gcube.common.scope.api.ScopeProvider; +import org.gcube.resources.discovery.client.api.DiscoveryClient; +import org.gcube.resources.discovery.client.queries.api.SimpleQuery; + +@Path("GenericResource") +@Slf4j +public class GenericResourceResource { + + + @GET + @Path("/{secondaryType}/{name}") + @Produces(MediaType.APPLICATION_XML) + public List retrieveByTypeAndName(@NotNull @PathParam("secondaryType") String secondaryType, + @NotNull @PathParam("name") String resourceName) { + + String scope = ScopeProvider.instance.get(); + log.info("genericResource called with secondaryType {} and name {} in scope {}",secondaryType, resourceName, scope); + SimpleQuery query = createSecondaryTypeQuery(secondaryType) + .addCondition(String.format("$resource/Profile/Name/text() eq '%s'",resourceName)); + DiscoveryClient client = clientFor(GenericResource.class); + List endpoints = client.submit(query); + log.debug("retrieved resources are "+endpoints.size()); + return endpoints; + } + + @GET + @Path("/{secondaryType}") + @Produces(MediaType.APPLICATION_XML) + public List retrieveByType(@NotNull @PathParam("secondaryType") String secondaryType, + @NotNull @PathParam("name") String resourceName) { + String scope = ScopeProvider.instance.get(); + log.info("genericResource called with secondaryType {} in scope {}",secondaryType, scope); + SimpleQuery query = createSecondaryTypeQuery(secondaryType); + DiscoveryClient client = clientFor(GenericResource.class); + List endpoints = client.submit(query); + log.debug("retrieved resources are "+endpoints.size()); + return endpoints; + } + + SimpleQuery createSecondaryTypeQuery(String secondaryTpe){ + SimpleQuery query = queryFor(GenericResource.class); + query.addCondition(String.format("$resource/Profile/SecondaryType/text() eq '%s'",secondaryTpe)); + return query; + } + +} diff --git a/src/main/java/org/gcube/informationsystem/icproxy/resources/HostingNodeResource.java b/src/main/java/org/gcube/informationsystem/icproxy/resources/HostingNodeResource.java new file mode 100644 index 0000000..31aeba9 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/icproxy/resources/HostingNodeResource.java @@ -0,0 +1,77 @@ +package org.gcube.informationsystem.icproxy.resources; + +import static org.gcube.resources.discovery.icclient.ICFactory.client; +import static org.gcube.resources.discovery.icclient.ICFactory.clientFor; +import static org.gcube.resources.discovery.icclient.ICFactory.queryFor; + +import java.util.List; + +import javax.validation.constraints.NotNull; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.MediaType; + +import lombok.extern.slf4j.Slf4j; + +import org.gcube.common.resources.gcore.GCoreEndpoint; +import org.gcube.common.resources.gcore.HostingNode; +import org.gcube.resources.discovery.client.api.DiscoveryClient; +import org.gcube.resources.discovery.client.queries.api.SimpleQuery; + +@Slf4j +@Path("HostingNode") +public class HostingNodeResource { + + @GET + @Produces(MediaType.APPLICATION_XML) + public List retrieve() { + SimpleQuery query = queryFor(HostingNode.class); + query.addCondition("$resource/Profile/GHNDescription/Status/text() eq \"certified\""); + DiscoveryClient client = clientFor(HostingNode.class); + List endpoints = client.submit(query); + log.debug("retrieved resources are "+endpoints.size()); + return endpoints; + } + + @GET + @Path("/{id}/GCoreEnpoints") + @Produces(MediaType.APPLICATION_XML) + public List retrieveGcoreEnpoints(@NotNull @PathParam("id") String id) { + log.info("hostingnode called for GCoreEndpoint running on HostingNode with id {}",id); + SimpleQuery query = queryFor(GCoreEndpoint.class); + query.addCondition(String.format("$resource/Profile/GHN/@UniqueID/string() eq '%s'",id)); + DiscoveryClient client = clientFor(GCoreEndpoint.class); + List endpoints = client.submit(query); + log.debug("retrieved resources are "+endpoints.size()); + return endpoints; + } + + @GET + @Path("/CustomQuery") + @Produces(MediaType.TEXT_XML) + public String retrieve(@NotNull @QueryParam("result") String resultXPath) { + log.info("hostingnode called (with result {}) ", resultXPath); + + SimpleQuery query = queryFor(HostingNode.class); + + if (resultXPath!=null && !resultXPath.isEmpty()) + if (resultXPath.startsWith("/")) + query.setResult("$resource"+resultXPath); + else + query.setResult("$resource/"+resultXPath); + + query.addCondition("$resource/Profile/GHNDescription/Status/text() eq \"certified\""); + DiscoveryClient client = client(); + List endpoints = client.submit(query); + StringBuilder builder = new StringBuilder(""); + for (String single: endpoints) + builder.append("").append(single.replaceAll("\n", "")).append(""); + builder.append(""); + log.debug("retrieved resources are "+endpoints.size()); + return builder.toString(); + } + +} diff --git a/src/main/java/org/gcube/informationsystem/icproxy/resources/ICResource.java b/src/main/java/org/gcube/informationsystem/icproxy/resources/ICResource.java new file mode 100644 index 0000000..12594c2 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/icproxy/resources/ICResource.java @@ -0,0 +1,42 @@ +package org.gcube.informationsystem.icproxy.resources; + +import java.util.List; + +import javax.validation.constraints.NotNull; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +import lombok.extern.slf4j.Slf4j; + +import org.gcube.resources.discovery.client.api.DiscoveryClient; +import org.gcube.resources.discovery.client.queries.api.Query; +import org.gcube.resources.discovery.client.queries.impl.QueryBox; +import org.gcube.resources.discovery.icclient.ICFactory; + +@Path("/") +@Slf4j +public class ICResource { + + @GET + @Path("/{id}") + @Produces(MediaType.TEXT_PLAIN) + public String getById(@NotNull @PathParam("id") String id){ + log.info("resource request with id ",id); + + Query q = new QueryBox(String.format("declare namespace ic = 'http://gcube-system.org/namespaces/informationsystem/registry'; " + + "for $resource in collection('/db/Profiles')//Document/Data/ic:Profile/Resource " + + "where ($resource/ID/text() eq '%s') return $resource", id)); + DiscoveryClient client = ICFactory.client(); + List resources = client.submit(q); + if (resources.size()>0) + return resources.get(0); + else throw new WebApplicationException("id "+id+" not found",Response.Status.NOT_FOUND); + + } + +} diff --git a/src/main/java/org/gcube/informationsystem/icproxy/resources/ServiceEndpointResource.java b/src/main/java/org/gcube/informationsystem/icproxy/resources/ServiceEndpointResource.java new file mode 100644 index 0000000..eb672e2 --- /dev/null +++ b/src/main/java/org/gcube/informationsystem/icproxy/resources/ServiceEndpointResource.java @@ -0,0 +1,75 @@ +package org.gcube.informationsystem.icproxy.resources; + +import static org.gcube.resources.discovery.icclient.ICFactory.client; +import static org.gcube.resources.discovery.icclient.ICFactory.clientFor; +import static org.gcube.resources.discovery.icclient.ICFactory.queryFor; + +import java.util.List; + +import javax.validation.constraints.NotNull; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import lombok.extern.slf4j.Slf4j; + +import org.gcube.common.resources.gcore.ServiceEndpoint; +import org.gcube.common.scope.api.ScopeProvider; +import org.gcube.resources.discovery.client.api.DiscoveryClient; +import org.gcube.resources.discovery.client.queries.api.SimpleQuery; + +@Slf4j +@Path("ServiceEndpoint") +public class ServiceEndpointResource { + + @GET + @Path("/{category}/{name}") + @Produces(MediaType.APPLICATION_XML) + public List retrieve(@NotNull @PathParam("name") String resourceName, + @NotNull @PathParam("category") String resourceCategory) { + log.info("ServiceEndpoint called with category {} and name {} in scope {}",resourceCategory, resourceName, ScopeProvider.instance.get()); + + DiscoveryClient client = clientFor(ServiceEndpoint.class); + + List endpoints = client.submit(getQuery(resourceName, resourceCategory)); + log.debug("retrieved resources are "+endpoints.size()); + return endpoints; + } + + @GET + @Path("/{category}/{name}/Result/{result:([^$\\?]+)}") + @Produces(MediaType.TEXT_XML) + public String retrieveCustom(@NotNull @PathParam("name") String resourceName, + @NotNull @PathParam("category") String resourceCategory, @NotNull @PathParam("result") String resultXPath) { + log.info("ServiceEndpoint called with category {} and name {} and result {} in scope {}" + ,resourceCategory, resourceName, resultXPath, ScopeProvider.instance.get()); + + SimpleQuery query = getQuery(resourceName, resourceCategory); + + if (resultXPath.startsWith("/")) + query.setResult("$resource"+resultXPath); + else + query.setResult("$resource/"+resultXPath); + + DiscoveryClient client = client(); + List endpoints = client.submit(query); + StringBuilder builder = new StringBuilder(""); + for (String single: endpoints) + builder.append("").append(single.replaceAll("\n", "")).append(""); + + builder.append(""); + + log.debug("retrieved resources are "+endpoints.size()); + return builder.toString(); + } + + private SimpleQuery getQuery(String resourceName, String resourceCategory){ + SimpleQuery query = queryFor(ServiceEndpoint.class); + query.addCondition(String.format("$resource/Profile/Name/text() eq '%s'",resourceName)); + query.addCondition(String.format("$resource/Profile/Category/text() eq '%s'",resourceCategory)); + return query; + } + +} diff --git a/src/main/webapp/WEB-INF/gcube-app.xml b/src/main/webapp/WEB-INF/gcube-app.xml new file mode 100644 index 0000000..f60faa5 --- /dev/null +++ b/src/main/webapp/WEB-INF/gcube-app.xml @@ -0,0 +1,12 @@ + + ICProxy + DataAccess + 1.0.0-SNAPSHOT + icproxy webapp + + + /ServiceEndpoint/* + + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..78214bc --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,9 @@ + + + org.gcube.informationsystem.icproxy.ICProxy + + + org.gcube.informationsystem.icproxy.ICProxy + /gcube/service/* + + \ No newline at end of file diff --git a/src/test/java/org/gcube/informationsystem/icproxy/TestCall.java b/src/test/java/org/gcube/informationsystem/icproxy/TestCall.java new file mode 100644 index 0000000..bf68e34 --- /dev/null +++ b/src/test/java/org/gcube/informationsystem/icproxy/TestCall.java @@ -0,0 +1,69 @@ +package org.gcube.informationsystem.icproxy; + +import javax.ws.rs.core.Application; + +import org.gcube.informationsystem.icproxy.resources.GCoreEndpointResource; +import org.gcube.informationsystem.icproxy.resources.GenericResourceResource; +import org.gcube.informationsystem.icproxy.resources.HostingNodeResource; +import org.gcube.informationsystem.icproxy.resources.ICResource; +import org.gcube.informationsystem.icproxy.resources.ServiceEndpointResource; +import org.glassfish.jersey.server.ResourceConfig; +import org.glassfish.jersey.test.JerseyTest; +import org.junit.Test; + +public class TestCall extends JerseyTest{ + + @Override + protected Application configure() { + return new ResourceConfig(ICResource.class,GCoreEndpointResource.class, ServiceEndpointResource.class, HostingNodeResource.class, GenericResourceResource.class); + } + + @Test + public void gcoreEndpoint() { + final String ret = target("GCoreEndpoint").path("DataAnalysis").queryParam("scope", "/gcube/devsec").request().get(String.class); + System.out.println("return is "+ret); + } + + @Test + public void gcoreEndpointWithServicename() { + final String ret = target("GCoreEndpoint").path("DataAnalysis").path("RConnector") + .queryParam("scope", "/gcube/devsec") + .request().get(String.class); + System.out.println(ret); + } + + @Test + public void gcoreEndpointWithResult() { + + + final String ret = target("GCoreEndpoint").path("DataAnalysis") + .queryParam("result","/Profile/AccessPoint/RunningInstanceInterfaces//Endpoint[@EntryName/string() eq \"querymanager\"]") + .queryParam("scope", "/gcube/devsec").request().get(String.class); + System.out.println(ret); + } + + @Test + public void serviceEndpoint() { + final String ret = target("ServiceEndpoint").path("BiodiversityRepository").path("CatalogueOfLife").queryParam("scope", "/gcube/devsec").request().get(String.class); + System.out.println(ret); + } + + @Test + public void hostingNode() { + final String ret = target("HostingNode").queryParam("scope", "/gcube/devsec").request().get(String.class); + System.out.println(ret); + } + + @Test + public void gCoreEnpointsForHostingNode() { + final String ret = target("HostingNode").path("92ee1020-5604-11e3-8182-e7053f61b8fe").path("GCoreEnpoints").queryParam("scope", "/gcube/devsec").request().get(String.class); + System.out.println(ret); + } + + @Test + public void getById() { + final String ret = target("/").path("92ee1020-5604-11e3-8182-e7053f61b8fe").queryParam("scope", "/gcube/devsec").request().get(String.class); + System.out.println(ret); + } + +}