Change-Id: I4e7a571e7da73790f981f1262bdcfd4ba89510e4
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
@click.option(
"--endpoints", help="Comma-separated list of IP or hostnames of the Juju controller"
)
+@click.option("--newname", help="New name for the VCA")
@click.option("--user", help="Username with admin priviledges")
@click.option("--secret", help="Password of the specified username")
@click.option("--cacert", help="CA certificate")
def vca_update(
ctx,
name,
+ newname,
endpoints,
user,
secret,
logger.debug("")
utils.check_client_version(ctx.obj, ctx.command.name)
vca = {}
- vca["name"] = name
+ if newname:
+ vca["name"] = newname
if endpoints:
vca["endpoints"] = endpoints.split(",")
if user:
args=["name"],
)
mock_check_client_version.assert_called()
- self.ctx_obj.vca.update.assert_called_with("name", {"name": "name"})
+ self.ctx_obj.vca.update.assert_called_with("name", {})
mock_pretty_table.assert_not_called()
self.table.add_row.assert_not_called()
mock_print.assert_not_called()
obj=self.ctx_obj,
args=[
"name",
+ "--newname",
+ "newname",
"--endpoints",
"1.2.3.4:17070",
"--user",
self.ctx_obj.vca.update.assert_called_with(
"name",
{
- "name": "name",
+ "name": "newname",
"endpoints": ["1.2.3.4:17070"],
"user": "user",
"secret": "secret",