'Show session items'

def do_session(self, input):

    (argc, argv) = util.parseinput(input, 1)
    if (argc == 0):
        items = [(item.value.get_longname(), item.value.get_status()) for item in self.session.get_itemlist()]
        self.io.print_session_items({'items': items})
    else:
        try:
            index = int(argv[0])
        except ValueError:
            raise exception.CmdErr, 'Invalid    index'
        item = self.session.get_item(index)
        args = {'name': item.get_name(), 'status': item.get_status(), 'info': item.get_info()}
        self.io.print_session_item(args)
