Unable to retrieve output value while using extended context

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to retrieve output value while using extended context

L0 Member

Hello team,

 

I'm trying to use the extended context feature to keep only the data I'm interrested in and put them where I need them to be.

 

The automation I'm using is infoblox-get-ip from Infoblox integration.

 

Here is the output of the automation:

screen1.png

 I'm setting the following string in the Extended Context field (splitted on multiple lines for better visibility):

 

IpInformation.status=result.status::
IpInformation.network=result.network::
IpInformation.names=result.names::
IpInformation.site=result.extattrs.site.value::
IpInformation.macaddress=result.macaddress

 

I'm getting the following result (information is censored, InRange and Pivate come from another integration): 

screen3.PNG

As you can see only some of the fields are present in the output.

The following fields are missing : macaddress and extattrs.site.value.

 

Moreover all fields comming from the extended context functionnality are arrays (insteal of single value as the real output, except for names).

 

Here are the full context printed:

{
"IpInformation": {
"status": [
"value"
],
"InRange": "value",
"names": [
"value",
"value",
"value"
],
"Private": "value",
"network": [
"value"
]
},
"Infoblox": {
"IP": {
"Status": "value",
"MacAddress": "value",
"ReferenceID": "value",
"Network": "value",
"LeaseState": "value",
"Objects": [
"value",
"value",
"value",
"value"
],
"IsConflict": false,
"Names": [
"value",
"value",
"value"
],
"NetworkView": "value",
"Extattrs": {
"Organization": {
"value": "value",
"inheritance_source": {
"_ref": "value"
}
},
"Site": {
"value": "value",
"inheritance_source": {
"_ref": "value"
}
}
},
"Usage": [
"value",
"DHCP"
],
"IpAddress": "value",
"DhcpClientIdentifier": "value",
"Types": [
"value",
"value",
"value",
"value"
]
}
}
}

 

My questions are :

  • Am I using the right string in Extended Context to get the fields I want?
  • Is it possible to extract the single value instead  of arrays?

Thank you for reading and your help on this topic.

1 REPLY 1

L3 Networker

Hi @AlexandreBorgo, You cannot select the array items inside extended context. Just dump all the data to context and then use what you need. Use the command like below.

 

!infoblox-get-ip extend-context=data=

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!