@@ -21,9 +21,6 @@ class NetworkEvent:
21
21
network_name : str
22
22
tenant_id : UUID
23
23
external : bool
24
- network_type : str | None
25
- physical_network : str | None
26
- segmentation_id : int | None
27
24
28
25
@classmethod
29
26
def from_event_dict (cls , data : dict ) -> Self :
@@ -34,9 +31,6 @@ def from_event_dict(cls, data: dict) -> Self:
34
31
network ["name" ],
35
32
UUID (network ["project_id" ]),
36
33
bool (network ["router:external" ]),
37
- network ["provider:network_type" ],
38
- network ["provider:physical_network" ],
39
- network ["provider:segmentation_id" ],
40
34
)
41
35
42
36
@@ -46,9 +40,6 @@ def handle_network_create_or_update(
46
40
"""Handle Openstack Neutron Network CRUD Event."""
47
41
event = NetworkEvent .from_event_dict (event_data )
48
42
49
- if event .network_type not in APPLICABLE_NETWORK_TYPES :
50
- return 0
51
-
52
43
_ensure_nautobot_ipam_namespace_exists (nautobot , str (event .network_uuid ))
53
44
_create_nautobot_ucvni (nautobot , event , ucvni_group_name )
54
45
@@ -59,9 +50,6 @@ def handle_network_delete(_conn, nautobot: Nautobot, event_data: dict) -> int:
59
50
"""Handle Openstack Neutron Network CRUD Event."""
60
51
event = NetworkEvent .from_event_dict (event_data )
61
52
62
- if event .network_type not in APPLICABLE_NETWORK_TYPES :
63
- return 0
64
-
65
53
_delete_nautobot_ipam_namespace (nautobot , str (event .network_uuid ))
66
54
_delete_nautotbot_ucvni (nautobot , id = str (event .network_uuid ))
67
55
@@ -84,7 +72,6 @@ def _create_nautobot_ucvni(
84
72
"status" : {"name" : "Active" },
85
73
"tenant" : str (event .tenant_id ),
86
74
"ucvni_group" : {"name" : ucvni_group_name },
87
- "ucvni_id" : event .segmentation_id ,
88
75
}
89
76
try :
90
77
response = nautobot .plugins .undercloud_vni .ucvnis .create (payload )
0 commit comments