postservice/31-one-netmng: Correction de la création des réseaux "Niveau 2"

Il faut ajouter une "balise" AR dans le fichier d'initialisation pour créer effectivement
les "baux" disponibles dans le réseaux.

fixes #12319

Contribution VR de Nouvelle Calédonie
This commit is contained in:
Philippe Caseiro 2015-07-09 07:05:56 +02:00
parent a5d09b8bd7
commit d140b32d03
1 changed files with 7 additions and 4 deletions

View File

@ -257,17 +257,20 @@ class OneNetworkL2(OneNetwork):
fd, tmp_path = mkstemp(prefix='oneVnet-') fd, tmp_path = mkstemp(prefix='oneVnet-')
template = open(tmp_path, 'w') template = open(tmp_path, 'w')
template.write('NAME = "{0}"\n'.format(self.zone)) template.write('NAME = "{0}"\n'.format(self.zone))
template.write('TYPE = ETHER\n')
template.write('SIZE = "{0}"\n'.format(self.net_size))
if self.tag: if self.tag:
template.write('VLAN = yes\n') template.write('VLAN = yes\n')
template.write('VLAN_ID = {0}\n'.format(self.tag)) template.write('VLAN_ID = "{0}"\n'.format(self.tag))
if self.trunk: if self.trunk:
template.write('VLAN_TAGGED_ID = {0}\n'.format(self.trunk)) template.write('VLAN_TAGGED_ID = "{0}""\n'.format(self.trunk))
template.write('BRIDGE = {0}\n'.format(self.swname)) template.write('BRIDGE = {0}\n'.format(self.swname))
if self.net_size:
template.write("AR=[\n")
template.write(' TYPE = "ETHER",\n')
template.write(' SIZE = "{0}"\n'.format(self.net_size))
template.write("]\n")
template.close() template.close()
return tmp_path return tmp_path