예제 #1
0
파일: export.py 프로젝트: thrawn01/lunr
 def delete(self, req):
     try:
         force = Config.to_bool(req.params.get("force", False))
         initiator = req.params.get("initiator")
         export = self.helper.exports.delete(self.volume_id, force=force, initiator=initiator)
     except NotFound:
         raise HTTPNotFound("No export for volume: '%s'" % self.volume_id)
     except ResourceBusy, e:
         raise HTTPConflict(str(e))
예제 #2
0
파일: test_api.py 프로젝트: thrawn01/lunr
    def setUp(self):
        # Default the config to the local user and our current dir
        self.volume_type = os.environ.get("API_VOLUME_TYPE", "vtype")
        self.skip_admin = Config.to_bool(os.environ.get("API_SKIP_ADMIN", "false"))

        # Start the Lunr API Service if needed
        self.api = LunrApiService()

        # setup our timeouts
        super(LunrApiTestCase, self).setUp()
예제 #3
0
    def setUp(self):
        # Default the config to the local user and our current dir
        self.volume_type = os.environ.get('API_VOLUME_TYPE', 'vtype')
        self.skip_admin = Config.to_bool(
            os.environ.get('API_SKIP_ADMIN', 'false'))

        # Start the Lunr API Service if needed
        self.api = LunrApiService()

        # setup our timeouts
        super(LunrApiTestCase, self).setUp()
예제 #4
0
파일: export.py 프로젝트: rackerlabs/lunr
 def delete(self, req):
     try:
         force = Config.to_bool(req.params.get('force', False))
         initiator = req.params.get('initiator')
         export = self.helper.exports.delete(self.volume_id,
                                             force=force,
                                             initiator=initiator)
     except NotFound:
         raise HTTPNotFound("No export for volume: '%s'" % self.volume_id)
     except ResourceBusy, e:
         raise HTTPConflict(str(e))
예제 #5
0
파일: __init__.py 프로젝트: rackerlabs/lunr
 def setUp(self):
     # Default the config to the local user and our current dir
     self.volume_type = os.environ.get('API_VOLUME_TYPE','vtype')
     self.skip_admin = Config.to_bool(os.environ.get('API_SKIP_ADMIN', 'false'))