diff --git a/Makedefs.in b/Makedefs.in index b7a53b1b12d..d81409c275b 100644 --- a/Makedefs.in +++ b/Makedefs.in @@ -47,6 +47,7 @@ ANT = @ANT@ -e WSDL2C = @WSDL2C@ JAVA_HOME = @JAVA_HOME@ RM = @RM@ +PYTHON_BIN = @PYTHON_BIN@ # compile time configurations euca_theme = @INTERFACE_THEME@ diff --git a/clc/eucadmin/Makefile b/clc/eucadmin/Makefile index 242aa9a1e04..48bbe0955cc 100644 --- a/clc/eucadmin/Makefile +++ b/clc/eucadmin/Makefile @@ -27,10 +27,10 @@ all: euca_admin build: euca_admin euca_admin: - python2.5 setup.py build + $(PYTHON_BIN) setup.py build install: euca_admin - python2.5 setup.py install + $(PYTHON_BIN) setup.py install clean: @$(RM) -fr ./dist diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/__init__.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/__init__.py deleted file mode 100644 index 67e0b7f4f51..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/__init__.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import boto -import os -import sys -import re -import urlparse -from boto.ec2.regioninfo import RegionInfo - -__version__ = '1.0a' - -class EucAdmin: - - def __init__(self, path='/services/Configuration'): - if not 'EC2_ACCESS_KEY' in os.environ: - print 'Environment variable EC2_ACCESS_KEY is unset.' - sys.exit(1) - if not 'EC2_SECRET_KEY' in os.environ: - print 'Environment variable EC2_SECRET_KEY is unset.' - sys.exit(1) - if not 'EC2_URL' in os.environ: - print 'Environment variable EC2_URL is unset.' - sys.exit(1) - self.path = path - self.region='eucalyptus' - self.access_key = os.getenv('EC2_ACCESS_KEY') - self.secret_key = os.getenv('EC2_SECRET_KEY') - self.url = os.getenv('EC2_URL') - self.parsed = urlparse.urlparse(self.url) - self.connection = boto.connect_euca(self.parsed.hostname, - self.access_key, - self.secret_key, - path=self.path) - self.connection.APIVersion = 'eucalyptus' - - def get_connection(self): - return self.conn - - def handle_error(self,ex): - s = "" - if not hasattr(ex,"errors"): - s = 'ERROR %s' % (ex) - else: - if ex.errors.__len__() != 0: - for i in ex.errors: - s = '%sERROR %s %s %s: %s\n' % (s,ex.status, - ex.reason, - i[0], i[1]) - else: - s = 'ERROR %s %s %s' % (ex.status, ex.reason, ex) - while s.count("\n") != 3: - s = re.sub(".*Exception.*\n", ": ", s) - print s.replace("\n","") - sys.exit(1) diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/clusters.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/clusters.py deleted file mode 100644 index 14b17af540e..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/clusters.py +++ /dev/null @@ -1,206 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import sys -import re -from boto.exception import EC2ResponseError -from eucadmin.generic import BooleanResponse -from eucadmin import EucAdmin -from optparse import OptionParser - -class Cluster(): - - def __init__(self, cluster_name=None, host_name=None, - port=None, partition=None, state=None): - self.cluster_name = cluster_name - self.host_name = host_name - self.port = port - self.partition = partition - self.state = state - self.euca = EucaAdmin() - self.parser = None - - def __repr__(self): - return 'CLUSTER\t%s\t%s\t%s\t%s\t%s' % (self.partition, - self.cluster_name, - self.host_name, - self.state, - self.detail) - - def error(self, msg): - print msg - if self.parser: - self.parser.print_help() - sys.exit(1) - - def startElement(self, name, attrs, connection): - return None - - def endElement(self, name, value, connection): - if name == 'euca:detail': - self.detail = value - elif name == 'euca:state': - self.state = value - elif name == 'euca:hostName': - self.host_name = value - elif name == 'euca:name': - self.cluster_name = value - elif name == 'euca:partition': - self.partition = value - else: - setattr(self, name, value) - - def get_describe_parser(self): - parser = OptionParser("usage: %prog [CLUSTERS...]", - version="Eucalyptus %prog VERSION") - return parser.parse_args() - - def cli_describe(self): - (options, args) = self.get_describe_parser() - self.cluster_describe(args) - - def cluster_describe(self,clusters=None): - params = {} - if clusters: - self.euca.connection.build_list_params(params,clusters,'Name') - try: - list = self.euca.connection.get_list('DescribeClusters', params, - [('euca:item', Cluster)]) - for i in list: - print i - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_register_parser(self): - self.parser = OptionParser("usage: %prog [options]", - version="Eucalyptus %prog VERSION") - self.parser.add_option("-H","--host",dest="host", - help="Hostname of the cluster.") - self.parser.add_option("-p","--port",dest="port",type="int", - default=8774, - help="Port for the cluster.") - self.parser.add_option("-P","--partition",dest="partition", - help="Partition for the cluster.") - (options,args) = self.parser.parse_args() - if len(args) != 1: - s = "ERROR Required argument CLUSTERNAME is missing or malformed." - self.error(s) - else: - return (options,args) - - def cli_register(self): - (options,args) = self.get_register_parser() - self.register(args[0], options.host, - options.port, options.partition) - - def register(self, name, host, port=8773, partition=None): - params = {'Name':name, - 'Host':host, - 'Port':port} - if partition: - params['Partition'] = partition - try: - reply = self.euca.connection.get_object('RegisterCluster', - params, - BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_deregister_parser(self): - self.parser = OptionParser("usage: %prog [options] CLUSTERNAME", - version="Eucalyptus %prog VERSION") - self.parser.add_option("-P","--partition",dest="partition", - help="Partition for the cluster.") - (options,args) = self.parser.parse_args() - if len(args) != 1: - s = "ERROR Required argument CLUSTERNAME is missing or malformed." - self.error(s) - else: - return (options,args) - - def cli_deregister(self): - (options,args) = self.get_deregister_parser() - self.deregister(args[0]) - - def deregister(self, name, partition=None): - params = {'Name':name} - if partition: - params['Partition'] = partition - try: - reply = self.euca.connection.get_object('DeregisterCluster', - params, - BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_modify_parser(self): - self.parser = OptionParser("usage: %prog [options]", - version="Eucalyptus %prog VERSION") - self.parser.add_option("-p","--property",dest="props", - action="append", - help="Modify KEY to be VALUE. Can be given multiple times.", - metavar="KEY=VALUE") - self.parser.add_option("-P","--partition",dest="partition", - help="Partition for the cluster.") - (options,args) = self.parser.parse_args() - if len(args) != 1: - s = "ERROR Required argument CLUSTERNAME is missing or malformed." - self.error(s) - if not options.props: - self.error("ERROR No options were specified.") - for i in options.props: - if not re.match("^[\w.]+=[\w\.]+$", i): - s = "ERROR Options must be of the form KEY=VALUE. " - s += "Illegally formatted option: %s" % i - self.error(s) - return (options,args) - - def cli_modify(self): - (options,args) = self.get_modify_parser() - self.modify(options.partition,args[0], options.props) - - def modify(self,partition,name,modify_list): - for entry in modify_list: - key, value = entry.split("=") - try: - params = {'Partition' : partition, - 'Name' : name, - 'Attribute' : key, - 'Value' : value}, - r = self.euca.connection.get_object('ModifyClusterAttribute', - params, - BooleanResponse) - print r - except EC2ResponseError, ex: - self.euca.handle_error(ex) - diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/command.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/command.py deleted file mode 100644 index 6db2bde071d..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/command.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import StringIO -import subprocess -import time - -class Command(object): - """ - A little utility class to wrap calls to shell commands. - You pass in the command name and any command args. - The command will then be executed in a pipe and the output - and status will be available as the attributes "output" - and "status". The value of the "status" attribute will - be zero if the command was successful or non-zero if it - was not successful. - """ - - def __init__(self, command, test=False): - self.exit_code = 0 - self.error = None - self._stdout_fp = StringIO.StringIO() - self._stderr_fp = StringIO.StringIO() - self.command = command - self.run() - - def run(self): - if self.test: - print self.command - return 0 - self.process = subprocess.Popen(self.command, shell=True, - stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - while self.process.poll() == None: - time.sleep(1) - t = self.process.communicate() - self._stdout_fp.write(t[0]) - self._stderr_fp.write(t[1]) - self.exit_code = self.process.returncode - return self.exit_code - - @property - def status(self): - return self.exit_code - - @property - def stdout(self): - return self._stdout_fp.getvalue() - - @property - def stderr(self): - return self._stderr_fp.getvalue() - - diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/components.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/components.py deleted file mode 100644 index c1945d146c3..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/components.py +++ /dev/null @@ -1,246 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import boto,sys,eucadmin,re -from boto.exception import EC2ResponseError -from eucadmin.generic import BooleanResponse -from eucadmin.generic import StringList -from eucadmin import EucaAdmin -from optparse import OptionParser - -SERVICE_PATH = '/services/Configuration' -class Component(): - - def __init__(self, component_name=None, host_name=None, - port=None, partition=None, state=None): - self.component_name = component_name - self.host_name = host_name - self.port = port - self.partition = partition - self.state = state - self.euca = EucaAdmin(path=SERVICE_PATH) - self.verbose = False - - def __repr__(self): - return 'COMPONENT\t%-15.15s\t%-15.15s\t%-25s\t%s\t%s' % (self.partition, self.component_name, - self.host_name, self.state, self.detail ) - - def startElement(self, name, attrs, connection): - return None - - def endElement(self, name, value, connection): - if name == 'euca:detail': - self.detail = value - elif name == 'euca:state': - self.state = value - elif name == 'euca:hostName': - self.host_name = value - elif name == 'euca:name': - self.component_name = value - elif name == 'euca:partition': - self.partition = value - else: - setattr(self, name, value) - - def get_describe_parser(self): - parser = OptionParser("usage: %prog [COMPONENTS...]", - version="Eucalyptus %prog VERSION") - parser.add_option("-v", "--verbose", dest="verbose", default=False, action="store_true", help="Report verbose details about the state of the component.") - return parser.parse_args() - - def cli_describe(self): - (options, args) = self.get_describe_parser() - self.component_describe(args,options.verbose) - - def component_describe(self,components=None,verbose=False): - params = {} - if components: - self.euca.connection.build_list_params(params,components,'Name') - try: - list = self.euca.connection.get_list('DescribeComponents', params, - [('euca:item', Component)]) - for i in list: - if verbose: - print i - elif not verbose and not i.host_name == 'detail': - print i - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_modify_parser(self): - parser = OptionParser("usage: %prog [options]", - version="Eucalyptus %prog VERSION") - parser.add_option("-p","--property",dest="props", - action="append", - help="Modify KEY to be VALUE. Can be given multiple times.", - metavar="KEY=VALUE") - parser.add_option("-P","--partition",dest="partition", - help="Partition for the component.") - (options,args) = parser.parse_args() - if len(args) != 1: - print "ERROR Required argument COMPONENTNAME is missing or malformed." - parser.print_help() - sys.exit(1) - if not options.props: - print "ERROR No options were specified." - parser.print_help() - sys.exit(1) - for i in options.props: - if not re.match("^[\w.]+=[\w\.]+$",i): - print "ERROR Options must be of the form KEY=VALUE. Illegally formatted option: %s" % i - parser.print_help() - sys.exit(1) - return (options,args) - - def cli_modify(self): - (options,args) = self.get_modify_parser() - self.modify(options.partition,args[0],options.props) - - def modify(self,partition,name,modify_list): - for entry in modify_list: - key, value = entry.split("=") - try: - reply = self.euca.connection.get_object('ModifyComponentAttribute', - {'Partition' : partition, 'Name' : name, 'Attribute' : key,'Value' : value}, - BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) - -class ServiceStatus(): - def __init__(self, service_uuid=None, service_name=None, service_partition=None, service_type=None, service_url=None): - self.service_uuid = service_uuid - self.service_name = service_name - self.service_partition = service_partition - self.service_type = service_type - self.service_url = service_url - - def __repr__(self): - return '%-15.15s\t%s' % (self.service_type.upper(), ('%s.%s'% (self.service_partition, self.service_name))) - - def startElement(self, name, attrs, connection): - return None - - def endElement(self, name, value, connection): - if name == 'euca:uuid': - self.service_uuid = value - elif name == 'euca:partition': - self.service_partition = value - elif name == 'euca:name': - self.service_name = value - elif name == 'euca:type': - self.service_type = value - elif name == 'euca:uri': - self.service_uri = value - else: - setattr(self, name, value) - - -class Service(): - - def __init__(self, service_epoch=None, service_state=None, service_detail=None): - self.service_epoch = service_epoch - self.service_state = service_state - self.service_detail = StringList() - self.service_id = ServiceStatus() - self.euca = EucaAdmin(path=SERVICE_PATH) - self.verbose = False - - def __repr__(self): - return 'SERVICE\t%s\t%s\t%s\t%s' % (self.service_id, self.service_state, self.service_epoch, self.service_id.service_url ) - - def startElement(self, name, attrs, connection): - if name == 'euca:serviceId': - return self.service_id - elif name == 'euca:details': - return self.service_detail - else: - return None - - def endElement(self, name, value, connection): - if name == 'euca:item': - self.service_detail = '%s, %s' % (self.service_detail, value) - elif name == 'euca:localState': - self.service_state = value - elif name == 'euca:localEpoch': - self.service_epoch = value - else: - setattr(self, name, value) - - def get_describe_parser(self): - parser = OptionParser("usage: %prog [COMPONENTS...]", - version="Eucalyptus %prog VERSION") - parser.add_option("-v", "--verbose", dest="verbose", default=False, action="store_true", help="Report verbose details about the state of the component.") - return parser.parse_args() - - def cli_describe(self): - (options, args) = self.get_describe_parser() - self.service_describe(args,options.verbose) - - def service_describe(self,components=None,verbose=False): - params = {} - if components: - self.euca.connection.build_list_params(params,components,'Name') - try: - list = self.euca.connection.get_list('DescribeServices', params, - [('euca:item', Service)]) - for i in list: - if verbose: - print i - elif not verbose: - print i - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_modify_parser(self): - parser = OptionParser("usage: %prog [COMPONENTS...]", - version="Eucalyptus %prog VERSION") - parser.add_option("-s", "--state", dest="state", default=False, action="store_true", help="Attempt to change the state of the service to be .") - return parser.parse_args() - - def cli_modify(self): - (options, args) = self.get_modify_parser() - self.service_modify(args,options.verbose) - - def service_modify(self,operation=None,service_type=None,service_partition=None,service_name=None,verbose=False): - params = {} - if components: - self.euca.connection.build_list_params(params,components,'Name') - try: - list = self.euca.connection.get_list('DescribeServices', params, - [('euca:item', Service)]) - for i in list: - if verbose: - print i - elif not verbose: - print i - except EC2ResponseError, ex: - self.euca.handle_error(ex) diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/generic.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/generic.py deleted file mode 100644 index 093f6f06d80..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/generic.py +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import boto,sys - -class BooleanResponse: - def __init__(self, reply=False): - self.reply = reply - self.error = None - - def __repr__(self): - if self.error: - print 'RESPONSE %s' % self.error - sys.exit(1) - else: - return 'RESPONSE %s' % self.reply - - def startElement(self, name, attrs, connection): - return None - - def endElement(self, name, value, connection): - if name == 'euca:_return': - self.reply = value - elif name == 'Message': - self.error = value - else: - setattr(self, name, value) - - -class StringList(list): - - def __repr__(self): - r = "" - for i in self: - r = "%s %s" % (r,i) - return r - - def startElement(self, name, attrs, connection): - pass - - def endElement(self, name, value, connection): - if name == 'euca:entry': - self.append(value) - diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/groups.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/groups.py deleted file mode 100644 index 8482506d450..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/groups.py +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import boto,sys,eucadmin -from boto.exception import EC2ResponseError -from eucadmin.generic import BooleanResponse -from eucadmin.generic import StringList -from boto.resultset import ResultSet -from eucadmin import EucaAdmin -from optparse import OptionParser - -SERVICE_PATH = '/services/Accounts' -class Group(): - - - def __init__(self, groupName=None): - self.group_groupName = groupName - self.group_users = StringList() - self.group_auths = StringList() - self.euca = EucaAdmin(path=SERVICE_PATH) - - def __repr__(self): - r = 'GROUP \t%s\t' % (self.group_groupName) - r = '%s\nUSERS\t%s\t%s' % (r,self.group_groupName,self.group_users) - r = '%s\nAUTH\t%s\t%s' % (r,self.group_groupName,self.group_auths) - return r - - def startElement(self, name, attrs, connection): - if name == 'euca:users': - return self.group_users - if name == 'euca:authorizations': - return self.group_auths - else: - return None - - def endElement(self, name, value, connection): - if name == 'euca:groupName': - self.group_groupName = value - else: - setattr(self, name, value) - - def get_describe_parser(self): - parser = OptionParser("usage: %prog [GROUPS...]",version="Eucalyptus %prog VERSION") - return parser.parse_args() - - def cli_describe(self): - (options, args) = self.get_describe_parser() - self.group_describe(args) - - def group_describe(self,groups=None): - params = {} - if groups: - self.euca.connection.build_list_params(params,groups,'GroupNames') - try: - list = self.euca.connection.get_list('DescribeGroups', params, [('euca:item', Group)]) - for i in list: - print i - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_single_parser(self): - parser = OptionParser("usage: %prog GROUPNAME",version="Eucalyptus %prog VERSION") - (options,args) = parser.parse_args() - if len(args) != 1: - print "ERROR Required argument GROUPNAME is missing or malformed." - parser.print_help() - sys.exit(1) - else: - return (options,args) - - def cli_add(self): - (options, args) = self.get_single_parser() - self.group_add(args[0]) - - def group_add(self, groupName): - try: - reply = self.euca.connection.get_object('AddGroup', {'GroupName':groupName}, BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def cli_delete(self): - (options, args) = self.get_single_parser() - self.group_delete(args[0]) - - def group_delete(self, groupName): - try: - reply = self.euca.connection.get_object('DeleteGroup', {'GroupName':groupName},BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/heartbeat.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/heartbeat.py deleted file mode 100644 index 591e19d5b4f..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/heartbeat.py +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import boto.utils -import urlparse - -class Heartbeat(object): - - def __init__(self, host, port=8773, - path='services/Heartbeat', - is_secure=False): - self.host = host - self.service = service - self.port = port - self.path = path - self.is_secure = is_secure - if self.is_secure: - self.scheme = 'https' - else: - self.scheme = 'http' - t = (self.scheme, '%s:%s' % (self.host, self.port), self.path, '', '') - self.url = urlparse.urlunsplit(t) - self.data = None - self.get_heartbeat_data() - - def __repr__(self): - return '' % self.url - - def _get_value(self, value): - if value == 'true': - value = True - elif value == 'false': - value = False - return value - - def get_heartbeat_data(self): - resp = boto.utils.retry_url(self.url) - lines = resp.splitlines() - self.data = {} - for line in lines: - pairs = line.split() - t = pairs[0].split('=') - d = {} - self.data[t[1]] = d - for pair in pairs[1:]: - t = pair.split('=') - d[t[0]] = self._get_value(t[1]) diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/hypervregister.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/hypervregister.py deleted file mode 100644 index f7b0435ecc6..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/hypervregister.py +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import os -import sys -import tempfile -import shutil -import command - -class HyperVRegister(object): - - KeyDirPath = "%s/var/lib/eucalyptus/keys" - - def __init__(self, hostname, registration_password, - euca_dir='/opt/eucalyptus', debug=False): - self.hostname = hostname - self.registration_password = registration_password - self.euca_dir = euca_dir - self.euca_key_dir = self.KeyDirPath % self.euca_dir - self.tmp_dir = self.create_tmp_dir() - self.debug = debug - self.commands = [] - - def create_tmp_dir(self): - return tempfile.mkdtemp() - - def delete_tmp_dir(self): - if not self.debug: - if os.path.isdir(self.tmp_dir): - shutil.rmtree(self.tmp_dir) - - def error(self, msg): - self.delete_tmp_dir() - print msg - sys.exit(1) - - def copy_key_file(self, file_name): - file_path = os.path.join(self.euca_key_dir, file_name) - if not os.path.exists(file_path): - self.error('%s not found' % file_path) - try: - shutil.copy(file_path, self.tmp_dir) - except: - self.error('Error copying %s to %s' % (file_path, self.tmp_dir)) - - def copy_files_to_node(self): - files = ['node.p12', 'cluster-cert.pem', 'cloud-cert.pem'] - cur_dir = os.getcwd() - os.chdir(self.tmp_dir) - cmd = 'smbclient "//%s/EucaKeyShare"' % self.hostname - cmd += ' --user=Administrator' - l = ['put %s' % fn for fn in files] - cmd += ' --command "%s%' % '; '.join(l) - cmd = command.Command(cmd) - os.chdir(cur_dir) - for fn in files: - if cmd.stderr.find('putting file %s' % fn) < 0: - self.error('REGISTRATION FAILED') - self.commands.append(cmd) - - def generate_nodep12(self): - node_cert = os.path.join(self.tmp_dir, 'node-cert.pem') - node_pk = os.path.join(self.tmp_dir, 'node-pk.pem') - p12_file = os.path.join(self.tmp_dir, 'node.p12') - cmd = 'openssl pkcs12 -export -in %s' % node_cert - cmd += ' -inkey %s' % node_pk - cmd += ' -password "pass:%s"' % self.registration_password - cmd += ' -out %s' % p12_file - self.commands.append(command.Command(cmd)) - if not os.path.isfile(p12_file): - self.error('%s file was not created' % p12_file) - - def main(self): - self.copy_key_file('node-cert.pem') - self.copy_key_file('node-pk.pem') - self.copy_key_file('cloud-cert.pem') - self.copy_key_file('cluster-cert.pem') - self.generate_nodep12() - self.copy_files_to_node() - self.delete_tmp_dir() - diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/properties.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/properties.py deleted file mode 100644 index 5ff85faee69..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/properties.py +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import boto,sys,eucadmin,re,os -from boto.exception import EC2ResponseError -from eucadmin.generic import BooleanResponse -from eucadmin import EucaAdmin -from optparse import OptionParser -from string import split -import pdb - -SERVICE_PATH = '/services/Properties' -VERBOSE = False -class Property(): - - - def __init__(self, property_name=None, property_value=None, - property_description=None, property_old_value=None): - self.property_name = property_name - self.property_value = property_value - self.property_description = property_description - self.property_old_value = property_old_value - self.euca = EucaAdmin(path=SERVICE_PATH) - - - def __repr__(self): - global VERBOSE - str = 'PROPERTY\t%s\t%s' % (self.property_name, self.property_value) - if self.property_old_value is not None: - str = '%s was %s' % (str, self.property_old_value) - elif VERBOSE: - str = '%s\nDESCRIPTION\t%s\t%s' % (str, self.property_name, self.property_description) - return str - - def startElement(self, name, attrs, connection): - return None - - def endElement(self, name, value, connection): - if name == 'euca:name': - self.property_name = value - elif name == 'euca:value': - self.property_value = value - elif name == 'euca:oldValue': - self.property_old_value = value - elif name == 'euca:description': - self.property_description = value - else: - setattr(self, name, value) - - def get_parser(self): - parser = OptionParser("usage: %prog [PROPERTY...]", version="Eucalyptus %prog VERSION") - parser.add_option("-v", "--verbose", dest="verbose", action="store_true", - help="Show property descriptions.") - return parser - - def parse_describe(self): - global VERBOSE - (options,args) = self.get_parser().parse_args() - if options.verbose: - VERBOSE = True - return (options,args) - - def cli_describe(self): - (options,args) = self.parse_describe() - self.describe(args) - - def describe(self,props=None): - params = {} - if props: - self.euca.connection.build_list_params(params,props,'Properties') - try: - list = self.euca.connection.get_list('DescribeProperties', - params, [('euca:item', Property)]) - for i in list: - print i - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_parse_modify(self): - parser = self.get_parser() - parser.add_option("-p","--property",dest="props",action="append", - help="Modify KEY to be VALUE. Can be given multiple times.", - metavar="KEY=VALUE") - parser.add_option("-f","--property-from-file",dest="files",action="append", - help="Modify KEY to be modified with content of a file.", - metavar="KEY=") - global VERBOSE - (options,args) = parser.parse_args() - if options.verbose: - VERBOSE = True - if not options.props and not options.files: - print "ERROR No options were specified." - parser.print_help() - sys.exit(1) - else: - if options.props: - for i in options.props: - if not re.match("^[\w.]+=[/\w\.]+$",i): - print "ERROR Options must be of the form KEY=VALUE. Illegally formatted option: %s" % i - parser.print_help() - sys.exit(1) - elif options.files: - pass - return (options,args) - - def cli_modify(self): - (options,args) = self.get_parse_modify() - self.modify(options.props) - self.modify_from_file(options.files) - - def _modify(self, name, value): - try: - result = self.euca.connection.get_object('ModifyPropertyValue', - {'Name' : name, 'Value' : value}, - Property, verb='POST') - print result - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def modify(self,modify_list): - if modify_list: - for i in modify_list: - new_prop = split(i,"=") - if not len(new_prop) == 2: - print "ERROR Options must be of the form KEY=VALUE. Illegally formatted option: %s" % i - sys.exit(1) - self._modify(new_prop[0], new_prop[1]) - - def modify_from_file(self,modify_list): - if modify_list: - for i in modify_list: - new_prop = split(i,"=") - if not len(new_prop) == 2: - print "ERROR Options must be of the form KEY=VALUE. Illegally formatted option: %s" % i - sys.exit(1) - file_path = new_prop[1] - if file_path == '-': - value = sys.stdin.read() - else: - file_path = os.path.expanduser(file_path) - file_path = os.path.expandvars(file_path) - if not os.path.isfile(file_path): - print "ERROR File %s does not exist" % file_path - sys.exit(1) - fp = open(file_path) - value = fp.read() - fp.close() - self._modify(new_prop[0], value) - diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/storagecontrollers.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/storagecontrollers.py deleted file mode 100644 index a74b21a3f56..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/storagecontrollers.py +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import boto,sys,eucadmin,re -from boto.exception import EC2ResponseError -from eucadmin.generic import BooleanResponse -from eucadmin import EucaAdmin -from optparse import OptionParser - -SERVICE_PATH = '/services/Configuration' - -class StorageController(): - - def __init__(self, storage_name=None, host_name=None, - port=None, partition=None, state=None): - self.storage_name = storage_name - self.host_name = host_name - self.port = port - self.partition = partition - self.state = state - self.euca = EucaAdmin(path=SERVICE_PATH) - - def __repr__(self): - return 'STORAGE\t%s\t%s\t%s\t%s\t%s' % (self.partition, self.storage_name, - self.host_name, self.state, self.detail) - - def startElement(self, name, attrs, connection): - return None - - def endElement(self, name, value, connection): - if name == 'euca:detail': - self.detail = value - elif name == 'euca:state': - self.state = value - elif name == 'euca:hostName': - self.host_name = value - elif name == 'euca:name': - self.storage_name = value - elif name == 'euca:partition': - self.partition = value - else: - setattr(self, name, value) - - def get_describe_parser(self): - parser = OptionParser("usage: %prog [NAME...]", - version="Eucalyptus %prog VERSION") - return parser.parse_args() - - def cli_describe(self): - (options, args) = self.get_describe_parser() - self.describe(args) - - def describe(self,scs=None): - params = {} - if scs: - self.euca.connection.build_list_params(params,groups,'Names') - try: - list = self.euca.connection.get_list('DescribeStorageControllers', - params, - [('euca:item', StorageController)]) - for i in list: - print i - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_register_parser(self): - parser = OptionParser("usage: %prog [options] NAME", - version="Eucalyptus %prog VERSION") - parser.add_option("-H","--host",dest="host", - help="Hostname of the storage.") - parser.add_option("-p","--port",dest="port",type="int",default=8773, - help="Port for the storage.") - parser.add_option("-P","--partition",dest="partition", - help="Partition for the storage.") - (options,args) = parser.parse_args() - if options.host == None: - self.euca.handle_error("You must provide a hostname (-H or --host)") - if len(args) != 1: - print "ERROR Required argument NAME is missing or malformed." - parser.print_help() - sys.exit(1) - else: - return (options,args) - - def cli_register(self): - (options, args) = self.get_register_parser() - self.register(args[0], options.host, - options.port, options.partition) - - def register(self, name, host, port=8773, partition=None): - params = {'Name':name, - 'Host':host, - 'Port':port} - if partition: - params['Partition'] = partition - try: - reply = self.euca.connection.get_object('RegisterStorageController', - params, BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_deregister_parser(self): - parser = OptionParser("usage: %prog [options] NAME", - version="Eucalyptus %prog VERSION") - parser.add_option("-P","--partition",dest="partition", - help="Partition for the storage.") - (options,args) = parser.parse_args() - if len(args) != 1: - print "ERROR Required argument NAME is missing or malformed." - parser.print_help() - sys.exit(1) - else: - return (options,args) - - def cli_deregister(self): - (options, args) = self.get_deregister_parser() - self.deregister(args[0]) - - def deregister(self, name, partition=None): - params = {'Name':name} - if partition: - params['Partition'] = partition - try: - reply = self.euca.connection.get_object('DeregisterStorageController', - params, - BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_modify_parser(self): - parser = OptionParser("usage: %prog [options]", - version="Eucalyptus %prog VERSION") - parser.add_option("-p","--property",dest="props", - action="append", - help="Modify KEY to be VALUE. Can be given multiple times.", - metavar="KEY=VALUE") - parser.add_option("-P","--partition",dest="partition", - help="Partition for the storage.") - (options,args) = parser.parse_args() - if len(args) != 1: - print "ERROR Required argument SCNAME is missing or malformed." - parser.print_help() - sys.exit(1) - if not options.props: - print "ERROR No options were specified." - parser.print_help() - sys.exit(1) - for i in options.props: - if not re.match("^[\w.]+=[\w\.]+$",i): - print "ERROR Options must be of the form KEY=VALUE. Illegally formatted option: %s" % i - parser.print_help() - sys.exit(1) - return (options,args) - - def cli_modify(self): - (options,args) = self.get_modify_parser() - self.modify(options.partition,args[0],options.props) - - def modify(self,partition,name,modify_list): - for entry in modify_list: - key, value = entry.split("=") - try: - reply = self.euca.connection.get_object('ModifyStorageControllerAttribute', - {'Partition' : partition, 'Name' : name, 'Attribute' : key,'Value' : value}, - BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/synckeys.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/synckeys.py deleted file mode 100644 index 2a1590b9af1..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/synckeys.py +++ /dev/null @@ -1,139 +0,0 @@ -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import os -import sys -import socket -import shutil - -import command - -def mklist(v): - if not isinstance(v, (list, tuple)): - v = [v] - return v - -SyncMethods = ['local', 'rsync', 'scp', 'smb'] - -class SyncKeys(object): - - def __init__(self, src_dirs, dst_dir, remote_host, file_names, - use_rsync=True, use_scp=True, use_smb=False): - self.src_dirs = mklist(src_dirs) - self.src_dirs = [os.path.expanduser(sd) for sd in self.src_dirs] - self.src_dirs = [os.path.expandvars(sd) for sd in self.src_dirs] - self.dst_dir = dst_dir - self.remote_host = remote_host - self.file_names = mklist(file_names) - self.use_rsync = use_rsync - self.use_scp = use_scp - self.use_smb = use_smb - self.files = [] - self.is_remote = True - - def error(self, msg): - print 'Error: %s' % msg - sys.exit(1) - - def warning(self, msg): - print 'Warning: %s' % msg - - def get_file_list(self): - found = [] - for fn in self.file_names: - for sd in self.src_dirs: - path = os.path.join(sd, fn) - if os.path.isfile(path): - self.files.append(path) - found.append(fn) - not_found = [fn for fn in self.file_names if fn not in found] - if not_found: - self.warning("Can't find %s in %s" % (not_found, self.src_dirs)) - - def check_remote(self): - if remote_host == '127.0.0.1': - self.is_remote = False - elif remote_host == 'localhost': - self.is_remote = False - elif remote_host == socket.gethostname(): - self.is_remote = False - - def sync_local(self): - for fn in self.files: - if not os.path.isfile(fn): - self.error('cannot find cluster credentials') - else: - try: - shutil.copystat(fn, self.dst_dir) - except: - self.error('cannot copy %s to %s' % (fn, self.dst_dir)) - - def sync_rsync(self): - if not self.use_rsync: - return - print - print 'Trying rsync to sync keys with %s' % self.remote_host - cmd = 'rsync -az ' - cmd += ' '.join(self.files) - cmd += ' %s:%s/' % (self.remote_host, self.dst_dir) - cmd = Command(cmd, test=True) - if cmd.status == 0: - print 'done' - return True - else: - print 'failed.' - return False - - def get_euca_user(self): - euca_user = os.environ.get('EUCA_USER', None) - if not euca_user: - try: - pwd.getpwname('eucalyptus') - euca_user = 'eucalyptus' - except KeyError: - self.error('EUCA_USER is not defined!') - return euca_user - - def sync_scp(self): - euca_user = self.get_euca_user() - print - print 'Trying scp to sync keys with %s (user %s)' % (self.remote_host, - euca_user) - # TODO: handle sudo password prompt - cmd = 'sudo -u %s scp ' % euca_user - cmd += ' '.join(self.files) - cmd += ' %s@%s:%s' % (euca_user, self.remote_host, self.dst_dir) - cmd = Command(cmd, test=True) - if cmd.status == 0: - print 'done' - return True - else: - print 'failed.' - return False diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/users.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/users.py deleted file mode 100644 index b6e79f4ac4e..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/users.py +++ /dev/null @@ -1,173 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import boto, sys, eucadmin -from eucadmin.generic import StringList -from boto.exception import EC2ResponseError -from eucadmin.generic import BooleanResponse -from eucadmin import EucaAdmin -from optparse import OptionParser - -SERVICE_PATH = '/services/Accounts' -class User(): - - - def __init__(self, userName=None, email="N/A", certificateCode=None, confirmationCode=None, accessKey=None, secretKey=None, confirmed=False, admin=False, enabled=False, distinguishedName=None, certificateSerial=None): - self.user_userName = userName - self.user_email = email - self.user_distinguishedName = distinguishedName - self.user_certificateSerial = certificateSerial - self.user_certificateCode = certificateCode - self.user_confirmationCode = confirmationCode - self.user_accessKey = accessKey - self.user_secretKey = secretKey - self.user_confirmed = confirmed - self.user_admin = admin - self.user_enabled = enabled - self.user_groups = StringList() - self.user_revoked = StringList() - self.user_list = self.user_groups - self.euca = EucaAdmin(path=SERVICE_PATH) - - def __repr__(self): - r = 'USER\t\t%s\t%s%s\t%s' % (self.user_userName, self.user_email, '\tADMIN' if self.user_admin == 'true' else ' ', 'ENABLED' if self.user_enabled == 'true' else 'DISABLED') - r = '%s\nUSER-GROUP\t%s\t%s' % (r, self.user_userName, self.user_groups) - r = '%s\nUSER-CERT\t%s\t%s\t%s' % (r, self.user_userName, self.user_distinguishedName, self.user_certificateSerial) -# for s in self.user_revoked: -# r = '%s\nUSER-REVOKED\t%s\t%s' % (r,self.user_userName,s) - r = '%s\nUSER-KEYS\t%s\t%s\t%s' % (r, self.user_userName, self.user_accessKey, self.user_secretKey) - r = '%s\nUSER-CODE\t%s\t%s' % (r, self.user_userName, self.user_certificateCode) - r = '%s\nUSER-WEB \t%s\t%s' % (r, self.user_userName, self.user_confirmationCode) - return r - - def startElement(self, name, attrs, connection): - if name == 'euca:groups': - return self.user_groups - elif name == 'euca:revoked': - return self.user_revoked - else: - return None - - def endElement(self, name, value, connection): - if name == 'euca:userName': - self.user_userName = value - elif name == 'euca:email': - self.user_email = value - elif name == 'euca:admin': - self.user_admin = value - elif name == 'euca:confirmed': - self.user_confirmed = value - elif name == 'euca:enabled': - self.user_enabled = value - elif name == 'euca:distinguishedName': - self.user_distinguishedName = value - elif name == 'euca:certificateSerial': - self.user_certificateSerial = value - elif name == 'euca:certificateCode': - self.user_certificateCode = value - elif name == 'euca:confirmationCode': - self.user_confirmationCode = value - elif name == 'euca:accessKey': - self.user_accessKey = value - elif name == 'euca:secretKey': - self.user_secretKey = value - elif name == 'euca:entry': - self.user_list.append(value) - else: - setattr(self, name, value) - - def get_describe_parser(self): - parser = OptionParser("usage: %prog [USERNAME...", version="Eucalyptus %prog VERSION") - (options, args) = parser.parse_args() - return (options, args) - - def cli_describe(self): - (options, args) = self.get_describe_parser() - self.describe(args) - - - def describe(self,users): - params = {} - if users: - self.euca.connection.build_list_params(params, users, 'UserNames') - try: - list = self.euca.connection.get_list('DescribeUsers', params, [('euca:item', User)]) - for i in list: - print i - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - - def get_add_parser(self): - parser = OptionParser("usage: %prog [options] USERNAME", version="Eucalyptus %prog VERSION") - parser.add_option("-e", "--email", dest="email", default="N/A", help="Email of the User.") - parser.add_option("-a", "--admin", dest="admin", default=False, action="store_true", help="Mark user as admin.") - (options, args) = parser.parse_args() - if len(args) != 1: - print "ERROR Required argument USERNAME is missing or malformed." - parser.print_help() - sys.exit(1) - else: - return (options, args) - - def cli_add(self): - (options, args) = self.get_add_parser(); - self.add(args[0], options.email, options.admin) - - def add(self, user_userName, user_email, user_admin): - try: - reply = self.euca.connection.get_object('AddUser', {'UserName':user_userName, 'Email':user_email, 'Admin':user_admin}, BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_delete_parser(self): - parser = OptionParser("usage: %prog [options] USERNAME", version="Eucalyptus %prog VERSION") - (options, args) = parser.parse_args() - if len(args) != 1: - print "ERROR Required argument USERNAME is missing or malformed." - parser.print_help() - sys.exit(1) - else: - return (options, args) - - def cli_delete(self): - (options, args) = self.get_delete_parser(); - self.delete(args[0]) - - def delete(self, user_name): - try: - reply = self.euca.connection.get_object('DeleteUser', {'UserName':user_name}, BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - diff --git a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/walruses.py b/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/walruses.py deleted file mode 100644 index 8658cd88702..00000000000 --- a/clc/eucadmin/build/lib.linux-x86_64-2.6/eucadmin/walruses.py +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import boto,sys,eucadmin,re -from boto.exception import EC2ResponseError -from eucadmin.generic import BooleanResponse -from eucadmin import EucaAdmin -from optparse import OptionParser - -SERVICE_PATH = '/services/Configuration' -class Walrus(): - - def __init__(self, walrus_name=None, host_name=None, - port=None, partition=None, state=None): - self.walrus_name = walrus_name - self.host_name = host_name - self.port = port - self.partition = partition - self.state = state - self.euca = EucaAdmin(path=SERVICE_PATH) - - def __repr__(self): - return 'WALRUS\t%s\t%s\t%s\t%s\t%s' % (self.partition, self.walrus_name, - self.host_name, self.state, self.detail) - - def startElement(self, name, attrs, connection): - return None - - def endElement(self, name, value, connection): - if name == 'euca:detail': - self.detail = value - elif name == 'euca:state': - self.state = value - elif name == 'euca:hostName': - self.host_name = value - elif name == 'euca:name': - self.walrus_name = value - elif name == 'euca:partition': - self.partition = value - else: - setattr(self, name, value) - - def describe(self): - parser = OptionParser("usage: %prog [options]", - version="Eucalyptus %prog VERSION") - (options, args) = parser.parse_args() - try: - list = self.euca.connection.get_list('DescribeWalruses', {}, - [('euca:item', Walrus)]) - for i in list: - print i - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_register_parser(self): - parser = OptionParser("usage: %prog [options]", - version="Eucalyptus %prog VERSION") - parser.add_option("-H","--host",dest="host", - help="Hostname of the walrus.") - parser.add_option("-p","--port",dest="port",type="int", - default=8773,help="Port for the walrus.") - parser.add_option("-P","--partition",dest="partition", - help="Partition for the walrus.") - (options,args) = parser.parse_args() - if options.host == None: - self.euca.handle_error("You must provide a hostname (-H or --host)") - return (options,args) - - def cli_register(self): - (options, args) = self.get_register_parser() - if len(args) != 1: - self.register(options.host,port=options.port) - else: - self.register(options.host,name=args[0], - port=options.port, partition=options.partition) - - def register(self, host, name='walrus', port=8773, partition=None): - if host == None: - self.euca.handle_error("Missing hostname") - params = {'Name':'walrus', - 'Host':host, - 'Port':port} - if partition: - params['Partition'] = partition - try: - reply = self.euca.connection.get_object('RegisterWalrus', - params, - BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_deregister_parser(self): - parser = OptionParser("usage: %prog [options] NAME", - version="Eucalyptus %prog VERSION") - parser.add_option("-P","--partition",dest="partition", - help="Partition for the walrus.") - (options,args) = parser.parse_args() - if len(args) != 1: - print "ERROR Required argument NAME is missing or malformed." - parser.print_help() - sys.exit(1) - else: - return (options,args) - - def cli_deregister(self): - (options, args) = self.get_deregister_parser() - if len(args) != 1: - self.deregister() - else: - self.deregister(args[0]) - - def deregister(self, name, partition='walrus'): - params = {'Name':name} - if partition: - params['Partition'] = partition - try: - reply = self.euca.connection.get_object('DeregisterWalrus', - {'Name':name},BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) - - def get_modify_parser(self): - parser = OptionParser("usage: %prog [options]", - version="Eucalyptus %prog VERSION") - parser.add_option("-p","--property",dest="props", - action="append", - help="Modify KEY to be VALUE. Can be given multiple times.", - metavar="KEY=VALUE") - parser.add_option("-P","--partition",dest="partition", - help="Partition for the storage.") - (options,args) = parser.parse_args() - if len(args) != 1: - print "ERROR Required argument WALRUSNAME is missing or malformed." - parser.print_help() - sys.exit(1) - if not options.props: - print "ERROR No options were specified." - parser.print_help() - sys.exit(1) - for i in options.props: - if not re.match("^[\w.]+=[\w\.]+$",i): - print "ERROR Options must be of the form KEY=VALUE. Illegally formatted option: %s" % i - parser.print_help() - sys.exit(1) - return (options,args) - - def cli_modify(self): - (options,args) = self.get_modify_parser() - self.modify(options.partition,args[0],options.props) - - def modify(self,partition,name,modify_list): - for entry in modify_list: - key, value = entry.split("=") - try: - reply = self.euca.connection.get_object('ModifyWalrusAttribute', - {'Partition' : partition, 'Name' : name, 'Attribute' : key,'Value' : value}, - BooleanResponse) - print reply - except EC2ResponseError, ex: - self.euca.handle_error(ex) diff --git a/clc/eucadmin/build/scripts-2.6/euca-add-user b/clc/eucadmin/build/scripts-2.6/euca-add-user deleted file mode 100755 index c1a859572cb..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-add-user +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.users import User - -def main(): - c = User().cli_add() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-add-user-group b/clc/eucadmin/build/scripts-2.6/euca-add-user-group deleted file mode 100755 index d1cc167c619..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-add-user-group +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.groups import Group - -def main(): - c = Group().cli_add() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-delete-user b/clc/eucadmin/build/scripts-2.6/euca-delete-user deleted file mode 100755 index cd43a584e11..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-delete-user +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.users import User - -def main(): - c = User().cli_delete() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-delete-user-group b/clc/eucadmin/build/scripts-2.6/euca-delete-user-group deleted file mode 100755 index 4982678fbb7..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-delete-user-group +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.groups import Group - -def main(): - c = Group().cli_delete() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-deregister-cluster b/clc/eucadmin/build/scripts-2.6/euca-deregister-cluster deleted file mode 100755 index 3970605322c..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-deregister-cluster +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.clusters import Cluster - -def main(): - c = Cluster().cli_deregister() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-deregister-storage-controller b/clc/eucadmin/build/scripts-2.6/euca-deregister-storage-controller deleted file mode 100755 index bbb1d91242f..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-deregister-storage-controller +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.storagecontrollers import StorageController - -def main(): - c = StorageController().cli_deregister() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-deregister-walrus b/clc/eucadmin/build/scripts-2.6/euca-deregister-walrus deleted file mode 100755 index 043da17fa36..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-deregister-walrus +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.walruses import Walrus - -def main(): - c = Walrus().cli_deregister() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-describe-clusters b/clc/eucadmin/build/scripts-2.6/euca-describe-clusters deleted file mode 100755 index 3c38a47327f..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-describe-clusters +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.clusters import Cluster - -def main(): - c = Cluster().cli_describe() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-describe-components b/clc/eucadmin/build/scripts-2.6/euca-describe-components deleted file mode 100755 index 7eb83a6f145..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-describe-components +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.components import Component - -def main(): - c = Component().cli_describe() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-describe-properties b/clc/eucadmin/build/scripts-2.6/euca-describe-properties deleted file mode 100755 index 38de65840fa..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-describe-properties +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.properties import Property - -def main(): - c = Property().cli_describe() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-describe-services b/clc/eucadmin/build/scripts-2.6/euca-describe-services deleted file mode 100755 index 19684171cfc..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-describe-services +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.components import Service - -def main(): - c = Service().cli_describe() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-describe-storage-controllers b/clc/eucadmin/build/scripts-2.6/euca-describe-storage-controllers deleted file mode 100755 index 08d9c265485..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-describe-storage-controllers +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.storagecontrollers import StorageController - -def main(): - c = StorageController().cli_describe() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-describe-user-groups b/clc/eucadmin/build/scripts-2.6/euca-describe-user-groups deleted file mode 100755 index 64179c179fc..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-describe-user-groups +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.groups import Group - -def main(): - Group().cli_describe() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-describe-users b/clc/eucadmin/build/scripts-2.6/euca-describe-users deleted file mode 100755 index 589d57a3583..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-describe-users +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.users import User - -def main(): - c = User().cli_describe() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-describe-walruses b/clc/eucadmin/build/scripts-2.6/euca-describe-walruses deleted file mode 100755 index d9bb382c3e1..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-describe-walruses +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.walruses import Walrus - -def main(): - c = Walrus().describe() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-get-credentials b/clc/eucadmin/build/scripts-2.6/euca-get-credentials deleted file mode 100755 index 7b2d60502a3..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-get-credentials +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/python -import sys, os, boto, psutil, re, getpass -from eucadmin import local -from optparse import OptionParser - -def main(): - parser = OptionParser("usage: %prog FILENAME",version="Eucalyptus %prog VERSION",description="Download the admin credentials for the locally hosted Eucalyptus installation") - 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.") - (options,args) = parser.parse_args() - file = None - if len(args) != 1 and not options.source: - parser.print_help() - sys.exit() - elif len(args) != 0: - file = args[0] - local.get_credentials(file,options.source) - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-modify-cluster b/clc/eucadmin/build/scripts-2.6/euca-modify-cluster deleted file mode 100755 index 86ab7ec9e64..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-modify-cluster +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.clusters import Cluster - -def main(): - c = Cluster().cli_modify() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-modify-property b/clc/eucadmin/build/scripts-2.6/euca-modify-property deleted file mode 100755 index 0ed5472514e..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-modify-property +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/python -import getopt, sys, os, boto -from boto.ec2.regioninfo import RegionInfo -from eucadmin.properties import Property - -def main(): - c = Property().cli_modify() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-modify-storage-controller b/clc/eucadmin/build/scripts-2.6/euca-modify-storage-controller deleted file mode 100755 index 3acb4048f71..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-modify-storage-controller +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.storagecontrollers import StorageController - -def main(): - c = StorageController().cli_modify() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-modify-walrus b/clc/eucadmin/build/scripts-2.6/euca-modify-walrus deleted file mode 100755 index 66fbc3ba1bb..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-modify-walrus +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.walruses import Walrus - -def main(): - c = Walrus().cli_modify() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-register-cluster b/clc/eucadmin/build/scripts-2.6/euca-register-cluster deleted file mode 100755 index 237f4a624e4..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-register-cluster +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.clusters import Cluster - -def main(): - c = Cluster().cli_register() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-register-storage-controller b/clc/eucadmin/build/scripts-2.6/euca-register-storage-controller deleted file mode 100755 index 4c24fd3e33f..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-register-storage-controller +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.storagecontrollers import StorageController - -def main(): - c = StorageController().cli_register() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca-register-walrus b/clc/eucadmin/build/scripts-2.6/euca-register-walrus deleted file mode 100755 index 179904fcbdd..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca-register-walrus +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -import sys -from eucadmin.walruses import Walrus - -def main(): - c = Walrus().cli_register() - sys.exit() - -if __name__ == "__main__": - main() - diff --git a/clc/eucadmin/build/scripts-2.6/euca_conf b/clc/eucadmin/build/scripts-2.6/euca_conf deleted file mode 100755 index ce74ee5daf3..00000000000 --- a/clc/eucadmin/build/scripts-2.6/euca_conf +++ /dev/null @@ -1,486 +0,0 @@ -#!/usr/bin/python -# Copyright (c) 2011, Eucalyptus Systems, Inc. -# All rights reserved. -# -# Redistribution and use of this software in source and binary forms, with or -# without modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# 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: Mitch Garnaat mgarnaat@eucalyptus.com - -import optparse -import inspect -import os -import sys -import boto.utils -import eucadmin.configfile - -DefaultEucaDir = '/opt/eucalyptus/eee-root' -DefaultEucaConfPath = 'etc/eucalyptus/eucalyptus.conf' - -class EucaConf(object): - - # list of services which can be checked - CheckedServices = ['cc', 'cloud', 'nc', 'sc', - 'walrus', 'vmware', 'vmwarebroker'] - - # list of services which can be enabled/disabled - EnabledServices = ['cloud', 'walrus', 'sc', 'vmwarebroker'] - - def __init__(self, filepath=None): - self.debug = 0 - self.config = None - self.specified_options = {} - self.parser = optparse.OptionParser() - self.parser.add_option('--heartbeat', action='store', type='string', - help='get heartbeat data for ') - self.parser.add_option('--synckey', action='store_true', - dest='sync_keys', help='', - default=False) - self.parser.add_option('--no-rsync', action='store_true', - dest='no_rsync', default=False, - help="Don't use rsync when registering"), - self.parser.add_option('--no-scp', action='store_true', - dest='no_scp', help="don't use scp", - default=False) - self.parser.add_option('--skip-scp-hostcheck', action='store_true', - dest='skip_scp_hostcheck', - help='skip scp interactive host keycheck', - default=False) - self.parser.add_option('--get-credentials', action='store', - type='string', dest='get_credentials', - metavar='', - help='download credentials to ') - self.parser.add_option('--cred-account', action='store', - type='string', dest='cred_account', - metavar='', default='eucalyptus', - help="set get-credentials account") - self.parser.add_option('--cred-user', action='store', - type='string', dest='cred_user', - metavar='', default='admin', - help="set get-credentials user") - self.parser.add_option('--register-nodes', - action='append', type='string', - dest='reg_nodes', metavar='"host host..."', - help='add new nodes to EUCALYPTUS') - self.parser.add_option('--deregister-nodes', - action='append', type='string', - dest='dereg_nodes', metavar='"host host..."', - help='remove nodes from EUCALYPTUS') - self.parser.add_option('--register-cluster', - action='store', type='string', - dest='reg_clusters', nargs=3, - metavar=' ', - help='add new cluster to EUCALYPTUS') - self.parser.add_option('--deregister-cluster', nargs=2, - type='string', dest='dereg_clusters', - metavar=' ', - help='remove cluster from EUCALYPTUS') - self.parser.add_option('--register-walrus', nargs=3, - type='string', dest='reg_walruses', - metavar=' ', - help='add new walrus to EUCALYPTUS') - self.parser.add_option('--deregister-walrus', nargs=2, - type='string', dest='dereg_walruses', - metavar=' ', - help='remove walrus from EUCALYPTUS') - self.parser.add_option('--register-sc', nargs=3, - type='string', dest='reg_scs', - metavar=' ', - help='add new storage controller to EUCALYPTUS') - self.parser.add_option('--deregister-sc', nargs=2, - type='string', dest='dereg_scs', - metavar=' ', - help='remove storage controller from EUCALYPTUS') - self.parser.add_option('--list-walruses', action='store_true', - dest='list_walruses', default=False, - help='list registered walrus(es)') - self.parser.add_option('--list-clusters', action='store_true', - dest='list_clusters', default=False, - help='list registered CCs') - self.parser.add_option('--list-nodes', action='store_true', - dest='list_nodes', default=False, - help='list registered NCs') - self.parser.add_option('--list-components', action='store_true', - dest='list_components', default=False, - help='list components') - self.parser.add_option('--list-services', action='store_true', - dest='list_services', default=False, - help='list services') - self.parser.add_option('--list-scs', action='store_true', - dest='list_scs', default=False, - help='list registered SCs') - self.parser.add_option('--no-sync', action='store_true', - dest='no_sync', default=False, - help='used only with --register-* to skip syncing keys') - self.parser.add_option('-d', action='callback', type='string', - metavar='', callback=self.option_callback, - callback_kwargs={'optname' : 'EUCALYPTUS'}, - help='point EUCALYPTUS to ') - self.parser.add_option('--cc-port', action='callback', type='int', - metavar='', callback=self.option_callback, - callback_kwargs={'optname' : 'CC_PORT'}, - help='set CC port', default=8774) - self.parser.add_option('--sc-port', action='callback', type='int', - metavar='', callback=self.option_callback, - callback_kwargs={'optname' : 'SC_PORT'}, - help='set SC port', default=8773) - self.parser.add_option('--walrus-port', action='callback', type='int', - metavar='', callback=self.option_callback, - callback_kwargs={'optname' : 'WALRUS_PORT'}, - help='set Walrus port', default=8773) - self.parser.add_option('--nc-port', action='callback', type='int', - metavar='', callback=self.option_callback, - callback_kwargs={'optname' : 'NC_PORT'}, - help='set NC port', default=8775) - self.parser.add_option('--instances', action='callback', - type='string', callback=self.option_callback, - metavar='', - callback_kwargs={'optname' : 'INSTANCE_PATH'}, - help='set the INSTANCE path') - self.parser.add_option('--hypervisor', action='callback', - type='choice', callback=self.option_callback, - metavar='', choices=['kvm', 'xen'], - callback_kwargs={'optname' : 'HYPERVISOR'}, - help='set hypervisor to use') - self.parser.add_option('--user', action='callback', - type='string', callback=self.option_callback, - metavar='', - callback_kwargs={'optname' : 'EUCA_USER'}, - help='set the user to use') - self.parser.add_option('--dhcpd', action='callback', - type='string', callback=self.option_callback, - metavar='', - callback_kwargs={'optname' : 'DHCPD'}, - help='set the dhcpd binary to ') - self.parser.add_option('--dhcp_user', action='callback', - type='string', callback=self.option_callback, - metavar='', - callback_kwargs={'optname' : 'DHCPC_USER'}, - help='set the username to run dhcpd as') - self.parser.add_option('--bridge', action='callback', - type='string', callback=self.option_callback, - callback_kwargs={'optname' : 'BRIDGE'}), - self.parser.add_option('--name', action='store', - type='string', dest='var_name', - help='returns the value or ') - self.parser.add_option('--import-conf', action='store', - type='string', dest='import_conf_file', - help='import variables from another eucalyptus.conf') - self.parser.add_option('--setup', action='store_true', - dest='do_setup', default=False, - help='perform initial setup') - self.parser.add_option('--enable {cloud|sc|walrus|vmwarebroker}', - action='store', type='choice', - choices=['cloud', 'sc', 'walrus', - 'vmwarebroker'], - dest='enable_what', metavar='', - help='enable service at next start}') - self.parser.add_option('--disable {cloud|sc|walrus|vmwarebroker', - action='store', type='choice', - choices=['cloud', 'sc', 'walrus', - 'vmwarebroker'], - dest='disable_what', metavar='', - help='disable service at next start') - self.parser.add_option('--check {nc|cc|cloud|sc|walrus|vmware|vmwarebroker}', - action='store', type='choice', - choices=['nc', 'cc', 'cloud', 'sc', - 'walrus', 'vmware', 'vmwarebroker'], - dest='check_what', metavar='', - help='pre-flight checks') - self.parser.add_option('--debug', action='store_true', - default=False, help='Enable debug output') - self.options, self.args = self.parser.parse_args() - if len(self.args) > 0: - filepath = self.args[0] - elif filepath is None: - euca_dir = os.environ.get('EUCALYPTUS', DefaultEucaDir) - filepath = os.path.join(euca_dir, DefaultEucaConfPath) - try: - print 'using %s' % filepath - self.config = eucadmin.configfile.ConfigFile(filepath) - except IOError: - print 'Unable to find config file: %s' % filepath - - def get_sshkey(self): - key = None - try: - user = pwd.getpwnam('eucalyptus') - path = os.path.join(user.pw_dir, '.ssh') - path = os.path.join(path, 'id_rsa.pub') - if os.path.isfile(path): - fp = open(path) - key = fp.read() - fp.close() - except: - print 'problem finding sshkey for user eucalyptus' - return key - - def check_local_service(self, service_name): - valid_services = ['CLC', 'CC'] - if service_name is None or service_name not in valid_services: - print 'ERROR: must pass in service name %s' % valid_services - return False - if service_name == 'CLC': - resp = boto.utils.retry_url('https://127.0.0.1:8443/register') - if resp.find('CloudVersion') < 0: - return False - elif service_name == 'CC': - resp = boto.utils.retry_url('http://127.0.0.1:8774/axis2/services') - if resp.find('EucalyptusCC') < 0: - return False - return True - - def option_callback(self, option, opt_str, value, parser, optname=None): - self.specified_options[optname] = value - - def update_config_file(self): - if self.config: - for key in self.specified_options: - self.config[key] = self.specified_options[key] - - def main(self): - self.update_config_file() - if self.options.debug: - self.debug = 2 - try: - for name, method in inspect.getmembers(self): - if name.startswith('do_') and inspect.ismethod(method): - method() - except Exception, e: - print e.message - sys.exit(1) - - - def do_get_credentials(self): - if self.options.get_credentials: - cls = boto.utils.find_class('eucadmin.getcredentials', - 'GetCredentials') - obj = cls(self.config, self.options.get_credentials, - self.options.cred_account, self.options.cred_user) - obj.main() - - def do_setup(self): - if self.options.do_setup: - cls = boto.utils.find_class('eucadmin.eucasetup', 'EucaSetup') - req = cls(self.config) - req.main() - - def do_check(self): - if self.options.check_what: - if self.options.check_what not in self.CheckedServices: - print 'check requires one of %s' % self.CheckedServices - sys.exit(1) - cls = boto.utils.find_class('eucadmin.check', 'Check') - req = cls(self.config, self.options.check_what) - req.main() - - def do_enable(self): - if self.options.enable_what: - if self.options.enable_what not in self.EnabledServices: - print 'enable requires one of %s' % self.EnabledServices - sys.exit(1) - cls = boto.utils.find_class('eucadmin.enable', 'Enable') - req = cls(self.config, self.options.enable_what, True) - req.main() - - def do_disable(self): - if self.options.disable_what: - if self.options.disable_what not in self.EnabledServices: - print 'disable requires one of %s' % self.EnabledServices - sys.exit(1) - cls = boto.utils.find_class('eucadmin.enable', 'Enable') - req = cls(self.config, self.options.disable_what, False) - req.main() - - def do_heartbeat(self): - if self.options.heartbeat: - cls = boto.utils.find_class('eucadmin.heartbeat', 'Heartbeat') - req = cls(self.options.heartbeat) - req.cli_formatter() - - def _do_list(self, option_name, module_name, class_name): - if getattr(self.options, option_name): - cls = boto.utils.find_class(module_name, class_name) - req = cls(debug=self.debug) - data = req.main() - req.cli_formatter(data) - - def do_list_nodes(self): - self._do_list('list_nodes', - 'eucadmin.describenodes', - 'DescribeNodes') - - def do_list_walruses(self): - self._do_list('list_walruses', - 'eucadmin.describewalruses', - 'DescribeWalruses') - - def do_list_clusters(self): - self._do_list('list_clusters', - 'eucadmin.describeclusters', - 'DescribeClusters') - - def do_list_sc(self): - self._do_list('list_scs', - 'eucadmin.describestoragecontrollers', - 'DescribeStorageControllers') - - def do_list_components(self): - self._do_list('list_components', - 'eucadmin.describecomponents', - 'DescribeComponents') - - def do_list_services(self): - self._do_list('list_services', - 'eucadmin.describeservices', - 'DescribeServices') - - def _do_register(self, args, module_name, class_name, port_option): - partition = args[0] - cluster_name = args[1] - host = args[2] - port = getattr(self.options, port_option) - cls = boto.utils.find_class(module_name, class_name) - req = cls(debug=self.debug) - data = req.main(partition=partition, name=cluster_name, - port=port, host=host) - req.cli_formatter(data) - - def do_register_cluster(self): - args = getattr(self.options, 'reg_clusters') - if args: - self._do_register(args, 'eucadmin.registercluster', - 'RegisterCluster', 'cc_port') - if not self.options.no_sync: - path1 = os.path.join(self.config['EUCALYPTUS'], - 'var/lib/eucalyptus/keys') - path2 = os.path.join(path1, args[0]) - cls = boto.utils.find_class('eucadmin.synckeys', 'SyncKeys') - req = cls([path1, path2], path1, args[2], - ['node-cert.pem', 'cluster-cert.pem', - 'cluster-pk.pem', 'node-pk.pem', - 'vtunpass', 'cloud-cert.pem']) - req.sync() - - def do_register_walrus(self): - args = getattr(self.options, 'reg_walruses') - if args: - self._do_register(args, 'eucadmin.registerwalrus', - 'RegisterWalrus', 'walrus_port') - if not self.options.no_sync: - path = os.path.join(self.config['EUCALYPTUS'], - 'var/lib/eucalyptus/keys') - cls = boto.utils.find_class('eucadmin.synckeys', 'SyncKeys') - req = cls([path], path, args[2], ['euca.p12']) - req.sync() - - def do_register_sc(self): - args = getattr(self.options, 'reg_scs') - if args: - self._do_register(args, 'eucadmin.registerstoragecontroller', - 'RegisterStorageController', 'sc_port') - if not self.options.no_sync: - path = os.path.join(self.config['EUCALYPTUS'], - 'var/lib/eucalyptus/keys') - cls = boto.utils.find_class('eucadmin.synckeys', 'SyncKeys') - req = cls([path], path, args[2], ['euca.p12']) - req.sync() - - def _do_deregister(self, option_name, module_name, class_name): - args = getattr(self.options, option_name) - if args: - partition = args[0] - cluster_name = args[1] - cls = boto.utils.find_class(module_name, class_name) - req = cls(debug=self.debug) - data = req.main(partition=partition, name=cluster_name) - req.cli_formatter(data) - - def do_deregister_cluster(self): - self._do_deregister('dereg_clusters', - 'eucadmin.deregistercluster', - 'DeregisterCluster') - - def do_deregister_walrus(self): - self._do_deregister('dereg_walruses', - 'eucadmin.deregisterwalrus', - 'DeregisterWalrus') - - def _sync_node(self, node): - path = os.path.join(self.config['EUCALYPTUS'], - 'var/lib/eucalyptus/keys') - # probably need to look in partition directory - cls = boto.utils.find_class('eucadmin.synckeys', 'SyncKeys') - files = ['node-cert.pem', 'cluster-cert.pem', - 'node-pk.pem', 'cluster-pk.pem'] - req = cls([path], path, node, files) - return req.sync() - - def _print_sync_error(self): - print 'ERROR: could not synchronize keys with %s' % node - print 'The configuration will not have this node.' - ssh_key = self.get_sshkey() - if not ssh_key: - print 'User %s may have to run ssh-keygen!' - else: - print "Hint: to setup passwordless login to the nodes as" - print "user $EUCA_USER, you can" - print "run the following commands on node $NEWNODE:" - print "sudo -u $EUCA_USER mkdir -p ~${EUCA_USER}/.ssh" - print "sudo -u $EUCA_USER tee ~${EUCA_USER}/.ssh/authorized_keys > /dev/null <. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -319,7 +319,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -359,19 +359,19 @@ else fi # as_fn_arith -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. +# script with status $?, using 1 if that was 0. as_fn_error () { - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -533,7 +533,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -620,6 +620,7 @@ INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM AWK +PYTHON_BIN build_os build_vendor build_cpu @@ -803,7 +804,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -829,7 +830,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1033,7 +1034,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1049,7 +1050,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1079,8 +1080,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) @@ -1088,7 +1089,7 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1106,13 +1107,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" + as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1135,7 +1136,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1149,8 +1150,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1165,9 +1166,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" + as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" + as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1206,11 +1207,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1250,7 +1251,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1400,9 +1401,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Eucalyptus configure eee-3.0.0 -generated by GNU Autoconf 2.66 +generated by GNU Autoconf 2.65 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1496,10 +1497,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1558,15 +1559,17 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------------ ## +( cat <<\_ASBOX +## ------------------------------------------ ## ## Report this to support@open.eucalyptus.com ## -## ------------------------------------------ ##" +## ------------------------------------------ ## +_ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1630,7 +1633,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1707,7 +1710,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -1761,7 +1764,7 @@ ac_fn_c_find_uintX_t () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 $as_echo_n "checking for uint$2_t... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -1791,7 +1794,8 @@ if ac_fn_c_try_compile "$LINENO"; then : esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if eval test \"x\$"$3"\" = x"no"; then : + eval as_val=\$$3 + if test "x$as_val" = x""no; then : else break @@ -1813,7 +1817,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1876,7 +1880,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Eucalyptus $as_me eee-3.0.0, which was -generated by GNU Autoconf 2.66. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -1986,9 +1990,11 @@ trap 'exit_status=$? { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -2022,9 +2028,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -2037,9 +2045,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -2053,9 +2063,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -2110,12 +2122,7 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2130,11 +2137,7 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } + . "$ac_site_file" fi done @@ -2215,7 +2218,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2532,8 +2535,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -2647,8 +2650,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -2690,8 +2694,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -2748,9 +2752,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. +as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details." "$LINENO" 5; } fi fi fi @@ -2801,8 +2805,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3150,8 +3154,8 @@ if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -3212,7 +3216,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -3278,7 +3282,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -3410,7 +3414,8 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -3483,22 +3488,16 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3512,7 +3511,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -3523,16 +3522,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3658,6 +3657,52 @@ if test -z "$APACHE2_MODULE_DIR"; then APACHE2_MODULE_DIR="${AXIS2C_HOME}/lib" fi +if test -z "$PYTHON_BIN"; then + for i in python2.5 python2.6 python2.7 python2.8 python2.9 + do + # Extract the first word of "$i", so it can be a program name with args. +set dummy $i; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PYTHON_BIN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON_BIN in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON_BIN="$PYTHON_BIN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PYTHON_BIN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON_BIN=$ac_cv_path_PYTHON_BIN +if test -n "$PYTHON_BIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_BIN" >&5 +$as_echo "$PYTHON_BIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + done +fi + # Fix the paths for includes and libraries if test -n "${AXIS2C_HOME}" ; then if test -d "${AXIS2C_HOME}"/include ; then @@ -4038,8 +4083,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4375,7 +4420,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -4383,7 +4428,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -4494,12 +4539,12 @@ if test -z "$WSDL2C" && test -f ${AXIS2C_HOME}/bin/tools/wsdl2c/WSDL2C.sh; then fi # check if we found WSDL2C.sh if test -z "$WSDL2C" ; then - as_fn_error $? "Cannot find WSDL2C.sh!" "$LINENO" 5 + as_fn_error "Cannot find WSDL2C.sh!" "$LINENO" 5 fi # we need JAVA_HOME if test -z "$JAVA_HOME" ; then - as_fn_error $? "JAVA_HOME is not defined!" "$LINENO" 5 + as_fn_error "JAVA_HOME is not defined!" "$LINENO" 5 fi # Extract the first word of "ant", so it can be a program name with args. @@ -4586,35 +4631,35 @@ fi # Check the version of java and ant if test -z "$ANT" ; then - as_fn_error $? "Cannot find ant!" "$LINENO" 5 + as_fn_error "Cannot find ant!" "$LINENO" 5 fi if test -z "$JAVA" ; then - as_fn_error $? "Cannot find java!" "$LINENO" 5 + as_fn_error "Cannot find java!" "$LINENO" 5 fi java_version=`$JAVA -version 2>&1 | grep "java version" | \ sed -e 's/.*java version "\(.*\)".*/\1/'` goodversion=`expr $java_version ">=" $java_min_version` if test $goodversion -eq 0; then - as_fn_error $? "Eucalyptus needs at least JDK version $java_min_version" "$LINENO" 5 + as_fn_error "Eucalyptus needs at least JDK version $java_min_version" "$LINENO" 5 fi # now let's test we have jni.h if test ! -e $JAVA_HOME/include/jni.h ; then - as_fn_error $? "Cannot find jni.h in $JAVA_HOME: do you have a JDK installed?" "$LINENO" 5 + as_fn_error "Cannot find jni.h in $JAVA_HOME: do you have a JDK installed?" "$LINENO" 5 fi ant_version=`$ANT -version 2>&1 | grep "Ant version" | \ sed -e 's/.*Ant version \([0-9.]*\).*/\1/'` goodversion=`expr $ant_version ">=" $ant_min_version` if test $goodversion -eq 0; then - as_fn_error $? "Eucalyptus needs at least ANT version $ant_min_version" "$LINENO" 5 + as_fn_error "Eucalyptus needs at least ANT version $ant_min_version" "$LINENO" 5 fi # some version of ant picks up the wrong java java_version=`$ANT -diagnostics 2>&1 | grep ^java.version | \ sed -e 's/java.* \([0-9.]*\).*/\1/'` goodversion=`expr $java_version ">=" $java_min_version` if test $goodversion -eq 0; then - as_fn_error $? "ANT is using the wrong java (version less than $java_min_version)" "$LINENO" 5 + as_fn_error "ANT is using the wrong java (version less than $java_min_version)" "$LINENO" 5 fi @@ -4658,7 +4703,7 @@ _ACEOF LIBS="-laxis2_axiom $LIBS" else - as_fn_error $? "Cannot find axis2 libs!" "$LINENO" 5 + as_fn_error "Cannot find axis2 libs!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -laxis2_engine" >&5 @@ -4699,7 +4744,7 @@ _ACEOF LIBS="-laxis2_engine $LIBS" else - as_fn_error $? "Cannot find axis2 libs!" "$LINENO" 5 + as_fn_error "Cannot find axis2 libs!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -laxis2_http_common" >&5 @@ -4740,7 +4785,7 @@ _ACEOF LIBS="-laxis2_http_common $LIBS" else - as_fn_error $? "Cannot find axis2 libs!" "$LINENO" 5 + as_fn_error "Cannot find axis2 libs!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -laxis2_http_receiver" >&5 @@ -4781,7 +4826,7 @@ _ACEOF LIBS="-laxis2_http_receiver $LIBS" else - as_fn_error $? "Cannot find axis2 libs!" "$LINENO" 5 + as_fn_error "Cannot find axis2 libs!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -laxis2_http_sender" >&5 @@ -4822,7 +4867,7 @@ _ACEOF LIBS="-laxis2_http_sender $LIBS" else - as_fn_error $? "Cannot find axis2 libs!" "$LINENO" 5 + as_fn_error "Cannot find axis2 libs!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lguththila" >&5 @@ -4863,7 +4908,7 @@ _ACEOF LIBS="-lguththila $LIBS" else - as_fn_error $? "Cannot find libguththila!" "$LINENO" 5 + as_fn_error "Cannot find libguththila!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for axiom_xml_reader_init in -laxis2_parser" >&5 @@ -4910,7 +4955,7 @@ _ACEOF LIBS="-laxis2_parser $LIBS" else - as_fn_error $? "Cannot find axis2 libs!" "$LINENO" 5 + as_fn_error "Cannot find axis2 libs!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -laxutil" >&5 @@ -4951,7 +4996,7 @@ _ACEOF LIBS="-laxutil $LIBS" else - as_fn_error $? "Cannot find libaxutil" "$LINENO" 5 + as_fn_error "Cannot find libaxutil" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 @@ -5031,7 +5076,7 @@ _ACEOF LIBS="-lmod_rampart $LIBS" else - as_fn_error $? "Cannot find libmod_rampart" "$LINENO" 5 + as_fn_error "Cannot find libmod_rampart" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lneethi" >&5 @@ -5072,7 +5117,7 @@ _ACEOF LIBS="-lneethi $LIBS" else - as_fn_error $? "Cannot find libneethi!" "$LINENO" 5 + as_fn_error "Cannot find libneethi!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5 @@ -5186,7 +5231,7 @@ $as_echo "$ac_cv_lib_virt_main" >&6; } if test "x$ac_cv_lib_virt_main" = x""yes; then : true else - as_fn_error $? "Cannot find libvirt!" "$LINENO" 5 + as_fn_error "Cannot find libvirt!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcurl" >&5 @@ -5222,7 +5267,7 @@ $as_echo "$ac_cv_lib_curl_main" >&6; } if test "x$ac_cv_lib_curl_main" = x""yes; then : true else - as_fn_error $? "Cannot find libcurl!" "$LINENO" 5 + as_fn_error "Cannot find libcurl!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 @@ -5325,7 +5370,7 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if eval "test \"\${$as_ac_Header+set}\"" = set; then : +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5352,7 +5397,8 @@ fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF @@ -5635,7 +5681,8 @@ for ac_header in fcntl.h limits.h stdint.h stdlib.h string.h strings.h sys/ioctl do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -5648,7 +5695,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" if test "x$ac_cv_header_curl_curl_h" = x""yes; then : else - as_fn_error $? "Cannot find curl/curl.h" "$LINENO" 5 + as_fn_error "Cannot find curl/curl.h" "$LINENO" 5 fi @@ -5922,7 +5969,8 @@ for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -6426,7 +6474,8 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -6446,7 +6495,8 @@ done do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -6498,8 +6548,8 @@ static time_t time_t_max; static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ -static const char *tz_strings[] = { - (const char *) 0, "TZ=GMT0", "TZ=JST-9", +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) @@ -6516,7 +6566,7 @@ spring_forward_gap () instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ - putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; @@ -6529,14 +6579,16 @@ spring_forward_gap () } static int -mktime_test1 (time_t now) +mktime_test1 (now) + time_t now; { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int -mktime_test (time_t now) +mktime_test (now) + time_t now; { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) @@ -6560,7 +6612,8 @@ irix_6_4_bug () } static int -bigtime_test (int j) +bigtime_test (j) + int j; { struct tm tm; time_t now; @@ -6604,7 +6657,7 @@ year_2050_test () instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ - putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); @@ -6639,7 +6692,7 @@ main () for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) - putenv ((char*) tz_strings[i]); + putenv (tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) if (! mktime_test (t)) @@ -6934,7 +6987,8 @@ for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7127,7 +7181,8 @@ for ac_func in bzero dup2 ftruncate gettimeofday mkdir pow select strchr strdup do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -7137,7 +7192,7 @@ done # Time to substitute and generate the files -ac_config_files="$ac_config_files Makedefs tools/eucalyptus-cc:tools/eucalyptus-cc.in tools/eucalyptus-nc:tools/eucalyptus-nc.in tools/euca_conf:tools/euca_conf.in tools/eucalyptus-cloud:tools/eucalyptus-cloud.in clc/modules/bootstrap/src/main/native/arguments.ggo:clc/modules/bootstrap/src/main/native/arguments.ggo.in clc/eucadmin/bin/euca_conf:clc/eucadmin/bin/euca_conf.in clc/eucadmin/setup.cfg:clc/eucadmin/setup.cfg.in" +ac_config_files="$ac_config_files Makedefs tools/eucalyptus-cc:tools/eucalyptus-cc.in tools/eucalyptus-nc:tools/eucalyptus-nc.in clc/eucadmin/bin/euca_conf:clc/eucadmin/bin/euca_conf.in clc/eucadmin/setup.cfg:clc/eucadmin/setup.cfg.in tools/eucalyptus-cloud:tools/eucalyptus-cloud.in clc/modules/bootstrap/src/main/native/arguments.ggo:clc/modules/bootstrap/src/main/native/arguments.ggo.in" cat >>confdefs.h <<_ACEOF @@ -7164,6 +7219,7 @@ _ACEOF + cat >confcache <<\_ACEOF @@ -7249,7 +7305,6 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= -U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -7411,19 +7466,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. +# script with status $?, using 1 if that was 0. as_fn_error () { - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -7619,7 +7674,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -7673,7 +7728,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by Eucalyptus $as_me eee-3.0.0, which was -generated by GNU Autoconf 2.66. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -7735,10 +7790,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Eucalyptus config.status eee-3.0.0 -configured by $0, generated by GNU Autoconf 2.66, +configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -7793,7 +7848,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' + as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -7802,7 +7857,7 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' + -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -7855,11 +7910,12 @@ do "Makedefs") CONFIG_FILES="$CONFIG_FILES Makedefs" ;; "tools/eucalyptus-cc") CONFIG_FILES="$CONFIG_FILES tools/eucalyptus-cc:tools/eucalyptus-cc.in" ;; "tools/eucalyptus-nc") CONFIG_FILES="$CONFIG_FILES tools/eucalyptus-nc:tools/eucalyptus-nc.in" ;; - "tools/euca_conf") CONFIG_FILES="$CONFIG_FILES tools/euca_conf:tools/euca_conf.in" ;; + "clc/eucadmin/bin/euca_conf") CONFIG_FILES="$CONFIG_FILES clc/eucadmin/bin/euca_conf:clc/eucadmin/bin/euca_conf.in" ;; + "clc/eucadmin/setup.cfg") CONFIG_FILES="$CONFIG_FILES clc/eucadmin/setup.cfg:clc/eucadmin/setup.cfg.in" ;; "tools/eucalyptus-cloud") CONFIG_FILES="$CONFIG_FILES tools/eucalyptus-cloud:tools/eucalyptus-cloud.in" ;; "clc/modules/bootstrap/src/main/native/arguments.ggo") CONFIG_FILES="$CONFIG_FILES clc/modules/bootstrap/src/main/native/arguments.ggo:clc/modules/bootstrap/src/main/native/arguments.ggo.in" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -7896,7 +7952,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -7913,7 +7969,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' + ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi @@ -7927,18 +7983,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -8027,28 +8083,20 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// s/^[^=]*=[ ]*$// }' fi @@ -8076,7 +8124,7 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -8161,7 +8209,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 + as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -8174,7 +8222,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -8202,7 +8250,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -8229,7 +8277,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -8360,22 +8408,22 @@ s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 +which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} +which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -8386,19 +8434,19 @@ which seems to be undefined. Please make sure it is defined" >&2;} $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 + || as_fn_error "could not create -" "$LINENO" 5 fi ;; @@ -8413,7 +8461,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -8434,7 +8482,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 + $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff --git a/configure.ac b/configure.ac index 62f58ab3769..9db8f9f971b 100644 --- a/configure.ac +++ b/configure.ac @@ -101,6 +101,13 @@ if test -z "$APACHE2_MODULE_DIR"; then APACHE2_MODULE_DIR="${AXIS2C_HOME}/lib" fi +if test -z "$PYTHON_BIN"; then + for i in python2.5 python2.6 python2.7 python2.8 python2.9 + do + AC_PATH_PROG(PYTHON_BIN, $i) + done +fi + # Fix the paths for includes and libraries if test -n "${AXIS2C_HOME}" ; then if test -d "${AXIS2C_HOME}"/include ; then @@ -281,6 +288,7 @@ AC_SUBST(LIBS) AC_SUBST(INCLUDES) AC_SUBST(EXTENSIONS) AC_SUBST(INTERFACE_THEME) +AC_SUBST(PYTHON_BIN)