Commit 05e824b4 authored by Celine Noirot's avatar Celine Noirot
Browse files

Merge branch 'issue#172' into 'master'

Merge branch issue#172 with dev

See merge request !102
parents 12139447 f5cb64a8
......@@ -16,9 +16,8 @@
from jflow.workflow import Workflow
from ng6.project import Project
from ng6.config_reader import NG6ConfigReader
from workflows.types import ng6adminlogin, uniqproject, ng6space
class AddProject (Workflow):
......@@ -27,10 +26,13 @@ class AddProject (Workflow):
return "Add a brand new project"
def define_parameters(self, function="process"):
ng6conf = NG6ConfigReader()
space_choices = ng6conf.get_available_spaces()
self.add_parameter("admin_login", "The login of a ng6 administrator", required = True, type = ng6adminlogin)
self.add_parameter("project_name", "Give a name to your project (has to be unique)", flag = "--name", required = True, type = uniqproject)
self.add_parameter("project_description", "Give a description to your project", flag = "--description", required = True)
self.add_parameter("space", "Where to store data", flag = "--space", default="default", type=ng6space)
self.add_parameter("space", "Where to store data", flag = "--space", default="shortterm", type=ng6space, choices = space_choices)
def process(self):
project = Project(self.project_name, self.project_description, self.admin_login, None,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment