Revision ddcb2e09 kamaki/cli/commands/__init__.py

b/kamaki/cli/commands/__init__.py
32 32
# or implied, of GRNET S.A.command
33 33

  
34 34
from kamaki.cli.logger import get_logger
35
from kamaki.cli.utils import print_json, print_items, filter_dicts_by_dict
35
from kamaki.cli.utils import (
36
    print_list, print_dict, print_json, print_items, ask_user,
37
    filter_dicts_by_dict)
36 38
from kamaki.cli.argument import FlagArgument, ValueArgument
37 39
from sys import stdin, stdout, stderr
38 40

  
......
99 101
        self._err.write(u'%s\n' % s)
100 102
        self._err.flush()
101 103

  
104
    def print_list(self, *args, **kwargs):
105
        kwargs.setdefault('out', self._out)
106
        return print_list(*args, out=self._out, **kwargs)
107

  
108
    def print_dict(self, *args, **kwargs):
109
        kwargs.setdefault('out', self._out)
110
        return print_dict(*args, out=self._out, **kwargs)
111

  
112
    def print_json(self, *args, **kwargs):
113
        kwargs.setdefault('out', self._out)
114
        return print_json(*args, out=self._out, **kwargs)
115

  
116
    def print_items(self, *args, **kwargs):
117
        kwargs.setdefault('out', self._out)
118
        return print_items(*args, out=self._out, **kwargs)
119

  
120
    def ask_user(self, *args, **kwargs):
121
        kwargs.setdefault('user_in', self._in)
122
        kwargs.setdefault('out', self._out)
123
        return print_items(*args, out=self._out, **kwargs)
124

  
102 125
    @DontRaiseKeyError
103 126
    def _custom_url(self, service):
104 127
        return self.config.get_cloud(self.cloud, '%s_url' % service)

Also available in: Unified diff