details: http://www.bx.psu.edu/hg/galaxy/rev/b35215d0913e changeset: 3084:b35215d0913e user: Enis Afgan <afgane@gmail.com> date: Thu Nov 05 23:30:50 2009 -0500 description: Minor style modifications/clarifications. diffstat: lib/galaxy/cloud/providers/ec2.py | 1 + lib/galaxy/model/migrate/versions/0014_cloud_tables.py | 73 ++---------------- lib/galaxy/web/controllers/cloud.py | 5 + 3 files changed, 15 insertions(+), 64 deletions(-) diffs (115 lines): diff -r 28252033d66a -r b35215d0913e lib/galaxy/cloud/providers/ec2.py --- a/lib/galaxy/cloud/providers/ec2.py Thu Nov 05 11:27:00 2009 -0500 +++ b/lib/galaxy/cloud/providers/ec2.py Thu Nov 05 23:30:50 2009 -0500 @@ -506,6 +506,7 @@ log.error( "Retrieving volume(s) from cloud for UCI '%s' failed: " % ( uci.name, str(e) ) ) uci.error( "Retrieving volume(s) from cloud failed: " + str(e) ) uci.state( uci_states.ERROR ) + uci.flush() return None # Update store status in local DB with info from cloud provider diff -r 28252033d66a -r b35215d0913e lib/galaxy/model/migrate/versions/0014_cloud_tables.py --- a/lib/galaxy/model/migrate/versions/0014_cloud_tables.py Thu Nov 05 11:27:00 2009 -0500 +++ b/lib/galaxy/model/migrate/versions/0014_cloud_tables.py Thu Nov 05 23:30:50 2009 -0500 @@ -101,75 +101,20 @@ def upgrade(): metadata.reflect() - log.debug( "Creating cloud_image table." ) - try: - CloudImage_table.create() - except Exception, e: - log.debug( "Creating cloud_image table failed. Table probably exists already." ) - log.debug( "Creating cloud_uci table." ) - try: - UCI_table.create() - except Exception, e: - log.debug( "Creating UCI table failed. Table probably exists already." ) - try: - CloudUserCredentials_table.create() - except Exception, e: - log.debug( "Creating cloud_image table failed. Table probably exists already." ) - log.debug( "Creating cloud_provider table." ) - try: - CloudProvider_table.create() - except Exception, e: - log.debug( "Creating cloud_provider table failed. Table probably exists already." ) - log.debug( "Creating cloud_instance table." ) - #try: + + CloudImage_table.create() + UCI_table.create() + CloudUserCredentials_table.create() + CloudProvider_table.create() CloudInstance_table.create() - #except Exception, e: - # log.debug( "Creating cloud_instance table failed. Table probably exists already." ) - #log.debug( "Creating cloud_store table." ) - #try: CloudStore_table.create() - #except Exception: - # log.debug( "Creating cloud_store table failed. Table probably exists already." ) def downgrade(): metadata.reflect() - try: - #log.debug( "Would drop cloud_image table." ) - CloudImage_table.drop() #Enable before release - except Exception, e: - log.debug( "Dropping cloud_image table failed: %s" % str( e ) ) -# try: -# #log.debug( "Would drop cloud_instance table." ) -# print "inst" + CloudImage_table.drop() CloudInstance_table.drop() -# except Exception, e: -# log.debug( "Dropping cloud_instance table failed: %s" % str( e ) ) - -# try: -# #log.debug( "Would drop cloud_store table." ) -# print "store" CloudStore_table.drop() -# except Exception, e: -# log.debug( "Dropping cloud_store table failed: %s" % str( e ) ) - - try: - log.debug( "Would drop cloud_user_credentials table." ) - CloudUserCredentials_table.drop() #Enable before putting final version - except Exception, e: - log.debug( "Dropping cloud_user_credentials table failed: %s" % str( e ) ) - - try: - log.debug( "Would drop UCI table." ) - UCI_table.drop() - except Exception, e: - log.debug( "Dropping UCI table failed: %s" % str( e ) ) - - try: - log.debug( "Would drop cloud_provider table." ) - CloudProvider_table.drop() - except Exception, e: - log.debug( "Dropping cloud_provider table failed: %s" % str( e ) ) - - - + CloudUserCredentials_table.drop() + UCI_table.drop() + CloudProvider_table.drop() \ No newline at end of file diff -r 28252033d66a -r b35215d0913e lib/galaxy/web/controllers/cloud.py --- a/lib/galaxy/web/controllers/cloud.py Thu Nov 05 11:27:00 2009 -0500 +++ b/lib/galaxy/web/controllers/cloud.py Thu Nov 05 23:30:50 2009 -0500 @@ -76,6 +76,11 @@ .filter_by( user=user ) \ .order_by( model.CloudUserCredentials.c.name ) \ .all() + + cloudProviders = trans.sa_session.query( model.CloudProvider ) \ + .filter_by( user=user ) \ + .order_by( model.CloudUserCredentials.c.name ) \ + .all() liveInstances = trans.sa_session.query( model.UCI ) \ .filter_by( user=user ) \