summaryrefslogtreecommitdiffstats
path: root/jjb/dcaegen2/dcaegen2-services-son-handler.yaml
diff options
context:
space:
mode:
authorLF Jenkins CI <releng+lf-jobbuilder@linuxfoundation.org>2021-02-01 22:21:43 +0000
committerJessica Wagantall <jwagantall@linuxfoundation.org>2021-02-01 22:29:09 +0000
commit9c2edf8727185296c854a2e34548bda66fb3ecee (patch)
treebbe54aaccc9ababa4afbe4a8749be8eae3d9246d /jjb/dcaegen2/dcaegen2-services-son-handler.yaml
parente84a957742e0863474f706a6b9fe1254c442b05f (diff)
Automation adds so-so-etsi-nfvo.yaml
Issue-ID: CIMAN-33 Change-Id: I1cb8217fbcd6c2d9bfc95cc3dcc3552f7d8dc60b Signed-off-by: lf-jobbuilder <releng+lf-jobbuilder@linuxfoundation.org>
Diffstat (limited to 'jjb/dcaegen2/dcaegen2-services-son-handler.yaml')
0 files changed, 0 insertions, 0 deletions
div class='add'>+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.api.main;
+
+import org.onap.policy.common.utils.coder.CoderException;
+import org.onap.policy.common.utils.coder.StandardCoder;
+import org.yaml.snakeyaml.Yaml;
+
+/**
+ * Utility class to support API tests.
+ *
+ * @author Liam Fallon (liam.fallon@est.tech)
+ */
+public final class ApiTestSupportUtilities {
+ private ApiTestSupportUtilities() {
+ // prevent instantiation of this class
+ }
+
+ /**
+ * Convert a YAML string to a JSON string.
+ *
+ * @param yamlString the Yaml string.
+ * @return the JSON string
+ * @throws CoderException on encoding JSON errors
+ */
+ public static final String yaml2Json(final String yamlString) throws CoderException {
+ Object yamlObject = new Yaml().load(yamlString);
+ return new StandardCoder().encode(yamlObject);
+ }
+}