Committed by
Gerrit Code Review
[ONOS-3013]: unify the output of subnet api
Change-Id: I97f9f61137282358cf8b8a9c5a172825f5a1d5a6
Showing
1 changed file
with
4 additions
and
4 deletions
... | @@ -69,8 +69,8 @@ import com.google.common.collect.Sets; | ... | @@ -69,8 +69,8 @@ import com.google.common.collect.Sets; |
69 | @Path("subnets") | 69 | @Path("subnets") |
70 | public class SubnetWebResource extends AbstractWebResource { | 70 | public class SubnetWebResource extends AbstractWebResource { |
71 | private final Logger log = LoggerFactory.getLogger(SubnetWebResource.class); | 71 | private final Logger log = LoggerFactory.getLogger(SubnetWebResource.class); |
72 | - public static final String SUBNET_NOT_CREATE = "Subnets is failed to create!"; | 72 | + public static final String SUBNET_NOT_CREATED = "Subnet failed to create!"; |
73 | - public static final String SUBNET_NOT_FOUND = "Subnets is not found"; | 73 | + public static final String SUBNET_NOT_FOUND = "Subnet is not found"; |
74 | public static final String JSON_NOT_NULL = "JsonNode can not be null"; | 74 | public static final String JSON_NOT_NULL = "JsonNode can not be null"; |
75 | 75 | ||
76 | @GET | 76 | @GET |
... | @@ -111,11 +111,11 @@ public class SubnetWebResource extends AbstractWebResource { | ... | @@ -111,11 +111,11 @@ public class SubnetWebResource extends AbstractWebResource { |
111 | Iterable<Subnet> subnets = createOrUpdateByInputStream(subnode); | 111 | Iterable<Subnet> subnets = createOrUpdateByInputStream(subnode); |
112 | Boolean result = nullIsNotFound((get(SubnetService.class) | 112 | Boolean result = nullIsNotFound((get(SubnetService.class) |
113 | .createSubnets(subnets)), | 113 | .createSubnets(subnets)), |
114 | - SUBNET_NOT_CREATE); | 114 | + SUBNET_NOT_CREATED); |
115 | 115 | ||
116 | if (!result) { | 116 | if (!result) { |
117 | return Response.status(INTERNAL_SERVER_ERROR) | 117 | return Response.status(INTERNAL_SERVER_ERROR) |
118 | - .entity(SUBNET_NOT_CREATE).build(); | 118 | + .entity(SUBNET_NOT_CREATED).build(); |
119 | } | 119 | } |
120 | return Response.status(202).entity(result.toString()).build(); | 120 | return Response.status(202).entity(result.toString()).build(); |
121 | } catch (Exception e) { | 121 | } catch (Exception e) { | ... | ... |
-
Please register or login to post a comment