Merge "Change vFW payload from pg-streams to streams"
authorJorge Hernandez <jorge.hernandez-herrero@att.com>
Thu, 9 May 2019 20:02:29 +0000 (20:02 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 9 May 2019 20:02:29 +0000 (20:02 +0000)
13 files changed:
models-interactions/model-actors/actor.appc/pom.xml
models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java
models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java
models-interactions/model-impl/pom.xml
models-interactions/model-impl/trafficgenerator/pom.xml [deleted file]
models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgRequest.java [deleted file]
models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgStream.java [deleted file]
models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgStreams.java [deleted file]
models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/util/Serialization.java [deleted file]
models-interactions/model-impl/trafficgenerator/src/test/java/org/onap/policy/vnf/trafficgenerator/DemoTest.java [deleted file]
models-interactions/model-yaml/README-v2.0.0.md
models-interactions/model-yaml/src/test/resources/v2.0.0/pgstreams.json [deleted file]
models-interactions/model-yaml/src/test/resources/v2.0.0/policy_ONAP_demo_vFirewall.yaml

index c9f7dc1..bc5bbe4 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!--
   ============LICENSE_START=======================================================
-  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
   Modifications Copyright (C) 2019 Nordix Foundation.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
       <version>${project.version}</version>
       <scope>provided</scope>
     </dependency>
-    <dependency>
-      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-      <artifactId>trafficgenerator</artifactId>
-      <version>${project.version}</version>
-      <scope>provided</scope>
-    </dependency>
     <dependency>
       <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
       <artifactId>events</artifactId>
index e90ca40..e2c997b 100644 (file)
@@ -23,22 +23,27 @@ package org.onap.policy.controlloop.actor.appc;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
-
 import java.util.Collections;
 import java.util.List;
-
+import java.util.Map;
+import java.util.Map.Entry;
 import org.onap.policy.appc.CommonHeader;
 import org.onap.policy.appc.Request;
+import org.onap.policy.common.utils.coder.CoderException;
+import org.onap.policy.common.utils.coder.StandardCoder;
 import org.onap.policy.controlloop.ControlLoopOperation;
 import org.onap.policy.controlloop.VirtualControlLoopEvent;
 import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
 import org.onap.policy.controlloop.policy.Policy;
-import org.onap.policy.vnf.trafficgenerator.PgRequest;
-import org.onap.policy.vnf.trafficgenerator.PgStream;
-import org.onap.policy.vnf.trafficgenerator.PgStreams;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 public class AppcActorServiceProvider implements Actor {
+    private static final Logger logger = LoggerFactory.getLogger(AppcActorServiceProvider.class);
+
+    private static final StandardCoder coder = new StandardCoder();
+
     // Strings for targets
     private static final String TARGET_VM = "VM";
     private static final String TARGET_VNF = "VNF";
@@ -98,23 +103,15 @@ public class AppcActorServiceProvider implements Actor {
         request.getCommonHeader().setSubRequestId(operation.getSubRequestId());
         request.setAction(policy.getRecipe().substring(0, 1).toUpperCase() + policy.getRecipe().substring(1));
 
-        /*
-         * For now Policy generates the PG Streams as a demo, in the future the payload can be
-         * provided by CLAMP
-         */
-        request.getPayload().put("generic-vnf.vnf-id", targetVnf);
-
-        PgRequest pgRequest = new PgRequest();
-        pgRequest.pgStreams = new PgStreams();
-
-        PgStream pgStream;
-        for (int i = 0; i < 5; i++) {
-            pgStream = new PgStream();
-            pgStream.streamId = "fw_udp" + (i + 1);
-            pgStream.isEnabled = "true";
-            pgRequest.pgStreams.pgStream.add(pgStream);
+        // convert policy payload strings to objects
+        if (policy.getPayload() == null) {
+            logger.info("no APPC payload specified for policy {}", policy.getName());
+        } else {
+            convertPayload(policy.getPayload(), request.getPayload());
         }
-        request.getPayload().put("pg-streams", pgRequest.pgStreams);
+
+        // add/replace specific values
+        request.getPayload().put("generic-vnf.vnf-id", targetVnf);
 
         /*
          * Return the request
@@ -123,5 +120,22 @@ public class AppcActorServiceProvider implements Actor {
         return request;
     }
 
+    /**
+     * Converts a payload. The original value is assumed to be a JSON string, which is
+     * decoded into an object.
+     *
+     * @param source source from which to get the values
+     * @param target where to place the decoded values
+     */
+    private static void convertPayload(Map<String, String> source, Map<String, Object> target) {
+        for (Entry<String, String> ent : source.entrySet()) {
+            try {
+                target.put(ent.getKey(), coder.decode(ent.getValue(), Object.class));
+
+            } catch (CoderException e) {
+                logger.warn("cannot decode JSON value {}: {}", ent.getKey(), ent.getValue(), e);
+            }
+        }
+    }
 
 }
index fc57d50..b917406 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * AppcServiceProviderTest
  * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2019 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -57,6 +57,14 @@ public class AppcServiceProviderTest {
     private static final ControlLoopOperation operation;
     private static final Policy policy;
 
+    private static final String KEY1 = "my-keyA";
+    private static final String KEY2 = "my-keyB";
+    private static final String SUBKEY = "sub-key";
+
+    private static final String VALUE1 = "'my-value'".replace('\'', '"');
+    private static final String VALUE2 = "{'sub-key':20}".replace('\'', '"');
+    private static final String SUBVALUE = "20";
+
     static {
         /*
          * Construct an onset with an AAI subtag containing generic-vnf.vnf-id and a target type of
@@ -118,6 +126,58 @@ public class AppcServiceProviderTest {
 
     @Test
     public void constructModifyConfigRequestTest() {
+        policy.setPayload(new HashMap<>());
+        policy.getPayload().put(KEY1, VALUE1);
+        policy.getPayload().put(KEY2, VALUE2);
+
+        Request appcRequest;
+        appcRequest = AppcActorServiceProvider.constructRequest(onsetEvent, operation, policy, "vnf01");
+
+        /* The service provider must return a non null APPC request */
+        assertNotNull(appcRequest);
+
+        /* A common header is required and cannot be null */
+        assertNotNull(appcRequest.getCommonHeader());
+        assertEquals(appcRequest.getCommonHeader().getRequestId(), onsetEvent.getRequestId());
+
+        /* An action is required and cannot be null */
+        assertNotNull(appcRequest.getAction());
+        assertEquals("ModifyConfig", appcRequest.getAction());
+
+        /* A payload is required and cannot be null */
+        assertNotNull(appcRequest.getPayload());
+        assertTrue(appcRequest.getPayload().containsKey("generic-vnf.vnf-id"));
+        assertNotNull(appcRequest.getPayload().get("generic-vnf.vnf-id"));
+        assertTrue(appcRequest.getPayload().containsKey(KEY1));
+        assertTrue(appcRequest.getPayload().containsKey(KEY2));
+
+        logger.debug("APPC Request: \n" + appcRequest.toString());
+
+        /* Print out request as json to make sure serialization works */
+        String jsonRequest = Serialization.gsonPretty.toJson(appcRequest);
+        logger.debug("JSON Output: \n" + jsonRequest);
+
+        /* The JSON string must contain the following fields */
+        assertTrue(jsonRequest.contains("CommonHeader"));
+        assertTrue(jsonRequest.contains("Action"));
+        assertTrue(jsonRequest.contains("ModifyConfig"));
+        assertTrue(jsonRequest.contains("Payload"));
+        assertTrue(jsonRequest.contains("generic-vnf.vnf-id"));
+        assertTrue(jsonRequest.contains(KEY1));
+        assertTrue(jsonRequest.contains(KEY2));
+        assertTrue(jsonRequest.contains(SUBKEY));
+        assertTrue(jsonRequest.contains(SUBVALUE));
+
+        Response appcResponse = new Response(appcRequest);
+        appcResponse.getStatus().setCode(ResponseCode.SUCCESS.getValue());
+        appcResponse.getStatus().setDescription("AppC success");
+        /* Print out request as json to make sure serialization works */
+        String jsonResponse = Serialization.gsonPretty.toJson(appcResponse);
+        logger.debug("JSON Output: \n" + jsonResponse);
+    }
+
+    @Test
+    public void constructModifyConfigRequestTest_NullPayload() {
 
         Request appcRequest;
         appcRequest = AppcActorServiceProvider.constructRequest(onsetEvent, operation, policy, "vnf01");
@@ -137,7 +197,6 @@ public class AppcServiceProviderTest {
         assertNotNull(appcRequest.getPayload());
         assertTrue(appcRequest.getPayload().containsKey("generic-vnf.vnf-id"));
         assertNotNull(appcRequest.getPayload().get("generic-vnf.vnf-id"));
-        assertTrue(appcRequest.getPayload().containsKey("pg-streams"));
 
         logger.debug("APPC Request: \n" + appcRequest.toString());
 
@@ -151,7 +210,6 @@ public class AppcServiceProviderTest {
         assertTrue(jsonRequest.contains("ModifyConfig"));
         assertTrue(jsonRequest.contains("Payload"));
         assertTrue(jsonRequest.contains("generic-vnf.vnf-id"));
-        assertTrue(jsonRequest.contains("pg-streams"));
 
         Response appcResponse = new Response(appcRequest);
         appcResponse.getStatus().setCode(ResponseCode.SUCCESS.getValue());
index b4c0c48..de7acb1 100644 (file)
@@ -42,7 +42,6 @@
       <module>so</module>
       <module>rest</module>
       <module>sdc</module>
-      <module>trafficgenerator</module>
       <module>vfc</module>
       <module>sdnc</module>
   </modules>
diff --git a/models-interactions/model-impl/trafficgenerator/pom.xml b/models-interactions/model-impl/trafficgenerator/pom.xml
deleted file mode 100644 (file)
index 30ad065..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--
-  ============LICENSE_START=======================================================
-  trafficgenerator
-  ================================================================================
-  Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
-  Modifications Copyright (C) 2019 Nordix Foundation.
-  ================================================================================
-  Licensed 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
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License 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=========================================================
-  -->
-
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-        <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-        <artifactId>model-impl</artifactId>
-        <version>2.0.0-SNAPSHOT</version>
-    </parent>
-
-  <artifactId>trafficgenerator</artifactId>
-
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.google.code.gson</groupId>
-      <artifactId>gson</artifactId>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-checkstyle-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>onap-java-style</id>
-                        <goals>
-                            <goal>check</goal>
-                        </goals>
-                        <phase>process-sources</phase>
-                        <configuration>
-                            <!-- Use Google Java Style Guide:
-                            https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
-                            with minor changes -->
-                            <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
-                            <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
-                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
-                            <includeResources>true</includeResources>
-                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
-                            <includeTestResources>true</includeTestResources>
-                            <excludes>
-                            </excludes>
-                            <consoleOutput>true</consoleOutput>
-                            <failsOnViolation>true</failsOnViolation>
-                            <violationSeverity>warning</violationSeverity>
-                        </configuration>
-                    </execution>
-                </executions>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.onap.oparent</groupId>
-                        <artifactId>checkstyle</artifactId>
-                        <version>${oparent.version}</version>
-                        <scope>compile</scope>
-                    </dependency>
-                </dependencies>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgRequest.java b/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgRequest.java
deleted file mode 100644 (file)
index 248d23e..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * trafficgenerator
- * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License 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.onap.policy.vnf.trafficgenerator;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class PgRequest implements Serializable {
-
-    private static final long serialVersionUID = -3283942659786236032L;
-
-    @SerializedName("pg-streams")
-    public PgStreams pgStreams;
-
-    public PgRequest() {
-        //required by author
-    }
-}
diff --git a/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgStream.java b/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgStream.java
deleted file mode 100644 (file)
index 9034f08..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * trafficgenerator
- * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License 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.onap.policy.vnf.trafficgenerator;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-
-public class PgStream implements Serializable {
-
-    private static final long serialVersionUID = 5567635677419358210L;
-
-    @SerializedName("id")
-    public String streamId;
-    @SerializedName("is-enabled")
-    public String isEnabled;
-
-    public PgStream() {
-        //required by author
-    }
-}
diff --git a/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgStreams.java b/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/PgStreams.java
deleted file mode 100644 (file)
index e912722..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * trafficgenerator
- * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License 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.onap.policy.vnf.trafficgenerator;
-
-import com.google.gson.annotations.SerializedName;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-
-public class PgStreams implements Serializable {
-
-    private static final long serialVersionUID = 5567635677419358210L;
-
-    @SerializedName("pg-stream")
-    public List<PgStream> pgStream = new LinkedList<>();
-
-    public PgStreams() {
-        // required by author
-    }
-}
diff --git a/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/util/Serialization.java b/models-interactions/model-impl/trafficgenerator/src/main/java/org/onap/policy/vnf/trafficgenerator/util/Serialization.java
deleted file mode 100644 (file)
index 901fe40..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * trafficgenerator
- * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License 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.onap.policy.vnf.trafficgenerator.util;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-
-public final class Serialization {
-
-    public static final Gson gsonPretty =
-            new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create();
-
-    private Serialization() {}
-}
diff --git a/models-interactions/model-impl/trafficgenerator/src/test/java/org/onap/policy/vnf/trafficgenerator/DemoTest.java b/models-interactions/model-impl/trafficgenerator/src/test/java/org/onap/policy/vnf/trafficgenerator/DemoTest.java
deleted file mode 100644 (file)
index d4ddd6e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * trafficgenerator
- * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License 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.onap.policy.vnf.trafficgenerator;
-
-import org.junit.Test;
-
-import org.onap.policy.vnf.trafficgenerator.PgRequest;
-import org.onap.policy.vnf.trafficgenerator.PgStream;
-import org.onap.policy.vnf.trafficgenerator.PgStreams;
-import org.onap.policy.vnf.trafficgenerator.util.Serialization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DemoTest {
-    private static final Logger logger = LoggerFactory.getLogger(DemoTest.class);
-
-    @Test
-    public void test() {
-        PgRequest request = new PgRequest();
-        request.pgStreams = new PgStreams();
-
-        PgStream pgStream;
-        for (int i = 0; i < 5; i++) {
-            pgStream = new PgStream();
-            pgStream.streamId = "fw_udp" + (i + 1);
-            pgStream.isEnabled = "true";
-            request.pgStreams.pgStream.add(pgStream);
-        }
-
-        String body = Serialization.gsonPretty.toJson(request);
-        logger.debug(body);
-
-        // fail("Not yet implemented");
-    }
-
-}
index d6613ad..bb72cc0 100644 (file)
@@ -1,4 +1,4 @@
-Copyright 2018 AT&T Intellectual Property. All rights reserved.
+Copyright 2018-2019 AT&T Intellectual Property. All rights reserved.
 Modifications Copyright (C) 2019 Nordix Foundation.
 This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE
 Full license text at https://creativecommons.org/licenses/by/4.0/legalcode
@@ -307,7 +307,7 @@ policies:
       resourceID: Eace933104d443b496b8.nodes.heat.vpg
     payload:
       generic-vnf.vnf-id: {generic-vnf.vnf-id}
-      ref$: pgstreams.json
+      streams: '{"active-streams":5}'
     retry: 0
     timeout: 300
     success: final_success
diff --git a/models-interactions/model-yaml/src/test/resources/v2.0.0/pgstreams.json b/models-interactions/model-yaml/src/test/resources/v2.0.0/pgstreams.json
deleted file mode 100644 (file)
index 4d118af..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-    "pg-streams": {
-      "pg-stream": [
-        {
-          "id": "fw_udp1",
-          "is-enabled": "true"
-        },
-        {
-          "id": "fw_udp2",
-          "is-enabled": "true"
-        },
-        {
-          "id": "fw_udp3",
-          "is-enabled": "true"
-        },
-        {
-          "id": "fw_udp4",
-          "is-enabled": "true"
-        },
-        {
-          "id": "fw_udp5",
-          "is-enabled": "true"
-        }
-      ]
-    }
-}
\ No newline at end of file
index caf3bab..00b9b4c 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2018 AT&T Intellectual Property. All rights reserved
+# Copyright 2018-2019 AT&T Intellectual Property. All rights reserved
 # Modifications Copyright (C) 2019 Nordix Foundation.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -61,7 +61,7 @@ policies:
       resourceID: Eace933104d443b496b8.nodes.heat.vpg
     payload:
       generic-vnf.vnf-id: {generic-vnf.vnf-id}
-      ref$: pgstreams.json
+      streams: '{"active-streams":5}'
     retry: 0
     timeout: 300
     success: final_success