runSshCommand("id-role-grant", "-u", username, "-p", password, "-touser", username, "-proj", project, "-r",
"admin");
{
TokenProvider tokenProvider = AuthTokenProvider.build(identityClient, project, username, password);
OpenstackClient client = OpenstackClient.build(tokenProvider);
V2ProjectList projects = client.getIdentity().listProjects();
assertEquals(1, projects.tenants.size());
assertEquals(project, projects.tenants.get(0).name);
assertEquals(true, projects.tenants.get(0).enabled);
}
String password2 = "moresecrets";
runSshCommand("id-password-change", "-u", username, "-p", password2, "-o", workdir.resolve("passwordrecovery")
.toString());
{
TokenProvider tokenProvider = AuthTokenProvider.build(identityClient, project, username, password2);
OpenstackClient client = OpenstackClient.build(tokenProvider);
V2ProjectList projects = client.getIdentity().listProjects();
assertEquals(1, projects.tenants.size());
assertEquals(project, projects.tenants.get(0).name);
assertEquals(true, projects.tenants.get(0).enabled);
}