@@ -73,7 +73,7 @@ def is_valid_domain(
73
73
74
74
75
75
def _create_outside_network (conn : Connection , project_id : uuid .UUID ):
76
- network = _find_outside_network (conn , project_id )
76
+ network = _find_outside_network (conn , project_id . hex )
77
77
if network :
78
78
logger .info (
79
79
"%s Network %s already exists for this tenant" ,
@@ -82,7 +82,7 @@ def _create_outside_network(conn: Connection, project_id: uuid.UUID):
82
82
)
83
83
else :
84
84
payload = {
85
- "project_id" : project_id ,
85
+ "project_id" : project_id . hex ,
86
86
"name" : OUTSIDE_NETWORK_NAME ,
87
87
"router:external" : False ,
88
88
}
@@ -94,20 +94,20 @@ def _create_outside_network(conn: Connection, project_id: uuid.UUID):
94
94
object_type = "network" ,
95
95
object_id = network .id ,
96
96
action = "access_as_external" ,
97
- target_project_id = project_id ,
97
+ target_project_id = project_id . hex ,
98
98
)
99
99
100
100
101
101
def _delete_outside_network (conn : Connection , project_id : uuid .UUID ):
102
- network = _find_outside_network (conn , project_id )
102
+ network = _find_outside_network (conn , project_id . hex )
103
103
if network :
104
104
conn .delete_network (network .id )
105
105
logger .info (
106
106
"Deleted %s Network %s for this tenant" , OUTSIDE_NETWORK_NAME , network .id
107
107
)
108
108
109
109
110
- def _find_outside_network (conn , project_id ):
110
+ def _find_outside_network (conn : Connection , project_id : str ):
111
111
return conn .network .find_network ( # type: ignore
112
112
project_id = project_id ,
113
113
name_or_id = OUTSIDE_NETWORK_NAME ,
0 commit comments