use of com.sun.identity.cli.CLIRequest in project OpenAM by OpenRock.
the class RealmTest method removeRealmAttribute.
@Parameters({ "realm" })
@Test(groups = { "cli-realm", "delete-realm-attr" })
public void removeRealmAttribute(String realm) throws CLIException, SMSException, SSOException {
String[] param = { realm };
entering("removeRealmAttribute", param);
String[] args = { "delete-realm-attr", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, realm, CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.SERVICE_NAME, "sunIdentityRepositoryService", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.ATTRIBUTE_NAME, "sunOrganizationStatus" };
CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
OrganizationConfigManager ocm = new OrganizationConfigManager(getAdminSSOToken(), realm);
Map values = ocm.getAttributes("sunIdentityRepositoryService");
Set attrValues = (Set) values.get("sunOrganizationStatus");
assert (attrValues == null);
exiting("removeRealmAttribute");
}
use of com.sun.identity.cli.CLIRequest in project OpenAM by OpenRock.
the class ShowApplicationTest method createApp.
@Test
public void createApp() throws CLIException {
String[] args = new String[5];
args[0] = "show-appl";
args[1] = CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME;
args[2] = "/";
args[3] = CLIConstants.PREFIX_ARGUMENT_LONG + CreateApplication.PARAM_APPL_NAME;
args[4] = ApplicationTypeManager.URL_APPLICATION_TYPE_NAME;
CLIRequest req = new CLIRequest(null, args, adminToken);
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
}
use of com.sun.identity.cli.CLIRequest in project OpenAM by OpenRock.
the class IdRepoTest method getIdentityServices.
@Parameters({ "realm", "uid" })
@Test(groups = { "cli-idrepo", "get-identity-svcs" }, dependsOnMethods = { "createIdentity" })
public void getIdentityServices(String realm, String uid) throws CLIException {
String[] param = { realm, uid };
entering("getIdentityServices", param);
String[] args = { "get-identity-svcs", CLIConstants.PREFIX_ARGUMENT_LONG + IdentityCommand.ARGUMENT_ID_TYPE, "User", CLIConstants.PREFIX_ARGUMENT_LONG + IdentityCommand.ARGUMENT_ID_NAME, uid, CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, realm };
CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
exiting("getIdentityServices");
}
use of com.sun.identity.cli.CLIRequest in project OpenAM by OpenRock.
the class IdRepoTest method getMemberships.
@Parameters({ "realm", "uid" })
@Test(groups = { "cli-idrepo", "show-memberships" }, dependsOnMethods = { "createIdentity" })
public void getMemberships(String realm, String uid) throws CLIException {
String[] param = { realm, uid };
entering("getMemberships", param);
String[] args = { "show-memberships", CLIConstants.PREFIX_ARGUMENT_LONG + IdentityCommand.ARGUMENT_ID_TYPE, "User", CLIConstants.PREFIX_ARGUMENT_LONG + IdentityCommand.ARGUMENT_ID_NAME, uid, CLIConstants.PREFIX_ARGUMENT_LONG + GetMemberships.ARGUMENT_MEMBERSHIP_IDTYPE, "Group", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, realm };
CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
exiting("getMemberships");
}
use of com.sun.identity.cli.CLIRequest in project OpenAM by OpenRock.
the class IdRepoTest method getMembers.
@Parameters({ "realm", "uid" })
@Test(groups = { "cli-idrepo", "show-members" }, dependsOnMethods = { "createIdentity" })
public void getMembers(String realm, String uid) throws CLIException {
String[] param = { realm, uid };
entering("getMembers", param);
String[] args = { "show-members", CLIConstants.PREFIX_ARGUMENT_LONG + IdentityCommand.ARGUMENT_ID_TYPE, "Group", CLIConstants.PREFIX_ARGUMENT_LONG + IdentityCommand.ARGUMENT_ID_NAME, DUMMY_GROUP, CLIConstants.PREFIX_ARGUMENT_LONG + GetMembers.ARGUMENT_MEMBERSHIP_IDTYPE, "User", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, realm };
CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
exiting("getMembers");
}
Aggregations