def get_subnet_nwk_excl(self, tenant_id, excl_list, excl_part=False):
net_list = self.get_network_by_tenant(tenant_id)<EOL>ret_subnet_list = []<EOL>for net in net_list:<EOL><INDENT>if excl_part:<EOL><INDENT>name = net.get('<STR_LIT:name>')<EOL>part = name.partition('<STR_LIT>')[<NUM_LIT:2>]<EOL>if part:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>subnet_lst = self.get_subnets_for_net(net.get('<STR_LIT:id>'))<EOL>for subnet_elem in subnet_lst:<EOL><INDENT>subnet = subnet_elem.get('<STR_LIT>').split('<STR_LIT:/>')[<NUM_LIT:0>]<EOL>subnet_and_mask = subnet_elem.get('<STR_LIT>')<EOL>if subnet not in excl_list:<EOL><INDENT>ret_subnet_list.append(subnet_and_mask)<EOL><DEDENT><DEDENT><DEDENT>return ret_subnet_list<EOL>
Retrieve the subnets of a network.

        Get the subnets inside a network after applying the exclusion
        list.