def gen_check_lease_attrs(self, attrs_dict):
<EOL>assert attrs_dict['<STR_LIT>']<EOL>assert attrs_dict['<STR_LIT:address>']<EOL>ipn = IPNetwork(attrs_dict['<STR_LIT:address>'] + '<STR_LIT:/>' +<EOL>attrs_dict['<STR_LIT>'])<EOL>if attrs_dict.get('<STR_LIT>') is None:<EOL><INDENT>attrs_dict['<STR_LIT>'] = self.server_ip<EOL><DEDENT>if attrs_dict.get('<STR_LIT>') is None:<EOL><INDENT>attrs_dict['<STR_LIT>'] = attrs_dict['<STR_LIT>']<EOL><DEDENT>ripn = IPNetwork(attrs_dict['<STR_LIT>'] + '<STR_LIT:/>' +<EOL>attrs_dict['<STR_LIT>'])<EOL>assert ripn.network == ipn.network<EOL>attrs_dict['<STR_LIT>'] = str(ipn.prefixlen)<EOL>attrs_dict['<STR_LIT>'] = str(ipn.network)<EOL>if attrs_dict.get('<STR_LIT>') is None:<EOL><INDENT>attrs_dict['<STR_LIT>'] = str(ipn.broadcast)<EOL><DEDENT>if attrs_dict.get('<STR_LIT>') is None:<EOL><INDENT>attrs_dict['<STR_LIT>'] = attrs_dict['<STR_LIT>']<EOL><DEDENT>if attrs_dict.get('<STR_LIT>') is None:<EOL><INDENT>attrs_dict['<STR_LIT>'] = attrs_dict['<STR_LIT>']<EOL><DEDENT>logger.debug('<STR_LIT>')<EOL>return attrs_dict<EOL>
Generate network mask in CIDR format and subnet.

        Validate the given arguments. Otherwise AddrFormatError exception
        will be raised and catched in the FSM.