Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the active MAPS policy? #148

Open
mgoetze5 opened this issue Feb 15, 2024 · 2 comments
Open

How to change the active MAPS policy? #148

mgoetze5 opened this issue Feb 15, 2024 · 2 comments

Comments

@mgoetze5
Copy link

I tried to run this task

- name: Activate dflt_conservative_policy
  brocade.fos.brocade_maps_maps_policy:
    credential: "{{credential}}"
    vfid: "{{ default_vfid | default(-1) }}"
    maps_policies:
      - name: dflt_conservative_policy
        is_active_policy: True

and got this error

  "POST_resp_data": {
    "errors": {
      "@xmlns": "urn:ietf:params:xml:ns:yang:ietf-restconf",
      "error": {
        "error-type": "protocol",
        "error-tag": "Operation-failed",
        "error-app-tag": "Error",
        "error-path": "/maps-policy/name/dflt_conservative_policy/",
        "error-message": "Policy is already present.",
        "error-info": {
          "error-code": "19",
          "error-module": "maps"
        }
      }
    }
  }

I believe the problem is that I need a PATCH operation, not a POST operation. How can I do this with ansible?

@prasad-valmeti-broadcom
Copy link
Collaborator

  • name: Activate dflt_conservative_policy
    brocade.fos.brocade_maps_maps_policy:
    credential: "{{credential}}"
    vfid: "{{ default_vfid | default(-1) }}"
    all_entries: False
    maps_policies:
    - name: dflt_conservative_policy
    is_active_policy: True

Please add all_entries as False, it will do the additive operation on the maps data instead of full db operation. Hope this resolves your issue.

@prasad-valmeti-broadcom
Copy link
Collaborator

If there are no further issues, please let us know if we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants