Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: third_party/gsutil/20110627/boto/bin/bundle_image

Issue 10199002: Upgrade gsutil to 3.4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 from boto.manage.server import Server
3 if __name__ == "__main__":
4 from optparse import OptionParser
5 parser = OptionParser(version="%prog 1.0", usage="Usage: %prog [options] ins tance-id [instance-id-2]")
6
7 # Commands
8 parser.add_option("-b", "--bucket", help="Destination Bucket", dest="bucket" , default=None)
9 parser.add_option("-p", "--prefix", help="AMI Prefix", dest="prefix", defaul t=None)
10 parser.add_option("-k", "--key", help="Private Key File", dest="key_file", d efault=None)
11 parser.add_option("-c", "--cert", help="Public Certificate File", dest="cert _file", default=None)
12 parser.add_option("-s", "--size", help="AMI Size", dest="size", default=None )
13 parser.add_option("-i", "--ssh-key", help="SSH Keyfile", dest="ssh_key", def ault=None)
14 parser.add_option("-u", "--user-name", help="SSH Username", dest="uname", de fault="root")
15 parser.add_option("-n", "--name", help="Name of Image", dest="name")
16 (options, args) = parser.parse_args()
17
18 for instance_id in args:
19 try:
20 s = Server.find(instance_id=instance_id).next()
21 print "Found old server object"
22 except StopIteration:
23 print "New Server Object Created"
24 s = Server.create_from_instance_id(instance_id, options.name)
25 assert(s.hostname is not None)
26 b = s.get_bundler(uname=options.uname)
27 b.bundle(bucket=options.bucket,prefix=options.prefix,key_file=options.ke y_file,cert_file=options.cert_file,size=int(options.size),ssh_key=options.ssh_ke y)
OLDNEW
« no previous file with comments | « third_party/gsutil/20110627/boto/README.markdown ('k') | third_party/gsutil/20110627/boto/bin/cfadmin » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698