Revision 7b72b50d snf-cyclades-app/synnefo/db/models.py

b/snf-cyclades-app/synnefo/db/models.py
475 475
    name = models.CharField('Network Name', max_length=128)
476 476
    userid = models.CharField('User ID of the owner', max_length=128,
477 477
                              null=True, db_index=True)
478
    # subnet will be null for IPv6 only networks
479
    subnet = models.CharField('Subnet', max_length=32, null=True)
480
    # subnet6 will be null for IPv4 only networks
481
    subnet6 = models.CharField('IPv6 Subnet', max_length=64, null=True)
482
    gateway = models.CharField('Gateway', max_length=32, null=True)
483
    gateway6 = models.CharField('IPv6 Gateway', max_length=64, null=True)
484
    dhcp = models.BooleanField('DHCP', default=True)
485 478
    flavor = models.CharField('Flavor', max_length=32, null=False)
486 479
    mode = models.CharField('Network Mode', max_length=16, null=True)
487 480
    link = models.CharField('Network Link', max_length=32, null=True)
......
500 493
    drained = models.BooleanField("Drained", default=False, null=False)
501 494
    floating_ip_pool = models.BooleanField('Floating IP Pool', null=False,
502 495
                                           default=False)
503
    pool = models.OneToOneField('IPPoolTable', related_name='network', null=True)
496
    external_router = models.BooleanField(default=False)
504 497
    serial = models.ForeignKey(QuotaHolderSerial, related_name='network',
505 498
                               null=True, on_delete=models.SET_NULL)
506 499

  
......
812 805
    def __unicode__(self):
813 806
        return u"<IPv4AdressPool, Subnet: %s>" % self.subnet_id
814 807

  
808

  
815 809
@contextmanager
816 810
def pooled_rapi_client(obj):
817 811
        if isinstance(obj, (VirtualMachine, BackendNetwork)):

Also available in: Unified diff