- //This code need to get changed to get the UserID and pass from a common place.
- transaction.setuId(prop.getProperty(inputRequestAction.concat(".default-rest-user")));
- transaction.setPswd(prop.getProperty(inputRequestAction.concat(".default-rest-pass")));
-
+ String userKey = vnfType + "." + REST_PROTOCOL + "." + inputRequestAction + ".user";
+ String passwordKey = vnfType + "." + REST_PROTOCOL + "." + inputRequestAction + ".password";
+ transaction.setuId(prop.getProperty(userKey));
+ transaction.setPswd(prop.getProperty(passwordKey));
+ if (StringUtils.isBlank(transaction.getuId()) || StringUtils.isBlank(transaction.getPswd())) {
+ throw new Exception ("User Id or Password is not set !!!");
+ }