X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetstack%2Fcore%2Fmodels%2Fnetwork.py;fp=planetstack%2Fcore%2Fmodels%2Fnetwork.py;h=eeacc1a5dfc903185929e510b40ab03bf968b12c;hb=0b21a6d8dd7278dcf1d6a6d0ecd16e15fca3724b;hp=e09cb9d72377f6df016fe69d189521bf147823fe;hpb=52b870d36370f46fdc33de2948504c2aec8db1a1;p=plstackapi.git diff --git a/planetstack/core/models/network.py b/planetstack/core/models/network.py index e09cb9d..eeacc1a 100644 --- a/planetstack/core/models/network.py +++ b/planetstack/core/models/network.py @@ -70,28 +70,28 @@ class NetworkTemplate(PlCoreBase): name = models.CharField(max_length=32) description = models.CharField(max_length=1024, blank=True, null=True) - guaranteedBandwidth = models.IntegerField(default=0) + guaranteed_bandwidth = models.IntegerField(default=0) visibility = models.CharField(max_length=30, choices=VISIBILITY_CHOICES, default="private") translation = models.CharField(max_length=30, choices=TRANSLATION_CHOICES, default="none") - sharedNetworkName = models.CharField(max_length=30, blank=True, null=True) - sharedNetworkId = models.CharField(null=True, blank=True, max_length=256, help_text="Quantum network") - topologyKind = models.CharField(null=False, blank=False, max_length=30, choices=TOPOLOGY_CHOICES, default="BigSwitch") - controllerKind = models.CharField(null=True, blank=True, max_length=30, choices=CONTROLLER_CHOICES, default=None) + shared_network_name = models.CharField(max_length=30, blank=True, null=True) + shared_network_id = models.CharField(null=True, blank=True, max_length=256, help_text="Quantum network") + topology_kind = models.CharField(null=False, blank=False, max_length=30, choices=TOPOLOGY_CHOICES, default="BigSwitch") + controller_kind = models.CharField(null=True, blank=True, max_length=30, choices=CONTROLLER_CHOICES, default=None) def __init__(self, *args, **kwargs): super(NetworkTemplate, self).__init__(*args, **kwargs) # somehow these got set wrong inside of the live database. Remove this # code after all is well... - if (self.topologyKind=="BigSwitch"): - print "XXX warning: topologyKind invalid case" - self.topologyKind="bigswitch" - elif (self.topologyKind=="Physical"): - print "XXX warning: topologyKind invalid case" - self.topologyKind="physical" - elif (self.topologyKind=="Custom"): - print "XXX warning: topologyKind invalid case" - self.toplogyKind="custom" + if (self.topology_kind=="BigSwitch"): + print "XXX warning: topology_kind invalid case" + self.topology_kind="bigswitch" + elif (self.topology_kind=="Physical"): + print "XXX warning: topology_kind invalid case" + self.topology_kind="physical" + elif (self.topology_kind=="Custom"): + print "XXX warning: topology_kind invalid case" + self.toplogy_kind="custom" def __unicode__(self): return u'%s' % (self.name)