Forum Discussion

dominique_lafla's avatar
3 years ago

Is there a way to get data that would mimic what the

Is there a way to get data that would mimic what the SDK would return under different error conditions? I'm trying to develop scripts to assure our leadership that all is well with our arrays by checking various measures and showing that there's no problem. "_Are we below 85% (e.g.) on our array capacity?_" is an easy one to check, and I can see where the field I need to check is returned. What's harder to code for is, "_Are my replicated snapshots all current on the target arrays?_" I don't have a case now of a replicated snapshot that isn't current. I suppose I can set one up and force it into some error state and see how protect-group calls differ for the broken pair, but I'm not sure a "real life" break would look the same. I'd rather find some data files I can import into a PS context and inject them into how I'm handling those calls now to see if I detect the breakage -- or how I'd detect the breakage. So, are there such sample of SDK results from various error conditions? Thanks, Nick
  • Hi Nick -- We don't have any specific examples for the SDK that covers error scenarios. Eg you mentioned 85% of capacity. I added a PowerShell Toolkit issue to track. As I work on the next version I can look into adding. https://github.com/PureStorage-OpenConnect/powershell-toolkit/issues/66
  • Much of this work would be custom but there could be an interesting way to approach with a common language use like your example.
  • That's unfortunate; I was hoping a testing team would be able create common error conditions and capture the API responses along the way. Heck, maybe they have to do regression testing on API responses for various edge cases and know what those API responses are supposed to look like. How they then map into SDK calls would be similarly predictable. If wishes were horses, and all that.... Thanks, Nick
  • We do have a way to test responses with a swagger UI. https://github.com/PureStorage-OpenConnect/swagger some responses would be tracked there