Forum Discussion

MacchiSmith's avatar
MacchiSmith
Community Manager
10 months ago

Have you implemented any storage automation leveraging

Have you implemented any storage automation leveraging APIs to streamline repetitive tasks? If not, what has been the barrier to entry?

10 Replies

  • jfriar - yeah, my poking around is turning up a similar gaps in explaining what happened when we turned the corner from 1.X to 2.X. Lemme ping another CLI jockey I work with who is on the Fusion and API team. Stay tuned.
  • the python rest-client vs. py-pure-client... The py-pure-client library is... lacking in examples, and "official" type status. Most of the pure documentation I've come across (granted, I didn't spend hours searching) seems to point at the rest-client, but the rest-client only supports API vs. 1.x, which is now limited as compared to API 2.x (which the py-pure-client supports). Specifically, being able to create a volume without a default protection group...
  • a documentation resource example that comes up when search the site: https://support.purestorage.com/bundle/m_python_rest_client/page/topics/reference/r_quick_references.html makes no reference of py-pure-client
  • jfriar - thanks for the insight…I’d love to help get your comments over to the right folks here. Have you looked in this spot for updates? https://github.com/PureStorage-OpenConnect/python-scripts Let me know; I could be totally off base in what you’re looking for…lemme know how it goes!
  • I have not - thanks! At a quick glance, I don't see any examples that disable default protection. From what I can see, the REST API 1.x doesn't support this at all. REST API 2.x requires setting `with_default_protection=False` when calling the "post_volumes" function, so I just did a grep for "with_default" (zero matches) and for "default" (got a few unrelated matches)
  • jfriar - lemme shepherd this one through for you and figure out how we can get you hooked up with an answer/solution. Stay tuned and thanks for the quick and detailed ping back!
  • jfriar - that was fast. Looks like the API 2.0 documentation is not under the Support portal…it’s under the Code one we manage. https://code.purestorage.com/py-pure-client/fa_reference.html#pypureclient.flasharray.FA_2_35.client.Client.post_volumes Also, here is the answer an SE wrote back with: In REST 2 use the `post_volumes()` function and pass `with_default_protection=false`
  • thanks! I did manage to find those things on my own by grepping the py-pure-client source code and cross-referencing with the API 2.x documentation (linked to from my SAN). It's not clear how "supported" the py-pure-client module is though, since I didn't really find reference to it from any of the normal places - I found it via google I think... I would rather have found it by searching the Pure support portal....
  • I also didn't see any obvious comments/notes that say the API 1.x is NOT in parity with the full feature set of the FlashArray, but I wasn't really looking for that. TBH, I'm not even sure which version of Purity started the deviation. What happens if you create a volume via the 1.x API? Does it just force you to have a default protection group, without a way to skip creating it?