ndio/remote/resources.py
def create_project(self,
                       project_name,
                       dataset_name,
                       hostname,
                       is_public,
                       s3backend=0,
                       kvserver='localhost',
                       kvengine='MySQL',
                       mdengine='MySQL',
                       description=''):
        """
        Creates a project with the given parameters.

        Arguments:
            project_name (str): Project name
            dataset_name (str): Dataset name project is based on
            hostname (str): Hostname
            s3backend (str): S3 region to save the data in
            is_public (int): 1 is public. 0 is not public.
            kvserver (str): Server to store key value pairs in
            kvengine (str): Database to store key value pairs in
            mdengine (str): ???
            description (str): Description for your project

        Returns:
            bool: True if project created, false if not created.
        """
        url = self.url() + "/resource/dataset/{}".format(
            dataset_name) + "/project/{}/".format(project_name)

        json = {
            "project_name": project_name,
            "host": hostname,
            "s3backend": s3backend,
            "public": is_public,
            "kvserver": kvserver,
            "kvengine": kvengine,
            "mdengine": mdengine,
            "project_description": description
        }

        req = self.remote_utils.post_url(url, json=json)

        if req.status_code is not 201:
            raise RemoteDataUploadError('Could not upload {}'.format(req))
        if req.content == "" or req.content == b'':

            return True
        else:
            return False
def create_project(self,
                       project_name,
                       dataset_name,
                       hostname,
                       is_public,
                       s3backend=0,
                       kvserver='localhost',
                       kvengine='MySQL',
                       mdengine='MySQL',
                       description=''):
        """
        Creates a project with the given parameters.

        Arguments:
            project_name (str): Project name
            dataset_name (str): Dataset name project is based on
            hostname (str): Hostname
            s3backend (str): S3 region to save the data in
            is_public (int): 1 is public. 0 is not public.
            kvserver (str): Server to store key value pairs in
            kvengine (str): Database to store key value pairs in
            mdengine (str): ???
            description (str): Description for your project

        Returns:
            bool: True if project created, false if not created.
        """
        url = self.url() + "/resource/dataset/{}".format(
            dataset_name) + "/project/{}/".format(project_name)

        json = {
            "project_name": project_name,
            "host": hostname,
            "s3backend": s3backend,
            "public": is_public,
            "kvserver": kvserver,
            "kvengine": kvengine,
            "mdengine": mdengine,
            "project_description": description
        }

        req = self.remote_utils.post_url(url, json=json)

        if req.status_code is not 201:
            raise RemoteDataUploadError('Could not upload {}'.format(req))
        if req.content == "" or req.content == b'':

            return True
        else:
            return False
def create_project ( self , project_name , dataset_name , hostname , is_public , s3backend = 0 , kvserver = 'localhost' , kvengine = 'MySQL' , mdengine = 'MySQL' , description = '' ) : url = self . url ( ) + "/resource/dataset/{}" . format ( dataset_name ) + "/project/{}/" . format ( project_name ) json = { "project_name" : project_name , "host" : hostname , "s3backend" : s3backend , "public" : is_public , "kvserver" : kvserver , "kvengine" : kvengine , "mdengine" : mdengine , "project_description" : description } req = self . remote_utils . post_url ( url , json = json ) if req . status_code is not 201 : raise RemoteDataUploadError ( 'Could not upload {}' . format ( req ) ) if req . content == "" or req . content == b'' : return True else : return False
Creates a project with the given parameters.

        Arguments:
            project_name (str): Project name
            dataset_name (str): Dataset name project is based on
            hostname (str): Hostname
            s3backend (str): S3 region to save the data in
            is_public (int): 1 is public. 0 is not public.
            kvserver (str): Server to store key value pairs in
            kvengine (str): Database to store key value pairs in
            mdengine (str): ???
            description (str): Description for your project

        Returns:
            bool: True if project created, false if not created.
Creates a project with the given parameters .