meraki_network constraints around local and remote status pages is incorrect
mystery-rabbit opened this issue · 5 comments
With:
- name: "Set meraki_network settings - status pages"
cisco.meraki.meraki_network:
state: "present"
org_name: "{{ meraki_organisation.name }}"
net_name: "{{ inventory_hostname }}"
local_status_page_enabled: true
remote_status_page_enabled: false
... the following error is seen:
fatal: [Mock Branch 1]: FAILED! => {"changed": false, "msg": "local_status_page_enabled must be true when setting remote_status_page_enabled", "response": null, "status": null}
Logic in meraki_network is incorrect, as is the test-case when compared to the GUI. as a side note, the API will accept local=false, remote=true, even if this is not supported by the dashboard GUI.
I've already identified the issue in meraki_network and test coverage and am happy to submit a PR for review.
test coverage also never tests for remote=true, so it might be opportune to add coverage for that.
@kbreit - Question: what's the story with meraki_network and meraki_network_settings? the issue is in both.
Meraki removed the settings from the network endpoint and moved it to a network settings API endpoint so I recently created the meraki_network_settings
module to account for that change. The meraki_network
ones no longer work and when I release 3.0, they'll be removed.
The API documentation states
Enables / disables access to the device status page (http://[device's LAN IP]). Optional. Can only be set if localStatusPageEnabled is set to true
I'm enforcing the policy in the playbook but am considering removing that rule since I don't enforce every constraint the API imposes, so it's quite inconsistent.
I've already identified the issue in meraki_network and test coverage and am happy to submit a PR for review. test coverage also never tests for remote=true, so it might be opportune to add coverage for that.
Regarding the remote=true
test, if you want, I'd take a PR for that one. It shouldn't be hard to add so thank you for noticing that.
@kbreit - just realised i might have miss-understood you there and I've raised a PR you intended to do. happy for you to reject if thats the case :-) .