Unable to retrieve output value while using extended context

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Unable to retrieve output value while using extended context

L1 Bithead

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 accepted solution

Accepted Solutions

L4 Transporter

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=

View solution in original post

1 REPLY 1

L4 Transporter

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=

  • 1 accepted solution
  • 1498 Views
  • 1 replies
  • 0 Likes
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!