aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/package
diff options
context:
space:
mode:
authorAshlee Young <ashlee@wildernessvoice.com>2015-12-01 05:49:27 -0800
committerAshlee Young <ashlee@wildernessvoice.com>2015-12-01 05:49:27 -0800
commite63291850fd0795c5700e25e67e5dee89ba54c5f (patch)
tree9707289536ad95bb739c9856761ad43275e07d8c /framework/src/onos/tools/package
parent671823e12bc13be9a8b87a5d7de33da1bb7a44e8 (diff)
onos commit hash c2999f30c69e50df905a9d175ef80b3f23a98514
Change-Id: I2bb8562c4942b6d6a6d60b663db2e17540477b81 Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/onos/tools/package')
-rw-r--r--framework/src/onos/tools/package/config/samples/network-cfg-linkdiscovery.json35
-rw-r--r--framework/src/onos/tools/package/config/samples/network-cfg.json1
-rw-r--r--framework/src/onos/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosSwaggerMojo.java5
-rw-r--r--framework/src/onos/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/features.xml1
4 files changed, 39 insertions, 3 deletions
diff --git a/framework/src/onos/tools/package/config/samples/network-cfg-linkdiscovery.json b/framework/src/onos/tools/package/config/samples/network-cfg-linkdiscovery.json
new file mode 100644
index 00000000..fcc805f9
--- /dev/null
+++ b/framework/src/onos/tools/package/config/samples/network-cfg-linkdiscovery.json
@@ -0,0 +1,35 @@
+{
+ "ports": {
+ "of:0000000000000002/3": {
+ "linkDiscovery": {
+ "enabled": false
+ }
+ },
+ "of:0000000000000002/2": {
+ "linkDiscovery": {
+ "enabled": false
+ }
+ }
+ },
+ "devices": {
+ "of:0000000000000001": {
+ "linkDiscovery": {
+ "enabled": false
+ }
+ }
+ },
+ "apps": {
+ "org.onosproject.provider.lldp": {
+ "suppression": {
+ "deviceTypes": [
+ "ROADM"
+ ],
+ "annotation": {
+ "no-lldp": null,
+ "sendLLDP": "false"
+ }
+ }
+ }
+ }
+}
+
diff --git a/framework/src/onos/tools/package/config/samples/network-cfg.json b/framework/src/onos/tools/package/config/samples/network-cfg.json
index 92328479..9e9257e0 100644
--- a/framework/src/onos/tools/package/config/samples/network-cfg.json
+++ b/framework/src/onos/tools/package/config/samples/network-cfg.json
@@ -64,3 +64,4 @@
}
}
}
+
diff --git a/framework/src/onos/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosSwaggerMojo.java b/framework/src/onos/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosSwaggerMojo.java
index a75127a3..0ee5382e 100644
--- a/framework/src/onos/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosSwaggerMojo.java
+++ b/framework/src/onos/tools/package/maven-plugin/src/main/java/org/onosproject/maven/OnosSwaggerMojo.java
@@ -66,6 +66,7 @@ public class OnosSwaggerMojo extends AbstractMojo {
private static final String PRODUCES = "javax.ws.rs.Produces";
private static final String CONSUMES = "javax.ws.rs.Consumes";
private static final String JSON = "MediaType.APPLICATION_JSON";
+ private static final String OCTET_STREAM = "MediaType.APPLICATION_OCTET_STREAM";
/**
* The directory where the generated catalogue file will be put.
@@ -261,7 +262,6 @@ public class OnosSwaggerMojo extends AbstractMojo {
addSummaryDescriptions(methodNode, comment);
addJsonSchemaDefinition(definitions, tag);
- addJsonSchemaDefinition(definitions, tag);
processParameters(javaMethod, methodNode, method, tag);
@@ -327,7 +327,6 @@ public class OnosSwaggerMojo extends AbstractMojo {
}
// Temporary solution to add responses to a method
- // TODO Provide annotations in the web resources for responses and parse them
private void addResponses(ObjectNode methodNode, DocletTag tag, boolean responseJson) {
ObjectNode responses = mapper.createObjectNode();
methodNode.set("responses", responses);
@@ -352,6 +351,8 @@ public class OnosSwaggerMojo extends AbstractMojo {
private String getIOType(JavaAnnotation annotation) {
if (annotation.getNamedParameter("value").toString().equals(JSON)) {
return "application/json";
+ } else if (annotation.getNamedParameter("value").toString().equals(OCTET_STREAM)){
+ return "application/octet_stream";
}
return "";
}
diff --git a/framework/src/onos/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/features.xml b/framework/src/onos/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/features.xml
index d5a91e2a..5b08d80a 100644
--- a/framework/src/onos/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/features.xml
+++ b/framework/src/onos/tools/package/maven-plugin/src/main/resources/org/onosproject/maven/features.xml
@@ -15,7 +15,6 @@
~ limitations under the License.
-->
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${project.version}">
- <repository>mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features</repository>
<feature name="${project.artifactId}" version="${project.version}"
description="${project.description}">
<feature>onos-api</feature>