/** * Notify RM to create a new machine. * * @param name name of the machine * @return the id of the new machine */ public String createMachine(String name) { String id = generateID().toString(); ElementAttributeManager mgr = new ElementAttributeManager(); AttributeManager attrMgr = new AttributeManager(); attrMgr.addAttribute( MachineAttributes.getStateAttributeDefinition().create(MachineAttributes.State.UP)); attrMgr.addAttribute(ElementAttributes.getNameAttributeDefinition().create(name)); mgr.setAttributeManager(new RangeSet(id), attrMgr); IPResourceManager rm = (IPResourceManager) getResourceManager().getAdapter(IPResourceManager.class); fireRuntimeNewMachineEvent(eventFactory.newRuntimeNewMachineEvent(rm.getID(), mgr)); DebugUtil.trace( DebugUtil.RTS_TRACING, "RTS {0}: new machine #{1}", getResourceManager().getConfiguration().getName(), id); //$NON-NLS-1$ return id; }