Ejemplo n.º 1
0
    def test_list_projects_server(self):
        from a2ml.api.a2ml_project import A2MLProject

        ctx = Context(path=os.path.join(
            os.environ.get('A2ML_PROJECT_PATH', ''), 'cli-integration-test'),
                      debug=True)
        provider = "azure"
        ctx.config.set('providers', [provider])
        ctx.config.set('use_server', True)

        A2MLProject(ctx, provider).list()
Ejemplo n.º 2
0
def select(ctx, provider, name):
    """Select Project.
       Name will be set in provider.yaml/project
    """
    A2MLProject(ctx, provider).select(name)
Ejemplo n.º 3
0
def delete(ctx, provider, name):
    """Delete Project"""
    A2MLProject(ctx, provider).delete(name)
Ejemplo n.º 4
0
def create(ctx, provider, name):
    """Create Project"""
    A2MLProject(ctx, provider).create(name)
Ejemplo n.º 5
0
def list_cmd(ctx, provider):
    """List Projects"""
    A2MLProject(ctx, provider).list()
Ejemplo n.º 6
0
def select_project_task(params):
    return with_context(
        params, lambda ctx: A2MLProject(ctx, None).select(
            *params['args'], **params['kwargs']))
Ejemplo n.º 7
0
 def func(ctx):
     res = A2MLProject(ctx, None).list(*params['args'], **params['kwargs'])
     return __map_collection_to_name(res, 'projects')