Revision 8c7c9813 snf-cyclades-app/synnefo/db/models_factory.py

b/snf-cyclades-app/synnefo/db/models_factory.py
203 203
class IPv4SubnetFactory(SubnetFactory):
204 204
    ipversion = 4
205 205
    cidr = factory.Sequence(lambda n: '192.168.{0}.0/24'.format(n))
206
    gateway = factory.Sequence(lambda n: '192.168.{0}.1'.format(n))
206
    gateway = factory.LazyAttribute(lambda a: a.cidr[:-4] + '1')
207 207
    pool = factory.RelatedFactory(IPPoolTableFactory, 'subnet')
208 208

  
209 209

  

Also available in: Unified diff