--- /dev/null
+ -Djavax.net.ssl.trustStore=gateway/src/test/resources/acumosTrustStore.jks -Djavax.net.ssl.trustStorePassword=acumos -Djava.security.egd=file:/dev/./urandom
<build.number>0</build.number>
<eelf.version>1.0.0</eelf.version>
<!-- tests require database to be running -->
- <skipTests>true</skipTests>
+ <skipTests>false</skipTests>
<!-- Docker daemon -->
<docker.host.url>unix:/var/run/docker.sock</docker.host.url>
<!-- Docker image registry -->
<artifactId>commons-lang3</artifactId>
<version>3.6</version>
</dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <version>3.8.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <version>1.5.3.RELEASE</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
</manifestEntries>
</archive>
</configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
}
else {
try {
- if (null == this.clients.getClient().getUser(
- this.env.getProperty("federation.operator"))) {
+ if (null == this.clients.getClient().getUser(this.env.getProperty("federation.operator"))) {
logger.warn(EELFLoggerDelegate.errorLogger, "'federation.operator' does not point to an existing user");
}
}
- catch (HttpStatusCodeException dx) {
+ catch (/*HttpStatusCode*/Exception dx) {
logger.warn(EELFLoggerDelegate.errorLogger, "failed to verify 'federation.operator' value", dx);
}
}
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ResourceLoader;
+import org.springframework.core.io.DefaultResourceLoader;
import java.net.URI;
SSLContext sslContext = null;
log.info(EELFLoggerDelegate.debugLogger, "Build HttpClient with " + this);
+ if (this.resourceLoader == null)
+ this.resourceLoader = new DefaultResourceLoader();
+
if (this.ssl == null) {
log.info(EELFLoggerDelegate.debugLogger, "No ssl config was provided");
}
}
catch (Exception x) {
throw new IllegalStateException(
- "Error loading key material", x);
+ "Error loading key material: " + x, x);
}
}
}
catch (Exception x) {
throw new IllegalStateException(
- "Error loading trust material", x);
+ "Error loading trust material: " + x, x);
}
}
--- /dev/null
+/*-
+ * ===============LICENSE_START=======================================================
+ * Acumos
+ * ===================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property & Tech Mahindra. All rights reserved.
+ * ===================================================================================
+ * This Acumos software file is distributed by AT&T and Tech Mahindra
+ * 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
+ *
+ * This file 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.
+ * ===============LICENSE_END=========================================================
+ */
+
+package org.acumos.federation.gateway.common;
+
+
+
+public class HttpClientConfigurationBuilder
+// <A extends HttpClientConfigurationBuilder<A,T>,
+// T extends HttpClientConfiguration>
+ {
+
+ private /*T*/HttpClientConfiguration config = newConfig();
+
+ protected /*A*/HttpClientConfigurationBuilder builder() {
+ return this;
+ }
+
+ protected /*T*/HttpClientConfiguration newConfig() {
+ return new HttpClientConfiguration();
+ }
+
+ public /*T*/HttpClientConfiguration buildConfig() {
+ return this.config;
+ }
+
+ public HttpClientConfigurationBuilder/*A*/ withUsername(String theUsername) {
+ this.config.setUsername(theUsername);
+ return builder();
+ }
+
+ public HttpClientConfigurationBuilder/*A*/ withPassword(String thePassword) {
+ this.config.setPassword(thePassword);
+ return builder();
+ }
+
+ public HttpClientConfigurationBuilder/*A*/ withPoolSize(int thePoolSize) {
+ this.config.setPoolSize(thePoolSize);
+ return builder();
+ }
+
+ public HttpClientConfigurationBuilder/*A*/ withSSL(HttpClientConfiguration.SSL theSSL) {
+ this.config.setSSL(theSSL);
+ return builder();
+ }
+
+
+ public static class SSLBuilder {
+
+ private HttpClientConfiguration.SSL ssl =
+ new HttpClientConfiguration.SSL();
+
+ public SSLBuilder withKeyStore(String theKeyStore) {
+ this.ssl.setKeyStore(theKeyStore);
+ return this;
+ }
+
+ public SSLBuilder withKeyStoreType(String theKeyStoreType) {
+ this.ssl.setKeyStoreType(theKeyStoreType);
+ return this;
+ }
+
+ public SSLBuilder withKeyStorePassword(String theKeyStorePassword) {
+ this.ssl.setKeyStorePassword(theKeyStorePassword);
+ return this;
+ }
+
+ public SSLBuilder withKeyAlias(String theKeyAlias) {
+ this.ssl.setKeyAlias(theKeyAlias);
+ return this;
+ }
+
+ public SSLBuilder withTrustStore(String theTrustStore) {
+ this.ssl.setTrustStore(theTrustStore);
+ return this;
+ }
+
+ public SSLBuilder withTrustStoreType(String theTrustStoreType) {
+ this.ssl.setTrustStoreType(theTrustStoreType);
+ return this;
+ }
+
+ public SSLBuilder withTrustStorePassword(String theTrustStorePassword) {
+ this.ssl.setTrustStorePassword(theTrustStorePassword);
+ return this;
+ }
+
+ public HttpClientConfiguration.SSL build() {
+ return this.ssl;
+ }
+ }
+}
--- /dev/null
+/*-
+ * ===============LICENSE_START=======================================================
+ * Acumos
+ * ===================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property & Tech Mahindra. All rights reserved.
+ * ===================================================================================
+ * This Acumos software file is distributed by AT&T and Tech Mahindra
+ * 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
+ *
+ * This file 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.
+ * ===============LICENSE_END=========================================================
+ */
+
+package org.acumos.federation.gateway.service.impl;
+
+
+import org.springframework.core.io.Resource;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.BeanInitializationException;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import org.acumos.federation.gateway.util.LocalWatchService;
+import org.acumos.federation.gateway.config.EELFLoggerDelegate;
+
+import org.apache.commons.io.IOUtils;
+
+
+public class AbstractServiceLocalImpl {
+
+
+ protected EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(getClass().getName());
+ protected Resource resource;
+
+ @Autowired
+ protected ApplicationContext appCtx;
+
+ @Autowired
+ protected LocalWatchService watcher;
+
+
+ public void setSource(String theSource) {
+ this.resource = this.appCtx.getResource(theSource);
+ }
+
+ protected void checkResource() {
+
+ if (this.resource == null) {
+ throw new BeanInitializationException("No source was configured");
+ }
+
+ if (!this.resource.exists()) {
+ throw new BeanInitializationException("Source " + this.resource + " does not exist");
+ }
+ }
+
+}
package org.acumos.federation.gateway.service.impl;
import java.net.URI;
+import java.net.URISyntaxException;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
+import java.io.IOException;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.LinkedList;
@Service
@ConfigurationProperties(prefix="catalogLocal")
@Conditional(AdapterCondition.class)
-public class FederationServiceLocalImpl extends AbstractServiceImpl
+public class FederationServiceLocalImpl extends AbstractServiceLocalImpl
implements FederationService {
- private URI catalogUri;
private List<FLPSolution> solutions;
- @Autowired
- private LocalWatchService watcher;
-
- public void setCatalogUri(URI theUri) {
- this.catalogUri = theUri;
- }
-
@PostConstruct
public void initService() {
- if (this.catalogUri == null) {
- throw new BeanInitializationException("No catalog uri was configured");
- }
- watcher.watchOn(this.catalogUri,
- (uri) -> { loadSolutionsCatalogInfo(); });
+ checkResource();
+ try {
+ watcher.watchOn(this.resource.getURL().toURI(),
+ (uri) -> { loadSolutionsCatalogInfo(); });
+
+ }
+ catch (IOException | URISyntaxException iox) {
+ log.info(EELFLoggerDelegate.errorLogger, "Catalog watcher registration failed for " + this.resource, iox);
+ }
loadSolutionsCatalogInfo();
+
+ // Done
+ log.debug(EELFLoggerDelegate.debugLogger, "Local FederationService available");
}
@PreDestroy
ObjectReader objectReader =
new ObjectMapper().reader(FLPSolution.class);
MappingIterator objectIterator =
- objectReader.readValues(this.catalogUri.toURL());
+ objectReader.readValues(this.resource.getURL());
this.solutions = objectIterator.readAll();
log.info(EELFLoggerDelegate.debugLogger, "loaded " + this.solutions.size() + " solutions");
}
catch (Exception x) {
- throw new BeanInitializationException("Failed to load solutions catalog from " + this.catalogUri, x);
+ throw new BeanInitializationException("Failed to load solutions catalog from " + this.resource, x);
}
}
}
import java.io.BufferedReader;
import java.io.IOException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.StandardWatchEventKinds;
-import java.nio.file.WatchEvent;
-import java.nio.file.WatchKey;
-import java.nio.file.WatchService;
-
import java.net.URI;
import java.net.URISyntaxException;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.BeanInitializationException;
import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Conditional;
import org.springframework.beans.factory.annotation.Autowired;
@ConfigurationProperties(prefix="peersLocal")
@Conditional(AdapterCondition.class)
public class PeerServiceLocalImpl
+ extends AbstractServiceLocalImpl
implements PeerService,
PeerSubscriptionService {
private List<FLPPeer> peers;
- private URI sourceUri;
- private WatchService sourceWatcher = null;
- private final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PeerServiceLocalImpl.class);
-
- @Autowired
- private LocalWatchService watcher;
-
- public void setSourceUri(String theUri) {
- try {
- this.sourceUri = new URI(theUri);
- }
- catch(URISyntaxException urisx) {
- throw new IllegalArgumentException("Cannot set uri", urisx);
- }
- }
@PostConstruct
public void initPeerService() {
- logger.debug(EELFLoggerDelegate.debugLogger, "init local peer info service");
-
- if (this.sourceUri == null) {
- throw new BeanInitializationException("No source uri was configured");
+ log.debug(EELFLoggerDelegate.debugLogger, "init local peer info service");
+ checkResource();
+ try {
+ watcher.watchOn(this.resource.getURL().toURI(),
+ (uri) -> { loadPeersSubscriptionsInfo(); });
+ }
+ catch (IOException | URISyntaxException iox) {
+ log.info(EELFLoggerDelegate.errorLogger, "Peers subscriptions watcher registration failed for " + this.resource, iox);
}
-
- watcher.watchOn(this.sourceUri,
- (uri) -> { loadPeersSubscriptionsInfo(); });
loadPeersSubscriptionsInfo();
// Done
- logger.debug(EELFLoggerDelegate.debugLogger, "Onap available");
+ log.debug(EELFLoggerDelegate.debugLogger, "Local PeerService available");
}
private void loadPeersSubscriptionsInfo() {
- logger.info(EELFLoggerDelegate.debugLogger, "Loading peers subscriptions from " + this.sourceUri);
+ log.info(EELFLoggerDelegate.debugLogger, "Loading peers subscriptions from " + this.resource);
synchronized (this) {
try {
ObjectReader objectReader =
new ObjectMapper().reader(FLPPeer.class);
MappingIterator objectIterator =
- objectReader.readValues(this.sourceUri.toURL());
+ objectReader.readValues(this.resource.getURL());
this.peers = objectIterator.readAll();
- logger.info(EELFLoggerDelegate.debugLogger, "loaded " + this.peers.size() + " peers");
+ log.info(EELFLoggerDelegate.debugLogger, "loaded " + this.peers.size() + " peers");
}
catch (Exception x) {
- throw new BeanInitializationException("Failed to load solutions catalog from " + this.sourceUri, x);
+ throw new BeanInitializationException("Failed to load solutions catalog from " + this.resource, x);
}
}
}
@PreDestroy
public void cleanupPeerService() {
- logger.debug(EELFLoggerDelegate.debugLogger, "Local peer info service destroyed");
+ log.debug(EELFLoggerDelegate.debugLogger, "Local peer info service destroyed");
}
/** */
public List<MLPPeer> getPeer(final String theSubjectName) {
- logger.info(EELFLoggerDelegate.debugLogger, "Looking for peer " + theSubjectName);
+ log.info(EELFLoggerDelegate.debugLogger, "Looking for peer " + theSubjectName);
return
this.peers
.stream()
.filter(peer -> {
- logger.info(EELFLoggerDelegate.debugLogger, "Found peer " + peer.getSubjectName());
+ log.info(EELFLoggerDelegate.debugLogger, "Found peer " + peer.getSubjectName());
return theSubjectName.equals(peer.getSubjectName()); })
.collect(Collectors.toList());
}
.findFirst()
.orElse(null);
- logger.debug(EELFLoggerDelegate.errorLogger, "Local peer info, one peer: " + apeer);
+ log.debug(EELFLoggerDelegate.errorLogger, "Local peer info, one peer: " + apeer);
return apeer;
}
.filter(entry -> thePeerId.equals(entry.getPeerId()))
.findFirst()
.orElse(null);
- logger.info(EELFLoggerDelegate.errorLogger, "Peer " + thePeerId + " subs:" + (peer == null ? "none" : peer.getSubscriptions()));
+ log.info(EELFLoggerDelegate.errorLogger, "Peer " + thePeerId + " subs:" + (peer == null ? "none" : peer.getSubscriptions()));
return peer == Collections.EMPTY_LIST ? null : peer.getSubscriptions();
}
protected void setupSourceWatcher(URI theSource) {
if (this.sourceWatcher == null)
- logger.warn(EELFLoggerDelegate.debugLogger, "source watcher not available ");
+ logger.warn(EELFLoggerDelegate.errorLogger, "source watcher not available ");
if ("file".equals(theSource.getScheme())) {
//we can only watch directories ..
sourcePath.register(this.sourceWatcher, StandardWatchEventKinds.ENTRY_MODIFY);
}
catch (IOException iox) {
- logger.warn(EELFLoggerDelegate.debugLogger, "Failed to setup source watcher for " + theSource + ". Cause: " + iox);
+ logger.warn(EELFLoggerDelegate.errorLogger, "Failed to setup source watcher for " + theSource, iox);
}
}
}
--- /dev/null
+/*-
+ * ===============LICENSE_START=======================================================
+ * Acumos
+ * ===================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property & Tech Mahindra. All rights reserved.
+ * ===================================================================================
+ * This Acumos software file is distributed by AT&T and Tech Mahindra
+ * 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
+ *
+ * This file 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.
+ * ===============LICENSE_END=========================================================
+ */
+package org.acumos.federation.gateway.test;
+
+import java.util.List;
+import java.util.Scanner;
+
+import static org.junit.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.springframework.boot.test.web.client.TestRestTemplate;
+
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
+
+import org.apache.http.client.HttpClient;
+
+/* this is not good for unit testing .. */
+import org.acumos.federation.gateway.common.HttpClientConfigurationBuilder;
+import static org.acumos.federation.gateway.common.HttpClientConfigurationBuilder.SSLBuilder;
+
+/**
+ */
+
+//@RunWith(SpringJUnit4ClassRunner.class)
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = org.acumos.federation.gateway.Application.class,
+ webEnvironment = WebEnvironment.RANDOM_PORT,
+ properties = {
+ "federation.instance=adapter",
+ "federation.instance.name=Ghost",
+ "peersLocal.source=classpath:/test-peers.json",
+ "catalogLocal.source=classpath:/test-catalog.json",
+ "server.ssl.key-store=classpath:acumosa.pkcs12",
+ "server.ssl.key-store-password=acumosa",
+ "server.ssl.key-store-type=PKCS12",
+ "server.ssl.key-password = acumosa",
+ "server.ssl.trust-store=classpath:acumosTrustStore.jks",
+ "server.ssl.trust-store-password=acumos"
+ })
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class PeerGatewayTest {
+
+ @Autowired
+ private TestRestTemplate restTemplate;
+
+ @Test
+ public void testSolutions() {
+
+ ((HttpComponentsClientHttpRequestFactory)
+ this.restTemplate.getRestTemplate().getRequestFactory())
+ .setHttpClient(prepareHttpClient());
+
+ ResponseEntity<List> response =
+ this.restTemplate.exchange("/solutions", HttpMethod.GET, prepareRequest(), List.class);
+
+ assertTrue(response.getStatusCodeValue() == 200);
+ }
+
+ @Test
+ public void testSolutionSuccess() {
+
+ ((HttpComponentsClientHttpRequestFactory)
+ this.restTemplate.getRestTemplate().getRequestFactory())
+ .setHttpClient(prepareHttpClient());
+
+ ResponseEntity<List> response =
+ this.restTemplate.exchange("/solution/00000000-0000-0000-0000-000000000000", HttpMethod.GET, prepareRequest(), List.class);
+
+ assertTrue(response.getStatusCodeValue() == 200);
+ //assertTrue(response.getBody().size() == 0); //no errors
+ }
+
+ @Test
+ public void testSolutionRevisionsSuccess() {
+
+ ((HttpComponentsClientHttpRequestFactory)
+ this.restTemplate.getRestTemplate().getRequestFactory())
+ .setHttpClient(prepareHttpClient());
+
+ ResponseEntity<List> response =
+ this.restTemplate.exchange("/solution/00000000-0000-0000-0000-000000000000/revisions", HttpMethod.GET, prepareRequest(), List.class);
+
+ assertTrue(response.getStatusCodeValue() == 200);
+ //assertTrue(response.getBody().size() == 0); //no errors
+ }
+
+ private HttpEntity prepareRequest(String theResourceName) {
+ String content = new Scanner(
+ Thread.currentThread().getContextClassLoader().getResourceAsStream(theResourceName), "UTF-8")
+ .useDelimiter("\\Z").next();
+
+ HttpHeaders headers = new HttpHeaders();
+ headers.setContentType(MediaType.APPLICATION_JSON);
+ return new HttpEntity<String>(content, headers);
+ }
+
+ private HttpEntity prepareRequest() {
+ HttpHeaders headers = new HttpHeaders();
+ headers.setContentType(MediaType.APPLICATION_JSON);
+ return new HttpEntity<String>(headers);
+ }
+
+ private HttpClient prepareHttpClient() {
+ return new HttpClientConfigurationBuilder()
+ .withSSL(new SSLBuilder()
+ .withKeyStore("classpath:/acumosb.pkcs12")
+ .withKeyStorePassword("acumosb")
+ //.withKeyPassword("acumosb")
+ .withTrustStore("classpath:/acumosTrustStore.jks")
+ .withTrustStoreType("JKS")
+ .withTrustStorePassword("acumos")
+ .build())
+ .buildConfig()
+ .buildClient();
+ }
+}
+
+++ /dev/null
-/*-
- * ===============LICENSE_START=======================================================
- * Acumos
- * ===================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property & Tech Mahindra. All rights reserved.
- * ===================================================================================
- * This Acumos software file is distributed by AT&T and Tech Mahindra
- * 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
- *
- * This file 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.
- * ===============LICENSE_END=========================================================
- */
-
-package org.federated.gateway;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Unit test for simple App.
- */
-public class AppTest
- extends TestCase
-{
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public AppTest( String testName )
- {
- super( testName );
- }
-
- /**
- * @return the suite of tests being tested
- */
- public static Test suite()
- {
- return new TestSuite( AppTest.class );
- }
-
- /**
- * Rigourous Test :-)
- */
- public void testApp()
- {
- assertTrue( true );
- }
-}
"modified":"2017-08-11",
"revisions":[
{
- "revisionId":"2c7e4481-6e6f-47d9-b7a4-c4e674d2b3412c7e4481-6e6f-47d9-b7a4-c4e674d2b3412c7e4481-6e6f-47d9-b7a4-c4e674d2b3412c7e4481-6e6f-47d9-b7a4-c4e674d2b3412c7e4481-6e6f-47d9-b7a4-c4e674d2b341",
+ "revisionId":"2c7e4481-6e6f-47d9-b7a4-c4e674d2b341",
"solutionId":"6793411f-c7a1-4e93-85bc-f91d267541d8",
"description":"First attempt",
"version":"1.0",
--- /dev/null
+[{
+ "solutionId":"00000000-0000-0000-0000-000000000000",
+ "name":"traffic-ram",
+ "description":"Round about traffic model",
+ "ownerId":"admin",
+ "active":"true",
+ "modelTypeCode":"CL",
+ "toolkitTypeCode":"",
+ "validationStatusCode":"",
+ "metadata":"acumosa",
+ "created":"2017-08-10",
+ "modified":"2017-08-11",
+ "revisions":[
+ {
+ "revisionId":"01010101-0101-0101-0101-010101010101",
+ "solutionId":"00000000-0000-0000-0000-000000000000",
+ "description":"First attempt",
+ "version":"1.0",
+ "metadata":"acumosa",
+ "ownerId":"admin",
+ "created":"2017-08-10",
+ "modified":"2017-08-11",
+ "artifacts":[
+ {
+ "artifactId":"a0a0a0a0-a0a0-a0a0-a0a0-a0a0a0a0a0a0",
+ "name":"configuration",
+ "uri":"/home/src/acumos/federation/gateway/application-acumosa.properties",
+ "metadata":"acumosa",
+ "created":"2017-08-10",
+ "modified":"2017-08-11"
+ }
+ ]
+ }
+ ]
+ }
+]
--- /dev/null
+[
+ {
+ "peerId":"00000000-0000-0000-0000-000000000000",
+ "name":"acumosa",
+ "subjectName":"gateway.acumosa.org",
+ "description":"acumosa",
+ "active": "true",
+ "self": "true",
+ "apiUrl":"",
+ "subscriptions":[]
+ },
+ {
+ "peerId":"11111111-1111-1111-1111-111111111111",
+ "name":"acumosb",
+ "subjectName":"gateway.acumosb.org",
+ "description":"acumosb",
+ "active": "true",
+ "self": "false",
+ "apiUrl":"https://localhost:9002",
+ "subscriptions":[]
+ }
+]
+