Change-Id: I6d006d25b33ec8693ffaf71252c6cc009a63b5ef
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
confirmation_prompt=True,
help='user password')
@click.option('--projects',
confirmation_prompt=True,
help='user password')
@click.option('--projects',
+ prompt="Comma separate list of projects",
+ callback=lambda ctx, param, value: ''.join(value).split(',') if all(len(x)==1 for x in value) else value,
help='list of project ids that the user belongs to')
#@click.option('--description',
# default='no description',
help='list of project ids that the user belongs to')
#@click.option('--description',
# default='no description',
def create(self, name, user):
"""Creates a new OSM user
"""
def create(self, name, user):
"""Creates a new OSM user
"""
+ if len(user["projects"]) == 1:
+ user["projects"] = user["projects"][0].split(",")
http_code, resp = self._http.post_cmd(endpoint=self._apiBase,
postfields_dict=user)
#print('HTTP CODE: {}'.format(http_code))
http_code, resp = self._http.post_cmd(endpoint=self._apiBase,
postfields_dict=user)
#print('HTTP CODE: {}'.format(http_code))