Adjust VNI column for provisioner to text
Allows the storing of the textual cluster labels (e.g. 'upstream') as valid VNI values in the template.
This commit is contained in:
@ -78,6 +78,7 @@ class DBNetworkElement(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
network_template = db.Column(db.Integer, db.ForeignKey("network_template.id"), nullable=False)
|
||||
vni = db.Column(db.Integer, nullable=False)
|
||||
vni2 = db.Column(db.Text, nullable=False)
|
||||
|
||||
def __init__(self, network_template, vni):
|
||||
self.network_template = network_template
|
||||
|
@ -268,7 +268,7 @@ def create_template_network_element(name, vni):
|
||||
networks = []
|
||||
found_vni = False
|
||||
for network in networks:
|
||||
if int(network['vni']) == int(vni):
|
||||
if network['vni'] == vni:
|
||||
found_vni = True
|
||||
if found_vni:
|
||||
retmsg = {'message': 'The VNI "{}" in network template "{}" already exists.'.format(vni, name)}
|
||||
|
Reference in New Issue
Block a user