Repository navigation
Fix the defects found by the hardware QA suite - #1096
Merged
Merged
Conversation
Confirmed on a FlashArray//X50R2 running Purity 6.10.6 (REST 2.54):
- purefa_info: `gather_subset: all` crashed in the host-group performance
dict and dropped the `default` section; every performance attribute is
now read defensively and keyed correctly, replica links report
recovery_point, the login banner is reported as default.banner, alert
watchers are also published as config.alert_watchers and management-access
policies report their rules and aggregation strategy.
- purefa_hardware sent an empty PATCH body (Hardware instead of
HardwarePatch); `enabled` is now required and an unknown component fails.
- purefa_dns refused to update the management configuration ("Changing
service type is not permitted"), crashed when adding a source, sent a null
source on every update and deleted the management DNS on `state: absent`
of an unknown name.
- purefa_network: `state: absent` of a missing interface is a no-op and
virtual interface names with hyphens are rejected with a clear message.
- purefa_network_access_policy: rule lookups are scoped to the policy and an
empty result is "not found"; positional rule names are documented.
- purefa_policy_management_access: roles are validated against the four the
array accepts, rename is idempotent and enabled/aggregation_strategy are
only applied when supplied.
- purefa_admin: lockout can be cleared and SSO disabled.
- purefa_timeout range check, purefa_ntp inverted context check and
unreachable default, purefa_phonehome excludes None vs [], purefa_maintenance
idempotent window, purefa_smtp field clearing, purefa_syslog_settings
CA certificate, purefa_eradication single-timer resets.
- Read-only operations (state test, listings) report changed=False and no
longer crash on sparse test results or error responses: purefa_logging,
purefa_ra, purefa_snmp, purefa_snmp_agent, purefa_alert, purefa_syslog,
purefa_ntp, purefa_kmip, purefa_saml, purefa_cbsexpand, purefa_messages,
purefa_audits, purefa_sessions.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Confirmed on a FlashArray//X50R2 running Purity 6.10.6 (REST 2.54): - Rename repeats: purefa_volume, purefa_hg, purefa_vg, purefa_realm, purefa_tgroup, purefa_endpoint and purefa_policy_management_access no longer fail or re-create the old object when the rename already happened. - purefa_snap: a repeated create with the same suffix is a no-op; copies take with_default_protection; overwrite copies are checked. - purefa_volume / purefa_realm: QoS can be cleared with "0"; a bare present no longer falls into the copy path; priority is applied on its own. - purefa_pg: members are added and removed idempotently, targets can be detached, `enabled` is only applied when supplied. - purefa_pgsched: snap_at/replicate_at/blackout are sent in milliseconds (they were 1000x too small); delete uses scaled frequencies. - purefa_pod: quota can be cleared, `default_protection_pg: []` clears the list, absent on a destroyed pod no longer raises, failover compares names. - purefa_default_protection: pod-scope add/remove send the right model. - purefa_dirsnap: keep_for is compared before it is patched. - purefa_policy: the first NFS rule of a policy is created with every field, nfs/smb/snapshot rules are modified in place, autodir policies rename, anonuid/anongid use proper version checks, quota_enforced lands in the right field, password_history/lockout_duration 0 clear. - purefa_user: api tokens are only deleted when one exists; purefa_token reports changed on create and recreate and honours timeout on REST 2. - purefa_connect: an existing connection is matched by address and type and the fleet-management connection is never touched; encrypted version check. - purefa_fleet member removal TypeError; purefa_ad / purefa_offload / purefa_token substring version tests; purefa_kmip CA length check; purefa_vnc, purefa_inventory, purefa_certs, purefa_saml, purefa_ds, purefa_dsrole, purefa_host, purefa_volume_tags, purefa_fs, purefa_pgsnap code-reading defects. - purefa_info: directory exports, every SAML IdP, password and SMB policy fields. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- purefa_network_access_policy: look rules up by name only (the array rejects names together with policy_names) and verify the owning policy. - purefa_pgsched: send `enabled` with every frequency/at body; the array rejects frequency and at without it. - purefa_pgsnap: pass add_to_pgs as add_to_protection_group_names (the SDK dereferences FixedReference.id and crashed). - purefa_token: detect an existing token from the admin listing instead of GET /admin/<user>/apitoken, which creates one. - purefa_smtp: clear the relay host with an explicit null (the array refuses an empty string). - purefa_policy: skip the policy-level nfs_version patch while the NFS policy has no rules. - purefa_hardware: wait for the identify LED state to settle after a patch. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ntics - purefa_pgsched: `at` and blackout times are seconds since midnight on the array (the SDK documents milliseconds, which the array silently drops); frequencies stay in milliseconds and `enabled` accompanies them. - purefa_smtp: send an explicit null for the relay host through the SDK's request serialisation. - purefa_snmp: v3 managers compare their readable fields before patching. - purefa_token: document that the REST 1.x login creates the token, so `present` cannot report a creation; recreate and absent report changes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…2 login - purefa_pgsched: a body carrying `enabled` applies only `enabled` on the array, so frequency/at, enabled and retention are patched separately. - purefa_smtp: clear the relay host with a JSON null through the SDK's transport, which the validated model path cannot produce. - purefa_token: open the REST 2 session for the lifetime with the API token only. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- purefa_token: create a token with a lifetime through the REST 1.x apitoken endpoint, which accepts a timeout; the REST 2 round trip deleted the token its own session was opened with. - purefa_smtp: clear the relay host with a null on its own, clear the other fields with empty strings and keep the sender domain, which the array refuses to clear. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The array clears the SMTP relay host with an empty string and ignores a null, and refuses to clear the sender domain at all, so `state: absent` clears every other field through the normal SDK call and keeps the sender domain. purefa_token's login creates the token it then deletes, so `absent` always reports a change; documented. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Audit records only carry the fields that apply to the event and the SDK model raises AttributeError for an absent one, which crashed the module on the lab array. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Master's fix for the delays (PR 1095) is equivalent to the QA one and also lets `timer` set both delays when the array no longer reports eradication_delay; take it and keep the documentation of the array rule that disabled_delay can only be increased. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
Fixes the defects found by running a hardware QA suite over every module of the collection against a FlashArray//X50R2 and a FlashArray//C60R3 (Purity//FA 6.10.6, REST 2.54, py-pure-client 1.94.1). The suite runs each module twice per mutation (the repeat must be a no-op), reads the result back through
purefa_info, and leaves the arrays as it found them.Highlights, all reproduced on hardware before the fix:
purefa_info:gather_subset: allcrashed in the host-group performance dict and dropped thedefaultsection; performance attributes are now read defensively and keyed correctly; addsdefault.banner,config.alert_watchers, directory exports, every SAML IdP, management-access policy rules and extra password/SMB policy fields.purefa_hardwaresent an empty PATCH body (Hardwareinstead ofHardwarePatch).purefa_dnsrefused to update the management configuration, crashed when adding a source and could delete the management DNS onstate: absentof an unknown name.purefa_pgschedsentsnap_at/replicate_atin seconds instead of milliseconds (1000x off) and the array needsenabledalongside them.purefa_pod: quota clear crashed,default_protection_pg: []never cleared, absent on a destroyed pod raised;purefa_default_protectionpod scope sent an invalid body.purefa_volume,purefa_hg,purefa_vg,purefa_realm,purefa_tgroup,purefa_endpoint,purefa_policy_management_accessfailed or re-created the old object.purefa_snaprepeat create failed "Name already in use";purefa_pgmember removal and target handling;purefa_dirsnapkeep_for;purefa_policyfirst NFS rule, in-place rule modification, autodir rename, anonuid/anongid version checks.purefa_connectmatched the fleet-management connection sharing the peer's address and would have patched it;purefa_fleetmember removal TypeError.purefa_user/purefa_tokenAPI token handling;purefa_network_access_policyrule lookups;purefa_adminlockout clear and SSO disable;purefa_smtpclearing;purefa_ntpinverted context check;purefa_phonehome,purefa_maintenance,purefa_snmp_agent,purefa_snmpidempotency; read-onlystate: testoperations reportchanged=Falseand tolerate sparse results.Verification: full suite against this branch on 2026-10-20 (see the QA report for the final numbers). The remaining skips are environment gaps (no fleet-free array, AD, KMIP, SAML IdP, offload target, NFS client).
ISSUE TYPE
COMPONENT NAME
purefa_info, purefa_hardware, purefa_dns, purefa_network, purefa_network_access_policy, purefa_policy_management_access, purefa_admin, purefa_timeout, purefa_logging, purefa_ra, purefa_snmp, purefa_snmp_agent, purefa_alert, purefa_syslog, purefa_ntp, purefa_kmip, purefa_saml, purefa_cbsexpand, purefa_phonehome, purefa_maintenance, purefa_messages, purefa_audits, purefa_sessions, purefa_smtp, purefa_syslog_settings, purefa_eradication, purefa_volume, purefa_snap, purefa_hg, purefa_vg, purefa_pg, purefa_pgsched, purefa_pgsnap, purefa_host, purefa_endpoint, purefa_volume_tags, purefa_pod, purefa_default_protection, purefa_realm, purefa_tgroup, purefa_fs, purefa_dirsnap, purefa_policy, purefa_user, purefa_token, purefa_connect, purefa_fleet, purefa_ad, purefa_offload, purefa_vnc, purefa_inventory, purefa_certs, purefa_ds, purefa_dsrole
ADDITIONAL INFORMATION
Behaviour changes worth noting for reviewers:
purefa_hardware.enabledis now required;purefa_pg.enabled,purefa_pgsched.enabled,purefa_vg.priority_*,purefa_eradicationdelays andpurefa_policy_management_accessenabled/aggregation_strategy lost their implicit defaults and are only applied when supplied (creation keeps the old effective defaults);purefa_snapgainswith_default_protection;purefa_info.config.saml2ssois now keyed by IdP name;purefa_certsgenerate: truealways regenerates (documented); a community-only change to an SNMP v2c manager and a passphrase-only change to the SNMP agent are no longer applied because the array masks those values (documented).Unit tests: 2883 passing.
ansible-test sanity(validate-modules, pep8, pylint, yamllint, compile, import) clean.🤖 Generated with Claude Code