def rename_command(source, destination):
"""
Executor for `globus rename`
"""
source_ep, source_path = source
dest_ep, dest_path = destination
if source_ep != dest_ep:
raise click.UsageError(('rename requires that the source and dest '
'endpoints are the same, {} != {}')
.format(source_ep, dest_ep))
endpoint_id = source_ep
client = get_client()
autoactivate(client, endpoint_id, if_expires_in=60)
res = client.operation_rename(endpoint_id, oldpath=source_path,
newpath=dest_path)
formatted_print(res, text_format=FORMAT_TEXT_RAW, response_key='message')
评论列表
文章目录