[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, master, updated. 3.0.0-alpha3-257-g1da8e3a

Garrett Holmstrom gholms at fedoraproject.org
Sun Jun 16 02:30:57 UTC 2013


The following commit has been merged in the master branch:
commit 7383c136a1875b52175763408b59029314aaed66
Merge: 95665e66c9e8e94e61f8f426c76c1b94a9bc3590 8781e6a0c7e24508c22fdbbd9f803c495e03385f
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Mon Apr 1 18:00:20 2013 -0700

    Merge branch 'master' into requestbuilder
    
    Conflicts:
    	euca2ools/commands/euare/adduserpolicy.py

diff --combined euca2ools/commands/eustore/installimage.py
index 4a451b5,772c4ab..25e93f8
--- a/euca2ools/commands/eustore/installimage.py
+++ b/euca2ools/commands/eustore/installimage.py
@@@ -49,9 -49,9 +49,9 @@@ from boto.s3.connection import Locatio
  import euca2ools.bundler
  import euca2ools.commands.eustore
  import euca2ools.utils
 -from euca2ools.commands.euca.bundleimage import BundleImage
 -from euca2ools.commands.euca.uploadbundle import UploadBundle
 -from euca2ools.commands.euca.register import Register
 +from euca2ools.commands.bundle.bundleimage import BundleImage
 +from euca2ools.commands.bundle.uploadbundle import UploadBundle
 +from euca2ools.commands.euca.registerimage import RegisterImage
  from euca2ools.exceptions import NotFoundError, CommandFailed
  
  try:
@@@ -63,7 -63,7 +63,7 @@@ class LocalUploadBundle(UploadBundle)
      def process_cli_args(self):
          pass
  
 -class LocalRegister(Register):
 +class LocalRegister(RegisterImage):
      def process_cli_args(self):
          pass
  
@@@ -261,6 -261,7 +261,7 @@@ class InstallImage(AWSQueryRequest)
          kernel_id=self.cli_options.kernel
          ramdisk_id=self.cli_options.ramdisk
          kernel_found = False
+         files_bundled = []
          if kernel_id==None:
              for i in [0, 1]:
                  tar_root = os.path.commonprefix(names)
@@@ -276,6 -277,7 +277,7 @@@
                                  if prefix:
                                      name = prefix+name
                                  kernel_id = self.bundleFile(path, name, description, arch, 'true', None)
+                                 files_bundled.append(path)
                                  kernel_found = True
                                  print kernel_id
                              elif re.match(".*(initr(d|amfs)|loader).*", name):
@@@ -283,6 -285,7 +285,7 @@@
                                  if prefix:
                                      name = prefix+name
                                  ramdisk_id = self.bundleFile(path, name, description, arch, None, 'true')
+                                 files_bundled.append(path)
                                  print ramdisk_id
                  if not(kernel_found):
                      if not(kernel_dir):
@@@ -298,7 -301,7 +301,7 @@@
          for path in names:
              name = os.path.basename(path)
              if not name.startswith('.'):
-                 if name.endswith('.img'):
+                 if name.endswith('.img') and not(path in files_bundled):
                      print "Bundling/uploading image"
                      if prefix:
                          name = prefix
@@@ -351,8 -354,9 +354,9 @@@
                      aws_secret_access_key=euare_svc.args['aws_secret_access_key'],\
                      port=euare_svc.args['port'], path=euare_svc.args['path'],\
                      is_secure=euare_svc.args['is_secure'])
-         userinfo  = conn.get_user().arn.split(':')
-         if not(userinfo[4]=='eucalyptus') and not(self.cli_options.kernel):
+         conn.https_validate_certificates = False
+         aliases = conn.get_account_alias()
+         if not(aliases.list_account_aliases_result.account_aliases[0]=='eucalyptus') and not(self.cli_options.kernel):
              print >> sys.stderr, "Error: must be cloud admin to upload kernel/ramdisk. try specifying existing ones with --kernel and --ramdisk"
              sys.exit(-1)
          self.eustore_url = self.ServiceClass.StoreBaseURL
diff --combined setup.py
index fd5ebfb,b18ca7c..5e17f4c
--- a/setup.py
+++ b/setup.py
@@@ -1,6 -1,6 +1,6 @@@
  # Software License Agreement (BSD License)
  #
 -# Copyright (c) 2009-2011, Eucalyptus Systems, Inc.
 +# Copyright (c) 2009-2013, Eucalyptus Systems, Inc.
  # All rights reserved.
  #
  # Redistribution and use of this software in source and binary forms, with or
