#NEWLINE# @ classmethod #NEWLINE# def delete_router( cls , router ) : #NEWLINE# #INDENT# body = cls . client . list_router_interfaces ( router [ 'id' ] ) #NEWLINE# interfaces = body [ 'ports' ] #NEWLINE# for i in interfaces : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# cls . client . remove_router_interface_with_subnet_id ( router [ 'id' ] , i [ 'fixed_ips' ] [ 0 ] [ 'subnet_id' ] ) #NEWLINE# #UNINDENT# except lib_exc . NotFound : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# cls . client . delete_router ( body [ 'id' ] )