# How to hide an action's output leaf name

**URL:** <https://dmap-community.ductus.global/t/how-to-hide-an-actions-output-leaf-name/718>\
**Category:** CDB and CDB API\
**Created:** [September 22, 2016, 3:25am UTC](https://dmap-community.ductus.global/t/how-to-hide-an-actions-output-leaf-name/718 "2016-09-22T03:25:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebaozhu](https://avatars.discourse-cdn.com/v4/letter/e/f0a364/32.png) [@ebaozhu](https://dmap-community.ductus.global/u/ebaozhu)\
**Post date:** [September 22, 2016, 3:25am UTC](https://dmap-community.ductus.global/t/how-to-hide-an-actions-output-leaf-name/718/1 "2016-09-22T03:25:13Z")

</div>

Hi,  
We have implemented an action set for ping.  
The output has a leaf called response.  
But when triggering ping CLI in confd, the out put always contains “response”.  
Can we have a way to remove the “response” from the ping output?

```
container ping {
tailf:action set {
  tailf:exec "/usr/lib/siara/bin/ping.pl" {
  }
  input {
    leaf destination {
      type inet:ipv4-address;
    }
    leaf count {
      type int32;
      default "3";
    }
  }
  output {
    leaf response {
      type string;
    }
  }
}

```

}

R1# ping set count 1 destination 192.168.56.33  
response PING 192.168.56.33 (192.168.56.33): source 192.168.56.133, 36 data bytes,

response timeout is 1 second

response .

response

response ----192.168.56.33 PING Statistics----

response 1 packets transmitted, 0 packets received, 100.0% packet loss

---

<div class="post-metadata">

**Author:** ![jjohansson](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@jjohansson](https://dmap-community.ductus.global/u/jjohansson)\
**Post date:** [September 22, 2016, 7:47pm UTC](https://dmap-community.ductus.global/t/how-to-hide-an-actions-output-leaf-name/718/2 "2016-09-22T19:47:34Z")

</div>

I don’t think so, not with actions.

If you have only one leaf in the output-statement and collect the complete output from the ping-command into one single string, you can have something like this:

> admin@confd\> request config host localhost ping  
> one-leaf PING localhost (127.0.0.1) 56(84) bytes of data.  
> 64 bytes from confd.vm (127.0.0.1): icmp\_seq=1 ttl=64 time=0.016 ms  
> 64 bytes from confd.vm (127.0.0.1): icmp\_seq=2 ttl=64 time=0.023 ms  
> 64 bytes from confd.vm (127.0.0.1): icmp\_seq=3 ttl=64 time=0.033 ms

> — localhost ping statistics —  
> 3 packets transmitted, 3 received, 0% packet loss, time 1999ms  
> rtt min/avg/max/mdev = 0.016/0.024/0.033/0.007 ms

> [ok][2016-09-22 19:41:50]  
> admin@confd\>

You can’t avoid the name of leaf in the output but you avoid the rest of the structure.

---

<div class="post-metadata">

**Author:** ![vchilukuri](https://avatars.discourse-cdn.com/v4/letter/v/ccd318/32.png) [@vchilukuri](https://dmap-community.ductus.global/u/vchilukuri)\
**Post date:** [August 16, 2018, 12:13pm UTC](https://dmap-community.ductus.global/t/how-to-hide-an-actions-output-leaf-name/718/3 "2018-08-16T12:13:39Z")

</div>

output {  
leaf response {  
tailf:alt-name “”;  
type string;  
}  
}

This works.
