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