ret_scheds = self.client.get_snap_schedules(fs, path)
except CephfsConnectionException as e:
return e.to_tuple()
+ except Exception as e:
+ return -errno.EIO, '', str(e)
if format == 'json':
json_report = ','.join([ret_sched.report_json() for ret_sched in ret_scheds])
return 0, f'[{json_report}]', ''
self.log.debug(f'recursive is {recursive}')
except CephfsConnectionException as e:
return e.to_tuple()
+ except Exception as e:
+ return -errno.EIO, '', str(e)
if not scheds:
if format == 'json':
output: Dict[str, str] = {}
return -errno.ENOENT, '', str(e)
except CephfsConnectionException as e:
return e.to_tuple()
+ except Exception as e:
+ return -errno.EIO, '', str(e)
return 0, suc_msg, ''
@CLIWriteCommand('fs snap-schedule remove')
return -errno.ENOENT, '', str(e)
except CephfsConnectionException as e:
return e.to_tuple()
+ except Exception as e:
+ return -errno.EIO, '', str(e)
return 0, 'Schedule removed for path {}'.format(path), ''
@CLIWriteCommand('fs snap-schedule retention add')
return -errno.ENOENT, '', str(e)
except CephfsConnectionException as e:
return e.to_tuple()
+ except Exception as e:
+ return -errno.EIO, '', str(e)
return 0, 'Retention added to path {}'.format(path), ''
@CLIWriteCommand('fs snap-schedule retention remove')
self.client.rm_retention_spec(fs, abs_path,
retention_spec_or_period,
retention_count)
- except CephfsConnectionException as e:
- return e.to_tuple()
except ValueError as e:
return -errno.ENOENT, '', str(e)
+ except CephfsConnectionException as e:
+ return e.to_tuple()
+ except Exception as e:
+ return -errno.EIO, '', str(e)
return 0, 'Retention removed from path {}'.format(path), ''
@CLIWriteCommand('fs snap-schedule activate')
return -errno.ENOENT, '', str(e)
except CephfsConnectionException as e:
return e.to_tuple()
+ except Exception as e:
+ return -errno.EIO, '', str(e)
return 0, 'Schedule activated for path {}'.format(path), ''
@CLIWriteCommand('fs snap-schedule deactivate')
return -errno.ENOENT, '', str(e)
except CephfsConnectionException as e:
return e.to_tuple()
+ except Exception as e:
+ return -errno.EIO, '', str(e)
return 0, 'Schedule deactivated for path {}'.format(path), ''