Revision 0e27687b kamaki/cli/commands/network.py

b/kamaki/cli/commands/network.py
36 36

  
37 37
from kamaki.cli import command
38 38
from kamaki.cli.command_tree import CommandTree
39
from kamaki.cli.errors import (
40
    CLISyntaxError, CLIBaseUrlError, CLIInvalidArgument)
39
from kamaki.cli.errors import CLISyntaxError, CLIBaseUrlError
41 40
from kamaki.clients.cyclades import CycladesNetworkClient
42 41
from kamaki.cli.argument import FlagArgument, ValueArgument
43 42
from kamaki.cli.commands import _command_init, errors, addLogSettings
......
101 100
    @errors.generic.all
102 101
    @errors.cyclades.connection
103 102
    def _run(self):
104
        nets = self.client.list_networks()
103
        nets = self.client.list_networks(detail=self['detail'])
105 104
        nets = self._filter_by_name(nets)
106 105
        nets = self._filter_by_id(nets)
107
        if not self['detail']:
108
            nets = [dict(id=net['id'], name=net['name']) for net in nets]
109 106
        kwargs = dict()
110 107
        if self['more']:
111 108
            kwargs['out'] = StringIO()
......
138 135
@command(network_cmds)
139 136
class network_create(_init_network, _optional_json):
140 137
    """Create a new network
141
    Valid network types: CUSTOM, MAC_FILTERED, IP_LESS_ROUTED, PHYSICAL_VLAN
138
    Valid network types: CUSTOM MAC_FILTERED IP_LESS_ROUTED PHYSICAL_VLAN
142 139
    """
143 140

  
144 141
    arguments = dict(

Also available in: Unified diff