summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rwxr-xr-xcore/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java36
-rwxr-xr-xcore/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java45
-rw-r--r--core/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/IpFragmentFlagEnumType.java75
-rwxr-xr-xcore/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObject.java2
-rwxr-xr-xcore/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObjectBuilder.java34
-rw-r--r--core/sliapi/model/swagger/src/main/json/sliapi.json2
-rw-r--r--core/sliapi/model/swagger/src/main/yaml/sliapi.yaml52
7 files changed, 219 insertions, 27 deletions
diff --git a/core/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java b/core/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java
index ce8253a5c..85d4bdb00 100755
--- a/core/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java
+++ b/core/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java
@@ -177,7 +177,31 @@ public class MdsalHelper {
toProperties(props, pfx + "[" + i + "]", fromList.get(i), fromClass, useLegacyEnumerationMapping);
}
props.setProperty(pfx + "_length", Integer.toString(fromList.size()));
+ } else if (fromClass.isEnum())
+ {
+ try {
+ if (useLegacyEnumerationMapping) {
+ Method m = fromClass.getMethod(getStringValueMethod(simpleTypeName), null);
+ boolean isAccessible = m.isAccessible();
+ if (!isAccessible) {
+ m.setAccessible(true);
+ }
+ Object retValue = m.invoke(fromObj);
+ if (!isAccessible) {
+ m.setAccessible(false);
+ }
+ String propVal = retValue.toString();
+ props.setProperty(pfx, mapEnumeratedValue(pfx, propVal));
+ } else {
+ Method method = fromClass.getMethod("getName");
+ String yangValue = (String) method.invoke(fromObj);
+ props.setProperty(pfx, yangValue);
+ }
+ } catch (Exception e) {
+ LOG.error("Caught exception trying to convert value returned by " + fromClass.getName()
+ + ".getValue() to Properties entry", e);
+ }
} else if (isYangGenerated(fromClass)) {
// Class is yang generated.
@@ -509,6 +533,18 @@ public class MdsalHelper {
toObj.add(Dscp.getDefaultInstance(curValue));
foundValue = true;
}
+ } else if (elemType.isEnum()) {
+ String curValue = props.getProperty(curBase, "");
+ Object elemObj = null;
+
+ try {
+ elemObj = Enum.valueOf(elemType, toJavaEnum(curValue));
+ } catch (Exception e) {
+ LOG.error("Caught exception trying to convert field " + curBase + " to enum "
+ + elemType.getName(), e);
+ }
+ toObj.add(elemObj);
+ foundValue = true;
} else {
String builderName = elemType.getName() + "Builder";
try {
diff --git a/core/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java b/core/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java
index 9d2ae2385..21ba4cdd0 100755
--- a/core/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java
+++ b/core/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java
@@ -42,6 +42,7 @@ import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.testmodel.rev190723.
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.testmodel.rev190723.sample.container.LoginBuilder;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.testmodel.rev190723.sample.container.login.CustomerAddresses;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.core.testmodel.rev190723.sample.container.login.CustomerAddressesBuilder;
+import org.opendaylight.yang.gen.v1.test.IpFragmentFlagEnumType;
import org.opendaylight.yang.gen.v1.test.TestObjectBuilder;
import org.opendaylight.yang.gen.v1.test.WrapperObj;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
@@ -340,6 +341,50 @@ public class MdsalHelperTest extends TestCase {
MdsalHelper.toBuilder(props, b);
assertEquals(v6address, b.getFloatingIpV6().get(0).getValue());
}
+ public void testSingleIpFragmentFlagToProperties() throws Exception {
+ Properties props = new Properties();
+ TestObjectBuilder b = new TestObjectBuilder();
+ b.setSingleIpFragmentFlag(IpFragmentFlagEnumType.DF);
+ MdsalHelper.toProperties(props, b);
+ assertEquals("DF", props.getProperty("test-object.single-ip-fragment-flag"));
+
+ }
+
+ public void testSingleIpFragmentFlagToBuilder() throws Exception {
+ Properties props = new Properties();
+ String ipFragmentFlag = "DF";
+ props.setProperty("test-object.single-ip-fragment-flag", ipFragmentFlag);
+ TestObjectBuilder b = new TestObjectBuilder();
+ MdsalHelper.toBuilder(props, b);
+ assertEquals(ipFragmentFlag, b.getSingleIpFragmentFlag().getName());
+ }
+
+ public void testIpFragmentFlagListToProperties() throws Exception {
+ Properties props = new Properties();
+
+ TestObjectBuilder b = new TestObjectBuilder();
+ List<IpFragmentFlagEnumType> ipFragmentFlags = new ArrayList<IpFragmentFlagEnumType>();
+ ipFragmentFlags.add(IpFragmentFlagEnumType.DF);
+ b.setIpFragmentFlag(ipFragmentFlags);
+ MdsalHelper.toProperties(props, b);
+
+ System.out.println("*TRACE* Properties are:");
+ props.keySet().stream()
+ .map(key -> key + ": " + props.getProperty(key.toString()))
+ .forEach(System.out::println);
+
+ assertEquals("DF", props.getProperty("test-object.ip-fragment-flag[0]"));
+ assertEquals("1", props.getProperty("test-object.ip-fragment-flag_length"));
+ }
+
+ public void testIpFragmentFlagListToBuilder() throws Exception {
+ Properties props = new Properties();
+ props.setProperty("test-object.ip-fragment-flag_length", "1");
+ props.setProperty("test-object.ip-fragment-flag[0]", "DF");
+ TestObjectBuilder b = new TestObjectBuilder();
+ MdsalHelper.toBuilder(props, b);
+ assertEquals("DF", b.getIpFragmentFlag().get(0).getName());
+ }
public void testIpPrefix() throws Exception {
String ipPrefix = "10.0.0.0/24";
diff --git a/core/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/IpFragmentFlagEnumType.java b/core/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/IpFragmentFlagEnumType.java
new file mode 100644
index 000000000..2c3f39b7e
--- /dev/null
+++ b/core/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/IpFragmentFlagEnumType.java
@@ -0,0 +1,75 @@
+package org.opendaylight.yang.gen.v1.test;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap.Builder;
+import java.lang.Integer;
+import java.lang.Override;
+import java.lang.String;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import org.opendaylight.yangtools.yang.binding.Enumeration;
+
+public enum IpFragmentFlagEnumType implements Enumeration {
+ DF(0, "DF"),
+
+ ISF(1, "ISF"),
+
+ FF(2, "FF"),
+
+ LF(3, "LF")
+ ;
+
+ private static final Map<String, IpFragmentFlagEnumType> NAME_MAP;
+ private static final Map<Integer, IpFragmentFlagEnumType> VALUE_MAP;
+
+ static {
+ final Builder<String, IpFragmentFlagEnumType> nb = ImmutableMap.builder();
+ final Builder<Integer, IpFragmentFlagEnumType> vb = ImmutableMap.builder();
+ for (IpFragmentFlagEnumType enumItem : IpFragmentFlagEnumType.values()) {
+ vb.put(enumItem.value, enumItem);
+ nb.put(enumItem.name, enumItem);
+ }
+
+ NAME_MAP = nb.build();
+ VALUE_MAP = vb.build();
+ }
+
+ private final String name;
+ private final int value;
+
+ private IpFragmentFlagEnumType(int value, String name) {
+ this.value = value;
+ this.name = name;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public int getIntValue() {
+ return value;
+ }
+
+ /**
+ * Return the enumeration member whose {@link #getName()} matches specified value.
+ *
+ * @param name YANG assigned name
+ * @return corresponding IpFragmentFlagEnumType item, if present
+ * @throws NullPointerException if name is null
+ */
+ public static Optional<IpFragmentFlagEnumType> forName(String name) {
+ return Optional.ofNullable(NAME_MAP.get(Objects.requireNonNull(name)));
+ }
+
+ /**
+ * Return the enumeration member whose {@link #getIntValue()} matches specified value.
+ *
+ * @param intValue integer value
+ * @return corresponding IpFragmentFlagEnumType item, or null if no such item exists
+ */
+ public static IpFragmentFlagEnumType forValue(int intValue) {
+ return VALUE_MAP.get(intValue);
+ }
+}
diff --git a/core/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObject.java b/core/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObject.java
index eacfc9f63..27ae4d6a1 100755
--- a/core/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObject.java
+++ b/core/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObject.java
@@ -10,8 +10,10 @@ public interface TestObject {
List<IpAddress> getFloatingIp();
List<Ipv4Address> getFloatingIpV4();
List<Ipv6Address> getFloatingIpV6();
+ List<IpFragmentFlagEnumType> getIpFragmentFlag();
Ipv4Address getSingleIpV4();
Ipv6Address getSingleIpV6();
IpAddress getSingleIp();
+ IpFragmentFlagEnumType getSingleIpFragmentFlag();
}
diff --git a/core/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObjectBuilder.java b/core/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObjectBuilder.java
index 8301a0f05..63ce63672 100755
--- a/core/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObjectBuilder.java
+++ b/core/sli/provider/src/test/java/org/opendaylight/yang/gen/v1/test/TestObjectBuilder.java
@@ -11,9 +11,11 @@ public class TestObjectBuilder implements Builder<TestObject> {
private List<IpAddress> _floatingIp;
private List<Ipv4Address> _floatingIpV4;
private List<Ipv6Address> _floatingIpV6;
+ private List<IpFragmentFlagEnumType> _ipFragmentFlag;
private IpAddress _singleIp;
private Ipv4Address _singleIpV4;
private Ipv6Address _singleIpV6;
+ private IpFragmentFlagEnumType _singleIpFragmentFlag;
public List<IpAddress> getFloatingIp() {
return _floatingIp;
@@ -27,6 +29,10 @@ public class TestObjectBuilder implements Builder<TestObject> {
return _floatingIpV6;
}
+ public List<IpFragmentFlagEnumType> getIpFragmentFlag() {
+ return _ipFragmentFlag;
+ }
+
public Ipv4Address getSingleIpV4() {
return _singleIpV4;
}
@@ -39,6 +45,10 @@ public class TestObjectBuilder implements Builder<TestObject> {
return _singleIp;
}
+ public IpFragmentFlagEnumType getSingleIpFragmentFlag() {
+ return _singleIpFragmentFlag;
+ }
+
public TestObjectBuilder setFloatingIp(final List<IpAddress> value) {
this._floatingIp = value;
return this;
@@ -53,6 +63,11 @@ public class TestObjectBuilder implements Builder<TestObject> {
this._floatingIpV6 = value;
return this;
}
+
+ public TestObjectBuilder setIpFragmentFlag(final List<IpFragmentFlagEnumType> value) {
+ this._ipFragmentFlag = value;
+ return this;
+ }
public TestObjectBuilder setSingleIp(final IpAddress value) {
this._singleIp = value;
@@ -69,6 +84,11 @@ public class TestObjectBuilder implements Builder<TestObject> {
return this;
}
+ public TestObjectBuilder setSingleIpFragmentFlag(final IpFragmentFlagEnumType value) {
+ this._singleIpFragmentFlag = value;
+ return this;
+ }
+
public TestObjectBuilder() {
}
@@ -88,9 +108,11 @@ public class TestObjectBuilder implements Builder<TestObject> {
private List<IpAddress> _floatingIp;
private List<Ipv4Address> _floatingIpV4;
private List<Ipv6Address> _floatingIpV6;
+ private List<IpFragmentFlagEnumType> _ipFragmentFlag;
private IpAddress _singleIp;
private Ipv4Address _singleIpV4;
private Ipv6Address _singleIpV6;
+ private IpFragmentFlagEnumType _singleIpFragmentFlag;
@Override
public List<IpAddress> getFloatingIp() {
@@ -122,13 +144,25 @@ public class TestObjectBuilder implements Builder<TestObject> {
return _singleIp;
}
+ @Override
+ public List<IpFragmentFlagEnumType> getIpFragmentFlag() {
+ return _ipFragmentFlag;
+ }
+
+ @Override
+ public IpFragmentFlagEnumType getSingleIpFragmentFlag() {
+ return _singleIpFragmentFlag;
+ }
+
private TestObjectImpl(TestObjectBuilder base) {
this._floatingIp = base.getFloatingIp();
this._floatingIpV4 = base.getFloatingIpV4();
this._floatingIpV6 = base.getFloatingIpV6();
+ this._ipFragmentFlag = base.getIpFragmentFlag();
this._singleIp = base.getSingleIp();
this._singleIpV4 = base.getSingleIpV4();
this._singleIpV6 = base.getSingleIpV6();
+ this._singleIpFragmentFlag = base.getSingleIpFragmentFlag();
}
}
}
diff --git a/core/sliapi/model/swagger/src/main/json/sliapi.json b/core/sliapi/model/swagger/src/main/json/sliapi.json
index 14bc29974..a612a8f80 100644
--- a/core/sliapi/model/swagger/src/main/json/sliapi.json
+++ b/core/sliapi/model/swagger/src/main/json/sliapi.json
@@ -1 +1 @@
-{"swagger":"2.0","info":{"description":"Defines API to service logic interpreter,This module contains a collection of generally useful derived\nYANG data types.\n\nCopyright (c) 2013 IETF Trust and the persons identified as\nauthors of the code. All rights reserved.\n\nRedistribution and use in source and binary forms, with or\nwithout modification, is permitted pursuant to, and subject\nto the license terms contained in, the Simplified BSD License\nset forth in Section 4.c of the IETF Trust's Legal Provisions\nRelating to IETF Documents\n(http://trustee.ietf.org/license-info).\n\nThis version of this YANG module is part of RFC 6991; see\nthe RFC itself for full legal notices.,This module contains a collection of generally useful derived\nYANG data types for Internet addresses and related things.\n\nCopyright (c) 2013 IETF Trust and the persons identified as\nauthors of the code. All rights reserved.\n\nRedistribution and use in source and binary forms, with or\nwithout modification, is permitted pursuant to, and subject\nto the license terms contained in, the Simplified BSD License\nset forth in Section 4.c of the IETF Trust's Legal Provisions\nRelating to IETF Documents\n(http://trustee.ietf.org/license-info).\n\nThis version of this YANG module is part of RFC 6991; see\nthe RFC itself for full legal notices.","version":"1.3.0-SNAPSHOT","title":"SLI-API,ietf-yang-types,ietf-inet-types API"},"consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"paths":{"/config/SLI-API:test-results/":{"get":{"tags":["SLI-API"],"description":"returns sli.api.TestResults","parameters":[],"responses":{"400":{"description":"Internal error"},"200":{"description":"sli.api.TestResults","schema":{"$ref":"#/definitions/sli.api.TestResults","originalRef":"#/definitions/sli.api.TestResults"},"responseSchema":{"$ref":"#/definitions/sli.api.TestResults","originalRef":"#/definitions/sli.api.TestResults"}}}},"post":{"tags":["SLI-API"],"description":"creates sli.api.TestResults","parameters":[{"in":"body","name":"sli.api.TestResults.body-param","description":"sli.api.TestResults to be added to list","required":false,"schema":{"$ref":"#/definitions/sli.api.TestResults","originalRef":"#/definitions/sli.api.TestResults"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"409":{"description":"Object already exists"}}},"put":{"tags":["SLI-API"],"description":"creates or updates sli.api.TestResults","parameters":[{"in":"body","name":"sli.api.TestResults.body-param","description":"sli.api.TestResults to be added or updated","required":false,"schema":{"$ref":"#/definitions/sli.api.TestResults","originalRef":"#/definitions/sli.api.TestResults"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"204":{"description":"Object modified"}}},"delete":{"tags":["SLI-API"],"description":"removes sli.api.TestResults","parameters":[],"responses":{"400":{"description":"Internal error"},"204":{"description":"Object deleted"}}}},"/config/SLI-API:test-results/SLI-API:test-result/":{"post":{"description":"creates sli.api.testresults.TestResult","parameters":[{"in":"body","name":"sli.api.testresults.TestResult.body-param","description":"sli.api.testresults.TestResult to be added to list","required":false,"schema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"409":{"description":"Object already exists"}}}},"/config/SLI-API:test-results/SLI-API:test-result/{test-identifier}/":{"get":{"tags":["SLI-API"],"description":"returns sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"}],"responses":{"400":{"description":"Internal error"},"200":{"description":"sli.api.testresults.TestResult","schema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"},"responseSchema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"}}}},"post":{"tags":["SLI-API"],"description":"creates sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"},{"in":"body","name":"sli.api.testresults.TestResult.body-param","description":"sli.api.testresults.TestResult to be added to list","required":false,"schema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"409":{"description":"Object already exists"}}},"put":{"tags":["SLI-API"],"description":"creates or updates sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"},{"in":"body","name":"sli.api.testresults.TestResult.body-param","description":"sli.api.testresults.TestResult to be added or updated","required":false,"schema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"204":{"description":"Object modified"}}},"delete":{"tags":["SLI-API"],"description":"removes sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"}],"responses":{"400":{"description":"Internal error"},"204":{"description":"Object deleted"}}}},"/operational/SLI-API:test-results/":{"get":{"tags":["SLI-API"],"description":"returns sli.api.TestResults","parameters":[],"responses":{"400":{"description":"Internal error"},"200":{"description":"sli.api.TestResults","schema":{"$ref":"#/definitions/sli.api.TestResults","originalRef":"#/definitions/sli.api.TestResults"},"responseSchema":{"$ref":"#/definitions/sli.api.TestResults","originalRef":"#/definitions/sli.api.TestResults"}}}}},"/operational/SLI-API:test-results/SLI-API:test-result/{test-identifier}/":{"get":{"tags":["SLI-API"],"description":"returns sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"}],"responses":{"400":{"description":"Internal error"},"200":{"description":"sli.api.testresults.TestResult","schema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"},"responseSchema":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"}}}}},"/operations/SLI-API:execute-graph/":{"post":{"tags":["SLI-API"],"parameters":[{"in":"body","name":"sli.api.executegraph.Input.body-param","required":false,"schema":{"properties":{"input":{"$ref":"#/definitions/sli.api.executegraph.Input","originalRef":"#/definitions/sli.api.executegraph.Input"}}}}],"responses":{"400":{"description":"Internal error"},"200":{"description":"Correct response","schema":{"$ref":"#/definitions/sli.api.ExecuteGraph","originalRef":"#/definitions/sli.api.ExecuteGraph"},"responseSchema":{"$ref":"#/definitions/sli.api.ExecuteGraph","originalRef":"#/definitions/sli.api.ExecuteGraph"}},"201":{"description":"No response"}}}},"/operations/SLI-API:healthcheck/":{"post":{"tags":["SLI-API"],"parameters":[],"responses":{"400":{"description":"Internal error"},"200":{"description":"Correct response","schema":{"$ref":"#/definitions/sli.api.Healthcheck","originalRef":"#/definitions/sli.api.Healthcheck"},"responseSchema":{"$ref":"#/definitions/sli.api.Healthcheck","originalRef":"#/definitions/sli.api.Healthcheck"}},"201":{"description":"No response"}}}},"/operations/SLI-API:vlbcheck/":{"post":{"tags":["SLI-API"],"parameters":[],"responses":{"400":{"description":"Internal error"},"200":{"description":"Correct response","schema":{"$ref":"#/definitions/sli.api.Vlbcheck","originalRef":"#/definitions/sli.api.Vlbcheck"},"responseSchema":{"$ref":"#/definitions/sli.api.Vlbcheck","originalRef":"#/definitions/sli.api.Vlbcheck"}},"201":{"description":"No response"}}}}},"definitions":{"sli.api.ExecuteGraph":{"type":"object","properties":{"output":{"$ref":"#/definitions/sli.api.ResponseFields","originalRef":"#/definitions/sli.api.ResponseFields"}}},"sli.api.Healthcheck":{"type":"object","properties":{"output":{"$ref":"#/definitions/sli.api.ResponseFields","originalRef":"#/definitions/sli.api.ResponseFields"}}},"sli.api.ModeEnumeration":{"type":"string","enum":["sync","async"]},"sli.api.ParameterSetting":{"type":"object","properties":{"string-value":{"type":"string"},"boolean-value":{"type":"boolean"},"parameter-name":{"type":"string","description":"Parameter name"},"int-value":{"type":"integer","format":"int32"}}},"sli.api.ResponseFields":{"type":"object","properties":{"response-code":{"type":"string"},"response-message":{"type":"string"},"context-memory-json":{"type":"string"},"ack-final-indicator":{"type":"string"}}},"sli.api.TestResults":{"type":"object","properties":{"test-result":{"type":"array","items":{"$ref":"#/definitions/sli.api.testresults.TestResult","originalRef":"#/definitions/sli.api.testresults.TestResult"}}}},"sli.api.Vlbcheck":{"type":"object","properties":{"output":{"$ref":"#/definitions/sli.api.ResponseFields","originalRef":"#/definitions/sli.api.ResponseFields"}}},"sli.api.executegraph.Input":{"type":"object","properties":{"mode":{"$ref":"#/definitions/sli.api.ModeEnumeration","originalRef":"#/definitions/sli.api.ModeEnumeration"},"module-name":{"type":"string"},"sli-parameter":{"type":"array","items":{"$ref":"#/definitions/sli.api.ParameterSetting","originalRef":"#/definitions/sli.api.ParameterSetting"}},"rpc-name":{"type":"string"}}},"sli.api.testresults.TestResult":{"type":"object","properties":{"results":{"type":"array","items":{"type":"string"}},"test-identifier":{"type":"string"}}}}} \ No newline at end of file
+{"swagger":"2.0","info":{"description":"Defines API to service logic interpreter,This module contains a collection of generally useful derived\nYANG data types.\n\nCopyright (c) 2013 IETF Trust and the persons identified as\nauthors of the code. All rights reserved.\n\nRedistribution and use in source and binary forms, with or\nwithout modification, is permitted pursuant to, and subject\nto the license terms contained in, the Simplified BSD License\nset forth in Section 4.c of the IETF Trust's Legal Provisions\nRelating to IETF Documents\n(http://trustee.ietf.org/license-info).\n\nThis version of this YANG module is part of RFC 6991; see\nthe RFC itself for full legal notices.,This module contains a collection of generally useful derived\nYANG data types for Internet addresses and related things.\n\nCopyright (c) 2013 IETF Trust and the persons identified as\nauthors of the code. All rights reserved.\n\nRedistribution and use in source and binary forms, with or\nwithout modification, is permitted pursuant to, and subject\nto the license terms contained in, the Simplified BSD License\nset forth in Section 4.c of the IETF Trust's Legal Provisions\nRelating to IETF Documents\n(http://trustee.ietf.org/license-info).\n\nThis version of this YANG module is part of RFC 6991; see\nthe RFC itself for full legal notices.","version":"1.3.0-SNAPSHOT","title":"SLI-API,ietf-yang-types,ietf-inet-types API"},"consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"paths":{"/config/SLI-API:test-results/":{"get":{"tags":["SLI-API"],"description":"returns sli.api.TestResults","parameters":[],"responses":{"400":{"description":"Internal error"},"200":{"description":"sli.api.TestResults","schema":{"originalRef":"#/definitions/sli.api.TestResults","$ref":"#/definitions/sli.api.TestResults"},"responseSchema":{"originalRef":"#/definitions/sli.api.TestResults","$ref":"#/definitions/sli.api.TestResults"}}}},"post":{"tags":["SLI-API"],"description":"creates sli.api.TestResults","parameters":[{"in":"body","name":"sli.api.TestResults.body-param","description":"sli.api.TestResults to be added to list","required":false,"schema":{"originalRef":"#/definitions/sli.api.TestResults","$ref":"#/definitions/sli.api.TestResults"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"409":{"description":"Object already exists"}}},"put":{"tags":["SLI-API"],"description":"creates or updates sli.api.TestResults","parameters":[{"in":"body","name":"sli.api.TestResults.body-param","description":"sli.api.TestResults to be added or updated","required":false,"schema":{"originalRef":"#/definitions/sli.api.TestResults","$ref":"#/definitions/sli.api.TestResults"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"204":{"description":"Object modified"}}},"delete":{"tags":["SLI-API"],"description":"removes sli.api.TestResults","parameters":[],"responses":{"400":{"description":"Internal error"},"204":{"description":"Object deleted"}}}},"/config/SLI-API:test-results/SLI-API:test-result/":{"post":{"description":"creates sli.api.testresults.TestResult","parameters":[{"in":"body","name":"sli.api.testresults.TestResult.body-param","description":"sli.api.testresults.TestResult to be added to list","required":false,"schema":{"originalRef":"#/definitions/sli.api.testresults.TestResult","$ref":"#/definitions/sli.api.testresults.TestResult"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"409":{"description":"Object already exists"}}}},"/config/SLI-API:test-results/SLI-API:test-result/{test-identifier}/":{"get":{"tags":["SLI-API"],"description":"returns sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"}],"responses":{"400":{"description":"Internal error"},"200":{"description":"sli.api.testresults.TestResult","schema":{"originalRef":"#/definitions/sli.api.testresults.TestResult","$ref":"#/definitions/sli.api.testresults.TestResult"},"responseSchema":{"originalRef":"#/definitions/sli.api.testresults.TestResult","$ref":"#/definitions/sli.api.testresults.TestResult"}}}},"post":{"tags":["SLI-API"],"description":"creates sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"},{"in":"body","name":"sli.api.testresults.TestResult.body-param","description":"sli.api.testresults.TestResult to be added to list","required":false,"schema":{"originalRef":"#/definitions/sli.api.testresults.TestResult","$ref":"#/definitions/sli.api.testresults.TestResult"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"409":{"description":"Object already exists"}}},"put":{"tags":["SLI-API"],"description":"creates or updates sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"},{"in":"body","name":"sli.api.testresults.TestResult.body-param","description":"sli.api.testresults.TestResult to be added or updated","required":false,"schema":{"originalRef":"#/definitions/sli.api.testresults.TestResult","$ref":"#/definitions/sli.api.testresults.TestResult"}}],"responses":{"400":{"description":"Internal error"},"201":{"description":"Object created"},"204":{"description":"Object modified"}}},"delete":{"tags":["SLI-API"],"description":"removes sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"}],"responses":{"400":{"description":"Internal error"},"204":{"description":"Object deleted"}}}},"/operational/SLI-API:test-results/":{"get":{"tags":["SLI-API"],"description":"returns sli.api.TestResults","parameters":[],"responses":{"400":{"description":"Internal error"},"200":{"description":"sli.api.TestResults","schema":{"originalRef":"#/definitions/sli.api.TestResults","$ref":"#/definitions/sli.api.TestResults"},"responseSchema":{"originalRef":"#/definitions/sli.api.TestResults","$ref":"#/definitions/sli.api.TestResults"}}}}},"/operational/SLI-API:test-results/SLI-API:test-result/{test-identifier}/":{"get":{"tags":["SLI-API"],"description":"returns sli.api.testresults.TestResult","parameters":[{"name":"test-identifier","in":"path","description":"Id of test-result","required":true,"type":"string"}],"responses":{"400":{"description":"Internal error"},"200":{"description":"sli.api.testresults.TestResult","schema":{"originalRef":"#/definitions/sli.api.testresults.TestResult","$ref":"#/definitions/sli.api.testresults.TestResult"},"responseSchema":{"originalRef":"#/definitions/sli.api.testresults.TestResult","$ref":"#/definitions/sli.api.testresults.TestResult"}}}}},"/operations/SLI-API:execute-graph/":{"post":{"tags":["SLI-API"],"parameters":[{"in":"body","name":"sli.api.executegraph.Input.body-param","required":false,"schema":{"properties":{"input":{"originalRef":"#/definitions/sli.api.executegraph.Input","$ref":"#/definitions/sli.api.executegraph.Input"}}}}],"responses":{"400":{"description":"Internal error"},"200":{"description":"Correct response","schema":{"originalRef":"#/definitions/sli.api.ExecuteGraph","$ref":"#/definitions/sli.api.ExecuteGraph"},"responseSchema":{"originalRef":"#/definitions/sli.api.ExecuteGraph","$ref":"#/definitions/sli.api.ExecuteGraph"}},"201":{"description":"No response"}}}},"/operations/SLI-API:healthcheck/":{"post":{"tags":["SLI-API"],"parameters":[],"responses":{"400":{"description":"Internal error"},"200":{"description":"Correct response","schema":{"originalRef":"#/definitions/sli.api.Healthcheck","$ref":"#/definitions/sli.api.Healthcheck"},"responseSchema":{"originalRef":"#/definitions/sli.api.Healthcheck","$ref":"#/definitions/sli.api.Healthcheck"}},"201":{"description":"No response"}}}},"/operations/SLI-API:vlbcheck/":{"post":{"tags":["SLI-API"],"parameters":[],"responses":{"400":{"description":"Internal error"},"200":{"description":"Correct response","schema":{"originalRef":"#/definitions/sli.api.Vlbcheck","$ref":"#/definitions/sli.api.Vlbcheck"},"responseSchema":{"originalRef":"#/definitions/sli.api.Vlbcheck","$ref":"#/definitions/sli.api.Vlbcheck"}},"201":{"description":"No response"}}}}},"definitions":{"sli.api.ExecuteGraph":{"type":"object","properties":{"output":{"originalRef":"#/definitions/sli.api.ResponseFields","$ref":"#/definitions/sli.api.ResponseFields"}}},"sli.api.Healthcheck":{"type":"object","properties":{"output":{"originalRef":"#/definitions/sli.api.ResponseFields","$ref":"#/definitions/sli.api.ResponseFields"}}},"sli.api.ModeEnumeration":{"type":"string","enum":["sync","async"]},"sli.api.ParameterSetting":{"type":"object","properties":{"string-value":{"type":"string"},"boolean-value":{"type":"boolean"},"parameter-name":{"type":"string","description":"Parameter name"},"int-value":{"type":"integer","format":"int32"}}},"sli.api.ResponseFields":{"type":"object","properties":{"response-code":{"type":"string"},"response-message":{"type":"string"},"context-memory-json":{"type":"string"},"ack-final-indicator":{"type":"string"}}},"sli.api.TestResults":{"type":"object","properties":{"test-result":{"type":"array","items":{"originalRef":"#/definitions/sli.api.testresults.TestResult","$ref":"#/definitions/sli.api.testresults.TestResult"}}}},"sli.api.Vlbcheck":{"type":"object","properties":{"output":{"originalRef":"#/definitions/sli.api.ResponseFields","$ref":"#/definitions/sli.api.ResponseFields"}}},"sli.api.executegraph.Input":{"type":"object","properties":{"mode":{"originalRef":"#/definitions/sli.api.ModeEnumeration","$ref":"#/definitions/sli.api.ModeEnumeration"},"module-name":{"type":"string"},"sli-parameter":{"type":"array","items":{"originalRef":"#/definitions/sli.api.ParameterSetting","$ref":"#/definitions/sli.api.ParameterSetting"}},"rpc-name":{"type":"string"}}},"sli.api.testresults.TestResult":{"type":"object","properties":{"results":{"type":"array","items":{"type":"string"}},"test-identifier":{"type":"string"}}}}} \ No newline at end of file
diff --git a/core/sliapi/model/swagger/src/main/yaml/sliapi.yaml b/core/sliapi/model/swagger/src/main/yaml/sliapi.yaml
index b58e588b3..22fee129f 100644
--- a/core/sliapi/model/swagger/src/main/yaml/sliapi.yaml
+++ b/core/sliapi/model/swagger/src/main/yaml/sliapi.yaml
@@ -39,11 +39,11 @@ paths:
200:
description: "sli.api.TestResults"
schema:
- $ref: "#/definitions/sli.api.TestResults"
originalRef: "#/definitions/sli.api.TestResults"
- responseSchema:
$ref: "#/definitions/sli.api.TestResults"
+ responseSchema:
originalRef: "#/definitions/sli.api.TestResults"
+ $ref: "#/definitions/sli.api.TestResults"
post:
tags:
- "SLI-API"
@@ -54,8 +54,8 @@ paths:
description: "sli.api.TestResults to be added to list"
required: false
schema:
- $ref: "#/definitions/sli.api.TestResults"
originalRef: "#/definitions/sli.api.TestResults"
+ $ref: "#/definitions/sli.api.TestResults"
responses:
400:
description: "Internal error"
@@ -73,8 +73,8 @@ paths:
description: "sli.api.TestResults to be added or updated"
required: false
schema:
- $ref: "#/definitions/sli.api.TestResults"
originalRef: "#/definitions/sli.api.TestResults"
+ $ref: "#/definitions/sli.api.TestResults"
responses:
400:
description: "Internal error"
@@ -101,8 +101,8 @@ paths:
description: "sli.api.testresults.TestResult to be added to list"
required: false
schema:
- $ref: "#/definitions/sli.api.testresults.TestResult"
originalRef: "#/definitions/sli.api.testresults.TestResult"
+ $ref: "#/definitions/sli.api.testresults.TestResult"
responses:
400:
description: "Internal error"
@@ -127,11 +127,11 @@ paths:
200:
description: "sli.api.testresults.TestResult"
schema:
- $ref: "#/definitions/sli.api.testresults.TestResult"
originalRef: "#/definitions/sli.api.testresults.TestResult"
- responseSchema:
$ref: "#/definitions/sli.api.testresults.TestResult"
+ responseSchema:
originalRef: "#/definitions/sli.api.testresults.TestResult"
+ $ref: "#/definitions/sli.api.testresults.TestResult"
post:
tags:
- "SLI-API"
@@ -147,8 +147,8 @@ paths:
description: "sli.api.testresults.TestResult to be added to list"
required: false
schema:
- $ref: "#/definitions/sli.api.testresults.TestResult"
originalRef: "#/definitions/sli.api.testresults.TestResult"
+ $ref: "#/definitions/sli.api.testresults.TestResult"
responses:
400:
description: "Internal error"
@@ -171,8 +171,8 @@ paths:
description: "sli.api.testresults.TestResult to be added or updated"
required: false
schema:
- $ref: "#/definitions/sli.api.testresults.TestResult"
originalRef: "#/definitions/sli.api.testresults.TestResult"
+ $ref: "#/definitions/sli.api.testresults.TestResult"
responses:
400:
description: "Internal error"
@@ -207,11 +207,11 @@ paths:
200:
description: "sli.api.TestResults"
schema:
- $ref: "#/definitions/sli.api.TestResults"
originalRef: "#/definitions/sli.api.TestResults"
- responseSchema:
$ref: "#/definitions/sli.api.TestResults"
+ responseSchema:
originalRef: "#/definitions/sli.api.TestResults"
+ $ref: "#/definitions/sli.api.TestResults"
/operational/SLI-API:test-results/SLI-API:test-result/{test-identifier}/:
get:
tags:
@@ -229,11 +229,11 @@ paths:
200:
description: "sli.api.testresults.TestResult"
schema:
- $ref: "#/definitions/sli.api.testresults.TestResult"
originalRef: "#/definitions/sli.api.testresults.TestResult"
- responseSchema:
$ref: "#/definitions/sli.api.testresults.TestResult"
+ responseSchema:
originalRef: "#/definitions/sli.api.testresults.TestResult"
+ $ref: "#/definitions/sli.api.testresults.TestResult"
/operations/SLI-API:execute-graph/:
post:
tags:
@@ -245,19 +245,19 @@ paths:
schema:
properties:
input:
- $ref: "#/definitions/sli.api.executegraph.Input"
originalRef: "#/definitions/sli.api.executegraph.Input"
+ $ref: "#/definitions/sli.api.executegraph.Input"
responses:
400:
description: "Internal error"
200:
description: "Correct response"
schema:
- $ref: "#/definitions/sli.api.ExecuteGraph"
originalRef: "#/definitions/sli.api.ExecuteGraph"
- responseSchema:
$ref: "#/definitions/sli.api.ExecuteGraph"
+ responseSchema:
originalRef: "#/definitions/sli.api.ExecuteGraph"
+ $ref: "#/definitions/sli.api.ExecuteGraph"
201:
description: "No response"
/operations/SLI-API:healthcheck/:
@@ -271,11 +271,11 @@ paths:
200:
description: "Correct response"
schema:
- $ref: "#/definitions/sli.api.Healthcheck"
originalRef: "#/definitions/sli.api.Healthcheck"
- responseSchema:
$ref: "#/definitions/sli.api.Healthcheck"
+ responseSchema:
originalRef: "#/definitions/sli.api.Healthcheck"
+ $ref: "#/definitions/sli.api.Healthcheck"
201:
description: "No response"
/operations/SLI-API:vlbcheck/:
@@ -289,11 +289,11 @@ paths:
200:
description: "Correct response"
schema:
- $ref: "#/definitions/sli.api.Vlbcheck"
originalRef: "#/definitions/sli.api.Vlbcheck"
- responseSchema:
$ref: "#/definitions/sli.api.Vlbcheck"
+ responseSchema:
originalRef: "#/definitions/sli.api.Vlbcheck"
+ $ref: "#/definitions/sli.api.Vlbcheck"
201:
description: "No response"
definitions:
@@ -301,14 +301,14 @@ definitions:
type: "object"
properties:
output:
- $ref: "#/definitions/sli.api.ResponseFields"
originalRef: "#/definitions/sli.api.ResponseFields"
+ $ref: "#/definitions/sli.api.ResponseFields"
sli.api.Healthcheck:
type: "object"
properties:
output:
- $ref: "#/definitions/sli.api.ResponseFields"
originalRef: "#/definitions/sli.api.ResponseFields"
+ $ref: "#/definitions/sli.api.ResponseFields"
sli.api.ModeEnumeration:
type: "string"
enum:
@@ -344,27 +344,27 @@ definitions:
test-result:
type: "array"
items:
- $ref: "#/definitions/sli.api.testresults.TestResult"
originalRef: "#/definitions/sli.api.testresults.TestResult"
+ $ref: "#/definitions/sli.api.testresults.TestResult"
sli.api.Vlbcheck:
type: "object"
properties:
output:
- $ref: "#/definitions/sli.api.ResponseFields"
originalRef: "#/definitions/sli.api.ResponseFields"
+ $ref: "#/definitions/sli.api.ResponseFields"
sli.api.executegraph.Input:
type: "object"
properties:
mode:
- $ref: "#/definitions/sli.api.ModeEnumeration"
originalRef: "#/definitions/sli.api.ModeEnumeration"
+ $ref: "#/definitions/sli.api.ModeEnumeration"
module-name:
type: "string"
sli-parameter:
type: "array"
items:
- $ref: "#/definitions/sli.api.ParameterSetting"
originalRef: "#/definitions/sli.api.ParameterSetting"
+ $ref: "#/definitions/sli.api.ParameterSetting"
rpc-name:
type: "string"
sli.api.testresults.TestResult: