use of org.ovirt.engine.sdk4.services.RolesService in project ovirt-engine-sdk-java by oVirt.
the class ListRoles method main.
public static void main(String[] args) throws Exception {
// Create the connection to the server:
Connection connection = connection().url("https://engine41.example.com/ovirt-engine/api").user("admin@internal").password("redhat123").trustStoreFile("truststore.jks").build();
// Get the reference to the service that manages the roles:
RolesService rolesService = connection.systemService().rolesService();
// Retrieve the roles:
List<Role> roles = rolesService.list().send().roles();
// For each role print its name and description:
for (Role role : roles) {
System.out.printf("%s: %s\n", role.name(), role.description());
}
// Close the connection to the server:
connection.close();
}
Aggregations