@@ -73,7 +73,7 @@ def is_valid_domain(
7373
7474
7575def _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 )
7777 if network :
7878 logger .info (
7979 "%s Network %s already exists for this tenant" ,
@@ -82,7 +82,7 @@ def _create_outside_network(conn: Connection, project_id: uuid.UUID):
8282 )
8383 else :
8484 payload = {
85- "project_id" : project_id ,
85+ "project_id" : project_id . hex ,
8686 "name" : OUTSIDE_NETWORK_NAME ,
8787 "router:external" : False ,
8888 }
@@ -94,20 +94,20 @@ def _create_outside_network(conn: Connection, project_id: uuid.UUID):
9494 object_type = "network" ,
9595 object_id = network .id ,
9696 action = "access_as_external" ,
97- target_project_id = project_id ,
97+ target_project_id = project_id . hex ,
9898 )
9999
100100
101101def _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 )
103103 if network :
104104 conn .delete_network (network .id )
105105 logger .info (
106106 "Deleted %s Network %s for this tenant" , OUTSIDE_NETWORK_NAME , network .id
107107 )
108108
109109
110- def _find_outside_network (conn , project_id ):
110+ def _find_outside_network (conn : Connection , project_id : str ):
111111 return conn .network .find_network ( # type: ignore
112112 project_id = project_id ,
113113 name_or_id = OUTSIDE_NETWORK_NAME ,
0 commit comments