To be clear, I am *not* suggesting any change to the stack-list display format.
Also, these commands can't just switch to the stack-show display format because it is possible that some scripts are parsing the output.
The solution I am suggesting is for these commands to follow up by doing a stacks.get(stack_id) and then formatting that as if it was a stack-list with a single entry, so something like the following pseudo-code
body = hc.stacks.create(**fields)
self._display_single_list_stack(body['stack']['id'])
Then all actions attached to this bug can just use _display_single_list_stack
I marked the other bugs as duplicates since the fixes for them will be basically identical to this one, even if they are submitted as separate changes.
To be clear, I am *not* suggesting any change to the stack-list display format.
Also, these commands can't just switch to the stack-show display format because it is possible that some scripts are parsing the output.
The solution I am suggesting is for these commands to follow up by doing a stacks. get(stack_ id) and then formatting that as if it was a stack-list with a single entry, so something like the following pseudo-code
body = hc.stacks. create( **fields) _display_ single_ list_stack( body['stack' ]['id'] )
self.
def _display_ single_ list_stack( self, stack_id) get(stack_ id) print_list( stacks, fields, sortby_index=3)
stack = hc.stacks.
stacks = [{'id': stack.id ...}]
fields = ['id', 'stack_name', 'stack_status', 'creation_time']
utils.
Then all actions attached to this bug can just use _display_ single_ list_stack
I marked the other bugs as duplicates since the fixes for them will be basically identical to this one, even if they are submitted as separate changes.