def save(self):
xmlrpc = XMLRPCConnection()<EOL>data = {<EOL>'<STR_LIT>': self.rt,<EOL>'<STR_LIT:name>': self.name,<EOL>'<STR_LIT:description>': self.description,<EOL>'<STR_LIT>': [],<EOL>'<STR_LIT>': self.avps<EOL>}<EOL>for tag_name in self.tags:<EOL><INDENT>data['<STR_LIT>'].append(tag_name)<EOL><DEDENT>if self.id is None:<EOL><INDENT>try:<EOL><INDENT>vrf = xmlrpc.connection.add_vrf(<EOL>{<EOL>'<STR_LIT>': data,<EOL>'<STR_LIT>': self._auth_opts.options<EOL>})<EOL><DEDENT>except xmlrpclib.Fault as xml_fault:<EOL><INDENT>raise _fault_to_exception(xml_fault)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>vrfs = xmlrpc.connection.edit_vrf(<EOL>{<EOL>'<STR_LIT>': { '<STR_LIT:id>': self.id },<EOL>'<STR_LIT>': data,<EOL>'<STR_LIT>': self._auth_opts.options<EOL>})<EOL><DEDENT>except xmlrpclib.Fault as xml_fault:<EOL><INDENT>raise _fault_to_exception(xml_fault)<EOL><DEDENT>if len(vrfs) != <NUM_LIT:1>:<EOL><INDENT>raise NipapError('<STR_LIT>' % len(vrfs))<EOL><DEDENT>vrf = vrfs[<NUM_LIT:0>]<EOL><DEDENT>VRF.from_dict(vrf, self)<EOL>_cache['<STR_LIT>'][self.id] = self<EOL>
Save changes made to object to NIPAP.

            If the object represents a new VRF unknown to NIPAP (attribute `id`
            is `None`) this function maps to the function
            :py:func:`nipap.backend.Nipap.add_vrf` in the backend, used to
            create a new VRF. Otherwise it maps to the function
            :py:func:`nipap.backend.Nipap.edit_vrf` in the backend, used to
            modify the VRF. Please see the documentation for the backend
            functions for information regarding input arguments and return
            values.