diff options
author | 2018-09-21 11:15:30 +0800 | |
---|---|---|
committer | 2018-09-21 11:15:45 +0800 | |
commit | 650e6f9840ac8e55abf0624e3e6314e5fce06d3b (patch) | |
tree | fd6d1cf0ebcd2fb7d4e86360b2f6ce273d05e392 | |
parent | 5a096b4b8b211f62e23fdd11e163e5541d4a14a5 (diff) |
modify url partten
Change-Id: Iea44439aab65ce33865b18f2e03aa2f480a8daad
Issue-ID: USECASEUI-141
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
-rw-r--r-- | server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java b/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java index 0f29b49d..fb10faad 100644 --- a/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java +++ b/server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java @@ -57,7 +57,7 @@ public class SotnController { public List<NetWorkResource> getNetWorkResources(){ List<NetWorkResource> result = new ArrayList<NetWorkResource>(); String json = sotnService.getNetWorkResources(); - if("FAILED".equals(json)){ + if(json.indexOf("FAILED")==-1){ return result; } createJson(json,result); @@ -73,7 +73,7 @@ public class SotnController { return result; } - @RequestMapping(value = {"/getPinterfaceByPnfName/{pnfName}"}, method = RequestMethod.GET) + @RequestMapping(value = {"/getPinterfaceByPnfName/{pnfName:.+}"}, method = RequestMethod.GET) public List<Pinterface> getPinterfaceByPnfName(@PathVariable(value="pnfName") String pnfName){ return sotnService.getPinterfaceByPnfName(pnfName); } @@ -83,42 +83,42 @@ public class SotnController { return sotnService.getLogicalLinks(); } - @RequestMapping(value = {"/getSpecificLogicalLink/{linkName}"}, method = RequestMethod.GET) + @RequestMapping(value = {"/getSpecificLogicalLink/{linkName:.+}"}, method = RequestMethod.GET) public String getSpecificLogicalLink(@PathVariable(value="linkName") String linkName){ return sotnService.getSpecificLogicalLink(linkName); } - @RequestMapping(value = {"/getHostUrl/{aaiId}"}, method = RequestMethod.GET) + @RequestMapping(value = {"/getHostUrl/{aaiId:.+}"}, method = RequestMethod.GET) public String getHostUrl(@PathVariable(value="aaiId") String aaiId){ return sotnService.getHostUrl(aaiId); } - @RequestMapping(value = {"/createHostUrl/{aaiId}"}, method = RequestMethod.PUT) + @RequestMapping(value = {"/createHostUrl/{aaiId:.+}"}, method = RequestMethod.PUT) public String createHostUrl(HttpServletRequest request,@PathVariable(value="aaiId") String aaiId){ return sotnService.createTopoNetwork(request,aaiId); } - @RequestMapping(value = {"/createTopoNetwork/{networkId}"}, method = RequestMethod.PUT) + @RequestMapping(value = {"/createTopoNetwork/{networkId:.+}"}, method = RequestMethod.PUT) public String createTopoNetwork(HttpServletRequest request,@PathVariable(value="networkId") String networkId){ return sotnService.createTopoNetwork(request,networkId); } - @RequestMapping(value = {"/pnf/{pnfName}/p-interfaces/p-interface/{tp-id}/createTerminationPoint"}, method = RequestMethod.PUT) + @RequestMapping(value = {"/pnf/{pnfName:.+}/p-interfaces/p-interface/{tp-id:.+}/createTerminationPoint"}, method = RequestMethod.PUT) public String createTerminationPoint(HttpServletRequest request,@PathVariable(value="pnfName") String pnfName,@PathVariable(value="tp-id") String tpId){ return sotnService.createTerminationPoint(request,pnfName,tpId); } - @RequestMapping(value = {"/createLink/{linkName}"}, method = RequestMethod.PUT) + @RequestMapping(value = {"/createLink/{linkName:.+}"}, method = RequestMethod.PUT) public String createLink(HttpServletRequest request,@PathVariable(value="linkName") String linkName){ return sotnService.createLink(request, linkName); } - @RequestMapping(value = {"/createPnf/{pnfName}"}, method = RequestMethod.PUT) + @RequestMapping(value = {"/createPnf/{pnfName:.+}"}, method = RequestMethod.PUT) public String createPnf(HttpServletRequest request,@PathVariable(value="pnfName") String pnfName){ return sotnService.createPnf(request, pnfName); } - @RequestMapping(value = {"/deleteLink/{linkName}/{resourceVersion}"}, method = RequestMethod.DELETE) + @RequestMapping(value = {"/deleteLink/{linkName:.+}/{resourceVersion:.+}"}, method = RequestMethod.DELETE) public String deleteLink(@PathVariable(value="linkName") String linkName,@PathVariable(value="resourceVersion") String resourceVersion){ return sotnService.deleteLink(linkName,resourceVersion); } @@ -131,7 +131,7 @@ public class SotnController { return sotnService.serviceInstanceInfo(customerId, serviceType, serviceId); } - @RequestMapping(value = {"/getPnfInfo/{pnfName}"}, method = RequestMethod.GET) + @RequestMapping(value = {"/getPnfInfo/{pnfName:.+}"}, method = RequestMethod.GET) public String getPnfInfo(@PathVariable(value="pnfName") String pnfName){ return sotnService.getPnfInfo(pnfName); } @@ -144,12 +144,12 @@ public class SotnController { return sotnService.getAllottedResources(customerId, serviceType,serviceId); } - @RequestMapping(value = {"/getConnectivityInfo/{connectivityId}"}, method = RequestMethod.GET) + @RequestMapping(value = {"/getConnectivityInfo/{connectivityId:.+}"}, method = RequestMethod.GET) public String getConnectivityInfo(@PathVariable(value="connectivityId") String connectivityId){ return sotnService.getConnectivityInfo(connectivityId); } - @RequestMapping(value = {"/getPinterfaceByVpnId/{vpnId}"}, method = RequestMethod.GET) + @RequestMapping(value = {"/getPinterfaceByVpnId/{vpnId:.+}"}, method = RequestMethod.GET) public String getPinterfaceByVpnId(@PathVariable(value="vpnId") String vpnId){ return sotnService.getPinterfaceByVpnId(vpnId); } |