~davewalker/ubuntu/maverick/eucalyptus/lp611144

« back to all changes in this revision

Viewing changes to clc/tools/src/euca-get-credentials

  • Committer: Dave Walker (Daviey)
  • Date: 2010-06-21 12:59:20 UTC
  • mfrom: (1048.1.14 ubuntu)
  • Revision ID: davewalker@ubuntu.com-20100621125920-60uhixwq174elnj1
* New major upstream version merge, 1.7 (r1200).
* debian/patches/:
  - 02-Makefile.patch: Updated to reflect new code layout.
  - 07-local_support_euca_conf-in.patch: Updated to reflect new code layout.
  - 08-ubuntu-default-networking.patch: Refreshed.
  - 09-small-128-192MB.patch: Updated to point to new location.
  - 10-disable-iscsi.patch: Refreshed.
  - 11-state-cleanup-memleakfix.patch: Refreshed.
  - 15-fix-default-ramdisk.patch: Updated to point to new location.
  - 16-kvm_libvirt_xml_default_use_kvm.patch: Updated to reflect changes.
  - 17-fix_walrus_OOM_errors.patch: Removed, fixed upstream.
  - 18-priv_security.patch: Updated to reflect upstream changes.
  - 20-brute-force-webui.patch: Updated to reflect upstream changes. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
import sys, os, boto, psutil, re, getpass
 
3
from euca_admin import local
 
4
from optparse import OptionParser
 
5
 
 
6
def main():
 
7
  parser = OptionParser("usage: %prog FILENAME",version="Eucalyptus %prog VERSION",description="Download the admin credentials for the locally hosted Eucalyptus installation")
 
8
  parser.add_option("-s","--source",dest="source",default=False,action="store_true",help="Unzip (and remove zipfile) and output 'eucarc'.  If FILENAME is specified the archive will be extracted to `dirname FILENAME`.  Otherwise, the archive is extracted to the current working directory.")
 
9
  (options,args) = parser.parse_args()
 
10
  file = None
 
11
  if len(args) != 1 and not options.source:
 
12
    parser.print_help()
 
13
    sys.exit()
 
14
  elif len(args) != 0:
 
15
    file = args[0]
 
16
  local.get_credentials(file,options.source)
 
17
  sys.exit()
 
18
 
 
19
if __name__ == "__main__":
 
20
    main()
 
21