fabio.simeoni 10 years ago
parent
commit
16866bd230
  1. 2
      src/main/java/org/gcube/common/clients/fw/queries/StatelessQuery.java

2
src/main/java/org/gcube/common/clients/fw/queries/StatelessQuery.java

@ -27,6 +27,7 @@ public class StatelessQuery implements Query<EndpointReference> {
private static String classFormat = "$resource/Profile/ServiceClass/text() eq '%1s'";
private static String nameFormat = "$resource/Profile/ServiceName/text() eq '%1s'";
private static String statusFormat = "$resource/Profile/DeploymentData/Status/text() eq 'ready'";
private static String entryFormat = "$entry/@EntryName/string() eq '%1s'";
private static DiscoveryClient<String> client = ICFactory.client();
@ -42,6 +43,7 @@ public class StatelessQuery implements Query<EndpointReference> {
query = ICFactory.queryFor(GCoreEndpoint.class)
.addCondition(format(classFormat,plugin.serviceClass()))
.addCondition(format(nameFormat,plugin.serviceName()))
.addCondition(format(statusFormat))
.addVariable("$entry","$resource/Profile/AccessPoint/RunningInstanceInterfaces/Endpoint")
.addCondition(format(entryFormat,plugin.name()))
.setResult("$entry/text()");

Loading…
Cancel
Save