rolelist = createRoleList(a, vm, vm.getGroupName(),vm.getGroupName()); } catch (Exception e) { e.printStackTrace(); ArrayList<ConfigurationSet> configurationSets = new ArrayList<ConfigurationSet>(); createParameters.setConfigurationSets(configurationSets); createParameters.setOSVirtualHardDisk(createOSVHD(vm, vm.getGroupName(),vm.getGroupName())); createParameters.setProvisionGuestAgent(true); createParameters.setRoleSize(VirtualMachineRoleSize.SMALL);
/** * Execute a given command on an component * * @param a the component on which the command will be executed * @param command the related shell command as a String * @param user the user associated */ public void executeOnVM(ComponentInstance a, String command, String user) {//TODO: use the connector factory VM ownerVM = (VM) deployer.getDestination(a).getType();//TODO: generics Provider provider = ownerVM.getProvider(); final Credentials credentials = provider.getCredentials(); JCloudsConnector jc = new JCloudsConnector(provider.getName(), credentials.getLogin(), credentials.getPassword()); jc.execCommand(ownerVM.getGroupName(), command, user, ownerVM.getPrivateKey()); jc.closeConnection(); }
template.setProductOfferUUID(findProduct(((double) vm.getMinRam()), vm.getMinCores())); if (!vm.getGroupName().equals("")) template.setVdcUUID(findResourceByName(vm.getGroupName(),ResourceType.VDC));
NodeMetadata nodeInstance = null; String groupName="cloudml-instance"; if(!vm.getGroupName().equals("")) groupName= vm.getGroupName();
@Override public String toString() { return "VMInstance: " + getName() + " Type:" + getType().getName() + "{\n" + "minRam:" + (getType()).getMinRam() + "\n" + "minCore" + (getType()).getMinCores() + "\n" + "minDisk" + (getType()).getMinStorage() + "\n" + "OS" + (getType()).getOs() + "\n" + "location" + (getType()).getLocation() + "\n" + "publicAdress" + getPublicAddress() + "\n" + "groupName" + (getType()).getGroupName(); }
NodeMetadata nodeInstance = null; String groupName="cloudml-instance"; if(!vm.getGroupName().equals("")) groupName= vm.getGroupName();
String name=lib.createUniqueComponentInstanceName(targetModel,existingVM); v=new VM(name+"-scaled",provider); v.setGroupName(existingVM.getGroupName()); v.setRegion(existingVM.getRegion()); v.setImageId(existingVM.getImageId());
String name=lib.createUniqueComponentInstanceName(currentModel,existingVM); v=new VM(name+"-fromImage",existingVM.getProvider()); v.setGroupName(existingVM.getGroupName()); v.setRegion(existingVM.getRegion()); v.setImageId("tempID");
String name=lib.createUniqueComponentInstanceName(target,existingVM); v=new VM(name+"-fromImage",existingVM.getProvider()); v.setGroupName(existingVM.getGroupName()); v.setRegion(existingVM.getRegion()); v.setImageId("tempID");
kNode.setGroupName(vm.getGroupName()); kNode.setImageId(vm.getImageId()); kNode.setIs64os(vm.getIs64os());