Revision ab6d1a2f snf-cyclades-app/synnefo/api/management/commands/network-create.py

b/snf-cyclades-app/synnefo/api/management/commands/network-create.py
157 157
        dhcp = parse_bool(options["dhcp"])
158 158

  
159 159
        if not name:
160
            raise CommandError("name is required")
160
            name=""
161

  
161 162
        if not flavor:
162 163
            raise CommandError("flavor is required")
163 164

  
164
        if (subnet is None) and (subnet6 is None):
165
            raise CommandError("subnet or subnet6 is required")
166 165
        if subnet is None and gateway is not None:
167 166
            raise CommandError("Can not use gateway without subnet")
168 167
        if subnet6 is None and gateway6 is not None:
169 168
            raise CommandError("Can not use gateway6 without subnet6")
170

  
171 169
        if public and not (backend_ids or floating_ip_pool):
172 170
            raise CommandError("backend-ids is required")
173 171
        if not userid and not public:

Also available in: Unified diff