Show Table of Contents
2.3. 列出项
以下示例展示了如何列出 Red Hat Virtualization Manager 中的项。在这个示例中,所列出的项是虚拟机,使用
Api 类的 getVMs() 方法可以列出它们。
过程 2.1. 列出项
- 声明一个要被列出项的类型的
List,使用相应方法获得项列表:List<VM> vms = api.getVMs().list();

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.