Revision 1c366ac9 kamaki/cli/commands/network.py

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

  
158 158
class NetworkTypeArgument(ValueArgument):
159 159

  
160
    types = ('CUSTOM', 'MAC_FILTERED', 'IP_LESS_ROUTED', 'PHYSICAL_VLAN')
160
    types = ('MAC_FILTERED', 'CUSTOM', 'IP_LESS_ROUTED', 'PHYSICAL_VLAN')
161 161

  
162 162
    @property
163 163
    def value(self):
164
        return getattr(self, '_value', None)
164
        return getattr(self, '_value', self.types[0])
165 165

  
166 166
    @value.setter
167 167
    def value(self, new_value):
......
175 175

  
176 176
@command(network_cmds)
177 177
class network_create(_init_network, _optional_json):
178
    """Create a new network"""
178
    """Create a new network (default type: MAC_FILTERED)"""
179 179

  
180 180
    arguments = dict(
181 181
        name=ValueArgument('Network name', '--name'),
......
185 185
            'Valid network types: %s' % (', '.join(NetworkTypeArgument.types)),
186 186
            '--type')
187 187
    )
188
    required = ('network_type', )
189 188

  
190 189
    @errors.generic.all
191 190
    @errors.cyclades.connection

Also available in: Unified diff