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))
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()
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()
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))
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'))