@requires_rw<EOL><INDENT>def remove_vrf(self, auth, spec):<DEDENT>
self._logger.debug("<STR_LIT>" % unicode(spec))<EOL>vrfs = self.list_vrf(auth, spec)<EOL>for vrf in vrfs:<EOL><INDENT>v4spec = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': vrf['<STR_LIT:id>']<EOL>}<EOL>v6spec = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': vrf['<STR_LIT:id>']<EOL>}<EOL>self.remove_prefix(auth, spec = v4spec, recursive = True)<EOL>self.remove_prefix(auth, spec = v6spec, recursive = True)<EOL><DEDENT>where, params = self._expand_vrf_spec(spec)<EOL>sql = "<STR_LIT>" % where<EOL>self._execute(sql, params)<EOL>for v in vrfs:<EOL><INDENT>audit_params = {<EOL>'<STR_LIT>': v['<STR_LIT:id>'],<EOL>'<STR_LIT>': v['<STR_LIT>'],<EOL>'<STR_LIT>': v['<STR_LIT:name>'],<EOL>'<STR_LIT:username>': auth.username,<EOL>'<STR_LIT>': auth.authenticated_as,<EOL>'<STR_LIT>': auth.full_name,<EOL>'<STR_LIT>': auth.authoritative_source,<EOL>'<STR_LIT:description>': '<STR_LIT>' % v['<STR_LIT>']<EOL>}<EOL>sql, params = self._sql_expand_insert(audit_params)<EOL>self._execute('<STR_LIT>' % sql, params)<EOL><DEDENT>
Remove a VRF.

            * `auth` [BaseAuth]
                AAA options.
            * `spec` [vrf_spec]
                A VRF specification.

            Remove VRF matching the `spec` argument.

            This is the documentation of the internal backend function. It's
            exposed over XML-RPC, please also see the XML-RPC documentation for
            :py:func:`nipap.xmlrpc.NipapXMLRPC.remove_vrf` for full
            understanding.