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

b/snf-cyclades-app/synnefo/api/management/commands/network-create.py
146 146
        link = options['link']
147 147
        mac_prefix = options['mac_prefix']
148 148
        tags = options['tags']
149
        userid = options["owner"]
149 150

  
150 151
        if not name:
151 152
            raise CommandError("Name is required")
......
155 156
            raise CommandError("Flavor is required")
156 157
        if public and not backend_id:
157 158
            raise CommandError("backend-id is required")
158
        if backend_id and not public:
159
            raise CommandError("Private networks must be created to"
160
                               " all backends")
159
        if not userid and not public:
160
            raise CommandError("'owner' is required for private networks")
161 161

  
162 162
        if mac_prefix and flavor == "MAC_FILTERED":
163 163
            raise CommandError("Can not override MAC_FILTERED mac-prefix")

Also available in: Unified diff