Revision 94b7399e

b/snf-cyclades-app/synnefo/logic/networks.py
119 119
        state='ACTIVE')
120 120

  
121 121
    if subnet:
122
        Subnet.objects.create(network=network,
123
                              ipversion=4,
124
                              cidr=subnet,
125
                              gateway=gateway,
126
                              dhcp=dhcp)
122
        s = Subnet.objects.create(network=network,
123
                                  ipversion=4,
124
                                  cidr=subnet,
125
                                  gateway=gateway,
126
                                  dhcp=dhcp)
127
        s.ip_pools.create(size=0)
128

  
127 129
    if subnet6:
128 130
        Subnet.objects.create(network=network,
129 131
                              ipversion=6,

Also available in: Unified diff