GabrielBrascher commented on pull request #4387:
URL: https://github.com/apache/cloudstack/pull/4387#issuecomment-708659020
@DaanHoogland I found out why some cases the regex failed and some not.
Updated code to fix it (for good, I hope). Also added test case addressing both
situations.
The regex uses comma to set the split separator: `String psswd =
resp[1].toString().split(",")[0];`
This works on cases such as:
```
...,"password":"password","action":"OFF"...
```
However, the specific case that I got with OOBM it has the following JSON
String:
```
"username":"root","password":"password"},"resourcestate":"PrepareForMaintenance","hahost":false
```
With that said, the code has been updated to deal with both cases:
`"password":"password"},` and `"password":"password",`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]