aboutsummaryrefslogtreecommitdiffstats
path: root/src/resource_inventory/resource_manager.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2020-02-06 21:26:23 +0000
committerGerrit Code Review <gerrit@opnfv.org>2020-02-06 21:26:23 +0000
commitac50210dd7e1a250307f5d20a43624621c50b0a0 (patch)
tree8899511a240debe825e64054f3d8450a6af99849 /src/resource_inventory/resource_manager.py
parentcb8561e3758e40c2ec514b6ce5d296c849e894e6 (diff)
parent4bfa2fa78c487bd8a0453de847ffcb27af526425 (diff)
Merge "Fix booking errors"
Diffstat (limited to 'src/resource_inventory/resource_manager.py')
-rw-r--r--src/resource_inventory/resource_manager.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/resource_inventory/resource_manager.py b/src/resource_inventory/resource_manager.py
index 34c7be3..242d21a 100644
--- a/src/resource_inventory/resource_manager.py
+++ b/src/resource_inventory/resource_manager.py
@@ -20,7 +20,8 @@ from resource_inventory.models import (
ResourceBundle,
HostProfile,
Network,
- Vlan
+ Vlan,
+ PhysicalNetwork,
)
@@ -134,12 +135,16 @@ class ResourceManager:
generic_interface = generic_interfaces[int_num]
physical_interface.config.clear()
for connection in generic_interface.connections.all():
+ physicalNetwork = PhysicalNetwork.objects.create(
+ vlan_id=vlan_map[connection.network.name],
+ generic_network=connection.network
+ )
physical_interface.config.add(
Vlan.objects.create(
vlan_id=vlan_map[connection.network.name],
tagged=connection.vlan_is_tagged,
public=connection.network.is_public,
- network=connection.network
+ network=physicalNetwork
)
)