@@@ -27,21 -27,27 +27,21 @@@
  # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  # POSSIBILITY OF SUCH DAMAGE.
 -#
 -# Author: Neil Soman neil at eucalyptus.com
 -#         Mitch Garnaat mgarnaat at eucalyptus.com
  
 -from distutils.core import setup
 +from distutils.command.build_py import build_py
  from distutils.command.build_scripts import build_scripts
  from distutils.command.install_scripts import install_scripts
  from distutils.command.sdist import sdist
  import os.path
  import re
 -import subprocess
 +
 +try:
 +    from setuptools import setup
 +except ImportError:
 +    from distutils.core import setup
  
  from euca2ools import __version__
  
 -def get_version():
 -    try:
 -        popen = subprocess.Popen(['git', 'describe'], stdout=subprocess.PIPE)
 -        popen.wait()
 -        return popen.stdout.read().strip()
 -    except:
 -        return __version__
  
  # Cheap hack:  install symlinks separately from regular files.
  # cmd.copy_tree accepts a preserve_symlinks option, but when we call
@@@ -57,7 -63,6 +57,7 @@@ class build_scripts_except_symlinks(bui
          build_scripts.copy_scripts(self)
          self.scripts = orig_scripts
  
 +
  class install_scripts_and_symlinks(install_scripts):
      '''Like install_scripts, but also replicating nonexistent symlinks'''
      def run(self):
@@@ -70,56 -75,39 +70,56 @@@
                  if not os.path.exists(newlink):
                      os.symlink(target, newlink)
  
 +
 +class build_py_with_git_version(build_py):
 +    '''Like build_py, but also hardcoding the version in __init__.__version__
 +       so it's consistent even outside of the source tree'''
 +
 +    def build_module(self, module, module_file, package):
 +        build_py.build_module(self, module, module_file, package)
 +        print module, module_file, package
 +        if module == '__init__' and '.' not in package:
 +            version_line = "__version__ = '{0}'\n".format(__version__)
 +            old_init_name = self.get_module_outfile(self.build_lib, (package,),
 +                                                    module)
 +            new_init_name = old_init_name + '.new'
 +            with open(new_init_name, 'w') as new_init:
 +                with open(old_init_name) as old_init:
 +                    for line in old_init:
 +                        if line.startswith('__version__ ='):
 +                            new_init.write(version_line)
 +                        else:
 +                            new_init.write(line)
 +                new_init.flush()
 +            os.rename(new_init_name, old_init_name)
 +
 +
  class sdist_with_git_version(sdist):
 -    '''Like sdist, but using the output of ``git describe'' to fill in
 -       __init__.__version__'''
 +    '''Like sdist, but also hardcoding the version in __init__.__version__ so
 +       it's consistent even outside of the source tree'''
 +
      def make_release_tree(self, base_dir, files):
          sdist.make_release_tree(self, base_dir, files)
 +        version_line = "__version__ = '{0}'\n".format(__version__)
 +        old_init_name = os.path.join(base_dir, 'euca2ools/__init__.py')
 +        new_init_name = old_init_name + '.new'
 +        with open(new_init_name, 'w') as new_init:
 +            with open(old_init_name) as old_init:
 +                for line in old_init:
 +                    if line.startswith('__version__ ='):
 +                        new_init.write(version_line)
 +                    else:
 +                        new_init.write(line)
 +            new_init.flush()
 +        os.rename(new_init_name, old_init_name)
  
 -        try:
 -            popen = subprocess.Popen(['git', 'describe'],
 -                                     stdout=subprocess.PIPE)
 -            popen.wait()
 -            version = popen.stdout.read().strip()
 -            version_line = '__version__ = \'{0}\'\n'.format(version)
 -            old_init_file_name = os.path.join(base_dir, 'euca2ools/__init__.py')
 -            new_init_file_name = old_init_file_name + '.new'
 -            with open(new_init_file_name, 'w') as new_init_file:
 -                with open(old_init_file_name) as old_init_file:
 -                    for line in old_init_file:
 -                        if re.match("__version__ *= *'.*'", line):
 -                            new_init_file.write(version_line)
 -                        else:
 -                            new_init_file.write(line)
 -                new_init_file.flush()
 -            os.rename(new_init_file_name, old_init_file_name)
 -        except:
 -            # Not really a problem; we'll just leave it as-is
 -            pass
  
  setup(name = "euca2ools",
 -      version = get_version(),
 +      version = __version__,
        description = "Elastic Utility Computing Architecture Command Line Tools",
        long_description="Elastic Utility Computing Architecture Command Line Tools",
 -      author = "Mitch Garnaat",
 -      author_email = "mgarnaat at eucalyptus.com",
 +      author = "Eucalyptus Systems, Inc.",
 +      author_email = "support at eucalyptus.com",
  
        scripts = ["bin/euare-accountaliascreate",
                   "bin/euare-accountaliasdelete",
@@@ -180,6 -168,8 +180,6 @@@
                   "bin/euare-userresyncmfadevice",
                   "bin/euare-userupdateinfo",
                   "bin/euare-useruploadpolicy",
 -                 "bin/euca-add-group",
 -                 "bin/euca-add-keypair",
                   "bin/euca-allocate-address",
                   "bin/euca-associate-address",
                   "bin/euca-attach-volume",
@@@ -211,6 -201,7 +211,7 @@@
                   "bin/euca-describe-groups",
                   "bin/euca-describe-image-attribute",
                   "bin/euca-describe-images",
+                  "bin/euca-describe-instance-attribute",
                   "bin/euca-describe-instances",
                   "bin/euca-describe-keypairs",
                   "bin/euca-describe-regions",
@@@ -239,67 -230,16 +240,67 @@@
                   "bin/euca-unmonitor-instances",
                   "bin/euca-upload-bundle",
                   "bin/euca-version",
 +                 "bin/euscale-create-auto-scaling-group",
 +                 "bin/euscale-create-launch-config",
 +                 "bin/euscale-delete-auto-scaling-group",
 +                 "bin/euscale-delete-launch-config",
 +                 "bin/euscale-delete-notification-configuration",
 +                 "bin/euscale-delete-policy",
 +                 "bin/euscale-delete-scheduled-action",
 +                 "bin/euscale-describe-adjustment-types",
 +                 "bin/euscale-describe-auto-scaling-groups",
 +                 "bin/euscale-describe-auto-scaling-instances",
 +                 "bin/euscale-describe-auto-scaling-notification-types",
 +                 "bin/euscale-describe-launch-configs",
 +                 "bin/euscale-describe-metric-collection-types",
 +                 "bin/euscale-describe-notification-configurations",
 +                 "bin/euscale-describe-policies",
 +                 "bin/euscale-describe-process-types",
 +                 "bin/euscale-describe-scaling-activities",
 +                 "bin/euscale-describe-scheduled-actions",
 +                 "bin/euscale-describe-termination-policy-types",
 +                 "bin/euscale-disable-metrics-collection",
 +                 "bin/euscale-enable-metrics-collection",
 +                 "bin/euscale-execute-policy",
 +                 "bin/euscale-put-notification-configuration",
 +                 "bin/euscale-put-scaling-policy",
 +                 "bin/euscale-put-scheduled-update-group-action",
 +                 "bin/euscale-resume-processes",
 +                 "bin/euscale-set-desired-capacity",
 +                 "bin/euscale-set-instance-health",
 +                 "bin/euscale-suspend-processes",
 +                 "bin/euscale-terminate-instance-in-auto-scaling-group",
 +                 "bin/euscale-update-auto-scaling-group",
                   "bin/eustore-describe-images",
 -                 "bin/eustore-install-image"],
 +                 "bin/eustore-install-image",
 +                 "bin/euwatch-delete-alarms",
 +                 "bin/euwatch-describe-alarm-history",
 +                 "bin/euwatch-describe-alarms",
 +                 "bin/euwatch-describe-alarms-for-metric",
 +                 "bin/euwatch-disable-alarm-actions",
 +                 "bin/euwatch-enable-alarm-actions",
 +                 "bin/euwatch-get-stats",
 +                 "bin/euwatch-list-metrics",
 +                 "bin/euwatch-put-data",
 +                 "bin/euwatch-put-metric-alarm",
 +                 "bin/euwatch-set-alarm-state"],
        url = "http://open.eucalyptus.com",
 -      packages = ["euca2ools", "euca2ools.nc", "euca2ools.commands",
 -                  "euca2ools.commands.euca", "euca2ools.commands.euare",
 -                  "euca2ools.commands.eustore"],
 +      packages = ["euca2ools",
 +                  "euca2ools.nc",
 +                  "euca2ools.commands",
 +                  "euca2ools.commands.autoscaling",
 +                  "euca2ools.commands.bundle",
 +                  "euca2ools.commands.euca",
 +                  "euca2ools.commands.euare",
 +                  "euca2ools.commands.autoscaling",
 +                  "euca2ools.commands.eustore",
 +                  "euca2ools.commands.monitoring",
 +                  "euca2ools.commands.walrus"],
        license = 'BSD (Simplified)',
 -      platforms = 'Posix; MacOS X; Windows',
 -      classifiers = ['Development Status :: 5 - Production/Stable',
 -                     'Intended Audience :: Users',
 +      platforms = 'Posix; MacOS X',
 +      classifiers = ['Development Status :: 3 - Alpha',
 +                     'Intended Audience :: Developers',
 +                     'Intended Audience :: System Administrators',
                       'License :: OSI Approved :: Simplified BSD License',
                       'Operating System :: OS Independent',
                       'Programming Language :: Python',
@@@ -307,7 -247,6 +308,7 @@@
                       'Programming Language :: Python :: 2.6',
                       'Programming Language :: Python :: 2.7',
                       'Topic :: Internet'],
 -      cmdclass = {'build_scripts':   build_scripts_except_symlinks,
 +      cmdclass = {'build_py':        build_py_with_git_version,
 +                  'build_scripts':   build_scripts_except_symlinks,
                    'install_scripts': install_scripts_and_symlinks,
                    'sdist':           sdist_with_git_version})

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list