def post(self): args = parser.parse_args() pipeline = Pipeline(name=args['name']) pipeline.assign_attributes(args) pipeline.save() pipeline.save_relations(args) return pipeline, 201
def post(self): args = parser.parse_args() pipeline = Pipeline(name=args['name']) pipeline.assign_attributes(args) pipeline.save() pipeline.save_relations(args) tracker = insight.GAProvider() tracker.track_event(category='pipelines', action='create') return pipeline, 201
def post(self): args = import_parser.parse_args() file_ = args['upload_file'] data = {} if file_: data = json.loads(file_.read()) pipeline = Pipeline(name=data['name']) pipeline.save() pipeline.import_data(data) return pipeline, 201 return data
def post(self): tracker = insight.GAProvider() tracker.track_event(category='pipelines', action='import') args = import_parser.parse_args() file_ = args['upload_file'] data = {} if file_: data = json.loads(file_.read()) pipeline = Pipeline(name=data['name']) pipeline.save() pipeline.import_data(data) return pipeline, 201 return data