示例#1
0
  /**
   * Create a ResourceAllocatingSettingData of type 10
   *
   * @param session
   * @throws PersistenceException
   */
  private void createRASD10(Session session) throws PersistenceException {
    session.beginTransaction();

    ResourceAllocationSettingData rasd = new ResourceAllocationSettingData();
    rasd.setInstanceID("3");
    rasd.setAddress("00:1d:09:2c:50:d6");
    rasd.setResourceSubType("PCNet32");
    rasd.setConnection("VM Network");
    rasd.setElementName("Ethernet adapter on 'VM Network'");
    rasd.setResourceType(10);

    session.saveOrUpdate(rasd);

    // add this to the list "rasdHBs"
    rasdHBs.add(rasd);
  }