def info(gandi, resource): """ Display information about a snapshot profile. Resource can be a profile name or ID """ output_keys = ['id', 'name', 'kept_total', 'target', 'quota_factor', 'schedules'] result = gandi.snapshotprofile.info(resource) output_snapshot_profile(gandi, result, output_keys) return result
def info(gandi, resource): """ Display information about a snapshot profile. Resource can be a profile name or it's ID """ output_keys = ['id', 'name', 'kept_total', 'target', 'quota_factor', 'schedules'] result = gandi.snapshotprofile.info(resource) output_snapshot_profile(gandi, result, output_keys) return result
def list(gandi, only_paas, only_vm): """ List snapshot profiles. """ target = None if only_paas and not only_vm: target = 'paas' if only_vm and not only_paas: target = 'vm' output_keys = ['id', 'name', 'kept_total', 'target'] result = gandi.snapshotprofile.list({}, target=target) for profile in result: gandi.separator_line() output_snapshot_profile(gandi, profile, output_keys) return result
def list(gandi, only_paas, only_vm): """ List snapshot profiles. """ target = None if only_paas and not only_vm: target = 'paas' if only_vm and not only_paas: target = 'vm' output_keys = ['id', 'name', 'kept_total', 'target'] result = gandi.snapshotprofile.list({}, target=target) for profile in result: gandi.separator_line() output_snapshot_profile(gandi, profile, output_keys) return result