code: def detach(self):
          
          attachments = self.attachments
          if not attachments:
              # Not attached; no error needed, just return
              return
          # A volume can only be attached to one device at a time, but for some
          # reason this is a list instead of a singular value
          att = attachments[0]
          instance_id = att["server_id"]
          attachment_id = att["id"]
          try:
              self._nova_volumes.delete_server_volume(instance_id, attachment_id)
          except Exception as e:
              raise exc.VolumeDetachmentFailed("%s" % e)
docs: Detaches this volume from any device it may be attached to. If it
          is not attached, nothing happens.