Fix: correct typos and return status for openstack security group
Change-Id: Ie07f0c20130447b11a1dbe9da6d355158a4f5cbe
diff --git a/apps/openstacknetworking/src/main/java/org/onosproject/openstacknetworking/web/OpenstackSecurityGroupRuleWebResource.java b/apps/openstacknetworking/src/main/java/org/onosproject/openstacknetworking/web/OpenstackSecurityGroupRuleWebResource.java
index 5f5845b..1615c87 100644
--- a/apps/openstacknetworking/src/main/java/org/onosproject/openstacknetworking/web/OpenstackSecurityGroupRuleWebResource.java
+++ b/apps/openstacknetworking/src/main/java/org/onosproject/openstacknetworking/web/OpenstackSecurityGroupRuleWebResource.java
@@ -60,7 +60,7 @@
*
* @param input security group JSON input stream
* @return 201 CREATED if the JSON is correct, 400 BAD_REQUEST if the JSON
- * is invalid or duplicated port already exists
+ * is invalid or duplicated security group rule ID already exists
* @onos.rsModel NeutronSecurityGroupRule
*/
@POST
diff --git a/apps/openstacknetworking/src/main/java/org/onosproject/openstacknetworking/web/OpenstackSecurityGroupWebResource.java b/apps/openstacknetworking/src/main/java/org/onosproject/openstacknetworking/web/OpenstackSecurityGroupWebResource.java
index b48617e..3a2e41d 100644
--- a/apps/openstacknetworking/src/main/java/org/onosproject/openstacknetworking/web/OpenstackSecurityGroupWebResource.java
+++ b/apps/openstacknetworking/src/main/java/org/onosproject/openstacknetworking/web/OpenstackSecurityGroupWebResource.java
@@ -61,7 +61,7 @@
*
* @param input security group JSON input stream
* @return 201 CREATED if the JSON is correct, 400 BAD_REQUEST if the JSON
- * is invalid or duplicated port already exists
+ * is invalid or duplicated security group ID already exists
* @onos.rsModel NeutronSecurityGroup
*/
@POST
@@ -85,8 +85,8 @@
* Updates a security group from the JSON input stream.
*
* @param input security group JSON input stream
- * @return 201 CREATED if the JSON is correct, 400 BAD_REQUEST if the JSON
- * is invalid or duplicated port already exists
+ * @return 200 OK with the updated security group, 400 BAD_REQUEST if the
+ * request is invalid
* @onos.rsModel NeutronSecurityGroup
*/
@PUT
@@ -95,15 +95,9 @@
public Response updateSecurityGroups(InputStream input) {
log.trace(String.format(MESSAGE, "UPDATE"));
- final NeutronSecurityGroup sg = (NeutronSecurityGroup)
- jsonToModelEntity(input, NeutronSecurityGroup.class);
-
- // Do nothing ..
- UriBuilder locationBuilder = uriInfo.getBaseUriBuilder()
- .path(SECURITY_GROUPS)
- .path(sg.getId());
-
- return created(locationBuilder.build()).build();
+ // Do nothing ...
+ // TODO: this interface will purged sooner or later...
+ return Response.ok().build();
}
/**