X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fosmclient.git;a=blobdiff_plain;f=osmclient%2Fscripts%2Fosm.py;h=97c194287e2f17741e3b8c9529168c55a3cdf0a1;hp=dd01b841aa50e2bf5802c37c8f8a9abc48d44674;hb=3b9e2c9599832958c8b8bf7c85433a76f65bd043;hpb=c60b972ed994141159f9455c9b9a5ae19639eff9 diff --git a/osmclient/scripts/osm.py b/osmclient/scripts/osm.py index dd01b84..97c1942 100755 --- a/osmclient/scripts/osm.py +++ b/osmclient/scripts/osm.py @@ -2315,6 +2315,33 @@ def project_show(ctx, name): print(table) +@cli.command(name='project-update') +@click.argument('project') +@click.option('--name', + prompt=True, + help='new name for the project') + +@click.pass_context +def project_update(ctx, project, name): + """ + Update a project name + + :param ctx: + :param project: id or name of the project to modify + :param name: new name for the project + :return: + """ + + project_changes = {} + project_changes['name'] = name + + try: + check_client_version(ctx.obj, ctx.command.name) + ctx.obj.project.update(project, project_changes) + except ClientException as inst: + print(inst.message) + + #################### # User mgmt operations ####################