2.3. Listing Entities
The following example outlines how to list entities in the Red Hat Virtualization Manager. In this example, the entities to be listed are virtual machines, which are listed using the
getVMs()
method of the Api
class.
Procedure 2.1. Listing Entities
- Declare a
List
of the type of entity to be listed and use the corresponding method to get the list of entities:List<VM> vms = api.getVMs().list();