code: def _detach(cls, iface_id):
          
          iface = cls._info(iface_id)
          opers = []
          vm_id = iface.get('vm_id')
          if vm_id:
              cls.echo('The iface is still attached to the vm %s.' % vm_id)
              cls.echo('Will detach it.')
              opers.append(cls.call('hosting.vm.iface_detach', vm_id, iface_id))
          return opers
docs: Detach an iface from a vm.