Change-Id: Icadd241369437b6c1e868285f79b31be2d730871
Issue-ID: INT-824
Signed-off-by: Marco Platania <platania@research.att.com>
<groupId>org.onap.demo.vnf</groupId>
<artifactId>demo-aggregator</artifactId>
<version>1.4.0-SNAPSHOT</version>
<groupId>org.onap.demo.vnf</groupId>
<artifactId>demo-aggregator</artifactId>
<version>1.4.0-SNAPSHOT</version>
- <relativePath>../../../../pom.xml</relativePath>
+ <relativePath>../../../pom.xml</relativePath>
<artifactId>yang-ext</artifactId>
</dependency>
</dependencies>
<artifactId>yang-ext</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<build>
<plugins>
<plugin>
<version>${guice.version}</version>
</dependency>
</dependencies>
<version>${guice.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<build>
<plugins>
<plugin>
public final class ElementCustomizer implements WriterCustomizer<Streams> {
public final class ElementCustomizer implements WriterCustomizer<Streams> {
- private static final Logger LOG = LoggerFactory.getLogger(ElementCustomizer.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ElementCustomizer.class);
private final CrudService<Streams> crudService;
private final CrudService<Streams> crudService;
//invoked by PUT operation,if provided data doesn't exist in Config data
crudService.writeData(id, dataAfter);
try {
//invoked by PUT operation,if provided data doesn't exist in Config data
crudService.writeData(id, dataAfter);
try {
- runScript(dataAfter.getActiveStreams().getValue());
+ runScript(dataAfter.getActiveStreams().getValue());
}
catch (IOException e) {
}
catch (IOException e) {
- LOG.error("Write operation failed: " + e);
+ String message = "Write operation failed " + e;
+ LOG.error(message);
@Nonnull final Streams dataBefore,
@Nonnull final Streams dataAfter, @Nonnull final WriteContext writeContext)
throws WriteFailedException {
@Nonnull final Streams dataBefore,
@Nonnull final Streams dataAfter, @Nonnull final WriteContext writeContext)
throws WriteFailedException {
- //invoked by PUT operation,if provided data does exist in Config data
- crudService.updateData(id, dataBefore, dataAfter);
- try {
- runScript(dataAfter.getActiveStreams().getValue());
+ //invoked by PUT operation,if provided data does exist in Config data
+ crudService.updateData(id, dataBefore, dataAfter);
+ try {
+ runScript(dataAfter.getActiveStreams().getValue());
}
catch (IOException e) {
}
catch (IOException e) {
- LOG.error("Update operation failed: " + e);
+ String message = "Write operation failed " + e;
+ LOG.error(message);
//Update the number of running streams running a custom script that uses the old vPacketGen REST APIs
private void runScript(long streams) throws IOException {
//Update the number of running streams running a custom script that uses the old vPacketGen REST APIs
private void runScript(long streams) throws IOException {
- String script = new String("bash /opt/update_running_streams.sh " + streams);
+ String script = new String("bash /opt/update_running_streams.sh " + streams);
Runtime.getRuntime().exec(script);
String message = "Number of running streams updated to " + streams;
LOG.info(message);
Runtime.getRuntime().exec(script);
String message = "Number of running streams updated to " + streams;
LOG.info(message);