ABX python script – Certain fields not available in payload

This post was originally published on this site

Hi,
Ive been tasked with creating an vRA integration with Red Hat Satelite / Foreman to create a host record when a host is provisioned in vRA – and I have limited knowledge of vRA.

I want to pass certain variables from an existing workflow, like FQDN and ipadress, to a vRA 8 ABX python script but I cant find those fields in the payload, any suggestions what I need to do? Those variables are created in a Infoblox integration.

This is what I got in the payload:

{

  “tags”: {},

  “zoneId”: “c15bb122-1f25-4978-a414-98777b0a7e76”,

  “projectId”: “2bd617ba-8978-48a0-b623-8b9ce081283f”,

  “requestId”: “bc426644-0d35-41ef-835c-a030ce1777ea”,

  “__metadata”: {

    “orgId”: “40e8da04-1a54-4a24-9dbb-f6d4686864d2”,

    “headers”: {

      “tokenId”: “02I05VBEGwjOjv9CbShUlYjWR+8EbQxeWY//U5WUybI=”,

      “blocking”: “false”,

      “runnableId”: “8a7480dc72e2edc50175694507002176”,

      “runnableType”: “extensibility.abx”,

      “uber-trace-id”: “1f7f8dab3f0043b1b9cf0a75caf57510:a13825abcb764bd3ac83f11dafea14fd:dfcdc591-40d7-4f3d-a34d-23cabef4983c:1”,

      “uberctx-org-id”: “40e8da04-1a54-4a24-9dbb-f6d4686864d2”,

      “uberctx-user-id”: “provisioning-A1KuSnvAGYtUK4fH”,

      “eventTraceEntryId”: “b911ede5-8b74-4a97-987e-6edd11a585d0”,

      “sampling-decision”: “true”,

      “uberctx-parent-id”: “dfcdc591-40d7-4f3d-a34d-23cabef4983c”,

      “provisioning-callback-uri”: “/provisioning/config/extensibility-callbacks/1a90c3ff-5a03-4c09-94ae-897ec79ed41a”

    },

    “targetId”: “fd3c0769-b97c-4f38-bae5-7642b03e5eb5”,

    “userName”: “myusername”,

    “eventType”: “EVENT”,

    “timeStamp”: 1603795581253,

    “sourceType”: “provisioning”,

    “targetType”: “ComputeAllocationTaskState”,

    “eventTopicId”: “network.configure”,

    “correlationId”: “c80f78a6-467d-40cb-8e8d-3173d9a8237b–bc426644-0d35-41ef-835c-a030ce1777ea”,

    “sourceIdentity”: “97669e34-8cb5-44a6-b5f4-c6374fcb9bb0”,

    “correlationType”: “contextId”

  },

  “endpointId”: “d90614ea-1033-4a5e-8ff2-62f0c6d519ee”,

  “blueprintId”: “19c1cb97-8c87-4586-be2c-e3ce7964ef3d”,

  “componentId”: “Cloud_vSphere_Machine_1”,

  “externalIds”: [

    “some-hostname”

  ],

  “resourceIds”: [

    “bfdedb47-b905-44b9-a208-1adec84f9239”

  ],

  “deploymentId”: “c80f78a6-467d-40cb-8e8d-3173d9a8237b”,

  “componentTypeId”: “Cloud.vSphere.Machine”,

  “customProperties”: {

    “image”: “redhat7-image-prod”,

    “flavor”: “test-small”,

    “customizationSpec”: “rhel”,

    “resourceGroupName”: “linux/vRA”,

    “Infoblox.IPAM.Network.dnsView”: “Internal”

  },

  “networkProfileIds”: [

    “15ee38ff-990b-4a1f-80c2-b133ac348017”

  ],

  “networkSelectionIds”: [

    [

      [

        “1d2e8ed3-0ad3-4573-b28d-b18dc017ce09”

      ]

    ]

  ]

}

{

  “tags”: {},

  “zoneId”: “c15bb122-1f25-4978-a414-98777b0a7e76”,

  “projectId”: “2bd617ba-8978-48a0-b623-8b9ce081283f”,

  “requestId”: “bc426644-0d35-41ef-835c-a030ce1777ea”,

  “__metadata”: {

    “orgId”: “40e8da04-1a54-4a24-9dbb-f6d4686864d2”,

    “headers”: {

      “tokenId”: “02I05VBEGwjOjv9CbShUlYjWR+8EbQxeWY//U5WUybI=”,

      “blocking”: “false”,

      “runnableId”: “8a7480dc72e2edc50175694507002176”,

      “runnableType”: “extensibility.abx”,

      “uber-trace-id”: “1f7f8dab3f0043b1b9cf0a75caf57510:a13825abcb764bd3ac83f11dafea14fd:dfcdc591-40d7-4f3d-a34d-23cabef4983c:1”,

      “uberctx-org-id”: “40e8da04-1a54-4a24-9dbb-f6d4686864d2”,

      “uberctx-user-id”: “provisioning-A1KuSnvAGYtUK4fH”,

      “eventTraceEntryId”: “b911ede5-8b74-4a97-987e-6edd11a585d0”,

      “sampling-decision”: “true”,

      “uberctx-parent-id”: “dfcdc591-40d7-4f3d-a34d-23cabef4983c”,

      “provisioning-callback-uri”: “/provisioning/config/extensibility-callbacks/1a90c3ff-5a03-4c09-94ae-897ec79ed41a”

    },

    “targetId”: “fd3c0769-b97c-4f38-bae5-7642b03e5eb5”,

    “userName”: “myusername”,

    “eventType”: “EVENT”,

    “timeStamp”: 1603795581253,

    “sourceType”: “provisioning”,

    “targetType”: “ComputeAllocationTaskState”,

    “eventTopicId”: “network.configure”,

    “correlationId”: “c80f78a6-467d-40cb-8e8d-3173d9a8237b–bc426644-0d35-41ef-835c-a030ce1777ea”,

    “sourceIdentity”: “97669e34-8cb5-44a6-b5f4-c6374fcb9bb0”,

    “correlationType”: “contextId”

  },

  “endpointId”: “d90614ea-1033-4a5e-8ff2-62f0c6d519ee”,

  “blueprintId”: “19c1cb97-8c87-4586-be2c-e3ce7964ef3d”,

  “componentId”: “Cloud_vSphere_Machine_1”,

  “externalIds”: [

    “some-hostname”

  ],

  “resourceIds”: [

    “bfdedb47-b905-44b9-a208-1adec84f9239”

  ],

  “deploymentId”: “c80f78a6-467d-40cb-8e8d-3173d9a8237b”,

  “componentTypeId”: “Cloud.vSphere.Machine”,

  “customProperties”: {

    “image”: “redhat7-image-prod”,

    “flavor”: “test-small”,

    “customizationSpec”: “rhel”,

    “resourceGroupName”: “linux/vRA”,

    “Infoblox.IPAM.Network.dnsView”: “Internal”

  },

  “networkProfileIds”: [

    “15ee38ff-990b-4a1f-80c2-b133ac348017”

  ],

  “networkSelectionIds”: [

    [

      [

        “1d2e8ed3-0ad3-4573-b28d-b18dc017ce09”

      ]

    ]

  ]

}

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.