Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

proposed solution

  • Loading branch information...
commit c17add0960a44425467e007dc6e7e707021c65a9 2 parents 7413440 + 1a516bc
root authored
View
2  clc/eucadmin/Makefile
@@ -27,9 +27,11 @@ all: euca_admin
build: euca_admin
euca_admin:
+ @cat setup.cfg.template | sed "s:DESTDIR:$(DESTDIR):" > setup.cfg
$(PYTHON_BIN) setup.py build
install: euca_admin
+ @cat setup.cfg.template | sed "s:DESTDIR:$(DESTDIR):" > setup.cfg
$(PYTHON_BIN) setup.py install
clean:
View
10 clc/eucadmin/eucadmin/registervmwarebroker.py
@@ -37,11 +37,12 @@ class RegisterVMwareBroker(AWSQueryRequest):
ServicePath = '/services/Configuration'
ServiceClass = eucadmin.EucAdmin
Description = 'Register VMware broker'
- Params = Param(name='Partition',
+ Params = [
+ Param(name='Partition',
short_name='P',
long_name='partition',
ptype='string',
- optional=True,
+ optional=False,
doc='Partition for the VMware broker'),
Param(name='Host',
short_name='H',
@@ -54,8 +55,9 @@ class RegisterVMwareBroker(AWSQueryRequest):
long_name='port',
ptype='integer',
default=8773,
- optional=False,
- doc='Port for the VMware broker')]
+ optional=True,
+ doc='Port for the VMware broker')
+ ]
Args = [Param(name='Name',
long_name='name',
ptype='string',
View
2  clc/eucadmin/setup.cfg.in
@@ -1,2 +0,0 @@
-[install]
-install_scripts=@prefix@/usr/sbin
View
94 clc/eucadmin/setup.py
@@ -29,46 +29,72 @@
#
# Author: Mitch Garnaat mgarnaat@eucalyptus.com
+import sys
+import os
from distutils.core import setup
+from distutils.sysconfig import get_python_lib
+import fileinput
+import ConfigParser
-setup(name = "eucadmin",
- version = '0.1',
- description = "Eucalyptus Admin Tools",
+cfg = ConfigParser.ConfigParser()
+cfg.read('setup.cfg')
+prefix = cfg.get('install', 'prefix')
+install_scripts = cfg.get('install', 'install_scripts')
+path_header = 'import sys\nsys.path.append(\"%s\")\n' % (get_python_lib(prefix=prefix))
+
+binaries = ["bin/euca-add-user", "bin/euca-add-user-group",
+ "bin/euca-delete-user", "bin/euca-delete-user-group",
+ "bin/euca-add-user", "bin/euca-add-user-group",
+ "bin/euca_conf", "bin/euca-delete-user",
+ "bin/euca-delete-user-group",
+ "bin/euca-deregister-cluster",
+ "bin/euca-deregister-storage-controller",
+ "bin/euca-deregister-walrus",
+ "bin/euca-describe-clusters",
+ "bin/euca-describe-components",
+ "bin/euca-describe-properties",
+ "bin/euca-describe-services",
+ "bin/euca-describe-storage-controllers",
+ "bin/euca-describe-user-groups",
+ "bin/euca-describe-users",
+ "bin/euca-describe-walruses",
+ "bin/euca-get-credentials",
+ "bin/euca-modify-cluster",
+ "bin/euca-modify-property",
+ "bin/euca-modify-storage-controller",
+ "bin/euca-modify-walrus",
+ "bin/euca-register-cluster",
+ "bin/euca-register-storage-controller",
+ "bin/euca-register-walrus"]
+mangled = [ "%s/%s" % (install_scripts,os.path.basename(x)) for x in binaries ]
+
+setup(name="eucadmin",
+ version='0.1',
+ description="Eucalyptus Admin Tools",
long_description="CLI tools to help administer Eucalyptus",
- author = "Mitch Garnaat",
- author_email = "mgarnaat@eucalyptus.com",
- scripts = ["bin/euca-add-user", "bin/euca-add-user-group",
- "bin/euca-delete-user", "bin/euca-delete-user-group",
- "bin/euca-add-user", "bin/euca-add-user-group",
- "bin/euca_conf", "bin/euca-delete-user",
- "bin/euca-delete-user-group",
- "bin/euca-deregister-cluster",
- "bin/euca-deregister-storage-controller",
- "bin/euca-deregister-walrus",
- "bin/euca-describe-clusters",
- "bin/euca-describe-components",
- "bin/euca-describe-properties",
- "bin/euca-describe-services",
- "bin/euca-describe-storage-controllers",
- "bin/euca-describe-user-groups",
- "bin/euca-describe-users",
- "bin/euca-describe-walruses",
- "bin/euca-get-credentials",
- "bin/euca-modify-cluster",
- "bin/euca-modify-property",
- "bin/euca-modify-storage-controller",
- "bin/euca-modify-walrus",
- "bin/euca-register-cluster",
- "bin/euca-register-storage-controller",
- "bin/euca-register-walrus"],
- url = "http://eucalyptus.com/",
- packages = ['eucadmin'],
- license = 'BSD',
- platforms = 'Posix; MacOS X; Windows',
- classifiers = [ 'Development Status :: 5 - Production/Stable',
+ author="Mitch Garnaat",
+ author_email="mgarnaat@eucalyptus.com",
+ scripts=binaries,
+ url="http://eucalyptus.com/",
+ packages=['eucadmin'],
+ license='BSD',
+ platforms='Posix; MacOS X; Windows',
+ classifiers=[ 'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Topic :: Internet',
],
)
+
+if 'install' in sys.argv[1:]:
+ for line in fileinput.input(mangled, inplace=1,backup=None):
+ if fileinput.isfirstline():
+ print line,
+ print path_header,
+ elif line == 'import sys\n':
+ continue
+ elif line.startswith('sys.path.append'):
+ continue
+ else:
+ print line,
View
2  clc/modules/cluster-manager/src/main/java/com/eucalyptus/cluster/Cluster.java
@@ -208,7 +208,7 @@ public void fire( Cluster t ) {
on( Transition.INIT_CERTS )//
.from( State.AUTHENTICATING ).to( State.STARTING ).error( State.DOWN ).run( newRefresh( ClusterCertsCallback.class ) );
-// on( Transition.INIT_SERVICES ).from( State.CHECKING_SERVICE ).to( State.STARTING ).error( State.STARTING ).run( newRefresh( ServiceStateCallback.class ) );
+ on( Transition.INIT_SERVICES ).from( State.CHECKING_SERVICE ).to( State.STARTING ).error( State.STARTING ).run( newRefresh( ServiceStateCallback.class ) );
on( Transition.INIT_RESOURCES ).from( State.STARTING ).to( State.STARTING_RESOURCES ).error( State.DOWN ).run( newRefresh( ResourceStateCallback.class ) );
on( Transition.INIT_NET ).from( State.STARTING_RESOURCES ).to( State.STARTING_NET ).error( State.DOWN ).run( newRefresh( NetworkStateCallback.class ) );
on( Transition.INIT_VMS ).from( State.STARTING_NET ).to( State.STARTING_VMS ).error( State.DOWN ).run( newRefresh( VmStateCallback.class ) );
View
10 ...s/cluster-manager/src/main/java/com/eucalyptus/cluster/callback/ServiceStateCallback.java
@@ -17,5 +17,15 @@ public ServiceStateCallback( ) {
public void fire( DescribeServicesResponseType msg ) {
LOG.debug( msg );
}
+
+ @Override
+ public void initialize( DescribeServicesType request ) throws Exception {
+ LOG.debug( request );
+ }
+
+ @Override
+ public void fireException( Throwable t ) {
+ LOG.error( t, t );
+ }
}
View
4 configure
@@ -7195,7 +7195,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 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"
+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.template:clc/eucadmin/setup.cfg.template.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
@@ -7914,7 +7914,7 @@ do
"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" ;;
"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" ;;
+ "clc/eucadmin/setup.cfg.template") CONFIG_FILES="$CONFIG_FILES clc/eucadmin/setup.cfg.template:clc/eucadmin/setup.cfg.template.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" ;;
View
2  configure.ac
@@ -267,7 +267,7 @@ 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
+ clc/eucadmin/setup.cfg.template:clc/eucadmin/setup.cfg.template.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])
Please sign in to comment.
Something went wrong with that request. Please try again.