New Pure Code site is live!
After many months of messing with some very old code, we have launched a revised site for the Pure Code Portal. It is much more minimalistic and cleaner than the old one, and we have plans to add our Code videos and Pure Employee website links in the near future. Have a look and feel free to leave a comment if you would like to see something on the site. https://code.purestorage.com/ Cheers, //Mike486Views2likes1CommentFusion / Python
Just wanted to let you all know that I've just published a new blog on my recent github repo - its a reporting package that assist customers in tagging volumes in a fusion fleet with chargeback codes, and then generate a spreadsheet every month with all of the space reporting on those volumes (several times a day, if necessary) organised by chargeback code The code is available in Github now (Open Source, use freely!) If it doesn't quite work as you'ld like it to, lmk your suggestions - happy to improve it for wider use.159Views2likes0CommentsPure1 API: get_hardware returns array references with id only (no name/fqdn) for one array
Hi all, We consume the Pure1 public REST API (1.6) via py-pure-client to sync hardware inventory, and hit something I'd like to sanity-check with the community. What we see: For one FlashArray in our fleet, every item returned by get_hardware carries an array reference with only the id and resource_type: {"id": "<array-uuid>", "resource_type": "arrays"} For every other array (several dozen), and for all items from get_network_interfaces — including that same array's interfaces — the reference is complete: {"id": "<array-uuid>", "name": "<array-name>", "resource_type": "arrays", "fqdn": "<array-fqdn>"} Why it matters The SDK model for this reference (FixedReferenceFqdn) documents fqdn as "the fully qualified domain name of the appliance when resource_type is arrays", so the id-only shape looks like it doesn't match the schema. py-pure-client models raise AttributeError when an unset field is accessed, so code that reads ref.name directly crashes rather than getting None. It started roughly a week ago. All the affected items also share one _as_of timestamp from that time, i.e. that array's hardware snapshot hasn't refreshed since. What we've ruled out Not a Purity version effect: the array's Purity//FA version hasn't changed in weeks, and many other arrays on the same version return complete references. Workaround (in case it helps anyone) Resolve the array from the reference id via get_arrays() instead of relying on name: id_to_name = {a.id: a.name for a in client.get_arrays()} ref = item.arrays[0] name = getattr(ref, "name", None) or id_to_name.get(getattr(ref, "id", None)) Questions Has anyone else seen id-only array references from Pure1 — and what triggered it (re-registration, phone-home/connectivity, something on the Pure1 side)? Is an id-only reference ever expected for resource_type "arrays", or is name/fqdn guaranteed? Any recommended way to detect that an array's Pure1 data has stopped refreshing, beyond checking _as_of? We've also raised it with our SE. Thanks!60Views1like1Comment