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

Support lookup of MoID by reference Org/Name inside the rest_api module #138

Open
baelen-git opened this issue Sep 11, 2024 · 0 comments
Open

Comments

@baelen-git
Copy link

It would be great if the module would be able to automatically lookup the MoID of the object we are trying to reference.

Currently you need 1 task to lookup the MOID based on the filters you specify and then you can use that MoID in the body of your rest_api post.

Current behavior - the referenced MOID would need to be collected first with another task.

      api_body: {
        "Name": "boris",
        "VlanId": "10",
        "MulticastPolicy": "{{ Multicast_moid }}",
        "AutoAllowOnUplinks": true,
        "IsNative": false,
        "EthNetworkPolicy": "{{ vlan_policy }}"
      }

We would like to do

      api_body: {
        "Name": "boris",
        "VlanId": "10",
        "MulticastPolicy": [MoRef:ORG_NAME\PolicyName],
        "AutoAllowOnUplinks": true,
        "IsNative": false,
        "EthNetworkPolicy": [MoRef:Boris\vlans]
      }

Then the module would go and collect that MoID in the background and replaces it inside the body we are going to post.

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

1 participant