1
2 import os
3
4 from starcluster import exception
5 from completers import ClusterCompleter
6
7
9 """
10 put [options] <cluster_tag> [<local_file_or_dir> ...] <remote_destination>
11
12 Copy files to a running cluster
13
14 Examples:
15
16 # Copy a file or dir to the master as root
17 $ starcluster put mycluster /path/to/file/or/dir /path/on/remote/server
18
19 # Copy one or more files or dirs to the master as root
20 $ starcluster put mycluster /local/dir /local/file /remote/dir
21
22 # Copy a file or dir to the master as normal user
23 $ starcluster put mycluster --user myuser /local/path /remote/path
24
25 # Copy a file or dir to a node (node001 in this example)
26 $ starcluster put mycluster --node node001 /local/path /remote/path
27
28
29 This will copy a file or directory to the remote server
30 """
31 names = ['put']
32
34 parser.add_option("-u", "--user", dest="user", default=None,
35 help="Transfer files as USER ")
36 parser.add_option("-n", "--node", dest="node", default="master",
37 help="Transfer files to NODE (defaults to master)")
38
60