code: def disable(self, retain_port=False):
          
          self.update_server(disabled=True)
          if retain_port:
              return
          self.update_device(disabled=True)
          if self.conf.dhcp_delete_namespaces and self.network.namespace:
              ns_ip = ip_lib.IPWrapper(self.root_helper,
                                       self.network.namespace)
              try:
                  ns_ip.netns.delete(self.network.namespace)
              except RuntimeError:
                  msg = _('Failed trying to delete namespace: %s')
                  LOG.exception(msg, self.network.namespace)
docs: Teardown DHCP.
  
          Disable DHCP for this network by updating the remote server
          and then destroying any local device and namespace.