Ejemplo n.º 1
0
 def handle(self, request, data):
     try:
         manila.share_unmanage(request, self.initial['share_id'])
         messages.success(
             request,
             _('Successfully sent the request to unmanage share: %s')
             % data['name'])
         return True
     except Exception:
         exceptions.handle(request, _("Unable to unmanage share."))
     return False
Ejemplo n.º 2
0
 def handle(self, request, data):
     try:
         manila.share_unmanage(request, self.initial['share_id'])
         messages.success(
             request,
             _('Successfully sent the request to unmanage share: %s')
             % data['name'])
         return True
     except Exception:
         exceptions.handle(request, _("Unable to unmanage share."))
     return False
Ejemplo n.º 3
0
    def test_share_unmanage(self):
        api.share_unmanage(self.request, self.id)

        self.manilaclient.shares.unmanage.assert_called_once_with(self.id)