def get_one(self, export_id): """Get Zone Exports""" request = pecan.request context = request.environ['context'] return ZoneExportAPIv2Adapter.render('API_v2', self.central_api.get_zone_export( context, export_id), request=request)
def get_one(self, export_id): """Get Zone Exports""" request = pecan.request context = request.environ['context'] return ZoneExportAPIv2Adapter.render( 'API_v2', self.central_api.get_zone_export( context, export_id), request=request)
def post_all(self, zone_id): """Create Zone Export""" request = pecan.request response = pecan.response context = request.environ['context'] # Create the zone_export zone_export = self.central_api.create_zone_export(context, zone_id) response.status_int = 202 zone_export = ZoneExportAPIv2Adapter.render('API_v2', zone_export, request=request) response.headers['Location'] = zone_export['links']['self'] return zone_export
def post_all(self, zone_id): """Create Zone Export""" request = pecan.request response = pecan.response context = request.environ['context'] # Create the zone_export zone_export = self.central_api.create_zone_export( context, zone_id) response.status_int = 202 zone_export = ZoneExportAPIv2Adapter.render( 'API_v2', zone_export, request=request) response.headers['Location'] = zone_export['links']['self'] return zone_export
def get_all(self, **params): """List Zone Exports""" request = pecan.request context = request.environ['context'] marker, limit, sort_key, sort_dir = utils.get_paging_params( params, self.SORT_KEYS) # Extract any filter params. accepted_filters = ('status', 'message', 'zone_id', ) criterion = self._apply_filter_params( params, accepted_filters, {}) return ZoneExportAPIv2Adapter.render( 'API_v2', self.central_api.find_zone_exports( context, criterion, marker, limit, sort_key, sort_dir), request=request)
def get_all(self, **params): """List Zone Exports""" request = pecan.request context = request.environ['context'] marker, limit, sort_key, sort_dir = utils.get_paging_params( params, self.SORT_KEYS) # Extract any filter params. accepted_filters = ( 'status', 'message', 'zone_id', ) criterion = self._apply_filter_params(params, accepted_filters, {}) return ZoneExportAPIv2Adapter.render( 'API_v2', self.central_api.find_zone_exports(context, criterion, marker, limit, sort_key, sort_dir), request=request)