Beispiel #1
0
def mongo(passwd=None):
    from cloudmesh.server.database import Database

    database = Database()
    if passwd is None:
        database.set_password_local()
    else:
        database.set_password_local(passwd=passwd)

    database.set_credentials()
    database.initialize_user()
 def do_admin(self, args, arguments):
     """
     Usage:
         admin password reset
     
     Description:
         admin password reset
             reset portal password
     """
     
     if arguments['password'] and arguments['reset']:
         db = Database()
         db.set_password_local()
Beispiel #3
0
    def do_admin(self, args, arguments):
        """
        Usage:
            admin password reset
        
        Description:
            admin password reset
                reset portal password
        """

        if arguments['password'] and arguments['reset']:
            db = Database()
            db.set_password_local()
Beispiel #4
0
def mongo(passwd=None):
    from cloudmesh.server.database import Database

    database = Database()
    if passwd is None:
        database.set_password_local()
    else:
        database.set_password_local(passwd=passwd)

    database.set_credentials()
    database.initialize_user()
Beispiel #5
0
def register():
    from cloudmesh.server.database import Database

    database = Database()
    database.set_credentials()
Beispiel #6
0
#!/usr/bin/env python

from cloudmesh.server.database import Database

db = Database()
db.set_password_local_mongodb()

    def do_admin(self, args, arguments):
        """
        
        Usage:
          admin password reset
          admin server start
          admin server stop
          admin server status
          admin mongo start
          admin mongo stop
          admin mongo status
          admin mongo password
          admin celery start
          admin celery stop
          admin celery status
          admin rabbitmq status
          admin rabbitmq start
          admin rabbitmq stop
          admin version

        Options:


        Description:
            admin password reset
               reset portal password
        """
        '''
        def _comamnd_type(arguments):
            for kind in ['server', 'rabbitmq', 'mongo', 'celery']:
                if arguments[kind] == True:
                    if kind == "server":
                        kind = "cloudmesh"
                    return kind
            return None
                 
        if arguments['password'] and arguments['reset']:
            db = Database()
            db.set_password_local()
            return
            
        elif arguments['mongo'] and arguments['password']:
            set_mongo_password()
            return
            
        kind = _command_type(arguments)
            
        if kind is 'cloudmesh':
            server = cloudmesh_server()
        elif kind is 'mongo':
            server = mongo_server()
        elif kind is 'rabbitmq':
            server = rabbitmq_server()
        elif kind is 'celery':
            server = celery_server()
        elif kind is None:
           raise Exception("wrong command type")
        
        if arguments['start']:
            #server.start()
            pass
        elif arguments['stop']:
            #server.stop()
            #server.kill()
            pass
            
        elif arguments['status']:
            Console.msg('Status of {0} Server'.format(kind))
            # server.status()
            pass
            #print "status"
            #queue_ls()
            #mongo_info()
        '''
        if arguments['password'] and arguments['reset']:
            db = Database()
            db.set_password_local()
            return

        elif arguments['mongo'] and arguments['password']:
            set_mongo_password()
            return

        server = cloudmesh_server()
        # ######################################################################
        # MONGO SERVER
        # ######################################################################
        if arguments['mongo'] and arguments['status']:
            print(server._info_mongo())
        elif arguments['mongo'] and arguments['start']:
            server._start_mongo()
        elif arguments['mongo'] and arguments['stop']:
            server._stop_mongo()

        else:
            print("UNDER DEVELOPMENT")
Beispiel #8
0
    def do_admin(self, args, arguments):
        """
        
        Usage:
          admin password reset
          admin server start
          admin server stop
          admin server status
          admin mongo start
          admin mongo stop
          admin mongo status
          admin mongo password
          admin celery start
          admin celery stop
          admin celery status
          admin rabbitmq status
          admin rabbitmq start
          admin rabbitmq stop
          admin version

        Options:


        Description:
            admin password reset
               reset portal password
        """
        
        '''
        def _comamnd_type(arguments):
            for kind in ['server', 'rabbitmq', 'mongo', 'celery']:
                if arguments[kind] == True:
                    if kind == "server":
                        kind = "cloudmesh"
                    return kind
            return None
                 
        if arguments['password'] and arguments['reset']:
            db = Database()
            db.set_password_local()
            return
            
        elif arguments['mongo'] and arguments['password']:
            set_mongo_password()
            return
            
        kind = _command_type(arguments)
            
        if kind is 'cloudmesh':
            server = cloudmesh_server()
        elif kind is 'mongo':
            server = mongo_server()
        elif kind is 'rabbitmq':
            server = rabbitmq_server()
        elif kind is 'celery':
            server = celery_server()
        elif kind is None:
           raise Exception("wrong command type")
        
        if arguments['start']:
            #server.start()
            pass
        elif arguments['stop']:
            #server.stop()
            #server.kill()
            pass
            
        elif arguments['status']:
            Console.msg('Status of {0} Server'.format(kind))
            # server.status()
            pass
            #print "status"
            #queue_ls()
            #mongo_info()
        '''
        if arguments['password'] and arguments['reset']:
            db = Database()
            db.set_password_local()
            return
            
        elif arguments['mongo'] and arguments['password']:
            set_mongo_password()
            return
            
        server = cloudmesh_server()
        # ######################################################################
        # MONGO SERVER
        # ######################################################################
        if arguments['mongo'] and arguments['status']:
            print(server._info_mongo())
        elif arguments['mongo'] and arguments['start']:
            server._start_mongo()
        elif arguments['mongo'] and arguments['stop']:
            server._stop_mongo()
        
        
        else:
            print("UNDER DEVELOPMENT")
Beispiel #9
0
#!/usr/bin/env python

from cloudmesh.server.database import Database

db = Database()
db.set_password_local()

Beispiel #10
0
def register():
    from cloudmesh.server.database import Database

    database = Database()
    database.set_credentials()