- sharedNetworkName = models.CharField(max_length=30, blank=True, null=True)
- sharedNetworkId = models.CharField(null=True, blank=True, max_length=256, help_text="Quantum network")
+ 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.topology_kind=="BigSwitch"):
+ print >> sys.stderr, "XXX warning: topology_kind invalid case"
+ self.topology_kind="bigswitch"
+ elif (self.topology_kind=="Physical"):
+ print >> sys.stderr, "XXX warning: topology_kind invalid case"
+ self.topology_kind="physical"
+ elif (self.topology_kind=="Custom"):
+ print >> sys.stderr, "XXX warning: topology_kind invalid case"
+ self.toplogy_kind="custom"