Skip to content

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

@baelen-git

Description

@baelen-git

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions