How do we return raw output of an entity?

Asked by Chelsea Winfree

In barbican, we are using the show.ShowOne class to get a secret; however, we'd like to return the payload without any description around it.

As an abbreviated example:

$ barbican secret get <secret uri>
| Field | Value |
| Payload | boop |

The ascii table is returned here. I noticed there was also a -f shell format which returns:

$ barbican secret get <secret uri> -f shell

My question is, I wish to be able to call this command and only receive the payload:

$ barbican secret get <secret uri> -f simple

Is there something like i've structured above? I've been in the documentation and havent been able to find anything specific to that.

TL;DR: I just want to return the simple entity using the take_action function inheriting from show.ShowOne, how do i do this?

Question information

English Edit question
python-openstackclient Edit question
No assignee Edit question
Solved by:
Doug Hellmann
Last query:
Last reply:
Revision history for this message
Best Doug Hellmann (doug-hellmann) said :

It sounds like you want to use the "value" formatter, which prints only the string representation of the data passed to it.

Revision history for this message
Chelsea Winfree (chelsea-winfree) said :

Thats it! thank you so much!